diff --git a/CHANGELOG.md b/CHANGELOG.md index e77bf1ad3f3f..45ac6243f717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,60 @@ # CHANGELOG +## `v39.0.0` + +### New Packages + +| Package Name | API Version | +| -----------: | :---------: | +| appconfiguration | 2019-11-01-preview | +| backup | 2019-06-15 | +| containerregistry | 2019-08-15-preview | +| containerservice | 2020-01-01 | +| digitaltwins | 2020-03-01-preview | +| documentdb | 2019-12-12 | +| frontdoor | 2020-01-01 | +| hybridcompute | 2019-12-12 | +| kusto | 2019-11-09 | +| netapp | 2019-11-01 | +| network | 2019-11-01 | +| support | 2019-05-01-preview | + +### Updated Packages + +| Package Name | API Version | +| -----------: | :---------: | +| blueprint | 2018-11-01-preview | +| compute | 2019-07-01 | +| containerservice | 2019-11-01 | +| eventgrid | 2020-04-01-preview | +| hdinsight | 2015-03-01-preview
2018-06-01-preview | +| healthcareapis | 2019-09-16 | +| keyvault | 2018-02-14 | +| operationalinsights | 2015-11-01-preview | +| policy | 2019-09-01 | +| qnamaker | v4.0 | +| search | 2015-08-19 | +| siterecovery | 2018-07-10 | +| sql | 2017-03-01-preview
2018-06-01-preview
v3.0 | +| web | 2019-08-01 | + +### BreakingChanges + +| Package Name | API Version | +| -----------: | :---------: | +| apimanagement | 2019-01-01 | +| containerservice | 2017-07-01
2017-08-31
2017-09-30
2018-03-31 | +| insights | 2018-03-01
2018-09-01
2018-11-01-preview
2019-03-01
2019-06-01 | +| machinelearningservices | 2018-11-19
2019-05-01
2019-06-01
2019-11-01
2020-01-01 | +| managedapplications | 2019-07-01 | +| mariadb | 2018-06-01 | +| netapp | 2019-05-01
2019-06-01
2019-07-01
2019-08-01
2019-10-01 | +| network | 2019-09-01 | +| security | v1.0
v2.0
v3.0 | +| securityinsight | 2017-08-01-preview | +| siterecovery | 2018-01-10 | +| storage | 2019-06-01 | + ## `v38.2.0` ### New Packages diff --git a/Gopkg.lock b/Gopkg.lock index bf58cc9ce29a..e33a2b23f376 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,7 +2,7 @@ [[projects]] - digest = "1:2e9f9f3381b65a6f99438e30ce398cbc13eb224187950158321ad9e560261f40" + digest = "1:46eaa8d8d35d2004f218ad6c48b6c81e0b1c3457915f55a40831b5af3fb43b76" name = "github.com/Azure/go-autorest" packages = [ "autorest", @@ -17,8 +17,8 @@ "tracing", ] pruneopts = "UT" - revision = "21d4b01533b1005be0d020da67a6d3f8ebdf0141" - version = "v13.3.1" + revision = "20a15b4e99645bc30a1cf8de518a6e8ac331c864" + version = "v13.3.2" [[projects]] digest = "1:f313598719f69ec4edbcd75b0f2ef1c8ed9e00f6ff3d7583ac3966db2d70d326" @@ -78,12 +78,12 @@ version = "v1.0" [[projects]] - digest = "1:ca955a9cd5b50b0f43d2cc3aeb35c951473eeca41b34eb67507f1dbcc0542394" + digest = "1:4cc7748b74453830951f95ddc3fd980387e7c13f77cc33d7cba54cd6b96dad26" name = "github.com/kr/pretty" packages = ["."] pruneopts = "UT" - revision = "73f6ac0b30a98e433b289500d779f50c1a6f0712" - version = "v0.1.0" + revision = "4e0886370c3a67530192c6a238cff68f56c141b0" + version = "v0.2.0" [[projects]] digest = "1:15b5cc79aad436d47019f814fde81a10221c740dc8ddf769221a65097fb6c2e9" @@ -102,12 +102,12 @@ version = "v1.1.0" [[projects]] - digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b" + digest = "1:9e1d37b58d17113ec3cb5608ac0382313c5b59470b94ed97d0976e69c7022314" name = "github.com/pkg/errors" packages = ["."] pruneopts = "UT" - revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4" - version = "v0.8.1" + revision = "614d223910a179a466c1767a985424175c39b465" + version = "v0.9.1" [[projects]] digest = "1:274f67cb6fed9588ea2521ecdac05a6d62a8c51c074c1fccc6a49a40ba80e925" @@ -150,19 +150,14 @@ "pkcs12/internal/rc2", ] pruneopts = "UT" - revision = "becbf705a91575484002d598f87d74f0002801e7" + revision = "69ecbb4d6d5dab05e49161c6e77ea40a030884e1" [[projects]] branch = "master" - digest = "1:81034a933b8e243f6c700951903f436029c1c1b53b0d694a9e8626cdeb835b00" + digest = "1:22bcbe2280ed955f8207e503921c3999bd63de4b07daf41a5306e34e492e4f57" name = "golang.org/x/tools" packages = [ "go/ast/astutil", - "go/gcexportdata", - "go/internal/gcimporter", - "go/internal/packagesdriver", - "go/packages", - "go/types/typeutil", "imports", "internal/fastwalk", "internal/gopathwalk", @@ -171,7 +166,7 @@ "internal/semver", ] pruneopts = "UT" - revision = "3721262b3e7c542ed1607f063180bccdb22c2d02" + revision = "2f3ba24bd6e75104fb11be4edf062de340ffd1ab" [[projects]] branch = "v1" @@ -182,12 +177,12 @@ revision = "41f04d3bba152ddec2103e299fed053415705330" [[projects]] - digest = "1:b75b3deb2bce8bc079e16bb2aecfe01eb80098f5650f9e93e5643ca8b7b73737" + digest = "1:55b110c99c5fdc4f14930747326acce56b52cfce60b24b1c03ef686ac0e46bb1" name = "gopkg.in/yaml.v2" packages = ["."] pruneopts = "UT" - revision = "1f64d6156d11335c3f22d9330b0ad14fc1e789ce" - version = "v2.2.7" + revision = "53403b58ad1b561927d19068c655246f2db79d48" + version = "v2.2.8" [solve-meta] analyzer-name = "dep" diff --git a/Gopkg.toml b/Gopkg.toml index dba913f3a5bc..d6f2e6cc7899 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -25,7 +25,7 @@ [[constraint]] name = "github.com/Azure/go-autorest" - version = "13.3.1" + version = "13.3.2" [[constraint]] branch = "master" diff --git a/profiles/latest/apimanagement/mgmt/apimanagement/models.go b/profiles/latest/apimanagement/mgmt/apimanagement/models.go index c61240a715fb..61bfcd8bba62 100644 --- a/profiles/latest/apimanagement/mgmt/apimanagement/models.go +++ b/profiles/latest/apimanagement/mgmt/apimanagement/models.go @@ -112,6 +112,7 @@ type ContentFormat = original.ContentFormat const ( Openapi ContentFormat = original.Openapi Openapijson ContentFormat = original.Openapijson + OpenapijsonLink ContentFormat = original.OpenapijsonLink OpenapiLink ContentFormat = original.OpenapiLink SwaggerJSON ContentFormat = original.SwaggerJSON SwaggerLinkJSON ContentFormat = original.SwaggerLinkJSON @@ -156,6 +157,14 @@ const ( System GroupType = original.System ) +type HTTPCorrelationProtocol = original.HTTPCorrelationProtocol + +const ( + Legacy HTTPCorrelationProtocol = original.Legacy + None HTTPCorrelationProtocol = original.None + W3C HTTPCorrelationProtocol = original.W3C +) + type HostnameType = original.HostnameType const ( @@ -254,9 +263,9 @@ const ( type ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleType const ( - Automatic ResourceSkuCapacityScaleType = original.Automatic - Manual ResourceSkuCapacityScaleType = original.Manual - None ResourceSkuCapacityScaleType = original.None + ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeAutomatic + ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeManual + ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeNone ) type SamplingType = original.SamplingType @@ -338,6 +347,14 @@ const ( UserStatePending UserState = original.UserStatePending ) +type Verbosity = original.Verbosity + +const ( + Error Verbosity = original.Error + Information Verbosity = original.Information + Verbose Verbosity = original.Verbose +) + type VersioningScheme = original.VersioningScheme const ( @@ -1366,6 +1383,9 @@ func PossibleGrantTypeValues() []GrantType { func PossibleGroupTypeValues() []GroupType { return original.PossibleGroupTypeValues() } +func PossibleHTTPCorrelationProtocolValues() []HTTPCorrelationProtocol { + return original.PossibleHTTPCorrelationProtocolValues() +} func PossibleHostnameTypeValues() []HostnameType { return original.PossibleHostnameTypeValues() } @@ -1426,6 +1446,9 @@ func PossibleTemplateNameValues() []TemplateName { func PossibleUserStateValues() []UserState { return original.PossibleUserStateValues() } +func PossibleVerbosityValues() []Verbosity { + return original.PossibleVerbosityValues() +} func PossibleVersioningScheme1Values() []VersioningScheme1 { return original.PossibleVersioningScheme1Values() } diff --git a/profiles/latest/containerservice/mgmt/containerservice/containerserviceapi/models.go b/profiles/latest/containerservice/mgmt/containerservice/containerserviceapi/models.go index c764f39fdfa6..cf80a031fe85 100644 --- a/profiles/latest/containerservice/mgmt/containerservice/containerserviceapi/models.go +++ b/profiles/latest/containerservice/mgmt/containerservice/containerserviceapi/models.go @@ -19,7 +19,7 @@ package containerserviceapi -import original "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2019-11-01/containerservice/containerserviceapi" +import original "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-01-01/containerservice/containerserviceapi" type AgentPoolsClientAPI = original.AgentPoolsClientAPI type ContainerServicesClientAPI = original.ContainerServicesClientAPI diff --git a/profiles/latest/containerservice/mgmt/containerservice/models.go b/profiles/latest/containerservice/mgmt/containerservice/models.go index 6881a24572fa..47c901fc0120 100644 --- a/profiles/latest/containerservice/mgmt/containerservice/models.go +++ b/profiles/latest/containerservice/mgmt/containerservice/models.go @@ -22,7 +22,7 @@ package containerservice import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2019-11-01/containerservice" + original "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-01-01/containerservice" ) const ( diff --git a/profiles/latest/cosmos-db/mgmt/documentdb/documentdbapi/models.go b/profiles/latest/cosmos-db/mgmt/documentdb/documentdbapi/models.go index 5c1e5ea9e492..086148a474fe 100644 --- a/profiles/latest/cosmos-db/mgmt/documentdb/documentdbapi/models.go +++ b/profiles/latest/cosmos-db/mgmt/documentdb/documentdbapi/models.go @@ -19,7 +19,7 @@ package documentdbapi -import original "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-08-01/documentdb/documentdbapi" +import original "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-12-12/documentdb/documentdbapi" type CassandraResourcesClientAPI = original.CassandraResourcesClientAPI type CollectionClientAPI = original.CollectionClientAPI @@ -37,5 +37,7 @@ type PartitionKeyRangeIDRegionClientAPI = original.PartitionKeyRangeIDRegionClie type PercentileClientAPI = original.PercentileClientAPI type PercentileSourceTargetClientAPI = original.PercentileSourceTargetClientAPI type PercentileTargetClientAPI = original.PercentileTargetClientAPI +type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI type SQLResourcesClientAPI = original.SQLResourcesClientAPI type TableResourcesClientAPI = original.TableResourcesClientAPI diff --git a/profiles/latest/cosmos-db/mgmt/documentdb/models.go b/profiles/latest/cosmos-db/mgmt/documentdb/models.go index 94d6bb0d751e..0697b60c4706 100644 --- a/profiles/latest/cosmos-db/mgmt/documentdb/models.go +++ b/profiles/latest/cosmos-db/mgmt/documentdb/models.go @@ -22,7 +22,7 @@ package documentdb import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-08-01/documentdb" + original "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-12-12/documentdb" ) const ( @@ -167,6 +167,7 @@ const ( type ARMProxyResource = original.ARMProxyResource type ARMResourceProperties = original.ARMResourceProperties +type AzureEntityResource = original.AzureEntityResource type BaseClient = original.BaseClient type Capability = original.Capability type CassandraKeyspaceCreateUpdateParameters = original.CassandraKeyspaceCreateUpdateParameters @@ -303,7 +304,21 @@ type PercentileMetricListResult = original.PercentileMetricListResult type PercentileMetricValue = original.PercentileMetricValue type PercentileSourceTargetClient = original.PercentileSourceTargetClient type PercentileTargetClient = original.PercentileTargetClient +type PrivateEndpointConnection = original.PrivateEndpointConnection +type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionListResult +type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient +type PrivateEndpointConnectionsCreateOrUpdateFuture = original.PrivateEndpointConnectionsCreateOrUpdateFuture +type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture +type PrivateEndpointProperty = original.PrivateEndpointProperty +type PrivateLinkResource = original.PrivateLinkResource +type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult +type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties +type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient +type PrivateLinkServiceConnectionStateProperty = original.PrivateLinkServiceConnectionStateProperty +type ProxyResource = original.ProxyResource type RegionForOnlineOffline = original.RegionForOnlineOffline +type Resource = original.Resource type SQLContainerCreateUpdateParameters = original.SQLContainerCreateUpdateParameters type SQLContainerCreateUpdateProperties = original.SQLContainerCreateUpdateProperties type SQLContainerGetProperties = original.SQLContainerGetProperties @@ -370,74 +385,75 @@ type ThroughputSettingsGetResults = original.ThroughputSettingsGetResults type ThroughputSettingsResource = original.ThroughputSettingsResource type ThroughputSettingsUpdateParameters = original.ThroughputSettingsUpdateParameters type ThroughputSettingsUpdateProperties = original.ThroughputSettingsUpdateProperties +type TrackedResource = original.TrackedResource type UniqueKey = original.UniqueKey type UniqueKeyPolicy = original.UniqueKeyPolicy type Usage = original.Usage type UsagesResult = original.UsagesResult type VirtualNetworkRule = original.VirtualNetworkRule -func New(subscriptionID string) BaseClient { - return original.New(subscriptionID) +func New(subscriptionID string, subscriptionID1 string) BaseClient { + return original.New(subscriptionID, subscriptionID1) } -func NewCassandraResourcesClient(subscriptionID string) CassandraResourcesClient { - return original.NewCassandraResourcesClient(subscriptionID) +func NewCassandraResourcesClient(subscriptionID string, subscriptionID1 string) CassandraResourcesClient { + return original.NewCassandraResourcesClient(subscriptionID, subscriptionID1) } -func NewCassandraResourcesClientWithBaseURI(baseURI string, subscriptionID string) CassandraResourcesClient { - return original.NewCassandraResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewCassandraResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CassandraResourcesClient { + return original.NewCassandraResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewCollectionClient(subscriptionID string) CollectionClient { - return original.NewCollectionClient(subscriptionID) +func NewCollectionClient(subscriptionID string, subscriptionID1 string) CollectionClient { + return original.NewCollectionClient(subscriptionID, subscriptionID1) } -func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string) CollectionClient { - return original.NewCollectionClientWithBaseURI(baseURI, subscriptionID) +func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionClient { + return original.NewCollectionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewCollectionPartitionClient(subscriptionID string) CollectionPartitionClient { - return original.NewCollectionPartitionClient(subscriptionID) +func NewCollectionPartitionClient(subscriptionID string, subscriptionID1 string) CollectionPartitionClient { + return original.NewCollectionPartitionClient(subscriptionID, subscriptionID1) } -func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string) CollectionPartitionClient { - return original.NewCollectionPartitionClientWithBaseURI(baseURI, subscriptionID) +func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionClient { + return original.NewCollectionPartitionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewCollectionPartitionRegionClient(subscriptionID string) CollectionPartitionRegionClient { - return original.NewCollectionPartitionRegionClient(subscriptionID) +func NewCollectionPartitionRegionClient(subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient { + return original.NewCollectionPartitionRegionClient(subscriptionID, subscriptionID1) } -func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string) CollectionPartitionRegionClient { - return original.NewCollectionPartitionRegionClientWithBaseURI(baseURI, subscriptionID) +func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient { + return original.NewCollectionPartitionRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewCollectionRegionClient(subscriptionID string) CollectionRegionClient { - return original.NewCollectionRegionClient(subscriptionID) +func NewCollectionRegionClient(subscriptionID string, subscriptionID1 string) CollectionRegionClient { + return original.NewCollectionRegionClient(subscriptionID, subscriptionID1) } -func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string) CollectionRegionClient { - return original.NewCollectionRegionClientWithBaseURI(baseURI, subscriptionID) +func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionRegionClient { + return original.NewCollectionRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewDatabaseAccountRegionClient(subscriptionID string) DatabaseAccountRegionClient { - return original.NewDatabaseAccountRegionClient(subscriptionID) +func NewDatabaseAccountRegionClient(subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient { + return original.NewDatabaseAccountRegionClient(subscriptionID, subscriptionID1) } -func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountRegionClient { - return original.NewDatabaseAccountRegionClientWithBaseURI(baseURI, subscriptionID) +func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient { + return original.NewDatabaseAccountRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewDatabaseAccountsClient(subscriptionID string) DatabaseAccountsClient { - return original.NewDatabaseAccountsClient(subscriptionID) +func NewDatabaseAccountsClient(subscriptionID string, subscriptionID1 string) DatabaseAccountsClient { + return original.NewDatabaseAccountsClient(subscriptionID, subscriptionID1) } -func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountsClient { - return original.NewDatabaseAccountsClientWithBaseURI(baseURI, subscriptionID) +func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountsClient { + return original.NewDatabaseAccountsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewDatabaseClient(subscriptionID string) DatabaseClient { - return original.NewDatabaseClient(subscriptionID) +func NewDatabaseClient(subscriptionID string, subscriptionID1 string) DatabaseClient { + return original.NewDatabaseClient(subscriptionID, subscriptionID1) } -func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string) DatabaseClient { - return original.NewDatabaseClientWithBaseURI(baseURI, subscriptionID) +func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseClient { + return original.NewDatabaseClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewGremlinResourcesClient(subscriptionID string) GremlinResourcesClient { - return original.NewGremlinResourcesClient(subscriptionID) +func NewGremlinResourcesClient(subscriptionID string, subscriptionID1 string) GremlinResourcesClient { + return original.NewGremlinResourcesClient(subscriptionID, subscriptionID1) } -func NewGremlinResourcesClientWithBaseURI(baseURI string, subscriptionID string) GremlinResourcesClient { - return original.NewGremlinResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewGremlinResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) GremlinResourcesClient { + return original.NewGremlinResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewMongoDBResourcesClient(subscriptionID string) MongoDBResourcesClient { - return original.NewMongoDBResourcesClient(subscriptionID) +func NewMongoDBResourcesClient(subscriptionID string, subscriptionID1 string) MongoDBResourcesClient { + return original.NewMongoDBResourcesClient(subscriptionID, subscriptionID1) } -func NewMongoDBResourcesClientWithBaseURI(baseURI string, subscriptionID string) MongoDBResourcesClient { - return original.NewMongoDBResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewMongoDBResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) MongoDBResourcesClient { + return original.NewMongoDBResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { return original.NewOperationListResultIterator(page) @@ -445,56 +461,68 @@ func NewOperationListResultIterator(page OperationListResultPage) OperationListR func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { return original.NewOperationListResultPage(getNextPage) } -func NewOperationsClient(subscriptionID string) OperationsClient { - return original.NewOperationsClient(subscriptionID) +func NewOperationsClient(subscriptionID string, subscriptionID1 string) OperationsClient { + return original.NewOperationsClient(subscriptionID, subscriptionID1) } -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPartitionKeyRangeIDClient(subscriptionID string) PartitionKeyRangeIDClient { - return original.NewPartitionKeyRangeIDClient(subscriptionID) +func NewPartitionKeyRangeIDClient(subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient { + return original.NewPartitionKeyRangeIDClient(subscriptionID, subscriptionID1) } -func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string) PartitionKeyRangeIDClient { - return original.NewPartitionKeyRangeIDClientWithBaseURI(baseURI, subscriptionID) +func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient { + return original.NewPartitionKeyRangeIDClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPartitionKeyRangeIDRegionClient(subscriptionID string) PartitionKeyRangeIDRegionClient { - return original.NewPartitionKeyRangeIDRegionClient(subscriptionID) +func NewPartitionKeyRangeIDRegionClient(subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient { + return original.NewPartitionKeyRangeIDRegionClient(subscriptionID, subscriptionID1) } -func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string) PartitionKeyRangeIDRegionClient { - return original.NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI, subscriptionID) +func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient { + return original.NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPercentileClient(subscriptionID string) PercentileClient { - return original.NewPercentileClient(subscriptionID) +func NewPercentileClient(subscriptionID string, subscriptionID1 string) PercentileClient { + return original.NewPercentileClient(subscriptionID, subscriptionID1) } -func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string) PercentileClient { - return original.NewPercentileClientWithBaseURI(baseURI, subscriptionID) +func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileClient { + return original.NewPercentileClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPercentileSourceTargetClient(subscriptionID string) PercentileSourceTargetClient { - return original.NewPercentileSourceTargetClient(subscriptionID) +func NewPercentileSourceTargetClient(subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient { + return original.NewPercentileSourceTargetClient(subscriptionID, subscriptionID1) } -func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string) PercentileSourceTargetClient { - return original.NewPercentileSourceTargetClientWithBaseURI(baseURI, subscriptionID) +func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient { + return original.NewPercentileSourceTargetClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPercentileTargetClient(subscriptionID string) PercentileTargetClient { - return original.NewPercentileTargetClient(subscriptionID) +func NewPercentileTargetClient(subscriptionID string, subscriptionID1 string) PercentileTargetClient { + return original.NewPercentileTargetClient(subscriptionID, subscriptionID1) } -func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string) PercentileTargetClient { - return original.NewPercentileTargetClientWithBaseURI(baseURI, subscriptionID) +func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileTargetClient { + return original.NewPercentileTargetClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewSQLResourcesClient(subscriptionID string) SQLResourcesClient { - return original.NewSQLResourcesClient(subscriptionID) +func NewPrivateEndpointConnectionsClient(subscriptionID string, subscriptionID1 string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClient(subscriptionID, subscriptionID1) } -func NewSQLResourcesClientWithBaseURI(baseURI string, subscriptionID string) SQLResourcesClient { - return original.NewSQLResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewTableResourcesClient(subscriptionID string) TableResourcesClient { - return original.NewTableResourcesClient(subscriptionID) +func NewPrivateLinkResourcesClient(subscriptionID string, subscriptionID1 string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClient(subscriptionID, subscriptionID1) } -func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string) TableResourcesClient { - return original.NewTableResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return original.NewWithBaseURI(baseURI, subscriptionID) +func NewSQLResourcesClient(subscriptionID string, subscriptionID1 string) SQLResourcesClient { + return original.NewSQLResourcesClient(subscriptionID, subscriptionID1) +} +func NewSQLResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) SQLResourcesClient { + return original.NewSQLResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) +} +func NewTableResourcesClient(subscriptionID string, subscriptionID1 string) TableResourcesClient { + return original.NewTableResourcesClient(subscriptionID, subscriptionID1) +} +func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) TableResourcesClient { + return original.NewTableResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) +} +func NewWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) BaseClient { + return original.NewWithBaseURI(baseURI, subscriptionID, subscriptionID1) } func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { return original.PossibleCompositePathSortOrderValues() diff --git a/profiles/latest/frontdoor/mgmt/frontdoor/frontdoorapi/models.go b/profiles/latest/frontdoor/mgmt/frontdoor/frontdoorapi/models.go index 8116b4b93fa1..ff5e9e8fcb8a 100644 --- a/profiles/latest/frontdoor/mgmt/frontdoor/frontdoorapi/models.go +++ b/profiles/latest/frontdoor/mgmt/frontdoor/frontdoorapi/models.go @@ -19,7 +19,7 @@ package frontdoorapi -import original "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-11-01/frontdoor/frontdoorapi" +import original "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2020-01-01/frontdoor/frontdoorapi" type BaseClientAPI = original.BaseClientAPI type EndpointsClientAPI = original.EndpointsClientAPI @@ -31,3 +31,4 @@ type NetworkExperimentProfilesClientAPI = original.NetworkExperimentProfilesClie type PoliciesClientAPI = original.PoliciesClientAPI type PreconfiguredEndpointsClientAPI = original.PreconfiguredEndpointsClientAPI type ReportsClientAPI = original.ReportsClientAPI +type RulesEnginesClientAPI = original.RulesEnginesClientAPI diff --git a/profiles/latest/frontdoor/mgmt/frontdoor/models.go b/profiles/latest/frontdoor/mgmt/frontdoor/models.go index 11d85cd6915e..e5d4f3801b8e 100644 --- a/profiles/latest/frontdoor/mgmt/frontdoor/models.go +++ b/profiles/latest/frontdoor/mgmt/frontdoor/models.go @@ -22,7 +22,7 @@ package frontdoor import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-11-01/frontdoor" + original "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2020-01-01/frontdoor" ) const ( @@ -142,6 +142,14 @@ const ( MatchRequest ForwardingProtocol = original.MatchRequest ) +type HeaderActionType = original.HeaderActionType + +const ( + Append HeaderActionType = original.Append + Delete HeaderActionType = original.Delete + Overwrite HeaderActionType = original.Overwrite +) + type HealthProbeEnabled = original.HealthProbeEnabled const ( @@ -190,6 +198,13 @@ const ( StartsWith ManagedRuleExclusionSelectorMatchOperator = original.StartsWith ) +type MatchProcessingBehavior = original.MatchProcessingBehavior + +const ( + Continue MatchProcessingBehavior = original.Continue + Stop MatchProcessingBehavior = original.Stop +) + type MatchVariable = original.MatchVariable const ( @@ -343,6 +358,39 @@ const ( RateLimitRule RuleType = original.RateLimitRule ) +type RulesEngineMatchVariable = original.RulesEngineMatchVariable + +const ( + RulesEngineMatchVariableIsMobile RulesEngineMatchVariable = original.RulesEngineMatchVariableIsMobile + RulesEngineMatchVariablePostArgs RulesEngineMatchVariable = original.RulesEngineMatchVariablePostArgs + RulesEngineMatchVariableQueryString RulesEngineMatchVariable = original.RulesEngineMatchVariableQueryString + RulesEngineMatchVariableRemoteAddr RulesEngineMatchVariable = original.RulesEngineMatchVariableRemoteAddr + RulesEngineMatchVariableRequestBody RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestBody + RulesEngineMatchVariableRequestFilename RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestFilename + RulesEngineMatchVariableRequestFilenameExtension RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestFilenameExtension + RulesEngineMatchVariableRequestHeader RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestHeader + RulesEngineMatchVariableRequestMethod RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestMethod + RulesEngineMatchVariableRequestPath RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestPath + RulesEngineMatchVariableRequestScheme RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestScheme + RulesEngineMatchVariableRequestURI RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestURI +) + +type RulesEngineOperator = original.RulesEngineOperator + +const ( + RulesEngineOperatorAny RulesEngineOperator = original.RulesEngineOperatorAny + RulesEngineOperatorBeginsWith RulesEngineOperator = original.RulesEngineOperatorBeginsWith + RulesEngineOperatorContains RulesEngineOperator = original.RulesEngineOperatorContains + RulesEngineOperatorEndsWith RulesEngineOperator = original.RulesEngineOperatorEndsWith + RulesEngineOperatorEqual RulesEngineOperator = original.RulesEngineOperatorEqual + RulesEngineOperatorGeoMatch RulesEngineOperator = original.RulesEngineOperatorGeoMatch + RulesEngineOperatorGreaterThan RulesEngineOperator = original.RulesEngineOperatorGreaterThan + RulesEngineOperatorGreaterThanOrEqual RulesEngineOperator = original.RulesEngineOperatorGreaterThanOrEqual + RulesEngineOperatorIPMatch RulesEngineOperator = original.RulesEngineOperatorIPMatch + RulesEngineOperatorLessThan RulesEngineOperator = original.RulesEngineOperatorLessThan + RulesEngineOperatorLessThanOrEqual RulesEngineOperator = original.RulesEngineOperatorLessThanOrEqual +) + type SessionAffinityEnabledState = original.SessionAffinityEnabledState const ( @@ -373,15 +421,26 @@ const ( MeasurementCounts TimeseriesType = original.MeasurementCounts ) +type Transform = original.Transform + +const ( + Lowercase Transform = original.Lowercase + RemoveNulls Transform = original.RemoveNulls + Trim Transform = original.Trim + Uppercase Transform = original.Uppercase + URLDecode Transform = original.URLDecode + URLEncode Transform = original.URLEncode +) + type TransformType = original.TransformType const ( - Lowercase TransformType = original.Lowercase - RemoveNulls TransformType = original.RemoveNulls - Trim TransformType = original.Trim - Uppercase TransformType = original.Uppercase - URLDecode TransformType = original.URLDecode - URLEncode TransformType = original.URLEncode + TransformTypeLowercase TransformType = original.TransformTypeLowercase + TransformTypeRemoveNulls TransformType = original.TransformTypeRemoveNulls + TransformTypeTrim TransformType = original.TransformTypeTrim + TransformTypeUppercase TransformType = original.TransformTypeUppercase + TransformTypeURLDecode TransformType = original.TransformTypeURLDecode + TransformTypeURLEncode TransformType = original.TransformTypeURLEncode ) type AzureAsyncOperationResult = original.AzureAsyncOperationResult @@ -433,6 +492,7 @@ type FrontendEndpointsEnableHTTPSFuture = original.FrontendEndpointsEnableHTTPSF type FrontendEndpointsListResult = original.FrontendEndpointsListResult type FrontendEndpointsListResultIterator = original.FrontendEndpointsListResultIterator type FrontendEndpointsListResultPage = original.FrontendEndpointsListResultPage +type HeaderAction = original.HeaderAction type HealthProbeSettingsListResult = original.HealthProbeSettingsListResult type HealthProbeSettingsModel = original.HealthProbeSettingsModel type HealthProbeSettingsProperties = original.HealthProbeSettingsProperties @@ -494,6 +554,18 @@ type RoutingRule = original.RoutingRule type RoutingRuleListResult = original.RoutingRuleListResult type RoutingRuleProperties = original.RoutingRuleProperties type RoutingRuleUpdateParameters = original.RoutingRuleUpdateParameters +type RulesEngine = original.RulesEngine +type RulesEngineAction = original.RulesEngineAction +type RulesEngineListResult = original.RulesEngineListResult +type RulesEngineListResultIterator = original.RulesEngineListResultIterator +type RulesEngineListResultPage = original.RulesEngineListResultPage +type RulesEngineMatchCondition = original.RulesEngineMatchCondition +type RulesEngineProperties = original.RulesEngineProperties +type RulesEngineRule = original.RulesEngineRule +type RulesEngineUpdateParameters = original.RulesEngineUpdateParameters +type RulesEnginesClient = original.RulesEnginesClient +type RulesEnginesCreateOrUpdateFuture = original.RulesEnginesCreateOrUpdateFuture +type RulesEnginesDeleteFuture = original.RulesEnginesDeleteFuture type SubResource = original.SubResource type TagsObject = original.TagsObject type Timeseries = original.Timeseries @@ -601,6 +673,18 @@ func NewReportsClient(subscriptionID string) ReportsClient { func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return original.NewReportsClientWithBaseURI(baseURI, subscriptionID) } +func NewRulesEngineListResultIterator(page RulesEngineListResultPage) RulesEngineListResultIterator { + return original.NewRulesEngineListResultIterator(page) +} +func NewRulesEngineListResultPage(getNextPage func(context.Context, RulesEngineListResult) (RulesEngineListResult, error)) RulesEngineListResultPage { + return original.NewRulesEngineListResultPage(getNextPage) +} +func NewRulesEnginesClient(subscriptionID string) RulesEnginesClient { + return original.NewRulesEnginesClient(subscriptionID) +} +func NewRulesEnginesClientWithBaseURI(baseURI string, subscriptionID string) RulesEnginesClient { + return original.NewRulesEnginesClientWithBaseURI(baseURI, subscriptionID) +} func NewWebApplicationFirewallPolicyListIterator(page WebApplicationFirewallPolicyListPage) WebApplicationFirewallPolicyListIterator { return original.NewWebApplicationFirewallPolicyListIterator(page) } @@ -652,6 +736,9 @@ func PossibleEnforceCertificateNameCheckEnabledStateValues() []EnforceCertificat func PossibleForwardingProtocolValues() []ForwardingProtocol { return original.PossibleForwardingProtocolValues() } +func PossibleHeaderActionTypeValues() []HeaderActionType { + return original.PossibleHeaderActionTypeValues() +} func PossibleHealthProbeEnabledValues() []HealthProbeEnabled { return original.PossibleHealthProbeEnabledValues() } @@ -670,6 +757,9 @@ func PossibleManagedRuleExclusionMatchVariableValues() []ManagedRuleExclusionMat func PossibleManagedRuleExclusionSelectorMatchOperatorValues() []ManagedRuleExclusionSelectorMatchOperator { return original.PossibleManagedRuleExclusionSelectorMatchOperatorValues() } +func PossibleMatchProcessingBehaviorValues() []MatchProcessingBehavior { + return original.PossibleMatchProcessingBehaviorValues() +} func PossibleMatchVariableValues() []MatchVariable { return original.PossibleMatchVariableValues() } @@ -721,6 +811,12 @@ func PossibleRoutingRuleEnabledStateValues() []RoutingRuleEnabledState { func PossibleRuleTypeValues() []RuleType { return original.PossibleRuleTypeValues() } +func PossibleRulesEngineMatchVariableValues() []RulesEngineMatchVariable { + return original.PossibleRulesEngineMatchVariableValues() +} +func PossibleRulesEngineOperatorValues() []RulesEngineOperator { + return original.PossibleRulesEngineOperatorValues() +} func PossibleSessionAffinityEnabledStateValues() []SessionAffinityEnabledState { return original.PossibleSessionAffinityEnabledStateValues() } @@ -736,6 +832,9 @@ func PossibleTimeseriesTypeValues() []TimeseriesType { func PossibleTransformTypeValues() []TransformType { return original.PossibleTransformTypeValues() } +func PossibleTransformValues() []Transform { + return original.PossibleTransformValues() +} func UserAgent() string { return original.UserAgent() + " profiles/latest" } diff --git a/profiles/latest/healthcareapis/mgmt/healthcareapis/models.go b/profiles/latest/healthcareapis/mgmt/healthcareapis/models.go index 5d031f9027fd..aabaa662dfaa 100644 --- a/profiles/latest/healthcareapis/mgmt/healthcareapis/models.go +++ b/profiles/latest/healthcareapis/mgmt/healthcareapis/models.go @@ -37,6 +37,13 @@ const ( FhirStu3 Kind = original.FhirStu3 ) +type ManagedServiceIdentityType = original.ManagedServiceIdentityType + +const ( + None ManagedServiceIdentityType = original.None + SystemAssigned ManagedServiceIdentityType = original.SystemAssigned +) + type OperationResultStatus = original.OperationResultStatus const ( @@ -81,6 +88,7 @@ type OperationResultsClient = original.OperationResultsClient type OperationResultsDescription = original.OperationResultsDescription type OperationsClient = original.OperationsClient type Resource = original.Resource +type ResourceIdentity = original.ResourceIdentity type ServiceAccessPolicyEntry = original.ServiceAccessPolicyEntry type ServiceAuthenticationConfigurationInfo = original.ServiceAuthenticationConfigurationInfo type ServiceCorsConfigurationInfo = original.ServiceCorsConfigurationInfo @@ -137,6 +145,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleKindValues() []Kind { return original.PossibleKindValues() } +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return original.PossibleManagedServiceIdentityTypeValues() +} func PossibleOperationResultStatusValues() []OperationResultStatus { return original.PossibleOperationResultStatusValues() } diff --git a/profiles/latest/keyvault/mgmt/keyvault/keyvaultapi/models.go b/profiles/latest/keyvault/mgmt/keyvault/keyvaultapi/models.go index 0a95fba8c4e0..c7bfa592b745 100644 --- a/profiles/latest/keyvault/mgmt/keyvault/keyvaultapi/models.go +++ b/profiles/latest/keyvault/mgmt/keyvault/keyvaultapi/models.go @@ -22,4 +22,6 @@ package keyvaultapi import original "github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/keyvaultapi" type OperationsClientAPI = original.OperationsClientAPI +type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI type VaultsClientAPI = original.VaultsClientAPI diff --git a/profiles/latest/keyvault/mgmt/keyvault/models.go b/profiles/latest/keyvault/mgmt/keyvault/models.go index e89715678a39..b424e599e762 100644 --- a/profiles/latest/keyvault/mgmt/keyvault/models.go +++ b/profiles/latest/keyvault/mgmt/keyvault/models.go @@ -100,6 +100,26 @@ const ( None NetworkRuleBypassOptions = original.None ) +type PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningState + +const ( + Creating PrivateEndpointConnectionProvisioningState = original.Creating + Deleting PrivateEndpointConnectionProvisioningState = original.Deleting + Disconnected PrivateEndpointConnectionProvisioningState = original.Disconnected + Failed PrivateEndpointConnectionProvisioningState = original.Failed + Succeeded PrivateEndpointConnectionProvisioningState = original.Succeeded + Updating PrivateEndpointConnectionProvisioningState = original.Updating +) + +type PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatus + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatusApproved + PrivateEndpointServiceConnectionStatusDisconnected PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatusDisconnected + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatusPending + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatusRejected +) + type Reason = original.Reason const ( @@ -149,6 +169,8 @@ const ( type AccessPolicyEntry = original.AccessPolicyEntry type BaseClient = original.BaseClient type CheckNameAvailabilityResult = original.CheckNameAvailabilityResult +type CloudError = original.CloudError +type CloudErrorBody = original.CloudErrorBody type DeletedVault = original.DeletedVault type DeletedVaultListResult = original.DeletedVaultListResult type DeletedVaultListResultIterator = original.DeletedVaultListResultIterator @@ -165,6 +187,17 @@ type OperationListResultPage = original.OperationListResultPage type OperationProperties = original.OperationProperties type OperationsClient = original.OperationsClient type Permissions = original.Permissions +type PrivateEndpoint = original.PrivateEndpoint +type PrivateEndpointConnection = original.PrivateEndpointConnection +type PrivateEndpointConnectionItem = original.PrivateEndpointConnectionItem +type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient +type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture +type PrivateLinkResource = original.PrivateLinkResource +type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult +type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties +type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient +type PrivateLinkServiceConnectionState = original.PrivateLinkServiceConnectionState type Resource = original.Resource type ResourceListResult = original.ResourceListResult type ResourceListResultIterator = original.ResourceListResultIterator @@ -208,6 +241,18 @@ func NewOperationsClient(subscriptionID string) OperationsClient { func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) } +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClient(subscriptionID) +} +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID) +} +func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClient(subscriptionID) +} +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID) +} func NewResourceListResultIterator(page ResourceListResultPage) ResourceListResultIterator { return original.NewResourceListResultIterator(page) } @@ -247,6 +292,12 @@ func PossibleNetworkRuleActionValues() []NetworkRuleAction { func PossibleNetworkRuleBypassOptionsValues() []NetworkRuleBypassOptions { return original.PossibleNetworkRuleBypassOptionsValues() } +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return original.PossiblePrivateEndpointConnectionProvisioningStateValues() +} +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return original.PossiblePrivateEndpointServiceConnectionStatusValues() +} func PossibleReasonValues() []Reason { return original.PossibleReasonValues() } diff --git a/profiles/latest/kusto/mgmt/kusto/kustoapi/models.go b/profiles/latest/kusto/mgmt/kusto/kustoapi/models.go index ba0fab33b0d2..8925643e047c 100644 --- a/profiles/latest/kusto/mgmt/kusto/kustoapi/models.go +++ b/profiles/latest/kusto/mgmt/kusto/kustoapi/models.go @@ -19,10 +19,12 @@ package kustoapi -import original "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-09-07/kusto/kustoapi" +import original "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-11-09/kusto/kustoapi" type AttachedDatabaseConfigurationsClientAPI = original.AttachedDatabaseConfigurationsClientAPI +type ClusterPrincipalAssignmentsClientAPI = original.ClusterPrincipalAssignmentsClientAPI type ClustersClientAPI = original.ClustersClientAPI type DataConnectionsClientAPI = original.DataConnectionsClientAPI +type DatabasePrincipalAssignmentsClientAPI = original.DatabasePrincipalAssignmentsClientAPI type DatabasesClientAPI = original.DatabasesClientAPI type OperationsClientAPI = original.OperationsClientAPI diff --git a/profiles/latest/kusto/mgmt/kusto/models.go b/profiles/latest/kusto/mgmt/kusto/models.go index cd4254eeb911..854b2df3cf63 100644 --- a/profiles/latest/kusto/mgmt/kusto/models.go +++ b/profiles/latest/kusto/mgmt/kusto/models.go @@ -22,7 +22,7 @@ package kusto import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-09-07/kusto" + original "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-11-09/kusto" ) const ( @@ -61,21 +61,18 @@ const ( Standard AzureSkuTier = original.Standard ) -type DataFormat = original.DataFormat +type ClusterPrincipalRole = original.ClusterPrincipalRole const ( - AVRO DataFormat = original.AVRO - CSV DataFormat = original.CSV - JSON DataFormat = original.JSON - MULTIJSON DataFormat = original.MULTIJSON - PSV DataFormat = original.PSV - RAW DataFormat = original.RAW - SCSV DataFormat = original.SCSV - SINGLEJSON DataFormat = original.SINGLEJSON - SOHSV DataFormat = original.SOHSV - TSV DataFormat = original.TSV - TSVE DataFormat = original.TSVE - TXT DataFormat = original.TXT + AllDatabasesAdmin ClusterPrincipalRole = original.AllDatabasesAdmin + AllDatabasesViewer ClusterPrincipalRole = original.AllDatabasesViewer +) + +type Compression = original.Compression + +const ( + CompressionGZip Compression = original.CompressionGZip + CompressionNone Compression = original.CompressionNone ) type DatabasePrincipalRole = original.DatabasePrincipalRole @@ -105,6 +102,44 @@ const ( DefaultPrincipalsModificationKindUnion DefaultPrincipalsModificationKind = original.DefaultPrincipalsModificationKindUnion ) +type EventGridDataFormat = original.EventGridDataFormat + +const ( + AVRO EventGridDataFormat = original.AVRO + CSV EventGridDataFormat = original.CSV + JSON EventGridDataFormat = original.JSON + MULTIJSON EventGridDataFormat = original.MULTIJSON + ORC EventGridDataFormat = original.ORC + PARQUET EventGridDataFormat = original.PARQUET + PSV EventGridDataFormat = original.PSV + RAW EventGridDataFormat = original.RAW + SCSV EventGridDataFormat = original.SCSV + SINGLEJSON EventGridDataFormat = original.SINGLEJSON + SOHSV EventGridDataFormat = original.SOHSV + TSV EventGridDataFormat = original.TSV + TSVE EventGridDataFormat = original.TSVE + TXT EventGridDataFormat = original.TXT +) + +type EventHubDataFormat = original.EventHubDataFormat + +const ( + EventHubDataFormatAVRO EventHubDataFormat = original.EventHubDataFormatAVRO + EventHubDataFormatCSV EventHubDataFormat = original.EventHubDataFormatCSV + EventHubDataFormatJSON EventHubDataFormat = original.EventHubDataFormatJSON + EventHubDataFormatMULTIJSON EventHubDataFormat = original.EventHubDataFormatMULTIJSON + EventHubDataFormatORC EventHubDataFormat = original.EventHubDataFormatORC + EventHubDataFormatPARQUET EventHubDataFormat = original.EventHubDataFormatPARQUET + EventHubDataFormatPSV EventHubDataFormat = original.EventHubDataFormatPSV + EventHubDataFormatRAW EventHubDataFormat = original.EventHubDataFormatRAW + EventHubDataFormatSCSV EventHubDataFormat = original.EventHubDataFormatSCSV + EventHubDataFormatSINGLEJSON EventHubDataFormat = original.EventHubDataFormatSINGLEJSON + EventHubDataFormatSOHSV EventHubDataFormat = original.EventHubDataFormatSOHSV + EventHubDataFormatTSV EventHubDataFormat = original.EventHubDataFormatTSV + EventHubDataFormatTSVE EventHubDataFormat = original.EventHubDataFormatTSVE + EventHubDataFormatTXT EventHubDataFormat = original.EventHubDataFormatTXT +) + type IdentityType = original.IdentityType const ( @@ -112,6 +147,25 @@ const ( IdentityTypeSystemAssigned IdentityType = original.IdentityTypeSystemAssigned ) +type IotHubDataFormat = original.IotHubDataFormat + +const ( + IotHubDataFormatAVRO IotHubDataFormat = original.IotHubDataFormatAVRO + IotHubDataFormatCSV IotHubDataFormat = original.IotHubDataFormatCSV + IotHubDataFormatJSON IotHubDataFormat = original.IotHubDataFormatJSON + IotHubDataFormatMULTIJSON IotHubDataFormat = original.IotHubDataFormatMULTIJSON + IotHubDataFormatORC IotHubDataFormat = original.IotHubDataFormatORC + IotHubDataFormatPARQUET IotHubDataFormat = original.IotHubDataFormatPARQUET + IotHubDataFormatPSV IotHubDataFormat = original.IotHubDataFormatPSV + IotHubDataFormatRAW IotHubDataFormat = original.IotHubDataFormatRAW + IotHubDataFormatSCSV IotHubDataFormat = original.IotHubDataFormatSCSV + IotHubDataFormatSINGLEJSON IotHubDataFormat = original.IotHubDataFormatSINGLEJSON + IotHubDataFormatSOHSV IotHubDataFormat = original.IotHubDataFormatSOHSV + IotHubDataFormatTSV IotHubDataFormat = original.IotHubDataFormatTSV + IotHubDataFormatTSVE IotHubDataFormat = original.IotHubDataFormatTSVE + IotHubDataFormatTXT IotHubDataFormat = original.IotHubDataFormatTXT +) + type Kind = original.Kind const ( @@ -129,6 +183,14 @@ const ( KindIotHub KindBasicDataConnection = original.KindIotHub ) +type PrincipalType = original.PrincipalType + +const ( + PrincipalTypeApp PrincipalType = original.PrincipalTypeApp + PrincipalTypeGroup PrincipalType = original.PrincipalTypeGroup + PrincipalTypeUser PrincipalType = original.PrincipalTypeUser +) + type PrincipalsModificationKind = original.PrincipalsModificationKind const ( @@ -196,12 +258,20 @@ type CloudErrorBody = original.CloudErrorBody type Cluster = original.Cluster type ClusterCheckNameRequest = original.ClusterCheckNameRequest type ClusterListResult = original.ClusterListResult +type ClusterPrincipalAssignment = original.ClusterPrincipalAssignment +type ClusterPrincipalAssignmentCheckNameRequest = original.ClusterPrincipalAssignmentCheckNameRequest +type ClusterPrincipalAssignmentListResult = original.ClusterPrincipalAssignmentListResult +type ClusterPrincipalAssignmentsClient = original.ClusterPrincipalAssignmentsClient +type ClusterPrincipalAssignmentsCreateOrUpdateFuture = original.ClusterPrincipalAssignmentsCreateOrUpdateFuture +type ClusterPrincipalAssignmentsDeleteFuture = original.ClusterPrincipalAssignmentsDeleteFuture +type ClusterPrincipalProperties = original.ClusterPrincipalProperties type ClusterProperties = original.ClusterProperties type ClusterUpdate = original.ClusterUpdate type ClustersClient = original.ClustersClient type ClustersCreateOrUpdateFuture = original.ClustersCreateOrUpdateFuture type ClustersDeleteFuture = original.ClustersDeleteFuture type ClustersDetachFollowerDatabasesFuture = original.ClustersDetachFollowerDatabasesFuture +type ClustersDiagnoseVirtualNetworkFuture = original.ClustersDiagnoseVirtualNetworkFuture type ClustersStartFuture = original.ClustersStartFuture type ClustersStopFuture = original.ClustersStopFuture type ClustersUpdateFuture = original.ClustersUpdateFuture @@ -220,13 +290,21 @@ type Database = original.Database type DatabaseListResult = original.DatabaseListResult type DatabaseModel = original.DatabaseModel type DatabasePrincipal = original.DatabasePrincipal +type DatabasePrincipalAssignment = original.DatabasePrincipalAssignment +type DatabasePrincipalAssignmentCheckNameRequest = original.DatabasePrincipalAssignmentCheckNameRequest +type DatabasePrincipalAssignmentListResult = original.DatabasePrincipalAssignmentListResult +type DatabasePrincipalAssignmentsClient = original.DatabasePrincipalAssignmentsClient +type DatabasePrincipalAssignmentsCreateOrUpdateFuture = original.DatabasePrincipalAssignmentsCreateOrUpdateFuture +type DatabasePrincipalAssignmentsDeleteFuture = original.DatabasePrincipalAssignmentsDeleteFuture type DatabasePrincipalListRequest = original.DatabasePrincipalListRequest type DatabasePrincipalListResult = original.DatabasePrincipalListResult +type DatabasePrincipalProperties = original.DatabasePrincipalProperties type DatabaseStatistics = original.DatabaseStatistics type DatabasesClient = original.DatabasesClient type DatabasesCreateOrUpdateFuture = original.DatabasesCreateOrUpdateFuture type DatabasesDeleteFuture = original.DatabasesDeleteFuture type DatabasesUpdateFuture = original.DatabasesUpdateFuture +type DiagnoseVirtualNetworkResult = original.DiagnoseVirtualNetworkResult type EventGridConnectionProperties = original.EventGridConnectionProperties type EventGridDataConnection = original.EventGridDataConnection type EventHubConnectionProperties = original.EventHubConnectionProperties @@ -268,6 +346,12 @@ func NewAttachedDatabaseConfigurationsClient(subscriptionID string) AttachedData func NewAttachedDatabaseConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) AttachedDatabaseConfigurationsClient { return original.NewAttachedDatabaseConfigurationsClientWithBaseURI(baseURI, subscriptionID) } +func NewClusterPrincipalAssignmentsClient(subscriptionID string) ClusterPrincipalAssignmentsClient { + return original.NewClusterPrincipalAssignmentsClient(subscriptionID) +} +func NewClusterPrincipalAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) ClusterPrincipalAssignmentsClient { + return original.NewClusterPrincipalAssignmentsClientWithBaseURI(baseURI, subscriptionID) +} func NewClustersClient(subscriptionID string) ClustersClient { return original.NewClustersClient(subscriptionID) } @@ -280,6 +364,12 @@ func NewDataConnectionsClient(subscriptionID string) DataConnectionsClient { func NewDataConnectionsClientWithBaseURI(baseURI string, subscriptionID string) DataConnectionsClient { return original.NewDataConnectionsClientWithBaseURI(baseURI, subscriptionID) } +func NewDatabasePrincipalAssignmentsClient(subscriptionID string) DatabasePrincipalAssignmentsClient { + return original.NewDatabasePrincipalAssignmentsClient(subscriptionID) +} +func NewDatabasePrincipalAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) DatabasePrincipalAssignmentsClient { + return original.NewDatabasePrincipalAssignmentsClientWithBaseURI(baseURI, subscriptionID) +} func NewDatabasesClient(subscriptionID string) DatabasesClient { return original.NewDatabasesClient(subscriptionID) } @@ -310,8 +400,11 @@ func PossibleAzureSkuNameValues() []AzureSkuName { func PossibleAzureSkuTierValues() []AzureSkuTier { return original.PossibleAzureSkuTierValues() } -func PossibleDataFormatValues() []DataFormat { - return original.PossibleDataFormatValues() +func PossibleClusterPrincipalRoleValues() []ClusterPrincipalRole { + return original.PossibleClusterPrincipalRoleValues() +} +func PossibleCompressionValues() []Compression { + return original.PossibleCompressionValues() } func PossibleDatabasePrincipalRoleValues() []DatabasePrincipalRole { return original.PossibleDatabasePrincipalRoleValues() @@ -322,15 +415,27 @@ func PossibleDatabasePrincipalTypeValues() []DatabasePrincipalType { func PossibleDefaultPrincipalsModificationKindValues() []DefaultPrincipalsModificationKind { return original.PossibleDefaultPrincipalsModificationKindValues() } +func PossibleEventGridDataFormatValues() []EventGridDataFormat { + return original.PossibleEventGridDataFormatValues() +} +func PossibleEventHubDataFormatValues() []EventHubDataFormat { + return original.PossibleEventHubDataFormatValues() +} func PossibleIdentityTypeValues() []IdentityType { return original.PossibleIdentityTypeValues() } +func PossibleIotHubDataFormatValues() []IotHubDataFormat { + return original.PossibleIotHubDataFormatValues() +} func PossibleKindBasicDataConnectionValues() []KindBasicDataConnection { return original.PossibleKindBasicDataConnectionValues() } func PossibleKindValues() []Kind { return original.PossibleKindValues() } +func PossiblePrincipalTypeValues() []PrincipalType { + return original.PossiblePrincipalTypeValues() +} func PossiblePrincipalsModificationKindValues() []PrincipalsModificationKind { return original.PossiblePrincipalsModificationKindValues() } diff --git a/profiles/latest/machinelearningservices/mgmt/machinelearningservices/models.go b/profiles/latest/machinelearningservices/mgmt/machinelearningservices/models.go index cb91c8b62699..65a26d065979 100644 --- a/profiles/latest/machinelearningservices/mgmt/machinelearningservices/models.go +++ b/profiles/latest/machinelearningservices/mgmt/machinelearningservices/models.go @@ -77,6 +77,13 @@ const ( ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ComputeTypeBasicComputeSecrets = original.ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ) +type EncryptionStatus = original.EncryptionStatus + +const ( + Disabled EncryptionStatus = original.Disabled + Enabled EncryptionStatus = original.Enabled +) + type NodeState = original.NodeState const ( @@ -161,8 +168,8 @@ const ( type Status1 = original.Status1 const ( - Disabled Status1 = original.Disabled - Enabled Status1 = original.Enabled + Status1Disabled Status1 = original.Status1Disabled + Status1Enabled Status1 = original.Status1Enabled ) type UnderlyingResourceAction = original.UnderlyingResourceAction @@ -211,12 +218,14 @@ type DataLakeAnalyticsProperties = original.DataLakeAnalyticsProperties type Databricks = original.Databricks type DatabricksComputeSecrets = original.DatabricksComputeSecrets type DatabricksProperties = original.DatabricksProperties +type EncryptionProperty = original.EncryptionProperty type Error = original.Error type ErrorDetail = original.ErrorDetail type ErrorResponse = original.ErrorResponse type HDInsight = original.HDInsight type HDInsightProperties = original.HDInsightProperties type Identity = original.Identity +type KeyVaultProperties = original.KeyVaultProperties type ListAmlUserFeatureResult = original.ListAmlUserFeatureResult type ListAmlUserFeatureResultIterator = original.ListAmlUserFeatureResultIterator type ListAmlUserFeatureResultPage = original.ListAmlUserFeatureResultPage @@ -292,6 +301,7 @@ type WorkspacePropertiesUpdateParameters = original.WorkspacePropertiesUpdatePar type WorkspaceSku = original.WorkspaceSku type WorkspaceUpdateParameters = original.WorkspaceUpdateParameters type WorkspacesClient = original.WorkspacesClient +type WorkspacesCreateOrUpdateFuture = original.WorkspacesCreateOrUpdateFuture func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -404,6 +414,9 @@ func PossibleComputeTypeBasicComputeValues() []ComputeTypeBasicCompute { func PossibleComputeTypeValues() []ComputeType { return original.PossibleComputeTypeValues() } +func PossibleEncryptionStatusValues() []EncryptionStatus { + return original.PossibleEncryptionStatusValues() +} func PossibleNodeStateValues() []NodeState { return original.PossibleNodeStateValues() } diff --git a/profiles/latest/mariadb/mgmt/mariadb/mariadbapi/models.go b/profiles/latest/mariadb/mgmt/mariadb/mariadbapi/models.go index edbcaf1b944d..fc016d58f392 100644 --- a/profiles/latest/mariadb/mgmt/mariadb/mariadbapi/models.go +++ b/profiles/latest/mariadb/mgmt/mariadb/mariadbapi/models.go @@ -21,14 +21,24 @@ package mariadbapi import original "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/mariadbapi" +type AdvisorsClientAPI = original.AdvisorsClientAPI +type BaseClientAPI = original.BaseClientAPI type CheckNameAvailabilityClientAPI = original.CheckNameAvailabilityClientAPI type ConfigurationsClientAPI = original.ConfigurationsClientAPI type DatabasesClientAPI = original.DatabasesClientAPI type FirewallRulesClientAPI = original.FirewallRulesClientAPI type LocationBasedPerformanceTierClientAPI = original.LocationBasedPerformanceTierClientAPI +type LocationBasedRecommendedActionSessionsOperationStatusClientAPI = original.LocationBasedRecommendedActionSessionsOperationStatusClientAPI +type LocationBasedRecommendedActionSessionsResultClientAPI = original.LocationBasedRecommendedActionSessionsResultClientAPI type LogFilesClientAPI = original.LogFilesClientAPI type OperationsClientAPI = original.OperationsClientAPI +type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI +type QueryTextsClientAPI = original.QueryTextsClientAPI +type RecommendedActionsClientAPI = original.RecommendedActionsClientAPI type ReplicasClientAPI = original.ReplicasClientAPI type ServerSecurityAlertPoliciesClientAPI = original.ServerSecurityAlertPoliciesClientAPI type ServersClientAPI = original.ServersClientAPI +type TopQueryStatisticsClientAPI = original.TopQueryStatisticsClientAPI type VirtualNetworkRulesClientAPI = original.VirtualNetworkRulesClientAPI +type WaitStatisticsClientAPI = original.WaitStatisticsClientAPI diff --git a/profiles/latest/mariadb/mgmt/mariadb/models.go b/profiles/latest/mariadb/mgmt/mariadb/models.go index c4743d4d43b7..91695dcd91a6 100644 --- a/profiles/latest/mariadb/mgmt/mariadb/models.go +++ b/profiles/latest/mariadb/mgmt/mariadb/models.go @@ -108,22 +108,30 @@ const ( Unknown VirtualNetworkRuleState = original.Unknown ) +type Advisor = original.Advisor +type AdvisorsClient = original.AdvisorsClient +type AdvisorsResultList = original.AdvisorsResultList +type AdvisorsResultListIterator = original.AdvisorsResultListIterator +type AdvisorsResultListPage = original.AdvisorsResultListPage +type AzureEntityResource = original.AzureEntityResource type BaseClient = original.BaseClient type BasicServerPropertiesForCreate = original.BasicServerPropertiesForCreate type CheckNameAvailabilityClient = original.CheckNameAvailabilityClient type CloudError = original.CloudError -type CloudErrorBody = original.CloudErrorBody type Configuration = original.Configuration type ConfigurationListResult = original.ConfigurationListResult type ConfigurationProperties = original.ConfigurationProperties type ConfigurationsClient = original.ConfigurationsClient type ConfigurationsCreateOrUpdateFuture = original.ConfigurationsCreateOrUpdateFuture +type CreateRecommendedActionSessionFuture = original.CreateRecommendedActionSessionFuture type Database = original.Database type DatabaseListResult = original.DatabaseListResult type DatabaseProperties = original.DatabaseProperties type DatabasesClient = original.DatabasesClient type DatabasesCreateOrUpdateFuture = original.DatabasesCreateOrUpdateFuture type DatabasesDeleteFuture = original.DatabasesDeleteFuture +type ErrorAdditionalInfo = original.ErrorAdditionalInfo +type ErrorResponse = original.ErrorResponse type FirewallRule = original.FirewallRule type FirewallRuleListResult = original.FirewallRuleListResult type FirewallRuleProperties = original.FirewallRuleProperties @@ -131,6 +139,8 @@ type FirewallRulesClient = original.FirewallRulesClient type FirewallRulesCreateOrUpdateFuture = original.FirewallRulesCreateOrUpdateFuture type FirewallRulesDeleteFuture = original.FirewallRulesDeleteFuture type LocationBasedPerformanceTierClient = original.LocationBasedPerformanceTierClient +type LocationBasedRecommendedActionSessionsOperationStatusClient = original.LocationBasedRecommendedActionSessionsOperationStatusClient +type LocationBasedRecommendedActionSessionsResultClient = original.LocationBasedRecommendedActionSessionsResultClient type LogFile = original.LogFile type LogFileListResult = original.LogFileListResult type LogFileProperties = original.LogFileProperties @@ -144,8 +154,41 @@ type OperationsClient = original.OperationsClient type PerformanceTierListResult = original.PerformanceTierListResult type PerformanceTierProperties = original.PerformanceTierProperties type PerformanceTierServiceLevelObjectives = original.PerformanceTierServiceLevelObjectives +type PrivateEndpointConnection = original.PrivateEndpointConnection +type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionListResult +type PrivateEndpointConnectionListResultIterator = original.PrivateEndpointConnectionListResultIterator +type PrivateEndpointConnectionListResultPage = original.PrivateEndpointConnectionListResultPage +type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient +type PrivateEndpointConnectionsCreateOrUpdateFuture = original.PrivateEndpointConnectionsCreateOrUpdateFuture +type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture +type PrivateEndpointConnectionsUpdateTagsFuture = original.PrivateEndpointConnectionsUpdateTagsFuture +type PrivateEndpointProperty = original.PrivateEndpointProperty +type PrivateLinkResource = original.PrivateLinkResource +type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult +type PrivateLinkResourceListResultIterator = original.PrivateLinkResourceListResultIterator +type PrivateLinkResourceListResultPage = original.PrivateLinkResourceListResultPage +type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties +type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient +type PrivateLinkServiceConnectionStateProperty = original.PrivateLinkServiceConnectionStateProperty type ProxyResource = original.ProxyResource +type QueryStatistic = original.QueryStatistic +type QueryStatisticProperties = original.QueryStatisticProperties +type QueryText = original.QueryText +type QueryTextProperties = original.QueryTextProperties +type QueryTextsClient = original.QueryTextsClient +type QueryTextsResultList = original.QueryTextsResultList +type QueryTextsResultListIterator = original.QueryTextsResultListIterator +type QueryTextsResultListPage = original.QueryTextsResultListPage +type RecommendationAction = original.RecommendationAction +type RecommendationActionProperties = original.RecommendationActionProperties +type RecommendationActionsResultList = original.RecommendationActionsResultList +type RecommendationActionsResultListIterator = original.RecommendationActionsResultListIterator +type RecommendationActionsResultListPage = original.RecommendationActionsResultListPage +type RecommendedActionSessionsOperationStatus = original.RecommendedActionSessionsOperationStatus +type RecommendedActionsClient = original.RecommendedActionsClient type ReplicasClient = original.ReplicasClient +type Resource = original.Resource type SecurityAlertPolicyProperties = original.SecurityAlertPolicyProperties type Server = original.Server type ServerForCreate = original.ServerForCreate @@ -168,6 +211,13 @@ type ServersRestartFuture = original.ServersRestartFuture type ServersUpdateFuture = original.ServersUpdateFuture type Sku = original.Sku type StorageProfile = original.StorageProfile +type TagsObject = original.TagsObject +type TopQueryStatisticsClient = original.TopQueryStatisticsClient +type TopQueryStatisticsInput = original.TopQueryStatisticsInput +type TopQueryStatisticsInputProperties = original.TopQueryStatisticsInputProperties +type TopQueryStatisticsResultList = original.TopQueryStatisticsResultList +type TopQueryStatisticsResultListIterator = original.TopQueryStatisticsResultListIterator +type TopQueryStatisticsResultListPage = original.TopQueryStatisticsResultListPage type TrackedResource = original.TrackedResource type VirtualNetworkRule = original.VirtualNetworkRule type VirtualNetworkRuleListResult = original.VirtualNetworkRuleListResult @@ -177,10 +227,30 @@ type VirtualNetworkRuleProperties = original.VirtualNetworkRuleProperties type VirtualNetworkRulesClient = original.VirtualNetworkRulesClient type VirtualNetworkRulesCreateOrUpdateFuture = original.VirtualNetworkRulesCreateOrUpdateFuture type VirtualNetworkRulesDeleteFuture = original.VirtualNetworkRulesDeleteFuture +type WaitStatistic = original.WaitStatistic +type WaitStatisticProperties = original.WaitStatisticProperties +type WaitStatisticsClient = original.WaitStatisticsClient +type WaitStatisticsInput = original.WaitStatisticsInput +type WaitStatisticsInputProperties = original.WaitStatisticsInputProperties +type WaitStatisticsResultList = original.WaitStatisticsResultList +type WaitStatisticsResultListIterator = original.WaitStatisticsResultListIterator +type WaitStatisticsResultListPage = original.WaitStatisticsResultListPage func New(subscriptionID string) BaseClient { return original.New(subscriptionID) } +func NewAdvisorsClient(subscriptionID string) AdvisorsClient { + return original.NewAdvisorsClient(subscriptionID) +} +func NewAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) AdvisorsClient { + return original.NewAdvisorsClientWithBaseURI(baseURI, subscriptionID) +} +func NewAdvisorsResultListIterator(page AdvisorsResultListPage) AdvisorsResultListIterator { + return original.NewAdvisorsResultListIterator(page) +} +func NewAdvisorsResultListPage(getNextPage func(context.Context, AdvisorsResultList) (AdvisorsResultList, error)) AdvisorsResultListPage { + return original.NewAdvisorsResultListPage(getNextPage) +} func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailabilityClient { return original.NewCheckNameAvailabilityClient(subscriptionID) } @@ -211,6 +281,18 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string) LocationBasedP func NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedPerformanceTierClient { return original.NewLocationBasedPerformanceTierClientWithBaseURI(baseURI, subscriptionID) } +func NewLocationBasedRecommendedActionSessionsOperationStatusClient(subscriptionID string) LocationBasedRecommendedActionSessionsOperationStatusClient { + return original.NewLocationBasedRecommendedActionSessionsOperationStatusClient(subscriptionID) +} +func NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedRecommendedActionSessionsOperationStatusClient { + return original.NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI(baseURI, subscriptionID) +} +func NewLocationBasedRecommendedActionSessionsResultClient(subscriptionID string) LocationBasedRecommendedActionSessionsResultClient { + return original.NewLocationBasedRecommendedActionSessionsResultClient(subscriptionID) +} +func NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedRecommendedActionSessionsResultClient { + return original.NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI(baseURI, subscriptionID) +} func NewLogFilesClient(subscriptionID string) LogFilesClient { return original.NewLogFilesClient(subscriptionID) } @@ -223,6 +305,54 @@ func NewOperationsClient(subscriptionID string) OperationsClient { func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) } +func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { + return original.NewPrivateEndpointConnectionListResultIterator(page) +} +func NewPrivateEndpointConnectionListResultPage(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return original.NewPrivateEndpointConnectionListResultPage(getNextPage) +} +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClient(subscriptionID) +} +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID) +} +func NewPrivateLinkResourceListResultIterator(page PrivateLinkResourceListResultPage) PrivateLinkResourceListResultIterator { + return original.NewPrivateLinkResourceListResultIterator(page) +} +func NewPrivateLinkResourceListResultPage(getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return original.NewPrivateLinkResourceListResultPage(getNextPage) +} +func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClient(subscriptionID) +} +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID) +} +func NewQueryTextsClient(subscriptionID string) QueryTextsClient { + return original.NewQueryTextsClient(subscriptionID) +} +func NewQueryTextsClientWithBaseURI(baseURI string, subscriptionID string) QueryTextsClient { + return original.NewQueryTextsClientWithBaseURI(baseURI, subscriptionID) +} +func NewQueryTextsResultListIterator(page QueryTextsResultListPage) QueryTextsResultListIterator { + return original.NewQueryTextsResultListIterator(page) +} +func NewQueryTextsResultListPage(getNextPage func(context.Context, QueryTextsResultList) (QueryTextsResultList, error)) QueryTextsResultListPage { + return original.NewQueryTextsResultListPage(getNextPage) +} +func NewRecommendationActionsResultListIterator(page RecommendationActionsResultListPage) RecommendationActionsResultListIterator { + return original.NewRecommendationActionsResultListIterator(page) +} +func NewRecommendationActionsResultListPage(getNextPage func(context.Context, RecommendationActionsResultList) (RecommendationActionsResultList, error)) RecommendationActionsResultListPage { + return original.NewRecommendationActionsResultListPage(getNextPage) +} +func NewRecommendedActionsClient(subscriptionID string) RecommendedActionsClient { + return original.NewRecommendedActionsClient(subscriptionID) +} +func NewRecommendedActionsClientWithBaseURI(baseURI string, subscriptionID string) RecommendedActionsClient { + return original.NewRecommendedActionsClientWithBaseURI(baseURI, subscriptionID) +} func NewReplicasClient(subscriptionID string) ReplicasClient { return original.NewReplicasClient(subscriptionID) } @@ -241,6 +371,18 @@ func NewServersClient(subscriptionID string) ServersClient { func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return original.NewServersClientWithBaseURI(baseURI, subscriptionID) } +func NewTopQueryStatisticsClient(subscriptionID string) TopQueryStatisticsClient { + return original.NewTopQueryStatisticsClient(subscriptionID) +} +func NewTopQueryStatisticsClientWithBaseURI(baseURI string, subscriptionID string) TopQueryStatisticsClient { + return original.NewTopQueryStatisticsClientWithBaseURI(baseURI, subscriptionID) +} +func NewTopQueryStatisticsResultListIterator(page TopQueryStatisticsResultListPage) TopQueryStatisticsResultListIterator { + return original.NewTopQueryStatisticsResultListIterator(page) +} +func NewTopQueryStatisticsResultListPage(getNextPage func(context.Context, TopQueryStatisticsResultList) (TopQueryStatisticsResultList, error)) TopQueryStatisticsResultListPage { + return original.NewTopQueryStatisticsResultListPage(getNextPage) +} func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator { return original.NewVirtualNetworkRuleListResultIterator(page) } @@ -253,6 +395,18 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return original.NewVirtualNetworkRulesClientWithBaseURI(baseURI, subscriptionID) } +func NewWaitStatisticsClient(subscriptionID string) WaitStatisticsClient { + return original.NewWaitStatisticsClient(subscriptionID) +} +func NewWaitStatisticsClientWithBaseURI(baseURI string, subscriptionID string) WaitStatisticsClient { + return original.NewWaitStatisticsClientWithBaseURI(baseURI, subscriptionID) +} +func NewWaitStatisticsResultListIterator(page WaitStatisticsResultListPage) WaitStatisticsResultListIterator { + return original.NewWaitStatisticsResultListIterator(page) +} +func NewWaitStatisticsResultListPage(getNextPage func(context.Context, WaitStatisticsResultList) (WaitStatisticsResultList, error)) WaitStatisticsResultListPage { + return original.NewWaitStatisticsResultListPage(getNextPage) +} func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } diff --git a/profiles/latest/netapp/mgmt/netapp/models.go b/profiles/latest/netapp/mgmt/netapp/models.go index d5404210f4bb..80aa20ef8a73 100644 --- a/profiles/latest/netapp/mgmt/netapp/models.go +++ b/profiles/latest/netapp/mgmt/netapp/models.go @@ -19,7 +19,7 @@ package netapp -import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-10-01/netapp" +import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-11-01/netapp" const ( DefaultBaseURI = original.DefaultBaseURI @@ -100,7 +100,6 @@ type MetricSpecification = original.MetricSpecification type MountTarget = original.MountTarget type MountTargetList = original.MountTargetList type MountTargetProperties = original.MountTargetProperties -type MountTargetsClient = original.MountTargetsClient type Operation = original.Operation type OperationDisplay = original.OperationDisplay type OperationListResult = original.OperationListResult @@ -111,6 +110,7 @@ type PoolProperties = original.PoolProperties type PoolsClient = original.PoolsClient type PoolsCreateOrUpdateFuture = original.PoolsCreateOrUpdateFuture type PoolsDeleteFuture = original.PoolsDeleteFuture +type PoolsUpdateFuture = original.PoolsUpdateFuture type ReplicationObject = original.ReplicationObject type ReplicationStatus = original.ReplicationStatus type ResourceClient = original.ResourceClient @@ -118,12 +118,12 @@ type ResourceNameAvailability = original.ResourceNameAvailability type ResourceNameAvailabilityRequest = original.ResourceNameAvailabilityRequest type ServiceSpecification = original.ServiceSpecification type Snapshot = original.Snapshot -type SnapshotPatch = original.SnapshotPatch type SnapshotProperties = original.SnapshotProperties type SnapshotsClient = original.SnapshotsClient type SnapshotsCreateFuture = original.SnapshotsCreateFuture type SnapshotsDeleteFuture = original.SnapshotsDeleteFuture type SnapshotsList = original.SnapshotsList +type SnapshotsUpdateFuture = original.SnapshotsUpdateFuture type Volume = original.Volume type VolumeList = original.VolumeList type VolumePatch = original.VolumePatch @@ -132,9 +132,16 @@ type VolumePatchPropertiesExportPolicy = original.VolumePatchPropertiesExportPol type VolumeProperties = original.VolumeProperties type VolumePropertiesDataProtection = original.VolumePropertiesDataProtection type VolumePropertiesExportPolicy = original.VolumePropertiesExportPolicy +type VolumeRevert = original.VolumeRevert +type VolumesAuthorizeReplicationFuture = original.VolumesAuthorizeReplicationFuture +type VolumesBreakReplicationFuture = original.VolumesBreakReplicationFuture type VolumesClient = original.VolumesClient type VolumesCreateOrUpdateFuture = original.VolumesCreateOrUpdateFuture type VolumesDeleteFuture = original.VolumesDeleteFuture +type VolumesDeleteReplicationFuture = original.VolumesDeleteReplicationFuture +type VolumesResyncReplicationFuture = original.VolumesResyncReplicationFuture +type VolumesRevertFuture = original.VolumesRevertFuture +type VolumesUpdateFuture = original.VolumesUpdateFuture func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -145,12 +152,6 @@ func NewAccountsClient(subscriptionID string) AccountsClient { func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { return original.NewAccountsClientWithBaseURI(baseURI, subscriptionID) } -func NewMountTargetsClient(subscriptionID string) MountTargetsClient { - return original.NewMountTargetsClient(subscriptionID) -} -func NewMountTargetsClientWithBaseURI(baseURI string, subscriptionID string) MountTargetsClient { - return original.NewMountTargetsClientWithBaseURI(baseURI, subscriptionID) -} func NewOperationsClient(subscriptionID string) OperationsClient { return original.NewOperationsClient(subscriptionID) } diff --git a/profiles/latest/netapp/mgmt/netapp/netappapi/models.go b/profiles/latest/netapp/mgmt/netapp/netappapi/models.go index b6fda7add131..adb887057e37 100644 --- a/profiles/latest/netapp/mgmt/netapp/netappapi/models.go +++ b/profiles/latest/netapp/mgmt/netapp/netappapi/models.go @@ -19,10 +19,9 @@ package netappapi -import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-10-01/netapp/netappapi" +import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-11-01/netapp/netappapi" type AccountsClientAPI = original.AccountsClientAPI -type MountTargetsClientAPI = original.MountTargetsClientAPI type OperationsClientAPI = original.OperationsClientAPI type PoolsClientAPI = original.PoolsClientAPI type ResourceClientAPI = original.ResourceClientAPI diff --git a/profiles/latest/network/mgmt/network/models.go b/profiles/latest/network/mgmt/network/models.go index 957449f8a526..25fca73e1055 100644 --- a/profiles/latest/network/mgmt/network/models.go +++ b/profiles/latest/network/mgmt/network/models.go @@ -22,7 +22,7 @@ package network import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" + original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-11-01/network" ) const ( @@ -249,6 +249,13 @@ const ( AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = original.AzureFirewallThreatIntelModeOff ) +type BastionConnectProtocol = original.BastionConnectProtocol + +const ( + RDP BastionConnectProtocol = original.RDP + SSH BastionConnectProtocol = original.SSH +) + type BgpPeerState = original.BgpPeerState const ( @@ -267,6 +274,18 @@ const ( Disconnected CircuitConnectionStatus = original.Disconnected ) +type ConnectionMonitorEndpointFilterItemType = original.ConnectionMonitorEndpointFilterItemType + +const ( + AgentAddress ConnectionMonitorEndpointFilterItemType = original.AgentAddress +) + +type ConnectionMonitorEndpointFilterType = original.ConnectionMonitorEndpointFilterType + +const ( + Include ConnectionMonitorEndpointFilterType = original.Include +) + type ConnectionMonitorSourceStatus = original.ConnectionMonitorSourceStatus const ( @@ -275,6 +294,21 @@ const ( ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = original.ConnectionMonitorSourceStatusUnknown ) +type ConnectionMonitorTestConfigurationProtocol = original.ConnectionMonitorTestConfigurationProtocol + +const ( + ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = original.ConnectionMonitorTestConfigurationProtocolHTTP + ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = original.ConnectionMonitorTestConfigurationProtocolIcmp + ConnectionMonitorTestConfigurationProtocolTCP ConnectionMonitorTestConfigurationProtocol = original.ConnectionMonitorTestConfigurationProtocolTCP +) + +type ConnectionMonitorType = original.ConnectionMonitorType + +const ( + MultiEndpoint ConnectionMonitorType = original.MultiEndpoint + SingleSourceDestination ConnectionMonitorType = original.SingleSourceDestination +) + type ConnectionState = original.ConnectionState const ( @@ -478,10 +512,17 @@ const ( JSON FlowLogFormatType = original.JSON ) +type HTTPConfigurationMethod = original.HTTPConfigurationMethod + +const ( + Get HTTPConfigurationMethod = original.Get + Post HTTPConfigurationMethod = original.Post +) + type HTTPMethod = original.HTTPMethod const ( - Get HTTPMethod = original.Get + HTTPMethodGet HTTPMethod = original.HTTPMethodGet ) type HubVirtualNetworkConnectionStatus = original.HubVirtualNetworkConnectionStatus @@ -647,6 +688,12 @@ const ( OriginOutbound Origin = original.OriginOutbound ) +type OutputType = original.OutputType + +const ( + Workspace OutputType = original.Workspace +) + type OwaspCrsExclusionEntryMatchVariable = original.OwaspCrsExclusionEntryMatchVariable const ( @@ -707,6 +754,13 @@ const ( PfsGroupPFSMM PfsGroup = original.PfsGroupPFSMM ) +type PreferredIPVersion = original.PreferredIPVersion + +const ( + PreferredIPVersionIPv4 PreferredIPVersion = original.PreferredIPVersionIPv4 + PreferredIPVersionIPv6 PreferredIPVersion = original.PreferredIPVersionIPv6 +) + type ProbeProtocol = original.ProbeProtocol const ( @@ -1138,6 +1192,7 @@ type ApplicationGatewaySslPredefinedPolicy = original.ApplicationGatewaySslPrede type ApplicationGatewaySslPredefinedPolicyPropertiesFormat = original.ApplicationGatewaySslPredefinedPolicyPropertiesFormat type ApplicationGatewayTrustedRootCertificate = original.ApplicationGatewayTrustedRootCertificate type ApplicationGatewayTrustedRootCertificatePropertiesFormat = original.ApplicationGatewayTrustedRootCertificatePropertiesFormat +type ApplicationGatewayURLConfiguration = original.ApplicationGatewayURLConfiguration type ApplicationGatewayURLPathMap = original.ApplicationGatewayURLPathMap type ApplicationGatewayURLPathMapPropertiesFormat = original.ApplicationGatewayURLPathMapPropertiesFormat type ApplicationGatewayWebApplicationFirewallConfiguration = original.ApplicationGatewayWebApplicationFirewallConfiguration @@ -1202,6 +1257,7 @@ type AzureFirewallFqdnTagPropertiesFormat = original.AzureFirewallFqdnTagPropert type AzureFirewallFqdnTagsClient = original.AzureFirewallFqdnTagsClient type AzureFirewallIPConfiguration = original.AzureFirewallIPConfiguration type AzureFirewallIPConfigurationPropertiesFormat = original.AzureFirewallIPConfigurationPropertiesFormat +type AzureFirewallIPGroups = original.AzureFirewallIPGroups type AzureFirewallListResult = original.AzureFirewallListResult type AzureFirewallListResultIterator = original.AzureFirewallListResultIterator type AzureFirewallListResultPage = original.AzureFirewallListResultPage @@ -1230,6 +1286,10 @@ type BackendAddressPoolPropertiesFormat = original.BackendAddressPoolPropertiesF type BaseClient = original.BaseClient type BasicFirewallPolicyRule = original.BasicFirewallPolicyRule type BasicFirewallPolicyRuleCondition = original.BasicFirewallPolicyRuleCondition +type BastionActiveSession = original.BastionActiveSession +type BastionActiveSessionListResult = original.BastionActiveSessionListResult +type BastionActiveSessionListResultIterator = original.BastionActiveSessionListResultIterator +type BastionActiveSessionListResultPage = original.BastionActiveSessionListResultPage type BastionHost = original.BastionHost type BastionHostIPConfiguration = original.BastionHostIPConfiguration type BastionHostIPConfigurationPropertiesFormat = original.BastionHostIPConfigurationPropertiesFormat @@ -1240,6 +1300,15 @@ type BastionHostPropertiesFormat = original.BastionHostPropertiesFormat type BastionHostsClient = original.BastionHostsClient type BastionHostsCreateOrUpdateFuture = original.BastionHostsCreateOrUpdateFuture type BastionHostsDeleteFuture = original.BastionHostsDeleteFuture +type BastionSessionDeleteResult = original.BastionSessionDeleteResult +type BastionSessionDeleteResultIterator = original.BastionSessionDeleteResultIterator +type BastionSessionDeleteResultPage = original.BastionSessionDeleteResultPage +type BastionSessionState = original.BastionSessionState +type BastionShareableLink = original.BastionShareableLink +type BastionShareableLinkListRequest = original.BastionShareableLinkListRequest +type BastionShareableLinkListResult = original.BastionShareableLinkListResult +type BastionShareableLinkListResultIterator = original.BastionShareableLinkListResultIterator +type BastionShareableLinkListResultPage = original.BastionShareableLinkListResultPage type BgpPeerStatus = original.BgpPeerStatus type BgpPeerStatusListResult = original.BgpPeerStatusListResult type BgpServiceCommunitiesClient = original.BgpServiceCommunitiesClient @@ -1258,12 +1327,23 @@ type ConfigurationDiagnosticResponse = original.ConfigurationDiagnosticResponse type ConfigurationDiagnosticResult = original.ConfigurationDiagnosticResult type ConnectionMonitor = original.ConnectionMonitor type ConnectionMonitorDestination = original.ConnectionMonitorDestination +type ConnectionMonitorEndpoint = original.ConnectionMonitorEndpoint +type ConnectionMonitorEndpointFilter = original.ConnectionMonitorEndpointFilter +type ConnectionMonitorEndpointFilterItem = original.ConnectionMonitorEndpointFilterItem +type ConnectionMonitorHTTPConfiguration = original.ConnectionMonitorHTTPConfiguration +type ConnectionMonitorIcmpConfiguration = original.ConnectionMonitorIcmpConfiguration type ConnectionMonitorListResult = original.ConnectionMonitorListResult +type ConnectionMonitorOutput = original.ConnectionMonitorOutput type ConnectionMonitorParameters = original.ConnectionMonitorParameters type ConnectionMonitorQueryResult = original.ConnectionMonitorQueryResult type ConnectionMonitorResult = original.ConnectionMonitorResult type ConnectionMonitorResultProperties = original.ConnectionMonitorResultProperties type ConnectionMonitorSource = original.ConnectionMonitorSource +type ConnectionMonitorSuccessThreshold = original.ConnectionMonitorSuccessThreshold +type ConnectionMonitorTCPConfiguration = original.ConnectionMonitorTCPConfiguration +type ConnectionMonitorTestConfiguration = original.ConnectionMonitorTestConfiguration +type ConnectionMonitorTestGroup = original.ConnectionMonitorTestGroup +type ConnectionMonitorWorkspaceSettings = original.ConnectionMonitorWorkspaceSettings type ConnectionMonitorsClient = original.ConnectionMonitorsClient type ConnectionMonitorsCreateOrUpdateFuture = original.ConnectionMonitorsCreateOrUpdateFuture type ConnectionMonitorsDeleteFuture = original.ConnectionMonitorsDeleteFuture @@ -1303,6 +1383,7 @@ type DdosProtectionPlansDeleteFuture = original.DdosProtectionPlansDeleteFuture type DdosSettings = original.DdosSettings type DefaultSecurityRulesClient = original.DefaultSecurityRulesClient type Delegation = original.Delegation +type DeleteBastionShareableLinkFuture = original.DeleteBastionShareableLinkFuture type DeviceProperties = original.DeviceProperties type DhcpOptions = original.DhcpOptions type Dimension = original.Dimension @@ -1450,15 +1531,25 @@ type FirewallPolicyRuleGroupProperties = original.FirewallPolicyRuleGroupPropert type FirewallPolicyRuleGroupsClient = original.FirewallPolicyRuleGroupsClient type FirewallPolicyRuleGroupsCreateOrUpdateFuture = original.FirewallPolicyRuleGroupsCreateOrUpdateFuture type FirewallPolicyRuleGroupsDeleteFuture = original.FirewallPolicyRuleGroupsDeleteFuture +type FlowLog = original.FlowLog type FlowLogFormatParameters = original.FlowLogFormatParameters type FlowLogInformation = original.FlowLogInformation +type FlowLogListResult = original.FlowLogListResult +type FlowLogListResultIterator = original.FlowLogListResultIterator +type FlowLogListResultPage = original.FlowLogListResultPage type FlowLogProperties = original.FlowLogProperties +type FlowLogPropertiesFormat = original.FlowLogPropertiesFormat type FlowLogStatusParameters = original.FlowLogStatusParameters +type FlowLogsClient = original.FlowLogsClient +type FlowLogsCreateOrUpdateFuture = original.FlowLogsCreateOrUpdateFuture +type FlowLogsDeleteFuture = original.FlowLogsDeleteFuture type FrontendIPConfiguration = original.FrontendIPConfiguration type FrontendIPConfigurationPropertiesFormat = original.FrontendIPConfigurationPropertiesFormat type GatewayRoute = original.GatewayRoute type GatewayRouteListResult = original.GatewayRouteListResult type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture = original.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture +type GetActiveSessionsAllFuture = original.GetActiveSessionsAllFuture +type GetActiveSessionsFuture = original.GetActiveSessionsFuture type GetVpnSitesConfigurationRequest = original.GetVpnSitesConfigurationRequest type HTTPConfiguration = original.HTTPConfiguration type HTTPHeader = original.HTTPHeader @@ -1636,12 +1727,14 @@ type P2SConnectionConfiguration = original.P2SConnectionConfiguration type P2SConnectionConfigurationProperties = original.P2SConnectionConfigurationProperties type P2SVpnConnectionHealth = original.P2SVpnConnectionHealth type P2SVpnConnectionHealthRequest = original.P2SVpnConnectionHealthRequest +type P2SVpnConnectionRequest = original.P2SVpnConnectionRequest type P2SVpnGateway = original.P2SVpnGateway type P2SVpnGatewayProperties = original.P2SVpnGatewayProperties type P2SVpnProfileParameters = original.P2SVpnProfileParameters type P2sVpnGatewaysClient = original.P2sVpnGatewaysClient type P2sVpnGatewaysCreateOrUpdateFuture = original.P2sVpnGatewaysCreateOrUpdateFuture type P2sVpnGatewaysDeleteFuture = original.P2sVpnGatewaysDeleteFuture +type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture = original.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture type P2sVpnGatewaysGenerateVpnProfileFuture = original.P2sVpnGatewaysGenerateVpnProfileFuture type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture = original.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture = original.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture @@ -1728,6 +1821,8 @@ type PublicIPPrefixSku = original.PublicIPPrefixSku type PublicIPPrefixesClient = original.PublicIPPrefixesClient type PublicIPPrefixesCreateOrUpdateFuture = original.PublicIPPrefixesCreateOrUpdateFuture type PublicIPPrefixesDeleteFuture = original.PublicIPPrefixesDeleteFuture +type PutBastionShareableLinkAllFuture = original.PutBastionShareableLinkAllFuture +type PutBastionShareableLinkFuture = original.PutBastionShareableLinkFuture type QueryTroubleshootingParameters = original.QueryTroubleshootingParameters type ReferencedPublicIPAddress = original.ReferencedPublicIPAddress type Resource = original.Resource @@ -1818,6 +1913,7 @@ type ServiceTagInformation = original.ServiceTagInformation type ServiceTagInformationPropertiesFormat = original.ServiceTagInformationPropertiesFormat type ServiceTagsClient = original.ServiceTagsClient type ServiceTagsListResult = original.ServiceTagsListResult +type SessionIds = original.SessionIds type String = original.String type SubResource = original.SubResource type Subnet = original.Subnet @@ -1852,6 +1948,7 @@ type UsagesClient = original.UsagesClient type UsagesListResult = original.UsagesListResult type UsagesListResultIterator = original.UsagesListResultIterator type UsagesListResultPage = original.UsagesListResultPage +type VM = original.VM type VerificationIPFlowParameters = original.VerificationIPFlowParameters type VerificationIPFlowResult = original.VerificationIPFlowResult type VirtualHub = original.VirtualHub @@ -1900,6 +1997,7 @@ type VirtualNetworkGatewaySku = original.VirtualNetworkGatewaySku type VirtualNetworkGatewaysClient = original.VirtualNetworkGatewaysClient type VirtualNetworkGatewaysCreateOrUpdateFuture = original.VirtualNetworkGatewaysCreateOrUpdateFuture type VirtualNetworkGatewaysDeleteFuture = original.VirtualNetworkGatewaysDeleteFuture +type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture = original.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture type VirtualNetworkGatewaysGenerateVpnProfileFuture = original.VirtualNetworkGatewaysGenerateVpnProfileFuture type VirtualNetworkGatewaysGeneratevpnclientpackageFuture = original.VirtualNetworkGatewaysGeneratevpnclientpackageFuture type VirtualNetworkGatewaysGetAdvertisedRoutesFuture = original.VirtualNetworkGatewaysGetAdvertisedRoutesFuture @@ -2162,6 +2260,12 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { func NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient { return original.NewAzureFirewallsClientWithBaseURI(baseURI, subscriptionID) } +func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator { + return original.NewBastionActiveSessionListResultIterator(page) +} +func NewBastionActiveSessionListResultPage(getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage { + return original.NewBastionActiveSessionListResultPage(getNextPage) +} func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator { return original.NewBastionHostListResultIterator(page) } @@ -2174,6 +2278,18 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { func NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient { return original.NewBastionHostsClientWithBaseURI(baseURI, subscriptionID) } +func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator { + return original.NewBastionSessionDeleteResultIterator(page) +} +func NewBastionSessionDeleteResultPage(getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage { + return original.NewBastionSessionDeleteResultPage(getNextPage) +} +func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator { + return original.NewBastionShareableLinkListResultIterator(page) +} +func NewBastionShareableLinkListResultPage(getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage { + return original.NewBastionShareableLinkListResultPage(getNextPage) +} func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunitiesClient { return original.NewBgpServiceCommunitiesClient(subscriptionID) } @@ -2372,6 +2488,18 @@ func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRule func NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { return original.NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI, subscriptionID) } +func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator { + return original.NewFlowLogListResultIterator(page) +} +func NewFlowLogListResultPage(getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage { + return original.NewFlowLogListResultPage(getNextPage) +} +func NewFlowLogsClient(subscriptionID string) FlowLogsClient { + return original.NewFlowLogsClient(subscriptionID) +} +func NewFlowLogsClientWithBaseURI(baseURI string, subscriptionID string) FlowLogsClient { + return original.NewFlowLogsClientWithBaseURI(baseURI, subscriptionID) +} func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetworkConnectionsClient { return original.NewHubVirtualNetworkConnectionsClient(subscriptionID) } @@ -3122,15 +3250,30 @@ func PossibleAzureFirewallSkuTierValues() []AzureFirewallSkuTier { func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode { return original.PossibleAzureFirewallThreatIntelModeValues() } +func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { + return original.PossibleBastionConnectProtocolValues() +} func PossibleBgpPeerStateValues() []BgpPeerState { return original.PossibleBgpPeerStateValues() } func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { return original.PossibleCircuitConnectionStatusValues() } +func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitorEndpointFilterItemType { + return original.PossibleConnectionMonitorEndpointFilterItemTypeValues() +} +func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndpointFilterType { + return original.PossibleConnectionMonitorEndpointFilterTypeValues() +} func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { return original.PossibleConnectionMonitorSourceStatusValues() } +func PossibleConnectionMonitorTestConfigurationProtocolValues() []ConnectionMonitorTestConfigurationProtocol { + return original.PossibleConnectionMonitorTestConfigurationProtocolValues() +} +func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { + return original.PossibleConnectionMonitorTypeValues() +} func PossibleConnectionStateValues() []ConnectionState { return original.PossibleConnectionStateValues() } @@ -3209,6 +3352,9 @@ func PossibleFirewallPolicyRuleConditionNetworkProtocolValues() []FirewallPolicy func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { return original.PossibleFlowLogFormatTypeValues() } +func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { + return original.PossibleHTTPConfigurationMethodValues() +} func PossibleHTTPMethodValues() []HTTPMethod { return original.PossibleHTTPMethodValues() } @@ -3266,6 +3412,9 @@ func PossibleOperationStatusValues() []OperationStatus { func PossibleOriginValues() []Origin { return original.PossibleOriginValues() } +func PossibleOutputTypeValues() []OutputType { + return original.PossibleOutputTypeValues() +} func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { return original.PossibleOwaspCrsExclusionEntryMatchVariableValues() } @@ -3284,6 +3433,9 @@ func PossiblePcStatusValues() []PcStatus { func PossiblePfsGroupValues() []PfsGroup { return original.PossiblePfsGroupValues() } +func PossiblePreferredIPVersionValues() []PreferredIPVersion { + return original.PossiblePreferredIPVersionValues() +} func PossibleProbeProtocolValues() []ProbeProtocol { return original.PossibleProbeProtocolValues() } diff --git a/profiles/latest/network/mgmt/network/networkapi/models.go b/profiles/latest/network/mgmt/network/networkapi/models.go index ea9208590787..e8e750e33bf9 100644 --- a/profiles/latest/network/mgmt/network/networkapi/models.go +++ b/profiles/latest/network/mgmt/network/networkapi/models.go @@ -19,7 +19,7 @@ package networkapi -import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/networkapi" +import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-11-01/network/networkapi" type ApplicationGatewaysClientAPI = original.ApplicationGatewaysClientAPI type ApplicationSecurityGroupsClientAPI = original.ApplicationSecurityGroupsClientAPI @@ -51,6 +51,7 @@ type ExpressRoutePortsLocationsClientAPI = original.ExpressRoutePortsLocationsCl type ExpressRouteServiceProvidersClientAPI = original.ExpressRouteServiceProvidersClientAPI type FirewallPoliciesClientAPI = original.FirewallPoliciesClientAPI type FirewallPolicyRuleGroupsClientAPI = original.FirewallPolicyRuleGroupsClientAPI +type FlowLogsClientAPI = original.FlowLogsClientAPI type HubVirtualNetworkConnectionsClientAPI = original.HubVirtualNetworkConnectionsClientAPI type IPGroupsClientAPI = original.IPGroupsClientAPI type InboundNatRulesClientAPI = original.InboundNatRulesClientAPI diff --git a/profiles/latest/recoveryservices/mgmt/backup/backupapi/models.go b/profiles/latest/recoveryservices/mgmt/backup/backupapi/models.go index f963839e8537..165a4cd9c042 100644 --- a/profiles/latest/recoveryservices/mgmt/backup/backupapi/models.go +++ b/profiles/latest/recoveryservices/mgmt/backup/backupapi/models.go @@ -19,7 +19,7 @@ package backupapi -import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup/backupapi" +import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-06-15/backup/backupapi" type BackupsClientAPI = original.BackupsClientAPI type EnginesClientAPI = original.EnginesClientAPI diff --git a/profiles/latest/recoveryservices/mgmt/backup/models.go b/profiles/latest/recoveryservices/mgmt/backup/models.go index 152ba48e0d45..684e689ccba1 100644 --- a/profiles/latest/recoveryservices/mgmt/backup/models.go +++ b/profiles/latest/recoveryservices/mgmt/backup/models.go @@ -22,7 +22,7 @@ package backup import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup" + original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-06-15/backup" ) const ( diff --git a/profiles/latest/recoveryservices/mgmt/siterecovery/models.go b/profiles/latest/recoveryservices/mgmt/siterecovery/models.go index b50e7fb8909c..c51ca0fe77ca 100644 --- a/profiles/latest/recoveryservices/mgmt/siterecovery/models.go +++ b/profiles/latest/recoveryservices/mgmt/siterecovery/models.go @@ -358,6 +358,13 @@ const ( InstanceTypeScriptActionDetails InstanceTypeBasicRecoveryPlanActionDetails = original.InstanceTypeScriptActionDetails ) +type InstanceTypeBasicRecoveryPlanProviderSpecificDetails = original.InstanceTypeBasicRecoveryPlanProviderSpecificDetails + +const ( + InstanceTypeRecoveryPlanA2ADetails InstanceTypeBasicRecoveryPlanProviderSpecificDetails = original.InstanceTypeRecoveryPlanA2ADetails + InstanceTypeRecoveryPlanProviderSpecificDetails InstanceTypeBasicRecoveryPlanProviderSpecificDetails = original.InstanceTypeRecoveryPlanProviderSpecificDetails +) + type InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput const ( @@ -369,6 +376,13 @@ const ( InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput ) +type InstanceTypeBasicRecoveryPlanProviderSpecificInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificInput + +const ( + InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A InstanceTypeBasicRecoveryPlanProviderSpecificInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A + InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput InstanceTypeBasicRecoveryPlanProviderSpecificInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput +) + type InstanceTypeBasicRemoveDisksProviderSpecificInput = original.InstanceTypeBasicRemoveDisksProviderSpecificInput const ( @@ -712,7 +726,9 @@ type BasicProtectionContainerMappingProviderSpecificDetails = original.BasicProt type BasicProviderSpecificFailoverInput = original.BasicProviderSpecificFailoverInput type BasicProviderSpecificRecoveryPointDetails = original.BasicProviderSpecificRecoveryPointDetails type BasicRecoveryPlanActionDetails = original.BasicRecoveryPlanActionDetails +type BasicRecoveryPlanProviderSpecificDetails = original.BasicRecoveryPlanProviderSpecificDetails type BasicRecoveryPlanProviderSpecificFailoverInput = original.BasicRecoveryPlanProviderSpecificFailoverInput +type BasicRecoveryPlanProviderSpecificInput = original.BasicRecoveryPlanProviderSpecificInput type BasicRemoveDisksProviderSpecificInput = original.BasicRemoveDisksProviderSpecificInput type BasicReplicationProviderSpecificContainerCreationInput = original.BasicReplicationProviderSpecificContainerCreationInput type BasicReplicationProviderSpecificContainerMappingInput = original.BasicReplicationProviderSpecificContainerMappingInput @@ -810,6 +826,7 @@ type HyperVReplicaPolicyInput = original.HyperVReplicaPolicyInput type HyperVReplicaReplicationDetails = original.HyperVReplicaReplicationDetails type HyperVSiteDetails = original.HyperVSiteDetails type HyperVVirtualMachineDetails = original.HyperVVirtualMachineDetails +type IPConfig = original.IPConfig type IdentityProviderDetails = original.IdentityProviderDetails type IdentityProviderInput = original.IdentityProviderInput type InMageAgentDetails = original.InMageAgentDetails @@ -934,7 +951,9 @@ type ProviderSpecificFailoverInput = original.ProviderSpecificFailoverInput type ProviderSpecificRecoveryPointDetails = original.ProviderSpecificRecoveryPointDetails type RcmAzureMigrationPolicyDetails = original.RcmAzureMigrationPolicyDetails type RecoveryPlan = original.RecoveryPlan +type RecoveryPlanA2ADetails = original.RecoveryPlanA2ADetails type RecoveryPlanA2AFailoverInput = original.RecoveryPlanA2AFailoverInput +type RecoveryPlanA2AInput = original.RecoveryPlanA2AInput type RecoveryPlanAction = original.RecoveryPlanAction type RecoveryPlanActionDetails = original.RecoveryPlanActionDetails type RecoveryPlanAutomationRunbookActionDetails = original.RecoveryPlanAutomationRunbookActionDetails @@ -952,7 +971,9 @@ type RecoveryPlanPlannedFailoverInput = original.RecoveryPlanPlannedFailoverInpu type RecoveryPlanPlannedFailoverInputProperties = original.RecoveryPlanPlannedFailoverInputProperties type RecoveryPlanProperties = original.RecoveryPlanProperties type RecoveryPlanProtectedItem = original.RecoveryPlanProtectedItem +type RecoveryPlanProviderSpecificDetails = original.RecoveryPlanProviderSpecificDetails type RecoveryPlanProviderSpecificFailoverInput = original.RecoveryPlanProviderSpecificFailoverInput +type RecoveryPlanProviderSpecificInput = original.RecoveryPlanProviderSpecificInput type RecoveryPlanScriptActionDetails = original.RecoveryPlanScriptActionDetails type RecoveryPlanShutdownGroupTaskDetails = original.RecoveryPlanShutdownGroupTaskDetails type RecoveryPlanTestFailoverCleanupInput = original.RecoveryPlanTestFailoverCleanupInput @@ -1612,9 +1633,15 @@ func PossibleInstanceTypeBasicProviderSpecificRecoveryPointDetailsValues() []Ins func PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues() []InstanceTypeBasicRecoveryPlanActionDetails { return original.PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues() } +func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificDetailsValues() []InstanceTypeBasicRecoveryPlanProviderSpecificDetails { + return original.PossibleInstanceTypeBasicRecoveryPlanProviderSpecificDetailsValues() +} func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() []InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput { return original.PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() } +func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificInputValues() []InstanceTypeBasicRecoveryPlanProviderSpecificInput { + return original.PossibleInstanceTypeBasicRecoveryPlanProviderSpecificInputValues() +} func PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() []InstanceTypeBasicRemoveDisksProviderSpecificInput { return original.PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() } diff --git a/profiles/latest/resources/mgmt/managedapplications/models.go b/profiles/latest/resources/mgmt/managedapplications/models.go index 8917f94f265a..cf462713b82d 100644 --- a/profiles/latest/resources/mgmt/managedapplications/models.go +++ b/profiles/latest/resources/mgmt/managedapplications/models.go @@ -29,11 +29,30 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type ApplicationArtifactName = original.ApplicationArtifactName + +const ( + Authorizations ApplicationArtifactName = original.Authorizations + CustomRoleDefinition ApplicationArtifactName = original.CustomRoleDefinition + NotSpecified ApplicationArtifactName = original.NotSpecified + ViewDefinition ApplicationArtifactName = original.ViewDefinition +) + type ApplicationArtifactType = original.ApplicationArtifactType const ( - Custom ApplicationArtifactType = original.Custom - Template ApplicationArtifactType = original.Template + ApplicationArtifactTypeCustom ApplicationArtifactType = original.ApplicationArtifactTypeCustom + ApplicationArtifactTypeNotSpecified ApplicationArtifactType = original.ApplicationArtifactTypeNotSpecified + ApplicationArtifactTypeTemplate ApplicationArtifactType = original.ApplicationArtifactTypeTemplate +) + +type ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactName + +const ( + ApplicationDefinitionArtifactNameApplicationResourceTemplate ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactNameApplicationResourceTemplate + ApplicationDefinitionArtifactNameCreateUIDefinition ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactNameCreateUIDefinition + ApplicationDefinitionArtifactNameMainTemplateParameters ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactNameMainTemplateParameters + ApplicationDefinitionArtifactNameNotSpecified ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactNameNotSpecified ) type ApplicationLockLevel = original.ApplicationLockLevel @@ -44,17 +63,48 @@ const ( ReadOnly ApplicationLockLevel = original.ReadOnly ) +type ApplicationManagementMode = original.ApplicationManagementMode + +const ( + ApplicationManagementModeManaged ApplicationManagementMode = original.ApplicationManagementModeManaged + ApplicationManagementModeNotSpecified ApplicationManagementMode = original.ApplicationManagementModeNotSpecified + ApplicationManagementModeUnmanaged ApplicationManagementMode = original.ApplicationManagementModeUnmanaged +) + +type DeploymentMode = original.DeploymentMode + +const ( + DeploymentModeComplete DeploymentMode = original.DeploymentModeComplete + DeploymentModeIncremental DeploymentMode = original.DeploymentModeIncremental + DeploymentModeNotSpecified DeploymentMode = original.DeploymentModeNotSpecified +) + +type JitApprovalMode = original.JitApprovalMode + +const ( + JitApprovalModeAutoApprove JitApprovalMode = original.JitApprovalModeAutoApprove + JitApprovalModeManualApprove JitApprovalMode = original.JitApprovalModeManualApprove + JitApprovalModeNotSpecified JitApprovalMode = original.JitApprovalModeNotSpecified +) + +type JitApproverType = original.JitApproverType + +const ( + Group JitApproverType = original.Group + User JitApproverType = original.User +) + type JitRequestState = original.JitRequestState const ( - Approved JitRequestState = original.Approved - Canceled JitRequestState = original.Canceled - Denied JitRequestState = original.Denied - Expired JitRequestState = original.Expired - Failed JitRequestState = original.Failed - NotSpecified JitRequestState = original.NotSpecified - Pending JitRequestState = original.Pending - Timeout JitRequestState = original.Timeout + JitRequestStateApproved JitRequestState = original.JitRequestStateApproved + JitRequestStateCanceled JitRequestState = original.JitRequestStateCanceled + JitRequestStateDenied JitRequestState = original.JitRequestStateDenied + JitRequestStateExpired JitRequestState = original.JitRequestStateExpired + JitRequestStateFailed JitRequestState = original.JitRequestStateFailed + JitRequestStateNotSpecified JitRequestState = original.JitRequestStateNotSpecified + JitRequestStatePending JitRequestState = original.JitRequestStatePending + JitRequestStateTimeout JitRequestState = original.JitRequestStateTimeout ) type JitSchedulingType = original.JitSchedulingType @@ -68,17 +118,18 @@ const ( type ProvisioningState = original.ProvisioningState const ( - ProvisioningStateAccepted ProvisioningState = original.ProvisioningStateAccepted - ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled - ProvisioningStateCreated ProvisioningState = original.ProvisioningStateCreated - ProvisioningStateCreating ProvisioningState = original.ProvisioningStateCreating - ProvisioningStateDeleted ProvisioningState = original.ProvisioningStateDeleted - ProvisioningStateDeleting ProvisioningState = original.ProvisioningStateDeleting - ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed - ProvisioningStateReady ProvisioningState = original.ProvisioningStateReady - ProvisioningStateRunning ProvisioningState = original.ProvisioningStateRunning - ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded - ProvisioningStateUpdating ProvisioningState = original.ProvisioningStateUpdating + ProvisioningStateAccepted ProvisioningState = original.ProvisioningStateAccepted + ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled + ProvisioningStateCreated ProvisioningState = original.ProvisioningStateCreated + ProvisioningStateCreating ProvisioningState = original.ProvisioningStateCreating + ProvisioningStateDeleted ProvisioningState = original.ProvisioningStateDeleted + ProvisioningStateDeleting ProvisioningState = original.ProvisioningStateDeleting + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateNotSpecified ProvisioningState = original.ProvisioningStateNotSpecified + ProvisioningStateReady ProvisioningState = original.ProvisioningStateReady + ProvisioningStateRunning ProvisioningState = original.ProvisioningStateRunning + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded + ProvisioningStateUpdating ProvisioningState = original.ProvisioningStateUpdating ) type ResourceIdentityType = original.ResourceIdentityType @@ -89,8 +140,11 @@ const ( type Application = original.Application type ApplicationArtifact = original.ApplicationArtifact +type ApplicationAuthorization = original.ApplicationAuthorization +type ApplicationBillingDetailsDefinition = original.ApplicationBillingDetailsDefinition type ApplicationClientDetails = original.ApplicationClientDetails type ApplicationDefinition = original.ApplicationDefinition +type ApplicationDefinitionArtifact = original.ApplicationDefinitionArtifact type ApplicationDefinitionListResult = original.ApplicationDefinitionListResult type ApplicationDefinitionListResultIterator = original.ApplicationDefinitionListResultIterator type ApplicationDefinitionListResultPage = original.ApplicationDefinitionListResultPage @@ -100,13 +154,21 @@ type ApplicationDefinitionsCreateOrUpdateByIDFuture = original.ApplicationDefini type ApplicationDefinitionsCreateOrUpdateFuture = original.ApplicationDefinitionsCreateOrUpdateFuture type ApplicationDefinitionsDeleteByIDFuture = original.ApplicationDefinitionsDeleteByIDFuture type ApplicationDefinitionsDeleteFuture = original.ApplicationDefinitionsDeleteFuture +type ApplicationDeploymentPolicy = original.ApplicationDeploymentPolicy +type ApplicationJitAccessPolicy = original.ApplicationJitAccessPolicy type ApplicationListResult = original.ApplicationListResult type ApplicationListResultIterator = original.ApplicationListResultIterator type ApplicationListResultPage = original.ApplicationListResultPage +type ApplicationManagementPolicy = original.ApplicationManagementPolicy +type ApplicationNotificationEndpoint = original.ApplicationNotificationEndpoint +type ApplicationNotificationPolicy = original.ApplicationNotificationPolicy +type ApplicationPackageContact = original.ApplicationPackageContact +type ApplicationPackageLockingPolicyDefinition = original.ApplicationPackageLockingPolicyDefinition +type ApplicationPackageSupportUrls = original.ApplicationPackageSupportUrls type ApplicationPatchable = original.ApplicationPatchable +type ApplicationPolicy = original.ApplicationPolicy type ApplicationProperties = original.ApplicationProperties type ApplicationPropertiesPatchable = original.ApplicationPropertiesPatchable -type ApplicationProviderAuthorization = original.ApplicationProviderAuthorization type ApplicationsClient = original.ApplicationsClient type ApplicationsCreateOrUpdateByIDFuture = original.ApplicationsCreateOrUpdateByIDFuture type ApplicationsCreateOrUpdateFuture = original.ApplicationsCreateOrUpdateFuture @@ -117,6 +179,7 @@ type BaseClient = original.BaseClient type ErrorResponse = original.ErrorResponse type GenericResource = original.GenericResource type Identity = original.Identity +type JitApproverDefinition = original.JitApproverDefinition type JitAuthorizationPolicies = original.JitAuthorizationPolicies type JitRequestDefinition = original.JitRequestDefinition type JitRequestDefinitionListResult = original.JitRequestDefinitionListResult @@ -177,12 +240,30 @@ func NewOperationListResultPage(getNextPage func(context.Context, OperationListR func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleApplicationArtifactNameValues() []ApplicationArtifactName { + return original.PossibleApplicationArtifactNameValues() +} func PossibleApplicationArtifactTypeValues() []ApplicationArtifactType { return original.PossibleApplicationArtifactTypeValues() } +func PossibleApplicationDefinitionArtifactNameValues() []ApplicationDefinitionArtifactName { + return original.PossibleApplicationDefinitionArtifactNameValues() +} func PossibleApplicationLockLevelValues() []ApplicationLockLevel { return original.PossibleApplicationLockLevelValues() } +func PossibleApplicationManagementModeValues() []ApplicationManagementMode { + return original.PossibleApplicationManagementModeValues() +} +func PossibleDeploymentModeValues() []DeploymentMode { + return original.PossibleDeploymentModeValues() +} +func PossibleJitApprovalModeValues() []JitApprovalMode { + return original.PossibleJitApprovalModeValues() +} +func PossibleJitApproverTypeValues() []JitApproverType { + return original.PossibleJitApproverTypeValues() +} func PossibleJitRequestStateValues() []JitRequestState { return original.PossibleJitRequestStateValues() } diff --git a/profiles/latest/storage/mgmt/storage/models.go b/profiles/latest/storage/mgmt/storage/models.go index 62195fcddcb0..3167bda63dfe 100644 --- a/profiles/latest/storage/mgmt/storage/models.go +++ b/profiles/latest/storage/mgmt/storage/models.go @@ -39,6 +39,7 @@ const ( type AccountExpand = original.AccountExpand const ( + AccountExpandBlobRestoreStatus AccountExpand = original.AccountExpandBlobRestoreStatus AccountExpandGeoReplicationStats AccountExpand = original.AccountExpandGeoReplicationStats ) @@ -65,6 +66,14 @@ const ( Renew Action1 = original.Renew ) +type BlobRestoreProgressStatus = original.BlobRestoreProgressStatus + +const ( + Complete BlobRestoreProgressStatus = original.Complete + Failed BlobRestoreProgressStatus = original.Failed + InProgress BlobRestoreProgressStatus = original.InProgress +) + type Bypass = original.Bypass const ( @@ -203,10 +212,10 @@ const ( type PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningState const ( - Creating PrivateEndpointConnectionProvisioningState = original.Creating - Deleting PrivateEndpointConnectionProvisioningState = original.Deleting - Failed PrivateEndpointConnectionProvisioningState = original.Failed - Succeeded PrivateEndpointConnectionProvisioningState = original.Succeeded + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningStateCreating + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningStateDeleting + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningStateFailed + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningStateSucceeded ) type PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatus @@ -220,9 +229,9 @@ const ( type ProvisioningState = original.ProvisioningState const ( - ProvisioningStateCreating ProvisioningState = original.ProvisioningStateCreating - ProvisioningStateResolvingDNS ProvisioningState = original.ProvisioningStateResolvingDNS - ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded + Creating ProvisioningState = original.Creating + ResolvingDNS ProvisioningState = original.ResolvingDNS + Succeeded ProvisioningState = original.Succeeded ) type PublicAccess = original.PublicAccess @@ -340,12 +349,16 @@ type AccountUpdateParameters = original.AccountUpdateParameters type AccountsClient = original.AccountsClient type AccountsCreateFuture = original.AccountsCreateFuture type AccountsFailoverFuture = original.AccountsFailoverFuture +type AccountsRestoreBlobRangesFuture = original.AccountsRestoreBlobRangesFuture type ActiveDirectoryProperties = original.ActiveDirectoryProperties type AzureEntityResource = original.AzureEntityResource type AzureFilesIdentityBasedAuthentication = original.AzureFilesIdentityBasedAuthentication type BaseClient = original.BaseClient type BlobContainer = original.BlobContainer type BlobContainersClient = original.BlobContainersClient +type BlobRestoreParameters = original.BlobRestoreParameters +type BlobRestoreRange = original.BlobRestoreRange +type BlobRestoreStatus = original.BlobRestoreStatus type BlobServiceItems = original.BlobServiceItems type BlobServiceProperties = original.BlobServiceProperties type BlobServicePropertiesProperties = original.BlobServicePropertiesProperties @@ -423,6 +436,7 @@ type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient type PrivateLinkServiceConnectionState = original.PrivateLinkServiceConnectionState type ProxyResource = original.ProxyResource type Resource = original.Resource +type RestorePolicyProperties = original.RestorePolicyProperties type Restriction = original.Restriction type RoutingPreference = original.RoutingPreference type SKUCapability = original.SKUCapability @@ -546,6 +560,9 @@ func PossibleAction1Values() []Action1 { func PossibleActionValues() []Action { return original.PossibleActionValues() } +func PossibleBlobRestoreProgressStatusValues() []BlobRestoreProgressStatus { + return original.PossibleBlobRestoreProgressStatusValues() +} func PossibleBypassValues() []Bypass { return original.PossibleBypassValues() } diff --git a/profiles/latest/web/mgmt/web/models.go b/profiles/latest/web/mgmt/web/models.go index 545c4f5b4bfa..9802329c059a 100644 --- a/profiles/latest/web/mgmt/web/models.go +++ b/profiles/latest/web/mgmt/web/models.go @@ -934,6 +934,7 @@ type GeoRegionProperties = original.GeoRegionProperties type GlobalCsmSkuDescription = original.GlobalCsmSkuDescription type HTTPLogsConfig = original.HTTPLogsConfig type HandlerMapping = original.HandlerMapping +type HostKeys = original.HostKeys type HostName = original.HostName type HostNameBinding = original.HostNameBinding type HostNameBindingCollection = original.HostNameBindingCollection @@ -968,6 +969,7 @@ type JobCollection = original.JobCollection type JobCollectionIterator = original.JobCollectionIterator type JobCollectionPage = original.JobCollectionPage type JobProperties = original.JobProperties +type KeyInfo = original.KeyInfo type KeyVaultReferenceCollection = original.KeyVaultReferenceCollection type KeyVaultReferenceCollectionProperties = original.KeyVaultReferenceCollectionProperties type KeyVaultReferenceResource = original.KeyVaultReferenceResource diff --git a/profiles/preview/apimanagement/mgmt/apimanagement/models.go b/profiles/preview/apimanagement/mgmt/apimanagement/models.go index 2bdb13aa7c82..d31d8efbabfb 100644 --- a/profiles/preview/apimanagement/mgmt/apimanagement/models.go +++ b/profiles/preview/apimanagement/mgmt/apimanagement/models.go @@ -112,6 +112,7 @@ type ContentFormat = original.ContentFormat const ( Openapi ContentFormat = original.Openapi Openapijson ContentFormat = original.Openapijson + OpenapijsonLink ContentFormat = original.OpenapijsonLink OpenapiLink ContentFormat = original.OpenapiLink SwaggerJSON ContentFormat = original.SwaggerJSON SwaggerLinkJSON ContentFormat = original.SwaggerLinkJSON @@ -156,6 +157,14 @@ const ( System GroupType = original.System ) +type HTTPCorrelationProtocol = original.HTTPCorrelationProtocol + +const ( + Legacy HTTPCorrelationProtocol = original.Legacy + None HTTPCorrelationProtocol = original.None + W3C HTTPCorrelationProtocol = original.W3C +) + type HostnameType = original.HostnameType const ( @@ -254,9 +263,9 @@ const ( type ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleType const ( - Automatic ResourceSkuCapacityScaleType = original.Automatic - Manual ResourceSkuCapacityScaleType = original.Manual - None ResourceSkuCapacityScaleType = original.None + ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeAutomatic + ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeManual + ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeNone ) type SamplingType = original.SamplingType @@ -338,6 +347,14 @@ const ( UserStatePending UserState = original.UserStatePending ) +type Verbosity = original.Verbosity + +const ( + Error Verbosity = original.Error + Information Verbosity = original.Information + Verbose Verbosity = original.Verbose +) + type VersioningScheme = original.VersioningScheme const ( @@ -1366,6 +1383,9 @@ func PossibleGrantTypeValues() []GrantType { func PossibleGroupTypeValues() []GroupType { return original.PossibleGroupTypeValues() } +func PossibleHTTPCorrelationProtocolValues() []HTTPCorrelationProtocol { + return original.PossibleHTTPCorrelationProtocolValues() +} func PossibleHostnameTypeValues() []HostnameType { return original.PossibleHostnameTypeValues() } @@ -1426,6 +1446,9 @@ func PossibleTemplateNameValues() []TemplateName { func PossibleUserStateValues() []UserState { return original.PossibleUserStateValues() } +func PossibleVerbosityValues() []Verbosity { + return original.PossibleVerbosityValues() +} func PossibleVersioningScheme1Values() []VersioningScheme1 { return original.PossibleVersioningScheme1Values() } diff --git a/profiles/preview/containerservice/mgmt/containerservice/containerserviceapi/models.go b/profiles/preview/containerservice/mgmt/containerservice/containerserviceapi/models.go index c764f39fdfa6..cf80a031fe85 100644 --- a/profiles/preview/containerservice/mgmt/containerservice/containerserviceapi/models.go +++ b/profiles/preview/containerservice/mgmt/containerservice/containerserviceapi/models.go @@ -19,7 +19,7 @@ package containerserviceapi -import original "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2019-11-01/containerservice/containerserviceapi" +import original "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-01-01/containerservice/containerserviceapi" type AgentPoolsClientAPI = original.AgentPoolsClientAPI type ContainerServicesClientAPI = original.ContainerServicesClientAPI diff --git a/profiles/preview/containerservice/mgmt/containerservice/models.go b/profiles/preview/containerservice/mgmt/containerservice/models.go index 7f8309ea87d4..35589822c33b 100644 --- a/profiles/preview/containerservice/mgmt/containerservice/models.go +++ b/profiles/preview/containerservice/mgmt/containerservice/models.go @@ -22,7 +22,7 @@ package containerservice import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2019-11-01/containerservice" + original "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-01-01/containerservice" ) const ( diff --git a/profiles/preview/cosmos-db/mgmt/documentdb/documentdbapi/models.go b/profiles/preview/cosmos-db/mgmt/documentdb/documentdbapi/models.go index 5c1e5ea9e492..086148a474fe 100644 --- a/profiles/preview/cosmos-db/mgmt/documentdb/documentdbapi/models.go +++ b/profiles/preview/cosmos-db/mgmt/documentdb/documentdbapi/models.go @@ -19,7 +19,7 @@ package documentdbapi -import original "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-08-01/documentdb/documentdbapi" +import original "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-12-12/documentdb/documentdbapi" type CassandraResourcesClientAPI = original.CassandraResourcesClientAPI type CollectionClientAPI = original.CollectionClientAPI @@ -37,5 +37,7 @@ type PartitionKeyRangeIDRegionClientAPI = original.PartitionKeyRangeIDRegionClie type PercentileClientAPI = original.PercentileClientAPI type PercentileSourceTargetClientAPI = original.PercentileSourceTargetClientAPI type PercentileTargetClientAPI = original.PercentileTargetClientAPI +type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI type SQLResourcesClientAPI = original.SQLResourcesClientAPI type TableResourcesClientAPI = original.TableResourcesClientAPI diff --git a/profiles/preview/cosmos-db/mgmt/documentdb/models.go b/profiles/preview/cosmos-db/mgmt/documentdb/models.go index fb92dedcac00..7598c011fad5 100644 --- a/profiles/preview/cosmos-db/mgmt/documentdb/models.go +++ b/profiles/preview/cosmos-db/mgmt/documentdb/models.go @@ -22,7 +22,7 @@ package documentdb import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-08-01/documentdb" + original "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-12-12/documentdb" ) const ( @@ -167,6 +167,7 @@ const ( type ARMProxyResource = original.ARMProxyResource type ARMResourceProperties = original.ARMResourceProperties +type AzureEntityResource = original.AzureEntityResource type BaseClient = original.BaseClient type Capability = original.Capability type CassandraKeyspaceCreateUpdateParameters = original.CassandraKeyspaceCreateUpdateParameters @@ -303,7 +304,21 @@ type PercentileMetricListResult = original.PercentileMetricListResult type PercentileMetricValue = original.PercentileMetricValue type PercentileSourceTargetClient = original.PercentileSourceTargetClient type PercentileTargetClient = original.PercentileTargetClient +type PrivateEndpointConnection = original.PrivateEndpointConnection +type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionListResult +type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient +type PrivateEndpointConnectionsCreateOrUpdateFuture = original.PrivateEndpointConnectionsCreateOrUpdateFuture +type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture +type PrivateEndpointProperty = original.PrivateEndpointProperty +type PrivateLinkResource = original.PrivateLinkResource +type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult +type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties +type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient +type PrivateLinkServiceConnectionStateProperty = original.PrivateLinkServiceConnectionStateProperty +type ProxyResource = original.ProxyResource type RegionForOnlineOffline = original.RegionForOnlineOffline +type Resource = original.Resource type SQLContainerCreateUpdateParameters = original.SQLContainerCreateUpdateParameters type SQLContainerCreateUpdateProperties = original.SQLContainerCreateUpdateProperties type SQLContainerGetProperties = original.SQLContainerGetProperties @@ -370,74 +385,75 @@ type ThroughputSettingsGetResults = original.ThroughputSettingsGetResults type ThroughputSettingsResource = original.ThroughputSettingsResource type ThroughputSettingsUpdateParameters = original.ThroughputSettingsUpdateParameters type ThroughputSettingsUpdateProperties = original.ThroughputSettingsUpdateProperties +type TrackedResource = original.TrackedResource type UniqueKey = original.UniqueKey type UniqueKeyPolicy = original.UniqueKeyPolicy type Usage = original.Usage type UsagesResult = original.UsagesResult type VirtualNetworkRule = original.VirtualNetworkRule -func New(subscriptionID string) BaseClient { - return original.New(subscriptionID) +func New(subscriptionID string, subscriptionID1 string) BaseClient { + return original.New(subscriptionID, subscriptionID1) } -func NewCassandraResourcesClient(subscriptionID string) CassandraResourcesClient { - return original.NewCassandraResourcesClient(subscriptionID) +func NewCassandraResourcesClient(subscriptionID string, subscriptionID1 string) CassandraResourcesClient { + return original.NewCassandraResourcesClient(subscriptionID, subscriptionID1) } -func NewCassandraResourcesClientWithBaseURI(baseURI string, subscriptionID string) CassandraResourcesClient { - return original.NewCassandraResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewCassandraResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CassandraResourcesClient { + return original.NewCassandraResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewCollectionClient(subscriptionID string) CollectionClient { - return original.NewCollectionClient(subscriptionID) +func NewCollectionClient(subscriptionID string, subscriptionID1 string) CollectionClient { + return original.NewCollectionClient(subscriptionID, subscriptionID1) } -func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string) CollectionClient { - return original.NewCollectionClientWithBaseURI(baseURI, subscriptionID) +func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionClient { + return original.NewCollectionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewCollectionPartitionClient(subscriptionID string) CollectionPartitionClient { - return original.NewCollectionPartitionClient(subscriptionID) +func NewCollectionPartitionClient(subscriptionID string, subscriptionID1 string) CollectionPartitionClient { + return original.NewCollectionPartitionClient(subscriptionID, subscriptionID1) } -func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string) CollectionPartitionClient { - return original.NewCollectionPartitionClientWithBaseURI(baseURI, subscriptionID) +func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionClient { + return original.NewCollectionPartitionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewCollectionPartitionRegionClient(subscriptionID string) CollectionPartitionRegionClient { - return original.NewCollectionPartitionRegionClient(subscriptionID) +func NewCollectionPartitionRegionClient(subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient { + return original.NewCollectionPartitionRegionClient(subscriptionID, subscriptionID1) } -func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string) CollectionPartitionRegionClient { - return original.NewCollectionPartitionRegionClientWithBaseURI(baseURI, subscriptionID) +func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient { + return original.NewCollectionPartitionRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewCollectionRegionClient(subscriptionID string) CollectionRegionClient { - return original.NewCollectionRegionClient(subscriptionID) +func NewCollectionRegionClient(subscriptionID string, subscriptionID1 string) CollectionRegionClient { + return original.NewCollectionRegionClient(subscriptionID, subscriptionID1) } -func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string) CollectionRegionClient { - return original.NewCollectionRegionClientWithBaseURI(baseURI, subscriptionID) +func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionRegionClient { + return original.NewCollectionRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewDatabaseAccountRegionClient(subscriptionID string) DatabaseAccountRegionClient { - return original.NewDatabaseAccountRegionClient(subscriptionID) +func NewDatabaseAccountRegionClient(subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient { + return original.NewDatabaseAccountRegionClient(subscriptionID, subscriptionID1) } -func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountRegionClient { - return original.NewDatabaseAccountRegionClientWithBaseURI(baseURI, subscriptionID) +func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient { + return original.NewDatabaseAccountRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewDatabaseAccountsClient(subscriptionID string) DatabaseAccountsClient { - return original.NewDatabaseAccountsClient(subscriptionID) +func NewDatabaseAccountsClient(subscriptionID string, subscriptionID1 string) DatabaseAccountsClient { + return original.NewDatabaseAccountsClient(subscriptionID, subscriptionID1) } -func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountsClient { - return original.NewDatabaseAccountsClientWithBaseURI(baseURI, subscriptionID) +func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountsClient { + return original.NewDatabaseAccountsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewDatabaseClient(subscriptionID string) DatabaseClient { - return original.NewDatabaseClient(subscriptionID) +func NewDatabaseClient(subscriptionID string, subscriptionID1 string) DatabaseClient { + return original.NewDatabaseClient(subscriptionID, subscriptionID1) } -func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string) DatabaseClient { - return original.NewDatabaseClientWithBaseURI(baseURI, subscriptionID) +func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseClient { + return original.NewDatabaseClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewGremlinResourcesClient(subscriptionID string) GremlinResourcesClient { - return original.NewGremlinResourcesClient(subscriptionID) +func NewGremlinResourcesClient(subscriptionID string, subscriptionID1 string) GremlinResourcesClient { + return original.NewGremlinResourcesClient(subscriptionID, subscriptionID1) } -func NewGremlinResourcesClientWithBaseURI(baseURI string, subscriptionID string) GremlinResourcesClient { - return original.NewGremlinResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewGremlinResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) GremlinResourcesClient { + return original.NewGremlinResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewMongoDBResourcesClient(subscriptionID string) MongoDBResourcesClient { - return original.NewMongoDBResourcesClient(subscriptionID) +func NewMongoDBResourcesClient(subscriptionID string, subscriptionID1 string) MongoDBResourcesClient { + return original.NewMongoDBResourcesClient(subscriptionID, subscriptionID1) } -func NewMongoDBResourcesClientWithBaseURI(baseURI string, subscriptionID string) MongoDBResourcesClient { - return original.NewMongoDBResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewMongoDBResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) MongoDBResourcesClient { + return original.NewMongoDBResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { return original.NewOperationListResultIterator(page) @@ -445,56 +461,68 @@ func NewOperationListResultIterator(page OperationListResultPage) OperationListR func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { return original.NewOperationListResultPage(getNextPage) } -func NewOperationsClient(subscriptionID string) OperationsClient { - return original.NewOperationsClient(subscriptionID) +func NewOperationsClient(subscriptionID string, subscriptionID1 string) OperationsClient { + return original.NewOperationsClient(subscriptionID, subscriptionID1) } -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPartitionKeyRangeIDClient(subscriptionID string) PartitionKeyRangeIDClient { - return original.NewPartitionKeyRangeIDClient(subscriptionID) +func NewPartitionKeyRangeIDClient(subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient { + return original.NewPartitionKeyRangeIDClient(subscriptionID, subscriptionID1) } -func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string) PartitionKeyRangeIDClient { - return original.NewPartitionKeyRangeIDClientWithBaseURI(baseURI, subscriptionID) +func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient { + return original.NewPartitionKeyRangeIDClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPartitionKeyRangeIDRegionClient(subscriptionID string) PartitionKeyRangeIDRegionClient { - return original.NewPartitionKeyRangeIDRegionClient(subscriptionID) +func NewPartitionKeyRangeIDRegionClient(subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient { + return original.NewPartitionKeyRangeIDRegionClient(subscriptionID, subscriptionID1) } -func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string) PartitionKeyRangeIDRegionClient { - return original.NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI, subscriptionID) +func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient { + return original.NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPercentileClient(subscriptionID string) PercentileClient { - return original.NewPercentileClient(subscriptionID) +func NewPercentileClient(subscriptionID string, subscriptionID1 string) PercentileClient { + return original.NewPercentileClient(subscriptionID, subscriptionID1) } -func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string) PercentileClient { - return original.NewPercentileClientWithBaseURI(baseURI, subscriptionID) +func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileClient { + return original.NewPercentileClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPercentileSourceTargetClient(subscriptionID string) PercentileSourceTargetClient { - return original.NewPercentileSourceTargetClient(subscriptionID) +func NewPercentileSourceTargetClient(subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient { + return original.NewPercentileSourceTargetClient(subscriptionID, subscriptionID1) } -func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string) PercentileSourceTargetClient { - return original.NewPercentileSourceTargetClientWithBaseURI(baseURI, subscriptionID) +func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient { + return original.NewPercentileSourceTargetClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewPercentileTargetClient(subscriptionID string) PercentileTargetClient { - return original.NewPercentileTargetClient(subscriptionID) +func NewPercentileTargetClient(subscriptionID string, subscriptionID1 string) PercentileTargetClient { + return original.NewPercentileTargetClient(subscriptionID, subscriptionID1) } -func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string) PercentileTargetClient { - return original.NewPercentileTargetClientWithBaseURI(baseURI, subscriptionID) +func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileTargetClient { + return original.NewPercentileTargetClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewSQLResourcesClient(subscriptionID string) SQLResourcesClient { - return original.NewSQLResourcesClient(subscriptionID) +func NewPrivateEndpointConnectionsClient(subscriptionID string, subscriptionID1 string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClient(subscriptionID, subscriptionID1) } -func NewSQLResourcesClientWithBaseURI(baseURI string, subscriptionID string) SQLResourcesClient { - return original.NewSQLResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewTableResourcesClient(subscriptionID string) TableResourcesClient { - return original.NewTableResourcesClient(subscriptionID) +func NewPrivateLinkResourcesClient(subscriptionID string, subscriptionID1 string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClient(subscriptionID, subscriptionID1) } -func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string) TableResourcesClient { - return original.NewTableResourcesClientWithBaseURI(baseURI, subscriptionID) +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return original.NewWithBaseURI(baseURI, subscriptionID) +func NewSQLResourcesClient(subscriptionID string, subscriptionID1 string) SQLResourcesClient { + return original.NewSQLResourcesClient(subscriptionID, subscriptionID1) +} +func NewSQLResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) SQLResourcesClient { + return original.NewSQLResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) +} +func NewTableResourcesClient(subscriptionID string, subscriptionID1 string) TableResourcesClient { + return original.NewTableResourcesClient(subscriptionID, subscriptionID1) +} +func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) TableResourcesClient { + return original.NewTableResourcesClientWithBaseURI(baseURI, subscriptionID, subscriptionID1) +} +func NewWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) BaseClient { + return original.NewWithBaseURI(baseURI, subscriptionID, subscriptionID1) } func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { return original.PossibleCompositePathSortOrderValues() diff --git a/profiles/preview/frontdoor/mgmt/frontdoor/frontdoorapi/models.go b/profiles/preview/frontdoor/mgmt/frontdoor/frontdoorapi/models.go index 8116b4b93fa1..ff5e9e8fcb8a 100644 --- a/profiles/preview/frontdoor/mgmt/frontdoor/frontdoorapi/models.go +++ b/profiles/preview/frontdoor/mgmt/frontdoor/frontdoorapi/models.go @@ -19,7 +19,7 @@ package frontdoorapi -import original "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-11-01/frontdoor/frontdoorapi" +import original "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2020-01-01/frontdoor/frontdoorapi" type BaseClientAPI = original.BaseClientAPI type EndpointsClientAPI = original.EndpointsClientAPI @@ -31,3 +31,4 @@ type NetworkExperimentProfilesClientAPI = original.NetworkExperimentProfilesClie type PoliciesClientAPI = original.PoliciesClientAPI type PreconfiguredEndpointsClientAPI = original.PreconfiguredEndpointsClientAPI type ReportsClientAPI = original.ReportsClientAPI +type RulesEnginesClientAPI = original.RulesEnginesClientAPI diff --git a/profiles/preview/frontdoor/mgmt/frontdoor/models.go b/profiles/preview/frontdoor/mgmt/frontdoor/models.go index 6cee00fa88fd..79c1ea17aa3b 100644 --- a/profiles/preview/frontdoor/mgmt/frontdoor/models.go +++ b/profiles/preview/frontdoor/mgmt/frontdoor/models.go @@ -22,7 +22,7 @@ package frontdoor import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2019-11-01/frontdoor" + original "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2020-01-01/frontdoor" ) const ( @@ -142,6 +142,14 @@ const ( MatchRequest ForwardingProtocol = original.MatchRequest ) +type HeaderActionType = original.HeaderActionType + +const ( + Append HeaderActionType = original.Append + Delete HeaderActionType = original.Delete + Overwrite HeaderActionType = original.Overwrite +) + type HealthProbeEnabled = original.HealthProbeEnabled const ( @@ -190,6 +198,13 @@ const ( StartsWith ManagedRuleExclusionSelectorMatchOperator = original.StartsWith ) +type MatchProcessingBehavior = original.MatchProcessingBehavior + +const ( + Continue MatchProcessingBehavior = original.Continue + Stop MatchProcessingBehavior = original.Stop +) + type MatchVariable = original.MatchVariable const ( @@ -343,6 +358,39 @@ const ( RateLimitRule RuleType = original.RateLimitRule ) +type RulesEngineMatchVariable = original.RulesEngineMatchVariable + +const ( + RulesEngineMatchVariableIsMobile RulesEngineMatchVariable = original.RulesEngineMatchVariableIsMobile + RulesEngineMatchVariablePostArgs RulesEngineMatchVariable = original.RulesEngineMatchVariablePostArgs + RulesEngineMatchVariableQueryString RulesEngineMatchVariable = original.RulesEngineMatchVariableQueryString + RulesEngineMatchVariableRemoteAddr RulesEngineMatchVariable = original.RulesEngineMatchVariableRemoteAddr + RulesEngineMatchVariableRequestBody RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestBody + RulesEngineMatchVariableRequestFilename RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestFilename + RulesEngineMatchVariableRequestFilenameExtension RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestFilenameExtension + RulesEngineMatchVariableRequestHeader RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestHeader + RulesEngineMatchVariableRequestMethod RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestMethod + RulesEngineMatchVariableRequestPath RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestPath + RulesEngineMatchVariableRequestScheme RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestScheme + RulesEngineMatchVariableRequestURI RulesEngineMatchVariable = original.RulesEngineMatchVariableRequestURI +) + +type RulesEngineOperator = original.RulesEngineOperator + +const ( + RulesEngineOperatorAny RulesEngineOperator = original.RulesEngineOperatorAny + RulesEngineOperatorBeginsWith RulesEngineOperator = original.RulesEngineOperatorBeginsWith + RulesEngineOperatorContains RulesEngineOperator = original.RulesEngineOperatorContains + RulesEngineOperatorEndsWith RulesEngineOperator = original.RulesEngineOperatorEndsWith + RulesEngineOperatorEqual RulesEngineOperator = original.RulesEngineOperatorEqual + RulesEngineOperatorGeoMatch RulesEngineOperator = original.RulesEngineOperatorGeoMatch + RulesEngineOperatorGreaterThan RulesEngineOperator = original.RulesEngineOperatorGreaterThan + RulesEngineOperatorGreaterThanOrEqual RulesEngineOperator = original.RulesEngineOperatorGreaterThanOrEqual + RulesEngineOperatorIPMatch RulesEngineOperator = original.RulesEngineOperatorIPMatch + RulesEngineOperatorLessThan RulesEngineOperator = original.RulesEngineOperatorLessThan + RulesEngineOperatorLessThanOrEqual RulesEngineOperator = original.RulesEngineOperatorLessThanOrEqual +) + type SessionAffinityEnabledState = original.SessionAffinityEnabledState const ( @@ -373,15 +421,26 @@ const ( MeasurementCounts TimeseriesType = original.MeasurementCounts ) +type Transform = original.Transform + +const ( + Lowercase Transform = original.Lowercase + RemoveNulls Transform = original.RemoveNulls + Trim Transform = original.Trim + Uppercase Transform = original.Uppercase + URLDecode Transform = original.URLDecode + URLEncode Transform = original.URLEncode +) + type TransformType = original.TransformType const ( - Lowercase TransformType = original.Lowercase - RemoveNulls TransformType = original.RemoveNulls - Trim TransformType = original.Trim - Uppercase TransformType = original.Uppercase - URLDecode TransformType = original.URLDecode - URLEncode TransformType = original.URLEncode + TransformTypeLowercase TransformType = original.TransformTypeLowercase + TransformTypeRemoveNulls TransformType = original.TransformTypeRemoveNulls + TransformTypeTrim TransformType = original.TransformTypeTrim + TransformTypeUppercase TransformType = original.TransformTypeUppercase + TransformTypeURLDecode TransformType = original.TransformTypeURLDecode + TransformTypeURLEncode TransformType = original.TransformTypeURLEncode ) type AzureAsyncOperationResult = original.AzureAsyncOperationResult @@ -433,6 +492,7 @@ type FrontendEndpointsEnableHTTPSFuture = original.FrontendEndpointsEnableHTTPSF type FrontendEndpointsListResult = original.FrontendEndpointsListResult type FrontendEndpointsListResultIterator = original.FrontendEndpointsListResultIterator type FrontendEndpointsListResultPage = original.FrontendEndpointsListResultPage +type HeaderAction = original.HeaderAction type HealthProbeSettingsListResult = original.HealthProbeSettingsListResult type HealthProbeSettingsModel = original.HealthProbeSettingsModel type HealthProbeSettingsProperties = original.HealthProbeSettingsProperties @@ -494,6 +554,18 @@ type RoutingRule = original.RoutingRule type RoutingRuleListResult = original.RoutingRuleListResult type RoutingRuleProperties = original.RoutingRuleProperties type RoutingRuleUpdateParameters = original.RoutingRuleUpdateParameters +type RulesEngine = original.RulesEngine +type RulesEngineAction = original.RulesEngineAction +type RulesEngineListResult = original.RulesEngineListResult +type RulesEngineListResultIterator = original.RulesEngineListResultIterator +type RulesEngineListResultPage = original.RulesEngineListResultPage +type RulesEngineMatchCondition = original.RulesEngineMatchCondition +type RulesEngineProperties = original.RulesEngineProperties +type RulesEngineRule = original.RulesEngineRule +type RulesEngineUpdateParameters = original.RulesEngineUpdateParameters +type RulesEnginesClient = original.RulesEnginesClient +type RulesEnginesCreateOrUpdateFuture = original.RulesEnginesCreateOrUpdateFuture +type RulesEnginesDeleteFuture = original.RulesEnginesDeleteFuture type SubResource = original.SubResource type TagsObject = original.TagsObject type Timeseries = original.Timeseries @@ -601,6 +673,18 @@ func NewReportsClient(subscriptionID string) ReportsClient { func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return original.NewReportsClientWithBaseURI(baseURI, subscriptionID) } +func NewRulesEngineListResultIterator(page RulesEngineListResultPage) RulesEngineListResultIterator { + return original.NewRulesEngineListResultIterator(page) +} +func NewRulesEngineListResultPage(getNextPage func(context.Context, RulesEngineListResult) (RulesEngineListResult, error)) RulesEngineListResultPage { + return original.NewRulesEngineListResultPage(getNextPage) +} +func NewRulesEnginesClient(subscriptionID string) RulesEnginesClient { + return original.NewRulesEnginesClient(subscriptionID) +} +func NewRulesEnginesClientWithBaseURI(baseURI string, subscriptionID string) RulesEnginesClient { + return original.NewRulesEnginesClientWithBaseURI(baseURI, subscriptionID) +} func NewWebApplicationFirewallPolicyListIterator(page WebApplicationFirewallPolicyListPage) WebApplicationFirewallPolicyListIterator { return original.NewWebApplicationFirewallPolicyListIterator(page) } @@ -652,6 +736,9 @@ func PossibleEnforceCertificateNameCheckEnabledStateValues() []EnforceCertificat func PossibleForwardingProtocolValues() []ForwardingProtocol { return original.PossibleForwardingProtocolValues() } +func PossibleHeaderActionTypeValues() []HeaderActionType { + return original.PossibleHeaderActionTypeValues() +} func PossibleHealthProbeEnabledValues() []HealthProbeEnabled { return original.PossibleHealthProbeEnabledValues() } @@ -670,6 +757,9 @@ func PossibleManagedRuleExclusionMatchVariableValues() []ManagedRuleExclusionMat func PossibleManagedRuleExclusionSelectorMatchOperatorValues() []ManagedRuleExclusionSelectorMatchOperator { return original.PossibleManagedRuleExclusionSelectorMatchOperatorValues() } +func PossibleMatchProcessingBehaviorValues() []MatchProcessingBehavior { + return original.PossibleMatchProcessingBehaviorValues() +} func PossibleMatchVariableValues() []MatchVariable { return original.PossibleMatchVariableValues() } @@ -721,6 +811,12 @@ func PossibleRoutingRuleEnabledStateValues() []RoutingRuleEnabledState { func PossibleRuleTypeValues() []RuleType { return original.PossibleRuleTypeValues() } +func PossibleRulesEngineMatchVariableValues() []RulesEngineMatchVariable { + return original.PossibleRulesEngineMatchVariableValues() +} +func PossibleRulesEngineOperatorValues() []RulesEngineOperator { + return original.PossibleRulesEngineOperatorValues() +} func PossibleSessionAffinityEnabledStateValues() []SessionAffinityEnabledState { return original.PossibleSessionAffinityEnabledStateValues() } @@ -736,6 +832,9 @@ func PossibleTimeseriesTypeValues() []TimeseriesType { func PossibleTransformTypeValues() []TransformType { return original.PossibleTransformTypeValues() } +func PossibleTransformValues() []Transform { + return original.PossibleTransformValues() +} func UserAgent() string { return original.UserAgent() + " profiles/preview" } diff --git a/profiles/preview/healthcareapis/mgmt/healthcareapis/models.go b/profiles/preview/healthcareapis/mgmt/healthcareapis/models.go index 0085031dbb0d..f701f2c911b3 100644 --- a/profiles/preview/healthcareapis/mgmt/healthcareapis/models.go +++ b/profiles/preview/healthcareapis/mgmt/healthcareapis/models.go @@ -37,6 +37,13 @@ const ( FhirStu3 Kind = original.FhirStu3 ) +type ManagedServiceIdentityType = original.ManagedServiceIdentityType + +const ( + None ManagedServiceIdentityType = original.None + SystemAssigned ManagedServiceIdentityType = original.SystemAssigned +) + type OperationResultStatus = original.OperationResultStatus const ( @@ -81,6 +88,7 @@ type OperationResultsClient = original.OperationResultsClient type OperationResultsDescription = original.OperationResultsDescription type OperationsClient = original.OperationsClient type Resource = original.Resource +type ResourceIdentity = original.ResourceIdentity type ServiceAccessPolicyEntry = original.ServiceAccessPolicyEntry type ServiceAuthenticationConfigurationInfo = original.ServiceAuthenticationConfigurationInfo type ServiceCorsConfigurationInfo = original.ServiceCorsConfigurationInfo @@ -137,6 +145,9 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleKindValues() []Kind { return original.PossibleKindValues() } +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return original.PossibleManagedServiceIdentityTypeValues() +} func PossibleOperationResultStatusValues() []OperationResultStatus { return original.PossibleOperationResultStatusValues() } diff --git a/profiles/preview/keyvault/mgmt/keyvault/keyvaultapi/models.go b/profiles/preview/keyvault/mgmt/keyvault/keyvaultapi/models.go index 0a95fba8c4e0..c7bfa592b745 100644 --- a/profiles/preview/keyvault/mgmt/keyvault/keyvaultapi/models.go +++ b/profiles/preview/keyvault/mgmt/keyvault/keyvaultapi/models.go @@ -22,4 +22,6 @@ package keyvaultapi import original "github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/keyvaultapi" type OperationsClientAPI = original.OperationsClientAPI +type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI type VaultsClientAPI = original.VaultsClientAPI diff --git a/profiles/preview/keyvault/mgmt/keyvault/models.go b/profiles/preview/keyvault/mgmt/keyvault/models.go index 49f8f9963851..451ccd6392e2 100644 --- a/profiles/preview/keyvault/mgmt/keyvault/models.go +++ b/profiles/preview/keyvault/mgmt/keyvault/models.go @@ -100,6 +100,26 @@ const ( None NetworkRuleBypassOptions = original.None ) +type PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningState + +const ( + Creating PrivateEndpointConnectionProvisioningState = original.Creating + Deleting PrivateEndpointConnectionProvisioningState = original.Deleting + Disconnected PrivateEndpointConnectionProvisioningState = original.Disconnected + Failed PrivateEndpointConnectionProvisioningState = original.Failed + Succeeded PrivateEndpointConnectionProvisioningState = original.Succeeded + Updating PrivateEndpointConnectionProvisioningState = original.Updating +) + +type PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatus + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatusApproved + PrivateEndpointServiceConnectionStatusDisconnected PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatusDisconnected + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatusPending + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatusRejected +) + type Reason = original.Reason const ( @@ -149,6 +169,8 @@ const ( type AccessPolicyEntry = original.AccessPolicyEntry type BaseClient = original.BaseClient type CheckNameAvailabilityResult = original.CheckNameAvailabilityResult +type CloudError = original.CloudError +type CloudErrorBody = original.CloudErrorBody type DeletedVault = original.DeletedVault type DeletedVaultListResult = original.DeletedVaultListResult type DeletedVaultListResultIterator = original.DeletedVaultListResultIterator @@ -165,6 +187,17 @@ type OperationListResultPage = original.OperationListResultPage type OperationProperties = original.OperationProperties type OperationsClient = original.OperationsClient type Permissions = original.Permissions +type PrivateEndpoint = original.PrivateEndpoint +type PrivateEndpointConnection = original.PrivateEndpointConnection +type PrivateEndpointConnectionItem = original.PrivateEndpointConnectionItem +type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient +type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture +type PrivateLinkResource = original.PrivateLinkResource +type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult +type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties +type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient +type PrivateLinkServiceConnectionState = original.PrivateLinkServiceConnectionState type Resource = original.Resource type ResourceListResult = original.ResourceListResult type ResourceListResultIterator = original.ResourceListResultIterator @@ -208,6 +241,18 @@ func NewOperationsClient(subscriptionID string) OperationsClient { func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) } +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClient(subscriptionID) +} +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID) +} +func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClient(subscriptionID) +} +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID) +} func NewResourceListResultIterator(page ResourceListResultPage) ResourceListResultIterator { return original.NewResourceListResultIterator(page) } @@ -247,6 +292,12 @@ func PossibleNetworkRuleActionValues() []NetworkRuleAction { func PossibleNetworkRuleBypassOptionsValues() []NetworkRuleBypassOptions { return original.PossibleNetworkRuleBypassOptionsValues() } +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return original.PossiblePrivateEndpointConnectionProvisioningStateValues() +} +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return original.PossiblePrivateEndpointServiceConnectionStatusValues() +} func PossibleReasonValues() []Reason { return original.PossibleReasonValues() } diff --git a/profiles/preview/kusto/mgmt/kusto/kustoapi/models.go b/profiles/preview/kusto/mgmt/kusto/kustoapi/models.go index ba0fab33b0d2..8925643e047c 100644 --- a/profiles/preview/kusto/mgmt/kusto/kustoapi/models.go +++ b/profiles/preview/kusto/mgmt/kusto/kustoapi/models.go @@ -19,10 +19,12 @@ package kustoapi -import original "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-09-07/kusto/kustoapi" +import original "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-11-09/kusto/kustoapi" type AttachedDatabaseConfigurationsClientAPI = original.AttachedDatabaseConfigurationsClientAPI +type ClusterPrincipalAssignmentsClientAPI = original.ClusterPrincipalAssignmentsClientAPI type ClustersClientAPI = original.ClustersClientAPI type DataConnectionsClientAPI = original.DataConnectionsClientAPI +type DatabasePrincipalAssignmentsClientAPI = original.DatabasePrincipalAssignmentsClientAPI type DatabasesClientAPI = original.DatabasesClientAPI type OperationsClientAPI = original.OperationsClientAPI diff --git a/profiles/preview/kusto/mgmt/kusto/models.go b/profiles/preview/kusto/mgmt/kusto/models.go index 1d5d5d1787c5..3a4babf4729c 100644 --- a/profiles/preview/kusto/mgmt/kusto/models.go +++ b/profiles/preview/kusto/mgmt/kusto/models.go @@ -22,7 +22,7 @@ package kusto import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-09-07/kusto" + original "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-11-09/kusto" ) const ( @@ -61,21 +61,18 @@ const ( Standard AzureSkuTier = original.Standard ) -type DataFormat = original.DataFormat +type ClusterPrincipalRole = original.ClusterPrincipalRole const ( - AVRO DataFormat = original.AVRO - CSV DataFormat = original.CSV - JSON DataFormat = original.JSON - MULTIJSON DataFormat = original.MULTIJSON - PSV DataFormat = original.PSV - RAW DataFormat = original.RAW - SCSV DataFormat = original.SCSV - SINGLEJSON DataFormat = original.SINGLEJSON - SOHSV DataFormat = original.SOHSV - TSV DataFormat = original.TSV - TSVE DataFormat = original.TSVE - TXT DataFormat = original.TXT + AllDatabasesAdmin ClusterPrincipalRole = original.AllDatabasesAdmin + AllDatabasesViewer ClusterPrincipalRole = original.AllDatabasesViewer +) + +type Compression = original.Compression + +const ( + CompressionGZip Compression = original.CompressionGZip + CompressionNone Compression = original.CompressionNone ) type DatabasePrincipalRole = original.DatabasePrincipalRole @@ -105,6 +102,44 @@ const ( DefaultPrincipalsModificationKindUnion DefaultPrincipalsModificationKind = original.DefaultPrincipalsModificationKindUnion ) +type EventGridDataFormat = original.EventGridDataFormat + +const ( + AVRO EventGridDataFormat = original.AVRO + CSV EventGridDataFormat = original.CSV + JSON EventGridDataFormat = original.JSON + MULTIJSON EventGridDataFormat = original.MULTIJSON + ORC EventGridDataFormat = original.ORC + PARQUET EventGridDataFormat = original.PARQUET + PSV EventGridDataFormat = original.PSV + RAW EventGridDataFormat = original.RAW + SCSV EventGridDataFormat = original.SCSV + SINGLEJSON EventGridDataFormat = original.SINGLEJSON + SOHSV EventGridDataFormat = original.SOHSV + TSV EventGridDataFormat = original.TSV + TSVE EventGridDataFormat = original.TSVE + TXT EventGridDataFormat = original.TXT +) + +type EventHubDataFormat = original.EventHubDataFormat + +const ( + EventHubDataFormatAVRO EventHubDataFormat = original.EventHubDataFormatAVRO + EventHubDataFormatCSV EventHubDataFormat = original.EventHubDataFormatCSV + EventHubDataFormatJSON EventHubDataFormat = original.EventHubDataFormatJSON + EventHubDataFormatMULTIJSON EventHubDataFormat = original.EventHubDataFormatMULTIJSON + EventHubDataFormatORC EventHubDataFormat = original.EventHubDataFormatORC + EventHubDataFormatPARQUET EventHubDataFormat = original.EventHubDataFormatPARQUET + EventHubDataFormatPSV EventHubDataFormat = original.EventHubDataFormatPSV + EventHubDataFormatRAW EventHubDataFormat = original.EventHubDataFormatRAW + EventHubDataFormatSCSV EventHubDataFormat = original.EventHubDataFormatSCSV + EventHubDataFormatSINGLEJSON EventHubDataFormat = original.EventHubDataFormatSINGLEJSON + EventHubDataFormatSOHSV EventHubDataFormat = original.EventHubDataFormatSOHSV + EventHubDataFormatTSV EventHubDataFormat = original.EventHubDataFormatTSV + EventHubDataFormatTSVE EventHubDataFormat = original.EventHubDataFormatTSVE + EventHubDataFormatTXT EventHubDataFormat = original.EventHubDataFormatTXT +) + type IdentityType = original.IdentityType const ( @@ -112,6 +147,25 @@ const ( IdentityTypeSystemAssigned IdentityType = original.IdentityTypeSystemAssigned ) +type IotHubDataFormat = original.IotHubDataFormat + +const ( + IotHubDataFormatAVRO IotHubDataFormat = original.IotHubDataFormatAVRO + IotHubDataFormatCSV IotHubDataFormat = original.IotHubDataFormatCSV + IotHubDataFormatJSON IotHubDataFormat = original.IotHubDataFormatJSON + IotHubDataFormatMULTIJSON IotHubDataFormat = original.IotHubDataFormatMULTIJSON + IotHubDataFormatORC IotHubDataFormat = original.IotHubDataFormatORC + IotHubDataFormatPARQUET IotHubDataFormat = original.IotHubDataFormatPARQUET + IotHubDataFormatPSV IotHubDataFormat = original.IotHubDataFormatPSV + IotHubDataFormatRAW IotHubDataFormat = original.IotHubDataFormatRAW + IotHubDataFormatSCSV IotHubDataFormat = original.IotHubDataFormatSCSV + IotHubDataFormatSINGLEJSON IotHubDataFormat = original.IotHubDataFormatSINGLEJSON + IotHubDataFormatSOHSV IotHubDataFormat = original.IotHubDataFormatSOHSV + IotHubDataFormatTSV IotHubDataFormat = original.IotHubDataFormatTSV + IotHubDataFormatTSVE IotHubDataFormat = original.IotHubDataFormatTSVE + IotHubDataFormatTXT IotHubDataFormat = original.IotHubDataFormatTXT +) + type Kind = original.Kind const ( @@ -129,6 +183,14 @@ const ( KindIotHub KindBasicDataConnection = original.KindIotHub ) +type PrincipalType = original.PrincipalType + +const ( + PrincipalTypeApp PrincipalType = original.PrincipalTypeApp + PrincipalTypeGroup PrincipalType = original.PrincipalTypeGroup + PrincipalTypeUser PrincipalType = original.PrincipalTypeUser +) + type PrincipalsModificationKind = original.PrincipalsModificationKind const ( @@ -196,12 +258,20 @@ type CloudErrorBody = original.CloudErrorBody type Cluster = original.Cluster type ClusterCheckNameRequest = original.ClusterCheckNameRequest type ClusterListResult = original.ClusterListResult +type ClusterPrincipalAssignment = original.ClusterPrincipalAssignment +type ClusterPrincipalAssignmentCheckNameRequest = original.ClusterPrincipalAssignmentCheckNameRequest +type ClusterPrincipalAssignmentListResult = original.ClusterPrincipalAssignmentListResult +type ClusterPrincipalAssignmentsClient = original.ClusterPrincipalAssignmentsClient +type ClusterPrincipalAssignmentsCreateOrUpdateFuture = original.ClusterPrincipalAssignmentsCreateOrUpdateFuture +type ClusterPrincipalAssignmentsDeleteFuture = original.ClusterPrincipalAssignmentsDeleteFuture +type ClusterPrincipalProperties = original.ClusterPrincipalProperties type ClusterProperties = original.ClusterProperties type ClusterUpdate = original.ClusterUpdate type ClustersClient = original.ClustersClient type ClustersCreateOrUpdateFuture = original.ClustersCreateOrUpdateFuture type ClustersDeleteFuture = original.ClustersDeleteFuture type ClustersDetachFollowerDatabasesFuture = original.ClustersDetachFollowerDatabasesFuture +type ClustersDiagnoseVirtualNetworkFuture = original.ClustersDiagnoseVirtualNetworkFuture type ClustersStartFuture = original.ClustersStartFuture type ClustersStopFuture = original.ClustersStopFuture type ClustersUpdateFuture = original.ClustersUpdateFuture @@ -220,13 +290,21 @@ type Database = original.Database type DatabaseListResult = original.DatabaseListResult type DatabaseModel = original.DatabaseModel type DatabasePrincipal = original.DatabasePrincipal +type DatabasePrincipalAssignment = original.DatabasePrincipalAssignment +type DatabasePrincipalAssignmentCheckNameRequest = original.DatabasePrincipalAssignmentCheckNameRequest +type DatabasePrincipalAssignmentListResult = original.DatabasePrincipalAssignmentListResult +type DatabasePrincipalAssignmentsClient = original.DatabasePrincipalAssignmentsClient +type DatabasePrincipalAssignmentsCreateOrUpdateFuture = original.DatabasePrincipalAssignmentsCreateOrUpdateFuture +type DatabasePrincipalAssignmentsDeleteFuture = original.DatabasePrincipalAssignmentsDeleteFuture type DatabasePrincipalListRequest = original.DatabasePrincipalListRequest type DatabasePrincipalListResult = original.DatabasePrincipalListResult +type DatabasePrincipalProperties = original.DatabasePrincipalProperties type DatabaseStatistics = original.DatabaseStatistics type DatabasesClient = original.DatabasesClient type DatabasesCreateOrUpdateFuture = original.DatabasesCreateOrUpdateFuture type DatabasesDeleteFuture = original.DatabasesDeleteFuture type DatabasesUpdateFuture = original.DatabasesUpdateFuture +type DiagnoseVirtualNetworkResult = original.DiagnoseVirtualNetworkResult type EventGridConnectionProperties = original.EventGridConnectionProperties type EventGridDataConnection = original.EventGridDataConnection type EventHubConnectionProperties = original.EventHubConnectionProperties @@ -268,6 +346,12 @@ func NewAttachedDatabaseConfigurationsClient(subscriptionID string) AttachedData func NewAttachedDatabaseConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) AttachedDatabaseConfigurationsClient { return original.NewAttachedDatabaseConfigurationsClientWithBaseURI(baseURI, subscriptionID) } +func NewClusterPrincipalAssignmentsClient(subscriptionID string) ClusterPrincipalAssignmentsClient { + return original.NewClusterPrincipalAssignmentsClient(subscriptionID) +} +func NewClusterPrincipalAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) ClusterPrincipalAssignmentsClient { + return original.NewClusterPrincipalAssignmentsClientWithBaseURI(baseURI, subscriptionID) +} func NewClustersClient(subscriptionID string) ClustersClient { return original.NewClustersClient(subscriptionID) } @@ -280,6 +364,12 @@ func NewDataConnectionsClient(subscriptionID string) DataConnectionsClient { func NewDataConnectionsClientWithBaseURI(baseURI string, subscriptionID string) DataConnectionsClient { return original.NewDataConnectionsClientWithBaseURI(baseURI, subscriptionID) } +func NewDatabasePrincipalAssignmentsClient(subscriptionID string) DatabasePrincipalAssignmentsClient { + return original.NewDatabasePrincipalAssignmentsClient(subscriptionID) +} +func NewDatabasePrincipalAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) DatabasePrincipalAssignmentsClient { + return original.NewDatabasePrincipalAssignmentsClientWithBaseURI(baseURI, subscriptionID) +} func NewDatabasesClient(subscriptionID string) DatabasesClient { return original.NewDatabasesClient(subscriptionID) } @@ -310,8 +400,11 @@ func PossibleAzureSkuNameValues() []AzureSkuName { func PossibleAzureSkuTierValues() []AzureSkuTier { return original.PossibleAzureSkuTierValues() } -func PossibleDataFormatValues() []DataFormat { - return original.PossibleDataFormatValues() +func PossibleClusterPrincipalRoleValues() []ClusterPrincipalRole { + return original.PossibleClusterPrincipalRoleValues() +} +func PossibleCompressionValues() []Compression { + return original.PossibleCompressionValues() } func PossibleDatabasePrincipalRoleValues() []DatabasePrincipalRole { return original.PossibleDatabasePrincipalRoleValues() @@ -322,15 +415,27 @@ func PossibleDatabasePrincipalTypeValues() []DatabasePrincipalType { func PossibleDefaultPrincipalsModificationKindValues() []DefaultPrincipalsModificationKind { return original.PossibleDefaultPrincipalsModificationKindValues() } +func PossibleEventGridDataFormatValues() []EventGridDataFormat { + return original.PossibleEventGridDataFormatValues() +} +func PossibleEventHubDataFormatValues() []EventHubDataFormat { + return original.PossibleEventHubDataFormatValues() +} func PossibleIdentityTypeValues() []IdentityType { return original.PossibleIdentityTypeValues() } +func PossibleIotHubDataFormatValues() []IotHubDataFormat { + return original.PossibleIotHubDataFormatValues() +} func PossibleKindBasicDataConnectionValues() []KindBasicDataConnection { return original.PossibleKindBasicDataConnectionValues() } func PossibleKindValues() []Kind { return original.PossibleKindValues() } +func PossiblePrincipalTypeValues() []PrincipalType { + return original.PossiblePrincipalTypeValues() +} func PossiblePrincipalsModificationKindValues() []PrincipalsModificationKind { return original.PossiblePrincipalsModificationKindValues() } diff --git a/profiles/preview/machinelearningservices/mgmt/machinelearningservices/models.go b/profiles/preview/machinelearningservices/mgmt/machinelearningservices/models.go index dd2322bf6db7..bb798c7ff79a 100644 --- a/profiles/preview/machinelearningservices/mgmt/machinelearningservices/models.go +++ b/profiles/preview/machinelearningservices/mgmt/machinelearningservices/models.go @@ -77,6 +77,13 @@ const ( ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ComputeTypeBasicComputeSecrets = original.ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ) +type EncryptionStatus = original.EncryptionStatus + +const ( + Disabled EncryptionStatus = original.Disabled + Enabled EncryptionStatus = original.Enabled +) + type NodeState = original.NodeState const ( @@ -161,8 +168,8 @@ const ( type Status1 = original.Status1 const ( - Disabled Status1 = original.Disabled - Enabled Status1 = original.Enabled + Status1Disabled Status1 = original.Status1Disabled + Status1Enabled Status1 = original.Status1Enabled ) type UnderlyingResourceAction = original.UnderlyingResourceAction @@ -211,12 +218,14 @@ type DataLakeAnalyticsProperties = original.DataLakeAnalyticsProperties type Databricks = original.Databricks type DatabricksComputeSecrets = original.DatabricksComputeSecrets type DatabricksProperties = original.DatabricksProperties +type EncryptionProperty = original.EncryptionProperty type Error = original.Error type ErrorDetail = original.ErrorDetail type ErrorResponse = original.ErrorResponse type HDInsight = original.HDInsight type HDInsightProperties = original.HDInsightProperties type Identity = original.Identity +type KeyVaultProperties = original.KeyVaultProperties type ListAmlUserFeatureResult = original.ListAmlUserFeatureResult type ListAmlUserFeatureResultIterator = original.ListAmlUserFeatureResultIterator type ListAmlUserFeatureResultPage = original.ListAmlUserFeatureResultPage @@ -292,6 +301,7 @@ type WorkspacePropertiesUpdateParameters = original.WorkspacePropertiesUpdatePar type WorkspaceSku = original.WorkspaceSku type WorkspaceUpdateParameters = original.WorkspaceUpdateParameters type WorkspacesClient = original.WorkspacesClient +type WorkspacesCreateOrUpdateFuture = original.WorkspacesCreateOrUpdateFuture func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -404,6 +414,9 @@ func PossibleComputeTypeBasicComputeValues() []ComputeTypeBasicCompute { func PossibleComputeTypeValues() []ComputeType { return original.PossibleComputeTypeValues() } +func PossibleEncryptionStatusValues() []EncryptionStatus { + return original.PossibleEncryptionStatusValues() +} func PossibleNodeStateValues() []NodeState { return original.PossibleNodeStateValues() } diff --git a/profiles/preview/mariadb/mgmt/mariadb/mariadbapi/models.go b/profiles/preview/mariadb/mgmt/mariadb/mariadbapi/models.go index edbcaf1b944d..fc016d58f392 100644 --- a/profiles/preview/mariadb/mgmt/mariadb/mariadbapi/models.go +++ b/profiles/preview/mariadb/mgmt/mariadb/mariadbapi/models.go @@ -21,14 +21,24 @@ package mariadbapi import original "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb/mariadbapi" +type AdvisorsClientAPI = original.AdvisorsClientAPI +type BaseClientAPI = original.BaseClientAPI type CheckNameAvailabilityClientAPI = original.CheckNameAvailabilityClientAPI type ConfigurationsClientAPI = original.ConfigurationsClientAPI type DatabasesClientAPI = original.DatabasesClientAPI type FirewallRulesClientAPI = original.FirewallRulesClientAPI type LocationBasedPerformanceTierClientAPI = original.LocationBasedPerformanceTierClientAPI +type LocationBasedRecommendedActionSessionsOperationStatusClientAPI = original.LocationBasedRecommendedActionSessionsOperationStatusClientAPI +type LocationBasedRecommendedActionSessionsResultClientAPI = original.LocationBasedRecommendedActionSessionsResultClientAPI type LogFilesClientAPI = original.LogFilesClientAPI type OperationsClientAPI = original.OperationsClientAPI +type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI +type QueryTextsClientAPI = original.QueryTextsClientAPI +type RecommendedActionsClientAPI = original.RecommendedActionsClientAPI type ReplicasClientAPI = original.ReplicasClientAPI type ServerSecurityAlertPoliciesClientAPI = original.ServerSecurityAlertPoliciesClientAPI type ServersClientAPI = original.ServersClientAPI +type TopQueryStatisticsClientAPI = original.TopQueryStatisticsClientAPI type VirtualNetworkRulesClientAPI = original.VirtualNetworkRulesClientAPI +type WaitStatisticsClientAPI = original.WaitStatisticsClientAPI diff --git a/profiles/preview/mariadb/mgmt/mariadb/models.go b/profiles/preview/mariadb/mgmt/mariadb/models.go index e6cd4e6e034f..1ba6c0314e41 100644 --- a/profiles/preview/mariadb/mgmt/mariadb/models.go +++ b/profiles/preview/mariadb/mgmt/mariadb/models.go @@ -108,22 +108,30 @@ const ( Unknown VirtualNetworkRuleState = original.Unknown ) +type Advisor = original.Advisor +type AdvisorsClient = original.AdvisorsClient +type AdvisorsResultList = original.AdvisorsResultList +type AdvisorsResultListIterator = original.AdvisorsResultListIterator +type AdvisorsResultListPage = original.AdvisorsResultListPage +type AzureEntityResource = original.AzureEntityResource type BaseClient = original.BaseClient type BasicServerPropertiesForCreate = original.BasicServerPropertiesForCreate type CheckNameAvailabilityClient = original.CheckNameAvailabilityClient type CloudError = original.CloudError -type CloudErrorBody = original.CloudErrorBody type Configuration = original.Configuration type ConfigurationListResult = original.ConfigurationListResult type ConfigurationProperties = original.ConfigurationProperties type ConfigurationsClient = original.ConfigurationsClient type ConfigurationsCreateOrUpdateFuture = original.ConfigurationsCreateOrUpdateFuture +type CreateRecommendedActionSessionFuture = original.CreateRecommendedActionSessionFuture type Database = original.Database type DatabaseListResult = original.DatabaseListResult type DatabaseProperties = original.DatabaseProperties type DatabasesClient = original.DatabasesClient type DatabasesCreateOrUpdateFuture = original.DatabasesCreateOrUpdateFuture type DatabasesDeleteFuture = original.DatabasesDeleteFuture +type ErrorAdditionalInfo = original.ErrorAdditionalInfo +type ErrorResponse = original.ErrorResponse type FirewallRule = original.FirewallRule type FirewallRuleListResult = original.FirewallRuleListResult type FirewallRuleProperties = original.FirewallRuleProperties @@ -131,6 +139,8 @@ type FirewallRulesClient = original.FirewallRulesClient type FirewallRulesCreateOrUpdateFuture = original.FirewallRulesCreateOrUpdateFuture type FirewallRulesDeleteFuture = original.FirewallRulesDeleteFuture type LocationBasedPerformanceTierClient = original.LocationBasedPerformanceTierClient +type LocationBasedRecommendedActionSessionsOperationStatusClient = original.LocationBasedRecommendedActionSessionsOperationStatusClient +type LocationBasedRecommendedActionSessionsResultClient = original.LocationBasedRecommendedActionSessionsResultClient type LogFile = original.LogFile type LogFileListResult = original.LogFileListResult type LogFileProperties = original.LogFileProperties @@ -144,8 +154,41 @@ type OperationsClient = original.OperationsClient type PerformanceTierListResult = original.PerformanceTierListResult type PerformanceTierProperties = original.PerformanceTierProperties type PerformanceTierServiceLevelObjectives = original.PerformanceTierServiceLevelObjectives +type PrivateEndpointConnection = original.PrivateEndpointConnection +type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionListResult +type PrivateEndpointConnectionListResultIterator = original.PrivateEndpointConnectionListResultIterator +type PrivateEndpointConnectionListResultPage = original.PrivateEndpointConnectionListResultPage +type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient +type PrivateEndpointConnectionsCreateOrUpdateFuture = original.PrivateEndpointConnectionsCreateOrUpdateFuture +type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture +type PrivateEndpointConnectionsUpdateTagsFuture = original.PrivateEndpointConnectionsUpdateTagsFuture +type PrivateEndpointProperty = original.PrivateEndpointProperty +type PrivateLinkResource = original.PrivateLinkResource +type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult +type PrivateLinkResourceListResultIterator = original.PrivateLinkResourceListResultIterator +type PrivateLinkResourceListResultPage = original.PrivateLinkResourceListResultPage +type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties +type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient +type PrivateLinkServiceConnectionStateProperty = original.PrivateLinkServiceConnectionStateProperty type ProxyResource = original.ProxyResource +type QueryStatistic = original.QueryStatistic +type QueryStatisticProperties = original.QueryStatisticProperties +type QueryText = original.QueryText +type QueryTextProperties = original.QueryTextProperties +type QueryTextsClient = original.QueryTextsClient +type QueryTextsResultList = original.QueryTextsResultList +type QueryTextsResultListIterator = original.QueryTextsResultListIterator +type QueryTextsResultListPage = original.QueryTextsResultListPage +type RecommendationAction = original.RecommendationAction +type RecommendationActionProperties = original.RecommendationActionProperties +type RecommendationActionsResultList = original.RecommendationActionsResultList +type RecommendationActionsResultListIterator = original.RecommendationActionsResultListIterator +type RecommendationActionsResultListPage = original.RecommendationActionsResultListPage +type RecommendedActionSessionsOperationStatus = original.RecommendedActionSessionsOperationStatus +type RecommendedActionsClient = original.RecommendedActionsClient type ReplicasClient = original.ReplicasClient +type Resource = original.Resource type SecurityAlertPolicyProperties = original.SecurityAlertPolicyProperties type Server = original.Server type ServerForCreate = original.ServerForCreate @@ -168,6 +211,13 @@ type ServersRestartFuture = original.ServersRestartFuture type ServersUpdateFuture = original.ServersUpdateFuture type Sku = original.Sku type StorageProfile = original.StorageProfile +type TagsObject = original.TagsObject +type TopQueryStatisticsClient = original.TopQueryStatisticsClient +type TopQueryStatisticsInput = original.TopQueryStatisticsInput +type TopQueryStatisticsInputProperties = original.TopQueryStatisticsInputProperties +type TopQueryStatisticsResultList = original.TopQueryStatisticsResultList +type TopQueryStatisticsResultListIterator = original.TopQueryStatisticsResultListIterator +type TopQueryStatisticsResultListPage = original.TopQueryStatisticsResultListPage type TrackedResource = original.TrackedResource type VirtualNetworkRule = original.VirtualNetworkRule type VirtualNetworkRuleListResult = original.VirtualNetworkRuleListResult @@ -177,10 +227,30 @@ type VirtualNetworkRuleProperties = original.VirtualNetworkRuleProperties type VirtualNetworkRulesClient = original.VirtualNetworkRulesClient type VirtualNetworkRulesCreateOrUpdateFuture = original.VirtualNetworkRulesCreateOrUpdateFuture type VirtualNetworkRulesDeleteFuture = original.VirtualNetworkRulesDeleteFuture +type WaitStatistic = original.WaitStatistic +type WaitStatisticProperties = original.WaitStatisticProperties +type WaitStatisticsClient = original.WaitStatisticsClient +type WaitStatisticsInput = original.WaitStatisticsInput +type WaitStatisticsInputProperties = original.WaitStatisticsInputProperties +type WaitStatisticsResultList = original.WaitStatisticsResultList +type WaitStatisticsResultListIterator = original.WaitStatisticsResultListIterator +type WaitStatisticsResultListPage = original.WaitStatisticsResultListPage func New(subscriptionID string) BaseClient { return original.New(subscriptionID) } +func NewAdvisorsClient(subscriptionID string) AdvisorsClient { + return original.NewAdvisorsClient(subscriptionID) +} +func NewAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) AdvisorsClient { + return original.NewAdvisorsClientWithBaseURI(baseURI, subscriptionID) +} +func NewAdvisorsResultListIterator(page AdvisorsResultListPage) AdvisorsResultListIterator { + return original.NewAdvisorsResultListIterator(page) +} +func NewAdvisorsResultListPage(getNextPage func(context.Context, AdvisorsResultList) (AdvisorsResultList, error)) AdvisorsResultListPage { + return original.NewAdvisorsResultListPage(getNextPage) +} func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailabilityClient { return original.NewCheckNameAvailabilityClient(subscriptionID) } @@ -211,6 +281,18 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string) LocationBasedP func NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedPerformanceTierClient { return original.NewLocationBasedPerformanceTierClientWithBaseURI(baseURI, subscriptionID) } +func NewLocationBasedRecommendedActionSessionsOperationStatusClient(subscriptionID string) LocationBasedRecommendedActionSessionsOperationStatusClient { + return original.NewLocationBasedRecommendedActionSessionsOperationStatusClient(subscriptionID) +} +func NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedRecommendedActionSessionsOperationStatusClient { + return original.NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI(baseURI, subscriptionID) +} +func NewLocationBasedRecommendedActionSessionsResultClient(subscriptionID string) LocationBasedRecommendedActionSessionsResultClient { + return original.NewLocationBasedRecommendedActionSessionsResultClient(subscriptionID) +} +func NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedRecommendedActionSessionsResultClient { + return original.NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI(baseURI, subscriptionID) +} func NewLogFilesClient(subscriptionID string) LogFilesClient { return original.NewLogFilesClient(subscriptionID) } @@ -223,6 +305,54 @@ func NewOperationsClient(subscriptionID string) OperationsClient { func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) } +func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { + return original.NewPrivateEndpointConnectionListResultIterator(page) +} +func NewPrivateEndpointConnectionListResultPage(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return original.NewPrivateEndpointConnectionListResultPage(getNextPage) +} +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClient(subscriptionID) +} +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID) +} +func NewPrivateLinkResourceListResultIterator(page PrivateLinkResourceListResultPage) PrivateLinkResourceListResultIterator { + return original.NewPrivateLinkResourceListResultIterator(page) +} +func NewPrivateLinkResourceListResultPage(getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return original.NewPrivateLinkResourceListResultPage(getNextPage) +} +func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClient(subscriptionID) +} +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID) +} +func NewQueryTextsClient(subscriptionID string) QueryTextsClient { + return original.NewQueryTextsClient(subscriptionID) +} +func NewQueryTextsClientWithBaseURI(baseURI string, subscriptionID string) QueryTextsClient { + return original.NewQueryTextsClientWithBaseURI(baseURI, subscriptionID) +} +func NewQueryTextsResultListIterator(page QueryTextsResultListPage) QueryTextsResultListIterator { + return original.NewQueryTextsResultListIterator(page) +} +func NewQueryTextsResultListPage(getNextPage func(context.Context, QueryTextsResultList) (QueryTextsResultList, error)) QueryTextsResultListPage { + return original.NewQueryTextsResultListPage(getNextPage) +} +func NewRecommendationActionsResultListIterator(page RecommendationActionsResultListPage) RecommendationActionsResultListIterator { + return original.NewRecommendationActionsResultListIterator(page) +} +func NewRecommendationActionsResultListPage(getNextPage func(context.Context, RecommendationActionsResultList) (RecommendationActionsResultList, error)) RecommendationActionsResultListPage { + return original.NewRecommendationActionsResultListPage(getNextPage) +} +func NewRecommendedActionsClient(subscriptionID string) RecommendedActionsClient { + return original.NewRecommendedActionsClient(subscriptionID) +} +func NewRecommendedActionsClientWithBaseURI(baseURI string, subscriptionID string) RecommendedActionsClient { + return original.NewRecommendedActionsClientWithBaseURI(baseURI, subscriptionID) +} func NewReplicasClient(subscriptionID string) ReplicasClient { return original.NewReplicasClient(subscriptionID) } @@ -241,6 +371,18 @@ func NewServersClient(subscriptionID string) ServersClient { func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return original.NewServersClientWithBaseURI(baseURI, subscriptionID) } +func NewTopQueryStatisticsClient(subscriptionID string) TopQueryStatisticsClient { + return original.NewTopQueryStatisticsClient(subscriptionID) +} +func NewTopQueryStatisticsClientWithBaseURI(baseURI string, subscriptionID string) TopQueryStatisticsClient { + return original.NewTopQueryStatisticsClientWithBaseURI(baseURI, subscriptionID) +} +func NewTopQueryStatisticsResultListIterator(page TopQueryStatisticsResultListPage) TopQueryStatisticsResultListIterator { + return original.NewTopQueryStatisticsResultListIterator(page) +} +func NewTopQueryStatisticsResultListPage(getNextPage func(context.Context, TopQueryStatisticsResultList) (TopQueryStatisticsResultList, error)) TopQueryStatisticsResultListPage { + return original.NewTopQueryStatisticsResultListPage(getNextPage) +} func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator { return original.NewVirtualNetworkRuleListResultIterator(page) } @@ -253,6 +395,18 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return original.NewVirtualNetworkRulesClientWithBaseURI(baseURI, subscriptionID) } +func NewWaitStatisticsClient(subscriptionID string) WaitStatisticsClient { + return original.NewWaitStatisticsClient(subscriptionID) +} +func NewWaitStatisticsClientWithBaseURI(baseURI string, subscriptionID string) WaitStatisticsClient { + return original.NewWaitStatisticsClientWithBaseURI(baseURI, subscriptionID) +} +func NewWaitStatisticsResultListIterator(page WaitStatisticsResultListPage) WaitStatisticsResultListIterator { + return original.NewWaitStatisticsResultListIterator(page) +} +func NewWaitStatisticsResultListPage(getNextPage func(context.Context, WaitStatisticsResultList) (WaitStatisticsResultList, error)) WaitStatisticsResultListPage { + return original.NewWaitStatisticsResultListPage(getNextPage) +} func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } diff --git a/profiles/preview/netapp/mgmt/netapp/models.go b/profiles/preview/netapp/mgmt/netapp/models.go index 386302038d6b..f94e106bb325 100644 --- a/profiles/preview/netapp/mgmt/netapp/models.go +++ b/profiles/preview/netapp/mgmt/netapp/models.go @@ -19,7 +19,7 @@ package netapp -import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-10-01/netapp" +import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-11-01/netapp" const ( DefaultBaseURI = original.DefaultBaseURI @@ -100,7 +100,6 @@ type MetricSpecification = original.MetricSpecification type MountTarget = original.MountTarget type MountTargetList = original.MountTargetList type MountTargetProperties = original.MountTargetProperties -type MountTargetsClient = original.MountTargetsClient type Operation = original.Operation type OperationDisplay = original.OperationDisplay type OperationListResult = original.OperationListResult @@ -111,6 +110,7 @@ type PoolProperties = original.PoolProperties type PoolsClient = original.PoolsClient type PoolsCreateOrUpdateFuture = original.PoolsCreateOrUpdateFuture type PoolsDeleteFuture = original.PoolsDeleteFuture +type PoolsUpdateFuture = original.PoolsUpdateFuture type ReplicationObject = original.ReplicationObject type ReplicationStatus = original.ReplicationStatus type ResourceClient = original.ResourceClient @@ -118,12 +118,12 @@ type ResourceNameAvailability = original.ResourceNameAvailability type ResourceNameAvailabilityRequest = original.ResourceNameAvailabilityRequest type ServiceSpecification = original.ServiceSpecification type Snapshot = original.Snapshot -type SnapshotPatch = original.SnapshotPatch type SnapshotProperties = original.SnapshotProperties type SnapshotsClient = original.SnapshotsClient type SnapshotsCreateFuture = original.SnapshotsCreateFuture type SnapshotsDeleteFuture = original.SnapshotsDeleteFuture type SnapshotsList = original.SnapshotsList +type SnapshotsUpdateFuture = original.SnapshotsUpdateFuture type Volume = original.Volume type VolumeList = original.VolumeList type VolumePatch = original.VolumePatch @@ -132,9 +132,16 @@ type VolumePatchPropertiesExportPolicy = original.VolumePatchPropertiesExportPol type VolumeProperties = original.VolumeProperties type VolumePropertiesDataProtection = original.VolumePropertiesDataProtection type VolumePropertiesExportPolicy = original.VolumePropertiesExportPolicy +type VolumeRevert = original.VolumeRevert +type VolumesAuthorizeReplicationFuture = original.VolumesAuthorizeReplicationFuture +type VolumesBreakReplicationFuture = original.VolumesBreakReplicationFuture type VolumesClient = original.VolumesClient type VolumesCreateOrUpdateFuture = original.VolumesCreateOrUpdateFuture type VolumesDeleteFuture = original.VolumesDeleteFuture +type VolumesDeleteReplicationFuture = original.VolumesDeleteReplicationFuture +type VolumesResyncReplicationFuture = original.VolumesResyncReplicationFuture +type VolumesRevertFuture = original.VolumesRevertFuture +type VolumesUpdateFuture = original.VolumesUpdateFuture func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -145,12 +152,6 @@ func NewAccountsClient(subscriptionID string) AccountsClient { func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { return original.NewAccountsClientWithBaseURI(baseURI, subscriptionID) } -func NewMountTargetsClient(subscriptionID string) MountTargetsClient { - return original.NewMountTargetsClient(subscriptionID) -} -func NewMountTargetsClientWithBaseURI(baseURI string, subscriptionID string) MountTargetsClient { - return original.NewMountTargetsClientWithBaseURI(baseURI, subscriptionID) -} func NewOperationsClient(subscriptionID string) OperationsClient { return original.NewOperationsClient(subscriptionID) } diff --git a/profiles/preview/netapp/mgmt/netapp/netappapi/models.go b/profiles/preview/netapp/mgmt/netapp/netappapi/models.go index b6fda7add131..adb887057e37 100644 --- a/profiles/preview/netapp/mgmt/netapp/netappapi/models.go +++ b/profiles/preview/netapp/mgmt/netapp/netappapi/models.go @@ -19,10 +19,9 @@ package netappapi -import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-10-01/netapp/netappapi" +import original "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-11-01/netapp/netappapi" type AccountsClientAPI = original.AccountsClientAPI -type MountTargetsClientAPI = original.MountTargetsClientAPI type OperationsClientAPI = original.OperationsClientAPI type PoolsClientAPI = original.PoolsClientAPI type ResourceClientAPI = original.ResourceClientAPI diff --git a/profiles/preview/network/mgmt/network/models.go b/profiles/preview/network/mgmt/network/models.go index 77ea02f29d39..a52b7e62314d 100644 --- a/profiles/preview/network/mgmt/network/models.go +++ b/profiles/preview/network/mgmt/network/models.go @@ -22,7 +22,7 @@ package network import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" + original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-11-01/network" ) const ( @@ -249,6 +249,13 @@ const ( AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = original.AzureFirewallThreatIntelModeOff ) +type BastionConnectProtocol = original.BastionConnectProtocol + +const ( + RDP BastionConnectProtocol = original.RDP + SSH BastionConnectProtocol = original.SSH +) + type BgpPeerState = original.BgpPeerState const ( @@ -267,6 +274,18 @@ const ( Disconnected CircuitConnectionStatus = original.Disconnected ) +type ConnectionMonitorEndpointFilterItemType = original.ConnectionMonitorEndpointFilterItemType + +const ( + AgentAddress ConnectionMonitorEndpointFilterItemType = original.AgentAddress +) + +type ConnectionMonitorEndpointFilterType = original.ConnectionMonitorEndpointFilterType + +const ( + Include ConnectionMonitorEndpointFilterType = original.Include +) + type ConnectionMonitorSourceStatus = original.ConnectionMonitorSourceStatus const ( @@ -275,6 +294,21 @@ const ( ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = original.ConnectionMonitorSourceStatusUnknown ) +type ConnectionMonitorTestConfigurationProtocol = original.ConnectionMonitorTestConfigurationProtocol + +const ( + ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = original.ConnectionMonitorTestConfigurationProtocolHTTP + ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = original.ConnectionMonitorTestConfigurationProtocolIcmp + ConnectionMonitorTestConfigurationProtocolTCP ConnectionMonitorTestConfigurationProtocol = original.ConnectionMonitorTestConfigurationProtocolTCP +) + +type ConnectionMonitorType = original.ConnectionMonitorType + +const ( + MultiEndpoint ConnectionMonitorType = original.MultiEndpoint + SingleSourceDestination ConnectionMonitorType = original.SingleSourceDestination +) + type ConnectionState = original.ConnectionState const ( @@ -478,10 +512,17 @@ const ( JSON FlowLogFormatType = original.JSON ) +type HTTPConfigurationMethod = original.HTTPConfigurationMethod + +const ( + Get HTTPConfigurationMethod = original.Get + Post HTTPConfigurationMethod = original.Post +) + type HTTPMethod = original.HTTPMethod const ( - Get HTTPMethod = original.Get + HTTPMethodGet HTTPMethod = original.HTTPMethodGet ) type HubVirtualNetworkConnectionStatus = original.HubVirtualNetworkConnectionStatus @@ -647,6 +688,12 @@ const ( OriginOutbound Origin = original.OriginOutbound ) +type OutputType = original.OutputType + +const ( + Workspace OutputType = original.Workspace +) + type OwaspCrsExclusionEntryMatchVariable = original.OwaspCrsExclusionEntryMatchVariable const ( @@ -707,6 +754,13 @@ const ( PfsGroupPFSMM PfsGroup = original.PfsGroupPFSMM ) +type PreferredIPVersion = original.PreferredIPVersion + +const ( + PreferredIPVersionIPv4 PreferredIPVersion = original.PreferredIPVersionIPv4 + PreferredIPVersionIPv6 PreferredIPVersion = original.PreferredIPVersionIPv6 +) + type ProbeProtocol = original.ProbeProtocol const ( @@ -1138,6 +1192,7 @@ type ApplicationGatewaySslPredefinedPolicy = original.ApplicationGatewaySslPrede type ApplicationGatewaySslPredefinedPolicyPropertiesFormat = original.ApplicationGatewaySslPredefinedPolicyPropertiesFormat type ApplicationGatewayTrustedRootCertificate = original.ApplicationGatewayTrustedRootCertificate type ApplicationGatewayTrustedRootCertificatePropertiesFormat = original.ApplicationGatewayTrustedRootCertificatePropertiesFormat +type ApplicationGatewayURLConfiguration = original.ApplicationGatewayURLConfiguration type ApplicationGatewayURLPathMap = original.ApplicationGatewayURLPathMap type ApplicationGatewayURLPathMapPropertiesFormat = original.ApplicationGatewayURLPathMapPropertiesFormat type ApplicationGatewayWebApplicationFirewallConfiguration = original.ApplicationGatewayWebApplicationFirewallConfiguration @@ -1202,6 +1257,7 @@ type AzureFirewallFqdnTagPropertiesFormat = original.AzureFirewallFqdnTagPropert type AzureFirewallFqdnTagsClient = original.AzureFirewallFqdnTagsClient type AzureFirewallIPConfiguration = original.AzureFirewallIPConfiguration type AzureFirewallIPConfigurationPropertiesFormat = original.AzureFirewallIPConfigurationPropertiesFormat +type AzureFirewallIPGroups = original.AzureFirewallIPGroups type AzureFirewallListResult = original.AzureFirewallListResult type AzureFirewallListResultIterator = original.AzureFirewallListResultIterator type AzureFirewallListResultPage = original.AzureFirewallListResultPage @@ -1230,6 +1286,10 @@ type BackendAddressPoolPropertiesFormat = original.BackendAddressPoolPropertiesF type BaseClient = original.BaseClient type BasicFirewallPolicyRule = original.BasicFirewallPolicyRule type BasicFirewallPolicyRuleCondition = original.BasicFirewallPolicyRuleCondition +type BastionActiveSession = original.BastionActiveSession +type BastionActiveSessionListResult = original.BastionActiveSessionListResult +type BastionActiveSessionListResultIterator = original.BastionActiveSessionListResultIterator +type BastionActiveSessionListResultPage = original.BastionActiveSessionListResultPage type BastionHost = original.BastionHost type BastionHostIPConfiguration = original.BastionHostIPConfiguration type BastionHostIPConfigurationPropertiesFormat = original.BastionHostIPConfigurationPropertiesFormat @@ -1240,6 +1300,15 @@ type BastionHostPropertiesFormat = original.BastionHostPropertiesFormat type BastionHostsClient = original.BastionHostsClient type BastionHostsCreateOrUpdateFuture = original.BastionHostsCreateOrUpdateFuture type BastionHostsDeleteFuture = original.BastionHostsDeleteFuture +type BastionSessionDeleteResult = original.BastionSessionDeleteResult +type BastionSessionDeleteResultIterator = original.BastionSessionDeleteResultIterator +type BastionSessionDeleteResultPage = original.BastionSessionDeleteResultPage +type BastionSessionState = original.BastionSessionState +type BastionShareableLink = original.BastionShareableLink +type BastionShareableLinkListRequest = original.BastionShareableLinkListRequest +type BastionShareableLinkListResult = original.BastionShareableLinkListResult +type BastionShareableLinkListResultIterator = original.BastionShareableLinkListResultIterator +type BastionShareableLinkListResultPage = original.BastionShareableLinkListResultPage type BgpPeerStatus = original.BgpPeerStatus type BgpPeerStatusListResult = original.BgpPeerStatusListResult type BgpServiceCommunitiesClient = original.BgpServiceCommunitiesClient @@ -1258,12 +1327,23 @@ type ConfigurationDiagnosticResponse = original.ConfigurationDiagnosticResponse type ConfigurationDiagnosticResult = original.ConfigurationDiagnosticResult type ConnectionMonitor = original.ConnectionMonitor type ConnectionMonitorDestination = original.ConnectionMonitorDestination +type ConnectionMonitorEndpoint = original.ConnectionMonitorEndpoint +type ConnectionMonitorEndpointFilter = original.ConnectionMonitorEndpointFilter +type ConnectionMonitorEndpointFilterItem = original.ConnectionMonitorEndpointFilterItem +type ConnectionMonitorHTTPConfiguration = original.ConnectionMonitorHTTPConfiguration +type ConnectionMonitorIcmpConfiguration = original.ConnectionMonitorIcmpConfiguration type ConnectionMonitorListResult = original.ConnectionMonitorListResult +type ConnectionMonitorOutput = original.ConnectionMonitorOutput type ConnectionMonitorParameters = original.ConnectionMonitorParameters type ConnectionMonitorQueryResult = original.ConnectionMonitorQueryResult type ConnectionMonitorResult = original.ConnectionMonitorResult type ConnectionMonitorResultProperties = original.ConnectionMonitorResultProperties type ConnectionMonitorSource = original.ConnectionMonitorSource +type ConnectionMonitorSuccessThreshold = original.ConnectionMonitorSuccessThreshold +type ConnectionMonitorTCPConfiguration = original.ConnectionMonitorTCPConfiguration +type ConnectionMonitorTestConfiguration = original.ConnectionMonitorTestConfiguration +type ConnectionMonitorTestGroup = original.ConnectionMonitorTestGroup +type ConnectionMonitorWorkspaceSettings = original.ConnectionMonitorWorkspaceSettings type ConnectionMonitorsClient = original.ConnectionMonitorsClient type ConnectionMonitorsCreateOrUpdateFuture = original.ConnectionMonitorsCreateOrUpdateFuture type ConnectionMonitorsDeleteFuture = original.ConnectionMonitorsDeleteFuture @@ -1303,6 +1383,7 @@ type DdosProtectionPlansDeleteFuture = original.DdosProtectionPlansDeleteFuture type DdosSettings = original.DdosSettings type DefaultSecurityRulesClient = original.DefaultSecurityRulesClient type Delegation = original.Delegation +type DeleteBastionShareableLinkFuture = original.DeleteBastionShareableLinkFuture type DeviceProperties = original.DeviceProperties type DhcpOptions = original.DhcpOptions type Dimension = original.Dimension @@ -1450,15 +1531,25 @@ type FirewallPolicyRuleGroupProperties = original.FirewallPolicyRuleGroupPropert type FirewallPolicyRuleGroupsClient = original.FirewallPolicyRuleGroupsClient type FirewallPolicyRuleGroupsCreateOrUpdateFuture = original.FirewallPolicyRuleGroupsCreateOrUpdateFuture type FirewallPolicyRuleGroupsDeleteFuture = original.FirewallPolicyRuleGroupsDeleteFuture +type FlowLog = original.FlowLog type FlowLogFormatParameters = original.FlowLogFormatParameters type FlowLogInformation = original.FlowLogInformation +type FlowLogListResult = original.FlowLogListResult +type FlowLogListResultIterator = original.FlowLogListResultIterator +type FlowLogListResultPage = original.FlowLogListResultPage type FlowLogProperties = original.FlowLogProperties +type FlowLogPropertiesFormat = original.FlowLogPropertiesFormat type FlowLogStatusParameters = original.FlowLogStatusParameters +type FlowLogsClient = original.FlowLogsClient +type FlowLogsCreateOrUpdateFuture = original.FlowLogsCreateOrUpdateFuture +type FlowLogsDeleteFuture = original.FlowLogsDeleteFuture type FrontendIPConfiguration = original.FrontendIPConfiguration type FrontendIPConfigurationPropertiesFormat = original.FrontendIPConfigurationPropertiesFormat type GatewayRoute = original.GatewayRoute type GatewayRouteListResult = original.GatewayRouteListResult type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture = original.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture +type GetActiveSessionsAllFuture = original.GetActiveSessionsAllFuture +type GetActiveSessionsFuture = original.GetActiveSessionsFuture type GetVpnSitesConfigurationRequest = original.GetVpnSitesConfigurationRequest type HTTPConfiguration = original.HTTPConfiguration type HTTPHeader = original.HTTPHeader @@ -1636,12 +1727,14 @@ type P2SConnectionConfiguration = original.P2SConnectionConfiguration type P2SConnectionConfigurationProperties = original.P2SConnectionConfigurationProperties type P2SVpnConnectionHealth = original.P2SVpnConnectionHealth type P2SVpnConnectionHealthRequest = original.P2SVpnConnectionHealthRequest +type P2SVpnConnectionRequest = original.P2SVpnConnectionRequest type P2SVpnGateway = original.P2SVpnGateway type P2SVpnGatewayProperties = original.P2SVpnGatewayProperties type P2SVpnProfileParameters = original.P2SVpnProfileParameters type P2sVpnGatewaysClient = original.P2sVpnGatewaysClient type P2sVpnGatewaysCreateOrUpdateFuture = original.P2sVpnGatewaysCreateOrUpdateFuture type P2sVpnGatewaysDeleteFuture = original.P2sVpnGatewaysDeleteFuture +type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture = original.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture type P2sVpnGatewaysGenerateVpnProfileFuture = original.P2sVpnGatewaysGenerateVpnProfileFuture type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture = original.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture = original.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture @@ -1728,6 +1821,8 @@ type PublicIPPrefixSku = original.PublicIPPrefixSku type PublicIPPrefixesClient = original.PublicIPPrefixesClient type PublicIPPrefixesCreateOrUpdateFuture = original.PublicIPPrefixesCreateOrUpdateFuture type PublicIPPrefixesDeleteFuture = original.PublicIPPrefixesDeleteFuture +type PutBastionShareableLinkAllFuture = original.PutBastionShareableLinkAllFuture +type PutBastionShareableLinkFuture = original.PutBastionShareableLinkFuture type QueryTroubleshootingParameters = original.QueryTroubleshootingParameters type ReferencedPublicIPAddress = original.ReferencedPublicIPAddress type Resource = original.Resource @@ -1818,6 +1913,7 @@ type ServiceTagInformation = original.ServiceTagInformation type ServiceTagInformationPropertiesFormat = original.ServiceTagInformationPropertiesFormat type ServiceTagsClient = original.ServiceTagsClient type ServiceTagsListResult = original.ServiceTagsListResult +type SessionIds = original.SessionIds type String = original.String type SubResource = original.SubResource type Subnet = original.Subnet @@ -1852,6 +1948,7 @@ type UsagesClient = original.UsagesClient type UsagesListResult = original.UsagesListResult type UsagesListResultIterator = original.UsagesListResultIterator type UsagesListResultPage = original.UsagesListResultPage +type VM = original.VM type VerificationIPFlowParameters = original.VerificationIPFlowParameters type VerificationIPFlowResult = original.VerificationIPFlowResult type VirtualHub = original.VirtualHub @@ -1900,6 +1997,7 @@ type VirtualNetworkGatewaySku = original.VirtualNetworkGatewaySku type VirtualNetworkGatewaysClient = original.VirtualNetworkGatewaysClient type VirtualNetworkGatewaysCreateOrUpdateFuture = original.VirtualNetworkGatewaysCreateOrUpdateFuture type VirtualNetworkGatewaysDeleteFuture = original.VirtualNetworkGatewaysDeleteFuture +type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture = original.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture type VirtualNetworkGatewaysGenerateVpnProfileFuture = original.VirtualNetworkGatewaysGenerateVpnProfileFuture type VirtualNetworkGatewaysGeneratevpnclientpackageFuture = original.VirtualNetworkGatewaysGeneratevpnclientpackageFuture type VirtualNetworkGatewaysGetAdvertisedRoutesFuture = original.VirtualNetworkGatewaysGetAdvertisedRoutesFuture @@ -2162,6 +2260,12 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { func NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient { return original.NewAzureFirewallsClientWithBaseURI(baseURI, subscriptionID) } +func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator { + return original.NewBastionActiveSessionListResultIterator(page) +} +func NewBastionActiveSessionListResultPage(getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage { + return original.NewBastionActiveSessionListResultPage(getNextPage) +} func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator { return original.NewBastionHostListResultIterator(page) } @@ -2174,6 +2278,18 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { func NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient { return original.NewBastionHostsClientWithBaseURI(baseURI, subscriptionID) } +func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator { + return original.NewBastionSessionDeleteResultIterator(page) +} +func NewBastionSessionDeleteResultPage(getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage { + return original.NewBastionSessionDeleteResultPage(getNextPage) +} +func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator { + return original.NewBastionShareableLinkListResultIterator(page) +} +func NewBastionShareableLinkListResultPage(getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage { + return original.NewBastionShareableLinkListResultPage(getNextPage) +} func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunitiesClient { return original.NewBgpServiceCommunitiesClient(subscriptionID) } @@ -2372,6 +2488,18 @@ func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRule func NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { return original.NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI, subscriptionID) } +func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator { + return original.NewFlowLogListResultIterator(page) +} +func NewFlowLogListResultPage(getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage { + return original.NewFlowLogListResultPage(getNextPage) +} +func NewFlowLogsClient(subscriptionID string) FlowLogsClient { + return original.NewFlowLogsClient(subscriptionID) +} +func NewFlowLogsClientWithBaseURI(baseURI string, subscriptionID string) FlowLogsClient { + return original.NewFlowLogsClientWithBaseURI(baseURI, subscriptionID) +} func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetworkConnectionsClient { return original.NewHubVirtualNetworkConnectionsClient(subscriptionID) } @@ -3122,15 +3250,30 @@ func PossibleAzureFirewallSkuTierValues() []AzureFirewallSkuTier { func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode { return original.PossibleAzureFirewallThreatIntelModeValues() } +func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { + return original.PossibleBastionConnectProtocolValues() +} func PossibleBgpPeerStateValues() []BgpPeerState { return original.PossibleBgpPeerStateValues() } func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { return original.PossibleCircuitConnectionStatusValues() } +func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitorEndpointFilterItemType { + return original.PossibleConnectionMonitorEndpointFilterItemTypeValues() +} +func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndpointFilterType { + return original.PossibleConnectionMonitorEndpointFilterTypeValues() +} func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { return original.PossibleConnectionMonitorSourceStatusValues() } +func PossibleConnectionMonitorTestConfigurationProtocolValues() []ConnectionMonitorTestConfigurationProtocol { + return original.PossibleConnectionMonitorTestConfigurationProtocolValues() +} +func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { + return original.PossibleConnectionMonitorTypeValues() +} func PossibleConnectionStateValues() []ConnectionState { return original.PossibleConnectionStateValues() } @@ -3209,6 +3352,9 @@ func PossibleFirewallPolicyRuleConditionNetworkProtocolValues() []FirewallPolicy func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { return original.PossibleFlowLogFormatTypeValues() } +func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { + return original.PossibleHTTPConfigurationMethodValues() +} func PossibleHTTPMethodValues() []HTTPMethod { return original.PossibleHTTPMethodValues() } @@ -3266,6 +3412,9 @@ func PossibleOperationStatusValues() []OperationStatus { func PossibleOriginValues() []Origin { return original.PossibleOriginValues() } +func PossibleOutputTypeValues() []OutputType { + return original.PossibleOutputTypeValues() +} func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { return original.PossibleOwaspCrsExclusionEntryMatchVariableValues() } @@ -3284,6 +3433,9 @@ func PossiblePcStatusValues() []PcStatus { func PossiblePfsGroupValues() []PfsGroup { return original.PossiblePfsGroupValues() } +func PossiblePreferredIPVersionValues() []PreferredIPVersion { + return original.PossiblePreferredIPVersionValues() +} func PossibleProbeProtocolValues() []ProbeProtocol { return original.PossibleProbeProtocolValues() } diff --git a/profiles/preview/network/mgmt/network/networkapi/models.go b/profiles/preview/network/mgmt/network/networkapi/models.go index ea9208590787..e8e750e33bf9 100644 --- a/profiles/preview/network/mgmt/network/networkapi/models.go +++ b/profiles/preview/network/mgmt/network/networkapi/models.go @@ -19,7 +19,7 @@ package networkapi -import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/networkapi" +import original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-11-01/network/networkapi" type ApplicationGatewaysClientAPI = original.ApplicationGatewaysClientAPI type ApplicationSecurityGroupsClientAPI = original.ApplicationSecurityGroupsClientAPI @@ -51,6 +51,7 @@ type ExpressRoutePortsLocationsClientAPI = original.ExpressRoutePortsLocationsCl type ExpressRouteServiceProvidersClientAPI = original.ExpressRouteServiceProvidersClientAPI type FirewallPoliciesClientAPI = original.FirewallPoliciesClientAPI type FirewallPolicyRuleGroupsClientAPI = original.FirewallPolicyRuleGroupsClientAPI +type FlowLogsClientAPI = original.FlowLogsClientAPI type HubVirtualNetworkConnectionsClientAPI = original.HubVirtualNetworkConnectionsClientAPI type IPGroupsClientAPI = original.IPGroupsClientAPI type InboundNatRulesClientAPI = original.InboundNatRulesClientAPI diff --git a/profiles/preview/preview/appconfiguration/mgmt/appconfiguration/appconfigurationapi/models.go b/profiles/preview/preview/appconfiguration/mgmt/appconfiguration/appconfigurationapi/models.go index 5e89ecc14d01..3ef602d1b3d7 100644 --- a/profiles/preview/preview/appconfiguration/mgmt/appconfiguration/appconfigurationapi/models.go +++ b/profiles/preview/preview/appconfiguration/mgmt/appconfiguration/appconfigurationapi/models.go @@ -19,7 +19,9 @@ package appconfigurationapi -import original "github.com/Azure/azure-sdk-for-go/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/appconfigurationapi" +import original "github.com/Azure/azure-sdk-for-go/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/appconfigurationapi" type ConfigurationStoresClientAPI = original.ConfigurationStoresClientAPI type OperationsClientAPI = original.OperationsClientAPI +type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI diff --git a/profiles/preview/preview/appconfiguration/mgmt/appconfiguration/models.go b/profiles/preview/preview/appconfiguration/mgmt/appconfiguration/models.go index 062b7139cdac..09ce0bf75636 100644 --- a/profiles/preview/preview/appconfiguration/mgmt/appconfiguration/models.go +++ b/profiles/preview/preview/appconfiguration/mgmt/appconfiguration/models.go @@ -22,13 +22,38 @@ package appconfiguration import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration" + original "github.com/Azure/azure-sdk-for-go/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration" ) const ( DefaultBaseURI = original.DefaultBaseURI ) +type ActionsRequired = original.ActionsRequired + +const ( + None ActionsRequired = original.None + Recreate ActionsRequired = original.Recreate +) + +type ConnectionStatus = original.ConnectionStatus + +const ( + Approved ConnectionStatus = original.Approved + Disconnected ConnectionStatus = original.Disconnected + Pending ConnectionStatus = original.Pending + Rejected ConnectionStatus = original.Rejected +) + +type IdentityType = original.IdentityType + +const ( + IdentityTypeNone IdentityType = original.IdentityTypeNone + IdentityTypeSystemAssigned IdentityType = original.IdentityTypeSystemAssigned + IdentityTypeSystemAssignedUserAssigned IdentityType = original.IdentityTypeSystemAssignedUserAssigned + IdentityTypeUserAssigned IdentityType = original.IdentityTypeUserAssigned +) + type ProvisioningState = original.ProvisioningState const ( @@ -51,13 +76,16 @@ type ConfigurationStoreListResult = original.ConfigurationStoreListResult type ConfigurationStoreListResultIterator = original.ConfigurationStoreListResultIterator type ConfigurationStoreListResultPage = original.ConfigurationStoreListResultPage type ConfigurationStoreProperties = original.ConfigurationStoreProperties +type ConfigurationStorePropertiesUpdateParameters = original.ConfigurationStorePropertiesUpdateParameters type ConfigurationStoreUpdateParameters = original.ConfigurationStoreUpdateParameters type ConfigurationStoresClient = original.ConfigurationStoresClient type ConfigurationStoresCreateFuture = original.ConfigurationStoresCreateFuture type ConfigurationStoresDeleteFuture = original.ConfigurationStoresDeleteFuture type ConfigurationStoresUpdateFuture = original.ConfigurationStoresUpdateFuture +type EncryptionProperties = original.EncryptionProperties type Error = original.Error type KeyValue = original.KeyValue +type KeyVaultProperties = original.KeyVaultProperties type ListKeyValueParameters = original.ListKeyValueParameters type NameAvailabilityStatus = original.NameAvailabilityStatus type OperationDefinition = original.OperationDefinition @@ -66,8 +94,27 @@ type OperationDefinitionListResult = original.OperationDefinitionListResult type OperationDefinitionListResultIterator = original.OperationDefinitionListResultIterator type OperationDefinitionListResultPage = original.OperationDefinitionListResultPage type OperationsClient = original.OperationsClient +type PrivateEndpoint = original.PrivateEndpoint +type PrivateEndpointConnection = original.PrivateEndpointConnection +type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionListResult +type PrivateEndpointConnectionListResultIterator = original.PrivateEndpointConnectionListResultIterator +type PrivateEndpointConnectionListResultPage = original.PrivateEndpointConnectionListResultPage +type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient +type PrivateEndpointConnectionsCreateOrUpdateFuture = original.PrivateEndpointConnectionsCreateOrUpdateFuture +type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture +type PrivateLinkResource = original.PrivateLinkResource +type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult +type PrivateLinkResourceListResultIterator = original.PrivateLinkResourceListResultIterator +type PrivateLinkResourceListResultPage = original.PrivateLinkResourceListResultPage +type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties +type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient +type PrivateLinkServiceConnectionState = original.PrivateLinkServiceConnectionState type RegenerateKeyParameters = original.RegenerateKeyParameters type Resource = original.Resource +type ResourceIdentity = original.ResourceIdentity +type Sku = original.Sku +type UserIdentity = original.UserIdentity func New(subscriptionID string) BaseClient { return original.New(subscriptionID) @@ -102,9 +149,42 @@ func NewOperationsClient(subscriptionID string) OperationsClient { func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) } +func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { + return original.NewPrivateEndpointConnectionListResultIterator(page) +} +func NewPrivateEndpointConnectionListResultPage(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return original.NewPrivateEndpointConnectionListResultPage(getNextPage) +} +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClient(subscriptionID) +} +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID) +} +func NewPrivateLinkResourceListResultIterator(page PrivateLinkResourceListResultPage) PrivateLinkResourceListResultIterator { + return original.NewPrivateLinkResourceListResultIterator(page) +} +func NewPrivateLinkResourceListResultPage(getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return original.NewPrivateLinkResourceListResultPage(getNextPage) +} +func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClient(subscriptionID) +} +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID) +} func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleActionsRequiredValues() []ActionsRequired { + return original.PossibleActionsRequiredValues() +} +func PossibleConnectionStatusValues() []ConnectionStatus { + return original.PossibleConnectionStatusValues() +} +func PossibleIdentityTypeValues() []IdentityType { + return original.PossibleIdentityTypeValues() +} func PossibleProvisioningStateValues() []ProvisioningState { return original.PossibleProvisioningStateValues() } diff --git a/profiles/preview/preview/containerregistry/runtime/containerregistry/containerregistryapi/models.go b/profiles/preview/preview/containerregistry/runtime/containerregistry/containerregistryapi/models.go index cd4c5a93c26b..3446f16d93f4 100644 --- a/profiles/preview/preview/containerregistry/runtime/containerregistry/containerregistryapi/models.go +++ b/profiles/preview/preview/containerregistry/runtime/containerregistry/containerregistryapi/models.go @@ -19,6 +19,12 @@ package containerregistryapi -import original "github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/runtime/2019-07/containerregistry/containerregistryapi" +import original "github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/containerregistryapi" -type BaseClientAPI = original.BaseClientAPI +type AccessTokensClientAPI = original.AccessTokensClientAPI +type BlobClientAPI = original.BlobClientAPI +type ManifestsClientAPI = original.ManifestsClientAPI +type RefreshTokensClientAPI = original.RefreshTokensClientAPI +type RepositoryClientAPI = original.RepositoryClientAPI +type TagClientAPI = original.TagClientAPI +type V2SupportClientAPI = original.V2SupportClientAPI diff --git a/profiles/preview/preview/containerregistry/runtime/containerregistry/models.go b/profiles/preview/preview/containerregistry/runtime/containerregistry/models.go index 9429fc84958c..dabac85dd72c 100644 --- a/profiles/preview/preview/containerregistry/runtime/containerregistry/models.go +++ b/profiles/preview/preview/containerregistry/runtime/containerregistry/models.go @@ -19,41 +19,78 @@ package containerregistry -import original "github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/runtime/2019-07/containerregistry" +import original "github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry" type AccessToken = original.AccessToken +type AccessTokensClient = original.AccessTokensClient type AcrErrorInfo = original.AcrErrorInfo type AcrErrors = original.AcrErrors -type AcrManifestAttributes = original.AcrManifestAttributes -type AcrManifestAttributesBase = original.AcrManifestAttributesBase type AcrManifests = original.AcrManifests -type AcrRepositoryTags = original.AcrRepositoryTags -type AcrTagAttributes = original.AcrTagAttributes -type AcrTagAttributesBase = original.AcrTagAttributesBase +type Annotations = original.Annotations type BaseClient = original.BaseClient +type BlobClient = original.BlobClient type ChangeableAttributes = original.ChangeableAttributes type DeletedRepository = original.DeletedRepository +type Descriptor = original.Descriptor type FsLayer = original.FsLayer type History = original.History type ImageSignature = original.ImageSignature type JWK = original.JWK type JWKHeader = original.JWKHeader type Manifest = original.Manifest +type ManifestAttributes = original.ManifestAttributes +type ManifestAttributesBase = original.ManifestAttributesBase type ManifestAttributesManifest = original.ManifestAttributesManifest type ManifestAttributesManifestReferences = original.ManifestAttributesManifestReferences type ManifestChangeableAttributes = original.ManifestChangeableAttributes +type ManifestList = original.ManifestList +type ManifestListAttributes = original.ManifestListAttributes +type ManifestWrapper = original.ManifestWrapper +type ManifestsClient = original.ManifestsClient +type OCIIndex = original.OCIIndex +type OCIManifest = original.OCIManifest +type Platform = original.Platform +type ReadCloser = original.ReadCloser type RefreshToken = original.RefreshToken +type RefreshTokensClient = original.RefreshTokensClient type Repositories = original.Repositories type RepositoryAttributes = original.RepositoryAttributes +type RepositoryClient = original.RepositoryClient type RepositoryTags = original.RepositoryTags type SetObject = original.SetObject type TagAttributes = original.TagAttributes +type TagAttributesBase = original.TagAttributesBase type TagAttributesTag = original.TagAttributesTag -type V2Descriptor = original.V2Descriptor +type TagClient = original.TagClient +type TagList = original.TagList +type V1Manifest = original.V1Manifest +type V2Manifest = original.V2Manifest +type V2SupportClient = original.V2SupportClient func New(loginURI string) BaseClient { return original.New(loginURI) } +func NewAccessTokensClient(loginURI string) AccessTokensClient { + return original.NewAccessTokensClient(loginURI) +} +func NewBlobClient(loginURI string) BlobClient { + return original.NewBlobClient(loginURI) +} +func NewManifestsClient(loginURI string) ManifestsClient { + return original.NewManifestsClient(loginURI) +} +func NewRefreshTokensClient(loginURI string) RefreshTokensClient { + return original.NewRefreshTokensClient(loginURI) +} +func NewRepositoryClient(loginURI string) RepositoryClient { + return original.NewRepositoryClient(loginURI) +} +func NewTagClient(loginURI string) TagClient { + return original.NewTagClient(loginURI) +} +func NewV2SupportClient(loginURI string) V2SupportClient { + return original.NewV2SupportClient(loginURI) +} func NewWithoutDefaults(loginURI string) BaseClient { return original.NewWithoutDefaults(loginURI) } diff --git a/profiles/preview/preview/digitaltwins/mgmt/digitaltwins/digitaltwinsapi/models.go b/profiles/preview/preview/digitaltwins/mgmt/digitaltwins/digitaltwinsapi/models.go new file mode 100644 index 000000000000..d8bee2a478ca --- /dev/null +++ b/profiles/preview/preview/digitaltwins/mgmt/digitaltwins/digitaltwinsapi/models.go @@ -0,0 +1,28 @@ +// +build go1.9 + +// Copyright 2020 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package digitaltwinsapi + +import original "github.com/Azure/azure-sdk-for-go/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/digitaltwinsapi" + +type ClientAPI = original.ClientAPI +type EndpointClientAPI = original.EndpointClientAPI +type IoTHubClientAPI = original.IoTHubClientAPI +type IoTHubsClientAPI = original.IoTHubsClientAPI +type OperationsClientAPI = original.OperationsClientAPI diff --git a/profiles/preview/preview/digitaltwins/mgmt/digitaltwins/models.go b/profiles/preview/preview/digitaltwins/mgmt/digitaltwins/models.go new file mode 100644 index 000000000000..a66435f19224 --- /dev/null +++ b/profiles/preview/preview/digitaltwins/mgmt/digitaltwins/models.go @@ -0,0 +1,207 @@ +// +build go1.9 + +// Copyright 2020 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package digitaltwins + +import ( + "context" + + original "github.com/Azure/azure-sdk-for-go/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins" + uuid "github.com/satori/go.uuid" +) + +const ( + DefaultBaseURI = original.DefaultBaseURI +) + +type EndpointProvisioningState = original.EndpointProvisioningState + +const ( + Canceled EndpointProvisioningState = original.Canceled + Deleting EndpointProvisioningState = original.Deleting + Failed EndpointProvisioningState = original.Failed + Provisioning EndpointProvisioningState = original.Provisioning + Succeeded EndpointProvisioningState = original.Succeeded +) + +type EndpointType = original.EndpointType + +const ( + EndpointTypeDigitalTwinsEndpointResourceProperties EndpointType = original.EndpointTypeDigitalTwinsEndpointResourceProperties + EndpointTypeEventGrid EndpointType = original.EndpointTypeEventGrid + EndpointTypeEventHub EndpointType = original.EndpointTypeEventHub + EndpointTypeServiceBus EndpointType = original.EndpointTypeServiceBus +) + +type IntegrationResourceState = original.IntegrationResourceState + +const ( + IntegrationResourceStateCanceled IntegrationResourceState = original.IntegrationResourceStateCanceled + IntegrationResourceStateDeleting IntegrationResourceState = original.IntegrationResourceStateDeleting + IntegrationResourceStateFailed IntegrationResourceState = original.IntegrationResourceStateFailed + IntegrationResourceStateProvisioning IntegrationResourceState = original.IntegrationResourceStateProvisioning + IntegrationResourceStateSucceeded IntegrationResourceState = original.IntegrationResourceStateSucceeded +) + +type ProvisioningState = original.ProvisioningState + +const ( + ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled + ProvisioningStateDeleting ProvisioningState = original.ProvisioningStateDeleting + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateProvisioning ProvisioningState = original.ProvisioningStateProvisioning + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded +) + +type Reason = original.Reason + +const ( + AlreadyExists Reason = original.AlreadyExists + Invalid Reason = original.Invalid +) + +type BaseClient = original.BaseClient +type BasicEndpointResourceProperties = original.BasicEndpointResourceProperties +type CheckNameRequest = original.CheckNameRequest +type CheckNameResult = original.CheckNameResult +type Client = original.Client +type CreateOrUpdateFuture = original.CreateOrUpdateFuture +type DeleteFuture = original.DeleteFuture +type Description = original.Description +type DescriptionListResult = original.DescriptionListResult +type DescriptionListResultIterator = original.DescriptionListResultIterator +type DescriptionListResultPage = original.DescriptionListResultPage +type EndpointClient = original.EndpointClient +type EndpointCreateOrUpdateFuture = original.EndpointCreateOrUpdateFuture +type EndpointDeleteFuture = original.EndpointDeleteFuture +type EndpointResource = original.EndpointResource +type EndpointResourceListResult = original.EndpointResourceListResult +type EndpointResourceListResultIterator = original.EndpointResourceListResultIterator +type EndpointResourceListResultPage = original.EndpointResourceListResultPage +type EndpointResourceProperties = original.EndpointResourceProperties +type ErrorDefinition = original.ErrorDefinition +type ErrorResponse = original.ErrorResponse +type EventGrid = original.EventGrid +type EventHub = original.EventHub +type ExternalResource = original.ExternalResource +type IntegrationResource = original.IntegrationResource +type IntegrationResourceListResult = original.IntegrationResourceListResult +type IntegrationResourceListResultIterator = original.IntegrationResourceListResultIterator +type IntegrationResourceListResultPage = original.IntegrationResourceListResultPage +type IntegrationResourceProperties = original.IntegrationResourceProperties +type IntegrationResourceState1 = original.IntegrationResourceState1 +type IntegrationResourceUpdateInfo = original.IntegrationResourceUpdateInfo +type IntegrationResourceUpdateProperties = original.IntegrationResourceUpdateProperties +type IoTHubClient = original.IoTHubClient +type IoTHubDeleteFuture = original.IoTHubDeleteFuture +type IoTHubsClient = original.IoTHubsClient +type Operation = original.Operation +type OperationDisplay = original.OperationDisplay +type OperationListResult = original.OperationListResult +type OperationListResultIterator = original.OperationListResultIterator +type OperationListResultPage = original.OperationListResultPage +type OperationsClient = original.OperationsClient +type PatchDescription = original.PatchDescription +type Properties = original.Properties +type Resource = original.Resource +type ServiceBus = original.ServiceBus +type SkuInfo = original.SkuInfo +type UpdateFuture = original.UpdateFuture + +func New(subscriptionID uuid.UUID) BaseClient { + return original.New(subscriptionID) +} +func NewClient(subscriptionID uuid.UUID) Client { + return original.NewClient(subscriptionID) +} +func NewClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) Client { + return original.NewClientWithBaseURI(baseURI, subscriptionID) +} +func NewDescriptionListResultIterator(page DescriptionListResultPage) DescriptionListResultIterator { + return original.NewDescriptionListResultIterator(page) +} +func NewDescriptionListResultPage(getNextPage func(context.Context, DescriptionListResult) (DescriptionListResult, error)) DescriptionListResultPage { + return original.NewDescriptionListResultPage(getNextPage) +} +func NewEndpointClient(subscriptionID uuid.UUID) EndpointClient { + return original.NewEndpointClient(subscriptionID) +} +func NewEndpointClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) EndpointClient { + return original.NewEndpointClientWithBaseURI(baseURI, subscriptionID) +} +func NewEndpointResourceListResultIterator(page EndpointResourceListResultPage) EndpointResourceListResultIterator { + return original.NewEndpointResourceListResultIterator(page) +} +func NewEndpointResourceListResultPage(getNextPage func(context.Context, EndpointResourceListResult) (EndpointResourceListResult, error)) EndpointResourceListResultPage { + return original.NewEndpointResourceListResultPage(getNextPage) +} +func NewIntegrationResourceListResultIterator(page IntegrationResourceListResultPage) IntegrationResourceListResultIterator { + return original.NewIntegrationResourceListResultIterator(page) +} +func NewIntegrationResourceListResultPage(getNextPage func(context.Context, IntegrationResourceListResult) (IntegrationResourceListResult, error)) IntegrationResourceListResultPage { + return original.NewIntegrationResourceListResultPage(getNextPage) +} +func NewIoTHubClient(subscriptionID uuid.UUID) IoTHubClient { + return original.NewIoTHubClient(subscriptionID) +} +func NewIoTHubClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) IoTHubClient { + return original.NewIoTHubClientWithBaseURI(baseURI, subscriptionID) +} +func NewIoTHubsClient(subscriptionID uuid.UUID) IoTHubsClient { + return original.NewIoTHubsClient(subscriptionID) +} +func NewIoTHubsClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) IoTHubsClient { + return original.NewIoTHubsClientWithBaseURI(baseURI, subscriptionID) +} +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return original.NewOperationListResultIterator(page) +} +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return original.NewOperationListResultPage(getNextPage) +} +func NewOperationsClient(subscriptionID uuid.UUID) OperationsClient { + return original.NewOperationsClient(subscriptionID) +} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) +} +func NewWithBaseURI(baseURI string, subscriptionID uuid.UUID) BaseClient { + return original.NewWithBaseURI(baseURI, subscriptionID) +} +func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState { + return original.PossibleEndpointProvisioningStateValues() +} +func PossibleEndpointTypeValues() []EndpointType { + return original.PossibleEndpointTypeValues() +} +func PossibleIntegrationResourceStateValues() []IntegrationResourceState { + return original.PossibleIntegrationResourceStateValues() +} +func PossibleProvisioningStateValues() []ProvisioningState { + return original.PossibleProvisioningStateValues() +} +func PossibleReasonValues() []Reason { + return original.PossibleReasonValues() +} +func UserAgent() string { + return original.UserAgent() + " profiles/preview" +} +func Version() string { + return original.Version() +} diff --git a/profiles/preview/preview/hybridcompute/mgmt/hybridcompute/hybridcomputeapi/models.go b/profiles/preview/preview/hybridcompute/mgmt/hybridcompute/hybridcomputeapi/models.go index 59cc2a36f6c6..929cd98b186c 100644 --- a/profiles/preview/preview/hybridcompute/mgmt/hybridcompute/hybridcomputeapi/models.go +++ b/profiles/preview/preview/hybridcompute/mgmt/hybridcompute/hybridcomputeapi/models.go @@ -19,7 +19,8 @@ package hybridcomputeapi -import original "github.com/Azure/azure-sdk-for-go/services/preview/hybridcompute/mgmt/2019-03-18-preview/hybridcompute/hybridcomputeapi" +import original "github.com/Azure/azure-sdk-for-go/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/hybridcomputeapi" +type MachineExtensionsClientAPI = original.MachineExtensionsClientAPI type MachinesClientAPI = original.MachinesClientAPI type OperationsClientAPI = original.OperationsClientAPI diff --git a/profiles/preview/preview/hybridcompute/mgmt/hybridcompute/models.go b/profiles/preview/preview/hybridcompute/mgmt/hybridcompute/models.go index 269a3754858b..88791e4dd851 100644 --- a/profiles/preview/preview/hybridcompute/mgmt/hybridcompute/models.go +++ b/profiles/preview/preview/hybridcompute/mgmt/hybridcompute/models.go @@ -22,7 +22,7 @@ package hybridcompute import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/preview/hybridcompute/mgmt/2019-03-18-preview/hybridcompute" + original "github.com/Azure/azure-sdk-for-go/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute" ) const ( @@ -35,39 +35,108 @@ const ( InstanceView InstanceViewTypes = original.InstanceView ) +type ResourceIdentityType = original.ResourceIdentityType + +const ( + SystemAssigned ResourceIdentityType = original.SystemAssigned +) + +type SkuTier = original.SkuTier + +const ( + Basic SkuTier = original.Basic + Free SkuTier = original.Free + Premium SkuTier = original.Premium + Standard SkuTier = original.Standard +) + +type StatusLevelTypes = original.StatusLevelTypes + +const ( + Error StatusLevelTypes = original.Error + Info StatusLevelTypes = original.Info + Warning StatusLevelTypes = original.Warning +) + type StatusTypes = original.StatusTypes const ( - Connected StatusTypes = original.Connected - Disconnected StatusTypes = original.Disconnected - Error StatusTypes = original.Error + StatusTypesConnected StatusTypes = original.StatusTypesConnected + StatusTypesDisconnected StatusTypes = original.StatusTypesDisconnected + StatusTypesError StatusTypes = original.StatusTypesError ) +type AzureEntityResource = original.AzureEntityResource type BaseClient = original.BaseClient +type ErrorAdditionalInfo = original.ErrorAdditionalInfo type ErrorDetail = original.ErrorDetail type ErrorResponse = original.ErrorResponse type Identity = original.Identity +type LocationData = original.LocationData type Machine = original.Machine +type MachineExtension = original.MachineExtension +type MachineExtensionInstanceView = original.MachineExtensionInstanceView +type MachineExtensionInstanceViewStatus = original.MachineExtensionInstanceViewStatus +type MachineExtensionProperties = original.MachineExtensionProperties +type MachineExtensionPropertiesInstanceView = original.MachineExtensionPropertiesInstanceView +type MachineExtensionPropertiesModel = original.MachineExtensionPropertiesModel +type MachineExtensionUpdate = original.MachineExtensionUpdate +type MachineExtensionUpdateProperties = original.MachineExtensionUpdateProperties +type MachineExtensionUpdatePropertiesModel = original.MachineExtensionUpdatePropertiesModel +type MachineExtensionsClient = original.MachineExtensionsClient +type MachineExtensionsCreateOrUpdateFuture = original.MachineExtensionsCreateOrUpdateFuture +type MachineExtensionsDeleteFuture = original.MachineExtensionsDeleteFuture +type MachineExtensionsListResult = original.MachineExtensionsListResult +type MachineExtensionsListResultIterator = original.MachineExtensionsListResultIterator +type MachineExtensionsListResultPage = original.MachineExtensionsListResultPage +type MachineExtensionsUpdateFuture = original.MachineExtensionsUpdateFuture +type MachineIdentity = original.MachineIdentity type MachineListResult = original.MachineListResult type MachineListResultIterator = original.MachineListResultIterator type MachineListResultPage = original.MachineListResultPage type MachineProperties = original.MachineProperties +type MachinePropertiesModel = original.MachinePropertiesModel +type MachinePropertiesOsProfile = original.MachinePropertiesOsProfile type MachineReconnect = original.MachineReconnect type MachineReconnectProperties = original.MachineReconnectProperties +type MachineReconnectPropertiesModel = original.MachineReconnectPropertiesModel type MachineUpdate = original.MachineUpdate +type MachineUpdateIdentity = original.MachineUpdateIdentity type MachineUpdateProperties = original.MachineUpdateProperties +type MachineUpdatePropertiesModel = original.MachineUpdatePropertiesModel type MachinesClient = original.MachinesClient type OSProfile = original.OSProfile type OperationListResult = original.OperationListResult type OperationValue = original.OperationValue type OperationValueDisplay = original.OperationValueDisplay +type OperationValueDisplayModel = original.OperationValueDisplayModel type OperationsClient = original.OperationsClient +type Plan = original.Plan +type ProxyResource = original.ProxyResource type Resource = original.Resource +type ResourceModelWithAllowedPropertySet = original.ResourceModelWithAllowedPropertySet +type ResourceModelWithAllowedPropertySetIdentity = original.ResourceModelWithAllowedPropertySetIdentity +type ResourceModelWithAllowedPropertySetPlan = original.ResourceModelWithAllowedPropertySetPlan +type ResourceModelWithAllowedPropertySetSku = original.ResourceModelWithAllowedPropertySetSku +type Sku = original.Sku +type TrackedResource = original.TrackedResource type UpdateResource = original.UpdateResource func New(subscriptionID string) BaseClient { return original.New(subscriptionID) } +func NewMachineExtensionsClient(subscriptionID string) MachineExtensionsClient { + return original.NewMachineExtensionsClient(subscriptionID) +} +func NewMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) MachineExtensionsClient { + return original.NewMachineExtensionsClientWithBaseURI(baseURI, subscriptionID) +} +func NewMachineExtensionsListResultIterator(page MachineExtensionsListResultPage) MachineExtensionsListResultIterator { + return original.NewMachineExtensionsListResultIterator(page) +} +func NewMachineExtensionsListResultPage(getNextPage func(context.Context, MachineExtensionsListResult) (MachineExtensionsListResult, error)) MachineExtensionsListResultPage { + return original.NewMachineExtensionsListResultPage(getNextPage) +} func NewMachineListResultIterator(page MachineListResultPage) MachineListResultIterator { return original.NewMachineListResultIterator(page) } @@ -92,6 +161,15 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleInstanceViewTypesValues() []InstanceViewTypes { return original.PossibleInstanceViewTypesValues() } +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return original.PossibleResourceIdentityTypeValues() +} +func PossibleSkuTierValues() []SkuTier { + return original.PossibleSkuTierValues() +} +func PossibleStatusLevelTypesValues() []StatusLevelTypes { + return original.PossibleStatusLevelTypesValues() +} func PossibleStatusTypesValues() []StatusTypes { return original.PossibleStatusTypesValues() } diff --git a/profiles/preview/preview/operationalinsights/mgmt/operationalinsights/models.go b/profiles/preview/preview/operationalinsights/mgmt/operationalinsights/models.go index 69873bce9d32..2a3890d2c967 100644 --- a/profiles/preview/preview/operationalinsights/mgmt/operationalinsights/models.go +++ b/profiles/preview/preview/operationalinsights/mgmt/operationalinsights/models.go @@ -78,6 +78,7 @@ type DataSourceListResult = original.DataSourceListResult type DataSourceListResultIterator = original.DataSourceListResultIterator type DataSourceListResultPage = original.DataSourceListResultPage type DataSourcesClient = original.DataSourcesClient +type ErrorResponse = original.ErrorResponse type IntelligencePack = original.IntelligencePack type LinkedService = original.LinkedService type LinkedServiceListResult = original.LinkedServiceListResult @@ -92,7 +93,24 @@ type OperationDisplay = original.OperationDisplay type OperationListResult = original.OperationListResult type OperationListResultIterator = original.OperationListResultIterator type OperationListResultPage = original.OperationListResultPage +type OperationStatus = original.OperationStatus type OperationsClient = original.OperationsClient +type PrivateEndpointConnection = original.PrivateEndpointConnection +type PrivateEndpointConnectionListResult = original.PrivateEndpointConnectionListResult +type PrivateEndpointConnectionListResultIterator = original.PrivateEndpointConnectionListResultIterator +type PrivateEndpointConnectionListResultPage = original.PrivateEndpointConnectionListResultPage +type PrivateEndpointConnectionProperties = original.PrivateEndpointConnectionProperties +type PrivateEndpointConnectionsClient = original.PrivateEndpointConnectionsClient +type PrivateEndpointConnectionsCreateOrUpdateFuture = original.PrivateEndpointConnectionsCreateOrUpdateFuture +type PrivateEndpointConnectionsDeleteFuture = original.PrivateEndpointConnectionsDeleteFuture +type PrivateEndpointProperty = original.PrivateEndpointProperty +type PrivateLinkResource = original.PrivateLinkResource +type PrivateLinkResourceListResult = original.PrivateLinkResourceListResult +type PrivateLinkResourceListResultIterator = original.PrivateLinkResourceListResultIterator +type PrivateLinkResourceListResultPage = original.PrivateLinkResourceListResultPage +type PrivateLinkResourceProperties = original.PrivateLinkResourceProperties +type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient +type PrivateLinkServiceConnectionStateProperty = original.PrivateLinkServiceConnectionStateProperty type ProxyResource = original.ProxyResource type Resource = original.Resource type SharedKeys = original.SharedKeys @@ -139,6 +157,30 @@ func NewOperationsClient(subscriptionID string) OperationsClient { func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) } +func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { + return original.NewPrivateEndpointConnectionListResultIterator(page) +} +func NewPrivateEndpointConnectionListResultPage(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return original.NewPrivateEndpointConnectionListResultPage(getNextPage) +} +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClient(subscriptionID) +} +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return original.NewPrivateEndpointConnectionsClientWithBaseURI(baseURI, subscriptionID) +} +func NewPrivateLinkResourceListResultIterator(page PrivateLinkResourceListResultPage) PrivateLinkResourceListResultIterator { + return original.NewPrivateLinkResourceListResultIterator(page) +} +func NewPrivateLinkResourceListResultPage(getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return original.NewPrivateLinkResourceListResultPage(getNextPage) +} +func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClient(subscriptionID) +} +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return original.NewPrivateLinkResourcesClientWithBaseURI(baseURI, subscriptionID) +} func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } diff --git a/profiles/preview/preview/operationalinsights/mgmt/operationalinsights/operationalinsightsapi/models.go b/profiles/preview/preview/operationalinsights/mgmt/operationalinsights/operationalinsightsapi/models.go index a7706dda7d24..df08ad8422ce 100644 --- a/profiles/preview/preview/operationalinsights/mgmt/operationalinsights/operationalinsightsapi/models.go +++ b/profiles/preview/preview/operationalinsights/mgmt/operationalinsights/operationalinsightsapi/models.go @@ -21,7 +21,10 @@ package operationalinsightsapi import original "github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operationalinsightsapi" +type BaseClientAPI = original.BaseClientAPI type DataSourcesClientAPI = original.DataSourcesClientAPI type LinkedServicesClientAPI = original.LinkedServicesClientAPI type OperationsClientAPI = original.OperationsClientAPI +type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type PrivateLinkResourcesClientAPI = original.PrivateLinkResourcesClientAPI type WorkspacesClientAPI = original.WorkspacesClientAPI diff --git a/profiles/preview/preview/security/mgmt/security/models.go b/profiles/preview/preview/security/mgmt/security/models.go index 1fb9efce69b0..5a5bdc8ebd64 100644 --- a/profiles/preview/preview/security/mgmt/security/models.go +++ b/profiles/preview/preview/security/mgmt/security/models.go @@ -77,6 +77,14 @@ const ( AssessedResourceTypeSQLServerVulnerability AssessedResourceType = original.AssessedResourceTypeSQLServerVulnerability ) +type AssessmentStatusCode = original.AssessmentStatusCode + +const ( + Healthy AssessmentStatusCode = original.Healthy + NotApplicable AssessmentStatusCode = original.NotApplicable + Unhealthy AssessmentStatusCode = original.Unhealthy +) + type AssessmentType = original.AssessmentType const ( @@ -184,6 +192,13 @@ const ( ExecutableNone Executable = original.ExecutableNone ) +type ExpandEnum = original.ExpandEnum + +const ( + Links ExpandEnum = original.Links + Metadata ExpandEnum = original.Metadata +) + type ExportData = original.ExportData const ( @@ -367,10 +382,10 @@ const ( type ResourceStatus = original.ResourceStatus const ( - Healthy ResourceStatus = original.Healthy - NotApplicable ResourceStatus = original.NotApplicable - NotHealthy ResourceStatus = original.NotHealthy - OffByPolicy ResourceStatus = original.OffByPolicy + ResourceStatusHealthy ResourceStatus = original.ResourceStatusHealthy + ResourceStatusNotApplicable ResourceStatus = original.ResourceStatusNotApplicable + ResourceStatusNotHealthy ResourceStatus = original.ResourceStatusNotHealthy + ResourceStatusOffByPolicy ResourceStatus = original.ResourceStatusOffByPolicy ) type Script = original.Script @@ -406,8 +421,8 @@ const ( type Source = original.Source const ( - SourceAws Source = original.SourceAws SourceAzure Source = original.SourceAzure + SourceOnPremise Source = original.SourceOnPremise SourceResourceDetails Source = original.SourceResourceDetails ) @@ -531,11 +546,19 @@ type AscLocation = original.AscLocation type AscLocationList = original.AscLocationList type AscLocationListIterator = original.AscLocationListIterator type AscLocationListPage = original.AscLocationListPage +type Assessment = original.Assessment +type AssessmentLinks = original.AssessmentLinks +type AssessmentList = original.AssessmentList +type AssessmentListIterator = original.AssessmentListIterator +type AssessmentListPage = original.AssessmentListPage type AssessmentMetadata = original.AssessmentMetadata type AssessmentMetadataList = original.AssessmentMetadataList type AssessmentMetadataListIterator = original.AssessmentMetadataListIterator type AssessmentMetadataListPage = original.AssessmentMetadataListPage type AssessmentMetadataProperties = original.AssessmentMetadataProperties +type AssessmentProperties = original.AssessmentProperties +type AssessmentStatus = original.AssessmentStatus +type AssessmentsClient = original.AssessmentsClient type AssessmentsMetadataClient = original.AssessmentsMetadataClient type AssessmentsMetadataSubscriptionClient = original.AssessmentsMetadataSubscriptionClient type AtaExternalSecuritySolution = original.AtaExternalSecuritySolution @@ -561,7 +584,6 @@ type AutomationSource = original.AutomationSource type AutomationTriggeringRule = original.AutomationTriggeringRule type AutomationValidationStatus = original.AutomationValidationStatus type AutomationsClient = original.AutomationsClient -type AwsResourceDetails = original.AwsResourceDetails type AzureResourceDetails = original.AzureResourceDetails type BaseClient = original.BaseClient type BasicAdditionalData = original.BasicAdditionalData @@ -676,6 +698,7 @@ type Kind = original.Kind type ListCustomAlertRule = original.ListCustomAlertRule type Location = original.Location type LocationsClient = original.LocationsClient +type OnPremiseResourceDetails = original.OnPremiseResourceDetails type Operation = original.Operation type OperationDisplay = original.OperationDisplay type OperationList = original.OperationList @@ -809,12 +832,24 @@ func NewAscLocationListIterator(page AscLocationListPage) AscLocationListIterato func NewAscLocationListPage(getNextPage func(context.Context, AscLocationList) (AscLocationList, error)) AscLocationListPage { return original.NewAscLocationListPage(getNextPage) } +func NewAssessmentListIterator(page AssessmentListPage) AssessmentListIterator { + return original.NewAssessmentListIterator(page) +} +func NewAssessmentListPage(getNextPage func(context.Context, AssessmentList) (AssessmentList, error)) AssessmentListPage { + return original.NewAssessmentListPage(getNextPage) +} func NewAssessmentMetadataListIterator(page AssessmentMetadataListPage) AssessmentMetadataListIterator { return original.NewAssessmentMetadataListIterator(page) } func NewAssessmentMetadataListPage(getNextPage func(context.Context, AssessmentMetadataList) (AssessmentMetadataList, error)) AssessmentMetadataListPage { return original.NewAssessmentMetadataListPage(getNextPage) } +func NewAssessmentsClient(subscriptionID string, ascLocation string) AssessmentsClient { + return original.NewAssessmentsClient(subscriptionID, ascLocation) +} +func NewAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AssessmentsClient { + return original.NewAssessmentsClientWithBaseURI(baseURI, subscriptionID, ascLocation) +} func NewAssessmentsMetadataClient(subscriptionID string, ascLocation string) AssessmentsMetadataClient { return original.NewAssessmentsMetadataClient(subscriptionID, ascLocation) } @@ -1136,6 +1171,9 @@ func PossibleAlertsToAdminsValues() []AlertsToAdmins { func PossibleAssessedResourceTypeValues() []AssessedResourceType { return original.PossibleAssessedResourceTypeValues() } +func PossibleAssessmentStatusCodeValues() []AssessmentStatusCode { + return original.PossibleAssessmentStatusCodeValues() +} func PossibleAssessmentTypeValues() []AssessmentType { return original.PossibleAssessmentTypeValues() } @@ -1175,6 +1213,9 @@ func PossibleExeValues() []Exe { func PossibleExecutableValues() []Executable { return original.PossibleExecutableValues() } +func PossibleExpandEnumValues() []ExpandEnum { + return original.PossibleExpandEnumValues() +} func PossibleExportDataValues() []ExportData { return original.PossibleExportDataValues() } diff --git a/profiles/preview/preview/security/mgmt/security/securityapi/models.go b/profiles/preview/preview/security/mgmt/security/securityapi/models.go index 049a372a6dc1..764ca806bc0f 100644 --- a/profiles/preview/preview/security/mgmt/security/securityapi/models.go +++ b/profiles/preview/preview/security/mgmt/security/securityapi/models.go @@ -25,6 +25,7 @@ type AdaptiveApplicationControlsClientAPI = original.AdaptiveApplicationControls type AdvancedThreatProtectionClientAPI = original.AdvancedThreatProtectionClientAPI type AlertsClientAPI = original.AlertsClientAPI type AllowedConnectionsClientAPI = original.AllowedConnectionsClientAPI +type AssessmentsClientAPI = original.AssessmentsClientAPI type AssessmentsMetadataClientAPI = original.AssessmentsMetadataClientAPI type AssessmentsMetadataSubscriptionClientAPI = original.AssessmentsMetadataSubscriptionClientAPI type AutoProvisioningSettingsClientAPI = original.AutoProvisioningSettingsClientAPI diff --git a/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go b/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go index a9c8e8eace31..f57ba11767af 100644 --- a/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go +++ b/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go @@ -29,12 +29,6 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) -type AggregationsKind = original.AggregationsKind - -const ( - AggregationsKindCasesAggregation AggregationsKind = original.AggregationsKindCasesAggregation -) - type AlertRuleKind = original.AlertRuleKind const ( @@ -125,6 +119,13 @@ const ( NotFinal ConfidenceScoreStatus = original.NotFinal ) +type DataConnectorAuthorizationState = original.DataConnectorAuthorizationState + +const ( + Invalid DataConnectorAuthorizationState = original.Invalid + Valid DataConnectorAuthorizationState = original.Valid +) + type DataConnectorKind = original.DataConnectorKind const ( @@ -138,6 +139,14 @@ const ( DataConnectorKindThreatIntelligence DataConnectorKind = original.DataConnectorKindThreatIntelligence ) +type DataConnectorLicenseState = original.DataConnectorLicenseState + +const ( + DataConnectorLicenseStateInvalid DataConnectorLicenseState = original.DataConnectorLicenseStateInvalid + DataConnectorLicenseStateUnknown DataConnectorLicenseState = original.DataConnectorLicenseStateUnknown + DataConnectorLicenseStateValid DataConnectorLicenseState = original.DataConnectorLicenseStateValid +) + type DataTypeState = original.DataTypeState const ( @@ -171,6 +180,7 @@ const ( EntityKindFile EntityKind = original.EntityKindFile EntityKindFileHash EntityKind = original.EntityKindFileHash EntityKindHost EntityKind = original.EntityKindHost + EntityKindIoTDevice EntityKind = original.EntityKindIoTDevice EntityKindIP EntityKind = original.EntityKindIP EntityKindMalware EntityKind = original.EntityKindMalware EntityKindProcess EntityKind = original.EntityKindProcess @@ -192,6 +202,7 @@ const ( EntityTypeFileHash EntityType = original.EntityTypeFileHash EntityTypeHost EntityType = original.EntityTypeHost EntityTypeHuntingBookmark EntityType = original.EntityTypeHuntingBookmark + EntityTypeIoTDevice EntityType = original.EntityTypeIoTDevice EntityTypeIP EntityType = original.EntityTypeIP EntityTypeMalware EntityType = original.EntityTypeMalware EntityTypeProcess EntityType = original.EntityTypeProcess @@ -291,6 +302,7 @@ const ( KindFile KindBasicEntity = original.KindFile KindFileHash KindBasicEntity = original.KindFileHash KindHost KindBasicEntity = original.KindHost + KindIoTDevice KindBasicEntity = original.KindIoTDevice KindIP KindBasicEntity = original.KindIP KindMalware KindBasicEntity = original.KindMalware KindProcess KindBasicEntity = original.KindProcess @@ -407,14 +419,18 @@ const ( NotEqual TriggerOperator = original.NotEqual ) +type AADCheckRequirements = original.AADCheckRequirements type AADDataConnector = original.AADDataConnector type AADDataConnectorProperties = original.AADDataConnectorProperties +type AATPCheckRequirements = original.AATPCheckRequirements type AATPDataConnector = original.AATPDataConnector type AATPDataConnectorProperties = original.AATPDataConnectorProperties +type ASCCheckRequirements = original.ASCCheckRequirements type ASCDataConnector = original.ASCDataConnector type ASCDataConnectorProperties = original.ASCDataConnectorProperties type AccountEntity = original.AccountEntity type AccountEntityProperties = original.AccountEntityProperties +type ActionPropertiesBase = original.ActionPropertiesBase type ActionRequest = original.ActionRequest type ActionRequestProperties = original.ActionRequestProperties type ActionResponse = original.ActionResponse @@ -424,7 +440,7 @@ type ActionsList = original.ActionsList type ActionsListIterator = original.ActionsListIterator type ActionsListPage = original.ActionsListPage type Aggregations = original.Aggregations -type AggregationsKind1 = original.AggregationsKind1 +type AggregationsKind = original.AggregationsKind type AggregationsModel = original.AggregationsModel type AlertRule = original.AlertRule type AlertRuleKind1 = original.AlertRuleKind1 @@ -442,6 +458,7 @@ type AlertRulesListIterator = original.AlertRulesListIterator type AlertRulesListPage = original.AlertRulesListPage type AlertsDataTypeOfDataConnector = original.AlertsDataTypeOfDataConnector type AlertsDataTypeOfDataConnectorAlerts = original.AlertsDataTypeOfDataConnectorAlerts +type AwsCloudTrailCheckRequirements = original.AwsCloudTrailCheckRequirements type AwsCloudTrailDataConnector = original.AwsCloudTrailDataConnector type AwsCloudTrailDataConnectorDataTypes = original.AwsCloudTrailDataConnectorDataTypes type AwsCloudTrailDataConnectorDataTypesLogs = original.AwsCloudTrailDataConnectorDataTypesLogs @@ -504,9 +521,11 @@ type DataConnectorList = original.DataConnectorList type DataConnectorListIterator = original.DataConnectorListIterator type DataConnectorListPage = original.DataConnectorListPage type DataConnectorModel = original.DataConnectorModel +type DataConnectorRequirementsState = original.DataConnectorRequirementsState type DataConnectorStatus = original.DataConnectorStatus type DataConnectorTenantID = original.DataConnectorTenantID type DataConnectorWithAlertsProperties = original.DataConnectorWithAlertsProperties +type DataConnectorsCheckRequirements = original.DataConnectorsCheckRequirements type DataConnectorsClient = original.DataConnectorsClient type EntitiesClient = original.EntitiesClient type Entity = original.Entity @@ -541,10 +560,14 @@ type HostEntityProperties = original.HostEntityProperties type IPEntity = original.IPEntity type IPEntityProperties = original.IPEntityProperties type IncidentInfo = original.IncidentInfo +type IoTDeviceEntity = original.IoTDeviceEntity +type IoTDeviceEntityProperties = original.IoTDeviceEntityProperties +type MCASCheckRequirements = original.MCASCheckRequirements type MCASDataConnector = original.MCASDataConnector type MCASDataConnectorDataTypes = original.MCASDataConnectorDataTypes type MCASDataConnectorDataTypesDiscoveryLogs = original.MCASDataConnectorDataTypesDiscoveryLogs type MCASDataConnectorProperties = original.MCASDataConnectorProperties +type MDATPCheckRequirements = original.MDATPCheckRequirements type MDATPDataConnector = original.MDATPDataConnector type MDATPDataConnectorProperties = original.MDATPDataConnectorProperties type MalwareEntity = original.MalwareEntity @@ -597,6 +620,7 @@ type SecurityGroupEntityProperties = original.SecurityGroupEntityProperties type Settings = original.Settings type SettingsKind = original.SettingsKind type SettingsModel = original.SettingsModel +type TICheckRequirements = original.TICheckRequirements type TIDataConnector = original.TIDataConnector type TIDataConnectorDataTypes = original.TIDataConnectorDataTypes type TIDataConnectorDataTypesIndicators = original.TIDataConnectorDataTypesIndicators @@ -790,9 +814,6 @@ func NewProductSettingsClientWithBaseURI(baseURI string, subscriptionID string) func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } -func PossibleAggregationsKindValues() []AggregationsKind { - return original.PossibleAggregationsKindValues() -} func PossibleAlertRuleKindValues() []AlertRuleKind { return original.PossibleAlertRuleKindValues() } @@ -820,9 +841,15 @@ func PossibleConfidenceLevelValues() []ConfidenceLevel { func PossibleConfidenceScoreStatusValues() []ConfidenceScoreStatus { return original.PossibleConfidenceScoreStatusValues() } +func PossibleDataConnectorAuthorizationStateValues() []DataConnectorAuthorizationState { + return original.PossibleDataConnectorAuthorizationStateValues() +} func PossibleDataConnectorKindValues() []DataConnectorKind { return original.PossibleDataConnectorKindValues() } +func PossibleDataConnectorLicenseStateValues() []DataConnectorLicenseState { + return original.PossibleDataConnectorLicenseStateValues() +} func PossibleDataTypeStateValues() []DataTypeState { return original.PossibleDataTypeStateValues() } diff --git a/profiles/preview/preview/securityinsight/mgmt/securityinsight/securityinsightapi/models.go b/profiles/preview/preview/securityinsight/mgmt/securityinsight/securityinsightapi/models.go index 2f1d31d9e814..6ff86b295f66 100644 --- a/profiles/preview/preview/securityinsight/mgmt/securityinsight/securityinsightapi/models.go +++ b/profiles/preview/preview/securityinsight/mgmt/securityinsight/securityinsightapi/models.go @@ -24,6 +24,7 @@ import original "github.com/Azure/azure-sdk-for-go/services/preview/securityinsi type ActionsClientAPI = original.ActionsClientAPI type AlertRuleTemplatesClientAPI = original.AlertRuleTemplatesClientAPI type AlertRulesClientAPI = original.AlertRulesClientAPI +type BaseClientAPI = original.BaseClientAPI type BookmarkRelationsClientAPI = original.BookmarkRelationsClientAPI type BookmarksClientAPI = original.BookmarksClientAPI type CaseCommentsClientAPI = original.CaseCommentsClientAPI diff --git a/profiles/preview/preview/sql/mgmt/sql/models.go b/profiles/preview/preview/sql/mgmt/sql/models.go index ec79da26df68..451009948907 100644 --- a/profiles/preview/preview/sql/mgmt/sql/models.go +++ b/profiles/preview/preview/sql/mgmt/sql/models.go @@ -118,6 +118,16 @@ const ( SecurityAlertPolicyStateNew SecurityAlertPolicyState = original.SecurityAlertPolicyStateNew ) +type SensitivityLabelRank = original.SensitivityLabelRank + +const ( + Critical SensitivityLabelRank = original.Critical + High SensitivityLabelRank = original.High + Low SensitivityLabelRank = original.Low + Medium SensitivityLabelRank = original.Medium + None SensitivityLabelRank = original.None +) + type SensitivityLabelSource = original.SensitivityLabelSource const ( @@ -415,6 +425,9 @@ func PossibleReplicaTypeValues() []ReplicaType { func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { return original.PossibleSecurityAlertPolicyStateValues() } +func PossibleSensitivityLabelRankValues() []SensitivityLabelRank { + return original.PossibleSensitivityLabelRankValues() +} func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource { return original.PossibleSensitivityLabelSourceValues() } diff --git a/profiles/preview/preview/support/mgmt/support/models.go b/profiles/preview/preview/support/mgmt/support/models.go new file mode 100644 index 000000000000..1d4228b5529d --- /dev/null +++ b/profiles/preview/preview/support/mgmt/support/models.go @@ -0,0 +1,177 @@ +// +build go1.9 + +// Copyright 2020 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package support + +import ( + "context" + + original "github.com/Azure/azure-sdk-for-go/services/preview/support/mgmt/2019-05-01-preview/support" +) + +const ( + DefaultBaseURI = original.DefaultBaseURI +) + +type CommunicationDirection = original.CommunicationDirection + +const ( + Inbound CommunicationDirection = original.Inbound + Outbound CommunicationDirection = original.Outbound +) + +type CommunicationType = original.CommunicationType + +const ( + Phone CommunicationType = original.Phone + Web CommunicationType = original.Web +) + +type PreferredContactMethod = original.PreferredContactMethod + +const ( + PreferredContactMethodEmail PreferredContactMethod = original.PreferredContactMethodEmail + PreferredContactMethodPhone PreferredContactMethod = original.PreferredContactMethodPhone +) + +type SeverityLevel = original.SeverityLevel + +const ( + Critical SeverityLevel = original.Critical + Minimal SeverityLevel = original.Minimal + Moderate SeverityLevel = original.Moderate +) + +type Type = original.Type + +const ( + MicrosoftSupportcommunications Type = original.MicrosoftSupportcommunications + MicrosoftSupportsupportTickets Type = original.MicrosoftSupportsupportTickets +) + +type BaseClient = original.BaseClient +type CheckNameAvailabilityInput = original.CheckNameAvailabilityInput +type CheckNameAvailabilityOutput = original.CheckNameAvailabilityOutput +type CommunicationDetails = original.CommunicationDetails +type CommunicationDetailsProperties = original.CommunicationDetailsProperties +type CommunicationsClient = original.CommunicationsClient +type CommunicationsCreateFuture = original.CommunicationsCreateFuture +type CommunicationsListResult = original.CommunicationsListResult +type CommunicationsListResultIterator = original.CommunicationsListResultIterator +type CommunicationsListResultPage = original.CommunicationsListResultPage +type ContactProfile = original.ContactProfile +type Engineer = original.Engineer +type ExceptionResponse = original.ExceptionResponse +type Operation = original.Operation +type OperationDisplay = original.OperationDisplay +type OperationsClient = original.OperationsClient +type OperationsListResult = original.OperationsListResult +type ProblemClassification = original.ProblemClassification +type ProblemClassificationProperties = original.ProblemClassificationProperties +type ProblemClassificationsClient = original.ProblemClassificationsClient +type ProblemClassificationsListResult = original.ProblemClassificationsListResult +type QuotaChangeRequest = original.QuotaChangeRequest +type QuotaTicketDetails = original.QuotaTicketDetails +type Service = original.Service +type ServiceError = original.ServiceError +type ServiceErrorDetail = original.ServiceErrorDetail +type ServiceLevelAgreement = original.ServiceLevelAgreement +type ServiceProperties = original.ServiceProperties +type ServicesClient = original.ServicesClient +type ServicesListResult = original.ServicesListResult +type TechnicalTicketDetails = original.TechnicalTicketDetails +type TicketDetails = original.TicketDetails +type TicketDetailsProperties = original.TicketDetailsProperties +type TicketsClient = original.TicketsClient +type TicketsCreateFuture = original.TicketsCreateFuture +type TicketsListResult = original.TicketsListResult +type TicketsListResultIterator = original.TicketsListResultIterator +type TicketsListResultPage = original.TicketsListResultPage +type UpdateContactProfile = original.UpdateContactProfile +type UpdateSupportTicket = original.UpdateSupportTicket + +func New(subscriptionID string) BaseClient { + return original.New(subscriptionID) +} +func NewCommunicationsClient(subscriptionID string) CommunicationsClient { + return original.NewCommunicationsClient(subscriptionID) +} +func NewCommunicationsClientWithBaseURI(baseURI string, subscriptionID string) CommunicationsClient { + return original.NewCommunicationsClientWithBaseURI(baseURI, subscriptionID) +} +func NewCommunicationsListResultIterator(page CommunicationsListResultPage) CommunicationsListResultIterator { + return original.NewCommunicationsListResultIterator(page) +} +func NewCommunicationsListResultPage(getNextPage func(context.Context, CommunicationsListResult) (CommunicationsListResult, error)) CommunicationsListResultPage { + return original.NewCommunicationsListResultPage(getNextPage) +} +func NewOperationsClient(subscriptionID string) OperationsClient { + return original.NewOperationsClient(subscriptionID) +} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) +} +func NewProblemClassificationsClient(subscriptionID string) ProblemClassificationsClient { + return original.NewProblemClassificationsClient(subscriptionID) +} +func NewProblemClassificationsClientWithBaseURI(baseURI string, subscriptionID string) ProblemClassificationsClient { + return original.NewProblemClassificationsClientWithBaseURI(baseURI, subscriptionID) +} +func NewServicesClient(subscriptionID string) ServicesClient { + return original.NewServicesClient(subscriptionID) +} +func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { + return original.NewServicesClientWithBaseURI(baseURI, subscriptionID) +} +func NewTicketsClient(subscriptionID string) TicketsClient { + return original.NewTicketsClient(subscriptionID) +} +func NewTicketsClientWithBaseURI(baseURI string, subscriptionID string) TicketsClient { + return original.NewTicketsClientWithBaseURI(baseURI, subscriptionID) +} +func NewTicketsListResultIterator(page TicketsListResultPage) TicketsListResultIterator { + return original.NewTicketsListResultIterator(page) +} +func NewTicketsListResultPage(getNextPage func(context.Context, TicketsListResult) (TicketsListResult, error)) TicketsListResultPage { + return original.NewTicketsListResultPage(getNextPage) +} +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return original.NewWithBaseURI(baseURI, subscriptionID) +} +func PossibleCommunicationDirectionValues() []CommunicationDirection { + return original.PossibleCommunicationDirectionValues() +} +func PossibleCommunicationTypeValues() []CommunicationType { + return original.PossibleCommunicationTypeValues() +} +func PossiblePreferredContactMethodValues() []PreferredContactMethod { + return original.PossiblePreferredContactMethodValues() +} +func PossibleSeverityLevelValues() []SeverityLevel { + return original.PossibleSeverityLevelValues() +} +func PossibleTypeValues() []Type { + return original.PossibleTypeValues() +} +func UserAgent() string { + return original.UserAgent() + " profiles/preview" +} +func Version() string { + return original.Version() +} diff --git a/profiles/preview/preview/support/mgmt/support/supportapi/models.go b/profiles/preview/preview/support/mgmt/support/supportapi/models.go new file mode 100644 index 000000000000..1b102a86275e --- /dev/null +++ b/profiles/preview/preview/support/mgmt/support/supportapi/models.go @@ -0,0 +1,28 @@ +// +build go1.9 + +// Copyright 2020 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package supportapi + +import original "github.com/Azure/azure-sdk-for-go/services/preview/support/mgmt/2019-05-01-preview/support/supportapi" + +type CommunicationsClientAPI = original.CommunicationsClientAPI +type OperationsClientAPI = original.OperationsClientAPI +type ProblemClassificationsClientAPI = original.ProblemClassificationsClientAPI +type ServicesClientAPI = original.ServicesClientAPI +type TicketsClientAPI = original.TicketsClientAPI diff --git a/profiles/preview/recoveryservices/mgmt/backup/backupapi/models.go b/profiles/preview/recoveryservices/mgmt/backup/backupapi/models.go index f963839e8537..165a4cd9c042 100644 --- a/profiles/preview/recoveryservices/mgmt/backup/backupapi/models.go +++ b/profiles/preview/recoveryservices/mgmt/backup/backupapi/models.go @@ -19,7 +19,7 @@ package backupapi -import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup/backupapi" +import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-06-15/backup/backupapi" type BackupsClientAPI = original.BackupsClientAPI type EnginesClientAPI = original.EnginesClientAPI diff --git a/profiles/preview/recoveryservices/mgmt/backup/models.go b/profiles/preview/recoveryservices/mgmt/backup/models.go index 598516d5fafc..ffa1b1a99ec2 100644 --- a/profiles/preview/recoveryservices/mgmt/backup/models.go +++ b/profiles/preview/recoveryservices/mgmt/backup/models.go @@ -22,7 +22,7 @@ package backup import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup" + original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-06-15/backup" ) const ( diff --git a/profiles/preview/recoveryservices/mgmt/siterecovery/models.go b/profiles/preview/recoveryservices/mgmt/siterecovery/models.go index bfc035e80061..632fb1726409 100644 --- a/profiles/preview/recoveryservices/mgmt/siterecovery/models.go +++ b/profiles/preview/recoveryservices/mgmt/siterecovery/models.go @@ -358,6 +358,13 @@ const ( InstanceTypeScriptActionDetails InstanceTypeBasicRecoveryPlanActionDetails = original.InstanceTypeScriptActionDetails ) +type InstanceTypeBasicRecoveryPlanProviderSpecificDetails = original.InstanceTypeBasicRecoveryPlanProviderSpecificDetails + +const ( + InstanceTypeRecoveryPlanA2ADetails InstanceTypeBasicRecoveryPlanProviderSpecificDetails = original.InstanceTypeRecoveryPlanA2ADetails + InstanceTypeRecoveryPlanProviderSpecificDetails InstanceTypeBasicRecoveryPlanProviderSpecificDetails = original.InstanceTypeRecoveryPlanProviderSpecificDetails +) + type InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput const ( @@ -369,6 +376,13 @@ const ( InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput ) +type InstanceTypeBasicRecoveryPlanProviderSpecificInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificInput + +const ( + InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A InstanceTypeBasicRecoveryPlanProviderSpecificInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A + InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput InstanceTypeBasicRecoveryPlanProviderSpecificInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput +) + type InstanceTypeBasicRemoveDisksProviderSpecificInput = original.InstanceTypeBasicRemoveDisksProviderSpecificInput const ( @@ -712,7 +726,9 @@ type BasicProtectionContainerMappingProviderSpecificDetails = original.BasicProt type BasicProviderSpecificFailoverInput = original.BasicProviderSpecificFailoverInput type BasicProviderSpecificRecoveryPointDetails = original.BasicProviderSpecificRecoveryPointDetails type BasicRecoveryPlanActionDetails = original.BasicRecoveryPlanActionDetails +type BasicRecoveryPlanProviderSpecificDetails = original.BasicRecoveryPlanProviderSpecificDetails type BasicRecoveryPlanProviderSpecificFailoverInput = original.BasicRecoveryPlanProviderSpecificFailoverInput +type BasicRecoveryPlanProviderSpecificInput = original.BasicRecoveryPlanProviderSpecificInput type BasicRemoveDisksProviderSpecificInput = original.BasicRemoveDisksProviderSpecificInput type BasicReplicationProviderSpecificContainerCreationInput = original.BasicReplicationProviderSpecificContainerCreationInput type BasicReplicationProviderSpecificContainerMappingInput = original.BasicReplicationProviderSpecificContainerMappingInput @@ -810,6 +826,7 @@ type HyperVReplicaPolicyInput = original.HyperVReplicaPolicyInput type HyperVReplicaReplicationDetails = original.HyperVReplicaReplicationDetails type HyperVSiteDetails = original.HyperVSiteDetails type HyperVVirtualMachineDetails = original.HyperVVirtualMachineDetails +type IPConfig = original.IPConfig type IdentityProviderDetails = original.IdentityProviderDetails type IdentityProviderInput = original.IdentityProviderInput type InMageAgentDetails = original.InMageAgentDetails @@ -934,7 +951,9 @@ type ProviderSpecificFailoverInput = original.ProviderSpecificFailoverInput type ProviderSpecificRecoveryPointDetails = original.ProviderSpecificRecoveryPointDetails type RcmAzureMigrationPolicyDetails = original.RcmAzureMigrationPolicyDetails type RecoveryPlan = original.RecoveryPlan +type RecoveryPlanA2ADetails = original.RecoveryPlanA2ADetails type RecoveryPlanA2AFailoverInput = original.RecoveryPlanA2AFailoverInput +type RecoveryPlanA2AInput = original.RecoveryPlanA2AInput type RecoveryPlanAction = original.RecoveryPlanAction type RecoveryPlanActionDetails = original.RecoveryPlanActionDetails type RecoveryPlanAutomationRunbookActionDetails = original.RecoveryPlanAutomationRunbookActionDetails @@ -952,7 +971,9 @@ type RecoveryPlanPlannedFailoverInput = original.RecoveryPlanPlannedFailoverInpu type RecoveryPlanPlannedFailoverInputProperties = original.RecoveryPlanPlannedFailoverInputProperties type RecoveryPlanProperties = original.RecoveryPlanProperties type RecoveryPlanProtectedItem = original.RecoveryPlanProtectedItem +type RecoveryPlanProviderSpecificDetails = original.RecoveryPlanProviderSpecificDetails type RecoveryPlanProviderSpecificFailoverInput = original.RecoveryPlanProviderSpecificFailoverInput +type RecoveryPlanProviderSpecificInput = original.RecoveryPlanProviderSpecificInput type RecoveryPlanScriptActionDetails = original.RecoveryPlanScriptActionDetails type RecoveryPlanShutdownGroupTaskDetails = original.RecoveryPlanShutdownGroupTaskDetails type RecoveryPlanTestFailoverCleanupInput = original.RecoveryPlanTestFailoverCleanupInput @@ -1612,9 +1633,15 @@ func PossibleInstanceTypeBasicProviderSpecificRecoveryPointDetailsValues() []Ins func PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues() []InstanceTypeBasicRecoveryPlanActionDetails { return original.PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues() } +func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificDetailsValues() []InstanceTypeBasicRecoveryPlanProviderSpecificDetails { + return original.PossibleInstanceTypeBasicRecoveryPlanProviderSpecificDetailsValues() +} func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() []InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput { return original.PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() } +func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificInputValues() []InstanceTypeBasicRecoveryPlanProviderSpecificInput { + return original.PossibleInstanceTypeBasicRecoveryPlanProviderSpecificInputValues() +} func PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() []InstanceTypeBasicRemoveDisksProviderSpecificInput { return original.PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() } diff --git a/profiles/preview/resources/mgmt/managedapplications/models.go b/profiles/preview/resources/mgmt/managedapplications/models.go index 68b2714aff6b..e5b15e7a6929 100644 --- a/profiles/preview/resources/mgmt/managedapplications/models.go +++ b/profiles/preview/resources/mgmt/managedapplications/models.go @@ -29,11 +29,30 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type ApplicationArtifactName = original.ApplicationArtifactName + +const ( + Authorizations ApplicationArtifactName = original.Authorizations + CustomRoleDefinition ApplicationArtifactName = original.CustomRoleDefinition + NotSpecified ApplicationArtifactName = original.NotSpecified + ViewDefinition ApplicationArtifactName = original.ViewDefinition +) + type ApplicationArtifactType = original.ApplicationArtifactType const ( - Custom ApplicationArtifactType = original.Custom - Template ApplicationArtifactType = original.Template + ApplicationArtifactTypeCustom ApplicationArtifactType = original.ApplicationArtifactTypeCustom + ApplicationArtifactTypeNotSpecified ApplicationArtifactType = original.ApplicationArtifactTypeNotSpecified + ApplicationArtifactTypeTemplate ApplicationArtifactType = original.ApplicationArtifactTypeTemplate +) + +type ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactName + +const ( + ApplicationDefinitionArtifactNameApplicationResourceTemplate ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactNameApplicationResourceTemplate + ApplicationDefinitionArtifactNameCreateUIDefinition ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactNameCreateUIDefinition + ApplicationDefinitionArtifactNameMainTemplateParameters ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactNameMainTemplateParameters + ApplicationDefinitionArtifactNameNotSpecified ApplicationDefinitionArtifactName = original.ApplicationDefinitionArtifactNameNotSpecified ) type ApplicationLockLevel = original.ApplicationLockLevel @@ -44,17 +63,48 @@ const ( ReadOnly ApplicationLockLevel = original.ReadOnly ) +type ApplicationManagementMode = original.ApplicationManagementMode + +const ( + ApplicationManagementModeManaged ApplicationManagementMode = original.ApplicationManagementModeManaged + ApplicationManagementModeNotSpecified ApplicationManagementMode = original.ApplicationManagementModeNotSpecified + ApplicationManagementModeUnmanaged ApplicationManagementMode = original.ApplicationManagementModeUnmanaged +) + +type DeploymentMode = original.DeploymentMode + +const ( + DeploymentModeComplete DeploymentMode = original.DeploymentModeComplete + DeploymentModeIncremental DeploymentMode = original.DeploymentModeIncremental + DeploymentModeNotSpecified DeploymentMode = original.DeploymentModeNotSpecified +) + +type JitApprovalMode = original.JitApprovalMode + +const ( + JitApprovalModeAutoApprove JitApprovalMode = original.JitApprovalModeAutoApprove + JitApprovalModeManualApprove JitApprovalMode = original.JitApprovalModeManualApprove + JitApprovalModeNotSpecified JitApprovalMode = original.JitApprovalModeNotSpecified +) + +type JitApproverType = original.JitApproverType + +const ( + Group JitApproverType = original.Group + User JitApproverType = original.User +) + type JitRequestState = original.JitRequestState const ( - Approved JitRequestState = original.Approved - Canceled JitRequestState = original.Canceled - Denied JitRequestState = original.Denied - Expired JitRequestState = original.Expired - Failed JitRequestState = original.Failed - NotSpecified JitRequestState = original.NotSpecified - Pending JitRequestState = original.Pending - Timeout JitRequestState = original.Timeout + JitRequestStateApproved JitRequestState = original.JitRequestStateApproved + JitRequestStateCanceled JitRequestState = original.JitRequestStateCanceled + JitRequestStateDenied JitRequestState = original.JitRequestStateDenied + JitRequestStateExpired JitRequestState = original.JitRequestStateExpired + JitRequestStateFailed JitRequestState = original.JitRequestStateFailed + JitRequestStateNotSpecified JitRequestState = original.JitRequestStateNotSpecified + JitRequestStatePending JitRequestState = original.JitRequestStatePending + JitRequestStateTimeout JitRequestState = original.JitRequestStateTimeout ) type JitSchedulingType = original.JitSchedulingType @@ -68,17 +118,18 @@ const ( type ProvisioningState = original.ProvisioningState const ( - ProvisioningStateAccepted ProvisioningState = original.ProvisioningStateAccepted - ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled - ProvisioningStateCreated ProvisioningState = original.ProvisioningStateCreated - ProvisioningStateCreating ProvisioningState = original.ProvisioningStateCreating - ProvisioningStateDeleted ProvisioningState = original.ProvisioningStateDeleted - ProvisioningStateDeleting ProvisioningState = original.ProvisioningStateDeleting - ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed - ProvisioningStateReady ProvisioningState = original.ProvisioningStateReady - ProvisioningStateRunning ProvisioningState = original.ProvisioningStateRunning - ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded - ProvisioningStateUpdating ProvisioningState = original.ProvisioningStateUpdating + ProvisioningStateAccepted ProvisioningState = original.ProvisioningStateAccepted + ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled + ProvisioningStateCreated ProvisioningState = original.ProvisioningStateCreated + ProvisioningStateCreating ProvisioningState = original.ProvisioningStateCreating + ProvisioningStateDeleted ProvisioningState = original.ProvisioningStateDeleted + ProvisioningStateDeleting ProvisioningState = original.ProvisioningStateDeleting + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateNotSpecified ProvisioningState = original.ProvisioningStateNotSpecified + ProvisioningStateReady ProvisioningState = original.ProvisioningStateReady + ProvisioningStateRunning ProvisioningState = original.ProvisioningStateRunning + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded + ProvisioningStateUpdating ProvisioningState = original.ProvisioningStateUpdating ) type ResourceIdentityType = original.ResourceIdentityType @@ -89,8 +140,11 @@ const ( type Application = original.Application type ApplicationArtifact = original.ApplicationArtifact +type ApplicationAuthorization = original.ApplicationAuthorization +type ApplicationBillingDetailsDefinition = original.ApplicationBillingDetailsDefinition type ApplicationClientDetails = original.ApplicationClientDetails type ApplicationDefinition = original.ApplicationDefinition +type ApplicationDefinitionArtifact = original.ApplicationDefinitionArtifact type ApplicationDefinitionListResult = original.ApplicationDefinitionListResult type ApplicationDefinitionListResultIterator = original.ApplicationDefinitionListResultIterator type ApplicationDefinitionListResultPage = original.ApplicationDefinitionListResultPage @@ -100,13 +154,21 @@ type ApplicationDefinitionsCreateOrUpdateByIDFuture = original.ApplicationDefini type ApplicationDefinitionsCreateOrUpdateFuture = original.ApplicationDefinitionsCreateOrUpdateFuture type ApplicationDefinitionsDeleteByIDFuture = original.ApplicationDefinitionsDeleteByIDFuture type ApplicationDefinitionsDeleteFuture = original.ApplicationDefinitionsDeleteFuture +type ApplicationDeploymentPolicy = original.ApplicationDeploymentPolicy +type ApplicationJitAccessPolicy = original.ApplicationJitAccessPolicy type ApplicationListResult = original.ApplicationListResult type ApplicationListResultIterator = original.ApplicationListResultIterator type ApplicationListResultPage = original.ApplicationListResultPage +type ApplicationManagementPolicy = original.ApplicationManagementPolicy +type ApplicationNotificationEndpoint = original.ApplicationNotificationEndpoint +type ApplicationNotificationPolicy = original.ApplicationNotificationPolicy +type ApplicationPackageContact = original.ApplicationPackageContact +type ApplicationPackageLockingPolicyDefinition = original.ApplicationPackageLockingPolicyDefinition +type ApplicationPackageSupportUrls = original.ApplicationPackageSupportUrls type ApplicationPatchable = original.ApplicationPatchable +type ApplicationPolicy = original.ApplicationPolicy type ApplicationProperties = original.ApplicationProperties type ApplicationPropertiesPatchable = original.ApplicationPropertiesPatchable -type ApplicationProviderAuthorization = original.ApplicationProviderAuthorization type ApplicationsClient = original.ApplicationsClient type ApplicationsCreateOrUpdateByIDFuture = original.ApplicationsCreateOrUpdateByIDFuture type ApplicationsCreateOrUpdateFuture = original.ApplicationsCreateOrUpdateFuture @@ -117,6 +179,7 @@ type BaseClient = original.BaseClient type ErrorResponse = original.ErrorResponse type GenericResource = original.GenericResource type Identity = original.Identity +type JitApproverDefinition = original.JitApproverDefinition type JitAuthorizationPolicies = original.JitAuthorizationPolicies type JitRequestDefinition = original.JitRequestDefinition type JitRequestDefinitionListResult = original.JitRequestDefinitionListResult @@ -177,12 +240,30 @@ func NewOperationListResultPage(getNextPage func(context.Context, OperationListR func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleApplicationArtifactNameValues() []ApplicationArtifactName { + return original.PossibleApplicationArtifactNameValues() +} func PossibleApplicationArtifactTypeValues() []ApplicationArtifactType { return original.PossibleApplicationArtifactTypeValues() } +func PossibleApplicationDefinitionArtifactNameValues() []ApplicationDefinitionArtifactName { + return original.PossibleApplicationDefinitionArtifactNameValues() +} func PossibleApplicationLockLevelValues() []ApplicationLockLevel { return original.PossibleApplicationLockLevelValues() } +func PossibleApplicationManagementModeValues() []ApplicationManagementMode { + return original.PossibleApplicationManagementModeValues() +} +func PossibleDeploymentModeValues() []DeploymentMode { + return original.PossibleDeploymentModeValues() +} +func PossibleJitApprovalModeValues() []JitApprovalMode { + return original.PossibleJitApprovalModeValues() +} +func PossibleJitApproverTypeValues() []JitApproverType { + return original.PossibleJitApproverTypeValues() +} func PossibleJitRequestStateValues() []JitRequestState { return original.PossibleJitRequestStateValues() } diff --git a/profiles/preview/storage/mgmt/storage/models.go b/profiles/preview/storage/mgmt/storage/models.go index 9ca2fa0a44be..2dc11b50d20b 100644 --- a/profiles/preview/storage/mgmt/storage/models.go +++ b/profiles/preview/storage/mgmt/storage/models.go @@ -39,6 +39,7 @@ const ( type AccountExpand = original.AccountExpand const ( + AccountExpandBlobRestoreStatus AccountExpand = original.AccountExpandBlobRestoreStatus AccountExpandGeoReplicationStats AccountExpand = original.AccountExpandGeoReplicationStats ) @@ -65,6 +66,14 @@ const ( Renew Action1 = original.Renew ) +type BlobRestoreProgressStatus = original.BlobRestoreProgressStatus + +const ( + Complete BlobRestoreProgressStatus = original.Complete + Failed BlobRestoreProgressStatus = original.Failed + InProgress BlobRestoreProgressStatus = original.InProgress +) + type Bypass = original.Bypass const ( @@ -203,10 +212,10 @@ const ( type PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningState const ( - Creating PrivateEndpointConnectionProvisioningState = original.Creating - Deleting PrivateEndpointConnectionProvisioningState = original.Deleting - Failed PrivateEndpointConnectionProvisioningState = original.Failed - Succeeded PrivateEndpointConnectionProvisioningState = original.Succeeded + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningStateCreating + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningStateDeleting + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningStateFailed + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = original.PrivateEndpointConnectionProvisioningStateSucceeded ) type PrivateEndpointServiceConnectionStatus = original.PrivateEndpointServiceConnectionStatus @@ -220,9 +229,9 @@ const ( type ProvisioningState = original.ProvisioningState const ( - ProvisioningStateCreating ProvisioningState = original.ProvisioningStateCreating - ProvisioningStateResolvingDNS ProvisioningState = original.ProvisioningStateResolvingDNS - ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded + Creating ProvisioningState = original.Creating + ResolvingDNS ProvisioningState = original.ResolvingDNS + Succeeded ProvisioningState = original.Succeeded ) type PublicAccess = original.PublicAccess @@ -340,12 +349,16 @@ type AccountUpdateParameters = original.AccountUpdateParameters type AccountsClient = original.AccountsClient type AccountsCreateFuture = original.AccountsCreateFuture type AccountsFailoverFuture = original.AccountsFailoverFuture +type AccountsRestoreBlobRangesFuture = original.AccountsRestoreBlobRangesFuture type ActiveDirectoryProperties = original.ActiveDirectoryProperties type AzureEntityResource = original.AzureEntityResource type AzureFilesIdentityBasedAuthentication = original.AzureFilesIdentityBasedAuthentication type BaseClient = original.BaseClient type BlobContainer = original.BlobContainer type BlobContainersClient = original.BlobContainersClient +type BlobRestoreParameters = original.BlobRestoreParameters +type BlobRestoreRange = original.BlobRestoreRange +type BlobRestoreStatus = original.BlobRestoreStatus type BlobServiceItems = original.BlobServiceItems type BlobServiceProperties = original.BlobServiceProperties type BlobServicePropertiesProperties = original.BlobServicePropertiesProperties @@ -423,6 +436,7 @@ type PrivateLinkResourcesClient = original.PrivateLinkResourcesClient type PrivateLinkServiceConnectionState = original.PrivateLinkServiceConnectionState type ProxyResource = original.ProxyResource type Resource = original.Resource +type RestorePolicyProperties = original.RestorePolicyProperties type Restriction = original.Restriction type RoutingPreference = original.RoutingPreference type SKUCapability = original.SKUCapability @@ -546,6 +560,9 @@ func PossibleAction1Values() []Action1 { func PossibleActionValues() []Action { return original.PossibleActionValues() } +func PossibleBlobRestoreProgressStatusValues() []BlobRestoreProgressStatus { + return original.PossibleBlobRestoreProgressStatusValues() +} func PossibleBypassValues() []Bypass { return original.PossibleBypassValues() } diff --git a/profiles/preview/web/mgmt/web/models.go b/profiles/preview/web/mgmt/web/models.go index f02ff4fd28c5..a4c7feba615a 100644 --- a/profiles/preview/web/mgmt/web/models.go +++ b/profiles/preview/web/mgmt/web/models.go @@ -934,6 +934,7 @@ type GeoRegionProperties = original.GeoRegionProperties type GlobalCsmSkuDescription = original.GlobalCsmSkuDescription type HTTPLogsConfig = original.HTTPLogsConfig type HandlerMapping = original.HandlerMapping +type HostKeys = original.HostKeys type HostName = original.HostName type HostNameBinding = original.HostNameBinding type HostNameBindingCollection = original.HostNameBindingCollection @@ -968,6 +969,7 @@ type JobCollection = original.JobCollection type JobCollectionIterator = original.JobCollectionIterator type JobCollectionPage = original.JobCollectionPage type JobProperties = original.JobProperties +type KeyInfo = original.KeyInfo type KeyVaultReferenceCollection = original.KeyVaultReferenceCollection type KeyVaultReferenceCollectionProperties = original.KeyVaultReferenceCollectionProperties type KeyVaultReferenceResource = original.KeyVaultReferenceResource diff --git a/services/aad/mgmt/2017-04-01/aad/client.go b/services/aad/mgmt/2017-04-01/aad/client.go index ebb03052e7f6..21da5e2430d4 100644 --- a/services/aad/mgmt/2017-04-01/aad/client.go +++ b/services/aad/mgmt/2017-04-01/aad/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/aad/mgmt/2017-04-01/aad/diagnosticsettings.go b/services/aad/mgmt/2017-04-01/aad/diagnosticsettings.go index 5ff8e8ac68f5..9c15175e09fd 100644 --- a/services/aad/mgmt/2017-04-01/aad/diagnosticsettings.go +++ b/services/aad/mgmt/2017-04-01/aad/diagnosticsettings.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsClient() DiagnosticSettingsClient { return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticSettingsClientWithBaseURI(baseURI string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI)} } diff --git a/services/aad/mgmt/2017-04-01/aad/diagnosticsettingscategory.go b/services/aad/mgmt/2017-04-01/aad/diagnosticsettingscategory.go index f6c31d9c2d96..6492c63b1280 100644 --- a/services/aad/mgmt/2017-04-01/aad/diagnosticsettingscategory.go +++ b/services/aad/mgmt/2017-04-01/aad/diagnosticsettingscategory.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsCategoryClient() DiagnosticSettingsCategoryClient { return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI)} } diff --git a/services/aad/mgmt/2017-04-01/aad/operations.go b/services/aad/mgmt/2017-04-01/aad/operations.go index 9df2a7a2e715..fb648e6ae3d4 100644 --- a/services/aad/mgmt/2017-04-01/aad/operations.go +++ b/services/aad/mgmt/2017-04-01/aad/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addomainservicemembers.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addomainservicemembers.go index 7750a6e2cbe9..4281567fa02a 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addomainservicemembers.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addomainservicemembers.go @@ -35,7 +35,9 @@ func NewAdDomainServiceMembersClient() AdDomainServiceMembersClient { return NewAdDomainServiceMembersClientWithBaseURI(DefaultBaseURI) } -// NewAdDomainServiceMembersClientWithBaseURI creates an instance of the AdDomainServiceMembersClient client. +// NewAdDomainServiceMembersClientWithBaseURI creates an instance of the AdDomainServiceMembersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewAdDomainServiceMembersClientWithBaseURI(baseURI string) AdDomainServiceMembersClient { return AdDomainServiceMembersClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservice.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservice.go index 26d13bf5f732..a7bee300193c 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservice.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservice.go @@ -36,7 +36,8 @@ func NewAddsServiceClient() AddsServiceClient { return NewAddsServiceClientWithBaseURI(DefaultBaseURI) } -// NewAddsServiceClientWithBaseURI creates an instance of the AddsServiceClient client. +// NewAddsServiceClientWithBaseURI creates an instance of the AddsServiceClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAddsServiceClientWithBaseURI(baseURI string) AddsServiceClient { return AddsServiceClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicemembers.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicemembers.go index 775a27cadeb0..60561bd175fb 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicemembers.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicemembers.go @@ -36,7 +36,9 @@ func NewAddsServiceMembersClient() AddsServiceMembersClient { return NewAddsServiceMembersClientWithBaseURI(DefaultBaseURI) } -// NewAddsServiceMembersClientWithBaseURI creates an instance of the AddsServiceMembersClient client. +// NewAddsServiceMembersClientWithBaseURI creates an instance of the AddsServiceMembersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAddsServiceMembersClientWithBaseURI(baseURI string) AddsServiceMembersClient { return AddsServiceMembersClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservices.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservices.go index dc3de52ff077..bac5d508b31a 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservices.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservices.go @@ -37,7 +37,8 @@ func NewAddsServicesClient() AddsServicesClient { return NewAddsServicesClientWithBaseURI(DefaultBaseURI) } -// NewAddsServicesClientWithBaseURI creates an instance of the AddsServicesClient client. +// NewAddsServicesClientWithBaseURI creates an instance of the AddsServicesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAddsServicesClientWithBaseURI(baseURI string) AddsServicesClient { return AddsServicesClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesreplicationstatus.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesreplicationstatus.go index 52b468736b7f..968ba2d1af85 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesreplicationstatus.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesreplicationstatus.go @@ -36,7 +36,8 @@ func NewAddsServicesReplicationStatusClient() AddsServicesReplicationStatusClien } // NewAddsServicesReplicationStatusClientWithBaseURI creates an instance of the AddsServicesReplicationStatusClient -// 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 NewAddsServicesReplicationStatusClientWithBaseURI(baseURI string) AddsServicesReplicationStatusClient { return AddsServicesReplicationStatusClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesservicemembers.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesservicemembers.go index 5ee5c587a494..e2f94f0fe57b 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesservicemembers.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesservicemembers.go @@ -35,7 +35,9 @@ func NewAddsServicesServiceMembersClient() AddsServicesServiceMembersClient { return NewAddsServicesServiceMembersClientWithBaseURI(DefaultBaseURI) } -// NewAddsServicesServiceMembersClientWithBaseURI creates an instance of the AddsServicesServiceMembersClient client. +// NewAddsServicesServiceMembersClientWithBaseURI creates an instance of the AddsServicesServiceMembersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAddsServicesServiceMembersClientWithBaseURI(baseURI string) AddsServicesServiceMembersClient { return AddsServicesServiceMembersClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesuserpreference.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesuserpreference.go index 589e6c5d2166..478a26606f8e 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesuserpreference.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/addsservicesuserpreference.go @@ -35,7 +35,9 @@ func NewAddsServicesUserPreferenceClient() AddsServicesUserPreferenceClient { return NewAddsServicesUserPreferenceClientWithBaseURI(DefaultBaseURI) } -// NewAddsServicesUserPreferenceClientWithBaseURI creates an instance of the AddsServicesUserPreferenceClient client. +// NewAddsServicesUserPreferenceClientWithBaseURI creates an instance of the AddsServicesUserPreferenceClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAddsServicesUserPreferenceClientWithBaseURI(baseURI string) AddsServicesUserPreferenceClient { return AddsServicesUserPreferenceClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/adhybridhealthserviceapi/interfaces.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/adhybridhealthserviceapi/interfaces.go index 155e02300b37..2849c870b45d 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/adhybridhealthserviceapi/interfaces.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/adhybridhealthserviceapi/interfaces.go @@ -34,13 +34,19 @@ type AddsServicesClientAPI interface { GetMetricMetadata(ctx context.Context, serviceName string, metricName string) (result adhybridhealthservice.MetricMetadata, err error) GetMetricMetadataForGroup(ctx context.Context, serviceName string, metricName string, groupName string, groupKey string, fromDate *date.Time, toDate *date.Time) (result adhybridhealthservice.MetricSets, err error) List(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result adhybridhealthservice.ServicesPage, err error) + ListComplete(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result adhybridhealthservice.ServicesIterator, err error) ListMetricMetadata(ctx context.Context, serviceName string, filter string, perfCounter *bool) (result adhybridhealthservice.MetricMetadataListPage, err error) + ListMetricMetadataComplete(ctx context.Context, serviceName string, filter string, perfCounter *bool) (result adhybridhealthservice.MetricMetadataListIterator, err error) ListMetricsAverage(ctx context.Context, serviceName string, metricName string, groupName string) (result adhybridhealthservice.MetricsPage, err error) + ListMetricsAverageComplete(ctx context.Context, serviceName string, metricName string, groupName string) (result adhybridhealthservice.MetricsIterator, err error) ListMetricsSum(ctx context.Context, serviceName string, metricName string, groupName string) (result adhybridhealthservice.MetricsPage, err error) + ListMetricsSumComplete(ctx context.Context, serviceName string, metricName string, groupName string) (result adhybridhealthservice.MetricsIterator, err error) ListPremiumServices(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result adhybridhealthservice.ServicesPage, err error) + ListPremiumServicesComplete(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result adhybridhealthservice.ServicesIterator, err error) ListReplicationDetails(ctx context.Context, serviceName string, filter string, withDetails *bool) (result adhybridhealthservice.ReplicationDetailsList, err error) ListReplicationSummary(ctx context.Context, serviceName string, isGroupbySite bool, query string, filter string, takeCount *int32) (result adhybridhealthservice.ReplicationSummaryList, err error) ListServerAlerts(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result adhybridhealthservice.AlertsPage, err error) + ListServerAlertsComplete(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result adhybridhealthservice.AlertsIterator, err error) Update(ctx context.Context, serviceName string, service adhybridhealthservice.ServiceProperties) (result adhybridhealthservice.ServiceProperties, err error) } @@ -49,6 +55,7 @@ var _ AddsServicesClientAPI = (*adhybridhealthservice.AddsServicesClient)(nil) // AlertsClientAPI contains the set of methods on the AlertsClient type. type AlertsClientAPI interface { ListAddsAlerts(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result adhybridhealthservice.AlertsPage, err error) + ListAddsAlertsComplete(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result adhybridhealthservice.AlertsIterator, err error) } var _ AlertsClientAPI = (*adhybridhealthservice.AlertsClient)(nil) @@ -58,6 +65,7 @@ type ConfigurationClientAPI interface { Add(ctx context.Context) (result adhybridhealthservice.Tenant, err error) Get(ctx context.Context) (result adhybridhealthservice.Tenant, err error) ListAddsConfigurations(ctx context.Context, serviceName string, grouping string) (result adhybridhealthservice.AddsConfigurationPage, err error) + ListAddsConfigurationsComplete(ctx context.Context, serviceName string, grouping string) (result adhybridhealthservice.AddsConfigurationIterator, err error) Update(ctx context.Context, tenant adhybridhealthservice.Tenant) (result adhybridhealthservice.Tenant, err error) } @@ -66,6 +74,7 @@ var _ ConfigurationClientAPI = (*adhybridhealthservice.ConfigurationClient)(nil) // DimensionsClientAPI contains the set of methods on the DimensionsClient type. type DimensionsClientAPI interface { ListAddsDimensions(ctx context.Context, serviceName string, dimension string) (result adhybridhealthservice.DimensionsPage, err error) + ListAddsDimensionsComplete(ctx context.Context, serviceName string, dimension string) (result adhybridhealthservice.DimensionsIterator, err error) } var _ DimensionsClientAPI = (*adhybridhealthservice.DimensionsClient)(nil) @@ -75,6 +84,7 @@ type AddsServiceMembersClientAPI interface { Delete(ctx context.Context, serviceName string, serviceMemberID uuid.UUID, confirm *bool) (result autorest.Response, err error) Get(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result adhybridhealthservice.ServiceMember, err error) List(ctx context.Context, serviceName string, filter string) (result adhybridhealthservice.AddsServiceMembersPage, err error) + ListComplete(ctx context.Context, serviceName string, filter string) (result adhybridhealthservice.AddsServiceMembersIterator, err error) ListCredentials(ctx context.Context, serviceName string, serviceMemberID uuid.UUID, filter string) (result adhybridhealthservice.Credentials, err error) } @@ -83,6 +93,7 @@ var _ AddsServiceMembersClientAPI = (*adhybridhealthservice.AddsServiceMembersCl // AdDomainServiceMembersClientAPI contains the set of methods on the AdDomainServiceMembersClient type. type AdDomainServiceMembersClientAPI interface { List(ctx context.Context, serviceName string, isGroupbySite bool, filter string, query string, takeCount *int32) (result adhybridhealthservice.AddsServiceMembersPage, err error) + ListComplete(ctx context.Context, serviceName string, isGroupbySite bool, filter string, query string, takeCount *int32) (result adhybridhealthservice.AddsServiceMembersIterator, err error) } var _ AdDomainServiceMembersClientAPI = (*adhybridhealthservice.AdDomainServiceMembersClient)(nil) @@ -114,6 +125,7 @@ var _ AddsServicesReplicationStatusClientAPI = (*adhybridhealthservice.AddsServi type AddsServicesServiceMembersClientAPI interface { Add(ctx context.Context, serviceName string, serviceMember adhybridhealthservice.ServiceMember) (result adhybridhealthservice.ServiceMember, err error) List(ctx context.Context, serviceName string, filter string, dimensionType string, dimensionSignature string) (result adhybridhealthservice.ServiceMembersPage, err error) + ListComplete(ctx context.Context, serviceName string, filter string, dimensionType string, dimensionSignature string) (result adhybridhealthservice.ServiceMembersIterator, err error) } var _ AddsServicesServiceMembersClientAPI = (*adhybridhealthservice.AddsServicesServiceMembersClient)(nil) @@ -121,6 +133,7 @@ var _ AddsServicesServiceMembersClientAPI = (*adhybridhealthservice.AddsServices // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result adhybridhealthservice.OperationListResponsePage, err error) + ListComplete(ctx context.Context) (result adhybridhealthservice.OperationListResponseIterator, err error) } var _ OperationsClientAPI = (*adhybridhealthservice.OperationsClient)(nil) @@ -143,18 +156,25 @@ type ServicesClientAPI interface { GetMetricMetadataForGroup(ctx context.Context, serviceName string, metricName string, groupName string, groupKey string, fromDate *date.Time, toDate *date.Time) (result adhybridhealthservice.MetricSets, err error) GetTenantWhitelisting(ctx context.Context, serviceName string, featureName string) (result adhybridhealthservice.Result, err error) List(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result adhybridhealthservice.ServicesPage, err error) + ListComplete(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result adhybridhealthservice.ServicesIterator, err error) ListAlertFeedback(ctx context.Context, serviceName string, shortName string) (result adhybridhealthservice.AlertFeedbacks, err error) ListAlerts(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result adhybridhealthservice.AlertsPage, err error) + ListAlertsComplete(ctx context.Context, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result adhybridhealthservice.AlertsIterator, err error) ListAllRiskyIPDownloadReport(ctx context.Context, serviceName string) (result adhybridhealthservice.RiskyIPBlobUris, err error) ListCurrentRiskyIPDownloadReport(ctx context.Context, serviceName string) (result adhybridhealthservice.RiskyIPBlobUris, err error) ListExportErrors(ctx context.Context, serviceName string) (result adhybridhealthservice.ErrorCounts, err error) ListExportErrorsV2(ctx context.Context, serviceName string, errorBucket string) (result adhybridhealthservice.MergedExportErrors, err error) ListExportStatus(ctx context.Context, serviceName string) (result adhybridhealthservice.ExportStatusesPage, err error) + ListExportStatusComplete(ctx context.Context, serviceName string) (result adhybridhealthservice.ExportStatusesIterator, err error) ListMetricMetadata(ctx context.Context, serviceName string, filter string, perfCounter *bool) (result adhybridhealthservice.MetricMetadataListPage, err error) + ListMetricMetadataComplete(ctx context.Context, serviceName string, filter string, perfCounter *bool) (result adhybridhealthservice.MetricMetadataListIterator, err error) ListMetricsAverage(ctx context.Context, serviceName string, metricName string, groupName string) (result adhybridhealthservice.MetricsPage, err error) + ListMetricsAverageComplete(ctx context.Context, serviceName string, metricName string, groupName string) (result adhybridhealthservice.MetricsIterator, err error) ListMetricsSum(ctx context.Context, serviceName string, metricName string, groupName string) (result adhybridhealthservice.MetricsPage, err error) + ListMetricsSumComplete(ctx context.Context, serviceName string, metricName string, groupName string) (result adhybridhealthservice.MetricsIterator, err error) ListMonitoringConfigurations(ctx context.Context, serviceName string) (result adhybridhealthservice.Items, err error) ListPremium(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result adhybridhealthservice.ServicesPage, err error) + ListPremiumComplete(ctx context.Context, filter string, serviceType string, skipCount *int32, takeCount *int32) (result adhybridhealthservice.ServicesIterator, err error) ListUserBadPasswordReport(ctx context.Context, serviceName string, dataSource string) (result adhybridhealthservice.ErrorReportUsersEntries, err error) Update(ctx context.Context, serviceName string, service adhybridhealthservice.ServiceProperties) (result adhybridhealthservice.ServiceProperties, err error) UpdateMonitoringConfiguration(ctx context.Context, serviceName string, configurationSetting adhybridhealthservice.Item) (result autorest.Response, err error) @@ -179,11 +199,14 @@ type ServiceMembersClientAPI interface { GetMetrics(ctx context.Context, serviceName string, metricName string, groupName string, serviceMemberID uuid.UUID, groupKey string, fromDate *date.Time, toDate *date.Time) (result adhybridhealthservice.MetricSets, err error) GetServiceConfiguration(ctx context.Context, serviceName string, serviceMemberID string) (result adhybridhealthservice.ServiceConfiguration, err error) List(ctx context.Context, serviceName string, filter string, dimensionType string, dimensionSignature string) (result adhybridhealthservice.ServiceMembersPage, err error) + ListComplete(ctx context.Context, serviceName string, filter string, dimensionType string, dimensionSignature string) (result adhybridhealthservice.ServiceMembersIterator, err error) ListAlerts(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result adhybridhealthservice.AlertsPage, err error) + ListAlertsComplete(ctx context.Context, serviceMemberID uuid.UUID, serviceName string, filter string, state string, from *date.Time, toParameter *date.Time) (result adhybridhealthservice.AlertsIterator, err error) ListConnectors(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result adhybridhealthservice.Connectors, err error) ListCredentials(ctx context.Context, serviceName string, serviceMemberID uuid.UUID, filter string) (result adhybridhealthservice.Credentials, err error) ListDataFreshness(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result adhybridhealthservice.DataFreshnessDetails, err error) ListExportStatus(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result adhybridhealthservice.ExportStatusesPage, err error) + ListExportStatusComplete(ctx context.Context, serviceName string, serviceMemberID uuid.UUID) (result adhybridhealthservice.ExportStatusesIterator, err error) ListGlobalConfiguration(ctx context.Context, serviceName string, serviceMemberID string) (result adhybridhealthservice.GlobalConfigurations, err error) } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/alerts.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/alerts.go index ca35ad98614e..4b4e22ae7d2d 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/alerts.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/alerts.go @@ -36,7 +36,8 @@ func NewAlertsClient() AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/client.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/client.go index eaa80ab1891c..db9117b8cb23 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/client.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/configuration.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/configuration.go index 4d4cba51f347..2d8c5547ca6e 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/configuration.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/configuration.go @@ -35,7 +35,8 @@ func NewConfigurationClient() ConfigurationClient { return NewConfigurationClientWithBaseURI(DefaultBaseURI) } -// NewConfigurationClientWithBaseURI creates an instance of the ConfigurationClient client. +// NewConfigurationClientWithBaseURI creates an instance of the ConfigurationClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationClientWithBaseURI(baseURI string) ConfigurationClient { return ConfigurationClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/dimensions.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/dimensions.go index b509434a4431..dc576f54569f 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/dimensions.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/dimensions.go @@ -35,7 +35,8 @@ func NewDimensionsClient() DimensionsClient { return NewDimensionsClientWithBaseURI(DefaultBaseURI) } -// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client. +// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDimensionsClientWithBaseURI(baseURI string) DimensionsClient { return DimensionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/operations.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/operations.go index 375eb4de36a6..5089278cdad4 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/operations.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/reports.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/reports.go index a021a4c743bc..8b031dbf8288 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/reports.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/reports.go @@ -35,7 +35,8 @@ func NewReportsClient() ReportsClient { return NewReportsClientWithBaseURI(DefaultBaseURI) } -// NewReportsClientWithBaseURI creates an instance of the ReportsClient client. +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportsClientWithBaseURI(baseURI string) ReportsClient { return ReportsClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/service.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/service.go index 8fac4925732a..42286b7844db 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/service.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/service.go @@ -36,7 +36,8 @@ func NewServiceClient() ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/servicemembers.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/servicemembers.go index 2e73f76389c6..05a0412fc9f4 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/servicemembers.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/servicemembers.go @@ -37,7 +37,8 @@ func NewServiceMembersClient() ServiceMembersClient { return NewServiceMembersClientWithBaseURI(DefaultBaseURI) } -// NewServiceMembersClientWithBaseURI creates an instance of the ServiceMembersClient client. +// NewServiceMembersClientWithBaseURI creates an instance of the ServiceMembersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceMembersClientWithBaseURI(baseURI string) ServiceMembersClient { return ServiceMembersClient{NewWithBaseURI(baseURI)} } diff --git a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/services.go b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/services.go index 6eb2fc55d0c6..d7acabf2d4b8 100644 --- a/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/services.go +++ b/services/adhybridhealthservice/mgmt/2014-01-01/adhybridhealthservice/services.go @@ -36,7 +36,8 @@ func NewServicesClient() ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI)} } diff --git a/services/advisor/mgmt/2017-03-31/advisor/advisorapi/interfaces.go b/services/advisor/mgmt/2017-03-31/advisor/advisorapi/interfaces.go index e06ee78eb1a4..b2ddbf1179ad 100644 --- a/services/advisor/mgmt/2017-03-31/advisor/advisorapi/interfaces.go +++ b/services/advisor/mgmt/2017-03-31/advisor/advisorapi/interfaces.go @@ -30,6 +30,7 @@ type RecommendationsClientAPI interface { Get(ctx context.Context, resourceURI string, recommendationID string) (result advisor.ResourceRecommendationBase, err error) GetGenerateStatus(ctx context.Context, operationID uuid.UUID) (result autorest.Response, err error) List(ctx context.Context, filter string, top *int32, skipToken string) (result advisor.ResourceRecommendationBaseListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skipToken string) (result advisor.ResourceRecommendationBaseListResultIterator, err error) } var _ RecommendationsClientAPI = (*advisor.RecommendationsClient)(nil) @@ -37,6 +38,7 @@ var _ RecommendationsClientAPI = (*advisor.RecommendationsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result advisor.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result advisor.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*advisor.OperationsClient)(nil) diff --git a/services/advisor/mgmt/2017-03-31/advisor/client.go b/services/advisor/mgmt/2017-03-31/advisor/client.go index c43dd4655583..64717270538f 100644 --- a/services/advisor/mgmt/2017-03-31/advisor/client.go +++ b/services/advisor/mgmt/2017-03-31/advisor/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/advisor/mgmt/2017-03-31/advisor/operations.go b/services/advisor/mgmt/2017-03-31/advisor/operations.go index 1ddf8eabeb38..2c886b047723 100644 --- a/services/advisor/mgmt/2017-03-31/advisor/operations.go +++ b/services/advisor/mgmt/2017-03-31/advisor/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/advisor/mgmt/2017-03-31/advisor/recommendations.go b/services/advisor/mgmt/2017-03-31/advisor/recommendations.go index ab9757fe0752..94508745573b 100644 --- a/services/advisor/mgmt/2017-03-31/advisor/recommendations.go +++ b/services/advisor/mgmt/2017-03-31/advisor/recommendations.go @@ -36,7 +36,8 @@ func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/advisor/mgmt/2017-03-31/advisor/suppressions.go b/services/advisor/mgmt/2017-03-31/advisor/suppressions.go index 64a940207dcf..c36518f993f0 100644 --- a/services/advisor/mgmt/2017-03-31/advisor/suppressions.go +++ b/services/advisor/mgmt/2017-03-31/advisor/suppressions.go @@ -35,7 +35,8 @@ func NewSuppressionsClient(subscriptionID string) SuppressionsClient { return NewSuppressionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient client. +// NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSuppressionsClientWithBaseURI(baseURI string, subscriptionID string) SuppressionsClient { return SuppressionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/advisor/mgmt/2017-04-19/advisor/advisorapi/interfaces.go b/services/advisor/mgmt/2017-04-19/advisor/advisorapi/interfaces.go index 34662da81336..4c4529c87a1a 100644 --- a/services/advisor/mgmt/2017-04-19/advisor/advisorapi/interfaces.go +++ b/services/advisor/mgmt/2017-04-19/advisor/advisorapi/interfaces.go @@ -28,6 +28,7 @@ import ( type RecommendationMetadataClientAPI interface { Get(ctx context.Context, name string) (result advisor.SetObject, err error) List(ctx context.Context) (result advisor.MetadataEntityListResultPage, err error) + ListComplete(ctx context.Context) (result advisor.MetadataEntityListResultIterator, err error) } var _ RecommendationMetadataClientAPI = (*advisor.RecommendationMetadataClient)(nil) @@ -38,6 +39,7 @@ type ConfigurationsClientAPI interface { CreateInSubscription(ctx context.Context, configContract advisor.ConfigData) (result advisor.ARMErrorResponseBody, err error) ListByResourceGroup(ctx context.Context, resourceGroup string) (result advisor.ConfigurationListResult, err error) ListBySubscription(ctx context.Context) (result advisor.ConfigurationListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result advisor.ConfigurationListResultIterator, err error) } var _ ConfigurationsClientAPI = (*advisor.ConfigurationsClient)(nil) @@ -48,6 +50,7 @@ type RecommendationsClientAPI interface { Get(ctx context.Context, resourceURI string, recommendationID string) (result advisor.ResourceRecommendationBase, err error) GetGenerateStatus(ctx context.Context, operationID uuid.UUID) (result autorest.Response, err error) List(ctx context.Context, filter string, top *int32, skipToken string) (result advisor.ResourceRecommendationBaseListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skipToken string) (result advisor.ResourceRecommendationBaseListResultIterator, err error) } var _ RecommendationsClientAPI = (*advisor.RecommendationsClient)(nil) @@ -55,6 +58,7 @@ var _ RecommendationsClientAPI = (*advisor.RecommendationsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result advisor.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result advisor.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*advisor.OperationsClient)(nil) @@ -65,6 +69,7 @@ type SuppressionsClientAPI interface { Delete(ctx context.Context, resourceURI string, recommendationID string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceURI string, recommendationID string, name string) (result advisor.SuppressionContract, err error) List(ctx context.Context, top *int32, skipToken string) (result advisor.SuppressionContractListResultPage, err error) + ListComplete(ctx context.Context, top *int32, skipToken string) (result advisor.SuppressionContractListResultIterator, err error) } var _ SuppressionsClientAPI = (*advisor.SuppressionsClient)(nil) diff --git a/services/advisor/mgmt/2017-04-19/advisor/client.go b/services/advisor/mgmt/2017-04-19/advisor/client.go index f320f0f9d6db..fd7953fffb64 100644 --- a/services/advisor/mgmt/2017-04-19/advisor/client.go +++ b/services/advisor/mgmt/2017-04-19/advisor/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/advisor/mgmt/2017-04-19/advisor/configurations.go b/services/advisor/mgmt/2017-04-19/advisor/configurations.go index 3540a1ea7a9b..3e3c8601ec89 100644 --- a/services/advisor/mgmt/2017-04-19/advisor/configurations.go +++ b/services/advisor/mgmt/2017-04-19/advisor/configurations.go @@ -35,7 +35,8 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/advisor/mgmt/2017-04-19/advisor/operations.go b/services/advisor/mgmt/2017-04-19/advisor/operations.go index bc10c5b682f7..04258ef88a62 100644 --- a/services/advisor/mgmt/2017-04-19/advisor/operations.go +++ b/services/advisor/mgmt/2017-04-19/advisor/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/advisor/mgmt/2017-04-19/advisor/recommendationmetadata.go b/services/advisor/mgmt/2017-04-19/advisor/recommendationmetadata.go index bef688fdedc9..6373c75f65b7 100644 --- a/services/advisor/mgmt/2017-04-19/advisor/recommendationmetadata.go +++ b/services/advisor/mgmt/2017-04-19/advisor/recommendationmetadata.go @@ -35,7 +35,9 @@ func NewRecommendationMetadataClient(subscriptionID string) RecommendationMetada return NewRecommendationMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationMetadataClientWithBaseURI creates an instance of the RecommendationMetadataClient client. +// NewRecommendationMetadataClientWithBaseURI creates an instance of the RecommendationMetadataClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRecommendationMetadataClientWithBaseURI(baseURI string, subscriptionID string) RecommendationMetadataClient { return RecommendationMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/advisor/mgmt/2017-04-19/advisor/recommendations.go b/services/advisor/mgmt/2017-04-19/advisor/recommendations.go index 6bb3018b27c4..e7db55ad3f1d 100644 --- a/services/advisor/mgmt/2017-04-19/advisor/recommendations.go +++ b/services/advisor/mgmt/2017-04-19/advisor/recommendations.go @@ -36,7 +36,8 @@ func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/advisor/mgmt/2017-04-19/advisor/suppressions.go b/services/advisor/mgmt/2017-04-19/advisor/suppressions.go index 542662ef3a11..8c54755013da 100644 --- a/services/advisor/mgmt/2017-04-19/advisor/suppressions.go +++ b/services/advisor/mgmt/2017-04-19/advisor/suppressions.go @@ -35,7 +35,8 @@ func NewSuppressionsClient(subscriptionID string) SuppressionsClient { return NewSuppressionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient client. +// NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSuppressionsClientWithBaseURI(baseURI string, subscriptionID string) SuppressionsClient { return SuppressionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/alerts.go b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/alerts.go index b335d032f1a1..64ce189455f6 100644 --- a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/alerts.go +++ b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/alerts.go @@ -35,7 +35,8 @@ func NewAlertsClient(subscriptionID string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/alertsmanagementapi/interfaces.go b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/alertsmanagementapi/interfaces.go index c49917380add..7180f14fa80c 100644 --- a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/alertsmanagementapi/interfaces.go +++ b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/alertsmanagementapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result alertsmanagement.OperationsListPage, err error) + ListComplete(ctx context.Context) (result alertsmanagement.OperationsListIterator, err error) } var _ OperationsClientAPI = (*alertsmanagement.OperationsClient)(nil) @@ -33,6 +34,7 @@ var _ OperationsClientAPI = (*alertsmanagement.OperationsClient)(nil) type AlertsClientAPI interface { ChangeState(ctx context.Context, alertID string, newState alertsmanagement.AlertState) (result alertsmanagement.Alert, err error) GetAll(ctx context.Context, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, smartGroupID string, includeContext *bool, includeEgressConfig *bool, pageCount *int32, sortBy alertsmanagement.AlertsSortByFields, sortOrder string, selectParameter string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsListPage, err error) + GetAllComplete(ctx context.Context, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, smartGroupID string, includeContext *bool, includeEgressConfig *bool, pageCount *int32, sortBy alertsmanagement.AlertsSortByFields, sortOrder string, selectParameter string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsListIterator, err error) GetByID(ctx context.Context, alertID string) (result alertsmanagement.Alert, err error) GetHistory(ctx context.Context, alertID string) (result alertsmanagement.AlertModification, err error) GetSummary(ctx context.Context, groupby alertsmanagement.AlertsSummaryGroupByFields, includeSmartGroupsCount *bool, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsSummary, err error) @@ -44,6 +46,7 @@ var _ AlertsClientAPI = (*alertsmanagement.AlertsClient)(nil) type SmartGroupsClientAPI interface { ChangeState(ctx context.Context, smartGroupID string, newState alertsmanagement.AlertState) (result alertsmanagement.SmartGroup, err error) GetAll(ctx context.Context, targetResource string, targetResourceGroup string, targetResourceType string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, smartGroupState alertsmanagement.AlertState, timeRange alertsmanagement.TimeRange, pageCount *int32, sortBy alertsmanagement.SmartGroupsSortByFields, sortOrder string) (result alertsmanagement.SmartGroupsListPage, err error) + GetAllComplete(ctx context.Context, targetResource string, targetResourceGroup string, targetResourceType string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, smartGroupState alertsmanagement.AlertState, timeRange alertsmanagement.TimeRange, pageCount *int32, sortBy alertsmanagement.SmartGroupsSortByFields, sortOrder string) (result alertsmanagement.SmartGroupsListIterator, err error) GetByID(ctx context.Context, smartGroupID string) (result alertsmanagement.SmartGroup, err error) GetHistory(ctx context.Context, smartGroupID string) (result alertsmanagement.SmartGroupModification, err error) } diff --git a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/client.go b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/client.go index 399aaf502181..038107452173 100644 --- a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/client.go +++ b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/operations.go b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/operations.go index 2232ea7fe262..be7414e6cff0 100644 --- a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/operations.go +++ b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/smartgroups.go b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/smartgroups.go index 80c111bfc0a4..feb8bedffd65 100644 --- a/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/smartgroups.go +++ b/services/alertsmanagement/mgmt/2018-05-05/alertsmanagement/smartgroups.go @@ -35,7 +35,8 @@ func NewSmartGroupsClient(subscriptionID string) SmartGroupsClient { return NewSmartGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSmartGroupsClientWithBaseURI creates an instance of the SmartGroupsClient client. +// NewSmartGroupsClientWithBaseURI creates an instance of the SmartGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSmartGroupsClientWithBaseURI(baseURI string, subscriptionID string) SmartGroupsClient { return SmartGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/alerts.go b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/alerts.go index b88e22e45cf6..8ae45878a1cc 100644 --- a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/alerts.go +++ b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/alerts.go @@ -35,7 +35,8 @@ func NewAlertsClient(scope string, subscriptionID string, subscriptionID1 string return NewAlertsClientWithBaseURI(DefaultBaseURI, scope, subscriptionID, subscriptionID1) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, scope string, subscriptionID string, subscriptionID1 string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, scope, subscriptionID, subscriptionID1)} } diff --git a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/alertsmanagementapi/interfaces.go b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/alertsmanagementapi/interfaces.go index 606ce4371858..3ad0485eac3c 100644 --- a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/alertsmanagementapi/interfaces.go +++ b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/alertsmanagementapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result alertsmanagement.OperationsListPage, err error) + ListComplete(ctx context.Context) (result alertsmanagement.OperationsListIterator, err error) } var _ OperationsClientAPI = (*alertsmanagement.OperationsClient)(nil) @@ -34,6 +35,7 @@ var _ OperationsClientAPI = (*alertsmanagement.OperationsClient)(nil) type AlertsClientAPI interface { ChangeState(ctx context.Context, alertID string, newState alertsmanagement.AlertState) (result alertsmanagement.Alert, err error) GetAll(ctx context.Context, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, smartGroupID string, includeContext *bool, includeEgressConfig *bool, pageCount *int32, sortBy alertsmanagement.AlertsSortByFields, sortOrder string, selectParameter string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsListPage, err error) + GetAllComplete(ctx context.Context, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, smartGroupID string, includeContext *bool, includeEgressConfig *bool, pageCount *int32, sortBy alertsmanagement.AlertsSortByFields, sortOrder string, selectParameter string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsListIterator, err error) GetByID(ctx context.Context, alertID string) (result alertsmanagement.Alert, err error) GetHistory(ctx context.Context, alertID string) (result alertsmanagement.AlertModification, err error) GetSummary(ctx context.Context, groupby alertsmanagement.AlertsSummaryGroupByFields, includeSmartGroupsCount *bool, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsSummary, err error) @@ -57,7 +59,9 @@ type SmartDetectorAlertRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, alertRuleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, alertRuleName string, expandDetector *bool) (result alertsmanagement.AlertRule, err error) List(ctx context.Context) (result alertsmanagement.AlertRulesListPage, err error) + ListComplete(ctx context.Context) (result alertsmanagement.AlertRulesListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result alertsmanagement.AlertRulesListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result alertsmanagement.AlertRulesListIterator, err error) } var _ SmartDetectorAlertRulesClientAPI = (*alertsmanagement.SmartDetectorAlertRulesClient)(nil) diff --git a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/client.go b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/client.go index 6aa6e5818576..4ccfb0152839 100644 --- a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/client.go +++ b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/client.go @@ -43,7 +43,8 @@ func New(scope string, subscriptionID string, subscriptionID1 string) BaseClient return NewWithBaseURI(DefaultBaseURI, scope, subscriptionID, subscriptionID1) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, scope string, subscriptionID string, subscriptionID1 string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/operations.go b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/operations.go index 2854366a5e6f..9e60352ce1ae 100644 --- a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/operations.go +++ b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(scope string, subscriptionID string, subscriptionID1 st return NewOperationsClientWithBaseURI(DefaultBaseURI, scope, subscriptionID, subscriptionID1) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, scope string, subscriptionID string, subscriptionID1 string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, scope, subscriptionID, subscriptionID1)} } diff --git a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/smartdetectoralertrules.go b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/smartdetectoralertrules.go index a5154973e0b4..a66da943d386 100644 --- a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/smartdetectoralertrules.go +++ b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/smartdetectoralertrules.go @@ -36,7 +36,9 @@ func NewSmartDetectorAlertRulesClient(scope string, subscriptionID string, subsc return NewSmartDetectorAlertRulesClientWithBaseURI(DefaultBaseURI, scope, subscriptionID, subscriptionID1) } -// NewSmartDetectorAlertRulesClientWithBaseURI creates an instance of the SmartDetectorAlertRulesClient client. +// NewSmartDetectorAlertRulesClientWithBaseURI creates an instance of the SmartDetectorAlertRulesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewSmartDetectorAlertRulesClientWithBaseURI(baseURI string, scope string, subscriptionID string, subscriptionID1 string) SmartDetectorAlertRulesClient { return SmartDetectorAlertRulesClient{NewWithBaseURI(baseURI, scope, subscriptionID, subscriptionID1)} } diff --git a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/smartgroups.go b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/smartgroups.go index 1fcd1ef713ee..7ccff503dd44 100644 --- a/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/smartgroups.go +++ b/services/alertsmanagement/mgmt/2019-03-01/alertsmanagement/smartgroups.go @@ -35,7 +35,8 @@ func NewSmartGroupsClient(scope string, subscriptionID string, subscriptionID1 s return NewSmartGroupsClientWithBaseURI(DefaultBaseURI, scope, subscriptionID, subscriptionID1) } -// NewSmartGroupsClientWithBaseURI creates an instance of the SmartGroupsClient client. +// NewSmartGroupsClientWithBaseURI creates an instance of the SmartGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSmartGroupsClientWithBaseURI(baseURI string, scope string, subscriptionID string, subscriptionID1 string) SmartGroupsClient { return SmartGroupsClient{NewWithBaseURI(baseURI, scope, subscriptionID, subscriptionID1)} } diff --git a/services/analysisservices/mgmt/2016-05-16/analysisservices/client.go b/services/analysisservices/mgmt/2016-05-16/analysisservices/client.go index 23d67038c024..544a35096efa 100644 --- a/services/analysisservices/mgmt/2016-05-16/analysisservices/client.go +++ b/services/analysisservices/mgmt/2016-05-16/analysisservices/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/analysisservices/mgmt/2016-05-16/analysisservices/servers.go b/services/analysisservices/mgmt/2016-05-16/analysisservices/servers.go index 6a6a35328e5c..4942fb103e67 100644 --- a/services/analysisservices/mgmt/2016-05-16/analysisservices/servers.go +++ b/services/analysisservices/mgmt/2016-05-16/analysisservices/servers.go @@ -37,7 +37,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/analysisservices/mgmt/2017-07-14/analysisservices/client.go b/services/analysisservices/mgmt/2017-07-14/analysisservices/client.go index a971093405f5..1dc71f3bf8e7 100644 --- a/services/analysisservices/mgmt/2017-07-14/analysisservices/client.go +++ b/services/analysisservices/mgmt/2017-07-14/analysisservices/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/analysisservices/mgmt/2017-07-14/analysisservices/servers.go b/services/analysisservices/mgmt/2017-07-14/analysisservices/servers.go index 1de703445275..75e9625f161c 100644 --- a/services/analysisservices/mgmt/2017-07-14/analysisservices/servers.go +++ b/services/analysisservices/mgmt/2017-07-14/analysisservices/servers.go @@ -37,7 +37,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/analysisservices/mgmt/2017-08-01/analysisservices/analysisservicesapi/interfaces.go b/services/analysisservices/mgmt/2017-08-01/analysisservices/analysisservicesapi/interfaces.go index babf2355c659..0092238a10a4 100644 --- a/services/analysisservices/mgmt/2017-08-01/analysisservices/analysisservicesapi/interfaces.go +++ b/services/analysisservices/mgmt/2017-08-01/analysisservices/analysisservicesapi/interfaces.go @@ -47,6 +47,7 @@ var _ ServersClientAPI = (*analysisservices.ServersClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result analysisservices.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result analysisservices.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*analysisservices.OperationsClient)(nil) diff --git a/services/analysisservices/mgmt/2017-08-01/analysisservices/client.go b/services/analysisservices/mgmt/2017-08-01/analysisservices/client.go index 36c86b68d0b4..be0a6e353c97 100644 --- a/services/analysisservices/mgmt/2017-08-01/analysisservices/client.go +++ b/services/analysisservices/mgmt/2017-08-01/analysisservices/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/analysisservices/mgmt/2017-08-01/analysisservices/operations.go b/services/analysisservices/mgmt/2017-08-01/analysisservices/operations.go index 57851ab0f557..5094d8a31fab 100644 --- a/services/analysisservices/mgmt/2017-08-01/analysisservices/operations.go +++ b/services/analysisservices/mgmt/2017-08-01/analysisservices/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/analysisservices/mgmt/2017-08-01/analysisservices/servers.go b/services/analysisservices/mgmt/2017-08-01/analysisservices/servers.go index 5ca8d617ac38..3080cda7c035 100644 --- a/services/analysisservices/mgmt/2017-08-01/analysisservices/servers.go +++ b/services/analysisservices/mgmt/2017-08-01/analysisservices/servers.go @@ -37,7 +37,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/apimanagementapi/interfaces.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/apimanagementapi/interfaces.go index f31a144d9a67..f2e0ac85f528 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/apimanagementapi/interfaces.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/apimanagementapi/interfaces.go @@ -30,6 +30,7 @@ type ApisClientAPI interface { Export(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIExportResult, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.PatchParameters, ifMatch string) (result autorest.Response, err error) } @@ -41,6 +42,7 @@ type APIOperationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.OperationContract, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.PatchParameters, ifMatch string) (result autorest.Response, err error) } @@ -49,6 +51,7 @@ var _ APIOperationsClientAPI = (*apimanagement.APIOperationsClient)(nil) // APIProductsClientAPI contains the set of methods on the APIProductsClient type. type APIProductsClientAPI interface { ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionIterator, err error) } var _ APIProductsClientAPI = (*apimanagement.APIProductsClient)(nil) @@ -59,6 +62,7 @@ type SubscriptionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result apimanagement.SubscriptionContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters apimanagement.SubscriptionUpdateParameters, ifMatch string) (result autorest.Response, err error) @@ -72,6 +76,7 @@ type ProductsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, deleteSubscriptions *bool) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.ProductContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.ProductUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -81,6 +86,7 @@ var _ ProductsClientAPI = (*apimanagement.ProductsClient)(nil) type ProductApisClientAPI interface { Add(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) Remove(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) } @@ -90,6 +96,7 @@ var _ ProductApisClientAPI = (*apimanagement.ProductApisClient)(nil) type ProductGroupsClientAPI interface { Add(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) Remove(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result apimanagement.ErrorBodyContract, err error) } @@ -101,6 +108,7 @@ type GroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string) (result apimanagement.ErrorBodyContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result apimanagement.GroupContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters apimanagement.GroupUpdateParameters, ifMatch string) (result apimanagement.ErrorBodyContract, err error) } @@ -110,6 +118,7 @@ var _ GroupsClientAPI = (*apimanagement.GroupsClient)(nil) type GroupUsersClientAPI interface { Add(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result apimanagement.ErrorBodyContract, err error) ListByGroup(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListByGroupComplete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) Remove(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result apimanagement.ErrorBodyContract, err error) } @@ -121,6 +130,7 @@ type CertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result apimanagement.CertificateContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionIterator, err error) } var _ CertificatesClientAPI = (*apimanagement.CertificatesClient)(nil) @@ -135,6 +145,7 @@ var _ PolicySnippetsClientAPI = (*apimanagement.PolicySnippetsClient)(nil) // ProductSubscriptionsClientAPI contains the set of methods on the ProductSubscriptionsClient type. type ProductSubscriptionsClientAPI interface { ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient)(nil) @@ -146,6 +157,7 @@ type UsersClientAPI interface { GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result apimanagement.GenerateSsoURLResult, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result apimanagement.UserContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserUpdateParameters, ifMatch string) (result apimanagement.ErrorBodyContract, err error) } @@ -154,6 +166,7 @@ var _ UsersClientAPI = (*apimanagement.UsersClient)(nil) // UserGroupsClientAPI contains the set of methods on the UserGroupsClient type. type UserGroupsClientAPI interface { ListByUser(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ UserGroupsClientAPI = (*apimanagement.UserGroupsClient)(nil) @@ -161,6 +174,7 @@ var _ UserGroupsClientAPI = (*apimanagement.UserGroupsClient)(nil) // UserSubscriptionsClientAPI contains the set of methods on the UserSubscriptionsClient type. type UserSubscriptionsClientAPI interface { ListByUser(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ UserSubscriptionsClientAPI = (*apimanagement.UserSubscriptionsClient)(nil) @@ -171,6 +185,7 @@ type AuthorizationServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result apimanagement.OAuth2AuthorizationServerContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters apimanagement.OAuth2AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -193,6 +208,7 @@ var _ UserIdentitiesClientAPI = (*apimanagement.UserIdentitiesClient)(nil) // ReportsClientAPI contains the set of methods on the ReportsClient type. type ReportsClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, aggregation apimanagement.ReportsAggregation, filter string, top *int32, skip *int32, interval string) (result apimanagement.ReportCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, aggregation apimanagement.ReportsAggregation, filter string, top *int32, skip *int32, interval string) (result apimanagement.ReportCollectionIterator, err error) } var _ ReportsClientAPI = (*apimanagement.ReportsClient)(nil) @@ -213,6 +229,7 @@ type LoggersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result apimanagement.LoggerResponse, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters apimanagement.LoggerUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -224,6 +241,7 @@ type PropertyClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, propID string, ifMatch string) (result apimanagement.ErrorBodyContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result apimanagement.PropertyContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters apimanagement.PropertyUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -235,6 +253,7 @@ type OpenIDConnectProvidersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string) (result apimanagement.ErrorBodyContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result apimanagement.OpenidConnectProviderContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters apimanagement.OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -271,6 +290,7 @@ type BackendsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, backendid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result apimanagement.BackendResponse, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters apimanagement.BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -312,7 +332,9 @@ type ServicesClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.SetObject, err error) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceGetSsoTokenResult, err error) List(ctx context.Context) (result apimanagement.ServiceListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.ServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultIterator, err error) ManageDeployments(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceManageDeploymentsParameters) (result apimanagement.ServicesManageDeploymentsFuture, err error) Restore(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBackupRestoreParameters) (result apimanagement.ServicesRestoreFuture, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBaseParameters) (result apimanagement.ServicesUpdateFuture, err error) diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/apioperations.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/apioperations.go index 4bea834c07ef..06765bc4c3b2 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/apioperations.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/apioperations.go @@ -36,7 +36,8 @@ func NewAPIOperationsClient(subscriptionID string) APIOperationsClient { return NewAPIOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationsClientWithBaseURI creates an instance of the APIOperationsClient client. +// NewAPIOperationsClientWithBaseURI creates an instance of the APIOperationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIOperationsClientWithBaseURI(baseURI string, subscriptionID string) APIOperationsClient { return APIOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/apiproducts.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/apiproducts.go index 102563d55fbb..0e7db77faa82 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/apiproducts.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/apiproducts.go @@ -36,7 +36,8 @@ func NewAPIProductsClient(subscriptionID string) APIProductsClient { return NewAPIProductsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIProductsClientWithBaseURI creates an instance of the APIProductsClient client. +// NewAPIProductsClientWithBaseURI creates an instance of the APIProductsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIProductsClientWithBaseURI(baseURI string, subscriptionID string) APIProductsClient { return APIProductsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/apis.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/apis.go index 9cc041a0f5f0..fee35d248931 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/apis.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/apis.go @@ -36,7 +36,8 @@ func NewApisClient(subscriptionID string) ApisClient { return NewApisClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApisClientWithBaseURI creates an instance of the ApisClient client. +// NewApisClientWithBaseURI creates an instance of the ApisClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApisClientWithBaseURI(baseURI string, subscriptionID string) ApisClient { return ApisClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/authorizationservers.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/authorizationservers.go index d60e0c0c8737..95884b63297c 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/authorizationservers.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/authorizationservers.go @@ -36,7 +36,9 @@ func NewAuthorizationServersClient(subscriptionID string) AuthorizationServersCl return NewAuthorizationServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationServersClientWithBaseURI creates an instance of the AuthorizationServersClient client. +// NewAuthorizationServersClientWithBaseURI creates an instance of the AuthorizationServersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAuthorizationServersClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationServersClient { return AuthorizationServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/backends.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/backends.go index ca3ad840178c..e39cb2825590 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/backends.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/backends.go @@ -36,7 +36,8 @@ func NewBackendsClient(subscriptionID string) BackendsClient { return NewBackendsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackendsClientWithBaseURI creates an instance of the BackendsClient client. +// NewBackendsClientWithBaseURI creates an instance of the BackendsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackendsClientWithBaseURI(baseURI string, subscriptionID string) BackendsClient { return BackendsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/certificates.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/certificates.go index a6ffe00b6e00..60eb803cc206 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/certificates.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/client.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/client.go index 587a995fba0a..d1e929f7915a 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/client.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/groups.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/groups.go index ea916a633a82..c69f026ab87f 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/groups.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/groupusers.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/groupusers.go index 9db75d441954..40a0888a5448 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/groupusers.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/groupusers.go @@ -36,7 +36,8 @@ func NewGroupUsersClient(subscriptionID string) GroupUsersClient { return NewGroupUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupUsersClientWithBaseURI creates an instance of the GroupUsersClient client. +// NewGroupUsersClientWithBaseURI creates an instance of the GroupUsersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupUsersClientWithBaseURI(baseURI string, subscriptionID string) GroupUsersClient { return GroupUsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/identityproviders.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/identityproviders.go index f42f62017c00..3f4e9ec9eb94 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/identityproviders.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/identityproviders.go @@ -36,7 +36,9 @@ func NewIdentityProvidersClient(subscriptionID string) IdentityProvidersClient { return NewIdentityProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIdentityProvidersClientWithBaseURI creates an instance of the IdentityProvidersClient client. +// NewIdentityProvidersClientWithBaseURI creates an instance of the IdentityProvidersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIdentityProvidersClientWithBaseURI(baseURI string, subscriptionID string) IdentityProvidersClient { return IdentityProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/loggers.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/loggers.go index 6c90f767abb4..8e48aaa80377 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/loggers.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/loggers.go @@ -36,7 +36,8 @@ func NewLoggersClient(subscriptionID string) LoggersClient { return NewLoggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoggersClientWithBaseURI creates an instance of the LoggersClient client. +// NewLoggersClientWithBaseURI creates an instance of the LoggersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLoggersClientWithBaseURI(baseURI string, subscriptionID string) LoggersClient { return LoggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/openidconnectproviders.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/openidconnectproviders.go index a129bd8c82c1..564386b7caeb 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/openidconnectproviders.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/openidconnectproviders.go @@ -36,7 +36,9 @@ func NewOpenIDConnectProvidersClient(subscriptionID string) OpenIDConnectProvide return NewOpenIDConnectProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenIDConnectProvidersClientWithBaseURI creates an instance of the OpenIDConnectProvidersClient client. +// NewOpenIDConnectProvidersClientWithBaseURI creates an instance of the OpenIDConnectProvidersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewOpenIDConnectProvidersClientWithBaseURI(baseURI string, subscriptionID string) OpenIDConnectProvidersClient { return OpenIDConnectProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/policysnippets.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/policysnippets.go index 9489577a0be2..2adeff9d6110 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/policysnippets.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/policysnippets.go @@ -36,7 +36,8 @@ func NewPolicySnippetsClient(subscriptionID string) PolicySnippetsClient { return NewPolicySnippetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client. +// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySnippetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySnippetsClient { return PolicySnippetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/productapis.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/productapis.go index d87efcd02950..23aca961b6f9 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/productapis.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/productapis.go @@ -36,7 +36,8 @@ func NewProductApisClient(subscriptionID string) ProductApisClient { return NewProductApisClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductApisClientWithBaseURI creates an instance of the ProductApisClient client. +// NewProductApisClientWithBaseURI creates an instance of the ProductApisClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductApisClientWithBaseURI(baseURI string, subscriptionID string) ProductApisClient { return ProductApisClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/productgroups.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/productgroups.go index c368a20b7eb6..00941ab76055 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/productgroups.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/productgroups.go @@ -36,7 +36,8 @@ func NewProductGroupsClient(subscriptionID string) ProductGroupsClient { return NewProductGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductGroupsClientWithBaseURI creates an instance of the ProductGroupsClient client. +// NewProductGroupsClientWithBaseURI creates an instance of the ProductGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProductGroupsClient { return ProductGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/products.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/products.go index 9b7cfc2ff7b3..3873cc70eb59 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/products.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/products.go @@ -36,7 +36,8 @@ func NewProductsClient(subscriptionID string) ProductsClient { return NewProductsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductsClientWithBaseURI creates an instance of the ProductsClient client. +// NewProductsClientWithBaseURI creates an instance of the ProductsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductsClientWithBaseURI(baseURI string, subscriptionID string) ProductsClient { return ProductsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/productsubscriptions.go index 67270961b06c..dea329eb026b 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/productsubscriptions.go @@ -36,7 +36,9 @@ func NewProductSubscriptionsClient(subscriptionID string) ProductSubscriptionsCl return NewProductSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client. +// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProductSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ProductSubscriptionsClient { return ProductSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go index db482da90728..428f8534bdd8 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go @@ -36,7 +36,8 @@ func NewPropertyClient(subscriptionID string) PropertyClient { return NewPropertyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client. +// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) PropertyClient { return PropertyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/quotabycounterkeys.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/quotabycounterkeys.go index 63fced833097..77b52ce054b1 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/quotabycounterkeys.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/quotabycounterkeys.go @@ -36,7 +36,9 @@ func NewQuotaByCounterKeysClient(subscriptionID string) QuotaByCounterKeysClient return NewQuotaByCounterKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client. +// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByCounterKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByCounterKeysClient { return QuotaByCounterKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/quotabyperiodkeys.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/quotabyperiodkeys.go index 672a5615d12d..711ef44e715a 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/quotabyperiodkeys.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/quotabyperiodkeys.go @@ -36,7 +36,9 @@ func NewQuotaByPeriodKeysClient(subscriptionID string) QuotaByPeriodKeysClient { return NewQuotaByPeriodKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client. +// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByPeriodKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByPeriodKeysClient { return QuotaByPeriodKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/regions.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/regions.go index 8bdf4d68e54b..453f663e2f01 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/regions.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/regions.go @@ -36,7 +36,8 @@ func NewRegionsClient(subscriptionID string) RegionsClient { return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go index 94e3564ef77b..b80b2adc66df 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go @@ -36,7 +36,8 @@ func NewReportsClient(subscriptionID string) ReportsClient { return NewReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReportsClientWithBaseURI creates an instance of the ReportsClient client. +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return ReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/services.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/services.go index 06126e370cdf..b89ee26d490f 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/services.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go index d275c91332e4..77c0bb2bba89 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go @@ -36,7 +36,8 @@ func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantaccess.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantaccess.go index de8bc89c01e1..bd7b01cecda6 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantaccess.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantaccess.go @@ -36,7 +36,8 @@ func NewTenantAccessClient(subscriptionID string) TenantAccessClient { return NewTenantAccessClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client. +// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessClient { return TenantAccessClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantaccessgit.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantaccessgit.go index 3f2b7cf69272..83241cc57112 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantaccessgit.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantaccessgit.go @@ -36,7 +36,8 @@ func NewTenantAccessGitClient(subscriptionID string) TenantAccessGitClient { return NewTenantAccessGitClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client. +// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessGitClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessGitClient { return TenantAccessGitClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfiguration.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfiguration.go index 8e510f01d833..95eefc940f91 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfiguration.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfiguration.go @@ -36,7 +36,9 @@ func NewTenantConfigurationClient(subscriptionID string) TenantConfigurationClie return NewTenantConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client. +// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantConfigurationClientWithBaseURI(baseURI string, subscriptionID string) TenantConfigurationClient { return TenantConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfigurationsyncstate.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfigurationsyncstate.go index d662904c9ba2..4df4c234aee2 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfigurationsyncstate.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/tenantconfigurationsyncstate.go @@ -37,7 +37,8 @@ func NewTenantConfigurationSyncStateClient(subscriptionID string) TenantConfigur } // NewTenantConfigurationSyncStateClientWithBaseURI creates an instance of the TenantConfigurationSyncStateClient -// 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 NewTenantConfigurationSyncStateClientWithBaseURI(baseURI string, subscriptionID string) TenantConfigurationSyncStateClient { return TenantConfigurationSyncStateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/usergroups.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/usergroups.go index 33d0fb6f4d2c..c5f439e9d98f 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/usergroups.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/usergroups.go @@ -36,7 +36,8 @@ func NewUserGroupsClient(subscriptionID string) UserGroupsClient { return NewUserGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserGroupsClientWithBaseURI creates an instance of the UserGroupsClient client. +// NewUserGroupsClientWithBaseURI creates an instance of the UserGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserGroupsClientWithBaseURI(baseURI string, subscriptionID string) UserGroupsClient { return UserGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/useridentities.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/useridentities.go index c1453d0fcd7c..e806f6326d91 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/useridentities.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/useridentities.go @@ -36,7 +36,8 @@ func NewUserIdentitiesClient(subscriptionID string) UserIdentitiesClient { return NewUserIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client. +// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) UserIdentitiesClient { return UserIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/users.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/users.go index 7f2df4eca2c8..328d84e1485a 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/users.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/users.go @@ -36,7 +36,8 @@ func NewUsersClient(subscriptionID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/usersubscriptions.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/usersubscriptions.go index 09d3692e32e6..21a5b62cb6d5 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/usersubscriptions.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/usersubscriptions.go @@ -36,7 +36,9 @@ func NewUserSubscriptionsClient(subscriptionID string) UserSubscriptionsClient { return NewUserSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserSubscriptionsClientWithBaseURI creates an instance of the UserSubscriptionsClient client. +// NewUserSubscriptionsClientWithBaseURI creates an instance of the UserSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewUserSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) UserSubscriptionsClient { return UserSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apiexport.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apiexport.go index f7737712642e..6d50f74647ac 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apiexport.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apiexport.go @@ -36,7 +36,8 @@ func NewAPIExportClient(subscriptionID string) APIExportClient { return NewAPIExportClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client. +// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIExportClientWithBaseURI(baseURI string, subscriptionID string) APIExportClient { return APIExportClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apimanagementapi/interfaces.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apimanagementapi/interfaces.go index fa1b498444b8..9051dfe8550f 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apimanagementapi/interfaces.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apimanagementapi/interfaces.go @@ -44,6 +44,7 @@ type ApisClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.APIUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -55,6 +56,7 @@ type APIOperationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.OperationContract, err error) ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionPage, err error) + ListByApisComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.OperationUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -72,6 +74,7 @@ var _ APIOperationsPolicyClientAPI = (*apimanagement.APIOperationsPolicyClient)( // APIProductsClientAPI contains the set of methods on the APIProductsClient type. type APIProductsClientAPI interface { ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionPage, err error) + ListByApisComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionIterator, err error) } var _ APIProductsClientAPI = (*apimanagement.APIProductsClient)(nil) @@ -91,6 +94,7 @@ type AuthorizationServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result apimanagement.OAuth2AuthorizationServerContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters apimanagement.OAuth2AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -102,6 +106,7 @@ type BackendsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, backendid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result apimanagement.BackendResponse, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters apimanagement.BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -113,6 +118,7 @@ type CertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result apimanagement.CertificateContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionIterator, err error) } var _ CertificatesClientAPI = (*apimanagement.CertificatesClient)(nil) @@ -120,6 +126,7 @@ var _ CertificatesClientAPI = (*apimanagement.CertificatesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result apimanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) @@ -134,7 +141,9 @@ type ServicesClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceResource, err error) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceGetSsoTokenResult, err error) List(ctx context.Context) (result apimanagement.ServiceListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.ServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultIterator, err error) ManageDeployments(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceManageDeploymentsParameters) (result apimanagement.ServicesManageDeploymentsFuture, err error) Restore(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBackupRestoreParameters) (result apimanagement.ServicesRestoreFuture, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateParameters) (result apimanagement.ServicesUpdateFuture, err error) @@ -150,6 +159,7 @@ type GroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string) (result apimanagement.ErrorBodyContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result apimanagement.GroupContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters apimanagement.GroupUpdateParameters, ifMatch string) (result apimanagement.ErrorBodyContract, err error) } @@ -160,6 +170,7 @@ type GroupUsersClientAPI interface { Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result apimanagement.ErrorBodyContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result apimanagement.ErrorBodyContract, err error) ListByGroups(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListByGroupsComplete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) } var _ GroupUsersClientAPI = (*apimanagement.GroupUsersClient)(nil) @@ -181,6 +192,7 @@ type LoggersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result apimanagement.LoggerResponse, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters apimanagement.LoggerUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -199,6 +211,7 @@ type OpenIDConnectProvidersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string) (result apimanagement.ErrorBodyContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result apimanagement.OpenidConnectProviderContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters apimanagement.OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -210,6 +223,7 @@ type ProductsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, deleteSubscriptions *bool) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.ProductContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.ProductUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -220,6 +234,7 @@ type ProductApisClientAPI interface { Create(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) ListByProducts(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByProductsComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) } var _ ProductApisClientAPI = (*apimanagement.ProductApisClient)(nil) @@ -229,6 +244,7 @@ type ProductGroupsClientAPI interface { Create(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result apimanagement.ErrorBodyContract, err error) ListByProducts(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByProductsComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ ProductGroupsClientAPI = (*apimanagement.ProductGroupsClient)(nil) @@ -236,6 +252,7 @@ var _ ProductGroupsClientAPI = (*apimanagement.ProductGroupsClient)(nil) // ProductSubscriptionsClientAPI contains the set of methods on the ProductSubscriptionsClient type. type ProductSubscriptionsClientAPI interface { ListByProducts(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListByProductsComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient)(nil) @@ -252,6 +269,7 @@ var _ ProductPolicyClientAPI = (*apimanagement.ProductPolicyClient)(nil) // PropertiesClientAPI contains the set of methods on the PropertiesClient type. type PropertiesClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionIterator, err error) } var _ PropertiesClientAPI = (*apimanagement.PropertiesClient)(nil) @@ -285,6 +303,7 @@ var _ QuotaByPeriodKeysClientAPI = (*apimanagement.QuotaByPeriodKeysClient)(nil) // ReportsClientAPI contains the set of methods on the ReportsClient type. type ReportsClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, aggregation apimanagement.ReportsAggregation, filter string, top *int32, skip *int32, interval *string) (result apimanagement.ReportCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, aggregation apimanagement.ReportsAggregation, filter string, top *int32, skip *int32, interval *string) (result apimanagement.ReportCollectionIterator, err error) } var _ ReportsClientAPI = (*apimanagement.ReportsClient)(nil) @@ -295,6 +314,7 @@ type SubscriptionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result apimanagement.SubscriptionContract, err error) List(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters apimanagement.SubscriptionUpdateParameters, ifMatch string) (result autorest.Response, err error) @@ -354,6 +374,7 @@ type UsersClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result apimanagement.UserContract, err error) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserTokenParameters) (result apimanagement.UserTokenResult, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserUpdateParameters, ifMatch string) (result apimanagement.ErrorBodyContract, err error) } @@ -362,6 +383,7 @@ var _ UsersClientAPI = (*apimanagement.UsersClient)(nil) // UserGroupsClientAPI contains the set of methods on the UserGroupsClient type. type UserGroupsClientAPI interface { ListByUsers(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByUsersComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ UserGroupsClientAPI = (*apimanagement.UserGroupsClient)(nil) @@ -369,6 +391,7 @@ var _ UserGroupsClientAPI = (*apimanagement.UserGroupsClient)(nil) // UserSubscriptionsClientAPI contains the set of methods on the UserSubscriptionsClient type. type UserSubscriptionsClientAPI interface { ListByUsers(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListByUsersComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ UserSubscriptionsClientAPI = (*apimanagement.UserSubscriptionsClient)(nil) diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperations.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperations.go index f32e6a458f64..e4cebf8915d2 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperations.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperations.go @@ -36,7 +36,8 @@ func NewAPIOperationsClient(subscriptionID string) APIOperationsClient { return NewAPIOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationsClientWithBaseURI creates an instance of the APIOperationsClient client. +// NewAPIOperationsClientWithBaseURI creates an instance of the APIOperationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIOperationsClientWithBaseURI(baseURI string, subscriptionID string) APIOperationsClient { return APIOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperationspolicy.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperationspolicy.go index 61b1255d4b3d..1343e059000b 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperationspolicy.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperationspolicy.go @@ -37,7 +37,9 @@ func NewAPIOperationsPolicyClient(subscriptionID string) APIOperationsPolicyClie return NewAPIOperationsPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationsPolicyClientWithBaseURI creates an instance of the APIOperationsPolicyClient client. +// NewAPIOperationsPolicyClientWithBaseURI creates an instance of the APIOperationsPolicyClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIOperationsPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIOperationsPolicyClient { return APIOperationsPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apipolicy.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apipolicy.go index 9b9b5972cfc3..ba3213a27fb4 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apipolicy.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apipolicy.go @@ -37,7 +37,8 @@ func NewAPIPolicyClient(subscriptionID string) APIPolicyClient { return NewAPIPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client. +// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIPolicyClient { return APIPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apiproducts.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apiproducts.go index 495c214610eb..d3922a7577f7 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apiproducts.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apiproducts.go @@ -36,7 +36,8 @@ func NewAPIProductsClient(subscriptionID string) APIProductsClient { return NewAPIProductsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIProductsClientWithBaseURI creates an instance of the APIProductsClient client. +// NewAPIProductsClientWithBaseURI creates an instance of the APIProductsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIProductsClientWithBaseURI(baseURI string, subscriptionID string) APIProductsClient { return APIProductsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apis.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apis.go index b596f1f8a2c6..1125f12dfb07 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apis.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apis.go @@ -36,7 +36,8 @@ func NewApisClient(subscriptionID string) ApisClient { return NewApisClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApisClientWithBaseURI creates an instance of the ApisClient client. +// NewApisClientWithBaseURI creates an instance of the ApisClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApisClientWithBaseURI(baseURI string, subscriptionID string) ApisClient { return ApisClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/authorizationservers.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/authorizationservers.go index 80b336389170..6b7983bab490 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/authorizationservers.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/authorizationservers.go @@ -36,7 +36,9 @@ func NewAuthorizationServersClient(subscriptionID string) AuthorizationServersCl return NewAuthorizationServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationServersClientWithBaseURI creates an instance of the AuthorizationServersClient client. +// NewAuthorizationServersClientWithBaseURI creates an instance of the AuthorizationServersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAuthorizationServersClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationServersClient { return AuthorizationServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/backends.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/backends.go index eb051b8e686e..6dba5a4a2639 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/backends.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/backends.go @@ -36,7 +36,8 @@ func NewBackendsClient(subscriptionID string) BackendsClient { return NewBackendsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackendsClientWithBaseURI creates an instance of the BackendsClient client. +// NewBackendsClientWithBaseURI creates an instance of the BackendsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackendsClientWithBaseURI(baseURI string, subscriptionID string) BackendsClient { return BackendsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/certificates.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/certificates.go index 8fc929bc0a79..6efac434834e 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/certificates.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/client.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/client.go index cdc889e117b3..1ada2f95fbb6 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/client.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/groups.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/groups.go index a7a73e97360d..856c03048e86 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/groups.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/groupusers.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/groupusers.go index e4c17b7eac98..ac88ddf5d646 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/groupusers.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/groupusers.go @@ -36,7 +36,8 @@ func NewGroupUsersClient(subscriptionID string) GroupUsersClient { return NewGroupUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupUsersClientWithBaseURI creates an instance of the GroupUsersClient client. +// NewGroupUsersClientWithBaseURI creates an instance of the GroupUsersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupUsersClientWithBaseURI(baseURI string, subscriptionID string) GroupUsersClient { return GroupUsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/identityproviders.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/identityproviders.go index 9a160c597844..d3a7c3da4a03 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/identityproviders.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/identityproviders.go @@ -36,7 +36,9 @@ func NewIdentityProvidersClient(subscriptionID string) IdentityProvidersClient { return NewIdentityProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIdentityProvidersClientWithBaseURI creates an instance of the IdentityProvidersClient client. +// NewIdentityProvidersClientWithBaseURI creates an instance of the IdentityProvidersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIdentityProvidersClientWithBaseURI(baseURI string, subscriptionID string) IdentityProvidersClient { return IdentityProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/loggers.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/loggers.go index f8baddb71950..ece889bec841 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/loggers.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/loggers.go @@ -36,7 +36,8 @@ func NewLoggersClient(subscriptionID string) LoggersClient { return NewLoggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoggersClientWithBaseURI creates an instance of the LoggersClient client. +// NewLoggersClientWithBaseURI creates an instance of the LoggersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLoggersClientWithBaseURI(baseURI string, subscriptionID string) LoggersClient { return LoggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/networkstatus.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/networkstatus.go index c32342b73c8c..7a01badf266a 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/networkstatus.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/networkstatus.go @@ -36,7 +36,8 @@ func NewNetworkStatusClient(subscriptionID string) NetworkStatusClient { return NewNetworkStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client. +// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNetworkStatusClientWithBaseURI(baseURI string, subscriptionID string) NetworkStatusClient { return NetworkStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/openidconnectproviders.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/openidconnectproviders.go index b54a6c9bd3d7..2310f3c2e145 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/openidconnectproviders.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/openidconnectproviders.go @@ -36,7 +36,9 @@ func NewOpenIDConnectProvidersClient(subscriptionID string) OpenIDConnectProvide return NewOpenIDConnectProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenIDConnectProvidersClientWithBaseURI creates an instance of the OpenIDConnectProvidersClient client. +// NewOpenIDConnectProvidersClientWithBaseURI creates an instance of the OpenIDConnectProvidersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewOpenIDConnectProvidersClientWithBaseURI(baseURI string, subscriptionID string) OpenIDConnectProvidersClient { return OpenIDConnectProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/operations.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/operations.go index 27f407d24086..c61d6963da4c 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/operations.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/policysnippets.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/policysnippets.go index 8f669e2a2ad0..7f2285d9a2a3 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/policysnippets.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/policysnippets.go @@ -36,7 +36,8 @@ func NewPolicySnippetsClient(subscriptionID string) PolicySnippetsClient { return NewPolicySnippetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client. +// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySnippetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySnippetsClient { return PolicySnippetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/productapis.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/productapis.go index 05c20af89ff7..f5288162e0c2 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/productapis.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/productapis.go @@ -36,7 +36,8 @@ func NewProductApisClient(subscriptionID string) ProductApisClient { return NewProductApisClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductApisClientWithBaseURI creates an instance of the ProductApisClient client. +// NewProductApisClientWithBaseURI creates an instance of the ProductApisClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductApisClientWithBaseURI(baseURI string, subscriptionID string) ProductApisClient { return ProductApisClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/productgroups.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/productgroups.go index 118e21268da9..e41b37a296e9 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/productgroups.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/productgroups.go @@ -36,7 +36,8 @@ func NewProductGroupsClient(subscriptionID string) ProductGroupsClient { return NewProductGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductGroupsClientWithBaseURI creates an instance of the ProductGroupsClient client. +// NewProductGroupsClientWithBaseURI creates an instance of the ProductGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProductGroupsClient { return ProductGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/productpolicy.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/productpolicy.go index e95f3a560d8a..8c54c527a7d7 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/productpolicy.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/productpolicy.go @@ -37,7 +37,8 @@ func NewProductPolicyClient(subscriptionID string) ProductPolicyClient { return NewProductPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client. +// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductPolicyClientWithBaseURI(baseURI string, subscriptionID string) ProductPolicyClient { return ProductPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/products.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/products.go index db694a731058..010b096e6bd2 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/products.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/products.go @@ -36,7 +36,8 @@ func NewProductsClient(subscriptionID string) ProductsClient { return NewProductsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductsClientWithBaseURI creates an instance of the ProductsClient client. +// NewProductsClientWithBaseURI creates an instance of the ProductsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductsClientWithBaseURI(baseURI string, subscriptionID string) ProductsClient { return ProductsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/productsubscriptions.go index d31808f004df..69b948158d00 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/productsubscriptions.go @@ -36,7 +36,9 @@ func NewProductSubscriptionsClient(subscriptionID string) ProductSubscriptionsCl return NewProductSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client. +// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProductSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ProductSubscriptionsClient { return ProductSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/properties.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/properties.go index e402a894a71d..b3f61b0ef821 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/properties.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/properties.go @@ -36,7 +36,8 @@ func NewPropertiesClient(subscriptionID string) PropertiesClient { return NewPropertiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPropertiesClientWithBaseURI creates an instance of the PropertiesClient client. +// NewPropertiesClientWithBaseURI creates an instance of the PropertiesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPropertiesClientWithBaseURI(baseURI string, subscriptionID string) PropertiesClient { return PropertiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/property.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/property.go index a21acc94a56e..394e2e4d1b82 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/property.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/property.go @@ -36,7 +36,8 @@ func NewPropertyClient(subscriptionID string) PropertyClient { return NewPropertyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client. +// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) PropertyClient { return PropertyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/quotabycounterkeys.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/quotabycounterkeys.go index 24e951c0aac8..c5eb1d0e8caf 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/quotabycounterkeys.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/quotabycounterkeys.go @@ -36,7 +36,9 @@ func NewQuotaByCounterKeysClient(subscriptionID string) QuotaByCounterKeysClient return NewQuotaByCounterKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client. +// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByCounterKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByCounterKeysClient { return QuotaByCounterKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/quotabyperiodkeys.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/quotabyperiodkeys.go index 93e1dfe15ffc..1781c4e7b9d9 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/quotabyperiodkeys.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/quotabyperiodkeys.go @@ -36,7 +36,9 @@ func NewQuotaByPeriodKeysClient(subscriptionID string) QuotaByPeriodKeysClient { return NewQuotaByPeriodKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client. +// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByPeriodKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByPeriodKeysClient { return QuotaByPeriodKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/regions.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/regions.go index d28cc9bb67e2..90917ae5e9a4 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/regions.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/regions.go @@ -36,7 +36,8 @@ func NewRegionsClient(subscriptionID string) RegionsClient { return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go index 39d3823c3d7d..a897f684a89e 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go @@ -36,7 +36,8 @@ func NewReportsClient(subscriptionID string) ReportsClient { return NewReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReportsClientWithBaseURI creates an instance of the ReportsClient client. +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return ReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/services.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/services.go index 93ebe28ff1c8..f04c9f5e4ea2 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/services.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go index 72804412e4d4..91b58f769fe3 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go @@ -36,7 +36,8 @@ func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantaccess.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantaccess.go index d9093887b3b9..6ae9d9f0e38d 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantaccess.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantaccess.go @@ -36,7 +36,8 @@ func NewTenantAccessClient(subscriptionID string) TenantAccessClient { return NewTenantAccessClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client. +// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessClient { return TenantAccessClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantaccessgit.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantaccessgit.go index 56a5258b9d30..6617c86879db 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantaccessgit.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantaccessgit.go @@ -36,7 +36,8 @@ func NewTenantAccessGitClient(subscriptionID string) TenantAccessGitClient { return NewTenantAccessGitClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client. +// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessGitClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessGitClient { return TenantAccessGitClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfiguration.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfiguration.go index bd19ceca5000..0ffc75352467 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfiguration.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfiguration.go @@ -36,7 +36,9 @@ func NewTenantConfigurationClient(subscriptionID string) TenantConfigurationClie return NewTenantConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client. +// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantConfigurationClientWithBaseURI(baseURI string, subscriptionID string) TenantConfigurationClient { return TenantConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfigurationsyncstate.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfigurationsyncstate.go index c0891b7a84ed..6a2c1b196cab 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfigurationsyncstate.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantconfigurationsyncstate.go @@ -37,7 +37,8 @@ func NewTenantConfigurationSyncStateClient(subscriptionID string) TenantConfigur } // NewTenantConfigurationSyncStateClientWithBaseURI creates an instance of the TenantConfigurationSyncStateClient -// 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 NewTenantConfigurationSyncStateClientWithBaseURI(baseURI string, subscriptionID string) TenantConfigurationSyncStateClient { return TenantConfigurationSyncStateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantpolicy.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantpolicy.go index 57113d5180bb..dc2670f69298 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantpolicy.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/tenantpolicy.go @@ -37,7 +37,8 @@ func NewTenantPolicyClient(subscriptionID string) TenantPolicyClient { return NewTenantPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantPolicyClientWithBaseURI creates an instance of the TenantPolicyClient client. +// NewTenantPolicyClientWithBaseURI creates an instance of the TenantPolicyClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantPolicyClientWithBaseURI(baseURI string, subscriptionID string) TenantPolicyClient { return TenantPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/usergroups.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/usergroups.go index a14f936b1b7b..b4ddc73385ba 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/usergroups.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/usergroups.go @@ -36,7 +36,8 @@ func NewUserGroupsClient(subscriptionID string) UserGroupsClient { return NewUserGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserGroupsClientWithBaseURI creates an instance of the UserGroupsClient client. +// NewUserGroupsClientWithBaseURI creates an instance of the UserGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserGroupsClientWithBaseURI(baseURI string, subscriptionID string) UserGroupsClient { return UserGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/useridentities.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/useridentities.go index 0d844062d944..d6ca5b2dcae7 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/useridentities.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/useridentities.go @@ -36,7 +36,8 @@ func NewUserIdentitiesClient(subscriptionID string) UserIdentitiesClient { return NewUserIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client. +// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) UserIdentitiesClient { return UserIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/users.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/users.go index d28a42b16446..8f67751b7679 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/users.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/users.go @@ -36,7 +36,8 @@ func NewUsersClient(subscriptionID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/usersubscriptions.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/usersubscriptions.go index 42aded7274f1..3d3994a90ffe 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/usersubscriptions.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/usersubscriptions.go @@ -36,7 +36,9 @@ func NewUserSubscriptionsClient(subscriptionID string) UserSubscriptionsClient { return NewUserSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserSubscriptionsClientWithBaseURI creates an instance of the UserSubscriptionsClient client. +// NewUserSubscriptionsClientWithBaseURI creates an instance of the UserSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewUserSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) UserSubscriptionsClient { return UserSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/api.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/api.go index a3e2fa64836f..0f7940d40df3 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/api.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/api.go @@ -36,7 +36,8 @@ func NewAPIClient(subscriptionID string) APIClient { return NewAPIClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIClientWithBaseURI creates an instance of the APIClient client. +// NewAPIClientWithBaseURI creates an instance of the APIClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIClientWithBaseURI(baseURI string, subscriptionID string) APIClient { return APIClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnostic.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnostic.go index 68912d22bbcf..3a4ae203d26c 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnostic.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnostic.go @@ -36,7 +36,8 @@ func NewAPIDiagnosticClient(subscriptionID string) APIDiagnosticClient { return NewAPIDiagnosticClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIDiagnosticClientWithBaseURI creates an instance of the APIDiagnosticClient client. +// NewAPIDiagnosticClientWithBaseURI creates an instance of the APIDiagnosticClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) APIDiagnosticClient { return APIDiagnosticClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnosticlogger.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnosticlogger.go index 5ccc509a3600..aed61af49231 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnosticlogger.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnosticlogger.go @@ -36,7 +36,9 @@ func NewAPIDiagnosticLoggerClient(subscriptionID string) APIDiagnosticLoggerClie return NewAPIDiagnosticLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIDiagnosticLoggerClientWithBaseURI creates an instance of the APIDiagnosticLoggerClient client. +// NewAPIDiagnosticLoggerClientWithBaseURI creates an instance of the APIDiagnosticLoggerClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIDiagnosticLoggerClientWithBaseURI(baseURI string, subscriptionID string) APIDiagnosticLoggerClient { return APIDiagnosticLoggerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiexport.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiexport.go index 8dfcf1b8d757..761ff53c44e0 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiexport.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiexport.go @@ -36,7 +36,8 @@ func NewAPIExportClient(subscriptionID string) APIExportClient { return NewAPIExportClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client. +// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIExportClientWithBaseURI(baseURI string, subscriptionID string) APIExportClient { return APIExportClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuattachment.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuattachment.go index 317ef07edf5c..3a4030b0eb48 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuattachment.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuattachment.go @@ -36,7 +36,9 @@ func NewAPIIssuAttachmentClient(subscriptionID string) APIIssuAttachmentClient { return NewAPIIssuAttachmentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssuAttachmentClientWithBaseURI creates an instance of the APIIssuAttachmentClient client. +// NewAPIIssuAttachmentClientWithBaseURI creates an instance of the APIIssuAttachmentClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIIssuAttachmentClientWithBaseURI(baseURI string, subscriptionID string) APIIssuAttachmentClient { return APIIssuAttachmentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissucomment.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissucomment.go index f34239e10434..7b12498e1c3e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissucomment.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissucomment.go @@ -36,7 +36,8 @@ func NewAPIIssuCommentClient(subscriptionID string) APIIssuCommentClient { return NewAPIIssuCommentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssuCommentClientWithBaseURI creates an instance of the APIIssuCommentClient client. +// NewAPIIssuCommentClientWithBaseURI creates an instance of the APIIssuCommentClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssuCommentClientWithBaseURI(baseURI string, subscriptionID string) APIIssuCommentClient { return APIIssuCommentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissue.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissue.go index f5b95ae82030..d84c17949024 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissue.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissue.go @@ -36,7 +36,8 @@ func NewAPIIssueClient(subscriptionID string) APIIssueClient { return NewAPIIssueClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueClientWithBaseURI creates an instance of the APIIssueClient client. +// NewAPIIssueClientWithBaseURI creates an instance of the APIIssueClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssueClientWithBaseURI(baseURI string, subscriptionID string) APIIssueClient { return APIIssueClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachment.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachment.go index 17dd56a2da82..9a1a144c61fd 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachment.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachment.go @@ -36,7 +36,9 @@ func NewAPIIssueAttachmentClient(subscriptionID string) APIIssueAttachmentClient return NewAPIIssueAttachmentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueAttachmentClientWithBaseURI creates an instance of the APIIssueAttachmentClient client. +// NewAPIIssueAttachmentClientWithBaseURI creates an instance of the APIIssueAttachmentClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIIssueAttachmentClientWithBaseURI(baseURI string, subscriptionID string) APIIssueAttachmentClient { return APIIssueAttachmentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachments.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachments.go index 24713590baef..1669bb1b1f3d 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachments.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachments.go @@ -36,7 +36,9 @@ func NewAPIIssueAttachmentsClient(subscriptionID string) APIIssueAttachmentsClie return NewAPIIssueAttachmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueAttachmentsClientWithBaseURI creates an instance of the APIIssueAttachmentsClient client. +// NewAPIIssueAttachmentsClientWithBaseURI creates an instance of the APIIssueAttachmentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIIssueAttachmentsClientWithBaseURI(baseURI string, subscriptionID string) APIIssueAttachmentsClient { return APIIssueAttachmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomment.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomment.go index 16c4e8f89e41..e5f233091acf 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomment.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomment.go @@ -36,7 +36,8 @@ func NewAPIIssueCommentClient(subscriptionID string) APIIssueCommentClient { return NewAPIIssueCommentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueCommentClientWithBaseURI creates an instance of the APIIssueCommentClient client. +// NewAPIIssueCommentClientWithBaseURI creates an instance of the APIIssueCommentClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssueCommentClientWithBaseURI(baseURI string, subscriptionID string) APIIssueCommentClient { return APIIssueCommentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomments.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomments.go index 0065a998c222..b8833f32c83f 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomments.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomments.go @@ -36,7 +36,9 @@ func NewAPIIssueCommentsClient(subscriptionID string) APIIssueCommentsClient { return NewAPIIssueCommentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueCommentsClientWithBaseURI creates an instance of the APIIssueCommentsClient client. +// NewAPIIssueCommentsClientWithBaseURI creates an instance of the APIIssueCommentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIIssueCommentsClientWithBaseURI(baseURI string, subscriptionID string) APIIssueCommentsClient { return APIIssueCommentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissues.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissues.go index 3565d64a5182..07f515705f8d 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissues.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissues.go @@ -36,7 +36,8 @@ func NewAPIIssuesClient(subscriptionID string) APIIssuesClient { return NewAPIIssuesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssuesClientWithBaseURI creates an instance of the APIIssuesClient client. +// NewAPIIssuesClientWithBaseURI creates an instance of the APIIssuesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssuesClientWithBaseURI(baseURI string, subscriptionID string) APIIssuesClient { return APIIssuesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apimanagementapi/interfaces.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apimanagementapi/interfaces.go index 59f00b3c998f..6283ab30634e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apimanagementapi/interfaces.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apimanagementapi/interfaces.go @@ -54,7 +54,9 @@ type APIClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (result apimanagement.APICollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (result apimanagement.APICollectionIterator, err error) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.APIUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -63,6 +65,7 @@ var _ APIClientAPI = (*apimanagement.APIClient)(nil) // APIRevisionsClientAPI contains the set of methods on the APIRevisionsClient type. type APIRevisionsClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIRevisionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIRevisionCollectionIterator, err error) } var _ APIRevisionsClientAPI = (*apimanagement.APIRevisionsClient)(nil) @@ -73,6 +76,7 @@ type APIReleaseClientAPI interface { Delete(ctx context.Context, ifMatch string, resourceGroupName string, serviceName string, apiid string, releaseID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result apimanagement.APIReleaseContract, err error) List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIReleaseCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIReleaseCollectionIterator, err error) Update(ctx context.Context, parameters apimanagement.APIReleaseContract, ifMatch string, resourceGroupName string, serviceName string, apiid string, releaseID string) (result autorest.Response, err error) } @@ -85,6 +89,7 @@ type APIOperationClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.OperationContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.OperationUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -104,6 +109,7 @@ var _ APIOperationPolicyClientAPI = (*apimanagement.APIOperationPolicyClient)(ni // APIProductClientAPI contains the set of methods on the APIProductClient type. type APIProductClientAPI interface { ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionPage, err error) + ListByApisComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionIterator, err error) } var _ APIProductClientAPI = (*apimanagement.APIProductClient)(nil) @@ -126,6 +132,7 @@ type APISchemaClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result apimanagement.SchemaContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.SchemaCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.SchemaCollectionIterator, err error) } var _ APISchemaClientAPI = (*apimanagement.APISchemaClient)(nil) @@ -137,6 +144,7 @@ type APIDiagnosticClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result apimanagement.DiagnosticContract, err error) Head(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, parameters apimanagement.DiagnosticContract, ifMatch string) (result autorest.Response, err error) } @@ -148,6 +156,7 @@ type APIDiagnosticLoggerClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (result apimanagement.LoggerContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) } var _ APIDiagnosticLoggerClientAPI = (*apimanagement.APIDiagnosticLoggerClient)(nil) @@ -155,6 +164,7 @@ var _ APIDiagnosticLoggerClientAPI = (*apimanagement.APIDiagnosticLoggerClient)( // APIIssuesClientAPI contains the set of methods on the APIIssuesClient type. type APIIssuesClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.IssueCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.IssueCollectionIterator, err error) } var _ APIIssuesClientAPI = (*apimanagement.APIIssuesClient)(nil) @@ -172,6 +182,7 @@ var _ APIIssueClientAPI = (*apimanagement.APIIssueClient)(nil) // APIIssueCommentsClientAPI contains the set of methods on the APIIssueCommentsClient type. type APIIssueCommentsClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueCommentCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueCommentCollectionIterator, err error) } var _ APIIssueCommentsClientAPI = (*apimanagement.APIIssueCommentsClient)(nil) @@ -195,6 +206,7 @@ var _ APIIssueCommentClientAPI = (*apimanagement.APIIssueCommentClient)(nil) // APIIssueAttachmentsClientAPI contains the set of methods on the APIIssueAttachmentsClient type. type APIIssueAttachmentsClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueAttachmentCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueAttachmentCollectionIterator, err error) } var _ APIIssueAttachmentsClientAPI = (*apimanagement.APIIssueAttachmentsClient)(nil) @@ -222,6 +234,7 @@ type AuthorizationServerClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result apimanagement.AuthorizationServerContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters apimanagement.AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -234,6 +247,7 @@ type BackendClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result apimanagement.BackendContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionIterator, err error) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters *apimanagement.BackendReconnectContract) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters apimanagement.BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -247,6 +261,7 @@ type CertificateClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result apimanagement.CertificateContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionIterator, err error) } var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) @@ -254,6 +269,7 @@ var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result apimanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) @@ -268,7 +284,9 @@ type ServiceClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceResource, err error) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceGetSsoTokenResult, err error) List(ctx context.Context) (result apimanagement.ServiceListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.ServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultIterator, err error) Restore(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBackupRestoreParameters) (result apimanagement.ServiceRestoreFuture, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateParameters) (result apimanagement.ServiceUpdateFuture, err error) UpdateHostname(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateHostnameParameters) (result apimanagement.ServiceUpdateHostnameFuture, err error) @@ -284,6 +302,7 @@ type DiagnosticClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result apimanagement.DiagnosticContract, err error) Head(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, parameters apimanagement.DiagnosticContract, ifMatch string) (result autorest.Response, err error) } @@ -295,6 +314,7 @@ type DiagnosticLoggerClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (result apimanagement.LoggerContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) } var _ DiagnosticLoggerClientAPI = (*apimanagement.DiagnosticLoggerClient)(nil) @@ -306,6 +326,7 @@ type EmailTemplateClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName) (result apimanagement.EmailTemplateContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName, parameters apimanagement.EmailTemplateUpdateParameters) (result autorest.Response, err error) } @@ -318,6 +339,7 @@ type GroupClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result apimanagement.GroupContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters apimanagement.GroupUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -329,6 +351,7 @@ type GroupUserClientAPI interface { Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result apimanagement.UserContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) } var _ GroupUserClientAPI = (*apimanagement.GroupUserClient)(nil) @@ -352,6 +375,7 @@ type LoggerClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result apimanagement.LoggerContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters apimanagement.LoggerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -362,6 +386,7 @@ type NotificationClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName apimanagement.NotificationName) (result apimanagement.NotificationContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, notificationName apimanagement.NotificationName) (result apimanagement.NotificationContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.NotificationCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.NotificationCollectionIterator, err error) } var _ NotificationClientAPI = (*apimanagement.NotificationClient)(nil) @@ -401,6 +426,7 @@ type OpenIDConnectProviderClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result apimanagement.OpenidConnectProviderContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters apimanagement.OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -443,6 +469,7 @@ type ProductClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.ProductContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.ProductUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -454,6 +481,7 @@ type ProductAPIClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result apimanagement.APIContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) } var _ ProductAPIClientAPI = (*apimanagement.ProductAPIClient)(nil) @@ -464,6 +492,7 @@ type ProductGroupClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result apimanagement.GroupContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) @@ -471,6 +500,7 @@ var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) // ProductSubscriptionsClientAPI contains the set of methods on the ProductSubscriptionsClient type. type ProductSubscriptionsClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient)(nil) @@ -492,6 +522,7 @@ type PropertyClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result apimanagement.PropertyContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters apimanagement.PropertyUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -516,13 +547,20 @@ var _ QuotaByPeriodKeysClientAPI = (*apimanagement.QuotaByPeriodKeysClient)(nil) // ReportsClientAPI contains the set of methods on the ReportsClient type. type ReportsClientAPI interface { ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByGeo(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByGeoComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByRequest(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.RequestReportCollection, err error) ListBySubscription(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByTime(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByTimeComplete(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByUser(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) } var _ ReportsClientAPI = (*apimanagement.ReportsClient)(nil) @@ -534,6 +572,7 @@ type SubscriptionClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result apimanagement.SubscriptionContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters apimanagement.SubscriptionUpdateParameters, ifMatch string) (result autorest.Response, err error) @@ -544,6 +583,7 @@ var _ SubscriptionClientAPI = (*apimanagement.SubscriptionClient)(nil) // TagResourceClientAPI contains the set of methods on the TagResourceClient type. type TagResourceClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionIterator, err error) } var _ TagResourceClientAPI = (*apimanagement.TagResourceClient)(nil) @@ -567,9 +607,13 @@ type TagClientAPI interface { GetEntityStateByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (result autorest.Response, err error) GetEntityStateByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters apimanagement.TagCreateUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -582,6 +626,7 @@ type TagDescriptionClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result apimanagement.TagDescriptionContract, err error) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagDescriptionCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagDescriptionCollectionIterator, err error) } var _ TagDescriptionClientAPI = (*apimanagement.TagDescriptionClient)(nil) @@ -589,6 +634,7 @@ var _ TagDescriptionClientAPI = (*apimanagement.TagDescriptionClient)(nil) // OperationClientAPI contains the set of methods on the OperationClient type. type OperationClientAPI interface { ListByTags(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionIterator, err error) } var _ OperationClientAPI = (*apimanagement.OperationClient)(nil) @@ -631,6 +677,7 @@ type UserClientAPI interface { GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result autorest.Response, err error) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserTokenParameters) (result apimanagement.UserTokenResult, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -639,6 +686,7 @@ var _ UserClientAPI = (*apimanagement.UserClient)(nil) // UserGroupClientAPI contains the set of methods on the UserGroupClient type. type UserGroupClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) @@ -646,6 +694,7 @@ var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) // UserSubscriptionClientAPI contains the set of methods on the UserSubscriptionClient type. type UserSubscriptionClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ UserSubscriptionClientAPI = (*apimanagement.UserSubscriptionClient)(nil) @@ -664,6 +713,7 @@ type APIVersionSetClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result apimanagement.APIVersionSetContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APIVersionSetCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APIVersionSetCollectionIterator, err error) Update(ctx context.Context, parameters apimanagement.APIVersionSetUpdateParameters, ifMatch string, resourceGroupName string, serviceName string, versionSetID string) (result autorest.Response, err error) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperation.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperation.go index 1d9b7ebe2ff2..3851fb5b486a 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperation.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperation.go @@ -36,7 +36,8 @@ func NewAPIOperationClient(subscriptionID string) APIOperationClient { return NewAPIOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationClientWithBaseURI creates an instance of the APIOperationClient client. +// NewAPIOperationClientWithBaseURI creates an instance of the APIOperationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIOperationClientWithBaseURI(baseURI string, subscriptionID string) APIOperationClient { return APIOperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperationpolicy.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperationpolicy.go index e1e8406c4c53..6e864bdaece5 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperationpolicy.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperationpolicy.go @@ -36,7 +36,9 @@ func NewAPIOperationPolicyClient(subscriptionID string) APIOperationPolicyClient return NewAPIOperationPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationPolicyClientWithBaseURI creates an instance of the APIOperationPolicyClient client. +// NewAPIOperationPolicyClientWithBaseURI creates an instance of the APIOperationPolicyClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIOperationPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIOperationPolicyClient { return APIOperationPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apipolicy.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apipolicy.go index a66abfa833a6..c703d0ba5035 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apipolicy.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apipolicy.go @@ -36,7 +36,8 @@ func NewAPIPolicyClient(subscriptionID string) APIPolicyClient { return NewAPIPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client. +// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIPolicyClient { return APIPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiproduct.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiproduct.go index 4ca7f66e2bd3..1875f6b1df18 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiproduct.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiproduct.go @@ -36,7 +36,8 @@ func NewAPIProductClient(subscriptionID string) APIProductClient { return NewAPIProductClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIProductClientWithBaseURI creates an instance of the APIProductClient client. +// NewAPIProductClientWithBaseURI creates an instance of the APIProductClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIProductClientWithBaseURI(baseURI string, subscriptionID string) APIProductClient { return APIProductClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apirelease.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apirelease.go index 53a8a2ba093c..4b324d411d73 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apirelease.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apirelease.go @@ -36,7 +36,8 @@ func NewAPIReleaseClient(subscriptionID string) APIReleaseClient { return NewAPIReleaseClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIReleaseClientWithBaseURI creates an instance of the APIReleaseClient client. +// NewAPIReleaseClientWithBaseURI creates an instance of the APIReleaseClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIReleaseClientWithBaseURI(baseURI string, subscriptionID string) APIReleaseClient { return APIReleaseClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apirevisions.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apirevisions.go index c08d8c3a834f..0c02bba2e6ba 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apirevisions.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apirevisions.go @@ -36,7 +36,8 @@ func NewAPIRevisionsClient(subscriptionID string) APIRevisionsClient { return NewAPIRevisionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIRevisionsClientWithBaseURI creates an instance of the APIRevisionsClient client. +// NewAPIRevisionsClientWithBaseURI creates an instance of the APIRevisionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIRevisionsClientWithBaseURI(baseURI string, subscriptionID string) APIRevisionsClient { return APIRevisionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apischema.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apischema.go index 07ca5a91103e..b8bb09e2cd23 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apischema.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apischema.go @@ -36,7 +36,8 @@ func NewAPISchemaClient(subscriptionID string) APISchemaClient { return NewAPISchemaClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPISchemaClientWithBaseURI creates an instance of the APISchemaClient client. +// NewAPISchemaClientWithBaseURI creates an instance of the APISchemaClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPISchemaClientWithBaseURI(baseURI string, subscriptionID string) APISchemaClient { return APISchemaClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiversionset.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiversionset.go index 35a38173b6c7..e4512c4444d9 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiversionset.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiversionset.go @@ -36,7 +36,8 @@ func NewAPIVersionSetClient(subscriptionID string) APIVersionSetClient { return NewAPIVersionSetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIVersionSetClientWithBaseURI creates an instance of the APIVersionSetClient client. +// NewAPIVersionSetClientWithBaseURI creates an instance of the APIVersionSetClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIVersionSetClientWithBaseURI(baseURI string, subscriptionID string) APIVersionSetClient { return APIVersionSetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/authorizationserver.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/authorizationserver.go index b8628c809c14..25c82464992e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/authorizationserver.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/authorizationserver.go @@ -36,7 +36,9 @@ func NewAuthorizationServerClient(subscriptionID string) AuthorizationServerClie return NewAuthorizationServerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationServerClientWithBaseURI creates an instance of the AuthorizationServerClient client. +// NewAuthorizationServerClientWithBaseURI creates an instance of the AuthorizationServerClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAuthorizationServerClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationServerClient { return AuthorizationServerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/backend.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/backend.go index 77e018f1fb58..0b7748fe3c2e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/backend.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/backend.go @@ -36,7 +36,8 @@ func NewBackendClient(subscriptionID string) BackendClient { return NewBackendClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackendClientWithBaseURI creates an instance of the BackendClient client. +// NewBackendClientWithBaseURI creates an instance of the BackendClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackendClientWithBaseURI(baseURI string, subscriptionID string) BackendClient { return BackendClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/certificate.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/certificate.go index bbde9cc42ef3..2c49afec5f85 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/certificate.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/client.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/client.go index 4269db922363..09c3b5aeaf84 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/client.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/delegationsettings.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/delegationsettings.go index 752350e3f292..ae3e84d8d733 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/delegationsettings.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/delegationsettings.go @@ -36,7 +36,9 @@ func NewDelegationSettingsClient(subscriptionID string) DelegationSettingsClient return NewDelegationSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDelegationSettingsClientWithBaseURI creates an instance of the DelegationSettingsClient client. +// NewDelegationSettingsClientWithBaseURI creates an instance of the DelegationSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDelegationSettingsClientWithBaseURI(baseURI string, subscriptionID string) DelegationSettingsClient { return DelegationSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnostic.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnostic.go index 9e99d55af1a1..61d4fb237377 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnostic.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnostic.go @@ -36,7 +36,8 @@ func NewDiagnosticClient(subscriptionID string) DiagnosticClient { return NewDiagnosticClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticClientWithBaseURI creates an instance of the DiagnosticClient client. +// NewDiagnosticClientWithBaseURI creates an instance of the DiagnosticClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticClient { return DiagnosticClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go index 3ab9c5ae0d24..fa88c5b3a383 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go @@ -36,7 +36,9 @@ func NewDiagnosticLoggerClient(subscriptionID string) DiagnosticLoggerClient { return NewDiagnosticLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticLoggerClientWithBaseURI creates an instance of the DiagnosticLoggerClient client. +// NewDiagnosticLoggerClientWithBaseURI creates an instance of the DiagnosticLoggerClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticLoggerClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticLoggerClient { return DiagnosticLoggerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/emailtemplate.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/emailtemplate.go index 763564218e1e..82951641a0ce 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/emailtemplate.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/emailtemplate.go @@ -36,7 +36,8 @@ func NewEmailTemplateClient(subscriptionID string) EmailTemplateClient { return NewEmailTemplateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEmailTemplateClientWithBaseURI creates an instance of the EmailTemplateClient client. +// NewEmailTemplateClientWithBaseURI creates an instance of the EmailTemplateClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEmailTemplateClientWithBaseURI(baseURI string, subscriptionID string) EmailTemplateClient { return EmailTemplateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/group.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/group.go index a3a40ced349f..0f19617ac581 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/group.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/group.go @@ -36,7 +36,8 @@ func NewGroupClient(subscriptionID string) GroupClient { return NewGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupClientWithBaseURI creates an instance of the GroupClient client. +// NewGroupClientWithBaseURI creates an instance of the GroupClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClient { return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/groupuser.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/groupuser.go index 4e1ad85fb753..414f18404bc0 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/groupuser.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/groupuser.go @@ -36,7 +36,8 @@ func NewGroupUserClient(subscriptionID string) GroupUserClient { return NewGroupUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupUserClientWithBaseURI creates an instance of the GroupUserClient client. +// NewGroupUserClientWithBaseURI creates an instance of the GroupUserClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupUserClientWithBaseURI(baseURI string, subscriptionID string) GroupUserClient { return GroupUserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/identityprovider.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/identityprovider.go index 8663ec2b48af..cfdd9e19989a 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/identityprovider.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/identityprovider.go @@ -36,7 +36,9 @@ func NewIdentityProviderClient(subscriptionID string) IdentityProviderClient { return NewIdentityProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIdentityProviderClientWithBaseURI creates an instance of the IdentityProviderClient client. +// NewIdentityProviderClientWithBaseURI creates an instance of the IdentityProviderClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIdentityProviderClientWithBaseURI(baseURI string, subscriptionID string) IdentityProviderClient { return IdentityProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/logger.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/logger.go index 8037acc52776..6d4554af34f7 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/logger.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/logger.go @@ -36,7 +36,8 @@ func NewLoggerClient(subscriptionID string) LoggerClient { return NewLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoggerClientWithBaseURI creates an instance of the LoggerClient client. +// NewLoggerClientWithBaseURI creates an instance of the LoggerClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLoggerClientWithBaseURI(baseURI string, subscriptionID string) LoggerClient { return LoggerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/networkstatus.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/networkstatus.go index aa172c47d9b3..39f6e85820f7 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/networkstatus.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/networkstatus.go @@ -36,7 +36,8 @@ func NewNetworkStatusClient(subscriptionID string) NetworkStatusClient { return NewNetworkStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client. +// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNetworkStatusClientWithBaseURI(baseURI string, subscriptionID string) NetworkStatusClient { return NetworkStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/notification.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/notification.go index d06b52f2c516..9f38897c7f59 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/notification.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/notification.go @@ -36,7 +36,8 @@ func NewNotificationClient(subscriptionID string) NotificationClient { return NewNotificationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationClientWithBaseURI creates an instance of the NotificationClient client. +// NewNotificationClientWithBaseURI creates an instance of the NotificationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNotificationClientWithBaseURI(baseURI string, subscriptionID string) NotificationClient { return NotificationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/notificationrecipientemail.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/notificationrecipientemail.go index cd27886353ed..616783532b63 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/notificationrecipientemail.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/notificationrecipientemail.go @@ -36,7 +36,9 @@ func NewNotificationRecipientEmailClient(subscriptionID string) NotificationReci return NewNotificationRecipientEmailClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationRecipientEmailClientWithBaseURI creates an instance of the NotificationRecipientEmailClient client. +// NewNotificationRecipientEmailClientWithBaseURI creates an instance of the NotificationRecipientEmailClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewNotificationRecipientEmailClientWithBaseURI(baseURI string, subscriptionID string) NotificationRecipientEmailClient { return NotificationRecipientEmailClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/notificationrecipientuser.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/notificationrecipientuser.go index 3ecd10219b41..ef7ddbefc29b 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/notificationrecipientuser.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/notificationrecipientuser.go @@ -36,7 +36,9 @@ func NewNotificationRecipientUserClient(subscriptionID string) NotificationRecip return NewNotificationRecipientUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationRecipientUserClientWithBaseURI creates an instance of the NotificationRecipientUserClient client. +// NewNotificationRecipientUserClientWithBaseURI creates an instance of the NotificationRecipientUserClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewNotificationRecipientUserClientWithBaseURI(baseURI string, subscriptionID string) NotificationRecipientUserClient { return NotificationRecipientUserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/openidconnectprovider.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/openidconnectprovider.go index e733aba314b2..8ef7b93c013a 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/openidconnectprovider.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/openidconnectprovider.go @@ -36,7 +36,9 @@ func NewOpenIDConnectProviderClient(subscriptionID string) OpenIDConnectProvider return NewOpenIDConnectProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenIDConnectProviderClientWithBaseURI creates an instance of the OpenIDConnectProviderClient client. +// NewOpenIDConnectProviderClientWithBaseURI creates an instance of the OpenIDConnectProviderClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewOpenIDConnectProviderClientWithBaseURI(baseURI string, subscriptionID string) OpenIDConnectProviderClient { return OpenIDConnectProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/operation.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/operation.go index 6261903f3153..78c072559f4e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/operation.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/operation.go @@ -36,7 +36,8 @@ func NewOperationClient(subscriptionID string) OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string, subscriptionID string) OperationClient { return OperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/operations.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/operations.go index 3fd39307de80..ff3e23691aec 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/operations.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/policy.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/policy.go index 0f10ef80a004..d7e4143c9fa9 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/policy.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/policy.go @@ -36,7 +36,8 @@ func NewPolicyClient(subscriptionID string) PolicyClient { return NewPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client. +// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyClientWithBaseURI(baseURI string, subscriptionID string) PolicyClient { return PolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/policysnippets.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/policysnippets.go index b5c7f4970276..cc02bbc083bf 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/policysnippets.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/policysnippets.go @@ -36,7 +36,8 @@ func NewPolicySnippetsClient(subscriptionID string) PolicySnippetsClient { return NewPolicySnippetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client. +// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySnippetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySnippetsClient { return PolicySnippetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/product.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/product.go index 2eaea059947b..59e9a6fe3b8d 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/product.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/product.go @@ -36,7 +36,8 @@ func NewProductClient(subscriptionID string) ProductClient { return NewProductClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductClientWithBaseURI creates an instance of the ProductClient client. +// NewProductClientWithBaseURI creates an instance of the ProductClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductClientWithBaseURI(baseURI string, subscriptionID string) ProductClient { return ProductClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/productapi.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/productapi.go index 2b2b39bf0db5..1694cdc53c54 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/productapi.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/productapi.go @@ -36,7 +36,8 @@ func NewProductAPIClient(subscriptionID string) ProductAPIClient { return NewProductAPIClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductAPIClientWithBaseURI creates an instance of the ProductAPIClient client. +// NewProductAPIClientWithBaseURI creates an instance of the ProductAPIClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductAPIClientWithBaseURI(baseURI string, subscriptionID string) ProductAPIClient { return ProductAPIClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/productgroup.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/productgroup.go index f1550f10f377..74733de013d8 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/productgroup.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/productgroup.go @@ -36,7 +36,8 @@ func NewProductGroupClient(subscriptionID string) ProductGroupClient { return NewProductGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductGroupClientWithBaseURI creates an instance of the ProductGroupClient client. +// NewProductGroupClientWithBaseURI creates an instance of the ProductGroupClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductGroupClientWithBaseURI(baseURI string, subscriptionID string) ProductGroupClient { return ProductGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/productpolicy.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/productpolicy.go index 9e3a196a5f64..cda969b860de 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/productpolicy.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/productpolicy.go @@ -36,7 +36,8 @@ func NewProductPolicyClient(subscriptionID string) ProductPolicyClient { return NewProductPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client. +// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductPolicyClientWithBaseURI(baseURI string, subscriptionID string) ProductPolicyClient { return ProductPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/productsubscriptions.go index 05809fd23ea0..c93f1a653cdd 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/productsubscriptions.go @@ -36,7 +36,9 @@ func NewProductSubscriptionsClient(subscriptionID string) ProductSubscriptionsCl return NewProductSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client. +// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProductSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ProductSubscriptionsClient { return ProductSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go index 836492419640..f854353bec57 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go @@ -36,7 +36,8 @@ func NewPropertyClient(subscriptionID string) PropertyClient { return NewPropertyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client. +// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) PropertyClient { return PropertyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/quotabycounterkeys.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/quotabycounterkeys.go index 40de93aa4e86..cc917f29a69e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/quotabycounterkeys.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/quotabycounterkeys.go @@ -36,7 +36,9 @@ func NewQuotaByCounterKeysClient(subscriptionID string) QuotaByCounterKeysClient return NewQuotaByCounterKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client. +// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByCounterKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByCounterKeysClient { return QuotaByCounterKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/quotabyperiodkeys.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/quotabyperiodkeys.go index a9dbbcb04c34..43dcf07b997a 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/quotabyperiodkeys.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/quotabyperiodkeys.go @@ -36,7 +36,9 @@ func NewQuotaByPeriodKeysClient(subscriptionID string) QuotaByPeriodKeysClient { return NewQuotaByPeriodKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client. +// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByPeriodKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByPeriodKeysClient { return QuotaByPeriodKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/regions.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/regions.go index 6238a7d1904b..2fe04b86311c 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/regions.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/regions.go @@ -36,7 +36,8 @@ func NewRegionsClient(subscriptionID string) RegionsClient { return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go index aad0c75826f9..a0ba22322167 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go @@ -36,7 +36,8 @@ func NewReportsClient(subscriptionID string) ReportsClient { return NewReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReportsClientWithBaseURI creates an instance of the ReportsClient client. +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return ReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/service.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/service.go index 52d48e9a5e00..36843eb8b4d9 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/service.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/service.go @@ -36,7 +36,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/signinsettings.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/signinsettings.go index cadf3e286008..0d2d36397a07 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/signinsettings.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/signinsettings.go @@ -36,7 +36,8 @@ func NewSignInSettingsClient(subscriptionID string) SignInSettingsClient { return NewSignInSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSignInSettingsClientWithBaseURI creates an instance of the SignInSettingsClient client. +// NewSignInSettingsClientWithBaseURI creates an instance of the SignInSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignInSettingsClientWithBaseURI(baseURI string, subscriptionID string) SignInSettingsClient { return SignInSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/signupsettings.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/signupsettings.go index ebce066c4220..75d52bc99af6 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/signupsettings.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/signupsettings.go @@ -36,7 +36,8 @@ func NewSignUpSettingsClient(subscriptionID string) SignUpSettingsClient { return NewSignUpSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSignUpSettingsClientWithBaseURI creates an instance of the SignUpSettingsClient client. +// NewSignUpSettingsClientWithBaseURI creates an instance of the SignUpSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignUpSettingsClientWithBaseURI(baseURI string, subscriptionID string) SignUpSettingsClient { return SignUpSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go index 38645ae4c0d0..b68a8912d628 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go @@ -36,7 +36,8 @@ func NewSubscriptionClient(subscriptionID string) SubscriptionClient { return NewSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionClientWithBaseURI creates an instance of the SubscriptionClient client. +// NewSubscriptionClientWithBaseURI creates an instance of the SubscriptionClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionClient { return SubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tag.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tag.go index b403ed011194..cda7b22b2376 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tag.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tag.go @@ -36,7 +36,8 @@ func NewTagClient(subscriptionID string) TagClient { return NewTagClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagClientWithBaseURI creates an instance of the TagClient client. +// NewTagClientWithBaseURI creates an instance of the TagClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagClientWithBaseURI(baseURI string, subscriptionID string) TagClient { return TagClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go index ac88511f6c6b..07cb0be8f578 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go @@ -36,7 +36,8 @@ func NewTagDescriptionClient(subscriptionID string) TagDescriptionClient { return NewTagDescriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagDescriptionClientWithBaseURI creates an instance of the TagDescriptionClient client. +// NewTagDescriptionClientWithBaseURI creates an instance of the TagDescriptionClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) TagDescriptionClient { return TagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagresource.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagresource.go index 58e0828a6de7..6e9c2b033dfc 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagresource.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagresource.go @@ -36,7 +36,8 @@ func NewTagResourceClient(subscriptionID string) TagResourceClient { return NewTagResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagResourceClientWithBaseURI creates an instance of the TagResourceClient client. +// NewTagResourceClientWithBaseURI creates an instance of the TagResourceClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagResourceClientWithBaseURI(baseURI string, subscriptionID string) TagResourceClient { return TagResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantaccess.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantaccess.go index e9e5671b697e..596c7b2c6a5d 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantaccess.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantaccess.go @@ -36,7 +36,8 @@ func NewTenantAccessClient(subscriptionID string) TenantAccessClient { return NewTenantAccessClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client. +// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessClient { return TenantAccessClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantaccessgit.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantaccessgit.go index a970400247fb..df5f6f5cd45b 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantaccessgit.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantaccessgit.go @@ -36,7 +36,8 @@ func NewTenantAccessGitClient(subscriptionID string) TenantAccessGitClient { return NewTenantAccessGitClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client. +// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessGitClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessGitClient { return TenantAccessGitClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantconfiguration.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantconfiguration.go index 4c5006d04a1b..8b8dca430947 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantconfiguration.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tenantconfiguration.go @@ -36,7 +36,9 @@ func NewTenantConfigurationClient(subscriptionID string) TenantConfigurationClie return NewTenantConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client. +// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantConfigurationClientWithBaseURI(baseURI string, subscriptionID string) TenantConfigurationClient { return TenantConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/user.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/user.go index 38e4bd7c5b7a..fef152a5b865 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/user.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/user.go @@ -36,7 +36,8 @@ func NewUserClient(subscriptionID string) UserClient { return NewUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserClientWithBaseURI creates an instance of the UserClient client. +// NewUserClientWithBaseURI creates an instance of the UserClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserClientWithBaseURI(baseURI string, subscriptionID string) UserClient { return UserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/usergroup.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/usergroup.go index 33ff3596cfbf..87415b0f8b80 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/usergroup.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/usergroup.go @@ -36,7 +36,8 @@ func NewUserGroupClient(subscriptionID string) UserGroupClient { return NewUserGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserGroupClientWithBaseURI creates an instance of the UserGroupClient client. +// NewUserGroupClientWithBaseURI creates an instance of the UserGroupClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserGroupClientWithBaseURI(baseURI string, subscriptionID string) UserGroupClient { return UserGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/useridentities.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/useridentities.go index 4493117eb785..f9d8738be967 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/useridentities.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/useridentities.go @@ -36,7 +36,8 @@ func NewUserIdentitiesClient(subscriptionID string) UserIdentitiesClient { return NewUserIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client. +// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) UserIdentitiesClient { return UserIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/usersubscription.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/usersubscription.go index f80f04ac490e..6b526c60bc1e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/usersubscription.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/usersubscription.go @@ -36,7 +36,9 @@ func NewUserSubscriptionClient(subscriptionID string) UserSubscriptionClient { return NewUserSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserSubscriptionClientWithBaseURI creates an instance of the UserSubscriptionClient client. +// NewUserSubscriptionClientWithBaseURI creates an instance of the UserSubscriptionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewUserSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) UserSubscriptionClient { return UserSubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go index 70e8fa0a2420..8e5186dcd2ed 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go @@ -36,7 +36,8 @@ func NewAPIClient(subscriptionID string) APIClient { return NewAPIClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIClientWithBaseURI creates an instance of the APIClient client. +// NewAPIClientWithBaseURI creates an instance of the APIClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIClientWithBaseURI(baseURI string, subscriptionID string) APIClient { return APIClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go index d797502b3cea..51778e0dc025 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go @@ -36,7 +36,8 @@ func NewAPIDiagnosticClient(subscriptionID string) APIDiagnosticClient { return NewAPIDiagnosticClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIDiagnosticClientWithBaseURI creates an instance of the APIDiagnosticClient client. +// NewAPIDiagnosticClientWithBaseURI creates an instance of the APIDiagnosticClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) APIDiagnosticClient { return APIDiagnosticClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go index 0542f87afbd4..1076396a2f11 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go @@ -36,7 +36,9 @@ func NewAPIDiagnosticLoggerClient(subscriptionID string) APIDiagnosticLoggerClie return NewAPIDiagnosticLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIDiagnosticLoggerClientWithBaseURI creates an instance of the APIDiagnosticLoggerClient client. +// NewAPIDiagnosticLoggerClientWithBaseURI creates an instance of the APIDiagnosticLoggerClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIDiagnosticLoggerClientWithBaseURI(baseURI string, subscriptionID string) APIDiagnosticLoggerClient { return APIDiagnosticLoggerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiexport.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiexport.go index d4c3de171596..ffe3ff581a46 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiexport.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiexport.go @@ -36,7 +36,8 @@ func NewAPIExportClient(subscriptionID string) APIExportClient { return NewAPIExportClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client. +// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIExportClientWithBaseURI(baseURI string, subscriptionID string) APIExportClient { return APIExportClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go index 3de65fa4bd75..c405563b7e0c 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go @@ -36,7 +36,8 @@ func NewAPIIssueClient(subscriptionID string) APIIssueClient { return NewAPIIssueClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueClientWithBaseURI creates an instance of the APIIssueClient client. +// NewAPIIssueClientWithBaseURI creates an instance of the APIIssueClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssueClientWithBaseURI(baseURI string, subscriptionID string) APIIssueClient { return APIIssueClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go index 5d7e4111e08c..35788ec2144d 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go @@ -36,7 +36,9 @@ func NewAPIIssueAttachmentClient(subscriptionID string) APIIssueAttachmentClient return NewAPIIssueAttachmentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueAttachmentClientWithBaseURI creates an instance of the APIIssueAttachmentClient client. +// NewAPIIssueAttachmentClientWithBaseURI creates an instance of the APIIssueAttachmentClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIIssueAttachmentClientWithBaseURI(baseURI string, subscriptionID string) APIIssueAttachmentClient { return APIIssueAttachmentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go index b2deb1da4bd1..b305be5cb8d5 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go @@ -36,7 +36,8 @@ func NewAPIIssueCommentClient(subscriptionID string) APIIssueCommentClient { return NewAPIIssueCommentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueCommentClientWithBaseURI creates an instance of the APIIssueCommentClient client. +// NewAPIIssueCommentClientWithBaseURI creates an instance of the APIIssueCommentClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssueCommentClientWithBaseURI(baseURI string, subscriptionID string) APIIssueCommentClient { return APIIssueCommentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apimanagementapi/interfaces.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apimanagementapi/interfaces.go index 862c665287d5..60f2b2bc3ddf 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apimanagementapi/interfaces.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apimanagementapi/interfaces.go @@ -44,6 +44,7 @@ var _ PolicySnippetsClientAPI = (*apimanagement.PolicySnippetsClient)(nil) // RegionsClientAPI contains the set of methods on the RegionsClient type. type RegionsClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.RegionListResultPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.RegionListResultIterator, err error) } var _ RegionsClientAPI = (*apimanagement.RegionsClient)(nil) @@ -55,7 +56,9 @@ type APIClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (result apimanagement.APICollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (result apimanagement.APICollectionIterator, err error) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.APIUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -64,6 +67,7 @@ var _ APIClientAPI = (*apimanagement.APIClient)(nil) // APIRevisionsClientAPI contains the set of methods on the APIRevisionsClient type. type APIRevisionsClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIRevisionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIRevisionCollectionIterator, err error) } var _ APIRevisionsClientAPI = (*apimanagement.APIRevisionsClient)(nil) @@ -75,6 +79,7 @@ type APIReleaseClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result apimanagement.APIReleaseContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIReleaseCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIReleaseCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters apimanagement.APIReleaseContract, ifMatch string) (result autorest.Response, err error) } @@ -87,6 +92,7 @@ type APIOperationClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.OperationContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.OperationUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -106,6 +112,7 @@ var _ APIOperationPolicyClientAPI = (*apimanagement.APIOperationPolicyClient)(ni // APIProductClientAPI contains the set of methods on the APIProductClient type. type APIProductClientAPI interface { ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionPage, err error) + ListByApisComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionIterator, err error) } var _ APIProductClientAPI = (*apimanagement.APIProductClient)(nil) @@ -128,6 +135,7 @@ type APISchemaClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result apimanagement.SchemaContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.SchemaCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.SchemaCollectionIterator, err error) } var _ APISchemaClientAPI = (*apimanagement.APISchemaClient)(nil) @@ -139,6 +147,7 @@ type APIDiagnosticClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result apimanagement.DiagnosticContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, parameters apimanagement.DiagnosticContract, ifMatch string) (result autorest.Response, err error) } @@ -150,6 +159,7 @@ type APIDiagnosticLoggerClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (result apimanagement.LoggerContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) } var _ APIDiagnosticLoggerClientAPI = (*apimanagement.APIDiagnosticLoggerClient)(nil) @@ -161,6 +171,7 @@ type APIIssueClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string) (result apimanagement.IssueContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.IssueCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.IssueCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, parameters apimanagement.IssueUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -173,6 +184,7 @@ type APIIssueCommentClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string) (result apimanagement.IssueCommentContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueCommentCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueCommentCollectionIterator, err error) } var _ APIIssueCommentClientAPI = (*apimanagement.APIIssueCommentClient)(nil) @@ -184,6 +196,7 @@ type APIIssueAttachmentClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string) (result apimanagement.IssueAttachmentContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueAttachmentCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueAttachmentCollectionIterator, err error) } var _ APIIssueAttachmentClientAPI = (*apimanagement.APIIssueAttachmentClient)(nil) @@ -195,6 +208,7 @@ type AuthorizationServerClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result apimanagement.AuthorizationServerContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters apimanagement.AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -207,6 +221,7 @@ type BackendClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result apimanagement.BackendContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionIterator, err error) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters *apimanagement.BackendReconnectContract) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters apimanagement.BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -220,6 +235,7 @@ type CertificateClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result apimanagement.CertificateContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionIterator, err error) } var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) @@ -227,6 +243,7 @@ var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result apimanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) @@ -234,6 +251,7 @@ var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) // ServiceSkusClientAPI contains the set of methods on the ServiceSkusClient type. type ServiceSkusClientAPI interface { ListAvailableServiceSkus(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ResourceSkuResultsPage, err error) + ListAvailableServiceSkusComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ResourceSkuResultsIterator, err error) } var _ ServiceSkusClientAPI = (*apimanagement.ServiceSkusClient)(nil) @@ -248,7 +266,9 @@ type ServiceClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceResource, err error) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceGetSsoTokenResult, err error) List(ctx context.Context) (result apimanagement.ServiceListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.ServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultIterator, err error) Restore(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBackupRestoreParameters) (result apimanagement.ServiceRestoreFuture, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateParameters) (result apimanagement.ServiceUpdateFuture, err error) UpdateHostname(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateHostnameParameters) (result apimanagement.ServiceUpdateHostnameFuture, err error) @@ -264,6 +284,7 @@ type DiagnosticClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result apimanagement.DiagnosticContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, parameters apimanagement.DiagnosticContract, ifMatch string) (result autorest.Response, err error) } @@ -275,6 +296,7 @@ type DiagnosticLoggerClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (result apimanagement.LoggerContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) } var _ DiagnosticLoggerClientAPI = (*apimanagement.DiagnosticLoggerClient)(nil) @@ -286,6 +308,7 @@ type EmailTemplateClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName) (result apimanagement.EmailTemplateContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName, parameters apimanagement.EmailTemplateUpdateParameters) (result autorest.Response, err error) } @@ -298,6 +321,7 @@ type GroupClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result apimanagement.GroupContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters apimanagement.GroupUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -309,6 +333,7 @@ type GroupUserClientAPI interface { Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result apimanagement.UserContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) } var _ GroupUserClientAPI = (*apimanagement.GroupUserClient)(nil) @@ -320,6 +345,7 @@ type IdentityProviderClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType) (result apimanagement.IdentityProviderContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.IdentityProviderListPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.IdentityProviderListIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType, parameters apimanagement.IdentityProviderUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -332,6 +358,7 @@ type LoggerClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result apimanagement.LoggerContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters apimanagement.LoggerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -342,6 +369,7 @@ type NotificationClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName apimanagement.NotificationName, ifMatch string) (result apimanagement.NotificationContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, notificationName apimanagement.NotificationName) (result apimanagement.NotificationContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.NotificationCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.NotificationCollectionIterator, err error) } var _ NotificationClientAPI = (*apimanagement.NotificationClient)(nil) @@ -381,6 +409,7 @@ type OpenIDConnectProviderClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result apimanagement.OpenidConnectProviderContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters apimanagement.OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -423,6 +452,7 @@ type ProductClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.ProductContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.ProductUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -434,6 +464,7 @@ type ProductAPIClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result apimanagement.APIContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) } var _ ProductAPIClientAPI = (*apimanagement.ProductAPIClient)(nil) @@ -444,6 +475,7 @@ type ProductGroupClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result apimanagement.GroupContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) @@ -451,6 +483,7 @@ var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) // ProductSubscriptionsClientAPI contains the set of methods on the ProductSubscriptionsClient type. type ProductSubscriptionsClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient)(nil) @@ -473,6 +506,7 @@ type PropertyClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result apimanagement.PropertyContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters apimanagement.PropertyUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -497,13 +531,20 @@ var _ QuotaByPeriodKeysClientAPI = (*apimanagement.QuotaByPeriodKeysClient)(nil) // ReportsClientAPI contains the set of methods on the ReportsClient type. type ReportsClientAPI interface { ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByGeo(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByGeoComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByRequest(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.RequestReportCollection, err error) ListBySubscription(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByTime(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByTimeComplete(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByUser(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) } var _ ReportsClientAPI = (*apimanagement.ReportsClient)(nil) @@ -515,6 +556,7 @@ type SubscriptionClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result apimanagement.SubscriptionContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters apimanagement.SubscriptionUpdateParameters, ifMatch string, notify *bool) (result autorest.Response, err error) @@ -525,6 +567,7 @@ var _ SubscriptionClientAPI = (*apimanagement.SubscriptionClient)(nil) // TagResourceClientAPI contains the set of methods on the TagResourceClient type. type TagResourceClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionIterator, err error) } var _ TagResourceClientAPI = (*apimanagement.TagResourceClient)(nil) @@ -548,9 +591,13 @@ type TagClientAPI interface { GetEntityStateByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (result autorest.Response, err error) GetEntityStateByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters apimanagement.TagCreateUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -563,6 +610,7 @@ type TagDescriptionClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result apimanagement.TagDescriptionContract, err error) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagDescriptionCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagDescriptionCollectionIterator, err error) } var _ TagDescriptionClientAPI = (*apimanagement.TagDescriptionClient)(nil) @@ -570,6 +618,7 @@ var _ TagDescriptionClientAPI = (*apimanagement.TagDescriptionClient)(nil) // OperationClientAPI contains the set of methods on the OperationClient type. type OperationClientAPI interface { ListByTags(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionIterator, err error) } var _ OperationClientAPI = (*apimanagement.OperationClient)(nil) @@ -613,6 +662,7 @@ type UserClientAPI interface { GetIdentity(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.CurrentUserIdentity, err error) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserTokenParameters) (result apimanagement.UserTokenResult, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters apimanagement.UserUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -621,6 +671,7 @@ var _ UserClientAPI = (*apimanagement.UserClient)(nil) // UserGroupClientAPI contains the set of methods on the UserGroupClient type. type UserGroupClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) @@ -628,6 +679,7 @@ var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) // UserSubscriptionClientAPI contains the set of methods on the UserSubscriptionClient type. type UserSubscriptionClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ UserSubscriptionClientAPI = (*apimanagement.UserSubscriptionClient)(nil) @@ -635,6 +687,7 @@ var _ UserSubscriptionClientAPI = (*apimanagement.UserSubscriptionClient)(nil) // UserIdentitiesClientAPI contains the set of methods on the UserIdentitiesClient type. type UserIdentitiesClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result apimanagement.UserIdentityCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result apimanagement.UserIdentityCollectionIterator, err error) } var _ UserIdentitiesClientAPI = (*apimanagement.UserIdentitiesClient)(nil) @@ -646,6 +699,7 @@ type APIVersionSetClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result apimanagement.APIVersionSetContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APIVersionSetCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APIVersionSetCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, parameters apimanagement.APIVersionSetUpdateParameters, ifMatch string) (result autorest.Response, err error) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go index 860996c10cc2..f544fd6e517d 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go @@ -36,7 +36,8 @@ func NewAPIOperationClient(subscriptionID string) APIOperationClient { return NewAPIOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationClientWithBaseURI creates an instance of the APIOperationClient client. +// NewAPIOperationClientWithBaseURI creates an instance of the APIOperationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIOperationClientWithBaseURI(baseURI string, subscriptionID string) APIOperationClient { return APIOperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperationpolicy.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperationpolicy.go index 1184193f6fcb..238877770891 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperationpolicy.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperationpolicy.go @@ -36,7 +36,9 @@ func NewAPIOperationPolicyClient(subscriptionID string) APIOperationPolicyClient return NewAPIOperationPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationPolicyClientWithBaseURI creates an instance of the APIOperationPolicyClient client. +// NewAPIOperationPolicyClientWithBaseURI creates an instance of the APIOperationPolicyClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIOperationPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIOperationPolicyClient { return APIOperationPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apipolicy.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apipolicy.go index 98944068d192..b787e70a7cd5 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apipolicy.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apipolicy.go @@ -36,7 +36,8 @@ func NewAPIPolicyClient(subscriptionID string) APIPolicyClient { return NewAPIPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client. +// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIPolicyClient { return APIPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go index 6a550f3da640..d6d6199c4e61 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go @@ -36,7 +36,8 @@ func NewAPIProductClient(subscriptionID string) APIProductClient { return NewAPIProductClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIProductClientWithBaseURI creates an instance of the APIProductClient client. +// NewAPIProductClientWithBaseURI creates an instance of the APIProductClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIProductClientWithBaseURI(baseURI string, subscriptionID string) APIProductClient { return APIProductClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go index d377ee5b3a01..d9d961ed41c0 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go @@ -36,7 +36,8 @@ func NewAPIReleaseClient(subscriptionID string) APIReleaseClient { return NewAPIReleaseClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIReleaseClientWithBaseURI creates an instance of the APIReleaseClient client. +// NewAPIReleaseClientWithBaseURI creates an instance of the APIReleaseClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIReleaseClientWithBaseURI(baseURI string, subscriptionID string) APIReleaseClient { return APIReleaseClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go index e592aa54a3ce..013561f5a480 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go @@ -36,7 +36,8 @@ func NewAPIRevisionsClient(subscriptionID string) APIRevisionsClient { return NewAPIRevisionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIRevisionsClientWithBaseURI creates an instance of the APIRevisionsClient client. +// NewAPIRevisionsClientWithBaseURI creates an instance of the APIRevisionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIRevisionsClientWithBaseURI(baseURI string, subscriptionID string) APIRevisionsClient { return APIRevisionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apischema.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apischema.go index 6c968a623f43..c29154898a67 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apischema.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apischema.go @@ -36,7 +36,8 @@ func NewAPISchemaClient(subscriptionID string) APISchemaClient { return NewAPISchemaClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPISchemaClientWithBaseURI creates an instance of the APISchemaClient client. +// NewAPISchemaClientWithBaseURI creates an instance of the APISchemaClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPISchemaClientWithBaseURI(baseURI string, subscriptionID string) APISchemaClient { return APISchemaClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go index 9b076462e145..1b630540a4c9 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go @@ -36,7 +36,8 @@ func NewAPIVersionSetClient(subscriptionID string) APIVersionSetClient { return NewAPIVersionSetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIVersionSetClientWithBaseURI creates an instance of the APIVersionSetClient client. +// NewAPIVersionSetClientWithBaseURI creates an instance of the APIVersionSetClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIVersionSetClientWithBaseURI(baseURI string, subscriptionID string) APIVersionSetClient { return APIVersionSetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go index f2cf297b900a..96c80fcd4846 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go @@ -36,7 +36,9 @@ func NewAuthorizationServerClient(subscriptionID string) AuthorizationServerClie return NewAuthorizationServerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationServerClientWithBaseURI creates an instance of the AuthorizationServerClient client. +// NewAuthorizationServerClientWithBaseURI creates an instance of the AuthorizationServerClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAuthorizationServerClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationServerClient { return AuthorizationServerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go index cbc401781c84..ca4e85a3bc6f 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go @@ -36,7 +36,8 @@ func NewBackendClient(subscriptionID string) BackendClient { return NewBackendClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackendClientWithBaseURI creates an instance of the BackendClient client. +// NewBackendClientWithBaseURI creates an instance of the BackendClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackendClientWithBaseURI(baseURI string, subscriptionID string) BackendClient { return BackendClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go index c4a50de0dc3e..767269a1a0b0 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/client.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/client.go index a1e4456c4fa7..cf2bd32aeeec 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/client.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/delegationsettings.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/delegationsettings.go index 109af995b57f..b3672e5aeb78 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/delegationsettings.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/delegationsettings.go @@ -36,7 +36,9 @@ func NewDelegationSettingsClient(subscriptionID string) DelegationSettingsClient return NewDelegationSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDelegationSettingsClientWithBaseURI creates an instance of the DelegationSettingsClient client. +// NewDelegationSettingsClientWithBaseURI creates an instance of the DelegationSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDelegationSettingsClientWithBaseURI(baseURI string, subscriptionID string) DelegationSettingsClient { return DelegationSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go index 178af8d52c36..e5b88d5f8a77 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go @@ -36,7 +36,8 @@ func NewDiagnosticClient(subscriptionID string) DiagnosticClient { return NewDiagnosticClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticClientWithBaseURI creates an instance of the DiagnosticClient client. +// NewDiagnosticClientWithBaseURI creates an instance of the DiagnosticClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticClient { return DiagnosticClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go index 6d7e8da01c69..576787e38597 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go @@ -36,7 +36,9 @@ func NewDiagnosticLoggerClient(subscriptionID string) DiagnosticLoggerClient { return NewDiagnosticLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticLoggerClientWithBaseURI creates an instance of the DiagnosticLoggerClient client. +// NewDiagnosticLoggerClientWithBaseURI creates an instance of the DiagnosticLoggerClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticLoggerClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticLoggerClient { return DiagnosticLoggerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go index 34b7ec7f5ed6..654cec3cab4c 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go @@ -36,7 +36,8 @@ func NewEmailTemplateClient(subscriptionID string) EmailTemplateClient { return NewEmailTemplateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEmailTemplateClientWithBaseURI creates an instance of the EmailTemplateClient client. +// NewEmailTemplateClientWithBaseURI creates an instance of the EmailTemplateClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEmailTemplateClientWithBaseURI(baseURI string, subscriptionID string) EmailTemplateClient { return EmailTemplateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go index a07a50bd1055..4116afd70fe4 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go @@ -36,7 +36,8 @@ func NewGroupClient(subscriptionID string) GroupClient { return NewGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupClientWithBaseURI creates an instance of the GroupClient client. +// NewGroupClientWithBaseURI creates an instance of the GroupClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClient { return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go index 0fa6dff037af..9405b1cb6246 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go @@ -36,7 +36,8 @@ func NewGroupUserClient(subscriptionID string) GroupUserClient { return NewGroupUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupUserClientWithBaseURI creates an instance of the GroupUserClient client. +// NewGroupUserClientWithBaseURI creates an instance of the GroupUserClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupUserClientWithBaseURI(baseURI string, subscriptionID string) GroupUserClient { return GroupUserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/identityprovider.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/identityprovider.go index 6c5a597bd594..992493c49f28 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/identityprovider.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/identityprovider.go @@ -36,7 +36,9 @@ func NewIdentityProviderClient(subscriptionID string) IdentityProviderClient { return NewIdentityProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIdentityProviderClientWithBaseURI creates an instance of the IdentityProviderClient client. +// NewIdentityProviderClientWithBaseURI creates an instance of the IdentityProviderClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIdentityProviderClientWithBaseURI(baseURI string, subscriptionID string) IdentityProviderClient { return IdentityProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go index 670c63713b39..8b431f2263a4 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go @@ -36,7 +36,8 @@ func NewLoggerClient(subscriptionID string) LoggerClient { return NewLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoggerClientWithBaseURI creates an instance of the LoggerClient client. +// NewLoggerClientWithBaseURI creates an instance of the LoggerClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLoggerClientWithBaseURI(baseURI string, subscriptionID string) LoggerClient { return LoggerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/networkstatus.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/networkstatus.go index 77fef77579f5..c263d3e4f08e 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/networkstatus.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/networkstatus.go @@ -36,7 +36,8 @@ func NewNetworkStatusClient(subscriptionID string) NetworkStatusClient { return NewNetworkStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client. +// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNetworkStatusClientWithBaseURI(baseURI string, subscriptionID string) NetworkStatusClient { return NetworkStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go index daea621b574b..0b26aeb77ac9 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go @@ -36,7 +36,8 @@ func NewNotificationClient(subscriptionID string) NotificationClient { return NewNotificationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationClientWithBaseURI creates an instance of the NotificationClient client. +// NewNotificationClientWithBaseURI creates an instance of the NotificationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNotificationClientWithBaseURI(baseURI string, subscriptionID string) NotificationClient { return NotificationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientemail.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientemail.go index 11e062d11589..c37babf4d25d 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientemail.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientemail.go @@ -36,7 +36,9 @@ func NewNotificationRecipientEmailClient(subscriptionID string) NotificationReci return NewNotificationRecipientEmailClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationRecipientEmailClientWithBaseURI creates an instance of the NotificationRecipientEmailClient client. +// NewNotificationRecipientEmailClientWithBaseURI creates an instance of the NotificationRecipientEmailClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewNotificationRecipientEmailClientWithBaseURI(baseURI string, subscriptionID string) NotificationRecipientEmailClient { return NotificationRecipientEmailClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientuser.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientuser.go index 95b875f863d6..d6837664b752 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientuser.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientuser.go @@ -36,7 +36,9 @@ func NewNotificationRecipientUserClient(subscriptionID string) NotificationRecip return NewNotificationRecipientUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationRecipientUserClientWithBaseURI creates an instance of the NotificationRecipientUserClient client. +// NewNotificationRecipientUserClientWithBaseURI creates an instance of the NotificationRecipientUserClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewNotificationRecipientUserClientWithBaseURI(baseURI string, subscriptionID string) NotificationRecipientUserClient { return NotificationRecipientUserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go index 30faacf695c8..6059365c91fe 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go @@ -36,7 +36,9 @@ func NewOpenIDConnectProviderClient(subscriptionID string) OpenIDConnectProvider return NewOpenIDConnectProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenIDConnectProviderClientWithBaseURI creates an instance of the OpenIDConnectProviderClient client. +// NewOpenIDConnectProviderClientWithBaseURI creates an instance of the OpenIDConnectProviderClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewOpenIDConnectProviderClientWithBaseURI(baseURI string, subscriptionID string) OpenIDConnectProviderClient { return OpenIDConnectProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go index 6827a4aa1f53..5d3bb4fa91ae 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go @@ -36,7 +36,8 @@ func NewOperationClient(subscriptionID string) OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string, subscriptionID string) OperationClient { return OperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/operations.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/operations.go index 5744852d8eb3..f62967e0e5b0 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/operations.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/policy.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/policy.go index 5deb59f2300b..0acc3e24f148 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/policy.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/policy.go @@ -36,7 +36,8 @@ func NewPolicyClient(subscriptionID string) PolicyClient { return NewPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client. +// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyClientWithBaseURI(baseURI string, subscriptionID string) PolicyClient { return PolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/policysnippets.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/policysnippets.go index a93bb85d7284..dc7e8f3fe590 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/policysnippets.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/policysnippets.go @@ -36,7 +36,8 @@ func NewPolicySnippetsClient(subscriptionID string) PolicySnippetsClient { return NewPolicySnippetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client. +// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySnippetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySnippetsClient { return PolicySnippetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go index 45c47f5df5ea..1a3e9871faf8 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go @@ -36,7 +36,8 @@ func NewProductClient(subscriptionID string) ProductClient { return NewProductClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductClientWithBaseURI creates an instance of the ProductClient client. +// NewProductClientWithBaseURI creates an instance of the ProductClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductClientWithBaseURI(baseURI string, subscriptionID string) ProductClient { return ProductClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go index b713dfb3cab5..fe62b275cfb8 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go @@ -36,7 +36,8 @@ func NewProductAPIClient(subscriptionID string) ProductAPIClient { return NewProductAPIClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductAPIClientWithBaseURI creates an instance of the ProductAPIClient client. +// NewProductAPIClientWithBaseURI creates an instance of the ProductAPIClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductAPIClientWithBaseURI(baseURI string, subscriptionID string) ProductAPIClient { return ProductAPIClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go index 6c0f3d21ec4d..9760b4410b1e 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go @@ -36,7 +36,8 @@ func NewProductGroupClient(subscriptionID string) ProductGroupClient { return NewProductGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductGroupClientWithBaseURI creates an instance of the ProductGroupClient client. +// NewProductGroupClientWithBaseURI creates an instance of the ProductGroupClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductGroupClientWithBaseURI(baseURI string, subscriptionID string) ProductGroupClient { return ProductGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/productpolicy.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/productpolicy.go index a9f11a964812..4c4c1bfc07db 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/productpolicy.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/productpolicy.go @@ -36,7 +36,8 @@ func NewProductPolicyClient(subscriptionID string) ProductPolicyClient { return NewProductPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client. +// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductPolicyClientWithBaseURI(baseURI string, subscriptionID string) ProductPolicyClient { return ProductPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go index 15afb0b27b76..1e358f2dd323 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go @@ -36,7 +36,9 @@ func NewProductSubscriptionsClient(subscriptionID string) ProductSubscriptionsCl return NewProductSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client. +// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProductSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ProductSubscriptionsClient { return ProductSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go index 1823ef044dcf..670fc2a0b169 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go @@ -36,7 +36,8 @@ func NewPropertyClient(subscriptionID string) PropertyClient { return NewPropertyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client. +// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) PropertyClient { return PropertyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabycounterkeys.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabycounterkeys.go index 8f4bb75e7c55..f271003f0233 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabycounterkeys.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabycounterkeys.go @@ -36,7 +36,9 @@ func NewQuotaByCounterKeysClient(subscriptionID string) QuotaByCounterKeysClient return NewQuotaByCounterKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client. +// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByCounterKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByCounterKeysClient { return QuotaByCounterKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabyperiodkeys.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabyperiodkeys.go index 222effb0082b..4dc48b151a8f 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabyperiodkeys.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabyperiodkeys.go @@ -36,7 +36,9 @@ func NewQuotaByPeriodKeysClient(subscriptionID string) QuotaByPeriodKeysClient { return NewQuotaByPeriodKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client. +// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByPeriodKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByPeriodKeysClient { return QuotaByPeriodKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/regions.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/regions.go index aaaecd73d87b..28363460cd45 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/regions.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/regions.go @@ -36,7 +36,8 @@ func NewRegionsClient(subscriptionID string) RegionsClient { return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go index 705e7e385b6a..12076b72655e 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go @@ -36,7 +36,8 @@ func NewReportsClient(subscriptionID string) ReportsClient { return NewReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReportsClientWithBaseURI creates an instance of the ReportsClient client. +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return ReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/service.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/service.go index 34367788fc66..5078dafeb773 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/service.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/service.go @@ -36,7 +36,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go index 66ca436cf3fb..60c3ab8e5e80 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go @@ -36,7 +36,8 @@ func NewServiceSkusClient(subscriptionID string) ServiceSkusClient { return NewServiceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client. +// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceSkusClientWithBaseURI(baseURI string, subscriptionID string) ServiceSkusClient { return ServiceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/signinsettings.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/signinsettings.go index 9160e8d4f4c9..6b71fb05a0ec 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/signinsettings.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/signinsettings.go @@ -36,7 +36,8 @@ func NewSignInSettingsClient(subscriptionID string) SignInSettingsClient { return NewSignInSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSignInSettingsClientWithBaseURI creates an instance of the SignInSettingsClient client. +// NewSignInSettingsClientWithBaseURI creates an instance of the SignInSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignInSettingsClientWithBaseURI(baseURI string, subscriptionID string) SignInSettingsClient { return SignInSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/signupsettings.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/signupsettings.go index 4bb630e0cd9d..b8e2e6c4d2ef 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/signupsettings.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/signupsettings.go @@ -36,7 +36,8 @@ func NewSignUpSettingsClient(subscriptionID string) SignUpSettingsClient { return NewSignUpSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSignUpSettingsClientWithBaseURI creates an instance of the SignUpSettingsClient client. +// NewSignUpSettingsClientWithBaseURI creates an instance of the SignUpSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignUpSettingsClientWithBaseURI(baseURI string, subscriptionID string) SignUpSettingsClient { return SignUpSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go index f688b9e71037..a1f4121e131b 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go @@ -36,7 +36,8 @@ func NewSubscriptionClient(subscriptionID string) SubscriptionClient { return NewSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionClientWithBaseURI creates an instance of the SubscriptionClient client. +// NewSubscriptionClientWithBaseURI creates an instance of the SubscriptionClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionClient { return SubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go index ef4ca026018e..0176d3b8edd8 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go @@ -36,7 +36,8 @@ func NewTagClient(subscriptionID string) TagClient { return NewTagClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagClientWithBaseURI creates an instance of the TagClient client. +// NewTagClientWithBaseURI creates an instance of the TagClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagClientWithBaseURI(baseURI string, subscriptionID string) TagClient { return TagClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go index b2df335b485c..a669711e2896 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go @@ -36,7 +36,8 @@ func NewTagDescriptionClient(subscriptionID string) TagDescriptionClient { return NewTagDescriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagDescriptionClientWithBaseURI creates an instance of the TagDescriptionClient client. +// NewTagDescriptionClientWithBaseURI creates an instance of the TagDescriptionClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) TagDescriptionClient { return TagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go index 6a912bb784a0..66a52e1af37f 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go @@ -36,7 +36,8 @@ func NewTagResourceClient(subscriptionID string) TagResourceClient { return NewTagResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagResourceClientWithBaseURI creates an instance of the TagResourceClient client. +// NewTagResourceClientWithBaseURI creates an instance of the TagResourceClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagResourceClientWithBaseURI(baseURI string, subscriptionID string) TagResourceClient { return TagResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccess.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccess.go index 80e464af3b2d..74213690cbcf 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccess.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccess.go @@ -36,7 +36,8 @@ func NewTenantAccessClient(subscriptionID string) TenantAccessClient { return NewTenantAccessClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client. +// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessClient { return TenantAccessClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccessgit.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccessgit.go index 9df948701f6a..423f15273c28 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccessgit.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccessgit.go @@ -36,7 +36,8 @@ func NewTenantAccessGitClient(subscriptionID string) TenantAccessGitClient { return NewTenantAccessGitClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client. +// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessGitClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessGitClient { return TenantAccessGitClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go index 97964985dbd1..9e648b127e85 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go @@ -36,7 +36,9 @@ func NewTenantConfigurationClient(subscriptionID string) TenantConfigurationClie return NewTenantConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client. +// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantConfigurationClientWithBaseURI(baseURI string, subscriptionID string) TenantConfigurationClient { return TenantConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go index 54107f41150e..5bb1c4c37689 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go @@ -36,7 +36,8 @@ func NewUserClient(subscriptionID string) UserClient { return NewUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserClientWithBaseURI creates an instance of the UserClient client. +// NewUserClientWithBaseURI creates an instance of the UserClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserClientWithBaseURI(baseURI string, subscriptionID string) UserClient { return UserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go index bdbdc6aad725..69b6e40f96cc 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go @@ -36,7 +36,8 @@ func NewUserGroupClient(subscriptionID string) UserGroupClient { return NewUserGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserGroupClientWithBaseURI creates an instance of the UserGroupClient client. +// NewUserGroupClientWithBaseURI creates an instance of the UserGroupClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserGroupClientWithBaseURI(baseURI string, subscriptionID string) UserGroupClient { return UserGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/useridentities.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/useridentities.go index 90f1172f1c23..bd66d961d961 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/useridentities.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/useridentities.go @@ -36,7 +36,8 @@ func NewUserIdentitiesClient(subscriptionID string) UserIdentitiesClient { return NewUserIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client. +// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) UserIdentitiesClient { return UserIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go index a52eb5e4faf3..fa7845a3dc73 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go @@ -36,7 +36,9 @@ func NewUserSubscriptionClient(subscriptionID string) UserSubscriptionClient { return NewUserSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserSubscriptionClientWithBaseURI creates an instance of the UserSubscriptionClient client. +// NewUserSubscriptionClientWithBaseURI creates an instance of the UserSubscriptionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewUserSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) UserSubscriptionClient { return UserSubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go index 7db6f0dfe386..f312a5286fb9 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go @@ -36,7 +36,8 @@ func NewAPIClient(subscriptionID string) APIClient { return NewAPIClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIClientWithBaseURI creates an instance of the APIClient client. +// NewAPIClientWithBaseURI creates an instance of the APIClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIClientWithBaseURI(baseURI string, subscriptionID string) APIClient { return APIClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go index e246f27df6d0..cb022884b17a 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go @@ -36,7 +36,8 @@ func NewAPIDiagnosticClient(subscriptionID string) APIDiagnosticClient { return NewAPIDiagnosticClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIDiagnosticClientWithBaseURI creates an instance of the APIDiagnosticClient client. +// NewAPIDiagnosticClientWithBaseURI creates an instance of the APIDiagnosticClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) APIDiagnosticClient { return APIDiagnosticClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiexport.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiexport.go index 131ab5b1f00d..114a176b8a89 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiexport.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiexport.go @@ -36,7 +36,8 @@ func NewAPIExportClient(subscriptionID string) APIExportClient { return NewAPIExportClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client. +// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIExportClientWithBaseURI(baseURI string, subscriptionID string) APIExportClient { return APIExportClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go index ec54321f18a4..8577a82dd293 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go @@ -36,7 +36,8 @@ func NewAPIIssueClient(subscriptionID string) APIIssueClient { return NewAPIIssueClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueClientWithBaseURI creates an instance of the APIIssueClient client. +// NewAPIIssueClientWithBaseURI creates an instance of the APIIssueClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssueClientWithBaseURI(baseURI string, subscriptionID string) APIIssueClient { return APIIssueClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go index 48d2343eebb7..f0ef0e723964 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go @@ -36,7 +36,9 @@ func NewAPIIssueAttachmentClient(subscriptionID string) APIIssueAttachmentClient return NewAPIIssueAttachmentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueAttachmentClientWithBaseURI creates an instance of the APIIssueAttachmentClient client. +// NewAPIIssueAttachmentClientWithBaseURI creates an instance of the APIIssueAttachmentClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIIssueAttachmentClientWithBaseURI(baseURI string, subscriptionID string) APIIssueAttachmentClient { return APIIssueAttachmentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go index 9f3f332af3ae..e091e225b1dd 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go @@ -36,7 +36,8 @@ func NewAPIIssueCommentClient(subscriptionID string) APIIssueCommentClient { return NewAPIIssueCommentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueCommentClientWithBaseURI creates an instance of the APIIssueCommentClient client. +// NewAPIIssueCommentClientWithBaseURI creates an instance of the APIIssueCommentClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssueCommentClientWithBaseURI(baseURI string, subscriptionID string) APIIssueCommentClient { return APIIssueCommentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apimanagementapi/interfaces.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apimanagementapi/interfaces.go index b6ff993e6b07..f839e2d17438 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apimanagementapi/interfaces.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apimanagementapi/interfaces.go @@ -30,7 +30,9 @@ type APIClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, tags string, expandAPIVersionSet *bool) (result apimanagement.APICollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, tags string, expandAPIVersionSet *bool) (result apimanagement.APICollectionIterator, err error) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (result apimanagement.TagResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.APIUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -39,6 +41,7 @@ var _ APIClientAPI = (*apimanagement.APIClient)(nil) // APIRevisionClientAPI contains the set of methods on the APIRevisionClient type. type APIRevisionClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIRevisionCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIRevisionCollectionIterator, err error) } var _ APIRevisionClientAPI = (*apimanagement.APIRevisionClient)(nil) @@ -50,6 +53,7 @@ type APIReleaseClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result apimanagement.APIReleaseContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIReleaseCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIReleaseCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters apimanagement.APIReleaseContract, ifMatch string) (result autorest.Response, err error) } @@ -62,6 +66,7 @@ type APIOperationClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.OperationContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, tags string) (result apimanagement.OperationCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, tags string) (result apimanagement.OperationCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.OperationUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -97,9 +102,13 @@ type TagClientAPI interface { GetEntityStateByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (result autorest.Response, err error) GetEntityStateByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (result apimanagement.TagCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (result apimanagement.TagCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters apimanagement.TagCreateUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -108,6 +117,7 @@ var _ TagClientAPI = (*apimanagement.TagClient)(nil) // APIProductClientAPI contains the set of methods on the APIProductClient type. type APIProductClientAPI interface { ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionPage, err error) + ListByApisComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionIterator, err error) } var _ APIProductClientAPI = (*apimanagement.APIProductClient)(nil) @@ -130,6 +140,7 @@ type APISchemaClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result apimanagement.SchemaContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.SchemaCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.SchemaCollectionIterator, err error) } var _ APISchemaClientAPI = (*apimanagement.APISchemaClient)(nil) @@ -141,6 +152,7 @@ type APIDiagnosticClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result apimanagement.DiagnosticContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, parameters apimanagement.DiagnosticContract, ifMatch string) (result autorest.Response, err error) } @@ -153,6 +165,7 @@ type APIIssueClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, expandCommentsAttachments *bool) (result apimanagement.IssueContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, expandCommentsAttachments *bool, top *int32, skip *int32) (result apimanagement.IssueCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, expandCommentsAttachments *bool, top *int32, skip *int32) (result apimanagement.IssueCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, parameters apimanagement.IssueUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -165,6 +178,7 @@ type APIIssueCommentClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string) (result apimanagement.IssueCommentContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueCommentCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueCommentCollectionIterator, err error) } var _ APIIssueCommentClientAPI = (*apimanagement.APIIssueCommentClient)(nil) @@ -176,6 +190,7 @@ type APIIssueAttachmentClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string) (result apimanagement.IssueAttachmentContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueAttachmentCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueAttachmentCollectionIterator, err error) } var _ APIIssueAttachmentClientAPI = (*apimanagement.APIIssueAttachmentClient)(nil) @@ -187,6 +202,7 @@ type APITagDescriptionClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result apimanagement.TagDescriptionContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagDescriptionCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagDescriptionCollectionIterator, err error) } var _ APITagDescriptionClientAPI = (*apimanagement.APITagDescriptionClient)(nil) @@ -194,6 +210,7 @@ var _ APITagDescriptionClientAPI = (*apimanagement.APITagDescriptionClient)(nil) // OperationClientAPI contains the set of methods on the OperationClient type. type OperationClientAPI interface { ListByTags(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (result apimanagement.TagResourceCollectionIterator, err error) } var _ OperationClientAPI = (*apimanagement.OperationClient)(nil) @@ -205,6 +222,7 @@ type APIVersionSetClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result apimanagement.APIVersionSetContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APIVersionSetCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APIVersionSetCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, parameters apimanagement.APIVersionSetUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -217,6 +235,7 @@ type AuthorizationServerClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result apimanagement.AuthorizationServerContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters apimanagement.AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -229,6 +248,7 @@ type BackendClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, backendID string) (result apimanagement.BackendContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionIterator, err error) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters *apimanagement.BackendReconnectContract) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters apimanagement.BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -242,6 +262,7 @@ type CacheClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, cacheID string) (result apimanagement.CacheContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, cacheID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.CacheCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.CacheCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, parameters apimanagement.CacheUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -254,6 +275,7 @@ type CertificateClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result apimanagement.CertificateContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionIterator, err error) } var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) @@ -261,6 +283,7 @@ var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result apimanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) @@ -268,6 +291,7 @@ var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) // ServiceSkusClientAPI contains the set of methods on the ServiceSkusClient type. type ServiceSkusClientAPI interface { ListAvailableServiceSkus(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ResourceSkuResultsPage, err error) + ListAvailableServiceSkusComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ResourceSkuResultsIterator, err error) } var _ ServiceSkusClientAPI = (*apimanagement.ServiceSkusClient)(nil) @@ -282,7 +306,9 @@ type ServiceClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceResource, err error) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceGetSsoTokenResult, err error) List(ctx context.Context) (result apimanagement.ServiceListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.ServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultIterator, err error) Restore(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBackupRestoreParameters) (result apimanagement.ServiceRestoreFuture, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateParameters) (result apimanagement.ServiceUpdateFuture, err error) } @@ -296,6 +322,7 @@ type DiagnosticClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result apimanagement.DiagnosticContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, parameters apimanagement.DiagnosticContract, ifMatch string) (result autorest.Response, err error) } @@ -308,6 +335,7 @@ type EmailTemplateClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName) (result apimanagement.EmailTemplateContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName, parameters apimanagement.EmailTemplateUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -320,6 +348,7 @@ type GroupClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result apimanagement.GroupContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters apimanagement.GroupUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -331,6 +360,7 @@ type GroupUserClientAPI interface { Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (result apimanagement.UserContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) } var _ GroupUserClientAPI = (*apimanagement.GroupUserClient)(nil) @@ -342,6 +372,7 @@ type IdentityProviderClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType) (result apimanagement.IdentityProviderContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.IdentityProviderListPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.IdentityProviderListIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType, parameters apimanagement.IdentityProviderUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -351,6 +382,7 @@ var _ IdentityProviderClientAPI = (*apimanagement.IdentityProviderClient)(nil) type IssueClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, issueID string) (result apimanagement.IssueContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.IssueCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.IssueCollectionIterator, err error) } var _ IssueClientAPI = (*apimanagement.IssueClient)(nil) @@ -362,6 +394,7 @@ type LoggerClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, loggerID string) (result apimanagement.LoggerContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, parameters apimanagement.LoggerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -380,6 +413,7 @@ type NotificationClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName apimanagement.NotificationName, ifMatch string) (result apimanagement.NotificationContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, notificationName apimanagement.NotificationName) (result apimanagement.NotificationContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.NotificationCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.NotificationCollectionIterator, err error) } var _ NotificationClientAPI = (*apimanagement.NotificationClient)(nil) @@ -411,6 +445,7 @@ type OpenIDConnectProviderClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result apimanagement.OpenidConnectProviderContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters apimanagement.OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -471,7 +506,9 @@ type ProductClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.ProductContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool, tags string) (result apimanagement.ProductCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool, tags string) (result apimanagement.ProductCollectionIterator, err error) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (result apimanagement.TagResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.ProductUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -483,6 +520,7 @@ type ProductAPIClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result apimanagement.APIContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) } var _ ProductAPIClientAPI = (*apimanagement.ProductAPIClient)(nil) @@ -493,6 +531,7 @@ type ProductGroupClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result apimanagement.GroupContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) @@ -500,6 +539,7 @@ var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) // ProductSubscriptionsClientAPI contains the set of methods on the ProductSubscriptionsClient type. type ProductSubscriptionsClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient)(nil) @@ -522,6 +562,7 @@ type PropertyClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result apimanagement.PropertyContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters apimanagement.PropertyUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -546,6 +587,7 @@ var _ QuotaByPeriodKeysClientAPI = (*apimanagement.QuotaByPeriodKeysClient)(nil) // RegionClientAPI contains the set of methods on the RegionClient type. type RegionClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.RegionListResultPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.RegionListResultIterator, err error) } var _ RegionClientAPI = (*apimanagement.RegionClient)(nil) @@ -553,13 +595,20 @@ var _ RegionClientAPI = (*apimanagement.RegionClient)(nil) // ReportsClientAPI contains the set of methods on the ReportsClient type. type ReportsClientAPI interface { ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionIterator, err error) ListByGeo(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByGeoComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionPage, err error) + ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionIterator, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionIterator, err error) ListByRequest(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.RequestReportCollection, err error) ListBySubscription(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionIterator, err error) ListByTime(ctx context.Context, resourceGroupName string, serviceName string, filter string, interval string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionPage, err error) + ListByTimeComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, interval string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionIterator, err error) ListByUser(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionPage, err error) + ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result apimanagement.ReportCollectionIterator, err error) } var _ ReportsClientAPI = (*apimanagement.ReportsClient)(nil) @@ -571,6 +620,7 @@ type SubscriptionClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result apimanagement.SubscriptionContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters apimanagement.SubscriptionUpdateParameters, ifMatch string, notify *bool) (result autorest.Response, err error) @@ -581,6 +631,7 @@ var _ SubscriptionClientAPI = (*apimanagement.SubscriptionClient)(nil) // TagResourceClientAPI contains the set of methods on the TagResourceClient type. type TagResourceClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionIterator, err error) } var _ TagResourceClientAPI = (*apimanagement.TagResourceClient)(nil) @@ -624,6 +675,7 @@ type UserClientAPI interface { GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result autorest.Response, err error) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters apimanagement.UserTokenParameters) (result apimanagement.UserTokenResult, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.UserCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.UserCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters apimanagement.UserUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -632,6 +684,7 @@ var _ UserClientAPI = (*apimanagement.UserClient)(nil) // UserGroupClientAPI contains the set of methods on the UserGroupClient type. type UserGroupClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) @@ -639,6 +692,7 @@ var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) // UserSubscriptionClientAPI contains the set of methods on the UserSubscriptionClient type. type UserSubscriptionClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ UserSubscriptionClientAPI = (*apimanagement.UserSubscriptionClient)(nil) @@ -646,6 +700,7 @@ var _ UserSubscriptionClientAPI = (*apimanagement.UserSubscriptionClient)(nil) // UserIdentitiesClientAPI contains the set of methods on the UserIdentitiesClient type. type UserIdentitiesClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result apimanagement.UserIdentityCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result apimanagement.UserIdentityCollectionIterator, err error) } var _ UserIdentitiesClientAPI = (*apimanagement.UserIdentitiesClient)(nil) diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go index 85540f689889..4e823d5ef7d4 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go @@ -36,7 +36,8 @@ func NewAPIOperationClient(subscriptionID string) APIOperationClient { return NewAPIOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationClientWithBaseURI creates an instance of the APIOperationClient client. +// NewAPIOperationClientWithBaseURI creates an instance of the APIOperationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIOperationClientWithBaseURI(baseURI string, subscriptionID string) APIOperationClient { return APIOperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go index 89bc85d07ec1..a035b079fd6b 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go @@ -36,7 +36,9 @@ func NewAPIOperationPolicyClient(subscriptionID string) APIOperationPolicyClient return NewAPIOperationPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationPolicyClientWithBaseURI creates an instance of the APIOperationPolicyClient client. +// NewAPIOperationPolicyClientWithBaseURI creates an instance of the APIOperationPolicyClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIOperationPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIOperationPolicyClient { return APIOperationPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go index 7b828353b787..718d61e08b3a 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go @@ -36,7 +36,8 @@ func NewAPIPolicyClient(subscriptionID string) APIPolicyClient { return NewAPIPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client. +// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIPolicyClient { return APIPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go index b99261c5322b..3a64678f0b95 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go @@ -36,7 +36,8 @@ func NewAPIProductClient(subscriptionID string) APIProductClient { return NewAPIProductClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIProductClientWithBaseURI creates an instance of the APIProductClient client. +// NewAPIProductClientWithBaseURI creates an instance of the APIProductClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIProductClientWithBaseURI(baseURI string, subscriptionID string) APIProductClient { return APIProductClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go index f8aa179b862a..d4d2f3a2ece4 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go @@ -36,7 +36,8 @@ func NewAPIReleaseClient(subscriptionID string) APIReleaseClient { return NewAPIReleaseClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIReleaseClientWithBaseURI creates an instance of the APIReleaseClient client. +// NewAPIReleaseClientWithBaseURI creates an instance of the APIReleaseClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIReleaseClientWithBaseURI(baseURI string, subscriptionID string) APIReleaseClient { return APIReleaseClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go index 5966b027d808..318c746e3ae9 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go @@ -36,7 +36,8 @@ func NewAPIRevisionClient(subscriptionID string) APIRevisionClient { return NewAPIRevisionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIRevisionClientWithBaseURI creates an instance of the APIRevisionClient client. +// NewAPIRevisionClientWithBaseURI creates an instance of the APIRevisionClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIRevisionClientWithBaseURI(baseURI string, subscriptionID string) APIRevisionClient { return APIRevisionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go index ebe19d739692..02fb80d15cad 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go @@ -36,7 +36,8 @@ func NewAPISchemaClient(subscriptionID string) APISchemaClient { return NewAPISchemaClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPISchemaClientWithBaseURI creates an instance of the APISchemaClient client. +// NewAPISchemaClientWithBaseURI creates an instance of the APISchemaClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPISchemaClientWithBaseURI(baseURI string, subscriptionID string) APISchemaClient { return APISchemaClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go index ca89c63f3b38..f53740f833ea 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go @@ -36,7 +36,9 @@ func NewAPITagDescriptionClient(subscriptionID string) APITagDescriptionClient { return NewAPITagDescriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPITagDescriptionClientWithBaseURI creates an instance of the APITagDescriptionClient client. +// NewAPITagDescriptionClientWithBaseURI creates an instance of the APITagDescriptionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPITagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) APITagDescriptionClient { return APITagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go index e76b142d782b..4ee979a2a652 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go @@ -36,7 +36,8 @@ func NewAPIVersionSetClient(subscriptionID string) APIVersionSetClient { return NewAPIVersionSetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIVersionSetClientWithBaseURI creates an instance of the APIVersionSetClient client. +// NewAPIVersionSetClientWithBaseURI creates an instance of the APIVersionSetClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIVersionSetClientWithBaseURI(baseURI string, subscriptionID string) APIVersionSetClient { return APIVersionSetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go index 582471ebd8cc..564950e99776 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go @@ -36,7 +36,9 @@ func NewAuthorizationServerClient(subscriptionID string) AuthorizationServerClie return NewAuthorizationServerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationServerClientWithBaseURI creates an instance of the AuthorizationServerClient client. +// NewAuthorizationServerClientWithBaseURI creates an instance of the AuthorizationServerClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAuthorizationServerClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationServerClient { return AuthorizationServerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go index a6c52503eca4..edea347290a0 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go @@ -36,7 +36,8 @@ func NewBackendClient(subscriptionID string) BackendClient { return NewBackendClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackendClientWithBaseURI creates an instance of the BackendClient client. +// NewBackendClientWithBaseURI creates an instance of the BackendClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackendClientWithBaseURI(baseURI string, subscriptionID string) BackendClient { return BackendClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go index 61b6d608bdc9..89d266a8e8f6 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go @@ -36,7 +36,8 @@ func NewCacheClient(subscriptionID string) CacheClient { return NewCacheClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCacheClientWithBaseURI creates an instance of the CacheClient client. +// NewCacheClientWithBaseURI creates an instance of the CacheClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCacheClientWithBaseURI(baseURI string, subscriptionID string) CacheClient { return CacheClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go index 6d9959f7d2c9..694c466637dd 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/client.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/client.go index 5a6b181313de..661bf3dc1584 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/client.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/delegationsettings.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/delegationsettings.go index ebc7580d267a..8a4f91b1c8d7 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/delegationsettings.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/delegationsettings.go @@ -36,7 +36,9 @@ func NewDelegationSettingsClient(subscriptionID string) DelegationSettingsClient return NewDelegationSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDelegationSettingsClientWithBaseURI creates an instance of the DelegationSettingsClient client. +// NewDelegationSettingsClientWithBaseURI creates an instance of the DelegationSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDelegationSettingsClientWithBaseURI(baseURI string, subscriptionID string) DelegationSettingsClient { return DelegationSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go index 9dc71b52922e..735ff3e19506 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go @@ -36,7 +36,8 @@ func NewDiagnosticClient(subscriptionID string) DiagnosticClient { return NewDiagnosticClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticClientWithBaseURI creates an instance of the DiagnosticClient client. +// NewDiagnosticClientWithBaseURI creates an instance of the DiagnosticClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticClient { return DiagnosticClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go index 25da9732cc2d..1c27000604f0 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go @@ -36,7 +36,8 @@ func NewEmailTemplateClient(subscriptionID string) EmailTemplateClient { return NewEmailTemplateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEmailTemplateClientWithBaseURI creates an instance of the EmailTemplateClient client. +// NewEmailTemplateClientWithBaseURI creates an instance of the EmailTemplateClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEmailTemplateClientWithBaseURI(baseURI string, subscriptionID string) EmailTemplateClient { return EmailTemplateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go index 1d973cae0524..c19c89829635 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go @@ -36,7 +36,8 @@ func NewGroupClient(subscriptionID string) GroupClient { return NewGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupClientWithBaseURI creates an instance of the GroupClient client. +// NewGroupClientWithBaseURI creates an instance of the GroupClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClient { return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go index 98d938054b2a..2ceef023b2a6 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go @@ -36,7 +36,8 @@ func NewGroupUserClient(subscriptionID string) GroupUserClient { return NewGroupUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupUserClientWithBaseURI creates an instance of the GroupUserClient client. +// NewGroupUserClientWithBaseURI creates an instance of the GroupUserClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupUserClientWithBaseURI(baseURI string, subscriptionID string) GroupUserClient { return GroupUserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/identityprovider.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/identityprovider.go index 7dfb97162b89..686a8a8eb89d 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/identityprovider.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/identityprovider.go @@ -36,7 +36,9 @@ func NewIdentityProviderClient(subscriptionID string) IdentityProviderClient { return NewIdentityProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIdentityProviderClientWithBaseURI creates an instance of the IdentityProviderClient client. +// NewIdentityProviderClientWithBaseURI creates an instance of the IdentityProviderClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIdentityProviderClientWithBaseURI(baseURI string, subscriptionID string) IdentityProviderClient { return IdentityProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go index b70e2e98333e..47f268190d5f 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go @@ -36,7 +36,8 @@ func NewIssueClient(subscriptionID string) IssueClient { return NewIssueClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIssueClientWithBaseURI creates an instance of the IssueClient client. +// NewIssueClientWithBaseURI creates an instance of the IssueClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIssueClientWithBaseURI(baseURI string, subscriptionID string) IssueClient { return IssueClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go index 93b80415877d..027a62955678 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go @@ -36,7 +36,8 @@ func NewLoggerClient(subscriptionID string) LoggerClient { return NewLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoggerClientWithBaseURI creates an instance of the LoggerClient client. +// NewLoggerClientWithBaseURI creates an instance of the LoggerClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLoggerClientWithBaseURI(baseURI string, subscriptionID string) LoggerClient { return LoggerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go index dd5b2d4daf44..43f2ca155e9b 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go @@ -207,6 +207,8 @@ const ( Openapi ContentFormat = "openapi" // Openapijson The contents are inline and Content Type is a OpenApi 3.0 Document in JSON format. Openapijson ContentFormat = "openapi+json" + // OpenapijsonLink The Open Api 3.0 Json document is hosted on a publicly accessible internet address. + OpenapijsonLink ContentFormat = "openapi+json-link" // OpenapiLink The Open Api 3.0 document is hosted on a publicly accessible internet address. OpenapiLink ContentFormat = "openapi-link" // SwaggerJSON The contents are inline and Content Type is a OpenApi 2.0 Document. @@ -225,7 +227,7 @@ const ( // PossibleContentFormatValues returns an array of possible values for the ContentFormat const type. func PossibleContentFormatValues() []ContentFormat { - return []ContentFormat{Openapi, Openapijson, OpenapiLink, SwaggerJSON, SwaggerLinkJSON, WadlLinkJSON, WadlXML, Wsdl, WsdlLink} + return []ContentFormat{Openapi, Openapijson, OpenapijsonLink, OpenapiLink, SwaggerJSON, SwaggerLinkJSON, WadlLinkJSON, WadlXML, Wsdl, WsdlLink} } // ExportFormat enumerates the values for export format. @@ -329,6 +331,24 @@ func PossibleHostnameTypeValues() []HostnameType { return []HostnameType{DeveloperPortal, Management, Portal, Proxy, Scm} } +// HTTPCorrelationProtocol enumerates the values for http correlation protocol. +type HTTPCorrelationProtocol string + +const ( + // Legacy Inject Request-Id and Request-Context headers with request correlation data. See + // https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. + Legacy HTTPCorrelationProtocol = "Legacy" + // None Do not read and inject correlation headers. + None HTTPCorrelationProtocol = "None" + // W3C Inject Trace Context headers. See https://w3c.github.io/trace-context. + W3C HTTPCorrelationProtocol = "W3C" +) + +// PossibleHTTPCorrelationProtocolValues returns an array of possible values for the HTTPCorrelationProtocol const type. +func PossibleHTTPCorrelationProtocolValues() []HTTPCorrelationProtocol { + return []HTTPCorrelationProtocol{Legacy, None, W3C} +} + // IdentityProviderType enumerates the values for identity provider type. type IdentityProviderType string @@ -520,17 +540,17 @@ func PossibleProtocolValues() []Protocol { type ResourceSkuCapacityScaleType string const ( - // Automatic Supported scale type automatic. - Automatic ResourceSkuCapacityScaleType = "automatic" - // Manual Supported scale type manual. - Manual ResourceSkuCapacityScaleType = "manual" - // None Scaling not supported. - None ResourceSkuCapacityScaleType = "none" + // ResourceSkuCapacityScaleTypeAutomatic Supported scale type automatic. + ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "automatic" + // ResourceSkuCapacityScaleTypeManual Supported scale type manual. + ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "manual" + // ResourceSkuCapacityScaleTypeNone Scaling not supported. + ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "none" ) // PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type. func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType { - return []ResourceSkuCapacityScaleType{Automatic, Manual, None} + return []ResourceSkuCapacityScaleType{ResourceSkuCapacityScaleTypeAutomatic, ResourceSkuCapacityScaleTypeManual, ResourceSkuCapacityScaleTypeNone} } // SamplingType enumerates the values for sampling type. @@ -699,6 +719,26 @@ func PossibleUserStateValues() []UserState { return []UserState{UserStateActive, UserStateBlocked, UserStateDeleted, UserStatePending} } +// Verbosity enumerates the values for verbosity. +type Verbosity string + +const ( + // Error Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic + // instance. + Error Verbosity = "error" + // Information Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached + // to this diagnostic instance. + Information Verbosity = "information" + // Verbose All the traces emitted by trace policies will be sent to the logger attached to this diagnostic + // instance. + Verbose Verbosity = "verbose" +) + +// PossibleVerbosityValues returns an array of possible values for the Verbosity const type. +func PossibleVerbosityValues() []Verbosity { + return []Verbosity{Error, Information, Verbose} +} + // VersioningScheme enumerates the values for versioning scheme. type VersioningScheme string @@ -1193,7 +1233,7 @@ func (acoup *APICreateOrUpdateParameter) UnmarshalJSON(body []byte) error { type APICreateOrUpdateProperties struct { // Value - Content value when Importing an API. Value *string `json:"value,omitempty"` - // Format - Format of the Content in which the API is getting imported. Possible values include: 'WadlXML', 'WadlLinkJSON', 'SwaggerJSON', 'SwaggerLinkJSON', 'Wsdl', 'WsdlLink', 'Openapi', 'Openapijson', 'OpenapiLink' + // Format - Format of the Content in which the API is getting imported. Possible values include: 'WadlXML', 'WadlLinkJSON', 'SwaggerJSON', 'SwaggerLinkJSON', 'Wsdl', 'WsdlLink', 'Openapi', 'Openapijson', 'OpenapiLink', 'OpenapijsonLink' Format ContentFormat `json:"format,omitempty"` // WsdlSelector - Criteria to limit import of WSDL to a subset of the document. WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector `json:"wsdlSelector,omitempty"` @@ -3863,8 +3903,10 @@ type DiagnosticContractProperties struct { Frontend *PipelineDiagnosticSettings `json:"frontend,omitempty"` // Backend - Diagnostic settings for incoming/outgoing HTTP messages to the Backend Backend *PipelineDiagnosticSettings `json:"backend,omitempty"` - // EnableHTTPCorrelationHeaders - Whether to process Correlation Headers coming to Api Management Service. Only applicable to Application Insights diagnostics. Default is true. - EnableHTTPCorrelationHeaders *bool `json:"enableHttpCorrelationHeaders,omitempty"` + // HTTPCorrelationProtocol - Sets correlation protocol to use for Application Insights diagnostics. Possible values include: 'None', 'Legacy', 'W3C' + HTTPCorrelationProtocol HTTPCorrelationProtocol `json:"httpCorrelationProtocol,omitempty"` + // Verbosity - The verbosity level applied to traces emitted by trace policies. Possible values include: 'Verbose', 'Information', 'Error' + Verbosity Verbosity `json:"verbosity,omitempty"` } // EmailTemplateCollection paged email template list representation. @@ -8819,7 +8861,7 @@ type ResourceSkuCapacity struct { Maximum *int32 `json:"maximum,omitempty"` // Default - READ-ONLY; The default capacity. Default *int32 `json:"default,omitempty"` - // ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'Automatic', 'Manual', 'None' + // ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone' ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/networkstatus.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/networkstatus.go index 2cd83aded57d..a5810578ca2d 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/networkstatus.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/networkstatus.go @@ -36,7 +36,8 @@ func NewNetworkStatusClient(subscriptionID string) NetworkStatusClient { return NewNetworkStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client. +// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNetworkStatusClientWithBaseURI(baseURI string, subscriptionID string) NetworkStatusClient { return NetworkStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go index e4a2a5421016..dcdf4d7aa14c 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go @@ -36,7 +36,8 @@ func NewNotificationClient(subscriptionID string) NotificationClient { return NewNotificationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationClientWithBaseURI creates an instance of the NotificationClient client. +// NewNotificationClientWithBaseURI creates an instance of the NotificationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNotificationClientWithBaseURI(baseURI string, subscriptionID string) NotificationClient { return NotificationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientemail.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientemail.go index 4a630306a829..3bb6765733f9 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientemail.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientemail.go @@ -36,7 +36,9 @@ func NewNotificationRecipientEmailClient(subscriptionID string) NotificationReci return NewNotificationRecipientEmailClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationRecipientEmailClientWithBaseURI creates an instance of the NotificationRecipientEmailClient client. +// NewNotificationRecipientEmailClientWithBaseURI creates an instance of the NotificationRecipientEmailClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewNotificationRecipientEmailClientWithBaseURI(baseURI string, subscriptionID string) NotificationRecipientEmailClient { return NotificationRecipientEmailClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientuser.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientuser.go index 7aa0779b9e9f..bc29409d40ae 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientuser.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientuser.go @@ -36,7 +36,9 @@ func NewNotificationRecipientUserClient(subscriptionID string) NotificationRecip return NewNotificationRecipientUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationRecipientUserClientWithBaseURI creates an instance of the NotificationRecipientUserClient client. +// NewNotificationRecipientUserClientWithBaseURI creates an instance of the NotificationRecipientUserClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewNotificationRecipientUserClientWithBaseURI(baseURI string, subscriptionID string) NotificationRecipientUserClient { return NotificationRecipientUserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go index 5eb3593ba1c6..65ee6d35e735 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go @@ -36,7 +36,9 @@ func NewOpenIDConnectProviderClient(subscriptionID string) OpenIDConnectProvider return NewOpenIDConnectProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenIDConnectProviderClientWithBaseURI creates an instance of the OpenIDConnectProviderClient client. +// NewOpenIDConnectProviderClientWithBaseURI creates an instance of the OpenIDConnectProviderClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewOpenIDConnectProviderClientWithBaseURI(baseURI string, subscriptionID string) OpenIDConnectProviderClient { return OpenIDConnectProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go index 270e5208ef5b..c299a75f81ed 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go @@ -36,7 +36,8 @@ func NewOperationClient(subscriptionID string) OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string, subscriptionID string) OperationClient { return OperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/operations.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/operations.go index ed61ccbdb1a6..82b29d91a992 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/operations.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go index b4cafdfdc816..7e81d05e69df 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go @@ -36,7 +36,8 @@ func NewPolicyClient(subscriptionID string) PolicyClient { return NewPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client. +// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyClientWithBaseURI(baseURI string, subscriptionID string) PolicyClient { return PolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/policysnippet.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/policysnippet.go index ea1539b4d2db..cbf1980e9200 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/policysnippet.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/policysnippet.go @@ -36,7 +36,8 @@ func NewPolicySnippetClient(subscriptionID string) PolicySnippetClient { return NewPolicySnippetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySnippetClientWithBaseURI creates an instance of the PolicySnippetClient client. +// NewPolicySnippetClientWithBaseURI creates an instance of the PolicySnippetClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySnippetClientWithBaseURI(baseURI string, subscriptionID string) PolicySnippetClient { return PolicySnippetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go index 30be79926a58..62b5060211a9 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go @@ -36,7 +36,8 @@ func NewProductClient(subscriptionID string) ProductClient { return NewProductClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductClientWithBaseURI creates an instance of the ProductClient client. +// NewProductClientWithBaseURI creates an instance of the ProductClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductClientWithBaseURI(baseURI string, subscriptionID string) ProductClient { return ProductClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go index 06de98e1db87..e0b4227051cf 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go @@ -36,7 +36,8 @@ func NewProductAPIClient(subscriptionID string) ProductAPIClient { return NewProductAPIClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductAPIClientWithBaseURI creates an instance of the ProductAPIClient client. +// NewProductAPIClientWithBaseURI creates an instance of the ProductAPIClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductAPIClientWithBaseURI(baseURI string, subscriptionID string) ProductAPIClient { return ProductAPIClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go index 2eb7feca9207..272c9c5cff88 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go @@ -36,7 +36,8 @@ func NewProductGroupClient(subscriptionID string) ProductGroupClient { return NewProductGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductGroupClientWithBaseURI creates an instance of the ProductGroupClient client. +// NewProductGroupClientWithBaseURI creates an instance of the ProductGroupClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductGroupClientWithBaseURI(baseURI string, subscriptionID string) ProductGroupClient { return ProductGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go index f28186b18b62..f976a10cd95b 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go @@ -36,7 +36,8 @@ func NewProductPolicyClient(subscriptionID string) ProductPolicyClient { return NewProductPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client. +// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductPolicyClientWithBaseURI(baseURI string, subscriptionID string) ProductPolicyClient { return ProductPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go index 4583d1393240..ca5b9ec0164a 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go @@ -36,7 +36,9 @@ func NewProductSubscriptionsClient(subscriptionID string) ProductSubscriptionsCl return NewProductSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client. +// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProductSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ProductSubscriptionsClient { return ProductSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go index 9ae7cf7c5b03..7e02ef6a878d 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go @@ -36,7 +36,8 @@ func NewPropertyClient(subscriptionID string) PropertyClient { return NewPropertyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client. +// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) PropertyClient { return PropertyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabycounterkeys.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabycounterkeys.go index bf74f343c5f6..7f257deb7ea5 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabycounterkeys.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabycounterkeys.go @@ -36,7 +36,9 @@ func NewQuotaByCounterKeysClient(subscriptionID string) QuotaByCounterKeysClient return NewQuotaByCounterKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client. +// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByCounterKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByCounterKeysClient { return QuotaByCounterKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabyperiodkeys.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabyperiodkeys.go index 66a015ddb34d..1b23917a9224 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabyperiodkeys.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabyperiodkeys.go @@ -36,7 +36,9 @@ func NewQuotaByPeriodKeysClient(subscriptionID string) QuotaByPeriodKeysClient { return NewQuotaByPeriodKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client. +// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByPeriodKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByPeriodKeysClient { return QuotaByPeriodKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/region.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/region.go index a9b7a9f90d77..0ef58e4eba58 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/region.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/region.go @@ -36,7 +36,8 @@ func NewRegionClient(subscriptionID string) RegionClient { return NewRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionClientWithBaseURI creates an instance of the RegionClient client. +// NewRegionClientWithBaseURI creates an instance of the RegionClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionClientWithBaseURI(baseURI string, subscriptionID string) RegionClient { return RegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go index 495355fa1117..f544a2e4ffd4 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go @@ -36,7 +36,8 @@ func NewReportsClient(subscriptionID string) ReportsClient { return NewReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReportsClientWithBaseURI creates an instance of the ReportsClient client. +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return ReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/service.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/service.go index ab454659cc6a..a99729835fd5 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/service.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/service.go @@ -36,7 +36,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/serviceskus.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/serviceskus.go index 9c021e33eee7..4c18120b4c40 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/serviceskus.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/serviceskus.go @@ -36,7 +36,8 @@ func NewServiceSkusClient(subscriptionID string) ServiceSkusClient { return NewServiceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client. +// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceSkusClientWithBaseURI(baseURI string, subscriptionID string) ServiceSkusClient { return ServiceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/signinsettings.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/signinsettings.go index c1d46cd1cc42..972ea22501a0 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/signinsettings.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/signinsettings.go @@ -36,7 +36,8 @@ func NewSignInSettingsClient(subscriptionID string) SignInSettingsClient { return NewSignInSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSignInSettingsClientWithBaseURI creates an instance of the SignInSettingsClient client. +// NewSignInSettingsClientWithBaseURI creates an instance of the SignInSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignInSettingsClientWithBaseURI(baseURI string, subscriptionID string) SignInSettingsClient { return SignInSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/signupsettings.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/signupsettings.go index 84b5a22e53f3..4927d7cc725c 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/signupsettings.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/signupsettings.go @@ -36,7 +36,8 @@ func NewSignUpSettingsClient(subscriptionID string) SignUpSettingsClient { return NewSignUpSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSignUpSettingsClientWithBaseURI creates an instance of the SignUpSettingsClient client. +// NewSignUpSettingsClientWithBaseURI creates an instance of the SignUpSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignUpSettingsClientWithBaseURI(baseURI string, subscriptionID string) SignUpSettingsClient { return SignUpSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go index 56e86031c114..a07221af59bb 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go @@ -36,7 +36,8 @@ func NewSubscriptionClient(subscriptionID string) SubscriptionClient { return NewSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionClientWithBaseURI creates an instance of the SubscriptionClient client. +// NewSubscriptionClientWithBaseURI creates an instance of the SubscriptionClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionClient { return SubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go index 75250fa5aadb..ac58d7987553 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go @@ -36,7 +36,8 @@ func NewTagClient(subscriptionID string) TagClient { return NewTagClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagClientWithBaseURI creates an instance of the TagClient client. +// NewTagClientWithBaseURI creates an instance of the TagClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagClientWithBaseURI(baseURI string, subscriptionID string) TagClient { return TagClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go index bc7a0c5ed13d..af45c369ab38 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go @@ -36,7 +36,8 @@ func NewTagResourceClient(subscriptionID string) TagResourceClient { return NewTagResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagResourceClientWithBaseURI creates an instance of the TagResourceClient client. +// NewTagResourceClientWithBaseURI creates an instance of the TagResourceClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagResourceClientWithBaseURI(baseURI string, subscriptionID string) TagResourceClient { return TagResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccess.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccess.go index 5cd3eabd4770..1241479d9ca7 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccess.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccess.go @@ -36,7 +36,8 @@ func NewTenantAccessClient(subscriptionID string) TenantAccessClient { return NewTenantAccessClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client. +// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessClient { return TenantAccessClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccessgit.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccessgit.go index c784081670bf..b97822ba45d0 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccessgit.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccessgit.go @@ -36,7 +36,8 @@ func NewTenantAccessGitClient(subscriptionID string) TenantAccessGitClient { return NewTenantAccessGitClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client. +// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessGitClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessGitClient { return TenantAccessGitClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantconfiguration.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantconfiguration.go index ad867de7d0db..2419e8d9f622 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantconfiguration.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantconfiguration.go @@ -36,7 +36,9 @@ func NewTenantConfigurationClient(subscriptionID string) TenantConfigurationClie return NewTenantConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client. +// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantConfigurationClientWithBaseURI(baseURI string, subscriptionID string) TenantConfigurationClient { return TenantConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go index 46ddceb4e738..3a6f0ab5fe12 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go @@ -36,7 +36,8 @@ func NewUserClient(subscriptionID string) UserClient { return NewUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserClientWithBaseURI creates an instance of the UserClient client. +// NewUserClientWithBaseURI creates an instance of the UserClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserClientWithBaseURI(baseURI string, subscriptionID string) UserClient { return UserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/userconfirmationpassword.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/userconfirmationpassword.go index 76716037b9f3..02ad0468fa98 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/userconfirmationpassword.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/userconfirmationpassword.go @@ -36,7 +36,9 @@ func NewUserConfirmationPasswordClient(subscriptionID string) UserConfirmationPa return NewUserConfirmationPasswordClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserConfirmationPasswordClientWithBaseURI creates an instance of the UserConfirmationPasswordClient client. +// NewUserConfirmationPasswordClientWithBaseURI creates an instance of the UserConfirmationPasswordClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewUserConfirmationPasswordClientWithBaseURI(baseURI string, subscriptionID string) UserConfirmationPasswordClient { return UserConfirmationPasswordClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go index 7a03d93f87ee..e3849aa45c1f 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go @@ -36,7 +36,8 @@ func NewUserGroupClient(subscriptionID string) UserGroupClient { return NewUserGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserGroupClientWithBaseURI creates an instance of the UserGroupClient client. +// NewUserGroupClientWithBaseURI creates an instance of the UserGroupClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserGroupClientWithBaseURI(baseURI string, subscriptionID string) UserGroupClient { return UserGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/useridentities.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/useridentities.go index 27c7db454bf3..9b330724b7d6 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/useridentities.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/useridentities.go @@ -36,7 +36,8 @@ func NewUserIdentitiesClient(subscriptionID string) UserIdentitiesClient { return NewUserIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client. +// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) UserIdentitiesClient { return UserIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go index a374da136a39..12034de0e794 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go @@ -36,7 +36,9 @@ func NewUserSubscriptionClient(subscriptionID string) UserSubscriptionClient { return NewUserSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserSubscriptionClientWithBaseURI creates an instance of the UserSubscriptionClient client. +// NewUserSubscriptionClientWithBaseURI creates an instance of the UserSubscriptionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewUserSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) UserSubscriptionClient { return UserSubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appconfiguration/mgmt/2019-10-01/appconfiguration/appconfigurationapi/interfaces.go b/services/appconfiguration/mgmt/2019-10-01/appconfiguration/appconfigurationapi/interfaces.go index ca316075bf32..4fc920c12959 100644 --- a/services/appconfiguration/mgmt/2019-10-01/appconfiguration/appconfigurationapi/interfaces.go +++ b/services/appconfiguration/mgmt/2019-10-01/appconfiguration/appconfigurationapi/interfaces.go @@ -28,8 +28,11 @@ type ConfigurationStoresClientAPI interface { Delete(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.ConfigurationStoresDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.ConfigurationStore, err error) List(ctx context.Context, skipToken string) (result appconfiguration.ConfigurationStoreListResultPage, err error) + ListComplete(ctx context.Context, skipToken string) (result appconfiguration.ConfigurationStoreListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result appconfiguration.ConfigurationStoreListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result appconfiguration.ConfigurationStoreListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (result appconfiguration.APIKeyListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (result appconfiguration.APIKeyListResultIterator, err error) ListKeyValue(ctx context.Context, resourceGroupName string, configStoreName string, listKeyValueParameters appconfiguration.ListKeyValueParameters) (result appconfiguration.KeyValue, err error) RegenerateKey(ctx context.Context, resourceGroupName string, configStoreName string, regenerateKeyParameters appconfiguration.RegenerateKeyParameters) (result appconfiguration.APIKey, err error) Update(ctx context.Context, resourceGroupName string, configStoreName string, configStoreUpdateParameters appconfiguration.ConfigurationStoreUpdateParameters) (result appconfiguration.ConfigurationStoresUpdateFuture, err error) @@ -41,6 +44,7 @@ var _ ConfigurationStoresClientAPI = (*appconfiguration.ConfigurationStoresClien type OperationsClientAPI interface { CheckNameAvailability(ctx context.Context, checkNameAvailabilityParameters appconfiguration.CheckNameAvailabilityParameters) (result appconfiguration.NameAvailabilityStatus, err error) List(ctx context.Context, skipToken string) (result appconfiguration.OperationDefinitionListResultPage, err error) + ListComplete(ctx context.Context, skipToken string) (result appconfiguration.OperationDefinitionListResultIterator, err error) } var _ OperationsClientAPI = (*appconfiguration.OperationsClient)(nil) diff --git a/services/appconfiguration/mgmt/2019-10-01/appconfiguration/client.go b/services/appconfiguration/mgmt/2019-10-01/appconfiguration/client.go index ca729e4e34ff..d4403648c044 100644 --- a/services/appconfiguration/mgmt/2019-10-01/appconfiguration/client.go +++ b/services/appconfiguration/mgmt/2019-10-01/appconfiguration/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/appconfiguration/mgmt/2019-10-01/appconfiguration/configurationstores.go b/services/appconfiguration/mgmt/2019-10-01/appconfiguration/configurationstores.go index 40daddce716f..46bd9d263b23 100644 --- a/services/appconfiguration/mgmt/2019-10-01/appconfiguration/configurationstores.go +++ b/services/appconfiguration/mgmt/2019-10-01/appconfiguration/configurationstores.go @@ -36,7 +36,9 @@ func NewConfigurationStoresClient(subscriptionID string) ConfigurationStoresClie return NewConfigurationStoresClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationStoresClientWithBaseURI creates an instance of the ConfigurationStoresClient client. +// NewConfigurationStoresClientWithBaseURI creates an instance of the ConfigurationStoresClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewConfigurationStoresClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationStoresClient { return ConfigurationStoresClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appconfiguration/mgmt/2019-10-01/appconfiguration/operations.go b/services/appconfiguration/mgmt/2019-10-01/appconfiguration/operations.go index 8840f7d4abdc..22e909ea0ea3 100644 --- a/services/appconfiguration/mgmt/2019-10-01/appconfiguration/operations.go +++ b/services/appconfiguration/mgmt/2019-10-01/appconfiguration/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go b/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go index 853ecc6d358d..af65eae871b3 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go +++ b/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go @@ -36,7 +36,8 @@ func NewAnalyticsItemsClient(subscriptionID string) AnalyticsItemsClient { return NewAnalyticsItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAnalyticsItemsClientWithBaseURI creates an instance of the AnalyticsItemsClient client. +// NewAnalyticsItemsClientWithBaseURI creates an instance of the AnalyticsItemsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAnalyticsItemsClientWithBaseURI(baseURI string, subscriptionID string) AnalyticsItemsClient { return AnalyticsItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/annotations.go b/services/appinsights/mgmt/2015-05-01/insights/annotations.go index c6cbb32e7e91..d832ce2149a9 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/annotations.go +++ b/services/appinsights/mgmt/2015-05-01/insights/annotations.go @@ -36,7 +36,8 @@ func NewAnnotationsClient(subscriptionID string) AnnotationsClient { return NewAnnotationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAnnotationsClientWithBaseURI creates an instance of the AnnotationsClient client. +// NewAnnotationsClientWithBaseURI creates an instance of the AnnotationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAnnotationsClientWithBaseURI(baseURI string, subscriptionID string) AnnotationsClient { return AnnotationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/apikeys.go b/services/appinsights/mgmt/2015-05-01/insights/apikeys.go index 1b3161dfcd36..a494fd7e0468 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/apikeys.go +++ b/services/appinsights/mgmt/2015-05-01/insights/apikeys.go @@ -36,7 +36,8 @@ func NewAPIKeysClient(subscriptionID string) APIKeysClient { return NewAPIKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIKeysClientWithBaseURI creates an instance of the APIKeysClient client. +// NewAPIKeysClientWithBaseURI creates an instance of the APIKeysClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIKeysClientWithBaseURI(baseURI string, subscriptionID string) APIKeysClient { return APIKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/client.go b/services/appinsights/mgmt/2015-05-01/insights/client.go index 8508d449fead..b15c44bd08d2 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/client.go +++ b/services/appinsights/mgmt/2015-05-01/insights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/appinsights/mgmt/2015-05-01/insights/componentavailablefeatures.go b/services/appinsights/mgmt/2015-05-01/insights/componentavailablefeatures.go index 08f23492ac83..6ac7292584b5 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/componentavailablefeatures.go +++ b/services/appinsights/mgmt/2015-05-01/insights/componentavailablefeatures.go @@ -36,7 +36,9 @@ func NewComponentAvailableFeaturesClient(subscriptionID string) ComponentAvailab return NewComponentAvailableFeaturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewComponentAvailableFeaturesClientWithBaseURI creates an instance of the ComponentAvailableFeaturesClient client. +// NewComponentAvailableFeaturesClientWithBaseURI creates an instance of the ComponentAvailableFeaturesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewComponentAvailableFeaturesClientWithBaseURI(baseURI string, subscriptionID string) ComponentAvailableFeaturesClient { return ComponentAvailableFeaturesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/componentcurrentbillingfeatures.go b/services/appinsights/mgmt/2015-05-01/insights/componentcurrentbillingfeatures.go index 2a91d53563ed..827897f8268a 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/componentcurrentbillingfeatures.go +++ b/services/appinsights/mgmt/2015-05-01/insights/componentcurrentbillingfeatures.go @@ -37,7 +37,8 @@ func NewComponentCurrentBillingFeaturesClient(subscriptionID string) ComponentCu } // NewComponentCurrentBillingFeaturesClientWithBaseURI creates an instance of the ComponentCurrentBillingFeaturesClient -// 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 NewComponentCurrentBillingFeaturesClientWithBaseURI(baseURI string, subscriptionID string) ComponentCurrentBillingFeaturesClient { return ComponentCurrentBillingFeaturesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/componentfeaturecapabilities.go b/services/appinsights/mgmt/2015-05-01/insights/componentfeaturecapabilities.go index 9586f98373b6..ba1f865006c0 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/componentfeaturecapabilities.go +++ b/services/appinsights/mgmt/2015-05-01/insights/componentfeaturecapabilities.go @@ -37,7 +37,8 @@ func NewComponentFeatureCapabilitiesClient(subscriptionID string) ComponentFeatu } // NewComponentFeatureCapabilitiesClientWithBaseURI creates an instance of the ComponentFeatureCapabilitiesClient -// 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 NewComponentFeatureCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) ComponentFeatureCapabilitiesClient { return ComponentFeatureCapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/componentquotastatus.go b/services/appinsights/mgmt/2015-05-01/insights/componentquotastatus.go index f879138d4fe1..159e89f2b442 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/componentquotastatus.go +++ b/services/appinsights/mgmt/2015-05-01/insights/componentquotastatus.go @@ -36,7 +36,9 @@ func NewComponentQuotaStatusClient(subscriptionID string) ComponentQuotaStatusCl return NewComponentQuotaStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewComponentQuotaStatusClientWithBaseURI creates an instance of the ComponentQuotaStatusClient client. +// NewComponentQuotaStatusClientWithBaseURI creates an instance of the ComponentQuotaStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewComponentQuotaStatusClientWithBaseURI(baseURI string, subscriptionID string) ComponentQuotaStatusClient { return ComponentQuotaStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/components.go b/services/appinsights/mgmt/2015-05-01/insights/components.go index 12014255144e..2e6c61139be1 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/components.go +++ b/services/appinsights/mgmt/2015-05-01/insights/components.go @@ -36,7 +36,8 @@ func NewComponentsClient(subscriptionID string) ComponentsClient { return NewComponentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewComponentsClientWithBaseURI creates an instance of the ComponentsClient client. +// NewComponentsClientWithBaseURI creates an instance of the ComponentsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewComponentsClientWithBaseURI(baseURI string, subscriptionID string) ComponentsClient { return ComponentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/exportconfigurations.go b/services/appinsights/mgmt/2015-05-01/insights/exportconfigurations.go index 7b1fe3573b7b..a32a15f4406d 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/exportconfigurations.go +++ b/services/appinsights/mgmt/2015-05-01/insights/exportconfigurations.go @@ -36,7 +36,9 @@ func NewExportConfigurationsClient(subscriptionID string) ExportConfigurationsCl return NewExportConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExportConfigurationsClientWithBaseURI creates an instance of the ExportConfigurationsClient client. +// NewExportConfigurationsClientWithBaseURI creates an instance of the ExportConfigurationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewExportConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ExportConfigurationsClient { return ExportConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/favorites.go b/services/appinsights/mgmt/2015-05-01/insights/favorites.go index da6bf5bed2c6..2f02d70cc3c4 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/favorites.go +++ b/services/appinsights/mgmt/2015-05-01/insights/favorites.go @@ -36,7 +36,8 @@ func NewFavoritesClient(subscriptionID string) FavoritesClient { return NewFavoritesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFavoritesClientWithBaseURI creates an instance of the FavoritesClient client. +// NewFavoritesClientWithBaseURI creates an instance of the FavoritesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFavoritesClientWithBaseURI(baseURI string, subscriptionID string) FavoritesClient { return FavoritesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/insightsapi/interfaces.go b/services/appinsights/mgmt/2015-05-01/insights/insightsapi/interfaces.go index 38f48876d203..1d64b841dc37 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/insightsapi/interfaces.go +++ b/services/appinsights/mgmt/2015-05-01/insights/insightsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result insights.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result insights.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*insights.OperationsClient)(nil) @@ -106,7 +107,9 @@ type ComponentsClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceName string) (result insights.ApplicationInsightsComponent, err error) GetPurgeStatus(ctx context.Context, resourceGroupName string, resourceName string, purgeID string) (result insights.ComponentPurgeStatusResponse, err error) List(ctx context.Context) (result insights.ApplicationInsightsComponentListResultPage, err error) + ListComplete(ctx context.Context) (result insights.ApplicationInsightsComponentListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result insights.ApplicationInsightsComponentListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result insights.ApplicationInsightsComponentListResultIterator, err error) Purge(ctx context.Context, resourceGroupName string, resourceName string, body insights.ComponentPurgeBody) (result insights.ComponentPurgeResponse, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, componentTags insights.TagsResource) (result insights.ApplicationInsightsComponent, err error) } @@ -149,8 +152,11 @@ type WebTestsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, webTestName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, webTestName string) (result insights.WebTest, err error) List(ctx context.Context) (result insights.WebTestListResultPage, err error) + ListComplete(ctx context.Context) (result insights.WebTestListResultIterator, err error) ListByComponent(ctx context.Context, componentName string, resourceGroupName string) (result insights.WebTestListResultPage, err error) + ListByComponentComplete(ctx context.Context, componentName string, resourceGroupName string) (result insights.WebTestListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result insights.WebTestListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result insights.WebTestListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, webTestName string, webTestTags insights.TagsResource) (result insights.WebTest, err error) } diff --git a/services/appinsights/mgmt/2015-05-01/insights/operations.go b/services/appinsights/mgmt/2015-05-01/insights/operations.go index 0cbf7eae8995..07ee44767bc6 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/operations.go +++ b/services/appinsights/mgmt/2015-05-01/insights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/proactivedetectionconfigurations.go b/services/appinsights/mgmt/2015-05-01/insights/proactivedetectionconfigurations.go index b1d2a914724c..0420ce3324cb 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/proactivedetectionconfigurations.go +++ b/services/appinsights/mgmt/2015-05-01/insights/proactivedetectionconfigurations.go @@ -37,7 +37,8 @@ func NewProactiveDetectionConfigurationsClient(subscriptionID string) ProactiveD } // NewProactiveDetectionConfigurationsClientWithBaseURI creates an instance of the -// ProactiveDetectionConfigurationsClient client. +// ProactiveDetectionConfigurationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProactiveDetectionConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ProactiveDetectionConfigurationsClient { return ProactiveDetectionConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/webtestlocations.go b/services/appinsights/mgmt/2015-05-01/insights/webtestlocations.go index 2858eff33335..ac99192b1335 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/webtestlocations.go +++ b/services/appinsights/mgmt/2015-05-01/insights/webtestlocations.go @@ -36,7 +36,9 @@ func NewWebTestLocationsClient(subscriptionID string) WebTestLocationsClient { return NewWebTestLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebTestLocationsClientWithBaseURI creates an instance of the WebTestLocationsClient client. +// NewWebTestLocationsClientWithBaseURI creates an instance of the WebTestLocationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWebTestLocationsClientWithBaseURI(baseURI string, subscriptionID string) WebTestLocationsClient { return WebTestLocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/webtests.go b/services/appinsights/mgmt/2015-05-01/insights/webtests.go index d19956091f3d..7a897a461f03 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/webtests.go +++ b/services/appinsights/mgmt/2015-05-01/insights/webtests.go @@ -36,7 +36,8 @@ func NewWebTestsClient(subscriptionID string) WebTestsClient { return NewWebTestsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebTestsClientWithBaseURI creates an instance of the WebTestsClient client. +// NewWebTestsClientWithBaseURI creates an instance of the WebTestsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebTestsClientWithBaseURI(baseURI string, subscriptionID string) WebTestsClient { return WebTestsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/workbooks.go b/services/appinsights/mgmt/2015-05-01/insights/workbooks.go index 17e4a975e726..0a8351d7a2f9 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/workbooks.go +++ b/services/appinsights/mgmt/2015-05-01/insights/workbooks.go @@ -36,7 +36,8 @@ func NewWorkbooksClient(subscriptionID string) WorkbooksClient { return NewWorkbooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkbooksClientWithBaseURI creates an instance of the WorkbooksClient client. +// NewWorkbooksClientWithBaseURI creates an instance of the WorkbooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkbooksClientWithBaseURI(baseURI string, subscriptionID string) WorkbooksClient { return WorkbooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go b/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go index 709f900b6ba5..0a80d8ca0461 100644 --- a/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go +++ b/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go @@ -36,7 +36,9 @@ func NewWorkItemConfigurationsClient(subscriptionID string) WorkItemConfiguratio return NewWorkItemConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkItemConfigurationsClientWithBaseURI creates an instance of the WorkItemConfigurationsClient client. +// NewWorkItemConfigurationsClientWithBaseURI creates an instance of the WorkItemConfigurationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewWorkItemConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) WorkItemConfigurationsClient { return WorkItemConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/authorization/mgmt/2015-07-01/authorization/authorizationapi/interfaces.go b/services/authorization/mgmt/2015-07-01/authorization/authorizationapi/interfaces.go index 8dc96c7e2d74..c3ea14618a1a 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/authorizationapi/interfaces.go +++ b/services/authorization/mgmt/2015-07-01/authorization/authorizationapi/interfaces.go @@ -26,7 +26,9 @@ import ( // PermissionsClientAPI contains the set of methods on the PermissionsClient type. type PermissionsClientAPI interface { ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultIterator, err error) } var _ PermissionsClientAPI = (*authorization.PermissionsClient)(nil) @@ -38,6 +40,7 @@ type RoleDefinitionsClientAPI interface { Get(ctx context.Context, scope string, roleDefinitionID string) (result authorization.RoleDefinition, err error) GetByID(ctx context.Context, roleDefinitionID string) (result authorization.RoleDefinition, err error) List(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultPage, err error) + ListComplete(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultIterator, err error) } var _ RoleDefinitionsClientAPI = (*authorization.RoleDefinitionsClient)(nil) @@ -46,6 +49,7 @@ var _ RoleDefinitionsClientAPI = (*authorization.RoleDefinitionsClient)(nil) type ProviderOperationsMetadataClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, APIVersion string, expand string) (result authorization.ProviderOperationsMetadata, err error) List(ctx context.Context, APIVersion string, expand string) (result authorization.ProviderOperationsMetadataListResultPage, err error) + ListComplete(ctx context.Context, APIVersion string, expand string) (result authorization.ProviderOperationsMetadataListResultIterator, err error) } var _ ProviderOperationsMetadataClientAPI = (*authorization.ProviderOperationsMetadataClient)(nil) @@ -66,9 +70,13 @@ type RoleAssignmentsClientAPI interface { Get(ctx context.Context, scope string, roleAssignmentName string) (result authorization.RoleAssignment, err error) GetByID(ctx context.Context, roleAssignmentID string) (result authorization.RoleAssignment, err error) List(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForScope(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForScopeComplete(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) } var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) @@ -76,6 +84,7 @@ var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) // ClassicAdministratorsClientAPI contains the set of methods on the ClassicAdministratorsClient type. type ClassicAdministratorsClientAPI interface { List(ctx context.Context) (result authorization.ClassicAdministratorListResultPage, err error) + ListComplete(ctx context.Context) (result authorization.ClassicAdministratorListResultIterator, err error) } var _ ClassicAdministratorsClientAPI = (*authorization.ClassicAdministratorsClient)(nil) diff --git a/services/authorization/mgmt/2015-07-01/authorization/classicadministrators.go b/services/authorization/mgmt/2015-07-01/authorization/classicadministrators.go index 5d865f423470..b0e1b0c47032 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/classicadministrators.go +++ b/services/authorization/mgmt/2015-07-01/authorization/classicadministrators.go @@ -38,7 +38,9 @@ func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministrators return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client. +// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient { return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/authorization/mgmt/2015-07-01/authorization/client.go b/services/authorization/mgmt/2015-07-01/authorization/client.go index cdce45f42202..39e518055422 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/client.go +++ b/services/authorization/mgmt/2015-07-01/authorization/client.go @@ -44,7 +44,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/authorization/mgmt/2015-07-01/authorization/globaladministrator.go b/services/authorization/mgmt/2015-07-01/authorization/globaladministrator.go index d899a74f7cba..1203f015c7c9 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/globaladministrator.go +++ b/services/authorization/mgmt/2015-07-01/authorization/globaladministrator.go @@ -38,7 +38,9 @@ func NewGlobalAdministratorClient(subscriptionID string) GlobalAdministratorClie return NewGlobalAdministratorClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client. +// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGlobalAdministratorClientWithBaseURI(baseURI string, subscriptionID string) GlobalAdministratorClient { return GlobalAdministratorClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/authorization/mgmt/2015-07-01/authorization/permissions.go b/services/authorization/mgmt/2015-07-01/authorization/permissions.go index 29f4b6ca82cd..5140e1e02d8a 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/permissions.go +++ b/services/authorization/mgmt/2015-07-01/authorization/permissions.go @@ -38,7 +38,8 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient { return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. +// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient { return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/authorization/mgmt/2015-07-01/authorization/provideroperationsmetadata.go b/services/authorization/mgmt/2015-07-01/authorization/provideroperationsmetadata.go index c7e814a9dcf2..90d6cf4ad8ab 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/provideroperationsmetadata.go +++ b/services/authorization/mgmt/2015-07-01/authorization/provideroperationsmetadata.go @@ -38,7 +38,9 @@ func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperatio return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client. +// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient { return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/authorization/mgmt/2015-07-01/authorization/roleassignments.go b/services/authorization/mgmt/2015-07-01/authorization/roleassignments.go index 224b08a8de8e..45aa6758a83b 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/roleassignments.go +++ b/services/authorization/mgmt/2015-07-01/authorization/roleassignments.go @@ -39,7 +39,8 @@ func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/authorization/mgmt/2015-07-01/authorization/roledefinitions.go b/services/authorization/mgmt/2015-07-01/authorization/roledefinitions.go index 4c19c4d9a6c7..a1488cb8a1ac 100644 --- a/services/authorization/mgmt/2015-07-01/authorization/roledefinitions.go +++ b/services/authorization/mgmt/2015-07-01/authorization/roledefinitions.go @@ -38,7 +38,8 @@ func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient { return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client. +// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient { return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/account.go b/services/automation/mgmt/2015-10-31/automation/account.go index 4e6f63f78e08..d0417b02f452 100644 --- a/services/automation/mgmt/2015-10-31/automation/account.go +++ b/services/automation/mgmt/2015-10-31/automation/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/activity.go b/services/automation/mgmt/2015-10-31/automation/activity.go index 453039a7c6d5..8a3310d24b2f 100644 --- a/services/automation/mgmt/2015-10-31/automation/activity.go +++ b/services/automation/mgmt/2015-10-31/automation/activity.go @@ -36,7 +36,8 @@ func NewActivityClient(subscriptionID string) ActivityClient { return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityClientWithBaseURI creates an instance of the ActivityClient client. +// NewActivityClientWithBaseURI creates an instance of the ActivityClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go b/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go index 82aee70aa8be..2376931b23b0 100644 --- a/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go +++ b/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go @@ -37,7 +37,8 @@ func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrat } // NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient -// 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 NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/automationapi/interfaces.go b/services/automation/mgmt/2015-10-31/automation/automationapi/interfaces.go index 1567e15bf6c0..38092c8172c8 100644 --- a/services/automation/mgmt/2015-10-31/automation/automationapi/interfaces.go +++ b/services/automation/mgmt/2015-10-31/automation/automationapi/interfaces.go @@ -31,7 +31,9 @@ type AccountClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.Account, err error) List(ctx context.Context) (result automation.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result automation.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result automation.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result automation.AccountListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, parameters automation.AccountUpdateParameters) (result automation.Account, err error) } @@ -71,6 +73,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result automation.Certificate, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CertificateListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CertificateListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters automation.CertificateUpdateParameters) (result automation.Certificate, err error) } @@ -82,6 +85,7 @@ type ConnectionClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result automation.Connection, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result automation.Connection, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters automation.ConnectionUpdateParameters) (result automation.Connection, err error) } @@ -93,6 +97,7 @@ type ConnectionTypeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result automation.ConnectionType, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionTypeListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionTypeListResultIterator, err error) } var _ ConnectionTypeClientAPI = (*automation.ConnectionTypeClient)(nil) @@ -103,6 +108,7 @@ type CredentialClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result automation.Credential, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CredentialListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CredentialListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters automation.CredentialUpdateParameters) (result automation.Credential, err error) } @@ -114,6 +120,7 @@ type DscCompilationJobClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result automation.DscCompilationJob, err error) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result automation.JobStream, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscCompilationJobListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscCompilationJobListResultIterator, err error) } var _ DscCompilationJobClientAPI = (*automation.DscCompilationJobClient)(nil) @@ -132,6 +139,7 @@ type DscConfigurationClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result automation.DscConfiguration, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscConfigurationListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscConfigurationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters *automation.DscConfigurationUpdateParameters) (result automation.DscConfiguration, err error) } @@ -150,6 +158,7 @@ type DscNodeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result automation.DscNode, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result automation.DscNode, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscNodeListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscNodeListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters automation.DscNodeUpdateParameters) (result automation.DscNode, err error) } @@ -160,6 +169,7 @@ type NodeReportsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result automation.DscNodeReport, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result automation.SetObject, err error) ListByNode(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result automation.DscNodeReportListResultPage, err error) + ListByNodeComplete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result automation.DscNodeReportListResultIterator, err error) } var _ NodeReportsClientAPI = (*automation.NodeReportsClient)(nil) @@ -170,6 +180,7 @@ type DscNodeConfigurationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result automation.DscNodeConfiguration, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscNodeConfigurationListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscNodeConfigurationListResultIterator, err error) } var _ DscNodeConfigurationClientAPI = (*automation.DscNodeConfigurationClient)(nil) @@ -179,6 +190,7 @@ type HybridRunbookWorkerGroupClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result automation.HybridRunbookWorkerGroup, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.HybridRunbookWorkerGroupsListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.HybridRunbookWorkerGroupsListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters automation.HybridRunbookWorkerGroupUpdateParameters) (result automation.HybridRunbookWorkerGroup, err error) } @@ -191,6 +203,7 @@ type JobClientAPI interface { GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (result automation.ReadCloser, err error) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobListResultIterator, err error) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) @@ -202,6 +215,7 @@ var _ JobClientAPI = (*automation.JobClient)(nil) type JobStreamClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (result automation.JobStream, err error) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (result automation.JobStreamListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (result automation.JobStreamListResultIterator, err error) } var _ JobStreamClientAPI = (*automation.JobStreamClient)(nil) @@ -212,6 +226,7 @@ type JobScheduleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result automation.JobSchedule, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobScheduleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobScheduleListResultIterator, err error) } var _ JobScheduleClientAPI = (*automation.JobScheduleClient)(nil) @@ -227,6 +242,7 @@ var _ LinkedWorkspaceClientAPI = (*automation.LinkedWorkspaceClient)(nil) type ActivityClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result automation.Activity, err error) ListByModule(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.ActivityListResultPage, err error) + ListByModuleComplete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.ActivityListResultIterator, err error) } var _ ActivityClientAPI = (*automation.ActivityClient)(nil) @@ -237,6 +253,7 @@ type ModuleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.Module, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters automation.ModuleUpdateParameters) (result automation.Module, err error) } @@ -275,6 +292,7 @@ type RunbookClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.Runbook, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.RunbookListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.RunbookListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters automation.RunbookUpdateParameters) (result automation.Runbook, err error) } @@ -284,6 +302,7 @@ var _ RunbookClientAPI = (*automation.RunbookClient)(nil) type TestJobStreamsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result automation.JobStream, err error) ListByTestJob(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result automation.JobStreamListResultPage, err error) + ListByTestJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result automation.JobStreamListResultIterator, err error) } var _ TestJobStreamsClientAPI = (*automation.TestJobStreamsClient)(nil) @@ -305,6 +324,7 @@ type ScheduleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result automation.Schedule, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ScheduleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ScheduleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters automation.ScheduleUpdateParameters) (result automation.Schedule, err error) } @@ -316,6 +336,7 @@ type VariableClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result automation.Variable, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.VariableListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.VariableListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters automation.VariableUpdateParameters) (result automation.Variable, err error) } @@ -328,6 +349,7 @@ type WebhookClientAPI interface { GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.String, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result automation.Webhook, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WebhookListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WebhookListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters automation.WebhookUpdateParameters) (result automation.Webhook, err error) } diff --git a/services/automation/mgmt/2015-10-31/automation/certificate.go b/services/automation/mgmt/2015-10-31/automation/certificate.go index 2c78aee0afd9..b6cec1846342 100644 --- a/services/automation/mgmt/2015-10-31/automation/certificate.go +++ b/services/automation/mgmt/2015-10-31/automation/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/client.go b/services/automation/mgmt/2015-10-31/automation/client.go index 707fd618586a..a3b8a6ac6035 100644 --- a/services/automation/mgmt/2015-10-31/automation/client.go +++ b/services/automation/mgmt/2015-10-31/automation/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/automation/mgmt/2015-10-31/automation/connection.go b/services/automation/mgmt/2015-10-31/automation/connection.go index 8f3f172c1ca1..8c3df318f915 100644 --- a/services/automation/mgmt/2015-10-31/automation/connection.go +++ b/services/automation/mgmt/2015-10-31/automation/connection.go @@ -36,7 +36,8 @@ func NewConnectionClient(subscriptionID string) ConnectionClient { return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. +// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/connectiontype.go b/services/automation/mgmt/2015-10-31/automation/connectiontype.go index e408013691a0..7aba51e3da4c 100644 --- a/services/automation/mgmt/2015-10-31/automation/connectiontype.go +++ b/services/automation/mgmt/2015-10-31/automation/connectiontype.go @@ -36,7 +36,8 @@ func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient { return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. +// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/credential.go b/services/automation/mgmt/2015-10-31/automation/credential.go index fe721caade5a..8abdad518e22 100644 --- a/services/automation/mgmt/2015-10-31/automation/credential.go +++ b/services/automation/mgmt/2015-10-31/automation/credential.go @@ -36,7 +36,8 @@ func NewCredentialClient(subscriptionID string) CredentialClient { return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. +// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go b/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go index d82bca52bb16..4add21068375 100644 --- a/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go +++ b/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go @@ -37,7 +37,9 @@ func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. +// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go b/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go index 462c8fde2b37..ec659ac8ddb0 100644 --- a/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go +++ b/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go @@ -37,7 +37,9 @@ func NewDscCompilationJobStreamClient(subscriptionID string) DscCompilationJobSt return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client. +// NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobStreamClient { return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go b/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go index 1adb2650c6d0..dc8ffb74290f 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go +++ b/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go @@ -36,7 +36,9 @@ func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. +// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/dscnode.go b/services/automation/mgmt/2015-10-31/automation/dscnode.go index 4e60dfbd888a..f5b40646bead 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscnode.go +++ b/services/automation/mgmt/2015-10-31/automation/dscnode.go @@ -36,7 +36,8 @@ func NewDscNodeClient(subscriptionID string) DscNodeClient { return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client. +// NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeClient { return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go b/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go index 71175e74c636..355523da68b2 100644 --- a/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go +++ b/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go @@ -36,7 +36,9 @@ func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationCl return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. +// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/fields.go b/services/automation/mgmt/2015-10-31/automation/fields.go index 3ebac62895f4..d134d7ee6191 100644 --- a/services/automation/mgmt/2015-10-31/automation/fields.go +++ b/services/automation/mgmt/2015-10-31/automation/fields.go @@ -36,7 +36,8 @@ func NewFieldsClient(subscriptionID string) FieldsClient { return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFieldsClientWithBaseURI creates an instance of the FieldsClient client. +// NewFieldsClientWithBaseURI creates an instance of the FieldsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsClient { return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go b/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go index 48878c158c2e..16c0350b5b46 100644 --- a/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go +++ b/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go @@ -36,7 +36,9 @@ func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorke return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. +// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/job.go b/services/automation/mgmt/2015-10-31/automation/job.go index f924ad65f147..9d1793986623 100644 --- a/services/automation/mgmt/2015-10-31/automation/job.go +++ b/services/automation/mgmt/2015-10-31/automation/job.go @@ -37,7 +37,8 @@ func NewJobClient(subscriptionID string) JobClient { return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobClientWithBaseURI creates an instance of the JobClient client. +// NewJobClientWithBaseURI creates an instance of the JobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { return JobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/jobschedule.go b/services/automation/mgmt/2015-10-31/automation/jobschedule.go index 78fd95ae7562..bbe3542342b4 100644 --- a/services/automation/mgmt/2015-10-31/automation/jobschedule.go +++ b/services/automation/mgmt/2015-10-31/automation/jobschedule.go @@ -37,7 +37,8 @@ func NewJobScheduleClient(subscriptionID string) JobScheduleClient { return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. +// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/jobstream.go b/services/automation/mgmt/2015-10-31/automation/jobstream.go index cf30ab7523ea..01b620e10400 100644 --- a/services/automation/mgmt/2015-10-31/automation/jobstream.go +++ b/services/automation/mgmt/2015-10-31/automation/jobstream.go @@ -36,7 +36,8 @@ func NewJobStreamClient(subscriptionID string) JobStreamClient { return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. +// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/keys.go b/services/automation/mgmt/2015-10-31/automation/keys.go index bd3e6559f126..4133e9eedfaa 100644 --- a/services/automation/mgmt/2015-10-31/automation/keys.go +++ b/services/automation/mgmt/2015-10-31/automation/keys.go @@ -36,7 +36,8 @@ func NewKeysClient(subscriptionID string) KeysClient { return NewKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewKeysClientWithBaseURI creates an instance of the KeysClient client. +// 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)} } diff --git a/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go b/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go index 7d8fd8777256..bab0e15bb61d 100644 --- a/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go +++ b/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go @@ -36,7 +36,8 @@ func NewLinkedWorkspaceClient(subscriptionID string) LinkedWorkspaceClient { return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client. +// NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) LinkedWorkspaceClient { return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/module.go b/services/automation/mgmt/2015-10-31/automation/module.go index caa351e6ad51..4baa74c91a06 100644 --- a/services/automation/mgmt/2015-10-31/automation/module.go +++ b/services/automation/mgmt/2015-10-31/automation/module.go @@ -36,7 +36,8 @@ func NewModuleClient(subscriptionID string) ModuleClient { return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewModuleClientWithBaseURI creates an instance of the ModuleClient client. +// NewModuleClientWithBaseURI creates an instance of the ModuleClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleClient { return ModuleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/nodereports.go b/services/automation/mgmt/2015-10-31/automation/nodereports.go index 034184bc193c..d3f94b7801b0 100644 --- a/services/automation/mgmt/2015-10-31/automation/nodereports.go +++ b/services/automation/mgmt/2015-10-31/automation/nodereports.go @@ -36,7 +36,8 @@ func NewNodeReportsClient(subscriptionID string) NodeReportsClient { return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. +// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go b/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go index 04f4391df47b..fd8db25c5d94 100644 --- a/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go +++ b/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go @@ -36,7 +36,8 @@ func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient { return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. +// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/operations.go b/services/automation/mgmt/2015-10-31/automation/operations.go index 12d40bbde3a7..3231c683b9ff 100644 --- a/services/automation/mgmt/2015-10-31/automation/operations.go +++ b/services/automation/mgmt/2015-10-31/automation/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/automation/mgmt/2015-10-31/automation/runbook.go b/services/automation/mgmt/2015-10-31/automation/runbook.go index 3549cafc513c..76d01fded9d3 100644 --- a/services/automation/mgmt/2015-10-31/automation/runbook.go +++ b/services/automation/mgmt/2015-10-31/automation/runbook.go @@ -36,7 +36,8 @@ func NewRunbookClient(subscriptionID string) RunbookClient { return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookClientWithBaseURI creates an instance of the RunbookClient client. +// NewRunbookClientWithBaseURI creates an instance of the RunbookClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookClient { return RunbookClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/runbookdraft.go b/services/automation/mgmt/2015-10-31/automation/runbookdraft.go index 85161bb635f8..0fff2f7f986e 100644 --- a/services/automation/mgmt/2015-10-31/automation/runbookdraft.go +++ b/services/automation/mgmt/2015-10-31/automation/runbookdraft.go @@ -37,7 +37,8 @@ func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. +// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/schedule.go b/services/automation/mgmt/2015-10-31/automation/schedule.go index 0f68168c8073..58b68d34a5cc 100644 --- a/services/automation/mgmt/2015-10-31/automation/schedule.go +++ b/services/automation/mgmt/2015-10-31/automation/schedule.go @@ -36,7 +36,8 @@ func NewScheduleClient(subscriptionID string) ScheduleClient { return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. +// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/statistics.go b/services/automation/mgmt/2015-10-31/automation/statistics.go index 625062d6ebd2..e31ab7362b6f 100644 --- a/services/automation/mgmt/2015-10-31/automation/statistics.go +++ b/services/automation/mgmt/2015-10-31/automation/statistics.go @@ -36,7 +36,8 @@ func NewStatisticsClient(subscriptionID string) StatisticsClient { return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. +// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/testjob.go b/services/automation/mgmt/2015-10-31/automation/testjob.go index 26908a87daec..e7e509cb433d 100644 --- a/services/automation/mgmt/2015-10-31/automation/testjob.go +++ b/services/automation/mgmt/2015-10-31/automation/testjob.go @@ -36,7 +36,8 @@ func NewTestJobClient(subscriptionID string) TestJobClient { return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobClientWithBaseURI creates an instance of the TestJobClient client. +// NewTestJobClientWithBaseURI creates an instance of the TestJobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobClient { return TestJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/testjobstreams.go b/services/automation/mgmt/2015-10-31/automation/testjobstreams.go index 67dbb8106d46..53ccfdda7f24 100644 --- a/services/automation/mgmt/2015-10-31/automation/testjobstreams.go +++ b/services/automation/mgmt/2015-10-31/automation/testjobstreams.go @@ -36,7 +36,8 @@ func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient { return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. +// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/usages.go b/services/automation/mgmt/2015-10-31/automation/usages.go index ee694d481382..1c98177cb82d 100644 --- a/services/automation/mgmt/2015-10-31/automation/usages.go +++ b/services/automation/mgmt/2015-10-31/automation/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/automation/mgmt/2015-10-31/automation/variable.go b/services/automation/mgmt/2015-10-31/automation/variable.go index dc1b92a10af0..95fb899f1e2b 100644 --- a/services/automation/mgmt/2015-10-31/automation/variable.go +++ b/services/automation/mgmt/2015-10-31/automation/variable.go @@ -36,7 +36,8 @@ func NewVariableClient(subscriptionID string) VariableClient { return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVariableClientWithBaseURI creates an instance of the VariableClient client. +// NewVariableClientWithBaseURI creates an instance of the VariableClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/automation/mgmt/2015-10-31/automation/webhook.go b/services/automation/mgmt/2015-10-31/automation/webhook.go index 0f01dd04f534..96c30c2a20f4 100644 --- a/services/automation/mgmt/2015-10-31/automation/webhook.go +++ b/services/automation/mgmt/2015-10-31/automation/webhook.go @@ -36,7 +36,8 @@ func NewWebhookClient(subscriptionID string) WebhookClient { return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhookClientWithBaseURI creates an instance of the WebhookClient client. +// NewWebhookClientWithBaseURI creates an instance of the WebhookClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookClient { return WebhookClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/azurestackapi/interfaces.go b/services/azurestack/mgmt/2017-06-01/azurestack/azurestackapi/interfaces.go index 234e74542d71..fc5433e57c40 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/azurestackapi/interfaces.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/azurestackapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result azurestack.OperationListPage, err error) + ListComplete(ctx context.Context) (result azurestack.OperationListIterator, err error) } var _ OperationsClientAPI = (*azurestack.OperationsClient)(nil) @@ -36,6 +37,7 @@ type ProductsClientAPI interface { GetProduct(ctx context.Context, resourceGroup string, registrationName string, productName string, deviceConfiguration *azurestack.DeviceConfiguration) (result azurestack.Product, err error) GetProducts(ctx context.Context, resourceGroup string, registrationName string, deviceConfiguration *azurestack.DeviceConfiguration) (result azurestack.ProductList, err error) List(ctx context.Context, resourceGroup string, registrationName string) (result azurestack.ProductListPage, err error) + ListComplete(ctx context.Context, resourceGroup string, registrationName string) (result azurestack.ProductListIterator, err error) ListDetails(ctx context.Context, resourceGroup string, registrationName string, productName string) (result azurestack.ExtendedProduct, err error) UploadLog(ctx context.Context, resourceGroup string, registrationName string, productName string, marketplaceProductLogUpdate *azurestack.MarketplaceProductLogUpdate) (result azurestack.ProductLog, err error) } @@ -49,6 +51,7 @@ type RegistrationsClientAPI interface { Get(ctx context.Context, resourceGroup string, registrationName string) (result azurestack.Registration, err error) GetActivationKey(ctx context.Context, resourceGroup string, registrationName string) (result azurestack.ActivationKeyResult, err error) List(ctx context.Context, resourceGroup string) (result azurestack.RegistrationListPage, err error) + ListComplete(ctx context.Context, resourceGroup string) (result azurestack.RegistrationListIterator, err error) Update(ctx context.Context, resourceGroup string, registrationName string, tokenParameter azurestack.RegistrationParameter) (result azurestack.Registration, err error) } @@ -60,6 +63,7 @@ type CustomerSubscriptionsClientAPI interface { Delete(ctx context.Context, resourceGroup string, registrationName string, customerSubscriptionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroup string, registrationName string, customerSubscriptionName string) (result azurestack.CustomerSubscription, err error) List(ctx context.Context, resourceGroup string, registrationName string) (result azurestack.CustomerSubscriptionListPage, err error) + ListComplete(ctx context.Context, resourceGroup string, registrationName string) (result azurestack.CustomerSubscriptionListIterator, err error) } var _ CustomerSubscriptionsClientAPI = (*azurestack.CustomerSubscriptionsClient)(nil) diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/client.go b/services/azurestack/mgmt/2017-06-01/azurestack/client.go index 75daa5088749..7d435b657d07 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/client.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/customersubscriptions.go b/services/azurestack/mgmt/2017-06-01/azurestack/customersubscriptions.go index 717063a881f4..aa744ef38414 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/customersubscriptions.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/customersubscriptions.go @@ -35,7 +35,9 @@ func NewCustomerSubscriptionsClient(subscriptionID string) CustomerSubscriptions return NewCustomerSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomerSubscriptionsClientWithBaseURI creates an instance of the CustomerSubscriptionsClient client. +// NewCustomerSubscriptionsClientWithBaseURI creates an instance of the CustomerSubscriptionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCustomerSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) CustomerSubscriptionsClient { return CustomerSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/operations.go b/services/azurestack/mgmt/2017-06-01/azurestack/operations.go index dba9f13d0a83..68ad2e75c28e 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/operations.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/products.go b/services/azurestack/mgmt/2017-06-01/azurestack/products.go index 624df470f930..b45195fe10ce 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/products.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/products.go @@ -35,7 +35,8 @@ func NewProductsClient(subscriptionID string) ProductsClient { return NewProductsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductsClientWithBaseURI creates an instance of the ProductsClient client. +// NewProductsClientWithBaseURI creates an instance of the ProductsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductsClientWithBaseURI(baseURI string, subscriptionID string) ProductsClient { return ProductsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/registrations.go b/services/azurestack/mgmt/2017-06-01/azurestack/registrations.go index d41f4c78ccaf..fdeaf367a663 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/registrations.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/registrations.go @@ -36,7 +36,8 @@ func NewRegistrationsClient(subscriptionID string) RegistrationsClient { return NewRegistrationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistrationsClientWithBaseURI creates an instance of the RegistrationsClient client. +// NewRegistrationsClientWithBaseURI creates an instance of the RegistrationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistrationsClientWithBaseURI(baseURI string, subscriptionID string) RegistrationsClient { return RegistrationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/2017-05-01.5.0/batch/account.go b/services/batch/2017-05-01.5.0/batch/account.go index d3c002fae958..2fe9febe0614 100644 --- a/services/batch/2017-05-01.5.0/batch/account.go +++ b/services/batch/2017-05-01.5.0/batch/account.go @@ -38,7 +38,8 @@ func NewAccountClient() AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string) AccountClient { return AccountClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2017-05-01.5.0/batch/application.go b/services/batch/2017-05-01.5.0/batch/application.go index e2dbdd724301..5032082eed41 100644 --- a/services/batch/2017-05-01.5.0/batch/application.go +++ b/services/batch/2017-05-01.5.0/batch/application.go @@ -38,7 +38,8 @@ func NewApplicationClient() ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2017-05-01.5.0/batch/batchapi/interfaces.go b/services/batch/2017-05-01.5.0/batch/batchapi/interfaces.go index 0f577f3cc3cd..2dc4781d8341 100644 --- a/services/batch/2017-05-01.5.0/batch/batchapi/interfaces.go +++ b/services/batch/2017-05-01.5.0/batch/batchapi/interfaces.go @@ -29,6 +29,7 @@ import ( type ApplicationClientAPI interface { Get(ctx context.Context, applicationID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationSummary, err error) List(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultIterator, err error) } var _ ApplicationClientAPI = (*batch.ApplicationClient)(nil) @@ -44,7 +45,9 @@ type PoolClientAPI interface { Get(ctx context.Context, poolID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudPool, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultIterator, err error) ListUsageMetrics(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultPage, err error) + ListUsageMetricsComplete(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultIterator, err error) Patch(ctx context.Context, poolID string, poolPatchParameter batch.PoolPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) RemoveNodes(ctx context.Context, poolID string, nodeRemoveParameter batch.NodeRemoveParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Resize(ctx context.Context, poolID string, poolResizeParameter batch.PoolResizeParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -58,6 +61,7 @@ var _ PoolClientAPI = (*batch.PoolClient)(nil) // AccountClientAPI contains the set of methods on the AccountClient type. type AccountClientAPI interface { ListNodeAgentSkus(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultPage, err error) + ListNodeAgentSkusComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultIterator, err error) } var _ AccountClientAPI = (*batch.AccountClient)(nil) @@ -71,8 +75,11 @@ type JobClientAPI interface { Get(ctx context.Context, jobID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJob, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.JobStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListFromJobSchedule(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListFromJobScheduleComplete(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListPreparationAndReleaseTaskStatus(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultPage, err error) + ListPreparationAndReleaseTaskStatusComplete(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultIterator, err error) Patch(ctx context.Context, jobID string, jobPatchParameter batch.JobPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, jobTerminateParameter *batch.JobTerminateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobID string, jobUpdateParameter batch.JobUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -87,6 +94,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, thumbprintAlgorithm string, thumbprint string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, thumbprintAlgorithm string, thumbprint string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.Certificate, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultIterator, err error) } var _ CertificateClientAPI = (*batch.CertificateClient)(nil) @@ -100,7 +108,9 @@ type FileClientAPI interface { GetPropertiesFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) GetPropertiesFromTask(ctx context.Context, jobID string, taskID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) ListFromComputeNode(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromComputeNodeComplete(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) ListFromTask(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromTaskComplete(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) } var _ FileClientAPI = (*batch.FileClient)(nil) @@ -114,6 +124,7 @@ type JobScheduleClientAPI interface { Exists(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobScheduleID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJobSchedule, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultIterator, err error) Patch(ctx context.Context, jobScheduleID string, jobSchedulePatchParameter batch.JobSchedulePatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobScheduleID string, jobScheduleUpdateParameter batch.JobScheduleUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -128,6 +139,7 @@ type TaskClientAPI interface { Delete(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobID string, taskID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudTask, err error) List(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultPage, err error) + ListComplete(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultIterator, err error) ListSubtasks(ctx context.Context, jobID string, taskID string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListSubtasksResult, err error) Reactivate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -146,6 +158,7 @@ type ComputeNodeClientAPI interface { GetRemoteDesktop(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ReadCloser, err error) GetRemoteLoginSettings(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeGetRemoteLoginSettingsResult, err error) List(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultPage, err error) + ListComplete(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultIterator, err error) Reboot(ctx context.Context, poolID string, nodeID string, nodeRebootParameter *batch.NodeRebootParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Reimage(ctx context.Context, poolID string, nodeID string, nodeReimageParameter *batch.NodeReimageParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) UpdateUser(ctx context.Context, poolID string, nodeID string, userName string, nodeUpdateUserParameter batch.NodeUpdateUserParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) diff --git a/services/batch/2017-05-01.5.0/batch/certificate.go b/services/batch/2017-05-01.5.0/batch/certificate.go index 85f3e4f71da2..9e5ec641ed23 100644 --- a/services/batch/2017-05-01.5.0/batch/certificate.go +++ b/services/batch/2017-05-01.5.0/batch/certificate.go @@ -38,7 +38,8 @@ func NewCertificateClient() CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2017-05-01.5.0/batch/client.go b/services/batch/2017-05-01.5.0/batch/client.go index a1a30e37bd8b..e2b4a45ea31c 100644 --- a/services/batch/2017-05-01.5.0/batch/client.go +++ b/services/batch/2017-05-01.5.0/batch/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/batch/2017-05-01.5.0/batch/computenode.go b/services/batch/2017-05-01.5.0/batch/computenode.go index ce6ae5de0e4c..d79c01cb6bba 100644 --- a/services/batch/2017-05-01.5.0/batch/computenode.go +++ b/services/batch/2017-05-01.5.0/batch/computenode.go @@ -38,7 +38,8 @@ func NewComputeNodeClient() ComputeNodeClient { return NewComputeNodeClientWithBaseURI(DefaultBaseURI) } -// NewComputeNodeClientWithBaseURI creates an instance of the ComputeNodeClient client. +// NewComputeNodeClientWithBaseURI creates an instance of the ComputeNodeClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewComputeNodeClientWithBaseURI(baseURI string) ComputeNodeClient { return ComputeNodeClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2017-05-01.5.0/batch/file.go b/services/batch/2017-05-01.5.0/batch/file.go index b8d21613ecb0..c28160cfa6c7 100644 --- a/services/batch/2017-05-01.5.0/batch/file.go +++ b/services/batch/2017-05-01.5.0/batch/file.go @@ -38,7 +38,8 @@ func NewFileClient() FileClient { return NewFileClientWithBaseURI(DefaultBaseURI) } -// NewFileClientWithBaseURI creates an instance of the FileClient client. +// NewFileClientWithBaseURI creates an instance of the FileClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileClientWithBaseURI(baseURI string) FileClient { return FileClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2017-05-01.5.0/batch/job.go b/services/batch/2017-05-01.5.0/batch/job.go index dd3bd52ef97b..1e1e3c08ba40 100644 --- a/services/batch/2017-05-01.5.0/batch/job.go +++ b/services/batch/2017-05-01.5.0/batch/job.go @@ -38,7 +38,8 @@ func NewJobClient() JobClient { return NewJobClientWithBaseURI(DefaultBaseURI) } -// NewJobClientWithBaseURI creates an instance of the JobClient client. +// NewJobClientWithBaseURI creates an instance of the JobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobClientWithBaseURI(baseURI string) JobClient { return JobClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2017-05-01.5.0/batch/jobschedule.go b/services/batch/2017-05-01.5.0/batch/jobschedule.go index 6a8e6d923fa1..4fd89af1551d 100644 --- a/services/batch/2017-05-01.5.0/batch/jobschedule.go +++ b/services/batch/2017-05-01.5.0/batch/jobschedule.go @@ -38,7 +38,8 @@ func NewJobScheduleClient() JobScheduleClient { return NewJobScheduleClientWithBaseURI(DefaultBaseURI) } -// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. +// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobScheduleClientWithBaseURI(baseURI string) JobScheduleClient { return JobScheduleClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2017-05-01.5.0/batch/pool.go b/services/batch/2017-05-01.5.0/batch/pool.go index 452b2eb51b2a..e751f3bcb2d3 100644 --- a/services/batch/2017-05-01.5.0/batch/pool.go +++ b/services/batch/2017-05-01.5.0/batch/pool.go @@ -38,7 +38,8 @@ func NewPoolClient() PoolClient { return NewPoolClientWithBaseURI(DefaultBaseURI) } -// NewPoolClientWithBaseURI creates an instance of the PoolClient client. +// NewPoolClientWithBaseURI creates an instance of the PoolClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoolClientWithBaseURI(baseURI string) PoolClient { return PoolClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2017-05-01.5.0/batch/task.go b/services/batch/2017-05-01.5.0/batch/task.go index 952e40f77128..75f20d96abeb 100644 --- a/services/batch/2017-05-01.5.0/batch/task.go +++ b/services/batch/2017-05-01.5.0/batch/task.go @@ -38,7 +38,8 @@ func NewTaskClient() TaskClient { return NewTaskClientWithBaseURI(DefaultBaseURI) } -// NewTaskClientWithBaseURI creates an instance of the TaskClient client. +// NewTaskClientWithBaseURI creates an instance of the TaskClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTaskClientWithBaseURI(baseURI string) TaskClient { return TaskClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/account.go b/services/batch/2018-03-01.6.1/batch/account.go index edb36a6a87b4..619c4377a393 100644 --- a/services/batch/2018-03-01.6.1/batch/account.go +++ b/services/batch/2018-03-01.6.1/batch/account.go @@ -38,7 +38,8 @@ func NewAccountClient() AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string) AccountClient { return AccountClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/application.go b/services/batch/2018-03-01.6.1/batch/application.go index 86675b114d19..91dbb5dd3efd 100644 --- a/services/batch/2018-03-01.6.1/batch/application.go +++ b/services/batch/2018-03-01.6.1/batch/application.go @@ -38,7 +38,8 @@ func NewApplicationClient() ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/batchapi/interfaces.go b/services/batch/2018-03-01.6.1/batch/batchapi/interfaces.go index fb26e001952e..d2e8ac649892 100644 --- a/services/batch/2018-03-01.6.1/batch/batchapi/interfaces.go +++ b/services/batch/2018-03-01.6.1/batch/batchapi/interfaces.go @@ -29,6 +29,7 @@ import ( type ApplicationClientAPI interface { Get(ctx context.Context, applicationID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationSummary, err error) List(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultIterator, err error) } var _ ApplicationClientAPI = (*batch.ApplicationClient)(nil) @@ -44,7 +45,9 @@ type PoolClientAPI interface { Get(ctx context.Context, poolID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudPool, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultIterator, err error) ListUsageMetrics(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultPage, err error) + ListUsageMetricsComplete(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultIterator, err error) Patch(ctx context.Context, poolID string, poolPatchParameter batch.PoolPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) RemoveNodes(ctx context.Context, poolID string, nodeRemoveParameter batch.NodeRemoveParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Resize(ctx context.Context, poolID string, poolResizeParameter batch.PoolResizeParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -58,7 +61,9 @@ var _ PoolClientAPI = (*batch.PoolClient)(nil) // AccountClientAPI contains the set of methods on the AccountClient type. type AccountClientAPI interface { ListNodeAgentSkus(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultPage, err error) + ListNodeAgentSkusComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultIterator, err error) ListPoolNodeCounts(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultPage, err error) + ListPoolNodeCountsComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultIterator, err error) } var _ AccountClientAPI = (*batch.AccountClient)(nil) @@ -73,8 +78,11 @@ type JobClientAPI interface { GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.JobStatistics, err error) GetTaskCounts(ctx context.Context, jobID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.TaskCounts, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListFromJobSchedule(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListFromJobScheduleComplete(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListPreparationAndReleaseTaskStatus(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultPage, err error) + ListPreparationAndReleaseTaskStatusComplete(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultIterator, err error) Patch(ctx context.Context, jobID string, jobPatchParameter batch.JobPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, jobTerminateParameter *batch.JobTerminateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobID string, jobUpdateParameter batch.JobUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -89,6 +97,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, thumbprintAlgorithm string, thumbprint string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, thumbprintAlgorithm string, thumbprint string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.Certificate, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultIterator, err error) } var _ CertificateClientAPI = (*batch.CertificateClient)(nil) @@ -102,7 +111,9 @@ type FileClientAPI interface { GetPropertiesFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) GetPropertiesFromTask(ctx context.Context, jobID string, taskID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) ListFromComputeNode(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromComputeNodeComplete(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) ListFromTask(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromTaskComplete(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) } var _ FileClientAPI = (*batch.FileClient)(nil) @@ -116,6 +127,7 @@ type JobScheduleClientAPI interface { Exists(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobScheduleID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJobSchedule, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultIterator, err error) Patch(ctx context.Context, jobScheduleID string, jobSchedulePatchParameter batch.JobSchedulePatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobScheduleID string, jobScheduleUpdateParameter batch.JobScheduleUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -130,6 +142,7 @@ type TaskClientAPI interface { Delete(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobID string, taskID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudTask, err error) List(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultPage, err error) + ListComplete(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultIterator, err error) ListSubtasks(ctx context.Context, jobID string, taskID string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListSubtasksResult, err error) Reactivate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -148,6 +161,7 @@ type ComputeNodeClientAPI interface { GetRemoteDesktop(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ReadCloser, err error) GetRemoteLoginSettings(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeGetRemoteLoginSettingsResult, err error) List(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultPage, err error) + ListComplete(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultIterator, err error) Reboot(ctx context.Context, poolID string, nodeID string, nodeRebootParameter *batch.NodeRebootParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Reimage(ctx context.Context, poolID string, nodeID string, nodeReimageParameter *batch.NodeReimageParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) UpdateUser(ctx context.Context, poolID string, nodeID string, userName string, nodeUpdateUserParameter batch.NodeUpdateUserParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) diff --git a/services/batch/2018-03-01.6.1/batch/certificate.go b/services/batch/2018-03-01.6.1/batch/certificate.go index 16e734491cd0..7b885143826d 100644 --- a/services/batch/2018-03-01.6.1/batch/certificate.go +++ b/services/batch/2018-03-01.6.1/batch/certificate.go @@ -38,7 +38,8 @@ func NewCertificateClient() CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/client.go b/services/batch/2018-03-01.6.1/batch/client.go index 8d83ec300e21..b0c237d5b9a0 100644 --- a/services/batch/2018-03-01.6.1/batch/client.go +++ b/services/batch/2018-03-01.6.1/batch/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/batch/2018-03-01.6.1/batch/computenode.go b/services/batch/2018-03-01.6.1/batch/computenode.go index 9828ead4092b..2f7e731a5aa9 100644 --- a/services/batch/2018-03-01.6.1/batch/computenode.go +++ b/services/batch/2018-03-01.6.1/batch/computenode.go @@ -38,7 +38,8 @@ func NewComputeNodeClient() ComputeNodeClient { return NewComputeNodeClientWithBaseURI(DefaultBaseURI) } -// NewComputeNodeClientWithBaseURI creates an instance of the ComputeNodeClient client. +// NewComputeNodeClientWithBaseURI creates an instance of the ComputeNodeClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewComputeNodeClientWithBaseURI(baseURI string) ComputeNodeClient { return ComputeNodeClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/file.go b/services/batch/2018-03-01.6.1/batch/file.go index e378d16ec68e..b693a26020cc 100644 --- a/services/batch/2018-03-01.6.1/batch/file.go +++ b/services/batch/2018-03-01.6.1/batch/file.go @@ -38,7 +38,8 @@ func NewFileClient() FileClient { return NewFileClientWithBaseURI(DefaultBaseURI) } -// NewFileClientWithBaseURI creates an instance of the FileClient client. +// NewFileClientWithBaseURI creates an instance of the FileClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileClientWithBaseURI(baseURI string) FileClient { return FileClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/job.go b/services/batch/2018-03-01.6.1/batch/job.go index 1b57fa49399b..7a8b2d57f13c 100644 --- a/services/batch/2018-03-01.6.1/batch/job.go +++ b/services/batch/2018-03-01.6.1/batch/job.go @@ -38,7 +38,8 @@ func NewJobClient() JobClient { return NewJobClientWithBaseURI(DefaultBaseURI) } -// NewJobClientWithBaseURI creates an instance of the JobClient client. +// NewJobClientWithBaseURI creates an instance of the JobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobClientWithBaseURI(baseURI string) JobClient { return JobClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/jobschedule.go b/services/batch/2018-03-01.6.1/batch/jobschedule.go index 3cfaeb61c5b1..8d9bc0d42a11 100644 --- a/services/batch/2018-03-01.6.1/batch/jobschedule.go +++ b/services/batch/2018-03-01.6.1/batch/jobschedule.go @@ -38,7 +38,8 @@ func NewJobScheduleClient() JobScheduleClient { return NewJobScheduleClientWithBaseURI(DefaultBaseURI) } -// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. +// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobScheduleClientWithBaseURI(baseURI string) JobScheduleClient { return JobScheduleClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/pool.go b/services/batch/2018-03-01.6.1/batch/pool.go index 5dfe0b67ce1e..525ee30e1d28 100644 --- a/services/batch/2018-03-01.6.1/batch/pool.go +++ b/services/batch/2018-03-01.6.1/batch/pool.go @@ -38,7 +38,8 @@ func NewPoolClient() PoolClient { return NewPoolClientWithBaseURI(DefaultBaseURI) } -// NewPoolClientWithBaseURI creates an instance of the PoolClient client. +// NewPoolClientWithBaseURI creates an instance of the PoolClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoolClientWithBaseURI(baseURI string) PoolClient { return PoolClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-03-01.6.1/batch/task.go b/services/batch/2018-03-01.6.1/batch/task.go index 82f4441465d0..29a071f7dbe2 100644 --- a/services/batch/2018-03-01.6.1/batch/task.go +++ b/services/batch/2018-03-01.6.1/batch/task.go @@ -38,7 +38,8 @@ func NewTaskClient() TaskClient { return NewTaskClientWithBaseURI(DefaultBaseURI) } -// NewTaskClientWithBaseURI creates an instance of the TaskClient client. +// NewTaskClientWithBaseURI creates an instance of the TaskClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTaskClientWithBaseURI(baseURI string) TaskClient { return TaskClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/account.go b/services/batch/2018-08-01.7.0/batch/account.go index 7ab45fa50d03..28ff95b95085 100644 --- a/services/batch/2018-08-01.7.0/batch/account.go +++ b/services/batch/2018-08-01.7.0/batch/account.go @@ -38,7 +38,8 @@ func NewAccountClient() AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string) AccountClient { return AccountClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/application.go b/services/batch/2018-08-01.7.0/batch/application.go index c0fbe942412d..46658f3587d7 100644 --- a/services/batch/2018-08-01.7.0/batch/application.go +++ b/services/batch/2018-08-01.7.0/batch/application.go @@ -38,7 +38,8 @@ func NewApplicationClient() ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/batchapi/interfaces.go b/services/batch/2018-08-01.7.0/batch/batchapi/interfaces.go index b4b1db596303..af422a514b69 100644 --- a/services/batch/2018-08-01.7.0/batch/batchapi/interfaces.go +++ b/services/batch/2018-08-01.7.0/batch/batchapi/interfaces.go @@ -29,6 +29,7 @@ import ( type ApplicationClientAPI interface { Get(ctx context.Context, applicationID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationSummary, err error) List(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultIterator, err error) } var _ ApplicationClientAPI = (*batch.ApplicationClient)(nil) @@ -44,7 +45,9 @@ type PoolClientAPI interface { Get(ctx context.Context, poolID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudPool, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultIterator, err error) ListUsageMetrics(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultPage, err error) + ListUsageMetricsComplete(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultIterator, err error) Patch(ctx context.Context, poolID string, poolPatchParameter batch.PoolPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) RemoveNodes(ctx context.Context, poolID string, nodeRemoveParameter batch.NodeRemoveParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Resize(ctx context.Context, poolID string, poolResizeParameter batch.PoolResizeParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -58,7 +61,9 @@ var _ PoolClientAPI = (*batch.PoolClient)(nil) // AccountClientAPI contains the set of methods on the AccountClient type. type AccountClientAPI interface { ListNodeAgentSkus(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultPage, err error) + ListNodeAgentSkusComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultIterator, err error) ListPoolNodeCounts(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultPage, err error) + ListPoolNodeCountsComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultIterator, err error) } var _ AccountClientAPI = (*batch.AccountClient)(nil) @@ -73,8 +78,11 @@ type JobClientAPI interface { GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.JobStatistics, err error) GetTaskCounts(ctx context.Context, jobID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.TaskCounts, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListFromJobSchedule(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListFromJobScheduleComplete(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListPreparationAndReleaseTaskStatus(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultPage, err error) + ListPreparationAndReleaseTaskStatusComplete(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultIterator, err error) Patch(ctx context.Context, jobID string, jobPatchParameter batch.JobPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, jobTerminateParameter *batch.JobTerminateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobID string, jobUpdateParameter batch.JobUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -89,6 +97,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, thumbprintAlgorithm string, thumbprint string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, thumbprintAlgorithm string, thumbprint string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.Certificate, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultIterator, err error) } var _ CertificateClientAPI = (*batch.CertificateClient)(nil) @@ -102,7 +111,9 @@ type FileClientAPI interface { GetPropertiesFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) GetPropertiesFromTask(ctx context.Context, jobID string, taskID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) ListFromComputeNode(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromComputeNodeComplete(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) ListFromTask(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromTaskComplete(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) } var _ FileClientAPI = (*batch.FileClient)(nil) @@ -116,6 +127,7 @@ type JobScheduleClientAPI interface { Exists(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobScheduleID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJobSchedule, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultIterator, err error) Patch(ctx context.Context, jobScheduleID string, jobSchedulePatchParameter batch.JobSchedulePatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobScheduleID string, jobScheduleUpdateParameter batch.JobScheduleUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -130,6 +142,7 @@ type TaskClientAPI interface { Delete(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobID string, taskID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudTask, err error) List(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultPage, err error) + ListComplete(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultIterator, err error) ListSubtasks(ctx context.Context, jobID string, taskID string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListSubtasksResult, err error) Reactivate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -148,6 +161,7 @@ type ComputeNodeClientAPI interface { GetRemoteDesktop(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ReadCloser, err error) GetRemoteLoginSettings(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeGetRemoteLoginSettingsResult, err error) List(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultPage, err error) + ListComplete(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultIterator, err error) Reboot(ctx context.Context, poolID string, nodeID string, nodeRebootParameter *batch.NodeRebootParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Reimage(ctx context.Context, poolID string, nodeID string, nodeReimageParameter *batch.NodeReimageParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) UpdateUser(ctx context.Context, poolID string, nodeID string, userName string, nodeUpdateUserParameter batch.NodeUpdateUserParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) diff --git a/services/batch/2018-08-01.7.0/batch/certificate.go b/services/batch/2018-08-01.7.0/batch/certificate.go index dfb6f117b43f..d604e4e1bada 100644 --- a/services/batch/2018-08-01.7.0/batch/certificate.go +++ b/services/batch/2018-08-01.7.0/batch/certificate.go @@ -38,7 +38,8 @@ func NewCertificateClient() CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/client.go b/services/batch/2018-08-01.7.0/batch/client.go index e9da58a30faf..c771cc51e5f5 100644 --- a/services/batch/2018-08-01.7.0/batch/client.go +++ b/services/batch/2018-08-01.7.0/batch/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/batch/2018-08-01.7.0/batch/computenode.go b/services/batch/2018-08-01.7.0/batch/computenode.go index c61564688921..d885b0815172 100644 --- a/services/batch/2018-08-01.7.0/batch/computenode.go +++ b/services/batch/2018-08-01.7.0/batch/computenode.go @@ -38,7 +38,8 @@ func NewComputeNodeClient() ComputeNodeClient { return NewComputeNodeClientWithBaseURI(DefaultBaseURI) } -// NewComputeNodeClientWithBaseURI creates an instance of the ComputeNodeClient client. +// NewComputeNodeClientWithBaseURI creates an instance of the ComputeNodeClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewComputeNodeClientWithBaseURI(baseURI string) ComputeNodeClient { return ComputeNodeClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/file.go b/services/batch/2018-08-01.7.0/batch/file.go index c394426516b7..c68b63c678d7 100644 --- a/services/batch/2018-08-01.7.0/batch/file.go +++ b/services/batch/2018-08-01.7.0/batch/file.go @@ -38,7 +38,8 @@ func NewFileClient() FileClient { return NewFileClientWithBaseURI(DefaultBaseURI) } -// NewFileClientWithBaseURI creates an instance of the FileClient client. +// NewFileClientWithBaseURI creates an instance of the FileClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileClientWithBaseURI(baseURI string) FileClient { return FileClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/job.go b/services/batch/2018-08-01.7.0/batch/job.go index acbf6873bd30..0fb87adbe0e8 100644 --- a/services/batch/2018-08-01.7.0/batch/job.go +++ b/services/batch/2018-08-01.7.0/batch/job.go @@ -38,7 +38,8 @@ func NewJobClient() JobClient { return NewJobClientWithBaseURI(DefaultBaseURI) } -// NewJobClientWithBaseURI creates an instance of the JobClient client. +// NewJobClientWithBaseURI creates an instance of the JobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobClientWithBaseURI(baseURI string) JobClient { return JobClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/jobschedule.go b/services/batch/2018-08-01.7.0/batch/jobschedule.go index 58bb1f68e79e..0ce053c5fd84 100644 --- a/services/batch/2018-08-01.7.0/batch/jobschedule.go +++ b/services/batch/2018-08-01.7.0/batch/jobschedule.go @@ -38,7 +38,8 @@ func NewJobScheduleClient() JobScheduleClient { return NewJobScheduleClientWithBaseURI(DefaultBaseURI) } -// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. +// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobScheduleClientWithBaseURI(baseURI string) JobScheduleClient { return JobScheduleClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/pool.go b/services/batch/2018-08-01.7.0/batch/pool.go index 5fa620471266..cfef3f60751f 100644 --- a/services/batch/2018-08-01.7.0/batch/pool.go +++ b/services/batch/2018-08-01.7.0/batch/pool.go @@ -38,7 +38,8 @@ func NewPoolClient() PoolClient { return NewPoolClientWithBaseURI(DefaultBaseURI) } -// NewPoolClientWithBaseURI creates an instance of the PoolClient client. +// NewPoolClientWithBaseURI creates an instance of the PoolClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoolClientWithBaseURI(baseURI string) PoolClient { return PoolClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-08-01.7.0/batch/task.go b/services/batch/2018-08-01.7.0/batch/task.go index 8466ad1cab37..3a721117a749 100644 --- a/services/batch/2018-08-01.7.0/batch/task.go +++ b/services/batch/2018-08-01.7.0/batch/task.go @@ -38,7 +38,8 @@ func NewTaskClient() TaskClient { return NewTaskClientWithBaseURI(DefaultBaseURI) } -// NewTaskClientWithBaseURI creates an instance of the TaskClient client. +// NewTaskClientWithBaseURI creates an instance of the TaskClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTaskClientWithBaseURI(baseURI string) TaskClient { return TaskClient{NewWithBaseURI(baseURI)} } diff --git a/services/batch/2018-12-01.8.0/batch/batchapi/interfaces.go b/services/batch/2018-12-01.8.0/batch/batchapi/interfaces.go index e4781d6e4ece..8289e8a78a7f 100644 --- a/services/batch/2018-12-01.8.0/batch/batchapi/interfaces.go +++ b/services/batch/2018-12-01.8.0/batch/batchapi/interfaces.go @@ -29,6 +29,7 @@ import ( type ApplicationClientAPI interface { Get(ctx context.Context, applicationID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationSummary, err error) List(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultIterator, err error) } var _ ApplicationClientAPI = (*batch.ApplicationClient)(nil) @@ -44,7 +45,9 @@ type PoolClientAPI interface { Get(ctx context.Context, poolID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudPool, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultIterator, err error) ListUsageMetrics(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultPage, err error) + ListUsageMetricsComplete(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultIterator, err error) Patch(ctx context.Context, poolID string, poolPatchParameter batch.PoolPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) RemoveNodes(ctx context.Context, poolID string, nodeRemoveParameter batch.NodeRemoveParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Resize(ctx context.Context, poolID string, poolResizeParameter batch.PoolResizeParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -57,7 +60,9 @@ var _ PoolClientAPI = (*batch.PoolClient)(nil) // AccountClientAPI contains the set of methods on the AccountClient type. type AccountClientAPI interface { ListNodeAgentSkus(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultPage, err error) + ListNodeAgentSkusComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListNodeAgentSkusResultIterator, err error) ListPoolNodeCounts(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultPage, err error) + ListPoolNodeCountsComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultIterator, err error) } var _ AccountClientAPI = (*batch.AccountClient)(nil) @@ -72,8 +77,11 @@ type JobClientAPI interface { GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.JobStatistics, err error) GetTaskCounts(ctx context.Context, jobID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.TaskCounts, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListFromJobSchedule(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListFromJobScheduleComplete(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListPreparationAndReleaseTaskStatus(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultPage, err error) + ListPreparationAndReleaseTaskStatusComplete(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultIterator, err error) Patch(ctx context.Context, jobID string, jobPatchParameter batch.JobPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, jobTerminateParameter *batch.JobTerminateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobID string, jobUpdateParameter batch.JobUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -88,6 +96,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, thumbprintAlgorithm string, thumbprint string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, thumbprintAlgorithm string, thumbprint string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.Certificate, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultIterator, err error) } var _ CertificateClientAPI = (*batch.CertificateClient)(nil) @@ -101,7 +110,9 @@ type FileClientAPI interface { GetPropertiesFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) GetPropertiesFromTask(ctx context.Context, jobID string, taskID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) ListFromComputeNode(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromComputeNodeComplete(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) ListFromTask(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromTaskComplete(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) } var _ FileClientAPI = (*batch.FileClient)(nil) @@ -115,6 +126,7 @@ type JobScheduleClientAPI interface { Exists(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobScheduleID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJobSchedule, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultIterator, err error) Patch(ctx context.Context, jobScheduleID string, jobSchedulePatchParameter batch.JobSchedulePatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobScheduleID string, jobScheduleUpdateParameter batch.JobScheduleUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -129,6 +141,7 @@ type TaskClientAPI interface { Delete(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobID string, taskID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudTask, err error) List(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultPage, err error) + ListComplete(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultIterator, err error) ListSubtasks(ctx context.Context, jobID string, taskID string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListSubtasksResult, err error) Reactivate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -147,6 +160,7 @@ type ComputeNodeClientAPI interface { GetRemoteDesktop(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ReadCloser, err error) GetRemoteLoginSettings(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeGetRemoteLoginSettingsResult, err error) List(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultPage, err error) + ListComplete(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultIterator, err error) Reboot(ctx context.Context, poolID string, nodeID string, nodeRebootParameter *batch.NodeRebootParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Reimage(ctx context.Context, poolID string, nodeID string, nodeReimageParameter *batch.NodeReimageParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) UpdateUser(ctx context.Context, poolID string, nodeID string, userName string, nodeUpdateUserParameter batch.NodeUpdateUserParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) diff --git a/services/batch/2019-06-01.9.0/batch/batchapi/interfaces.go b/services/batch/2019-06-01.9.0/batch/batchapi/interfaces.go index 7f0fb40210cc..13462d848c48 100644 --- a/services/batch/2019-06-01.9.0/batch/batchapi/interfaces.go +++ b/services/batch/2019-06-01.9.0/batch/batchapi/interfaces.go @@ -29,6 +29,7 @@ import ( type ApplicationClientAPI interface { Get(ctx context.Context, applicationID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationSummary, err error) List(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultIterator, err error) } var _ ApplicationClientAPI = (*batch.ApplicationClient)(nil) @@ -44,7 +45,9 @@ type PoolClientAPI interface { Get(ctx context.Context, poolID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudPool, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultIterator, err error) ListUsageMetrics(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultPage, err error) + ListUsageMetricsComplete(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultIterator, err error) Patch(ctx context.Context, poolID string, poolPatchParameter batch.PoolPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) RemoveNodes(ctx context.Context, poolID string, nodeRemoveParameter batch.NodeRemoveParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Resize(ctx context.Context, poolID string, poolResizeParameter batch.PoolResizeParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -57,7 +60,9 @@ var _ PoolClientAPI = (*batch.PoolClient)(nil) // AccountClientAPI contains the set of methods on the AccountClient type. type AccountClientAPI interface { ListPoolNodeCounts(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultPage, err error) + ListPoolNodeCountsComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultIterator, err error) ListSupportedImages(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListSupportedImagesResultPage, err error) + ListSupportedImagesComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListSupportedImagesResultIterator, err error) } var _ AccountClientAPI = (*batch.AccountClient)(nil) @@ -72,8 +77,11 @@ type JobClientAPI interface { GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.JobStatistics, err error) GetTaskCounts(ctx context.Context, jobID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.TaskCounts, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListFromJobSchedule(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListFromJobScheduleComplete(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListPreparationAndReleaseTaskStatus(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultPage, err error) + ListPreparationAndReleaseTaskStatusComplete(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultIterator, err error) Patch(ctx context.Context, jobID string, jobPatchParameter batch.JobPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, jobTerminateParameter *batch.JobTerminateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobID string, jobUpdateParameter batch.JobUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -88,6 +96,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, thumbprintAlgorithm string, thumbprint string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, thumbprintAlgorithm string, thumbprint string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.Certificate, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultIterator, err error) } var _ CertificateClientAPI = (*batch.CertificateClient)(nil) @@ -101,7 +110,9 @@ type FileClientAPI interface { GetPropertiesFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) GetPropertiesFromTask(ctx context.Context, jobID string, taskID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) ListFromComputeNode(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromComputeNodeComplete(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) ListFromTask(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromTaskComplete(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) } var _ FileClientAPI = (*batch.FileClient)(nil) @@ -115,6 +126,7 @@ type JobScheduleClientAPI interface { Exists(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobScheduleID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJobSchedule, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultIterator, err error) Patch(ctx context.Context, jobScheduleID string, jobSchedulePatchParameter batch.JobSchedulePatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobScheduleID string, jobScheduleUpdateParameter batch.JobScheduleUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -129,6 +141,7 @@ type TaskClientAPI interface { Delete(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobID string, taskID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudTask, err error) List(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultPage, err error) + ListComplete(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultIterator, err error) ListSubtasks(ctx context.Context, jobID string, taskID string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListSubtasksResult, err error) Reactivate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -147,6 +160,7 @@ type ComputeNodeClientAPI interface { GetRemoteDesktop(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ReadCloser, err error) GetRemoteLoginSettings(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeGetRemoteLoginSettingsResult, err error) List(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultPage, err error) + ListComplete(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultIterator, err error) Reboot(ctx context.Context, poolID string, nodeID string, nodeRebootParameter *batch.NodeRebootParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Reimage(ctx context.Context, poolID string, nodeID string, nodeReimageParameter *batch.NodeReimageParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) UpdateUser(ctx context.Context, poolID string, nodeID string, userName string, nodeUpdateUserParameter batch.NodeUpdateUserParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) diff --git a/services/batch/2019-08-01.10.0/batch/batchapi/interfaces.go b/services/batch/2019-08-01.10.0/batch/batchapi/interfaces.go index 210ca82a278a..357b6db48e76 100644 --- a/services/batch/2019-08-01.10.0/batch/batchapi/interfaces.go +++ b/services/batch/2019-08-01.10.0/batch/batchapi/interfaces.go @@ -29,6 +29,7 @@ import ( type ApplicationClientAPI interface { Get(ctx context.Context, applicationID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationSummary, err error) List(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ApplicationListResultIterator, err error) } var _ ApplicationClientAPI = (*batch.ApplicationClient)(nil) @@ -44,7 +45,9 @@ type PoolClientAPI interface { Get(ctx context.Context, poolID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudPool, err error) GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolStatistics, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudPoolListResultIterator, err error) ListUsageMetrics(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultPage, err error) + ListUsageMetricsComplete(ctx context.Context, startTime *date.Time, endTime *date.Time, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolListUsageMetricsResultIterator, err error) Patch(ctx context.Context, poolID string, poolPatchParameter batch.PoolPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) RemoveNodes(ctx context.Context, poolID string, nodeRemoveParameter batch.NodeRemoveParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Resize(ctx context.Context, poolID string, poolResizeParameter batch.PoolResizeParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -57,7 +60,9 @@ var _ PoolClientAPI = (*batch.PoolClient)(nil) // AccountClientAPI contains the set of methods on the AccountClient type. type AccountClientAPI interface { ListPoolNodeCounts(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultPage, err error) + ListPoolNodeCountsComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.PoolNodeCountsListResultIterator, err error) ListSupportedImages(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListSupportedImagesResultPage, err error) + ListSupportedImagesComplete(ctx context.Context, filter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.AccountListSupportedImagesResultIterator, err error) } var _ AccountClientAPI = (*batch.AccountClient)(nil) @@ -72,8 +77,11 @@ type JobClientAPI interface { GetAllLifetimeStatistics(ctx context.Context, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.JobStatistics, err error) GetTaskCounts(ctx context.Context, jobID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.TaskCounts, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListFromJobSchedule(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultPage, err error) + ListFromJobScheduleComplete(ctx context.Context, jobScheduleID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListResultIterator, err error) ListPreparationAndReleaseTaskStatus(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultPage, err error) + ListPreparationAndReleaseTaskStatusComplete(ctx context.Context, jobID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobListPreparationAndReleaseTaskStatusResultIterator, err error) Patch(ctx context.Context, jobID string, jobPatchParameter batch.JobPatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, jobTerminateParameter *batch.JobTerminateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobID string, jobUpdateParameter batch.JobUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -88,6 +96,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, thumbprintAlgorithm string, thumbprint string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, thumbprintAlgorithm string, thumbprint string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.Certificate, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CertificateListResultIterator, err error) } var _ CertificateClientAPI = (*batch.CertificateClient)(nil) @@ -101,7 +110,9 @@ type FileClientAPI interface { GetPropertiesFromComputeNode(ctx context.Context, poolID string, nodeID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) GetPropertiesFromTask(ctx context.Context, jobID string, taskID string, filePath string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) ListFromComputeNode(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromComputeNodeComplete(ctx context.Context, poolID string, nodeID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) ListFromTask(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultPage, err error) + ListFromTaskComplete(ctx context.Context, jobID string, taskID string, filter string, recursive *bool, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.NodeFileListResultIterator, err error) } var _ FileClientAPI = (*batch.FileClient)(nil) @@ -115,6 +126,7 @@ type JobScheduleClientAPI interface { Exists(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobScheduleID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudJobSchedule, err error) List(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudJobScheduleListResultIterator, err error) Patch(ctx context.Context, jobScheduleID string, jobSchedulePatchParameter batch.JobSchedulePatchParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobScheduleID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Update(ctx context.Context, jobScheduleID string, jobScheduleUpdateParameter batch.JobScheduleUpdateParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -129,6 +141,7 @@ type TaskClientAPI interface { Delete(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Get(ctx context.Context, jobID string, taskID string, selectParameter string, expand string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result batch.CloudTask, err error) List(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultPage, err error) + ListComplete(ctx context.Context, jobID string, filter string, selectParameter string, expand string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListResultIterator, err error) ListSubtasks(ctx context.Context, jobID string, taskID string, selectParameter string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.CloudTaskListSubtasksResult, err error) Reactivate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) Terminate(ctx context.Context, jobID string, taskID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123, ifMatch string, ifNoneMatch string, ifModifiedSince *date.TimeRFC1123, ifUnmodifiedSince *date.TimeRFC1123) (result autorest.Response, err error) @@ -147,6 +160,7 @@ type ComputeNodeClientAPI interface { GetRemoteDesktop(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ReadCloser, err error) GetRemoteLoginSettings(ctx context.Context, poolID string, nodeID string, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeGetRemoteLoginSettingsResult, err error) List(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultPage, err error) + ListComplete(ctx context.Context, poolID string, filter string, selectParameter string, maxResults *int32, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result batch.ComputeNodeListResultIterator, err error) Reboot(ctx context.Context, poolID string, nodeID string, nodeRebootParameter *batch.NodeRebootParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) Reimage(ctx context.Context, poolID string, nodeID string, nodeReimageParameter *batch.NodeReimageParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) UpdateUser(ctx context.Context, poolID string, nodeID string, userName string, nodeUpdateUserParameter batch.NodeUpdateUserParameter, timeout *int32, clientRequestID *uuid.UUID, returnClientRequestID *bool, ocpDate *date.TimeRFC1123) (result autorest.Response, err error) diff --git a/services/batch/mgmt/2015-12-01/batch/account.go b/services/batch/mgmt/2015-12-01/batch/account.go index 1c6f68103dad..54f5e1ee83e8 100644 --- a/services/batch/mgmt/2015-12-01/batch/account.go +++ b/services/batch/mgmt/2015-12-01/batch/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2015-12-01/batch/application.go b/services/batch/mgmt/2015-12-01/batch/application.go index 8c48f2e0d6e5..125fb9058ad0 100644 --- a/services/batch/mgmt/2015-12-01/batch/application.go +++ b/services/batch/mgmt/2015-12-01/batch/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2015-12-01/batch/applicationpackage.go b/services/batch/mgmt/2015-12-01/batch/applicationpackage.go index 1577a999a7b2..bffd3d355fbd 100644 --- a/services/batch/mgmt/2015-12-01/batch/applicationpackage.go +++ b/services/batch/mgmt/2015-12-01/batch/applicationpackage.go @@ -36,7 +36,9 @@ func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client. +// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient { return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2015-12-01/batch/batchapi/interfaces.go b/services/batch/mgmt/2015-12-01/batch/batchapi/interfaces.go index de92a83cd270..decee97b4462 100644 --- a/services/batch/mgmt/2015-12-01/batch/batchapi/interfaces.go +++ b/services/batch/mgmt/2015-12-01/batch/batchapi/interfaces.go @@ -30,7 +30,9 @@ type AccountClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result batch.Account, err error) GetKeys(ctx context.Context, resourceGroupName string, accountName string) (result batch.AccountKeys, err error) List(ctx context.Context) (result batch.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result batch.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result batch.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result batch.AccountListResultIterator, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountRegenerateKeyParameters) (result batch.AccountKeys, err error) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountUpdateParameters) (result batch.Account, err error) @@ -54,6 +56,7 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result batch.Application, err error) List(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, applicationID string, parameters batch.UpdateApplicationParameters) (result autorest.Response, err error) } diff --git a/services/batch/mgmt/2015-12-01/batch/client.go b/services/batch/mgmt/2015-12-01/batch/client.go index a188931eaee9..edad78ff6b30 100644 --- a/services/batch/mgmt/2015-12-01/batch/client.go +++ b/services/batch/mgmt/2015-12-01/batch/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batch/mgmt/2015-12-01/batch/location.go b/services/batch/mgmt/2015-12-01/batch/location.go index 799023c189e4..eb7a6fc155ae 100644 --- a/services/batch/mgmt/2015-12-01/batch/location.go +++ b/services/batch/mgmt/2015-12-01/batch/location.go @@ -35,7 +35,8 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-01-01/batch/account.go b/services/batch/mgmt/2017-01-01/batch/account.go index 733c13f02551..5ee114ebeed7 100644 --- a/services/batch/mgmt/2017-01-01/batch/account.go +++ b/services/batch/mgmt/2017-01-01/batch/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-01-01/batch/application.go b/services/batch/mgmt/2017-01-01/batch/application.go index 33a06bc067e3..aa5b4c976bbc 100644 --- a/services/batch/mgmt/2017-01-01/batch/application.go +++ b/services/batch/mgmt/2017-01-01/batch/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-01-01/batch/applicationpackage.go b/services/batch/mgmt/2017-01-01/batch/applicationpackage.go index c771644a2cfb..4076ca56e840 100644 --- a/services/batch/mgmt/2017-01-01/batch/applicationpackage.go +++ b/services/batch/mgmt/2017-01-01/batch/applicationpackage.go @@ -36,7 +36,9 @@ func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client. +// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient { return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-01-01/batch/batchapi/interfaces.go b/services/batch/mgmt/2017-01-01/batch/batchapi/interfaces.go index 2cdd8693ae3c..d13cca3548a1 100644 --- a/services/batch/mgmt/2017-01-01/batch/batchapi/interfaces.go +++ b/services/batch/mgmt/2017-01-01/batch/batchapi/interfaces.go @@ -30,7 +30,9 @@ type AccountClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result batch.Account, err error) GetKeys(ctx context.Context, resourceGroupName string, accountName string) (result batch.AccountKeys, err error) List(ctx context.Context) (result batch.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result batch.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result batch.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result batch.AccountListResultIterator, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountRegenerateKeyParameters) (result batch.AccountKeys, err error) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountUpdateParameters) (result batch.Account, err error) @@ -54,6 +56,7 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result batch.Application, err error) List(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, applicationID string, parameters batch.UpdateApplicationParameters) (result autorest.Response, err error) } diff --git a/services/batch/mgmt/2017-01-01/batch/client.go b/services/batch/mgmt/2017-01-01/batch/client.go index 63b880991b30..f859cbd8b9b0 100644 --- a/services/batch/mgmt/2017-01-01/batch/client.go +++ b/services/batch/mgmt/2017-01-01/batch/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batch/mgmt/2017-01-01/batch/location.go b/services/batch/mgmt/2017-01-01/batch/location.go index c66f533fc5c2..9d1bf7001601 100644 --- a/services/batch/mgmt/2017-01-01/batch/location.go +++ b/services/batch/mgmt/2017-01-01/batch/location.go @@ -35,7 +35,8 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-05-01/batch/account.go b/services/batch/mgmt/2017-05-01/batch/account.go index 8dfc82bbf16c..11a1014b41a2 100644 --- a/services/batch/mgmt/2017-05-01/batch/account.go +++ b/services/batch/mgmt/2017-05-01/batch/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-05-01/batch/application.go b/services/batch/mgmt/2017-05-01/batch/application.go index 6f6d8abbeef0..9a82eb515676 100644 --- a/services/batch/mgmt/2017-05-01/batch/application.go +++ b/services/batch/mgmt/2017-05-01/batch/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-05-01/batch/applicationpackage.go b/services/batch/mgmt/2017-05-01/batch/applicationpackage.go index 1b07f392b509..6404b2f33285 100644 --- a/services/batch/mgmt/2017-05-01/batch/applicationpackage.go +++ b/services/batch/mgmt/2017-05-01/batch/applicationpackage.go @@ -36,7 +36,9 @@ func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client. +// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient { return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-05-01/batch/batchapi/interfaces.go b/services/batch/mgmt/2017-05-01/batch/batchapi/interfaces.go index 9d86b1b3549c..32ead36d0d4a 100644 --- a/services/batch/mgmt/2017-05-01/batch/batchapi/interfaces.go +++ b/services/batch/mgmt/2017-05-01/batch/batchapi/interfaces.go @@ -30,7 +30,9 @@ type AccountClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result batch.Account, err error) GetKeys(ctx context.Context, resourceGroupName string, accountName string) (result batch.AccountKeys, err error) List(ctx context.Context) (result batch.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result batch.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result batch.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result batch.AccountListResultIterator, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountRegenerateKeyParameters) (result batch.AccountKeys, err error) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountUpdateParameters) (result batch.Account, err error) @@ -54,6 +56,7 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result batch.Application, err error) List(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, applicationID string, parameters batch.ApplicationUpdateParameters) (result autorest.Response, err error) } @@ -70,6 +73,7 @@ var _ LocationClientAPI = (*batch.LocationClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result batch.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result batch.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*batch.OperationsClient)(nil) diff --git a/services/batch/mgmt/2017-05-01/batch/client.go b/services/batch/mgmt/2017-05-01/batch/client.go index 2040ee2be037..c5c680918e98 100644 --- a/services/batch/mgmt/2017-05-01/batch/client.go +++ b/services/batch/mgmt/2017-05-01/batch/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batch/mgmt/2017-05-01/batch/location.go b/services/batch/mgmt/2017-05-01/batch/location.go index 8eb10bbc0300..94551f503b5a 100644 --- a/services/batch/mgmt/2017-05-01/batch/location.go +++ b/services/batch/mgmt/2017-05-01/batch/location.go @@ -36,7 +36,8 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-05-01/batch/operations.go b/services/batch/mgmt/2017-05-01/batch/operations.go index 453eba5e9146..9c960ee00f94 100644 --- a/services/batch/mgmt/2017-05-01/batch/operations.go +++ b/services/batch/mgmt/2017-05-01/batch/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/batch/mgmt/2017-09-01/batch/account.go b/services/batch/mgmt/2017-09-01/batch/account.go index 086f3c78e245..698433afafc5 100644 --- a/services/batch/mgmt/2017-09-01/batch/account.go +++ b/services/batch/mgmt/2017-09-01/batch/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-09-01/batch/application.go b/services/batch/mgmt/2017-09-01/batch/application.go index de1843d218ed..ff77d2846509 100644 --- a/services/batch/mgmt/2017-09-01/batch/application.go +++ b/services/batch/mgmt/2017-09-01/batch/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-09-01/batch/applicationpackage.go b/services/batch/mgmt/2017-09-01/batch/applicationpackage.go index 389902035f38..2987921420ee 100644 --- a/services/batch/mgmt/2017-09-01/batch/applicationpackage.go +++ b/services/batch/mgmt/2017-09-01/batch/applicationpackage.go @@ -36,7 +36,9 @@ func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client. +// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient { return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-09-01/batch/batchapi/interfaces.go b/services/batch/mgmt/2017-09-01/batch/batchapi/interfaces.go index 67749a1181aa..59c3a562b427 100644 --- a/services/batch/mgmt/2017-09-01/batch/batchapi/interfaces.go +++ b/services/batch/mgmt/2017-09-01/batch/batchapi/interfaces.go @@ -30,7 +30,9 @@ type AccountClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result batch.Account, err error) GetKeys(ctx context.Context, resourceGroupName string, accountName string) (result batch.AccountKeys, err error) List(ctx context.Context) (result batch.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result batch.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result batch.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result batch.AccountListResultIterator, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountRegenerateKeyParameters) (result batch.AccountKeys, err error) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountUpdateParameters) (result batch.Account, err error) @@ -54,6 +56,7 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result batch.Application, err error) List(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, applicationID string, parameters batch.ApplicationUpdateParameters) (result autorest.Response, err error) } @@ -70,6 +73,7 @@ var _ LocationClientAPI = (*batch.LocationClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result batch.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result batch.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*batch.OperationsClient)(nil) @@ -81,6 +85,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result batch.CertificateDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result batch.Certificate, err error) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListCertificatesResultPage, err error) + ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListCertificatesResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, certificateName string, parameters batch.CertificateCreateOrUpdateParameters, ifMatch string) (result batch.Certificate, err error) } @@ -93,6 +98,7 @@ type PoolClientAPI interface { DisableAutoScale(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListPoolsResultPage, err error) + ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListPoolsResultIterator, err error) StopResize(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) Update(ctx context.Context, resourceGroupName string, accountName string, poolName string, parameters batch.Pool, ifMatch string) (result batch.Pool, err error) } diff --git a/services/batch/mgmt/2017-09-01/batch/certificate.go b/services/batch/mgmt/2017-09-01/batch/certificate.go index 7ddf1f5aba7f..42012389a00c 100644 --- a/services/batch/mgmt/2017-09-01/batch/certificate.go +++ b/services/batch/mgmt/2017-09-01/batch/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-09-01/batch/client.go b/services/batch/mgmt/2017-09-01/batch/client.go index 0b2df1e39a3e..d389b534ecce 100644 --- a/services/batch/mgmt/2017-09-01/batch/client.go +++ b/services/batch/mgmt/2017-09-01/batch/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batch/mgmt/2017-09-01/batch/location.go b/services/batch/mgmt/2017-09-01/batch/location.go index 15a3235330ae..6c4c48b22440 100644 --- a/services/batch/mgmt/2017-09-01/batch/location.go +++ b/services/batch/mgmt/2017-09-01/batch/location.go @@ -36,7 +36,8 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2017-09-01/batch/operations.go b/services/batch/mgmt/2017-09-01/batch/operations.go index 711076f035fa..f35b12fa5f2f 100644 --- a/services/batch/mgmt/2017-09-01/batch/operations.go +++ b/services/batch/mgmt/2017-09-01/batch/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/batch/mgmt/2017-09-01/batch/pool.go b/services/batch/mgmt/2017-09-01/batch/pool.go index 1775f2dca8a8..833329a7e5f1 100644 --- a/services/batch/mgmt/2017-09-01/batch/pool.go +++ b/services/batch/mgmt/2017-09-01/batch/pool.go @@ -36,7 +36,8 @@ func NewPoolClient(subscriptionID string) PoolClient { return NewPoolClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolClientWithBaseURI creates an instance of the PoolClient client. +// NewPoolClientWithBaseURI creates an instance of the PoolClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoolClientWithBaseURI(baseURI string, subscriptionID string) PoolClient { return PoolClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2018-12-01/batch/account.go b/services/batch/mgmt/2018-12-01/batch/account.go index e64ef0921785..ed2eac286484 100644 --- a/services/batch/mgmt/2018-12-01/batch/account.go +++ b/services/batch/mgmt/2018-12-01/batch/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2018-12-01/batch/application.go b/services/batch/mgmt/2018-12-01/batch/application.go index 6273fbf6e5fc..8cf766d635ce 100644 --- a/services/batch/mgmt/2018-12-01/batch/application.go +++ b/services/batch/mgmt/2018-12-01/batch/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2018-12-01/batch/applicationpackage.go b/services/batch/mgmt/2018-12-01/batch/applicationpackage.go index c793f7002c1c..b44840f69c95 100644 --- a/services/batch/mgmt/2018-12-01/batch/applicationpackage.go +++ b/services/batch/mgmt/2018-12-01/batch/applicationpackage.go @@ -36,7 +36,9 @@ func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client. +// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient { return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2018-12-01/batch/batchapi/interfaces.go b/services/batch/mgmt/2018-12-01/batch/batchapi/interfaces.go index a56a4ec4b0f1..4d8589d45ec3 100644 --- a/services/batch/mgmt/2018-12-01/batch/batchapi/interfaces.go +++ b/services/batch/mgmt/2018-12-01/batch/batchapi/interfaces.go @@ -30,7 +30,9 @@ type AccountClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result batch.Account, err error) GetKeys(ctx context.Context, resourceGroupName string, accountName string) (result batch.AccountKeys, err error) List(ctx context.Context) (result batch.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result batch.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result batch.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result batch.AccountListResultIterator, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountRegenerateKeyParameters) (result batch.AccountKeys, err error) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountUpdateParameters) (result batch.Account, err error) @@ -45,6 +47,7 @@ type ApplicationPackageClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string) (result batch.ApplicationPackage, err error) List(ctx context.Context, resourceGroupName string, accountName string, applicationName string, maxresults *int32) (result batch.ListApplicationPackagesResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, applicationName string, maxresults *int32) (result batch.ListApplicationPackagesResultIterator, err error) } var _ ApplicationPackageClientAPI = (*batch.ApplicationPackageClient)(nil) @@ -55,6 +58,7 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationName string) (result batch.Application, err error) List(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, applicationName string, parameters batch.Application) (result batch.Application, err error) } @@ -71,6 +75,7 @@ var _ LocationClientAPI = (*batch.LocationClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result batch.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result batch.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*batch.OperationsClient)(nil) @@ -82,6 +87,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result batch.CertificateDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result batch.Certificate, err error) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListCertificatesResultPage, err error) + ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListCertificatesResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, certificateName string, parameters batch.CertificateCreateOrUpdateParameters, ifMatch string) (result batch.Certificate, err error) } @@ -94,6 +100,7 @@ type PoolClientAPI interface { DisableAutoScale(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListPoolsResultPage, err error) + ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListPoolsResultIterator, err error) StopResize(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) Update(ctx context.Context, resourceGroupName string, accountName string, poolName string, parameters batch.Pool, ifMatch string) (result batch.Pool, err error) } diff --git a/services/batch/mgmt/2018-12-01/batch/certificate.go b/services/batch/mgmt/2018-12-01/batch/certificate.go index 73a8a1489c7a..379506db60f3 100644 --- a/services/batch/mgmt/2018-12-01/batch/certificate.go +++ b/services/batch/mgmt/2018-12-01/batch/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2018-12-01/batch/client.go b/services/batch/mgmt/2018-12-01/batch/client.go index 90fd26ca233d..e19fd513b0ae 100644 --- a/services/batch/mgmt/2018-12-01/batch/client.go +++ b/services/batch/mgmt/2018-12-01/batch/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batch/mgmt/2018-12-01/batch/location.go b/services/batch/mgmt/2018-12-01/batch/location.go index 25f3a0d546ff..de53ce116c8b 100644 --- a/services/batch/mgmt/2018-12-01/batch/location.go +++ b/services/batch/mgmt/2018-12-01/batch/location.go @@ -36,7 +36,8 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2018-12-01/batch/operations.go b/services/batch/mgmt/2018-12-01/batch/operations.go index ba0cc0f1e666..7726829e7a97 100644 --- a/services/batch/mgmt/2018-12-01/batch/operations.go +++ b/services/batch/mgmt/2018-12-01/batch/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/batch/mgmt/2018-12-01/batch/pool.go b/services/batch/mgmt/2018-12-01/batch/pool.go index 4344f2d77d05..5be82be770d5 100644 --- a/services/batch/mgmt/2018-12-01/batch/pool.go +++ b/services/batch/mgmt/2018-12-01/batch/pool.go @@ -36,7 +36,8 @@ func NewPoolClient(subscriptionID string) PoolClient { return NewPoolClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolClientWithBaseURI creates an instance of the PoolClient client. +// NewPoolClientWithBaseURI creates an instance of the PoolClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoolClientWithBaseURI(baseURI string, subscriptionID string) PoolClient { return PoolClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-04-01/batch/account.go b/services/batch/mgmt/2019-04-01/batch/account.go index 0afd6f3a2483..c1c198098492 100644 --- a/services/batch/mgmt/2019-04-01/batch/account.go +++ b/services/batch/mgmt/2019-04-01/batch/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-04-01/batch/application.go b/services/batch/mgmt/2019-04-01/batch/application.go index ddcb2af587a6..c77ed1dbf8b6 100644 --- a/services/batch/mgmt/2019-04-01/batch/application.go +++ b/services/batch/mgmt/2019-04-01/batch/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-04-01/batch/applicationpackage.go b/services/batch/mgmt/2019-04-01/batch/applicationpackage.go index baaec2bf1d2a..4a942c288839 100644 --- a/services/batch/mgmt/2019-04-01/batch/applicationpackage.go +++ b/services/batch/mgmt/2019-04-01/batch/applicationpackage.go @@ -36,7 +36,9 @@ func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client. +// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient { return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-04-01/batch/batchapi/interfaces.go b/services/batch/mgmt/2019-04-01/batch/batchapi/interfaces.go index 0983780843db..9d7885dc87c8 100644 --- a/services/batch/mgmt/2019-04-01/batch/batchapi/interfaces.go +++ b/services/batch/mgmt/2019-04-01/batch/batchapi/interfaces.go @@ -30,7 +30,9 @@ type AccountClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result batch.Account, err error) GetKeys(ctx context.Context, resourceGroupName string, accountName string) (result batch.AccountKeys, err error) List(ctx context.Context) (result batch.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result batch.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result batch.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result batch.AccountListResultIterator, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountRegenerateKeyParameters) (result batch.AccountKeys, err error) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountUpdateParameters) (result batch.Account, err error) @@ -45,6 +47,7 @@ type ApplicationPackageClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string) (result batch.ApplicationPackage, err error) List(ctx context.Context, resourceGroupName string, accountName string, applicationName string, maxresults *int32) (result batch.ListApplicationPackagesResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, applicationName string, maxresults *int32) (result batch.ListApplicationPackagesResultIterator, err error) } var _ ApplicationPackageClientAPI = (*batch.ApplicationPackageClient)(nil) @@ -55,6 +58,7 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationName string) (result batch.Application, err error) List(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, applicationName string, parameters batch.Application) (result batch.Application, err error) } @@ -71,6 +75,7 @@ var _ LocationClientAPI = (*batch.LocationClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result batch.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result batch.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*batch.OperationsClient)(nil) @@ -82,6 +87,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result batch.CertificateDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result batch.Certificate, err error) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListCertificatesResultPage, err error) + ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListCertificatesResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, certificateName string, parameters batch.CertificateCreateOrUpdateParameters, ifMatch string) (result batch.Certificate, err error) } @@ -94,6 +100,7 @@ type PoolClientAPI interface { DisableAutoScale(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListPoolsResultPage, err error) + ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListPoolsResultIterator, err error) StopResize(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) Update(ctx context.Context, resourceGroupName string, accountName string, poolName string, parameters batch.Pool, ifMatch string) (result batch.Pool, err error) } diff --git a/services/batch/mgmt/2019-04-01/batch/certificate.go b/services/batch/mgmt/2019-04-01/batch/certificate.go index b094d67a1ce6..1f443067c8c1 100644 --- a/services/batch/mgmt/2019-04-01/batch/certificate.go +++ b/services/batch/mgmt/2019-04-01/batch/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-04-01/batch/client.go b/services/batch/mgmt/2019-04-01/batch/client.go index c403d3fdf09b..9b88599d7f3c 100644 --- a/services/batch/mgmt/2019-04-01/batch/client.go +++ b/services/batch/mgmt/2019-04-01/batch/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batch/mgmt/2019-04-01/batch/location.go b/services/batch/mgmt/2019-04-01/batch/location.go index aef886d13542..3af02f7bdc91 100644 --- a/services/batch/mgmt/2019-04-01/batch/location.go +++ b/services/batch/mgmt/2019-04-01/batch/location.go @@ -36,7 +36,8 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-04-01/batch/operations.go b/services/batch/mgmt/2019-04-01/batch/operations.go index 1718b9367596..a4781eb6482a 100644 --- a/services/batch/mgmt/2019-04-01/batch/operations.go +++ b/services/batch/mgmt/2019-04-01/batch/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/batch/mgmt/2019-04-01/batch/pool.go b/services/batch/mgmt/2019-04-01/batch/pool.go index d0e54464b95e..220e6daa78ff 100644 --- a/services/batch/mgmt/2019-04-01/batch/pool.go +++ b/services/batch/mgmt/2019-04-01/batch/pool.go @@ -36,7 +36,8 @@ func NewPoolClient(subscriptionID string) PoolClient { return NewPoolClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolClientWithBaseURI creates an instance of the PoolClient client. +// NewPoolClientWithBaseURI creates an instance of the PoolClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoolClientWithBaseURI(baseURI string, subscriptionID string) PoolClient { return PoolClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-08-01/batch/account.go b/services/batch/mgmt/2019-08-01/batch/account.go index f565ba8f7ecb..e32b2a59e413 100644 --- a/services/batch/mgmt/2019-08-01/batch/account.go +++ b/services/batch/mgmt/2019-08-01/batch/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-08-01/batch/application.go b/services/batch/mgmt/2019-08-01/batch/application.go index 7f1d2bf3e27b..86c16f1e0d61 100644 --- a/services/batch/mgmt/2019-08-01/batch/application.go +++ b/services/batch/mgmt/2019-08-01/batch/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-08-01/batch/applicationpackage.go b/services/batch/mgmt/2019-08-01/batch/applicationpackage.go index b4611bcdad58..f3f799688362 100644 --- a/services/batch/mgmt/2019-08-01/batch/applicationpackage.go +++ b/services/batch/mgmt/2019-08-01/batch/applicationpackage.go @@ -36,7 +36,9 @@ func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client. +// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient { return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-08-01/batch/batchapi/interfaces.go b/services/batch/mgmt/2019-08-01/batch/batchapi/interfaces.go index d57a7236370f..c2463588294d 100644 --- a/services/batch/mgmt/2019-08-01/batch/batchapi/interfaces.go +++ b/services/batch/mgmt/2019-08-01/batch/batchapi/interfaces.go @@ -30,7 +30,9 @@ type AccountClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result batch.Account, err error) GetKeys(ctx context.Context, resourceGroupName string, accountName string) (result batch.AccountKeys, err error) List(ctx context.Context) (result batch.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result batch.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result batch.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result batch.AccountListResultIterator, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountRegenerateKeyParameters) (result batch.AccountKeys, err error) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters batch.AccountUpdateParameters) (result batch.Account, err error) @@ -45,6 +47,7 @@ type ApplicationPackageClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationName string, versionName string) (result batch.ApplicationPackage, err error) List(ctx context.Context, resourceGroupName string, accountName string, applicationName string, maxresults *int32) (result batch.ListApplicationPackagesResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, applicationName string, maxresults *int32) (result batch.ListApplicationPackagesResultIterator, err error) } var _ ApplicationPackageClientAPI = (*batch.ApplicationPackageClient)(nil) @@ -55,6 +58,7 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, applicationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, applicationName string) (result batch.Application, err error) List(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result batch.ListApplicationsResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, applicationName string, parameters batch.Application) (result batch.Application, err error) } @@ -71,6 +75,7 @@ var _ LocationClientAPI = (*batch.LocationClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result batch.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result batch.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*batch.OperationsClient)(nil) @@ -82,6 +87,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result batch.CertificateDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result batch.Certificate, err error) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListCertificatesResultPage, err error) + ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListCertificatesResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, certificateName string, parameters batch.CertificateCreateOrUpdateParameters, ifMatch string) (result batch.Certificate, err error) } @@ -94,6 +100,7 @@ type PoolClientAPI interface { DisableAutoScale(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListPoolsResultPage, err error) + ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result batch.ListPoolsResultIterator, err error) StopResize(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result batch.Pool, err error) Update(ctx context.Context, resourceGroupName string, accountName string, poolName string, parameters batch.Pool, ifMatch string) (result batch.Pool, err error) } diff --git a/services/batch/mgmt/2019-08-01/batch/certificate.go b/services/batch/mgmt/2019-08-01/batch/certificate.go index c3ae0c699876..da2b37a78653 100644 --- a/services/batch/mgmt/2019-08-01/batch/certificate.go +++ b/services/batch/mgmt/2019-08-01/batch/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-08-01/batch/client.go b/services/batch/mgmt/2019-08-01/batch/client.go index ce20ef8148f4..e5610d773e6c 100644 --- a/services/batch/mgmt/2019-08-01/batch/client.go +++ b/services/batch/mgmt/2019-08-01/batch/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batch/mgmt/2019-08-01/batch/location.go b/services/batch/mgmt/2019-08-01/batch/location.go index 16a584ad4fd0..68423867b535 100644 --- a/services/batch/mgmt/2019-08-01/batch/location.go +++ b/services/batch/mgmt/2019-08-01/batch/location.go @@ -36,7 +36,8 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batch/mgmt/2019-08-01/batch/operations.go b/services/batch/mgmt/2019-08-01/batch/operations.go index ba276f32e2d2..f827db9d8658 100644 --- a/services/batch/mgmt/2019-08-01/batch/operations.go +++ b/services/batch/mgmt/2019-08-01/batch/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/batch/mgmt/2019-08-01/batch/pool.go b/services/batch/mgmt/2019-08-01/batch/pool.go index 9e960d28c858..86b1de6a9d1d 100644 --- a/services/batch/mgmt/2019-08-01/batch/pool.go +++ b/services/batch/mgmt/2019-08-01/batch/pool.go @@ -36,7 +36,8 @@ func NewPoolClient(subscriptionID string) PoolClient { return NewPoolClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolClientWithBaseURI creates an instance of the PoolClient client. +// NewPoolClientWithBaseURI creates an instance of the PoolClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoolClientWithBaseURI(baseURI string, subscriptionID string) PoolClient { return PoolClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batchai/mgmt/2018-03-01/batchai/batchaiapi/interfaces.go b/services/batchai/mgmt/2018-03-01/batchai/batchaiapi/interfaces.go index 702f6e00b33f..2031373abb10 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/batchaiapi/interfaces.go +++ b/services/batchai/mgmt/2018-03-01/batchai/batchaiapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result batchai.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result batchai.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*batchai.OperationsClient)(nil) @@ -32,6 +33,7 @@ var _ OperationsClientAPI = (*batchai.OperationsClient)(nil) // UsageClientAPI contains the set of methods on the UsageClient type. type UsageClientAPI interface { List(ctx context.Context, location string) (result batchai.ListUsagesResultPage, err error) + ListComplete(ctx context.Context, location string) (result batchai.ListUsagesResultIterator, err error) } var _ UsageClientAPI = (*batchai.UsageClient)(nil) @@ -42,8 +44,11 @@ type ClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, clusterName string) (result batchai.ClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, clusterName string) (result batchai.Cluster, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.ClusterListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.ClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.ClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.ClusterListResultIterator, err error) ListRemoteLoginInformation(ctx context.Context, resourceGroupName string, clusterName string) (result batchai.RemoteLoginInformationListResultPage, err error) + ListRemoteLoginInformationComplete(ctx context.Context, resourceGroupName string, clusterName string) (result batchai.RemoteLoginInformationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters batchai.ClusterUpdateParameters) (result batchai.Cluster, err error) } @@ -55,9 +60,13 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobName string) (result batchai.JobsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, jobName string) (result batchai.Job, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.JobListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.JobListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.JobListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.JobListResultIterator, err error) ListOutputFiles(ctx context.Context, resourceGroupName string, jobName string, outputdirectoryid string, directory string, linkexpiryinminutes *int32, maxResults *int32) (result batchai.FileListResultPage, err error) + ListOutputFilesComplete(ctx context.Context, resourceGroupName string, jobName string, outputdirectoryid string, directory string, linkexpiryinminutes *int32, maxResults *int32) (result batchai.FileListResultIterator, err error) ListRemoteLoginInformation(ctx context.Context, resourceGroupName string, jobName string) (result batchai.RemoteLoginInformationListResultPage, err error) + ListRemoteLoginInformationComplete(ctx context.Context, resourceGroupName string, jobName string) (result batchai.RemoteLoginInformationListResultIterator, err error) Terminate(ctx context.Context, resourceGroupName string, jobName string) (result batchai.JobsTerminateFuture, err error) } @@ -69,7 +78,9 @@ type FileServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, fileServerName string) (result batchai.FileServersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, fileServerName string) (result batchai.FileServer, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.FileServerListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.FileServerListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.FileServerListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.FileServerListResultIterator, err error) } var _ FileServersClientAPI = (*batchai.FileServersClient)(nil) diff --git a/services/batchai/mgmt/2018-03-01/batchai/client.go b/services/batchai/mgmt/2018-03-01/batchai/client.go index c3da6a51c4d7..b3f48f59efa7 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/client.go +++ b/services/batchai/mgmt/2018-03-01/batchai/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batchai/mgmt/2018-03-01/batchai/clusters.go b/services/batchai/mgmt/2018-03-01/batchai/clusters.go index 1abb2390b825..6e3d23c1f786 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/clusters.go +++ b/services/batchai/mgmt/2018-03-01/batchai/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batchai/mgmt/2018-03-01/batchai/fileservers.go b/services/batchai/mgmt/2018-03-01/batchai/fileservers.go index 6267cf95d300..90efb04a6f09 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/fileservers.go +++ b/services/batchai/mgmt/2018-03-01/batchai/fileservers.go @@ -36,7 +36,8 @@ func NewFileServersClient(subscriptionID string) FileServersClient { return NewFileServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileServersClientWithBaseURI creates an instance of the FileServersClient client. +// NewFileServersClientWithBaseURI creates an instance of the FileServersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileServersClientWithBaseURI(baseURI string, subscriptionID string) FileServersClient { return FileServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batchai/mgmt/2018-03-01/batchai/jobs.go b/services/batchai/mgmt/2018-03-01/batchai/jobs.go index 8b7e13aa95d6..dea19620a317 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/jobs.go +++ b/services/batchai/mgmt/2018-03-01/batchai/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/batchai/mgmt/2018-03-01/batchai/operations.go b/services/batchai/mgmt/2018-03-01/batchai/operations.go index 378494839194..da1e1d55d7e9 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/operations.go +++ b/services/batchai/mgmt/2018-03-01/batchai/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/batchai/mgmt/2018-03-01/batchai/usage.go b/services/batchai/mgmt/2018-03-01/batchai/usage.go index 4c36e11bbcd0..6c71ef97ff73 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/usage.go +++ b/services/batchai/mgmt/2018-03-01/batchai/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/batchai/mgmt/2018-05-01/batchai/batchaiapi/interfaces.go b/services/batchai/mgmt/2018-05-01/batchai/batchaiapi/interfaces.go index c01d8c5d4e47..b72a101154a3 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/batchaiapi/interfaces.go +++ b/services/batchai/mgmt/2018-05-01/batchai/batchaiapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result batchai.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result batchai.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*batchai.OperationsClient)(nil) @@ -32,6 +33,7 @@ var _ OperationsClientAPI = (*batchai.OperationsClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result batchai.ListUsagesResultPage, err error) + ListComplete(ctx context.Context, location string) (result batchai.ListUsagesResultIterator, err error) } var _ UsagesClientAPI = (*batchai.UsagesClient)(nil) @@ -42,7 +44,9 @@ type WorkspacesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result batchai.WorkspacesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result batchai.Workspace, err error) List(ctx context.Context, maxResults *int32) (result batchai.WorkspaceListResultPage, err error) + ListComplete(ctx context.Context, maxResults *int32) (result batchai.WorkspaceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, maxResults *int32) (result batchai.WorkspaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, maxResults *int32) (result batchai.WorkspaceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters batchai.WorkspaceUpdateParameters) (result batchai.Workspace, err error) } @@ -54,6 +58,7 @@ type ExperimentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string) (result batchai.ExperimentsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string) (result batchai.Experiment, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, maxResults *int32) (result batchai.ExperimentListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, maxResults *int32) (result batchai.ExperimentListResultIterator, err error) } var _ ExperimentsClientAPI = (*batchai.ExperimentsClient)(nil) @@ -64,8 +69,11 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, jobName string) (result batchai.JobsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, jobName string) (result batchai.Job, err error) ListByExperiment(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, maxResults *int32) (result batchai.JobListResultPage, err error) + ListByExperimentComplete(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, maxResults *int32) (result batchai.JobListResultIterator, err error) ListOutputFiles(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, jobName string, outputdirectoryid string, directory string, linkexpiryinminutes *int32, maxResults *int32) (result batchai.FileListResultPage, err error) + ListOutputFilesComplete(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, jobName string, outputdirectoryid string, directory string, linkexpiryinminutes *int32, maxResults *int32) (result batchai.FileListResultIterator, err error) ListRemoteLoginInformation(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, jobName string) (result batchai.RemoteLoginInformationListResultPage, err error) + ListRemoteLoginInformationComplete(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, jobName string) (result batchai.RemoteLoginInformationListResultIterator, err error) Terminate(ctx context.Context, resourceGroupName string, workspaceName string, experimentName string, jobName string) (result batchai.JobsTerminateFuture, err error) } @@ -77,6 +85,7 @@ type FileServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, fileServerName string) (result batchai.FileServersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, fileServerName string) (result batchai.FileServer, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, maxResults *int32) (result batchai.FileServerListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, maxResults *int32) (result batchai.FileServerListResultIterator, err error) } var _ FileServersClientAPI = (*batchai.FileServersClient)(nil) @@ -87,7 +96,9 @@ type ClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, clusterName string) (result batchai.ClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, clusterName string) (result batchai.Cluster, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, maxResults *int32) (result batchai.ClusterListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, maxResults *int32) (result batchai.ClusterListResultIterator, err error) ListRemoteLoginInformation(ctx context.Context, resourceGroupName string, workspaceName string, clusterName string) (result batchai.RemoteLoginInformationListResultPage, err error) + ListRemoteLoginInformationComplete(ctx context.Context, resourceGroupName string, workspaceName string, clusterName string) (result batchai.RemoteLoginInformationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, clusterName string, parameters batchai.ClusterUpdateParameters) (result batchai.Cluster, err error) } diff --git a/services/batchai/mgmt/2018-05-01/batchai/client.go b/services/batchai/mgmt/2018-05-01/batchai/client.go index 2df382e8bfc8..cd1f9bc907d5 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/client.go +++ b/services/batchai/mgmt/2018-05-01/batchai/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/batchai/mgmt/2018-05-01/batchai/clusters.go b/services/batchai/mgmt/2018-05-01/batchai/clusters.go index dd059f57fd43..608ed195c100 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/clusters.go +++ b/services/batchai/mgmt/2018-05-01/batchai/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batchai/mgmt/2018-05-01/batchai/experiments.go b/services/batchai/mgmt/2018-05-01/batchai/experiments.go index 670da537a53f..d6c9c2d5c2d5 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/experiments.go +++ b/services/batchai/mgmt/2018-05-01/batchai/experiments.go @@ -36,7 +36,8 @@ func NewExperimentsClient(subscriptionID string) ExperimentsClient { return NewExperimentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExperimentsClientWithBaseURI creates an instance of the ExperimentsClient client. +// NewExperimentsClientWithBaseURI creates an instance of the ExperimentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExperimentsClientWithBaseURI(baseURI string, subscriptionID string) ExperimentsClient { return ExperimentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batchai/mgmt/2018-05-01/batchai/fileservers.go b/services/batchai/mgmt/2018-05-01/batchai/fileservers.go index 89d734e6a51b..045a70cc3608 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/fileservers.go +++ b/services/batchai/mgmt/2018-05-01/batchai/fileservers.go @@ -36,7 +36,8 @@ func NewFileServersClient(subscriptionID string) FileServersClient { return NewFileServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileServersClientWithBaseURI creates an instance of the FileServersClient client. +// NewFileServersClientWithBaseURI creates an instance of the FileServersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileServersClientWithBaseURI(baseURI string, subscriptionID string) FileServersClient { return FileServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/batchai/mgmt/2018-05-01/batchai/jobs.go b/services/batchai/mgmt/2018-05-01/batchai/jobs.go index 2deda7ab72fa..2e24fbe1fab3 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/jobs.go +++ b/services/batchai/mgmt/2018-05-01/batchai/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/batchai/mgmt/2018-05-01/batchai/operations.go b/services/batchai/mgmt/2018-05-01/batchai/operations.go index add0b7406edc..449a42effcc0 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/operations.go +++ b/services/batchai/mgmt/2018-05-01/batchai/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/batchai/mgmt/2018-05-01/batchai/usages.go b/services/batchai/mgmt/2018-05-01/batchai/usages.go index 3d6aedadeb30..a3ac15fd9b28 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/usages.go +++ b/services/batchai/mgmt/2018-05-01/batchai/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/batchai/mgmt/2018-05-01/batchai/workspaces.go b/services/batchai/mgmt/2018-05-01/batchai/workspaces.go index 56d986077c9c..657491dae7e1 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/workspaces.go +++ b/services/batchai/mgmt/2018-05-01/batchai/workspaces.go @@ -36,7 +36,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } diff --git a/services/cdn/mgmt/2015-06-01/cdn/client.go b/services/cdn/mgmt/2015-06-01/cdn/client.go index 4d1be2f6c5a2..d10f31356b58 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/client.go +++ b/services/cdn/mgmt/2015-06-01/cdn/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cdn/mgmt/2015-06-01/cdn/customdomains.go b/services/cdn/mgmt/2015-06-01/cdn/customdomains.go index fb79c97df15e..2a268c2a62b6 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/customdomains.go +++ b/services/cdn/mgmt/2015-06-01/cdn/customdomains.go @@ -36,7 +36,8 @@ func NewCustomDomainsClient(subscriptionID string) CustomDomainsClient { return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client. +// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) CustomDomainsClient { return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2015-06-01/cdn/endpoints.go b/services/cdn/mgmt/2015-06-01/cdn/endpoints.go index 651d53a55e10..16890e3ef8a9 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/endpoints.go +++ b/services/cdn/mgmt/2015-06-01/cdn/endpoints.go @@ -36,7 +36,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2015-06-01/cdn/nameavailability.go b/services/cdn/mgmt/2015-06-01/cdn/nameavailability.go index 30983198c598..ced7c0139d02 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/nameavailability.go +++ b/services/cdn/mgmt/2015-06-01/cdn/nameavailability.go @@ -36,7 +36,9 @@ func NewNameAvailabilityClient(subscriptionID string) NameAvailabilityClient { return NewNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNameAvailabilityClientWithBaseURI creates an instance of the NameAvailabilityClient client. +// NewNameAvailabilityClientWithBaseURI creates an instance of the NameAvailabilityClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) NameAvailabilityClient { return NameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2015-06-01/cdn/operations.go b/services/cdn/mgmt/2015-06-01/cdn/operations.go index 3cacf2f5de41..fb194408348d 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/operations.go +++ b/services/cdn/mgmt/2015-06-01/cdn/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/cdn/mgmt/2015-06-01/cdn/origins.go b/services/cdn/mgmt/2015-06-01/cdn/origins.go index 100a35fbb09b..13b74ac764f5 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/origins.go +++ b/services/cdn/mgmt/2015-06-01/cdn/origins.go @@ -36,7 +36,8 @@ func NewOriginsClient(subscriptionID string) OriginsClient { return NewOriginsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client. +// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsClient { return OriginsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2015-06-01/cdn/profiles.go b/services/cdn/mgmt/2015-06-01/cdn/profiles.go index a9872a010f41..fdd8ce30cd70 100644 --- a/services/cdn/mgmt/2015-06-01/cdn/profiles.go +++ b/services/cdn/mgmt/2015-06-01/cdn/profiles.go @@ -36,7 +36,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/cdn/mgmt/2016-04-02/cdn/client.go b/services/cdn/mgmt/2016-04-02/cdn/client.go index 324b8c291a11..1fabceb2158b 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/client.go +++ b/services/cdn/mgmt/2016-04-02/cdn/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cdn/mgmt/2016-04-02/cdn/customdomains.go b/services/cdn/mgmt/2016-04-02/cdn/customdomains.go index a188765b4eb1..202adaa4eb0b 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/customdomains.go +++ b/services/cdn/mgmt/2016-04-02/cdn/customdomains.go @@ -36,7 +36,8 @@ func NewCustomDomainsClient(subscriptionID string) CustomDomainsClient { return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client. +// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) CustomDomainsClient { return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2016-04-02/cdn/endpoints.go b/services/cdn/mgmt/2016-04-02/cdn/endpoints.go index f07c0a17d159..94d587b68655 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/endpoints.go +++ b/services/cdn/mgmt/2016-04-02/cdn/endpoints.go @@ -36,7 +36,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2016-04-02/cdn/nameavailability.go b/services/cdn/mgmt/2016-04-02/cdn/nameavailability.go index 37ee20d1acbc..4fdc1fbe18ba 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/nameavailability.go +++ b/services/cdn/mgmt/2016-04-02/cdn/nameavailability.go @@ -36,7 +36,9 @@ func NewNameAvailabilityClient(subscriptionID string) NameAvailabilityClient { return NewNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNameAvailabilityClientWithBaseURI creates an instance of the NameAvailabilityClient client. +// NewNameAvailabilityClientWithBaseURI creates an instance of the NameAvailabilityClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) NameAvailabilityClient { return NameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2016-04-02/cdn/operations.go b/services/cdn/mgmt/2016-04-02/cdn/operations.go index e14fe0e9c84e..57921c8d9805 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/operations.go +++ b/services/cdn/mgmt/2016-04-02/cdn/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/cdn/mgmt/2016-04-02/cdn/origins.go b/services/cdn/mgmt/2016-04-02/cdn/origins.go index 3ef58de2952b..03ca39c841e1 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/origins.go +++ b/services/cdn/mgmt/2016-04-02/cdn/origins.go @@ -36,7 +36,8 @@ func NewOriginsClient(subscriptionID string) OriginsClient { return NewOriginsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client. +// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsClient { return OriginsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2016-04-02/cdn/profiles.go b/services/cdn/mgmt/2016-04-02/cdn/profiles.go index 1876169d0f87..03094ff1177a 100644 --- a/services/cdn/mgmt/2016-04-02/cdn/profiles.go +++ b/services/cdn/mgmt/2016-04-02/cdn/profiles.go @@ -36,7 +36,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/cdn/mgmt/2016-10-02/cdn/cdnapi/interfaces.go b/services/cdn/mgmt/2016-10-02/cdn/cdnapi/interfaces.go index 7cb99c3ba389..93ef7c2358a7 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/cdnapi/interfaces.go +++ b/services/cdn/mgmt/2016-10-02/cdn/cdnapi/interfaces.go @@ -26,7 +26,9 @@ import ( type BaseClientAPI interface { CheckNameAvailability(ctx context.Context, checkNameAvailabilityInput cdn.CheckNameAvailabilityInput) (result cdn.CheckNameAvailabilityOutput, err error) ListOperations(ctx context.Context) (result cdn.OperationListResultPage, err error) + ListOperationsComplete(ctx context.Context) (result cdn.OperationListResultIterator, err error) ListResourceUsage(ctx context.Context) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context) (result cdn.ResourceUsageListResultIterator, err error) } var _ BaseClientAPI = (*cdn.BaseClient)(nil) @@ -39,8 +41,11 @@ type ProfilesClientAPI interface { Get(ctx context.Context, resourceGroupName string, profileName string) (result cdn.Profile, err error) GetSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SupportedOptimizationTypesResult, err error) List(ctx context.Context) (result cdn.ProfileListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ProfileListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters cdn.ProfileUpdateParameters) (result cdn.ProfilesUpdateFuture, err error) } @@ -52,7 +57,9 @@ type EndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.Endpoint, err error) ListByProfile(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultPage, err error) + ListByProfileComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultIterator, err error) LoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.LoadParameters) (result cdn.EndpointsLoadContentFuture, err error) PurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.PurgeParameters) (result cdn.EndpointsPurgeContentFuture, err error) Start(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsStartFuture, err error) @@ -67,6 +74,7 @@ var _ EndpointsClientAPI = (*cdn.EndpointsClient)(nil) type OriginsClientAPI interface { Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string) (result cdn.Origin, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties cdn.OriginUpdateParameters) (result cdn.OriginsUpdateFuture, err error) } @@ -80,6 +88,7 @@ type CustomDomainsClientAPI interface { EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultIterator, err error) } var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) @@ -87,6 +96,7 @@ var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) // EdgeNodesClientAPI contains the set of methods on the EdgeNodesClient type. type EdgeNodesClientAPI interface { List(ctx context.Context) (result cdn.EdgenodeResultPage, err error) + ListComplete(ctx context.Context) (result cdn.EdgenodeResultIterator, err error) } var _ EdgeNodesClientAPI = (*cdn.EdgeNodesClient)(nil) diff --git a/services/cdn/mgmt/2016-10-02/cdn/client.go b/services/cdn/mgmt/2016-10-02/cdn/client.go index ed957ccee436..2d0729ff13eb 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/client.go +++ b/services/cdn/mgmt/2016-10-02/cdn/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cdn/mgmt/2016-10-02/cdn/customdomains.go b/services/cdn/mgmt/2016-10-02/cdn/customdomains.go index 6ff77729c96b..e3f4397bced3 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/customdomains.go +++ b/services/cdn/mgmt/2016-10-02/cdn/customdomains.go @@ -36,7 +36,8 @@ func NewCustomDomainsClient(subscriptionID string) CustomDomainsClient { return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client. +// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) CustomDomainsClient { return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2016-10-02/cdn/edgenodes.go b/services/cdn/mgmt/2016-10-02/cdn/edgenodes.go index 8f164c2bf1d3..f5771beb9c22 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/edgenodes.go +++ b/services/cdn/mgmt/2016-10-02/cdn/edgenodes.go @@ -35,7 +35,8 @@ func NewEdgeNodesClient(subscriptionID string) EdgeNodesClient { return NewEdgeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client. +// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEdgeNodesClientWithBaseURI(baseURI string, subscriptionID string) EdgeNodesClient { return EdgeNodesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2016-10-02/cdn/endpoints.go b/services/cdn/mgmt/2016-10-02/cdn/endpoints.go index 7144a1ff7b2c..57a7dd431d56 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/endpoints.go +++ b/services/cdn/mgmt/2016-10-02/cdn/endpoints.go @@ -36,7 +36,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2016-10-02/cdn/origins.go b/services/cdn/mgmt/2016-10-02/cdn/origins.go index 2f592caa5839..b27f0a13dd33 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/origins.go +++ b/services/cdn/mgmt/2016-10-02/cdn/origins.go @@ -36,7 +36,8 @@ func NewOriginsClient(subscriptionID string) OriginsClient { return NewOriginsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client. +// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsClient { return OriginsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2016-10-02/cdn/profiles.go b/services/cdn/mgmt/2016-10-02/cdn/profiles.go index 12703c4eb5c2..33ac0b23301e 100644 --- a/services/cdn/mgmt/2016-10-02/cdn/profiles.go +++ b/services/cdn/mgmt/2016-10-02/cdn/profiles.go @@ -36,7 +36,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/cdn/mgmt/2017-04-02/cdn/cdnapi/interfaces.go b/services/cdn/mgmt/2017-04-02/cdn/cdnapi/interfaces.go index 098a6f7d6ed2..bc5eca7d9552 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/cdnapi/interfaces.go +++ b/services/cdn/mgmt/2017-04-02/cdn/cdnapi/interfaces.go @@ -37,8 +37,11 @@ type ProfilesClientAPI interface { GenerateSsoURI(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SsoURI, err error) Get(ctx context.Context, resourceGroupName string, profileName string) (result cdn.Profile, err error) List(ctx context.Context) (result cdn.ProfileListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ProfileListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultIterator, err error) ListSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SupportedOptimizationTypesListResult, err error) Update(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters cdn.ProfileUpdateParameters) (result cdn.ProfilesUpdateFuture, err error) } @@ -51,7 +54,9 @@ type EndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.Endpoint, err error) ListByProfile(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultPage, err error) + ListByProfileComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultIterator, err error) LoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.LoadParameters) (result cdn.EndpointsLoadContentFuture, err error) PurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.PurgeParameters) (result cdn.EndpointsPurgeContentFuture, err error) Start(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsStartFuture, err error) @@ -66,6 +71,7 @@ var _ EndpointsClientAPI = (*cdn.EndpointsClient)(nil) type OriginsClientAPI interface { Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string) (result cdn.Origin, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties cdn.OriginUpdateParameters) (result cdn.OriginsUpdateFuture, err error) } @@ -79,6 +85,7 @@ type CustomDomainsClientAPI interface { EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultIterator, err error) } var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) @@ -86,6 +93,7 @@ var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) // ResourceUsageClientAPI contains the set of methods on the ResourceUsageClient type. type ResourceUsageClientAPI interface { List(ctx context.Context) (result cdn.ResourceUsageListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ResourceUsageListResultIterator, err error) } var _ ResourceUsageClientAPI = (*cdn.ResourceUsageClient)(nil) @@ -93,6 +101,7 @@ var _ ResourceUsageClientAPI = (*cdn.ResourceUsageClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result cdn.OperationsListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.OperationsListResultIterator, err error) } var _ OperationsClientAPI = (*cdn.OperationsClient)(nil) @@ -100,6 +109,7 @@ var _ OperationsClientAPI = (*cdn.OperationsClient)(nil) // EdgeNodesClientAPI contains the set of methods on the EdgeNodesClient type. type EdgeNodesClientAPI interface { List(ctx context.Context) (result cdn.EdgenodeResultPage, err error) + ListComplete(ctx context.Context) (result cdn.EdgenodeResultIterator, err error) } var _ EdgeNodesClientAPI = (*cdn.EdgeNodesClient)(nil) diff --git a/services/cdn/mgmt/2017-04-02/cdn/client.go b/services/cdn/mgmt/2017-04-02/cdn/client.go index b98c0a2d3cb6..22674c86d057 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/client.go +++ b/services/cdn/mgmt/2017-04-02/cdn/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cdn/mgmt/2017-04-02/cdn/customdomains.go b/services/cdn/mgmt/2017-04-02/cdn/customdomains.go index 1c00a3df0387..9e512bd3e659 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/customdomains.go +++ b/services/cdn/mgmt/2017-04-02/cdn/customdomains.go @@ -36,7 +36,8 @@ func NewCustomDomainsClient(subscriptionID string) CustomDomainsClient { return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client. +// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) CustomDomainsClient { return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-04-02/cdn/edgenodes.go b/services/cdn/mgmt/2017-04-02/cdn/edgenodes.go index 71188a761520..e433eb1f9132 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/edgenodes.go +++ b/services/cdn/mgmt/2017-04-02/cdn/edgenodes.go @@ -35,7 +35,8 @@ func NewEdgeNodesClient(subscriptionID string) EdgeNodesClient { return NewEdgeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client. +// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEdgeNodesClientWithBaseURI(baseURI string, subscriptionID string) EdgeNodesClient { return EdgeNodesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-04-02/cdn/endpoints.go b/services/cdn/mgmt/2017-04-02/cdn/endpoints.go index f860305a6ba1..3c586ca9b791 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/endpoints.go +++ b/services/cdn/mgmt/2017-04-02/cdn/endpoints.go @@ -36,7 +36,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-04-02/cdn/operations.go b/services/cdn/mgmt/2017-04-02/cdn/operations.go index da3c68f303b0..214a42e8a802 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/operations.go +++ b/services/cdn/mgmt/2017-04-02/cdn/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/cdn/mgmt/2017-04-02/cdn/origins.go b/services/cdn/mgmt/2017-04-02/cdn/origins.go index e967a98c0df0..b9b47c1786dd 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/origins.go +++ b/services/cdn/mgmt/2017-04-02/cdn/origins.go @@ -36,7 +36,8 @@ func NewOriginsClient(subscriptionID string) OriginsClient { return NewOriginsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client. +// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsClient { return OriginsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-04-02/cdn/profiles.go b/services/cdn/mgmt/2017-04-02/cdn/profiles.go index 98f34e1f801c..6e27a5520158 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/profiles.go +++ b/services/cdn/mgmt/2017-04-02/cdn/profiles.go @@ -36,7 +36,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/cdn/mgmt/2017-04-02/cdn/resourceusage.go b/services/cdn/mgmt/2017-04-02/cdn/resourceusage.go index 09d259a7aa8e..8f66d151e042 100644 --- a/services/cdn/mgmt/2017-04-02/cdn/resourceusage.go +++ b/services/cdn/mgmt/2017-04-02/cdn/resourceusage.go @@ -35,7 +35,8 @@ func NewResourceUsageClient(subscriptionID string) ResourceUsageClient { return NewResourceUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client. +// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourceUsageClientWithBaseURI(baseURI string, subscriptionID string) ResourceUsageClient { return ResourceUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-10-12/cdn/cdnapi/interfaces.go b/services/cdn/mgmt/2017-10-12/cdn/cdnapi/interfaces.go index ba61b678d36a..432dc6435100 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/cdnapi/interfaces.go +++ b/services/cdn/mgmt/2017-10-12/cdn/cdnapi/interfaces.go @@ -38,8 +38,11 @@ type ProfilesClientAPI interface { GenerateSsoURI(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SsoURI, err error) Get(ctx context.Context, resourceGroupName string, profileName string) (result cdn.Profile, err error) List(ctx context.Context) (result cdn.ProfileListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ProfileListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultIterator, err error) ListSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SupportedOptimizationTypesListResult, err error) Update(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters cdn.ProfileUpdateParameters) (result cdn.ProfilesUpdateFuture, err error) } @@ -52,7 +55,9 @@ type EndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.Endpoint, err error) ListByProfile(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultPage, err error) + ListByProfileComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultIterator, err error) LoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.LoadParameters) (result cdn.EndpointsLoadContentFuture, err error) PurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.PurgeParameters) (result cdn.EndpointsPurgeContentFuture, err error) Start(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsStartFuture, err error) @@ -67,6 +72,7 @@ var _ EndpointsClientAPI = (*cdn.EndpointsClient)(nil) type OriginsClientAPI interface { Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string) (result cdn.Origin, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties cdn.OriginUpdateParameters) (result cdn.OriginsUpdateFuture, err error) } @@ -80,6 +86,7 @@ type CustomDomainsClientAPI interface { EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomain, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultIterator, err error) } var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) @@ -87,6 +94,7 @@ var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) // ResourceUsageClientAPI contains the set of methods on the ResourceUsageClient type. type ResourceUsageClientAPI interface { List(ctx context.Context) (result cdn.ResourceUsageListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ResourceUsageListResultIterator, err error) } var _ ResourceUsageClientAPI = (*cdn.ResourceUsageClient)(nil) @@ -94,6 +102,7 @@ var _ ResourceUsageClientAPI = (*cdn.ResourceUsageClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result cdn.OperationsListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.OperationsListResultIterator, err error) } var _ OperationsClientAPI = (*cdn.OperationsClient)(nil) @@ -101,6 +110,7 @@ var _ OperationsClientAPI = (*cdn.OperationsClient)(nil) // EdgeNodesClientAPI contains the set of methods on the EdgeNodesClient type. type EdgeNodesClientAPI interface { List(ctx context.Context) (result cdn.EdgenodeResultPage, err error) + ListComplete(ctx context.Context) (result cdn.EdgenodeResultIterator, err error) } var _ EdgeNodesClientAPI = (*cdn.EdgeNodesClient)(nil) diff --git a/services/cdn/mgmt/2017-10-12/cdn/client.go b/services/cdn/mgmt/2017-10-12/cdn/client.go index df3714c94d58..38fac5958be7 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/client.go +++ b/services/cdn/mgmt/2017-10-12/cdn/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cdn/mgmt/2017-10-12/cdn/customdomains.go b/services/cdn/mgmt/2017-10-12/cdn/customdomains.go index 7fe0bdd42003..d5729ebec4d3 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/customdomains.go +++ b/services/cdn/mgmt/2017-10-12/cdn/customdomains.go @@ -36,7 +36,8 @@ func NewCustomDomainsClient(subscriptionID string) CustomDomainsClient { return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client. +// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) CustomDomainsClient { return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-10-12/cdn/edgenodes.go b/services/cdn/mgmt/2017-10-12/cdn/edgenodes.go index 11f184afda4e..4442ea7271dd 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/edgenodes.go +++ b/services/cdn/mgmt/2017-10-12/cdn/edgenodes.go @@ -35,7 +35,8 @@ func NewEdgeNodesClient(subscriptionID string) EdgeNodesClient { return NewEdgeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client. +// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEdgeNodesClientWithBaseURI(baseURI string, subscriptionID string) EdgeNodesClient { return EdgeNodesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-10-12/cdn/endpoints.go b/services/cdn/mgmt/2017-10-12/cdn/endpoints.go index 1b780ee65646..64055eaa4461 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/endpoints.go +++ b/services/cdn/mgmt/2017-10-12/cdn/endpoints.go @@ -36,7 +36,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-10-12/cdn/operations.go b/services/cdn/mgmt/2017-10-12/cdn/operations.go index c6c4ee5e5446..9ad8c85c8186 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/operations.go +++ b/services/cdn/mgmt/2017-10-12/cdn/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/cdn/mgmt/2017-10-12/cdn/origins.go b/services/cdn/mgmt/2017-10-12/cdn/origins.go index 0fe220e021e2..604570217e3a 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/origins.go +++ b/services/cdn/mgmt/2017-10-12/cdn/origins.go @@ -36,7 +36,8 @@ func NewOriginsClient(subscriptionID string) OriginsClient { return NewOriginsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client. +// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsClient { return OriginsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2017-10-12/cdn/profiles.go b/services/cdn/mgmt/2017-10-12/cdn/profiles.go index 77b127b13d3b..c0d926f8f960 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/profiles.go +++ b/services/cdn/mgmt/2017-10-12/cdn/profiles.go @@ -36,7 +36,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/cdn/mgmt/2017-10-12/cdn/resourceusage.go b/services/cdn/mgmt/2017-10-12/cdn/resourceusage.go index 42995a73dbd0..e45badf655e3 100644 --- a/services/cdn/mgmt/2017-10-12/cdn/resourceusage.go +++ b/services/cdn/mgmt/2017-10-12/cdn/resourceusage.go @@ -35,7 +35,8 @@ func NewResourceUsageClient(subscriptionID string) ResourceUsageClient { return NewResourceUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client. +// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourceUsageClientWithBaseURI(baseURI string, subscriptionID string) ResourceUsageClient { return ResourceUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2019-04-15/cdn/cdnapi/interfaces.go b/services/cdn/mgmt/2019-04-15/cdn/cdnapi/interfaces.go index d8b31563056e..110cedb63c80 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/cdnapi/interfaces.go +++ b/services/cdn/mgmt/2019-04-15/cdn/cdnapi/interfaces.go @@ -38,8 +38,11 @@ type ProfilesClientAPI interface { GenerateSsoURI(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SsoURI, err error) Get(ctx context.Context, resourceGroupName string, profileName string) (result cdn.Profile, err error) List(ctx context.Context) (result cdn.ProfileListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ProfileListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultIterator, err error) ListSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SupportedOptimizationTypesListResult, err error) Update(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters cdn.ProfileUpdateParameters) (result cdn.ProfilesUpdateFuture, err error) } @@ -52,7 +55,9 @@ type EndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.Endpoint, err error) ListByProfile(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultPage, err error) + ListByProfileComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultIterator, err error) LoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.LoadParameters) (result cdn.EndpointsLoadContentFuture, err error) PurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.PurgeParameters) (result cdn.EndpointsPurgeContentFuture, err error) Start(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsStartFuture, err error) @@ -67,6 +72,7 @@ var _ EndpointsClientAPI = (*cdn.EndpointsClient)(nil) type OriginsClientAPI interface { Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string) (result cdn.Origin, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties cdn.OriginUpdateParameters) (result cdn.OriginsUpdateFuture, err error) } @@ -80,6 +86,7 @@ type CustomDomainsClientAPI interface { EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomain, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultIterator, err error) } var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) @@ -87,6 +94,7 @@ var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) // ResourceUsageClientAPI contains the set of methods on the ResourceUsageClient type. type ResourceUsageClientAPI interface { List(ctx context.Context) (result cdn.ResourceUsageListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ResourceUsageListResultIterator, err error) } var _ ResourceUsageClientAPI = (*cdn.ResourceUsageClient)(nil) @@ -94,6 +102,7 @@ var _ ResourceUsageClientAPI = (*cdn.ResourceUsageClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result cdn.OperationsListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.OperationsListResultIterator, err error) } var _ OperationsClientAPI = (*cdn.OperationsClient)(nil) @@ -101,6 +110,7 @@ var _ OperationsClientAPI = (*cdn.OperationsClient)(nil) // EdgeNodesClientAPI contains the set of methods on the EdgeNodesClient type. type EdgeNodesClientAPI interface { List(ctx context.Context) (result cdn.EdgenodeResultPage, err error) + ListComplete(ctx context.Context) (result cdn.EdgenodeResultIterator, err error) } var _ EdgeNodesClientAPI = (*cdn.EdgeNodesClient)(nil) diff --git a/services/cdn/mgmt/2019-04-15/cdn/client.go b/services/cdn/mgmt/2019-04-15/cdn/client.go index 423a5b0f186b..c408fc105eb8 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/client.go +++ b/services/cdn/mgmt/2019-04-15/cdn/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cdn/mgmt/2019-04-15/cdn/customdomains.go b/services/cdn/mgmt/2019-04-15/cdn/customdomains.go index 98a215398ac0..4896bcf392f9 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/customdomains.go +++ b/services/cdn/mgmt/2019-04-15/cdn/customdomains.go @@ -36,7 +36,8 @@ func NewCustomDomainsClient(subscriptionID string) CustomDomainsClient { return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client. +// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) CustomDomainsClient { return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2019-04-15/cdn/edgenodes.go b/services/cdn/mgmt/2019-04-15/cdn/edgenodes.go index 4301bf55001d..7558ee8887d3 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/edgenodes.go +++ b/services/cdn/mgmt/2019-04-15/cdn/edgenodes.go @@ -35,7 +35,8 @@ func NewEdgeNodesClient(subscriptionID string) EdgeNodesClient { return NewEdgeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client. +// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEdgeNodesClientWithBaseURI(baseURI string, subscriptionID string) EdgeNodesClient { return EdgeNodesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2019-04-15/cdn/endpoints.go b/services/cdn/mgmt/2019-04-15/cdn/endpoints.go index 9d7e2925cfb1..6d2f730ce70f 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/endpoints.go +++ b/services/cdn/mgmt/2019-04-15/cdn/endpoints.go @@ -36,7 +36,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2019-04-15/cdn/operations.go b/services/cdn/mgmt/2019-04-15/cdn/operations.go index 07e8d0c31a6d..4c9861eeac22 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/operations.go +++ b/services/cdn/mgmt/2019-04-15/cdn/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/cdn/mgmt/2019-04-15/cdn/origins.go b/services/cdn/mgmt/2019-04-15/cdn/origins.go index a3982f327053..d8046d046aa4 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/origins.go +++ b/services/cdn/mgmt/2019-04-15/cdn/origins.go @@ -36,7 +36,8 @@ func NewOriginsClient(subscriptionID string) OriginsClient { return NewOriginsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client. +// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsClient { return OriginsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cdn/mgmt/2019-04-15/cdn/profiles.go b/services/cdn/mgmt/2019-04-15/cdn/profiles.go index cf3de82123e5..3b7373f7b149 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/profiles.go +++ b/services/cdn/mgmt/2019-04-15/cdn/profiles.go @@ -36,7 +36,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/cdn/mgmt/2019-04-15/cdn/resourceusage.go b/services/cdn/mgmt/2019-04-15/cdn/resourceusage.go index ada2d799c88f..39c9e5be8446 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/resourceusage.go +++ b/services/cdn/mgmt/2019-04-15/cdn/resourceusage.go @@ -35,7 +35,8 @@ func NewResourceUsageClient(subscriptionID string) ResourceUsageClient { return NewResourceUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client. +// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourceUsageClientWithBaseURI(baseURI string, subscriptionID string) ResourceUsageClient { return ResourceUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/accounts.go b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/accounts.go index 37a1f4c7a320..079d8d2e2d68 100644 --- a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/accounts.go +++ b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/client.go b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/client.go index 49599b4fa9a3..3d6f6978dacd 100644 --- a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/client.go +++ b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/cognitiveservicesapi/interfaces.go b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/cognitiveservicesapi/interfaces.go index c8748ef2db14..f4aa69dc7c65 100644 --- a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/cognitiveservicesapi/interfaces.go +++ b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/cognitiveservicesapi/interfaces.go @@ -38,7 +38,9 @@ type AccountsClientAPI interface { GetProperties(ctx context.Context, resourceGroupName string, accountName string) (result cognitiveservices.Account, err error) GetUsages(ctx context.Context, resourceGroupName string, accountName string, filter string) (result cognitiveservices.UsagesResult, err error) List(ctx context.Context) (result cognitiveservices.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result cognitiveservices.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result cognitiveservices.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result cognitiveservices.AccountListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result cognitiveservices.AccountKeys, err error) ListSkus(ctx context.Context, resourceGroupName string, accountName string) (result cognitiveservices.AccountEnumerateSkusResult, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters cognitiveservices.RegenerateKeyParameters) (result cognitiveservices.AccountKeys, err error) @@ -50,6 +52,7 @@ var _ AccountsClientAPI = (*cognitiveservices.AccountsClient)(nil) // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { List(ctx context.Context) (result cognitiveservices.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context) (result cognitiveservices.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*cognitiveservices.ResourceSkusClient)(nil) @@ -57,6 +60,7 @@ var _ ResourceSkusClientAPI = (*cognitiveservices.ResourceSkusClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result cognitiveservices.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result cognitiveservices.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*cognitiveservices.OperationsClient)(nil) diff --git a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/operations.go b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/operations.go index 7739428ccab0..30e71b46a40f 100644 --- a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/operations.go +++ b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/resourceskus.go b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/resourceskus.go index 59ea2fd2b42b..4a32b7e49fcd 100644 --- a/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/resourceskus.go +++ b/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/cognitiveservices/v1.0/localsearch/client.go b/services/cognitiveservices/v1.0/localsearch/client.go index 13b2c0290c80..3470a4cc7645 100644 --- a/services/cognitiveservices/v1.0/localsearch/client.go +++ b/services/cognitiveservices/v1.0/localsearch/client.go @@ -42,7 +42,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/cognitiveservices/v1.0/localsearch/local.go b/services/cognitiveservices/v1.0/localsearch/local.go index 667c0df99d1b..a05e44c4d195 100644 --- a/services/cognitiveservices/v1.0/localsearch/local.go +++ b/services/cognitiveservices/v1.0/localsearch/local.go @@ -37,7 +37,8 @@ func NewLocalClient() LocalClient { return NewLocalClientWithBaseURI(DefaultBaseURI) } -// NewLocalClientWithBaseURI creates an instance of the LocalClient client. +// NewLocalClientWithBaseURI creates an instance of the LocalClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocalClientWithBaseURI(baseURI string) LocalClient { return LocalClient{NewWithBaseURI(baseURI)} } diff --git a/services/cognitiveservices/v1.2/customvision/training/client.go b/services/cognitiveservices/v1.2/customvision/training/client.go index abe1e3b30b34..b64b6b5a3d9f 100644 --- a/services/cognitiveservices/v1.2/customvision/training/client.go +++ b/services/cognitiveservices/v1.2/customvision/training/client.go @@ -48,7 +48,8 @@ func New(aPIKey string) BaseClient { return NewWithBaseURI(DefaultBaseURI, aPIKey) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, aPIKey string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/cognitiveservices/v2.1/customvision/training/client.go b/services/cognitiveservices/v2.1/customvision/training/client.go index 6f2a3c268a84..0c03482acde3 100644 --- a/services/cognitiveservices/v2.1/customvision/training/client.go +++ b/services/cognitiveservices/v2.1/customvision/training/client.go @@ -48,7 +48,8 @@ func New(aPIKey string) BaseClient { return NewWithBaseURI(DefaultBaseURI, aPIKey) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, aPIKey string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go b/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go index a7a5ade13ef8..0f3f24e7fbe5 100644 --- a/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go +++ b/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go @@ -59,6 +59,10 @@ func (client KnowledgebaseClient) Create(ctx context.Context, createKbPayload Cr {Target: "createKbPayload.DefaultAnswerUsedForExtraction", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createKbPayload.DefaultAnswerUsedForExtraction", Name: validation.MaxLength, Rule: 300, Chain: nil}, {Target: "createKbPayload.DefaultAnswerUsedForExtraction", Name: validation.MinLength, Rule: 1, Chain: nil}, + }}, + {Target: "createKbPayload.Language", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createKbPayload.Language", Name: validation.MaxLength, Rule: 100, Chain: nil}, + {Target: "createKbPayload.Language", Name: validation.MinLength, Rule: 1, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("qnamaker.KnowledgebaseClient", "Create", err.Error()) } diff --git a/services/cognitiveservices/v4.0/qnamaker/models.go b/services/cognitiveservices/v4.0/qnamaker/models.go index 691b3d24eddf..66037b09e267 100644 --- a/services/cognitiveservices/v4.0/qnamaker/models.go +++ b/services/cognitiveservices/v4.0/qnamaker/models.go @@ -133,6 +133,8 @@ type CreateKbDTO struct { EnableHierarchicalExtraction *bool `json:"enableHierarchicalExtraction,omitempty"` // DefaultAnswerUsedForExtraction - Text string to be used as the answer in any Q-A which has no extracted answer from the document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True. DefaultAnswerUsedForExtraction *string `json:"defaultAnswerUsedForExtraction,omitempty"` + // Language - Language of the knowledgebase. + Language *string `json:"language,omitempty"` } // CreateKbInputDTO input to create KB. @@ -164,6 +166,8 @@ type EndpointKeysDTO struct { InstalledVersion *string `json:"installedVersion,omitempty"` // LastStableVersion - Latest version of runtime. LastStableVersion *string `json:"lastStableVersion,omitempty"` + // Language - Language setting of runtime. + Language *string `json:"language,omitempty"` } // EndpointSettingsDTO endpoint settings. diff --git a/services/compute/mgmt/2015-06-15/compute/availabilitysets.go b/services/compute/mgmt/2015-06-15/compute/availabilitysets.go index 2de438e924a5..f756204b7772 100644 --- a/services/compute/mgmt/2015-06-15/compute/availabilitysets.go +++ b/services/compute/mgmt/2015-06-15/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2015-06-15/compute/client.go b/services/compute/mgmt/2015-06-15/compute/client.go index a1e31d64440b..cc239fa7a7b9 100644 --- a/services/compute/mgmt/2015-06-15/compute/client.go +++ b/services/compute/mgmt/2015-06-15/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2015-06-15/compute/computeapi/interfaces.go b/services/compute/mgmt/2015-06-15/compute/computeapi/interfaces.go index 88e218580e9a..ade82318ac6e 100644 --- a/services/compute/mgmt/2015-06-15/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2015-06-15/compute/computeapi/interfaces.go @@ -28,6 +28,7 @@ type AvailabilitySetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.OperationStatusResponse, 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) } @@ -66,6 +67,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -86,7 +88,9 @@ type VirtualMachinesClientAPI interface { Generalize(ctx context.Context, resourceGroupName string, VMName string) (result compute.OperationStatusResponse, err error) Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (result compute.VirtualMachineListResultIterator, err error) ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachineSizeListResult, err error) PowerOff(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -105,8 +109,11 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetInstanceView, 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) 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) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetsReimageFuture, err error) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsRestartFuture, err error) @@ -123,6 +130,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsReimageFuture, err error) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsRestartFuture, err error) diff --git a/services/compute/mgmt/2015-06-15/compute/usage.go b/services/compute/mgmt/2015-06-15/compute/usage.go index 7c44484baf36..fec3493740c7 100644 --- a/services/compute/mgmt/2015-06-15/compute/usage.go +++ b/services/compute/mgmt/2015-06-15/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2015-06-15/compute/virtualmachineextensionimages.go index 09ffeb84c8b7..bede93356812 100644 --- a/services/compute/mgmt/2015-06-15/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2015-06-15/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go b/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go index a4744cb12d94..34917e014fe9 100644 --- a/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachineimages.go b/services/compute/mgmt/2015-06-15/compute/virtualmachineimages.go index 669eb041c7d3..bd3ff4e03516 100644 --- a/services/compute/mgmt/2015-06-15/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2015-06-15/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachines.go b/services/compute/mgmt/2015-06-15/compute/virtualmachines.go index 369640339b26..4012a91eddaf 100644 --- a/services/compute/mgmt/2015-06-15/compute/virtualmachines.go +++ b/services/compute/mgmt/2015-06-15/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go b/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go index 01517b1be0b9..15948e4fce61 100644 --- a/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go index f573b742980b..993453305b1f 100644 --- a/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go @@ -35,7 +35,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachinesizes.go b/services/compute/mgmt/2015-06-15/compute/virtualmachinesizes.go index 16e95bdb77dd..cb2dc12d1ff8 100644 --- a/services/compute/mgmt/2015-06-15/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2015-06-15/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/compute/mgmt/2016-03-30/compute/availabilitysets.go b/services/compute/mgmt/2016-03-30/compute/availabilitysets.go index 031e9a021fef..ee3284f55d2b 100644 --- a/services/compute/mgmt/2016-03-30/compute/availabilitysets.go +++ b/services/compute/mgmt/2016-03-30/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2016-03-30/compute/client.go b/services/compute/mgmt/2016-03-30/compute/client.go index 1ed1c8fd77c5..ec38e32a143d 100644 --- a/services/compute/mgmt/2016-03-30/compute/client.go +++ b/services/compute/mgmt/2016-03-30/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2016-03-30/compute/computeapi/interfaces.go b/services/compute/mgmt/2016-03-30/compute/computeapi/interfaces.go index f5203bf82a83..e51613a97265 100644 --- a/services/compute/mgmt/2016-03-30/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2016-03-30/compute/computeapi/interfaces.go @@ -28,8 +28,10 @@ type AvailabilitySetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.OperationStatusResponse, 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) } var _ AvailabilitySetsClientAPI = (*compute.AvailabilitySetsClient)(nil) @@ -63,7 +65,9 @@ type VirtualMachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, err error) GetExtensions(ctx context.Context, resourceGroupName string, VMName string, expand string) (result compute.VirtualMachineExtensionsListResult, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (result compute.VirtualMachineListResultIterator, err error) ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachineSizeListResult, err error) PowerOff(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -87,6 +91,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -107,8 +112,11 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetInstanceView, 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) 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) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetsReimageFuture, err error) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsRestartFuture, err error) @@ -125,6 +133,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsReimageFuture, err error) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsRestartFuture, err error) diff --git a/services/compute/mgmt/2016-03-30/compute/usage.go b/services/compute/mgmt/2016-03-30/compute/usage.go index 31be1f95bc30..65d67a9a6371 100644 --- a/services/compute/mgmt/2016-03-30/compute/usage.go +++ b/services/compute/mgmt/2016-03-30/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2016-03-30/compute/virtualmachineextensionimages.go index 982058833de2..ea51d97c7ce1 100644 --- a/services/compute/mgmt/2016-03-30/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2016-03-30/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go b/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go index 9170a0591c9c..2203d79808a2 100644 --- a/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachineimages.go b/services/compute/mgmt/2016-03-30/compute/virtualmachineimages.go index d0aefadf2bfd..8d7213eb63d9 100644 --- a/services/compute/mgmt/2016-03-30/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2016-03-30/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachines.go b/services/compute/mgmt/2016-03-30/compute/virtualmachines.go index 149aa811fb84..91a129f79978 100644 --- a/services/compute/mgmt/2016-03-30/compute/virtualmachines.go +++ b/services/compute/mgmt/2016-03-30/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go b/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go index df119a5d36e2..b59fe4573d1a 100644 --- a/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go index aa019921e10f..4c7e2b1ca3f8 100644 --- a/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go @@ -35,7 +35,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachinesizes.go b/services/compute/mgmt/2016-03-30/compute/virtualmachinesizes.go index a4bb42ef270b..0835647c5048 100644 --- a/services/compute/mgmt/2016-03-30/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2016-03-30/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/availabilitysets.go b/services/compute/mgmt/2017-03-30/compute/availabilitysets.go index f5a559caa404..d8bc82896ba4 100644 --- a/services/compute/mgmt/2017-03-30/compute/availabilitysets.go +++ b/services/compute/mgmt/2017-03-30/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/client.go b/services/compute/mgmt/2017-03-30/compute/client.go index c6b5ee03b43b..f682ae02aaf5 100644 --- a/services/compute/mgmt/2017-03-30/compute/client.go +++ b/services/compute/mgmt/2017-03-30/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2017-03-30/compute/computeapi/interfaces.go b/services/compute/mgmt/2017-03-30/compute/computeapi/interfaces.go index ffd16dcf7368..2c476e57c39c 100644 --- a/services/compute/mgmt/2017-03-30/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2017-03-30/compute/computeapi/interfaces.go @@ -28,8 +28,10 @@ type AvailabilitySetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.OperationStatusResponse, 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) } var _ AvailabilitySetsClientAPI = (*compute.AvailabilitySetsClient)(nil) @@ -65,9 +67,12 @@ type VirtualMachinesClientAPI interface { GetExtensions(ctx context.Context, resourceGroupName string, VMName string, expand string) (result compute.VirtualMachineExtensionsListResult, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (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) (result compute.VirtualMachinesPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -92,6 +97,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -109,7 +115,9 @@ type ImagesClientAPI interface { 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) } var _ ImagesClientAPI = (*compute.ImagesClient)(nil) @@ -117,6 +125,7 @@ var _ ImagesClientAPI = (*compute.ImagesClient)(nil) // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { List(ctx context.Context) (result compute.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context) (result compute.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*compute.ResourceSkusClient)(nil) @@ -130,8 +139,11 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetInstanceView, 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) 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) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsReimageFuture, err error) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsReimageAllFuture, err error) @@ -149,6 +161,7 @@ type VirtualMachineScaleSetExtensionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result compute.VirtualMachineScaleSetExtensionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result compute.VirtualMachineScaleSetExtension, err error) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultIterator, err error) } var _ VirtualMachineScaleSetExtensionsClientAPI = (*compute.VirtualMachineScaleSetExtensionsClient)(nil) @@ -169,6 +182,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsReimageFuture, err error) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsReimageAllFuture, err error) @@ -185,7 +199,9 @@ type DisksClientAPI interface { 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) } @@ -199,7 +215,9 @@ type SnapshotsClientAPI interface { 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) } @@ -210,6 +228,7 @@ var _ SnapshotsClientAPI = (*compute.SnapshotsClient)(nil) type VirtualMachineRunCommandsClientAPI interface { Get(ctx context.Context, location string, commandID string) (result compute.RunCommandDocument, err error) List(ctx context.Context, location string) (result compute.RunCommandListResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.RunCommandListResultIterator, err error) } var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsClient)(nil) diff --git a/services/compute/mgmt/2017-03-30/compute/disks.go b/services/compute/mgmt/2017-03-30/compute/disks.go index 3256a59cd4e9..cc8518cfe7ed 100644 --- a/services/compute/mgmt/2017-03-30/compute/disks.go +++ b/services/compute/mgmt/2017-03-30/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/images.go b/services/compute/mgmt/2017-03-30/compute/images.go index 69f25f183a65..87de7d33fe6f 100644 --- a/services/compute/mgmt/2017-03-30/compute/images.go +++ b/services/compute/mgmt/2017-03-30/compute/images.go @@ -36,7 +36,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/resourceskus.go b/services/compute/mgmt/2017-03-30/compute/resourceskus.go index 0ac644b3c108..ee79c24b0c01 100644 --- a/services/compute/mgmt/2017-03-30/compute/resourceskus.go +++ b/services/compute/mgmt/2017-03-30/compute/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/snapshots.go b/services/compute/mgmt/2017-03-30/compute/snapshots.go index 9f69ae2ddbc2..2e091fdc9a9c 100644 --- a/services/compute/mgmt/2017-03-30/compute/snapshots.go +++ b/services/compute/mgmt/2017-03-30/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/usage.go b/services/compute/mgmt/2017-03-30/compute/usage.go index cddcca70c05a..83988a84b74e 100644 --- a/services/compute/mgmt/2017-03-30/compute/usage.go +++ b/services/compute/mgmt/2017-03-30/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2017-03-30/compute/virtualmachineextensionimages.go index 18101ae0c659..7e53af04894d 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go b/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go index e51cd61bcb70..a30749439f30 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachineimages.go b/services/compute/mgmt/2017-03-30/compute/virtualmachineimages.go index e44f5f3f4548..7be181c950c0 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachineruncommands.go b/services/compute/mgmt/2017-03-30/compute/virtualmachineruncommands.go index 3c3f17cb82f7..3d308ed28d75 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachineruncommands.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachineruncommands.go @@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachines.go b/services/compute/mgmt/2017-03-30/compute/virtualmachines.go index f1d48123ae3d..917505278fed 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachines.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go index e04760d3c88a..5b1b381b53b4 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go @@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac } // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go index d0bfe4c3e3b6..c5b91c2f0b05 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu } // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go index ad98ce1ef909..de091289db0c 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go index 2b83e95c9c28..31292c06586e 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go @@ -35,7 +35,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinesizes.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinesizes.go index f455360b3716..e58dbc921ea1 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-09-01/skus/client.go b/services/compute/mgmt/2017-09-01/skus/client.go index 5cf887ef68bb..71ba3e8a85ca 100644 --- a/services/compute/mgmt/2017-09-01/skus/client.go +++ b/services/compute/mgmt/2017-09-01/skus/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2017-09-01/skus/resourceskus.go b/services/compute/mgmt/2017-09-01/skus/resourceskus.go index 2a335cfd4b45..7f544cfd4f4f 100644 --- a/services/compute/mgmt/2017-09-01/skus/resourceskus.go +++ b/services/compute/mgmt/2017-09-01/skus/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-09-01/skus/skusapi/interfaces.go b/services/compute/mgmt/2017-09-01/skus/skusapi/interfaces.go index b555201edaf2..7939366d1ca1 100644 --- a/services/compute/mgmt/2017-09-01/skus/skusapi/interfaces.go +++ b/services/compute/mgmt/2017-09-01/skus/skusapi/interfaces.go @@ -25,6 +25,7 @@ import ( // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { List(ctx context.Context) (result skus.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context) (result skus.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*skus.ResourceSkusClient)(nil) diff --git a/services/compute/mgmt/2017-12-01/compute/availabilitysets.go b/services/compute/mgmt/2017-12-01/compute/availabilitysets.go index e849b7225857..d8ae17c42d6d 100644 --- a/services/compute/mgmt/2017-12-01/compute/availabilitysets.go +++ b/services/compute/mgmt/2017-12-01/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/client.go b/services/compute/mgmt/2017-12-01/compute/client.go index b23c9ca74268..d9d0430190ea 100644 --- a/services/compute/mgmt/2017-12-01/compute/client.go +++ b/services/compute/mgmt/2017-12-01/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2017-12-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2017-12-01/compute/computeapi/interfaces.go index 7f26ac6fec7d..2ce36e3eef5d 100644 --- a/services/compute/mgmt/2017-12-01/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2017-12-01/compute/computeapi/interfaces.go @@ -35,8 +35,10 @@ type AvailabilitySetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.OperationStatusResponse, 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) } @@ -73,9 +75,12 @@ type VirtualMachinesClientAPI interface { GetExtensions(ctx context.Context, resourceGroupName string, VMName string, expand string) (result compute.VirtualMachineExtensionsListResult, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (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) (result compute.VirtualMachinesPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -101,6 +106,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -118,7 +124,9 @@ type ImagesClientAPI interface { 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) } @@ -134,9 +142,13 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (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) 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) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsRedeployFuture, err error) @@ -156,6 +168,7 @@ type VirtualMachineScaleSetExtensionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result compute.VirtualMachineScaleSetExtensionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result compute.VirtualMachineScaleSetExtension, err error) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultIterator, err error) } var _ VirtualMachineScaleSetExtensionsClientAPI = (*compute.VirtualMachineScaleSetExtensionsClient)(nil) @@ -176,6 +189,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsRedeployFuture, err error) @@ -200,6 +214,7 @@ var _ LogAnalyticsClientAPI = (*compute.LogAnalyticsClient)(nil) type VirtualMachineRunCommandsClientAPI interface { Get(ctx context.Context, location string, commandID string) (result compute.RunCommandDocument, err error) List(ctx context.Context, location string) (result compute.RunCommandListResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.RunCommandListResultIterator, err error) } var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsClient)(nil) @@ -207,6 +222,7 @@ var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsCl // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { List(ctx context.Context) (result compute.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context) (result compute.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*compute.ResourceSkusClient)(nil) @@ -218,7 +234,9 @@ type DisksClientAPI interface { 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) } @@ -232,7 +250,9 @@ type SnapshotsClientAPI interface { 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) } diff --git a/services/compute/mgmt/2017-12-01/compute/disks.go b/services/compute/mgmt/2017-12-01/compute/disks.go index 3256a59cd4e9..cc8518cfe7ed 100644 --- a/services/compute/mgmt/2017-12-01/compute/disks.go +++ b/services/compute/mgmt/2017-12-01/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/images.go b/services/compute/mgmt/2017-12-01/compute/images.go index 0b4ca5785ee0..63864945c204 100644 --- a/services/compute/mgmt/2017-12-01/compute/images.go +++ b/services/compute/mgmt/2017-12-01/compute/images.go @@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/loganalytics.go b/services/compute/mgmt/2017-12-01/compute/loganalytics.go index 4ff599d27f59..473396931f22 100644 --- a/services/compute/mgmt/2017-12-01/compute/loganalytics.go +++ b/services/compute/mgmt/2017-12-01/compute/loganalytics.go @@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/operations.go b/services/compute/mgmt/2017-12-01/compute/operations.go index bd3fd1a20526..be7bb73d1a85 100644 --- a/services/compute/mgmt/2017-12-01/compute/operations.go +++ b/services/compute/mgmt/2017-12-01/compute/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/resourceskus.go b/services/compute/mgmt/2017-12-01/compute/resourceskus.go index 15b2a399d426..488ea08fc5c7 100644 --- a/services/compute/mgmt/2017-12-01/compute/resourceskus.go +++ b/services/compute/mgmt/2017-12-01/compute/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/snapshots.go b/services/compute/mgmt/2017-12-01/compute/snapshots.go index 9f69ae2ddbc2..2e091fdc9a9c 100644 --- a/services/compute/mgmt/2017-12-01/compute/snapshots.go +++ b/services/compute/mgmt/2017-12-01/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/usage.go b/services/compute/mgmt/2017-12-01/compute/usage.go index 4d9865e0fc05..1957f99e2f94 100644 --- a/services/compute/mgmt/2017-12-01/compute/usage.go +++ b/services/compute/mgmt/2017-12-01/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2017-12-01/compute/virtualmachineextensionimages.go index 969744acd336..a804e6d6e5a3 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2017-12-01/compute/virtualmachineextensions.go index 5251fe760b96..99d5dc1e990e 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachineimages.go b/services/compute/mgmt/2017-12-01/compute/virtualmachineimages.go index c468426964a4..213f30488bf5 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachineruncommands.go b/services/compute/mgmt/2017-12-01/compute/virtualmachineruncommands.go index 18790c7d5a66..b012305f6ffc 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachineruncommands.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachineruncommands.go @@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachines.go b/services/compute/mgmt/2017-12-01/compute/virtualmachines.go index f84acb1ef8b4..1a841cd6417b 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachines.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetextensions.go index 4471f46440e5..6dd33e413233 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetextensions.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetextensions.go @@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac } // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetrollingupgrades.go index 2b44c3eeb44b..97cf3377b6a2 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetrollingupgrades.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu } // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go index 026173f70f1a..a26dbb8972fc 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetvms.go index ec5de8760a4b..45e88a2c4f70 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetvms.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinesizes.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinesizes.go index d15befbc62ea..1dab9a9ed56d 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/availabilitysets.go b/services/compute/mgmt/2018-04-01/compute/availabilitysets.go index a5c179497f06..22f6ffa84ebc 100644 --- a/services/compute/mgmt/2018-04-01/compute/availabilitysets.go +++ b/services/compute/mgmt/2018-04-01/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/client.go b/services/compute/mgmt/2018-04-01/compute/client.go index 49391ea5dd02..e2bd9ad13434 100644 --- a/services/compute/mgmt/2018-04-01/compute/client.go +++ b/services/compute/mgmt/2018-04-01/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2018-04-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2018-04-01/compute/computeapi/interfaces.go index 22f6cd41b575..d2fc9f4902d5 100644 --- a/services/compute/mgmt/2018-04-01/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2018-04-01/compute/computeapi/interfaces.go @@ -36,8 +36,10 @@ type AvailabilitySetsClientAPI interface { 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) } @@ -49,7 +51,9 @@ type ProximityPlacementGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result compute.ProximityPlacementGroup, err error) 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) } @@ -89,6 +93,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -104,9 +109,12 @@ type VirtualMachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (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) (result compute.VirtualMachinesPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -131,7 +139,9 @@ type ImagesClientAPI interface { 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) } @@ -147,9 +157,13 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (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) 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) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsRedeployFuture, err error) @@ -169,6 +183,7 @@ type VirtualMachineScaleSetExtensionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result compute.VirtualMachineScaleSetExtensionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result compute.VirtualMachineScaleSetExtension, err error) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultIterator, err error) } var _ VirtualMachineScaleSetExtensionsClientAPI = (*compute.VirtualMachineScaleSetExtensionsClient)(nil) @@ -189,6 +204,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsRedeployFuture, err error) @@ -214,6 +230,7 @@ var _ LogAnalyticsClientAPI = (*compute.LogAnalyticsClient)(nil) type VirtualMachineRunCommandsClientAPI interface { Get(ctx context.Context, location string, commandID string) (result compute.RunCommandDocument, err error) List(ctx context.Context, location string) (result compute.RunCommandListResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.RunCommandListResultIterator, err error) } var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsClient)(nil) @@ -225,7 +242,9 @@ type DisksClientAPI interface { 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) } @@ -239,7 +258,9 @@ type SnapshotsClientAPI interface { 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) } diff --git a/services/compute/mgmt/2018-04-01/compute/disks.go b/services/compute/mgmt/2018-04-01/compute/disks.go index 30bf8ad8a9de..9a6ff33927b5 100644 --- a/services/compute/mgmt/2018-04-01/compute/disks.go +++ b/services/compute/mgmt/2018-04-01/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/images.go b/services/compute/mgmt/2018-04-01/compute/images.go index e9a755875f39..eb4724ff7bf7 100644 --- a/services/compute/mgmt/2018-04-01/compute/images.go +++ b/services/compute/mgmt/2018-04-01/compute/images.go @@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/loganalytics.go b/services/compute/mgmt/2018-04-01/compute/loganalytics.go index 9521fc4569f3..82154137f6ca 100644 --- a/services/compute/mgmt/2018-04-01/compute/loganalytics.go +++ b/services/compute/mgmt/2018-04-01/compute/loganalytics.go @@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/operations.go b/services/compute/mgmt/2018-04-01/compute/operations.go index 55d6e3336215..fea3903dc3ec 100644 --- a/services/compute/mgmt/2018-04-01/compute/operations.go +++ b/services/compute/mgmt/2018-04-01/compute/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/proximityplacementgroups.go b/services/compute/mgmt/2018-04-01/compute/proximityplacementgroups.go index e40a75e18081..70098805f149 100644 --- a/services/compute/mgmt/2018-04-01/compute/proximityplacementgroups.go +++ b/services/compute/mgmt/2018-04-01/compute/proximityplacementgroups.go @@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/snapshots.go b/services/compute/mgmt/2018-04-01/compute/snapshots.go index 74c41326949f..61d5d6925a79 100644 --- a/services/compute/mgmt/2018-04-01/compute/snapshots.go +++ b/services/compute/mgmt/2018-04-01/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/usage.go b/services/compute/mgmt/2018-04-01/compute/usage.go index 4428bb60f28a..118f92136563 100644 --- a/services/compute/mgmt/2018-04-01/compute/usage.go +++ b/services/compute/mgmt/2018-04-01/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2018-04-01/compute/virtualmachineextensionimages.go index c894238b31f6..7c75bfb4cf46 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go index 77dadac307da..ea0e73dadf0b 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachineimages.go b/services/compute/mgmt/2018-04-01/compute/virtualmachineimages.go index c80e623e6e0c..82124b144c0d 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachineruncommands.go b/services/compute/mgmt/2018-04-01/compute/virtualmachineruncommands.go index 84377510588c..14ec5dd02855 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachineruncommands.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachineruncommands.go @@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachines.go b/services/compute/mgmt/2018-04-01/compute/virtualmachines.go index 021db01cba18..1c1fd19869e6 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachines.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go index 314ae8f5453f..478ec937b1d8 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go @@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac } // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go index 2297c512313f..8caae8a72f6f 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu } // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go index fdc820f2a6ad..0f6c15d715b4 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go index 2d64cef58bf7..8e8d39520f10 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinesizes.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinesizes.go index 51db530b5272..93b0d0adc998 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/availabilitysets.go b/services/compute/mgmt/2018-06-01/compute/availabilitysets.go index e5ba6c3c6832..e2629e71ae9d 100644 --- a/services/compute/mgmt/2018-06-01/compute/availabilitysets.go +++ b/services/compute/mgmt/2018-06-01/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/client.go b/services/compute/mgmt/2018-06-01/compute/client.go index b23c9ca74268..d9d0430190ea 100644 --- a/services/compute/mgmt/2018-06-01/compute/client.go +++ b/services/compute/mgmt/2018-06-01/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2018-06-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2018-06-01/compute/computeapi/interfaces.go index 2e815c1740a8..f5e5e1021d18 100644 --- a/services/compute/mgmt/2018-06-01/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2018-06-01/compute/computeapi/interfaces.go @@ -36,8 +36,10 @@ type AvailabilitySetsClientAPI interface { 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) } @@ -49,7 +51,9 @@ type ProximityPlacementGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result compute.ProximityPlacementGroup, err error) 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) } @@ -89,6 +93,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -104,9 +109,12 @@ type VirtualMachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (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) (result compute.VirtualMachinesPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -132,7 +140,9 @@ type ImagesClientAPI interface { 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) } @@ -148,9 +158,13 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (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) 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) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsRedeployFuture, err error) @@ -170,6 +184,7 @@ type VirtualMachineScaleSetExtensionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result compute.VirtualMachineScaleSetExtensionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result compute.VirtualMachineScaleSetExtension, err error) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultIterator, err error) } var _ VirtualMachineScaleSetExtensionsClientAPI = (*compute.VirtualMachineScaleSetExtensionsClient)(nil) @@ -191,6 +206,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsRedeployFuture, err error) @@ -216,6 +232,7 @@ var _ LogAnalyticsClientAPI = (*compute.LogAnalyticsClient)(nil) type VirtualMachineRunCommandsClientAPI interface { Get(ctx context.Context, location string, commandID string) (result compute.RunCommandDocument, err error) List(ctx context.Context, location string) (result compute.RunCommandListResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.RunCommandListResultIterator, err error) } var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsClient)(nil) @@ -223,6 +240,7 @@ var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsCl // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { List(ctx context.Context) (result compute.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context) (result compute.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*compute.ResourceSkusClient)(nil) @@ -234,7 +252,9 @@ type DisksClientAPI interface { 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) } @@ -248,7 +268,9 @@ type SnapshotsClientAPI interface { 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) } @@ -261,7 +283,9 @@ type GalleriesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleriesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string) (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) } var _ GalleriesClientAPI = (*compute.GalleriesClient)(nil) @@ -272,6 +296,7 @@ type GalleryImagesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImagesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImage, err error) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListPage, err error) + ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListIterator, err error) } var _ GalleryImagesClientAPI = (*compute.GalleryImagesClient)(nil) @@ -282,6 +307,7 @@ type GalleryImageVersionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result compute.GalleryImageVersionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand compute.ReplicationStatusTypes) (result compute.GalleryImageVersion, err error) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListPage, err error) + ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListIterator, err error) } var _ GalleryImageVersionsClientAPI = (*compute.GalleryImageVersionsClient)(nil) @@ -292,7 +318,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result compute.ContainerServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result compute.ContainerService, err error) List(ctx context.Context) (result compute.ContainerServiceListResultPage, err error) + ListComplete(ctx context.Context) (result compute.ContainerServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.ContainerServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.ContainerServiceListResultIterator, err error) } var _ ContainerServicesClientAPI = (*compute.ContainerServicesClient)(nil) diff --git a/services/compute/mgmt/2018-06-01/compute/containerservices.go b/services/compute/mgmt/2018-06-01/compute/containerservices.go index d3192f0de414..0927786a9a4a 100644 --- a/services/compute/mgmt/2018-06-01/compute/containerservices.go +++ b/services/compute/mgmt/2018-06-01/compute/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2018-06-01/compute/disks.go b/services/compute/mgmt/2018-06-01/compute/disks.go index 1f13b7ea2042..de50ea291e6f 100644 --- a/services/compute/mgmt/2018-06-01/compute/disks.go +++ b/services/compute/mgmt/2018-06-01/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/galleries.go b/services/compute/mgmt/2018-06-01/compute/galleries.go index 6cccf1458fdf..59bade2285cf 100644 --- a/services/compute/mgmt/2018-06-01/compute/galleries.go +++ b/services/compute/mgmt/2018-06-01/compute/galleries.go @@ -35,7 +35,8 @@ func NewGalleriesClient(subscriptionID string) GalleriesClient { return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/galleryimages.go b/services/compute/mgmt/2018-06-01/compute/galleryimages.go index 843bc13d6bfc..239c3f444ccd 100644 --- a/services/compute/mgmt/2018-06-01/compute/galleryimages.go +++ b/services/compute/mgmt/2018-06-01/compute/galleryimages.go @@ -36,7 +36,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go b/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go index aac4dcfaf585..c819c5a81bba 100644 --- a/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go +++ b/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go @@ -36,7 +36,9 @@ func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsCl return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/images.go b/services/compute/mgmt/2018-06-01/compute/images.go index 3319614cffc3..eb4006a28599 100644 --- a/services/compute/mgmt/2018-06-01/compute/images.go +++ b/services/compute/mgmt/2018-06-01/compute/images.go @@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/loganalytics.go b/services/compute/mgmt/2018-06-01/compute/loganalytics.go index 96c56f3d3934..120d0344f18c 100644 --- a/services/compute/mgmt/2018-06-01/compute/loganalytics.go +++ b/services/compute/mgmt/2018-06-01/compute/loganalytics.go @@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/operations.go b/services/compute/mgmt/2018-06-01/compute/operations.go index ccb4c44ea6b1..bbfc725bf1c0 100644 --- a/services/compute/mgmt/2018-06-01/compute/operations.go +++ b/services/compute/mgmt/2018-06-01/compute/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/proximityplacementgroups.go b/services/compute/mgmt/2018-06-01/compute/proximityplacementgroups.go index 18750827c44d..e409025396da 100644 --- a/services/compute/mgmt/2018-06-01/compute/proximityplacementgroups.go +++ b/services/compute/mgmt/2018-06-01/compute/proximityplacementgroups.go @@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/resourceskus.go b/services/compute/mgmt/2018-06-01/compute/resourceskus.go index 15b2a399d426..488ea08fc5c7 100644 --- a/services/compute/mgmt/2018-06-01/compute/resourceskus.go +++ b/services/compute/mgmt/2018-06-01/compute/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/snapshots.go b/services/compute/mgmt/2018-06-01/compute/snapshots.go index 53f86d2cac62..b9094a8ffb9b 100644 --- a/services/compute/mgmt/2018-06-01/compute/snapshots.go +++ b/services/compute/mgmt/2018-06-01/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/usage.go b/services/compute/mgmt/2018-06-01/compute/usage.go index 828cec2881ff..04ff4d2a3998 100644 --- a/services/compute/mgmt/2018-06-01/compute/usage.go +++ b/services/compute/mgmt/2018-06-01/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2018-06-01/compute/virtualmachineextensionimages.go index 429d612f0c50..e92e2d006ea8 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go index e64a00eceb7d..dcec6c710098 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachineimages.go b/services/compute/mgmt/2018-06-01/compute/virtualmachineimages.go index b308a5098116..7bf48cf0f614 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachineruncommands.go b/services/compute/mgmt/2018-06-01/compute/virtualmachineruncommands.go index 71d0b09b97b9..2e32155caff6 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachineruncommands.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachineruncommands.go @@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachines.go b/services/compute/mgmt/2018-06-01/compute/virtualmachines.go index 5951c03e434c..9b1fbf093a3d 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachines.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go index 703764b359a4..31070c5a9319 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go @@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac } // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go index c727a5493282..215182e9d841 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu } // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go index e6a45e4f6838..89a1aa3456e1 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go index 843ddfce35ba..8b1bb05fd33f 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinesizes.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinesizes.go index b870400dcb8a..d26cfd5ed615 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/availabilitysets.go b/services/compute/mgmt/2018-10-01/compute/availabilitysets.go index d8e9208e34d2..8ff909271d29 100644 --- a/services/compute/mgmt/2018-10-01/compute/availabilitysets.go +++ b/services/compute/mgmt/2018-10-01/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/client.go b/services/compute/mgmt/2018-10-01/compute/client.go index b23c9ca74268..d9d0430190ea 100644 --- a/services/compute/mgmt/2018-10-01/compute/client.go +++ b/services/compute/mgmt/2018-10-01/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2018-10-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2018-10-01/compute/computeapi/interfaces.go index 790c917d8016..c407fe40d58c 100644 --- a/services/compute/mgmt/2018-10-01/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2018-10-01/compute/computeapi/interfaces.go @@ -36,8 +36,10 @@ type AvailabilitySetsClientAPI interface { 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) } @@ -49,7 +51,9 @@ type ProximityPlacementGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result compute.ProximityPlacementGroup, err error) 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) } @@ -89,6 +93,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -104,9 +109,12 @@ type VirtualMachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (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) (result compute.VirtualMachinesPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -132,7 +140,9 @@ type ImagesClientAPI interface { 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) } @@ -148,9 +158,13 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (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) 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) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsRedeployFuture, err error) @@ -170,6 +184,7 @@ type VirtualMachineScaleSetExtensionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result compute.VirtualMachineScaleSetExtensionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result compute.VirtualMachineScaleSetExtension, err error) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultIterator, err error) } var _ VirtualMachineScaleSetExtensionsClientAPI = (*compute.VirtualMachineScaleSetExtensionsClient)(nil) @@ -191,6 +206,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsRedeployFuture, err error) @@ -216,6 +232,7 @@ var _ LogAnalyticsClientAPI = (*compute.LogAnalyticsClient)(nil) type VirtualMachineRunCommandsClientAPI interface { Get(ctx context.Context, location string, commandID string) (result compute.RunCommandDocument, err error) List(ctx context.Context, location string) (result compute.RunCommandListResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.RunCommandListResultIterator, err error) } var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsClient)(nil) @@ -223,6 +240,7 @@ var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsCl // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { List(ctx context.Context) (result compute.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context) (result compute.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*compute.ResourceSkusClient)(nil) @@ -234,7 +252,9 @@ type DisksClientAPI interface { 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) } @@ -248,7 +268,9 @@ type SnapshotsClientAPI interface { 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) } @@ -261,7 +283,9 @@ type GalleriesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleriesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string) (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) } var _ GalleriesClientAPI = (*compute.GalleriesClient)(nil) @@ -272,6 +296,7 @@ type GalleryImagesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImagesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImage, err error) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListPage, err error) + ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListIterator, err error) } var _ GalleryImagesClientAPI = (*compute.GalleryImagesClient)(nil) @@ -282,6 +307,7 @@ type GalleryImageVersionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result compute.GalleryImageVersionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand compute.ReplicationStatusTypes) (result compute.GalleryImageVersion, err error) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListPage, err error) + ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListIterator, err error) } var _ GalleryImageVersionsClientAPI = (*compute.GalleryImageVersionsClient)(nil) @@ -292,7 +318,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result compute.ContainerServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result compute.ContainerService, err error) List(ctx context.Context) (result compute.ContainerServiceListResultPage, err error) + ListComplete(ctx context.Context) (result compute.ContainerServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.ContainerServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.ContainerServiceListResultIterator, err error) } var _ ContainerServicesClientAPI = (*compute.ContainerServicesClient)(nil) diff --git a/services/compute/mgmt/2018-10-01/compute/containerservices.go b/services/compute/mgmt/2018-10-01/compute/containerservices.go index d3192f0de414..0927786a9a4a 100644 --- a/services/compute/mgmt/2018-10-01/compute/containerservices.go +++ b/services/compute/mgmt/2018-10-01/compute/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2018-10-01/compute/disks.go b/services/compute/mgmt/2018-10-01/compute/disks.go index 1f13b7ea2042..de50ea291e6f 100644 --- a/services/compute/mgmt/2018-10-01/compute/disks.go +++ b/services/compute/mgmt/2018-10-01/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/galleries.go b/services/compute/mgmt/2018-10-01/compute/galleries.go index 6cccf1458fdf..59bade2285cf 100644 --- a/services/compute/mgmt/2018-10-01/compute/galleries.go +++ b/services/compute/mgmt/2018-10-01/compute/galleries.go @@ -35,7 +35,8 @@ func NewGalleriesClient(subscriptionID string) GalleriesClient { return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/galleryimages.go b/services/compute/mgmt/2018-10-01/compute/galleryimages.go index 843bc13d6bfc..239c3f444ccd 100644 --- a/services/compute/mgmt/2018-10-01/compute/galleryimages.go +++ b/services/compute/mgmt/2018-10-01/compute/galleryimages.go @@ -36,7 +36,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go b/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go index aac4dcfaf585..c819c5a81bba 100644 --- a/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go +++ b/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go @@ -36,7 +36,9 @@ func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsCl return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/images.go b/services/compute/mgmt/2018-10-01/compute/images.go index 421ea902bfec..f188419b16e5 100644 --- a/services/compute/mgmt/2018-10-01/compute/images.go +++ b/services/compute/mgmt/2018-10-01/compute/images.go @@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/loganalytics.go b/services/compute/mgmt/2018-10-01/compute/loganalytics.go index f606e0f2f169..6a919bc16a16 100644 --- a/services/compute/mgmt/2018-10-01/compute/loganalytics.go +++ b/services/compute/mgmt/2018-10-01/compute/loganalytics.go @@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/operations.go b/services/compute/mgmt/2018-10-01/compute/operations.go index 3e4e8b317018..9b7acc1f534d 100644 --- a/services/compute/mgmt/2018-10-01/compute/operations.go +++ b/services/compute/mgmt/2018-10-01/compute/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/proximityplacementgroups.go b/services/compute/mgmt/2018-10-01/compute/proximityplacementgroups.go index cc3a95d3716b..ea42597b2d70 100644 --- a/services/compute/mgmt/2018-10-01/compute/proximityplacementgroups.go +++ b/services/compute/mgmt/2018-10-01/compute/proximityplacementgroups.go @@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/resourceskus.go b/services/compute/mgmt/2018-10-01/compute/resourceskus.go index 15b2a399d426..488ea08fc5c7 100644 --- a/services/compute/mgmt/2018-10-01/compute/resourceskus.go +++ b/services/compute/mgmt/2018-10-01/compute/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/snapshots.go b/services/compute/mgmt/2018-10-01/compute/snapshots.go index 53f86d2cac62..b9094a8ffb9b 100644 --- a/services/compute/mgmt/2018-10-01/compute/snapshots.go +++ b/services/compute/mgmt/2018-10-01/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/usage.go b/services/compute/mgmt/2018-10-01/compute/usage.go index 15ae57dc150f..da8b9bae6352 100644 --- a/services/compute/mgmt/2018-10-01/compute/usage.go +++ b/services/compute/mgmt/2018-10-01/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2018-10-01/compute/virtualmachineextensionimages.go index 95f439e1fcd1..c00b9d448fa3 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go index 2f99154b4e3e..7cf7c9673577 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachineimages.go b/services/compute/mgmt/2018-10-01/compute/virtualmachineimages.go index 5d8d460c58ab..5ae85f0a7c70 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachineruncommands.go b/services/compute/mgmt/2018-10-01/compute/virtualmachineruncommands.go index bafdbffe244c..1518a9a8b182 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachineruncommands.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachineruncommands.go @@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachines.go b/services/compute/mgmt/2018-10-01/compute/virtualmachines.go index 0a51c651aeb1..1a0d993cc78e 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachines.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go index 216c0fa52ec9..47ccd12836d6 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go @@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac } // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go index cd103ee80094..fed4dc765abd 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu } // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go index 9f439b4c6b8b..007512e0074a 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go index 8c9375d700d9..e287f1777da9 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinesizes.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinesizes.go index 6039ddef61e0..fdcfd4e27826 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/availabilitysets.go b/services/compute/mgmt/2019-03-01/compute/availabilitysets.go index 853abfc1c95c..c8d01ab32750 100644 --- a/services/compute/mgmt/2019-03-01/compute/availabilitysets.go +++ b/services/compute/mgmt/2019-03-01/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/client.go b/services/compute/mgmt/2019-03-01/compute/client.go index b23c9ca74268..d9d0430190ea 100644 --- a/services/compute/mgmt/2019-03-01/compute/client.go +++ b/services/compute/mgmt/2019-03-01/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2019-03-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2019-03-01/compute/computeapi/interfaces.go index 260b56f5cbef..410f3cb15ef9 100644 --- a/services/compute/mgmt/2019-03-01/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2019-03-01/compute/computeapi/interfaces.go @@ -36,8 +36,10 @@ type AvailabilitySetsClientAPI interface { 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) } @@ -49,7 +51,9 @@ type ProximityPlacementGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result compute.ProximityPlacementGroup, err error) 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) } @@ -61,7 +65,9 @@ type DedicatedHostGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hostGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hostGroupName string) (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) } @@ -73,6 +79,7 @@ type DedicatedHostsClientAPI interface { 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) } @@ -112,6 +119,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -127,9 +135,12 @@ type VirtualMachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (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) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -155,7 +166,9 @@ type ImagesClientAPI interface { 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) } @@ -172,9 +185,13 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (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) 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) @@ -194,6 +211,7 @@ type VirtualMachineScaleSetExtensionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result compute.VirtualMachineScaleSetExtensionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result compute.VirtualMachineScaleSetExtension, err error) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultIterator, err error) } var _ VirtualMachineScaleSetExtensionsClientAPI = (*compute.VirtualMachineScaleSetExtensionsClient)(nil) @@ -215,6 +233,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { 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) @@ -240,6 +259,7 @@ var _ LogAnalyticsClientAPI = (*compute.LogAnalyticsClient)(nil) type VirtualMachineRunCommandsClientAPI interface { Get(ctx context.Context, location string, commandID string) (result compute.RunCommandDocument, err error) List(ctx context.Context, location string) (result compute.RunCommandListResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.RunCommandListResultIterator, err error) } var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsClient)(nil) @@ -247,6 +267,7 @@ var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsCl // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { List(ctx context.Context, filter string) (result compute.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context, filter string) (result compute.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*compute.ResourceSkusClient)(nil) @@ -258,7 +279,9 @@ type DisksClientAPI interface { 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) } @@ -272,7 +295,9 @@ type SnapshotsClientAPI interface { 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) } @@ -285,7 +310,9 @@ type GalleriesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleriesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string) (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) } var _ GalleriesClientAPI = (*compute.GalleriesClient)(nil) @@ -296,6 +323,7 @@ type GalleryImagesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImagesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImage, err error) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListPage, err error) + ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListIterator, err error) } var _ GalleryImagesClientAPI = (*compute.GalleryImagesClient)(nil) @@ -306,6 +334,7 @@ type GalleryImageVersionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result compute.GalleryImageVersionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand compute.ReplicationStatusTypes) (result compute.GalleryImageVersion, err error) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListPage, err error) + ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListIterator, err error) } var _ GalleryImageVersionsClientAPI = (*compute.GalleryImageVersionsClient)(nil) @@ -316,6 +345,7 @@ type GalleryApplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplication, err error) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryApplicationListPage, err error) + ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryApplicationListIterator, err error) } var _ GalleryApplicationsClientAPI = (*compute.GalleryApplicationsClient)(nil) @@ -326,6 +356,7 @@ type GalleryApplicationVersionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (result compute.GalleryApplicationVersionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand compute.ReplicationStatusTypes) (result compute.GalleryApplicationVersion, err error) ListByGalleryApplication(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplicationVersionListPage, err error) + ListByGalleryApplicationComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplicationVersionListIterator, err error) } var _ GalleryApplicationVersionsClientAPI = (*compute.GalleryApplicationVersionsClient)(nil) @@ -336,7 +367,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result compute.ContainerServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result compute.ContainerService, err error) List(ctx context.Context) (result compute.ContainerServiceListResultPage, err error) + ListComplete(ctx context.Context) (result compute.ContainerServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.ContainerServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.ContainerServiceListResultIterator, err error) } var _ ContainerServicesClientAPI = (*compute.ContainerServicesClient)(nil) diff --git a/services/compute/mgmt/2019-03-01/compute/containerservices.go b/services/compute/mgmt/2019-03-01/compute/containerservices.go index d3192f0de414..0927786a9a4a 100644 --- a/services/compute/mgmt/2019-03-01/compute/containerservices.go +++ b/services/compute/mgmt/2019-03-01/compute/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go b/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go index b38de508c0e9..6addbfce94f4 100644 --- a/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go +++ b/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go @@ -36,7 +36,9 @@ func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClie return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go b/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go index 30a1c559ca2b..1314d9f5b3c3 100644 --- a/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go +++ b/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go @@ -36,7 +36,8 @@ func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient { return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/disks.go b/services/compute/mgmt/2019-03-01/compute/disks.go index 31ee32f12f42..837af4a36622 100644 --- a/services/compute/mgmt/2019-03-01/compute/disks.go +++ b/services/compute/mgmt/2019-03-01/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/galleries.go b/services/compute/mgmt/2019-03-01/compute/galleries.go index 0eac41be052f..8442a530c2f9 100644 --- a/services/compute/mgmt/2019-03-01/compute/galleries.go +++ b/services/compute/mgmt/2019-03-01/compute/galleries.go @@ -35,7 +35,8 @@ func NewGalleriesClient(subscriptionID string) GalleriesClient { return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/galleryapplications.go b/services/compute/mgmt/2019-03-01/compute/galleryapplications.go index 58d54bd610c2..7660db7f87f6 100644 --- a/services/compute/mgmt/2019-03-01/compute/galleryapplications.go +++ b/services/compute/mgmt/2019-03-01/compute/galleryapplications.go @@ -35,7 +35,9 @@ func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClie return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/galleryapplicationversions.go b/services/compute/mgmt/2019-03-01/compute/galleryapplicationversions.go index 305216d25f9c..a97da04ef2c3 100644 --- a/services/compute/mgmt/2019-03-01/compute/galleryapplicationversions.go +++ b/services/compute/mgmt/2019-03-01/compute/galleryapplicationversions.go @@ -36,7 +36,9 @@ func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicati return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/galleryimages.go b/services/compute/mgmt/2019-03-01/compute/galleryimages.go index 1d22a9d30a6f..a45facfd5dc5 100644 --- a/services/compute/mgmt/2019-03-01/compute/galleryimages.go +++ b/services/compute/mgmt/2019-03-01/compute/galleryimages.go @@ -36,7 +36,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go b/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go index 0e2d583a4414..b1e068d7a063 100644 --- a/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go +++ b/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go @@ -36,7 +36,9 @@ func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsCl return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/images.go b/services/compute/mgmt/2019-03-01/compute/images.go index e15083ca448d..14d842d80ca0 100644 --- a/services/compute/mgmt/2019-03-01/compute/images.go +++ b/services/compute/mgmt/2019-03-01/compute/images.go @@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/loganalytics.go b/services/compute/mgmt/2019-03-01/compute/loganalytics.go index 8fa8c1b05416..31586dceba62 100644 --- a/services/compute/mgmt/2019-03-01/compute/loganalytics.go +++ b/services/compute/mgmt/2019-03-01/compute/loganalytics.go @@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/operations.go b/services/compute/mgmt/2019-03-01/compute/operations.go index c19b7567d7dd..1ed106a066e9 100644 --- a/services/compute/mgmt/2019-03-01/compute/operations.go +++ b/services/compute/mgmt/2019-03-01/compute/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/proximityplacementgroups.go b/services/compute/mgmt/2019-03-01/compute/proximityplacementgroups.go index a85c1640cd43..edb4bfb8a8d5 100644 --- a/services/compute/mgmt/2019-03-01/compute/proximityplacementgroups.go +++ b/services/compute/mgmt/2019-03-01/compute/proximityplacementgroups.go @@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/resourceskus.go b/services/compute/mgmt/2019-03-01/compute/resourceskus.go index adb402788c87..ee4fdc3652c7 100644 --- a/services/compute/mgmt/2019-03-01/compute/resourceskus.go +++ b/services/compute/mgmt/2019-03-01/compute/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/snapshots.go b/services/compute/mgmt/2019-03-01/compute/snapshots.go index 5fca4e7acd7f..2ecb662b4202 100644 --- a/services/compute/mgmt/2019-03-01/compute/snapshots.go +++ b/services/compute/mgmt/2019-03-01/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/usage.go b/services/compute/mgmt/2019-03-01/compute/usage.go index 36565c1a55c7..4fdbee96d27a 100644 --- a/services/compute/mgmt/2019-03-01/compute/usage.go +++ b/services/compute/mgmt/2019-03-01/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2019-03-01/compute/virtualmachineextensionimages.go index 94adf706bf31..103a285c5c08 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2019-03-01/compute/virtualmachineextensions.go index bb80694c6340..351b0a837628 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachineimages.go b/services/compute/mgmt/2019-03-01/compute/virtualmachineimages.go index 2843539d6a81..bec5a60c78b2 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachineruncommands.go b/services/compute/mgmt/2019-03-01/compute/virtualmachineruncommands.go index e2b53b704796..8967294221ce 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachineruncommands.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachineruncommands.go @@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachines.go b/services/compute/mgmt/2019-03-01/compute/virtualmachines.go index 206e7f4d7257..f948d01eb28f 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachines.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetextensions.go index 041df6980553..8d6fd41afe9a 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetextensions.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetextensions.go @@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac } // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetrollingupgrades.go index 6bdc9f2b3224..00352c55bd01 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetrollingupgrades.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu } // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go index ddde31e7bbfe..76f0e17a11e6 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetvms.go index 6015078f439d..abf89b4ca68b 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetvms.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachinesizes.go b/services/compute/mgmt/2019-03-01/compute/virtualmachinesizes.go index 04bcbb0490d4..e9ec0fe33827 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/availabilitysets.go b/services/compute/mgmt/2019-07-01/compute/availabilitysets.go index 92945517338f..6cd62d64dcc4 100644 --- a/services/compute/mgmt/2019-07-01/compute/availabilitysets.go +++ b/services/compute/mgmt/2019-07-01/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/client.go b/services/compute/mgmt/2019-07-01/compute/client.go index b23c9ca74268..d9d0430190ea 100644 --- a/services/compute/mgmt/2019-07-01/compute/client.go +++ b/services/compute/mgmt/2019-07-01/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/compute/mgmt/2019-07-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2019-07-01/compute/computeapi/interfaces.go index 9cb805379b62..e1a7ce40abb0 100644 --- a/services/compute/mgmt/2019-07-01/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2019-07-01/compute/computeapi/interfaces.go @@ -36,8 +36,10 @@ type AvailabilitySetsClientAPI interface { 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) } @@ -49,7 +51,9 @@ type ProximityPlacementGroupsClientAPI interface { 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) } @@ -61,7 +65,9 @@ type DedicatedHostGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hostGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hostGroupName string) (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) } @@ -73,6 +79,7 @@ type DedicatedHostsClientAPI interface { 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) } @@ -112,6 +119,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -127,9 +135,12 @@ type VirtualMachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, 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) @@ -156,7 +167,9 @@ type ImagesClientAPI interface { 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) } @@ -173,9 +186,13 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (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) 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) @@ -195,6 +212,7 @@ type VirtualMachineScaleSetExtensionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result compute.VirtualMachineScaleSetExtensionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result compute.VirtualMachineScaleSetExtension, err error) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultPage, err error) + 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) } @@ -228,6 +246,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { 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) @@ -253,6 +272,7 @@ var _ LogAnalyticsClientAPI = (*compute.LogAnalyticsClient)(nil) type VirtualMachineRunCommandsClientAPI interface { Get(ctx context.Context, location string, commandID string) (result compute.RunCommandDocument, err error) List(ctx context.Context, location string) (result compute.RunCommandListResultPage, err error) + ListComplete(ctx context.Context, location string) (result compute.RunCommandListResultIterator, err error) } var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsClient)(nil) @@ -260,6 +280,7 @@ var _ VirtualMachineRunCommandsClientAPI = (*compute.VirtualMachineRunCommandsCl // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { List(ctx context.Context, filter string) (result compute.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context, filter string) (result compute.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*compute.ResourceSkusClient)(nil) @@ -271,7 +292,9 @@ type DisksClientAPI interface { 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) } @@ -285,7 +308,9 @@ type SnapshotsClientAPI interface { 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) } @@ -298,7 +323,9 @@ type DiskEncryptionSetsClientAPI interface { 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) 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) } @@ -310,7 +337,9 @@ type GalleriesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleriesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string) (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) } @@ -322,6 +351,7 @@ type GalleryImagesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImagesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImage, err error) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListPage, err error) + 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) } @@ -333,6 +363,7 @@ type GalleryImageVersionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result compute.GalleryImageVersionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand compute.ReplicationStatusTypes) (result compute.GalleryImageVersion, err error) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListPage, err error) + 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) } @@ -344,6 +375,7 @@ type GalleryApplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplication, err error) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryApplicationListPage, err error) + 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) } @@ -355,6 +387,7 @@ type GalleryApplicationVersionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (result compute.GalleryApplicationVersionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand compute.ReplicationStatusTypes) (result compute.GalleryApplicationVersion, err error) ListByGalleryApplication(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplicationVersionListPage, err error) + 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) } @@ -366,7 +399,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result compute.ContainerServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result compute.ContainerService, err error) List(ctx context.Context) (result compute.ContainerServiceListResultPage, err error) + ListComplete(ctx context.Context) (result compute.ContainerServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.ContainerServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result compute.ContainerServiceListResultIterator, err error) } var _ ContainerServicesClientAPI = (*compute.ContainerServicesClient)(nil) diff --git a/services/compute/mgmt/2019-07-01/compute/containerservices.go b/services/compute/mgmt/2019-07-01/compute/containerservices.go index d3192f0de414..0927786a9a4a 100644 --- a/services/compute/mgmt/2019-07-01/compute/containerservices.go +++ b/services/compute/mgmt/2019-07-01/compute/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go b/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go index a3779afa2dbe..556391a29c3f 100644 --- a/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go +++ b/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go @@ -36,7 +36,9 @@ func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClie return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go b/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go index fd90291556a0..36a6a9252f22 100644 --- a/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go +++ b/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go @@ -36,7 +36,8 @@ func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient { return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go b/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go index cb93acdde874..00b531d07737 100644 --- a/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go +++ b/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go @@ -36,7 +36,9 @@ func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/disks.go b/services/compute/mgmt/2019-07-01/compute/disks.go index 4bf336689169..8d4029fd5820 100644 --- a/services/compute/mgmt/2019-07-01/compute/disks.go +++ b/services/compute/mgmt/2019-07-01/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/galleries.go b/services/compute/mgmt/2019-07-01/compute/galleries.go index 8b9486b00652..81138492ffb5 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleries.go +++ b/services/compute/mgmt/2019-07-01/compute/galleries.go @@ -35,7 +35,8 @@ func NewGalleriesClient(subscriptionID string) GalleriesClient { return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/galleryapplications.go b/services/compute/mgmt/2019-07-01/compute/galleryapplications.go index 60651d079a35..492c0b0100ec 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleryapplications.go +++ b/services/compute/mgmt/2019-07-01/compute/galleryapplications.go @@ -35,7 +35,9 @@ func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClie return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go b/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go index e2d3695d8d08..9318a76b660d 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go +++ b/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go @@ -36,7 +36,9 @@ func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicati return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/galleryimages.go b/services/compute/mgmt/2019-07-01/compute/galleryimages.go index c992180ec1e4..42f15f088df7 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleryimages.go +++ b/services/compute/mgmt/2019-07-01/compute/galleryimages.go @@ -36,7 +36,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go b/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go index e1c934b0e17a..fcfc503bd155 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go +++ b/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go @@ -36,7 +36,9 @@ func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsCl return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/images.go b/services/compute/mgmt/2019-07-01/compute/images.go index dfb92b46b0f7..8f58ad69a255 100644 --- a/services/compute/mgmt/2019-07-01/compute/images.go +++ b/services/compute/mgmt/2019-07-01/compute/images.go @@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/loganalytics.go b/services/compute/mgmt/2019-07-01/compute/loganalytics.go index 145d834d59b8..e6dafc2c8b2a 100644 --- a/services/compute/mgmt/2019-07-01/compute/loganalytics.go +++ b/services/compute/mgmt/2019-07-01/compute/loganalytics.go @@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/models.go b/services/compute/mgmt/2019-07-01/compute/models.go index 95ab62fecde3..1a5dc0df11e5 100644 --- a/services/compute/mgmt/2019-07-01/compute/models.go +++ b/services/compute/mgmt/2019-07-01/compute/models.go @@ -6796,6 +6796,8 @@ type ImageReference struct { 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"` // ID - Resource Id ID *string `json:"id,omitempty"` } @@ -10282,7 +10284,7 @@ type VirtualMachineProperties struct { NetworkProfile *NetworkProfile `json:"networkProfile,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 [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).

For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. + // 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 [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).

For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

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"` diff --git a/services/compute/mgmt/2019-07-01/compute/operations.go b/services/compute/mgmt/2019-07-01/compute/operations.go index 021b16328e7d..b1c1a2f783fc 100644 --- a/services/compute/mgmt/2019-07-01/compute/operations.go +++ b/services/compute/mgmt/2019-07-01/compute/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go b/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go index 7e5e9013d31c..627c7bdeaf1d 100644 --- a/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go +++ b/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go @@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/resourceskus.go b/services/compute/mgmt/2019-07-01/compute/resourceskus.go index adb402788c87..ee4fdc3652c7 100644 --- a/services/compute/mgmt/2019-07-01/compute/resourceskus.go +++ b/services/compute/mgmt/2019-07-01/compute/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/snapshots.go b/services/compute/mgmt/2019-07-01/compute/snapshots.go index 3a52fe87388b..6a82fa9c47ec 100644 --- a/services/compute/mgmt/2019-07-01/compute/snapshots.go +++ b/services/compute/mgmt/2019-07-01/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/usage.go b/services/compute/mgmt/2019-07-01/compute/usage.go index 690136c06d54..c86bf73c117f 100644 --- a/services/compute/mgmt/2019-07-01/compute/usage.go +++ b/services/compute/mgmt/2019-07-01/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go b/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go index 7a670a607c82..4fed8fbc6239 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go index a77180ddc688..afce9fdcf571 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go b/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go index e1e830c2f432..bda85ef1161f 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go b/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go index 82be43acfd4c..c41cdd0c5095 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go @@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachines.go b/services/compute/mgmt/2019-07-01/compute/virtualmachines.go index 40f47fff86a9..9d75dd35ca37 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachines.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go index 54d16ac72156..cff74bd7c356 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go @@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac } // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go index c20c01d515cf..98d2275d8964 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu } // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go index 4480fb995562..aec7894e50a4 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go index 3fe6bf51dd22..1c9ea79b7f87 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualM } // NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetVMExtensionsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go index 155e6eee83df..88d6f86e879e 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go b/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go index 55335fe9a518..5390b0d0d7e5 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/consumption/mgmt/2017-11-30/consumption/client.go b/services/consumption/mgmt/2017-11-30/consumption/client.go index bc41b4feb7ea..c2c54294b3b9 100644 --- a/services/consumption/mgmt/2017-11-30/consumption/client.go +++ b/services/consumption/mgmt/2017-11-30/consumption/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/consumption/mgmt/2017-11-30/consumption/consumptionapi/interfaces.go b/services/consumption/mgmt/2017-11-30/consumption/consumptionapi/interfaces.go index 7babff04b54d..6b38bac32363 100644 --- a/services/consumption/mgmt/2017-11-30/consumption/consumptionapi/interfaces.go +++ b/services/consumption/mgmt/2017-11-30/consumption/consumptionapi/interfaces.go @@ -25,6 +25,7 @@ import ( // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -46,6 +47,7 @@ var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(ni // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/consumption/mgmt/2017-11-30/consumption/operations.go b/services/consumption/mgmt/2017-11-30/consumption/operations.go index 47621e4f7ba8..5bd67077cb0b 100644 --- a/services/consumption/mgmt/2017-11-30/consumption/operations.go +++ b/services/consumption/mgmt/2017-11-30/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/consumption/mgmt/2017-11-30/consumption/reservationsdetails.go b/services/consumption/mgmt/2017-11-30/consumption/reservationsdetails.go index 3c3536e370f2..f245cad8fc9c 100644 --- a/services/consumption/mgmt/2017-11-30/consumption/reservationsdetails.go +++ b/services/consumption/mgmt/2017-11-30/consumption/reservationsdetails.go @@ -36,7 +36,9 @@ func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClie return NewReservationsDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client. +// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient { return ReservationsDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2017-11-30/consumption/reservationssummaries.go b/services/consumption/mgmt/2017-11-30/consumption/reservationssummaries.go index fef5076e1060..b7667faffab7 100644 --- a/services/consumption/mgmt/2017-11-30/consumption/reservationssummaries.go +++ b/services/consumption/mgmt/2017-11-30/consumption/reservationssummaries.go @@ -36,7 +36,9 @@ func NewReservationsSummariesClient(subscriptionID string) ReservationsSummaries return NewReservationsSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client. +// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient { return ReservationsSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2017-11-30/consumption/usagedetails.go b/services/consumption/mgmt/2017-11-30/consumption/usagedetails.go index 77ec4fa84fd1..e19d4bcbf482 100644 --- a/services/consumption/mgmt/2017-11-30/consumption/usagedetails.go +++ b/services/consumption/mgmt/2017-11-30/consumption/usagedetails.go @@ -37,7 +37,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-01-31/consumption/budgets.go b/services/consumption/mgmt/2018-01-31/consumption/budgets.go index 0f319d188af0..576c3dbcad98 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/budgets.go +++ b/services/consumption/mgmt/2018-01-31/consumption/budgets.go @@ -37,7 +37,8 @@ func NewBudgetsClient(subscriptionID string) BudgetsClient { return NewBudgetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client. +// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string) BudgetsClient { return BudgetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-01-31/consumption/client.go b/services/consumption/mgmt/2018-01-31/consumption/client.go index e9024b8f0ba0..7bc9f61980b2 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/client.go +++ b/services/consumption/mgmt/2018-01-31/consumption/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/consumption/mgmt/2018-01-31/consumption/consumptionapi/interfaces.go b/services/consumption/mgmt/2018-01-31/consumption/consumptionapi/interfaces.go index bc62e5fef4a9..2f01264fb466 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/consumptionapi/interfaces.go +++ b/services/consumption/mgmt/2018-01-31/consumption/consumptionapi/interfaces.go @@ -26,7 +26,9 @@ import ( // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, expand string, filter string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, expand string, filter string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -34,7 +36,9 @@ var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) // MarketplacesClientAPI contains the set of methods on the MarketplacesClient type. type MarketplacesClientAPI interface { List(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesClientAPI = (*consumption.MarketplacesClient)(nil) @@ -42,7 +46,9 @@ var _ MarketplacesClientAPI = (*consumption.MarketplacesClient)(nil) // ReservationsSummariesClientAPI contains the set of methods on the ReservationsSummariesClient type. type ReservationsSummariesClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) } var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient)(nil) @@ -50,7 +56,9 @@ var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient // ReservationsDetailsClientAPI contains the set of methods on the ReservationsDetailsClient type. type ReservationsDetailsClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) } var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(nil) @@ -64,7 +72,9 @@ type BudgetsClientAPI interface { Get(ctx context.Context, budgetName string) (result consumption.Budget, err error) GetByResourceGroupName(ctx context.Context, resourceGroupName string, budgetName string) (result consumption.Budget, err error) List(ctx context.Context) (result consumption.BudgetsListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.BudgetsListResultIterator, err error) ListByResourceGroupName(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultPage, err error) + ListByResourceGroupNameComplete(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultIterator, err error) } var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) @@ -72,6 +82,7 @@ var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/consumption/mgmt/2018-01-31/consumption/marketplaces.go b/services/consumption/mgmt/2018-01-31/consumption/marketplaces.go index 9f057d3de570..803166c93b74 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-01-31/consumption/marketplaces.go @@ -37,7 +37,8 @@ func NewMarketplacesClient(subscriptionID string) MarketplacesClient { return NewMarketplacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client. +// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesClient { return MarketplacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-01-31/consumption/operations.go b/services/consumption/mgmt/2018-01-31/consumption/operations.go index db4863652413..d2295c533484 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/operations.go +++ b/services/consumption/mgmt/2018-01-31/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/consumption/mgmt/2018-01-31/consumption/pricesheet.go b/services/consumption/mgmt/2018-01-31/consumption/pricesheet.go index 6ebeccb8f196..0f71c46d47f1 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-01-31/consumption/pricesheet.go @@ -37,7 +37,8 @@ func NewPriceSheetClient(subscriptionID string) PriceSheetClient { return NewPriceSheetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client. +// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient { return PriceSheetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-01-31/consumption/reservationsdetails.go b/services/consumption/mgmt/2018-01-31/consumption/reservationsdetails.go index 3ae8374f692f..49023e2fb5c6 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/reservationsdetails.go +++ b/services/consumption/mgmt/2018-01-31/consumption/reservationsdetails.go @@ -36,7 +36,9 @@ func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClie return NewReservationsDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client. +// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient { return ReservationsDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-01-31/consumption/reservationssummaries.go b/services/consumption/mgmt/2018-01-31/consumption/reservationssummaries.go index c43e49fe19c1..7104473f8280 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/reservationssummaries.go +++ b/services/consumption/mgmt/2018-01-31/consumption/reservationssummaries.go @@ -36,7 +36,9 @@ func NewReservationsSummariesClient(subscriptionID string) ReservationsSummaries return NewReservationsSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client. +// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient { return ReservationsSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-01-31/consumption/usagedetails.go b/services/consumption/mgmt/2018-01-31/consumption/usagedetails.go index 32da7fced874..9af73cc45065 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-01-31/consumption/usagedetails.go @@ -37,7 +37,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/budgets.go b/services/consumption/mgmt/2018-03-31/consumption/budgets.go index 356e572d7f88..7595d923517b 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/budgets.go +++ b/services/consumption/mgmt/2018-03-31/consumption/budgets.go @@ -37,7 +37,8 @@ func NewBudgetsClient(subscriptionID string) BudgetsClient { return NewBudgetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client. +// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string) BudgetsClient { return BudgetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/client.go b/services/consumption/mgmt/2018-03-31/consumption/client.go index bb033d154bca..1efeadcb1ab1 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/client.go +++ b/services/consumption/mgmt/2018-03-31/consumption/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/consumption/mgmt/2018-03-31/consumption/consumptionapi/interfaces.go b/services/consumption/mgmt/2018-03-31/consumption/consumptionapi/interfaces.go index a334a4d3d804..a5fe6fee8a80 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/consumptionapi/interfaces.go +++ b/services/consumption/mgmt/2018-03-31/consumption/consumptionapi/interfaces.go @@ -33,7 +33,9 @@ var _ BaseClientAPI = (*consumption.BaseClient)(nil) // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -41,7 +43,9 @@ var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) // UsageDetailsByBillingAccountClientAPI contains the set of methods on the UsageDetailsByBillingAccountClient type. type UsageDetailsByBillingAccountClientAPI interface { List(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsByBillingAccountClientAPI = (*consumption.UsageDetailsByBillingAccountClient)(nil) @@ -49,7 +53,9 @@ var _ UsageDetailsByBillingAccountClientAPI = (*consumption.UsageDetailsByBillin // UsageDetailsByDepartmentClientAPI contains the set of methods on the UsageDetailsByDepartmentClient type. type UsageDetailsByDepartmentClientAPI interface { List(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsByDepartmentClientAPI = (*consumption.UsageDetailsByDepartmentClient)(nil) @@ -57,7 +63,9 @@ var _ UsageDetailsByDepartmentClientAPI = (*consumption.UsageDetailsByDepartment // UsageDetailsByEnrollmentAccountClientAPI contains the set of methods on the UsageDetailsByEnrollmentAccountClient type. type UsageDetailsByEnrollmentAccountClientAPI interface { List(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsByEnrollmentAccountClientAPI = (*consumption.UsageDetailsByEnrollmentAccountClient)(nil) @@ -65,7 +73,9 @@ var _ UsageDetailsByEnrollmentAccountClientAPI = (*consumption.UsageDetailsByEnr // MarketplacesClientAPI contains the set of methods on the MarketplacesClient type. type MarketplacesClientAPI interface { List(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesClientAPI = (*consumption.MarketplacesClient)(nil) @@ -73,7 +83,9 @@ var _ MarketplacesClientAPI = (*consumption.MarketplacesClient)(nil) // MarketplacesByBillingAccountClientAPI contains the set of methods on the MarketplacesByBillingAccountClient type. type MarketplacesByBillingAccountClientAPI interface { List(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesByBillingAccountClientAPI = (*consumption.MarketplacesByBillingAccountClient)(nil) @@ -81,7 +93,9 @@ var _ MarketplacesByBillingAccountClientAPI = (*consumption.MarketplacesByBillin // MarketplacesByDepartmentClientAPI contains the set of methods on the MarketplacesByDepartmentClient type. type MarketplacesByDepartmentClientAPI interface { List(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingPeriod(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesByDepartmentClientAPI = (*consumption.MarketplacesByDepartmentClient)(nil) @@ -89,7 +103,9 @@ var _ MarketplacesByDepartmentClientAPI = (*consumption.MarketplacesByDepartment // MarketplacesByEnrollmentAccountsClientAPI contains the set of methods on the MarketplacesByEnrollmentAccountsClient type. type MarketplacesByEnrollmentAccountsClientAPI interface { List(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingPeriod(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesByEnrollmentAccountsClientAPI = (*consumption.MarketplacesByEnrollmentAccountsClient)(nil) @@ -104,7 +120,9 @@ var _ GetBalancesByBillingAccountClientAPI = (*consumption.GetBalancesByBillingA // ReservationsSummariesClientAPI contains the set of methods on the ReservationsSummariesClient type. type ReservationsSummariesClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) } var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient)(nil) @@ -112,7 +130,9 @@ var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient // ReservationsDetailsClientAPI contains the set of methods on the ReservationsDetailsClient type. type ReservationsDetailsClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) } var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(nil) @@ -120,6 +140,7 @@ var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(ni // ReservationRecommendationsClientAPI contains the set of methods on the ReservationRecommendationsClient type. type ReservationRecommendationsClientAPI interface { List(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultIterator, err error) } var _ ReservationRecommendationsClientAPI = (*consumption.ReservationRecommendationsClient)(nil) @@ -133,7 +154,9 @@ type BudgetsClientAPI interface { Get(ctx context.Context, budgetName string) (result consumption.Budget, err error) GetByResourceGroupName(ctx context.Context, resourceGroupName string, budgetName string) (result consumption.Budget, err error) List(ctx context.Context) (result consumption.BudgetsListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.BudgetsListResultIterator, err error) ListByResourceGroupName(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultPage, err error) + ListByResourceGroupNameComplete(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultIterator, err error) } var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) @@ -141,6 +164,7 @@ var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/consumption/mgmt/2018-03-31/consumption/costtags.go b/services/consumption/mgmt/2018-03-31/consumption/costtags.go index 52914548403b..f37ed75e231e 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/costtags.go +++ b/services/consumption/mgmt/2018-03-31/consumption/costtags.go @@ -36,7 +36,8 @@ func NewCostTagsClient(subscriptionID string) CostTagsClient { return NewCostTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCostTagsClientWithBaseURI creates an instance of the CostTagsClient client. +// NewCostTagsClientWithBaseURI creates an instance of the CostTagsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCostTagsClientWithBaseURI(baseURI string, subscriptionID string) CostTagsClient { return CostTagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/getbalancesbybillingaccount.go b/services/consumption/mgmt/2018-03-31/consumption/getbalancesbybillingaccount.go index 878b55712491..c55306fc72ba 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/getbalancesbybillingaccount.go +++ b/services/consumption/mgmt/2018-03-31/consumption/getbalancesbybillingaccount.go @@ -36,7 +36,9 @@ func NewGetBalancesByBillingAccountClient(subscriptionID string) GetBalancesByBi return NewGetBalancesByBillingAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGetBalancesByBillingAccountClientWithBaseURI creates an instance of the GetBalancesByBillingAccountClient client. +// NewGetBalancesByBillingAccountClientWithBaseURI creates an instance of the GetBalancesByBillingAccountClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewGetBalancesByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) GetBalancesByBillingAccountClient { return GetBalancesByBillingAccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go b/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go index 77a41b450b8a..a6414f598969 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go @@ -37,7 +37,8 @@ func NewMarketplacesClient(subscriptionID string) MarketplacesClient { return NewMarketplacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client. +// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesClient { return MarketplacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go index 8e74732b37c9..0c7221c0c1f4 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go +++ b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go @@ -38,7 +38,8 @@ func NewMarketplacesByBillingAccountClient(subscriptionID string) MarketplacesBy } // NewMarketplacesByBillingAccountClientWithBaseURI creates an instance of the MarketplacesByBillingAccountClient -// 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 NewMarketplacesByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByBillingAccountClient { return MarketplacesByBillingAccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go index bb273617739f..d29bb73cb046 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go +++ b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go @@ -37,7 +37,9 @@ func NewMarketplacesByDepartmentClient(subscriptionID string) MarketplacesByDepa return NewMarketplacesByDepartmentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMarketplacesByDepartmentClientWithBaseURI creates an instance of the MarketplacesByDepartmentClient client. +// NewMarketplacesByDepartmentClientWithBaseURI creates an instance of the MarketplacesByDepartmentClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewMarketplacesByDepartmentClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByDepartmentClient { return MarketplacesByDepartmentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go index 6a619df9f282..d29eb141f6cd 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go +++ b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go @@ -38,7 +38,8 @@ func NewMarketplacesByEnrollmentAccountsClient(subscriptionID string) Marketplac } // NewMarketplacesByEnrollmentAccountsClientWithBaseURI creates an instance of the -// MarketplacesByEnrollmentAccountsClient client. +// MarketplacesByEnrollmentAccountsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMarketplacesByEnrollmentAccountsClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByEnrollmentAccountsClient { return MarketplacesByEnrollmentAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/operations.go b/services/consumption/mgmt/2018-03-31/consumption/operations.go index 624d09534f5f..5cfa4f57643c 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/operations.go +++ b/services/consumption/mgmt/2018-03-31/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/pricesheet.go b/services/consumption/mgmt/2018-03-31/consumption/pricesheet.go index 2ca1d4f42a50..b95e25091e7a 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-03-31/consumption/pricesheet.go @@ -37,7 +37,8 @@ func NewPriceSheetClient(subscriptionID string) PriceSheetClient { return NewPriceSheetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client. +// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient { return PriceSheetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/reservationrecommendations.go b/services/consumption/mgmt/2018-03-31/consumption/reservationrecommendations.go index ccbdf42fc4bd..db50b21b9d2f 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/reservationrecommendations.go +++ b/services/consumption/mgmt/2018-03-31/consumption/reservationrecommendations.go @@ -36,7 +36,9 @@ func NewReservationRecommendationsClient(subscriptionID string) ReservationRecom return NewReservationRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client. +// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReservationRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) ReservationRecommendationsClient { return ReservationRecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/reservationsdetails.go b/services/consumption/mgmt/2018-03-31/consumption/reservationsdetails.go index fe57519af2ad..fa72d1ad87eb 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/reservationsdetails.go +++ b/services/consumption/mgmt/2018-03-31/consumption/reservationsdetails.go @@ -36,7 +36,9 @@ func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClie return NewReservationsDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client. +// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient { return ReservationsDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/reservationssummaries.go b/services/consumption/mgmt/2018-03-31/consumption/reservationssummaries.go index 772c21e138ad..481bc9cd0a06 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/reservationssummaries.go +++ b/services/consumption/mgmt/2018-03-31/consumption/reservationssummaries.go @@ -36,7 +36,9 @@ func NewReservationsSummariesClient(subscriptionID string) ReservationsSummaries return NewReservationsSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client. +// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient { return ReservationsSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/tags.go b/services/consumption/mgmt/2018-03-31/consumption/tags.go index 03de4e143875..d95985745925 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/tags.go +++ b/services/consumption/mgmt/2018-03-31/consumption/tags.go @@ -36,7 +36,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go b/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go index f88097780b57..8a7635251eff 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go @@ -37,7 +37,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go index 469b39fe3eb4..3114e3ce72df 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go +++ b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go @@ -38,7 +38,8 @@ func NewUsageDetailsByBillingAccountClient(subscriptionID string) UsageDetailsBy } // NewUsageDetailsByBillingAccountClientWithBaseURI creates an instance of the UsageDetailsByBillingAccountClient -// 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 NewUsageDetailsByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByBillingAccountClient { return UsageDetailsByBillingAccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go index 5de8de088c9d..081ceabe0e61 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go +++ b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go @@ -37,7 +37,9 @@ func NewUsageDetailsByDepartmentClient(subscriptionID string) UsageDetailsByDepa return NewUsageDetailsByDepartmentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsByDepartmentClientWithBaseURI creates an instance of the UsageDetailsByDepartmentClient client. +// NewUsageDetailsByDepartmentClientWithBaseURI creates an instance of the UsageDetailsByDepartmentClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewUsageDetailsByDepartmentClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByDepartmentClient { return UsageDetailsByDepartmentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go index 7a49809611ba..4e0934600ee0 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go +++ b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go @@ -38,7 +38,8 @@ func NewUsageDetailsByEnrollmentAccountClient(subscriptionID string) UsageDetail } // NewUsageDetailsByEnrollmentAccountClientWithBaseURI creates an instance of the UsageDetailsByEnrollmentAccountClient -// 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 NewUsageDetailsByEnrollmentAccountClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByEnrollmentAccountClient { return UsageDetailsByEnrollmentAccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-05-31/consumption/client.go b/services/consumption/mgmt/2018-05-31/consumption/client.go index 1bd8c604a8f5..cae5d7931c91 100644 --- a/services/consumption/mgmt/2018-05-31/consumption/client.go +++ b/services/consumption/mgmt/2018-05-31/consumption/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/consumption/mgmt/2018-05-31/consumption/consumptionapi/interfaces.go b/services/consumption/mgmt/2018-05-31/consumption/consumptionapi/interfaces.go index 22b8f05489cd..34b748c51b5b 100644 --- a/services/consumption/mgmt/2018-05-31/consumption/consumptionapi/interfaces.go +++ b/services/consumption/mgmt/2018-05-31/consumption/consumptionapi/interfaces.go @@ -33,13 +33,21 @@ var _ PriceSheetClientAPI = (*consumption.PriceSheetClient)(nil) // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingAccount(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingAccountComplete(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListByDepartment(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByDepartmentComplete(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByBillingAccount(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByBillingAccountComplete(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByDepartment(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByDepartmentComplete(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -54,6 +62,7 @@ var _ ForecastsClientAPI = (*consumption.ForecastsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/consumption/mgmt/2018-05-31/consumption/forecasts.go b/services/consumption/mgmt/2018-05-31/consumption/forecasts.go index 143863a48931..32691c3523b7 100644 --- a/services/consumption/mgmt/2018-05-31/consumption/forecasts.go +++ b/services/consumption/mgmt/2018-05-31/consumption/forecasts.go @@ -36,7 +36,8 @@ func NewForecastsClient(subscriptionID string) ForecastsClient { return NewForecastsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client. +// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewForecastsClientWithBaseURI(baseURI string, subscriptionID string) ForecastsClient { return ForecastsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-05-31/consumption/operations.go b/services/consumption/mgmt/2018-05-31/consumption/operations.go index 1eedd3f7c513..e53c0dd1ba08 100644 --- a/services/consumption/mgmt/2018-05-31/consumption/operations.go +++ b/services/consumption/mgmt/2018-05-31/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/consumption/mgmt/2018-05-31/consumption/pricesheet.go b/services/consumption/mgmt/2018-05-31/consumption/pricesheet.go index 4102ff143308..d1cfe59e2a7b 100644 --- a/services/consumption/mgmt/2018-05-31/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-05-31/consumption/pricesheet.go @@ -37,7 +37,8 @@ func NewPriceSheetClient(subscriptionID string) PriceSheetClient { return NewPriceSheetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client. +// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient { return PriceSheetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-05-31/consumption/usagedetails.go b/services/consumption/mgmt/2018-05-31/consumption/usagedetails.go index 1cc0a1beb0ac..00b78729c074 100644 --- a/services/consumption/mgmt/2018-05-31/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-05-31/consumption/usagedetails.go @@ -37,7 +37,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/aggregatedcost.go b/services/consumption/mgmt/2018-06-30/consumption/aggregatedcost.go index bc81dd46c971..ef14d05c1ce6 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/aggregatedcost.go +++ b/services/consumption/mgmt/2018-06-30/consumption/aggregatedcost.go @@ -36,7 +36,8 @@ func NewAggregatedCostClient(subscriptionID string) AggregatedCostClient { return NewAggregatedCostClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client. +// NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAggregatedCostClientWithBaseURI(baseURI string, subscriptionID string) AggregatedCostClient { return AggregatedCostClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/balances.go b/services/consumption/mgmt/2018-06-30/consumption/balances.go index 3e4b8fa16e81..2c502748f5e6 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/balances.go +++ b/services/consumption/mgmt/2018-06-30/consumption/balances.go @@ -36,7 +36,8 @@ func NewBalancesClient(subscriptionID string) BalancesClient { return NewBalancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBalancesClientWithBaseURI creates an instance of the BalancesClient client. +// NewBalancesClientWithBaseURI creates an instance of the BalancesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBalancesClientWithBaseURI(baseURI string, subscriptionID string) BalancesClient { return BalancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/budgets.go b/services/consumption/mgmt/2018-06-30/consumption/budgets.go index 11672c985b4f..e9b99e20e1ad 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/budgets.go +++ b/services/consumption/mgmt/2018-06-30/consumption/budgets.go @@ -37,7 +37,8 @@ func NewBudgetsClient(subscriptionID string) BudgetsClient { return NewBudgetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client. +// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string) BudgetsClient { return BudgetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/client.go b/services/consumption/mgmt/2018-06-30/consumption/client.go index e678f21890c4..accb5421026e 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/client.go +++ b/services/consumption/mgmt/2018-06-30/consumption/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/consumption/mgmt/2018-06-30/consumption/consumptionapi/interfaces.go b/services/consumption/mgmt/2018-06-30/consumption/consumptionapi/interfaces.go index bec4b1c2522d..1842c2fe880e 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/consumptionapi/interfaces.go +++ b/services/consumption/mgmt/2018-06-30/consumption/consumptionapi/interfaces.go @@ -26,15 +26,25 @@ import ( // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingAccount(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingAccountComplete(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListByDepartment(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByDepartmentComplete(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByBillingAccount(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByBillingAccountComplete(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByDepartment(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByDepartmentComplete(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByManagementGroup(ctx context.Context, managementGroupID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByManagementGroupComplete(ctx context.Context, managementGroupID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -42,13 +52,21 @@ var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) // MarketplacesClientAPI contains the set of methods on the MarketplacesClient type. type MarketplacesClientAPI interface { List(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingAccount(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingAccountComplete(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByDepartment(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByDepartmentComplete(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByBillingAccount(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByBillingAccountComplete(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByDepartment(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByDepartmentComplete(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesClientAPI = (*consumption.MarketplacesClient)(nil) @@ -64,7 +82,9 @@ var _ BalancesClientAPI = (*consumption.BalancesClient)(nil) // ReservationsSummariesClientAPI contains the set of methods on the ReservationsSummariesClient type. type ReservationsSummariesClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) } var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient)(nil) @@ -72,7 +92,9 @@ var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient // ReservationsDetailsClientAPI contains the set of methods on the ReservationsDetailsClient type. type ReservationsDetailsClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) } var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(nil) @@ -80,6 +102,7 @@ var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(ni // ReservationRecommendationsClientAPI contains the set of methods on the ReservationRecommendationsClient type. type ReservationRecommendationsClientAPI interface { List(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultIterator, err error) } var _ ReservationRecommendationsClientAPI = (*consumption.ReservationRecommendationsClient)(nil) @@ -93,7 +116,9 @@ type BudgetsClientAPI interface { Get(ctx context.Context, budgetName string) (result consumption.Budget, err error) GetByResourceGroupName(ctx context.Context, resourceGroupName string, budgetName string) (result consumption.Budget, err error) List(ctx context.Context) (result consumption.BudgetsListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.BudgetsListResultIterator, err error) ListByResourceGroupName(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultPage, err error) + ListByResourceGroupNameComplete(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultIterator, err error) } var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) @@ -131,6 +156,7 @@ var _ ForecastsClientAPI = (*consumption.ForecastsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/consumption/mgmt/2018-06-30/consumption/costtags.go b/services/consumption/mgmt/2018-06-30/consumption/costtags.go index e06bf14a0b71..0ff131880cac 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/costtags.go +++ b/services/consumption/mgmt/2018-06-30/consumption/costtags.go @@ -36,7 +36,8 @@ func NewCostTagsClient(subscriptionID string) CostTagsClient { return NewCostTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCostTagsClientWithBaseURI creates an instance of the CostTagsClient client. +// NewCostTagsClientWithBaseURI creates an instance of the CostTagsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCostTagsClientWithBaseURI(baseURI string, subscriptionID string) CostTagsClient { return CostTagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/forecasts.go b/services/consumption/mgmt/2018-06-30/consumption/forecasts.go index 3a43b4b271e6..42f0d6801a16 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/forecasts.go +++ b/services/consumption/mgmt/2018-06-30/consumption/forecasts.go @@ -36,7 +36,8 @@ func NewForecastsClient(subscriptionID string) ForecastsClient { return NewForecastsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client. +// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewForecastsClientWithBaseURI(baseURI string, subscriptionID string) ForecastsClient { return ForecastsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/marketplaces.go b/services/consumption/mgmt/2018-06-30/consumption/marketplaces.go index 7433e37baed0..5aaa09c4639e 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-06-30/consumption/marketplaces.go @@ -37,7 +37,8 @@ func NewMarketplacesClient(subscriptionID string) MarketplacesClient { return NewMarketplacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client. +// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesClient { return MarketplacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/operations.go b/services/consumption/mgmt/2018-06-30/consumption/operations.go index be07f818566f..c0791a97b9bc 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/operations.go +++ b/services/consumption/mgmt/2018-06-30/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/pricesheet.go b/services/consumption/mgmt/2018-06-30/consumption/pricesheet.go index eb5af3b9ef84..0ec4433a5b11 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-06-30/consumption/pricesheet.go @@ -37,7 +37,8 @@ func NewPriceSheetClient(subscriptionID string) PriceSheetClient { return NewPriceSheetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client. +// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient { return PriceSheetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/reservationrecommendations.go b/services/consumption/mgmt/2018-06-30/consumption/reservationrecommendations.go index 25786edb4edc..100eee37c0e5 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/reservationrecommendations.go +++ b/services/consumption/mgmt/2018-06-30/consumption/reservationrecommendations.go @@ -36,7 +36,9 @@ func NewReservationRecommendationsClient(subscriptionID string) ReservationRecom return NewReservationRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client. +// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReservationRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) ReservationRecommendationsClient { return ReservationRecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/reservationsdetails.go b/services/consumption/mgmt/2018-06-30/consumption/reservationsdetails.go index 8d478e4c8e21..11ed00f2ebde 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/reservationsdetails.go +++ b/services/consumption/mgmt/2018-06-30/consumption/reservationsdetails.go @@ -36,7 +36,9 @@ func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClie return NewReservationsDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client. +// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient { return ReservationsDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/reservationssummaries.go b/services/consumption/mgmt/2018-06-30/consumption/reservationssummaries.go index 82b3cf774fd9..91576942b089 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/reservationssummaries.go +++ b/services/consumption/mgmt/2018-06-30/consumption/reservationssummaries.go @@ -36,7 +36,9 @@ func NewReservationsSummariesClient(subscriptionID string) ReservationsSummaries return NewReservationsSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client. +// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient { return ReservationsSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/tags.go b/services/consumption/mgmt/2018-06-30/consumption/tags.go index 9cad162c256a..2ad9d2bc32c2 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/tags.go +++ b/services/consumption/mgmt/2018-06-30/consumption/tags.go @@ -36,7 +36,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-06-30/consumption/usagedetails.go b/services/consumption/mgmt/2018-06-30/consumption/usagedetails.go index bf65ae57c6d4..3761eec07c25 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-06-30/consumption/usagedetails.go @@ -37,7 +37,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/aggregatedcost.go b/services/consumption/mgmt/2018-08-31/consumption/aggregatedcost.go index 356b344e1cf2..db99b365d1bc 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/aggregatedcost.go +++ b/services/consumption/mgmt/2018-08-31/consumption/aggregatedcost.go @@ -36,7 +36,8 @@ func NewAggregatedCostClient(subscriptionID string) AggregatedCostClient { return NewAggregatedCostClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client. +// NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAggregatedCostClientWithBaseURI(baseURI string, subscriptionID string) AggregatedCostClient { return AggregatedCostClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/balances.go b/services/consumption/mgmt/2018-08-31/consumption/balances.go index 1a2b7929af5d..8b42743240fc 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/balances.go +++ b/services/consumption/mgmt/2018-08-31/consumption/balances.go @@ -36,7 +36,8 @@ func NewBalancesClient(subscriptionID string) BalancesClient { return NewBalancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBalancesClientWithBaseURI creates an instance of the BalancesClient client. +// NewBalancesClientWithBaseURI creates an instance of the BalancesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBalancesClientWithBaseURI(baseURI string, subscriptionID string) BalancesClient { return BalancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/budgets.go b/services/consumption/mgmt/2018-08-31/consumption/budgets.go index 359d599b7a93..eab740640707 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/budgets.go +++ b/services/consumption/mgmt/2018-08-31/consumption/budgets.go @@ -37,7 +37,8 @@ func NewBudgetsClient(subscriptionID string) BudgetsClient { return NewBudgetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client. +// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string) BudgetsClient { return BudgetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/charges.go b/services/consumption/mgmt/2018-08-31/consumption/charges.go index 90a248ffb11c..043bff259a4c 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/charges.go +++ b/services/consumption/mgmt/2018-08-31/consumption/charges.go @@ -36,7 +36,8 @@ func NewChargesClient(subscriptionID string) ChargesClient { return NewChargesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChargesClientWithBaseURI creates an instance of the ChargesClient client. +// NewChargesClientWithBaseURI creates an instance of the ChargesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChargesClientWithBaseURI(baseURI string, subscriptionID string) ChargesClient { return ChargesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/client.go b/services/consumption/mgmt/2018-08-31/consumption/client.go index a608e8ed565a..577a6b05a14f 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/client.go +++ b/services/consumption/mgmt/2018-08-31/consumption/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/consumption/mgmt/2018-08-31/consumption/consumptionapi/interfaces.go b/services/consumption/mgmt/2018-08-31/consumption/consumptionapi/interfaces.go index e76e551f425f..a1ab8838f4da 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/consumptionapi/interfaces.go +++ b/services/consumption/mgmt/2018-08-31/consumption/consumptionapi/interfaces.go @@ -26,15 +26,25 @@ import ( // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingAccount(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingAccountComplete(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListByDepartment(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByDepartmentComplete(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByBillingAccount(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByBillingAccountComplete(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByDepartment(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByDepartmentComplete(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByManagementGroup(ctx context.Context, managementGroupID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByManagementGroupComplete(ctx context.Context, managementGroupID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -42,13 +52,21 @@ var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) // MarketplacesClientAPI contains the set of methods on the MarketplacesClient type. type MarketplacesClientAPI interface { List(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingAccount(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingAccountComplete(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByDepartment(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByDepartmentComplete(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByBillingAccount(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByBillingAccountComplete(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByDepartment(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByDepartmentComplete(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesClientAPI = (*consumption.MarketplacesClient)(nil) @@ -64,7 +82,9 @@ var _ BalancesClientAPI = (*consumption.BalancesClient)(nil) // ReservationsSummariesClientAPI contains the set of methods on the ReservationsSummariesClient type. type ReservationsSummariesClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) } var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient)(nil) @@ -72,7 +92,9 @@ var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient // ReservationsDetailsClientAPI contains the set of methods on the ReservationsDetailsClient type. type ReservationsDetailsClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) } var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(nil) @@ -80,6 +102,7 @@ var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(ni // ReservationRecommendationsClientAPI contains the set of methods on the ReservationRecommendationsClient type. type ReservationRecommendationsClientAPI interface { List(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultIterator, err error) } var _ ReservationRecommendationsClientAPI = (*consumption.ReservationRecommendationsClient)(nil) @@ -93,7 +116,9 @@ type BudgetsClientAPI interface { Get(ctx context.Context, budgetName string) (result consumption.Budget, err error) GetByResourceGroupName(ctx context.Context, resourceGroupName string, budgetName string) (result consumption.Budget, err error) List(ctx context.Context) (result consumption.BudgetsListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.BudgetsListResultIterator, err error) ListByResourceGroupName(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultPage, err error) + ListByResourceGroupNameComplete(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultIterator, err error) } var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) @@ -123,6 +148,7 @@ var _ ForecastsClientAPI = (*consumption.ForecastsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/consumption/mgmt/2018-08-31/consumption/forecasts.go b/services/consumption/mgmt/2018-08-31/consumption/forecasts.go index 5665fd50f46c..12e294743347 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/forecasts.go +++ b/services/consumption/mgmt/2018-08-31/consumption/forecasts.go @@ -36,7 +36,8 @@ func NewForecastsClient(subscriptionID string) ForecastsClient { return NewForecastsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client. +// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewForecastsClientWithBaseURI(baseURI string, subscriptionID string) ForecastsClient { return ForecastsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/marketplaces.go b/services/consumption/mgmt/2018-08-31/consumption/marketplaces.go index cde58f2e66cc..1e3feedcacde 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-08-31/consumption/marketplaces.go @@ -37,7 +37,8 @@ func NewMarketplacesClient(subscriptionID string) MarketplacesClient { return NewMarketplacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client. +// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesClient { return MarketplacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/operations.go b/services/consumption/mgmt/2018-08-31/consumption/operations.go index 2f5238958384..47ebb2a4972e 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/operations.go +++ b/services/consumption/mgmt/2018-08-31/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/pricesheet.go b/services/consumption/mgmt/2018-08-31/consumption/pricesheet.go index 6110ba8a868f..da79a7650e4b 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-08-31/consumption/pricesheet.go @@ -37,7 +37,8 @@ func NewPriceSheetClient(subscriptionID string) PriceSheetClient { return NewPriceSheetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client. +// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient { return PriceSheetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/reservationrecommendations.go b/services/consumption/mgmt/2018-08-31/consumption/reservationrecommendations.go index c705683e57f4..f2702394e366 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/reservationrecommendations.go +++ b/services/consumption/mgmt/2018-08-31/consumption/reservationrecommendations.go @@ -36,7 +36,9 @@ func NewReservationRecommendationsClient(subscriptionID string) ReservationRecom return NewReservationRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client. +// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReservationRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) ReservationRecommendationsClient { return ReservationRecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/reservationsdetails.go b/services/consumption/mgmt/2018-08-31/consumption/reservationsdetails.go index 66e61f81ea90..a5f3a2798f14 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/reservationsdetails.go +++ b/services/consumption/mgmt/2018-08-31/consumption/reservationsdetails.go @@ -36,7 +36,9 @@ func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClie return NewReservationsDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client. +// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient { return ReservationsDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/reservationssummaries.go b/services/consumption/mgmt/2018-08-31/consumption/reservationssummaries.go index 9d044b8aa237..416d4f79c810 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/reservationssummaries.go +++ b/services/consumption/mgmt/2018-08-31/consumption/reservationssummaries.go @@ -36,7 +36,9 @@ func NewReservationsSummariesClient(subscriptionID string) ReservationsSummaries return NewReservationsSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client. +// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient { return ReservationsSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/tags.go b/services/consumption/mgmt/2018-08-31/consumption/tags.go index cdc6b9669798..e9f44cf4aa60 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/tags.go +++ b/services/consumption/mgmt/2018-08-31/consumption/tags.go @@ -36,7 +36,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-08-31/consumption/usagedetails.go b/services/consumption/mgmt/2018-08-31/consumption/usagedetails.go index eae562cbaa8d..c5cdd69cd91d 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-08-31/consumption/usagedetails.go @@ -37,7 +37,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/aggregatedcost.go b/services/consumption/mgmt/2018-10-01/consumption/aggregatedcost.go index 5428c67e9534..7f38884e806e 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/aggregatedcost.go +++ b/services/consumption/mgmt/2018-10-01/consumption/aggregatedcost.go @@ -36,7 +36,8 @@ func NewAggregatedCostClient(subscriptionID string) AggregatedCostClient { return NewAggregatedCostClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client. +// NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAggregatedCostClientWithBaseURI(baseURI string, subscriptionID string) AggregatedCostClient { return AggregatedCostClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/balances.go b/services/consumption/mgmt/2018-10-01/consumption/balances.go index 4a7680223337..643957ca0d17 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/balances.go +++ b/services/consumption/mgmt/2018-10-01/consumption/balances.go @@ -36,7 +36,8 @@ func NewBalancesClient(subscriptionID string) BalancesClient { return NewBalancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBalancesClientWithBaseURI creates an instance of the BalancesClient client. +// NewBalancesClientWithBaseURI creates an instance of the BalancesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBalancesClientWithBaseURI(baseURI string, subscriptionID string) BalancesClient { return BalancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/budgets.go b/services/consumption/mgmt/2018-10-01/consumption/budgets.go index 03c2e97c0969..e0536319de0b 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/budgets.go +++ b/services/consumption/mgmt/2018-10-01/consumption/budgets.go @@ -37,7 +37,8 @@ func NewBudgetsClient(subscriptionID string) BudgetsClient { return NewBudgetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client. +// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string) BudgetsClient { return BudgetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/charges.go b/services/consumption/mgmt/2018-10-01/consumption/charges.go index 7c948149b98f..60bc66c5d749 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/charges.go +++ b/services/consumption/mgmt/2018-10-01/consumption/charges.go @@ -36,7 +36,8 @@ func NewChargesClient(subscriptionID string) ChargesClient { return NewChargesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChargesClientWithBaseURI creates an instance of the ChargesClient client. +// NewChargesClientWithBaseURI creates an instance of the ChargesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChargesClientWithBaseURI(baseURI string, subscriptionID string) ChargesClient { return ChargesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/client.go b/services/consumption/mgmt/2018-10-01/consumption/client.go index 784ab7ccc1ea..9cc621e8f69b 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/client.go +++ b/services/consumption/mgmt/2018-10-01/consumption/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/consumption/mgmt/2018-10-01/consumption/consumptionapi/interfaces.go b/services/consumption/mgmt/2018-10-01/consumption/consumptionapi/interfaces.go index ef1aaa444edf..93bc23491832 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/consumptionapi/interfaces.go +++ b/services/consumption/mgmt/2018-10-01/consumption/consumptionapi/interfaces.go @@ -26,15 +26,25 @@ import ( // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingAccount(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingAccountComplete(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListByDepartment(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByDepartmentComplete(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByBillingAccount(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByBillingAccountComplete(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByDepartment(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByDepartmentComplete(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) ListForBillingPeriodByManagementGroup(ctx context.Context, managementGroupID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListForBillingPeriodByManagementGroupComplete(ctx context.Context, managementGroupID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -42,15 +52,25 @@ var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) // MarketplacesClientAPI contains the set of methods on the MarketplacesClient type. type MarketplacesClientAPI interface { List(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingAccount(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingAccountComplete(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByBillingPeriod(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByDepartment(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByDepartmentComplete(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByBillingAccount(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByBillingAccountComplete(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByDepartment(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByDepartmentComplete(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByEnrollmentAccount(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByEnrollmentAccountComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) ListForBillingPeriodByManagementGroup(ctx context.Context, managementGroupID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListForBillingPeriodByManagementGroupComplete(ctx context.Context, managementGroupID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesClientAPI = (*consumption.MarketplacesClient)(nil) @@ -66,7 +86,9 @@ var _ BalancesClientAPI = (*consumption.BalancesClient)(nil) // ReservationsSummariesClientAPI contains the set of methods on the ReservationsSummariesClient type. type ReservationsSummariesClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) } var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient)(nil) @@ -74,7 +96,9 @@ var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient // ReservationsDetailsClientAPI contains the set of methods on the ReservationsDetailsClient type. type ReservationsDetailsClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) } var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(nil) @@ -82,6 +106,7 @@ var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(ni // ReservationRecommendationsClientAPI contains the set of methods on the ReservationRecommendationsClient type. type ReservationRecommendationsClientAPI interface { List(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultIterator, err error) } var _ ReservationRecommendationsClientAPI = (*consumption.ReservationRecommendationsClient)(nil) @@ -95,7 +120,9 @@ type BudgetsClientAPI interface { Get(ctx context.Context, budgetName string) (result consumption.Budget, err error) GetByResourceGroupName(ctx context.Context, resourceGroupName string, budgetName string) (result consumption.Budget, err error) List(ctx context.Context) (result consumption.BudgetsListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.BudgetsListResultIterator, err error) ListByResourceGroupName(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultPage, err error) + ListByResourceGroupNameComplete(ctx context.Context, resourceGroupName string) (result consumption.BudgetsListResultIterator, err error) } var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) @@ -125,6 +152,7 @@ var _ ForecastsClientAPI = (*consumption.ForecastsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/consumption/mgmt/2018-10-01/consumption/forecasts.go b/services/consumption/mgmt/2018-10-01/consumption/forecasts.go index 8024b0cca7a4..bf461473758f 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/forecasts.go +++ b/services/consumption/mgmt/2018-10-01/consumption/forecasts.go @@ -36,7 +36,8 @@ func NewForecastsClient(subscriptionID string) ForecastsClient { return NewForecastsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client. +// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewForecastsClientWithBaseURI(baseURI string, subscriptionID string) ForecastsClient { return ForecastsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/marketplaces.go b/services/consumption/mgmt/2018-10-01/consumption/marketplaces.go index ba14dbfcfb99..e49e1fd9fd2c 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-10-01/consumption/marketplaces.go @@ -37,7 +37,8 @@ func NewMarketplacesClient(subscriptionID string) MarketplacesClient { return NewMarketplacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client. +// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesClient { return MarketplacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/operations.go b/services/consumption/mgmt/2018-10-01/consumption/operations.go index 1e4283e24e81..5e4e4588afa4 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/operations.go +++ b/services/consumption/mgmt/2018-10-01/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/pricesheet.go b/services/consumption/mgmt/2018-10-01/consumption/pricesheet.go index 0233b7d99a91..50e41e432021 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-10-01/consumption/pricesheet.go @@ -37,7 +37,8 @@ func NewPriceSheetClient(subscriptionID string) PriceSheetClient { return NewPriceSheetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client. +// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient { return PriceSheetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/reservationrecommendations.go b/services/consumption/mgmt/2018-10-01/consumption/reservationrecommendations.go index d28e7d904fc3..a2b9a89566df 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/reservationrecommendations.go +++ b/services/consumption/mgmt/2018-10-01/consumption/reservationrecommendations.go @@ -36,7 +36,9 @@ func NewReservationRecommendationsClient(subscriptionID string) ReservationRecom return NewReservationRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client. +// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReservationRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) ReservationRecommendationsClient { return ReservationRecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/reservationsdetails.go b/services/consumption/mgmt/2018-10-01/consumption/reservationsdetails.go index e1b655ae675c..fcec75193e77 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/reservationsdetails.go +++ b/services/consumption/mgmt/2018-10-01/consumption/reservationsdetails.go @@ -36,7 +36,9 @@ func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClie return NewReservationsDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client. +// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient { return ReservationsDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/reservationssummaries.go b/services/consumption/mgmt/2018-10-01/consumption/reservationssummaries.go index 541de41d9817..7921985b5e98 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/reservationssummaries.go +++ b/services/consumption/mgmt/2018-10-01/consumption/reservationssummaries.go @@ -36,7 +36,9 @@ func NewReservationsSummariesClient(subscriptionID string) ReservationsSummaries return NewReservationsSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client. +// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient { return ReservationsSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/tags.go b/services/consumption/mgmt/2018-10-01/consumption/tags.go index 94a05c58c868..cab0d989c96d 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/tags.go +++ b/services/consumption/mgmt/2018-10-01/consumption/tags.go @@ -36,7 +36,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/tenants.go b/services/consumption/mgmt/2018-10-01/consumption/tenants.go index 13b077c50555..d91ec7caaa91 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/tenants.go +++ b/services/consumption/mgmt/2018-10-01/consumption/tenants.go @@ -36,7 +36,8 @@ func NewTenantsClient(subscriptionID string) TenantsClient { return NewTenantsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client. +// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantsClientWithBaseURI(baseURI string, subscriptionID string) TenantsClient { return TenantsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2018-10-01/consumption/usagedetails.go b/services/consumption/mgmt/2018-10-01/consumption/usagedetails.go index 255eb9aa7c76..2e0b920edf7c 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-10-01/consumption/usagedetails.go @@ -37,7 +37,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/aggregatedcost.go b/services/consumption/mgmt/2019-01-01/consumption/aggregatedcost.go index 0d78ad6dc00f..cab9dd7c5f0b 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/aggregatedcost.go +++ b/services/consumption/mgmt/2019-01-01/consumption/aggregatedcost.go @@ -36,7 +36,8 @@ func NewAggregatedCostClient(subscriptionID string) AggregatedCostClient { return NewAggregatedCostClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client. +// NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAggregatedCostClientWithBaseURI(baseURI string, subscriptionID string) AggregatedCostClient { return AggregatedCostClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/balances.go b/services/consumption/mgmt/2019-01-01/consumption/balances.go index 6543869e23b8..e720864498a6 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/balances.go +++ b/services/consumption/mgmt/2019-01-01/consumption/balances.go @@ -36,7 +36,8 @@ func NewBalancesClient(subscriptionID string) BalancesClient { return NewBalancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBalancesClientWithBaseURI creates an instance of the BalancesClient client. +// NewBalancesClientWithBaseURI creates an instance of the BalancesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBalancesClientWithBaseURI(baseURI string, subscriptionID string) BalancesClient { return BalancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/budgets.go b/services/consumption/mgmt/2019-01-01/consumption/budgets.go index 07fc86345f9f..b15fa8ae239c 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/budgets.go +++ b/services/consumption/mgmt/2019-01-01/consumption/budgets.go @@ -37,7 +37,8 @@ func NewBudgetsClient(subscriptionID string) BudgetsClient { return NewBudgetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client. +// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string) BudgetsClient { return BudgetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/charges.go b/services/consumption/mgmt/2019-01-01/consumption/charges.go index b51a54ef9761..7f82a751f4c8 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/charges.go +++ b/services/consumption/mgmt/2019-01-01/consumption/charges.go @@ -36,7 +36,8 @@ func NewChargesClient(subscriptionID string) ChargesClient { return NewChargesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChargesClientWithBaseURI creates an instance of the ChargesClient client. +// NewChargesClientWithBaseURI creates an instance of the ChargesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChargesClientWithBaseURI(baseURI string, subscriptionID string) ChargesClient { return ChargesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/client.go b/services/consumption/mgmt/2019-01-01/consumption/client.go index 9fc24e1ef08d..bb9e5aaa7cbe 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/client.go +++ b/services/consumption/mgmt/2019-01-01/consumption/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/consumption/mgmt/2019-01-01/consumption/consumptionapi/interfaces.go b/services/consumption/mgmt/2019-01-01/consumption/consumptionapi/interfaces.go index a4d15ecee905..f7897bf18744 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/consumptionapi/interfaces.go +++ b/services/consumption/mgmt/2019-01-01/consumption/consumptionapi/interfaces.go @@ -26,6 +26,7 @@ import ( // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32, apply string) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -33,6 +34,7 @@ var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) // MarketplacesClientAPI contains the set of methods on the MarketplacesClient type. type MarketplacesClientAPI interface { List(ctx context.Context, scope string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultPage, err error) + ListComplete(ctx context.Context, scope string, filter string, top *int32, skiptoken string) (result consumption.MarketplacesListResultIterator, err error) } var _ MarketplacesClientAPI = (*consumption.MarketplacesClient)(nil) @@ -43,6 +45,7 @@ type BudgetsClientAPI interface { Delete(ctx context.Context, scope string, budgetName string) (result autorest.Response, err error) Get(ctx context.Context, scope string, budgetName string) (result consumption.Budget, err error) List(ctx context.Context, scope string) (result consumption.BudgetsListResultPage, err error) + ListComplete(ctx context.Context, scope string) (result consumption.BudgetsListResultIterator, err error) } var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) @@ -72,7 +75,9 @@ var _ BalancesClientAPI = (*consumption.BalancesClient)(nil) // ReservationsSummariesClientAPI contains the set of methods on the ReservationsSummariesClient type. type ReservationsSummariesClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, grain consumption.Datagrain, filter string) (result consumption.ReservationSummariesListResultIterator, err error) } var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient)(nil) @@ -80,7 +85,9 @@ var _ ReservationsSummariesClientAPI = (*consumption.ReservationsSummariesClient // ReservationsDetailsClientAPI contains the set of methods on the ReservationsDetailsClient type. type ReservationsDetailsClientAPI interface { ListByReservationOrder(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultPage, err error) + ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result consumption.ReservationDetailsListResultIterator, err error) } var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(nil) @@ -88,6 +95,7 @@ var _ ReservationsDetailsClientAPI = (*consumption.ReservationsDetailsClient)(ni // ReservationRecommendationsClientAPI contains the set of methods on the ReservationRecommendationsClient type. type ReservationRecommendationsClientAPI interface { List(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result consumption.ReservationRecommendationsListResultIterator, err error) } var _ ReservationRecommendationsClientAPI = (*consumption.ReservationRecommendationsClient)(nil) @@ -110,6 +118,7 @@ var _ ForecastsClientAPI = (*consumption.ForecastsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/consumption/mgmt/2019-01-01/consumption/forecasts.go b/services/consumption/mgmt/2019-01-01/consumption/forecasts.go index 9a8445c94cf0..cffce4bdc017 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/forecasts.go +++ b/services/consumption/mgmt/2019-01-01/consumption/forecasts.go @@ -36,7 +36,8 @@ func NewForecastsClient(subscriptionID string) ForecastsClient { return NewForecastsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client. +// NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewForecastsClientWithBaseURI(baseURI string, subscriptionID string) ForecastsClient { return ForecastsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/marketplaces.go b/services/consumption/mgmt/2019-01-01/consumption/marketplaces.go index 4bd352ef42e9..9ce2c0e942e3 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/marketplaces.go +++ b/services/consumption/mgmt/2019-01-01/consumption/marketplaces.go @@ -37,7 +37,8 @@ func NewMarketplacesClient(subscriptionID string) MarketplacesClient { return NewMarketplacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client. +// NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesClient { return MarketplacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/operations.go b/services/consumption/mgmt/2019-01-01/consumption/operations.go index c823097122b7..d91bc6c7f6a5 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/operations.go +++ b/services/consumption/mgmt/2019-01-01/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/pricesheet.go b/services/consumption/mgmt/2019-01-01/consumption/pricesheet.go index aa044683b8cf..37d9f07d3e58 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/pricesheet.go +++ b/services/consumption/mgmt/2019-01-01/consumption/pricesheet.go @@ -37,7 +37,8 @@ func NewPriceSheetClient(subscriptionID string) PriceSheetClient { return NewPriceSheetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client. +// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient { return PriceSheetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/reservationrecommendations.go b/services/consumption/mgmt/2019-01-01/consumption/reservationrecommendations.go index 00ff26dac946..77f42fcae91e 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/reservationrecommendations.go +++ b/services/consumption/mgmt/2019-01-01/consumption/reservationrecommendations.go @@ -36,7 +36,9 @@ func NewReservationRecommendationsClient(subscriptionID string) ReservationRecom return NewReservationRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client. +// NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReservationRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) ReservationRecommendationsClient { return ReservationRecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/reservationsdetails.go b/services/consumption/mgmt/2019-01-01/consumption/reservationsdetails.go index 9216a9cde0d1..180ba90a7ff7 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/reservationsdetails.go +++ b/services/consumption/mgmt/2019-01-01/consumption/reservationsdetails.go @@ -36,7 +36,9 @@ func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClie return NewReservationsDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client. +// NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient { return ReservationsDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/reservationssummaries.go b/services/consumption/mgmt/2019-01-01/consumption/reservationssummaries.go index c464249de45e..c4b24dc8e118 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/reservationssummaries.go +++ b/services/consumption/mgmt/2019-01-01/consumption/reservationssummaries.go @@ -36,7 +36,9 @@ func NewReservationsSummariesClient(subscriptionID string) ReservationsSummaries return NewReservationsSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client. +// NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient { return ReservationsSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/tags.go b/services/consumption/mgmt/2019-01-01/consumption/tags.go index 982add9aa971..e16e3460550b 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/tags.go +++ b/services/consumption/mgmt/2019-01-01/consumption/tags.go @@ -36,7 +36,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/consumption/mgmt/2019-01-01/consumption/usagedetails.go b/services/consumption/mgmt/2019-01-01/consumption/usagedetails.go index 8a4e90e88439..42c42f08818f 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/usagedetails.go +++ b/services/consumption/mgmt/2019-01-01/consumption/usagedetails.go @@ -37,7 +37,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/client.go b/services/containerinstance/mgmt/2018-04-01/containerinstance/client.go index b494c2a07bfa..85f56e4a06dc 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/client.go +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go index 4c5d143e91c3..51cf468fa86f 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroups.go @@ -36,7 +36,8 @@ func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroupusage.go b/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroupusage.go index fefe663823f4..3b1bfe73c721 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroupusage.go +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/containergroupusage.go @@ -35,7 +35,9 @@ func NewContainerGroupUsageClient(subscriptionID string) ContainerGroupUsageClie return NewContainerGroupUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client. +// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerGroupUsageClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupUsageClient { return ContainerGroupUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/containerinstanceapi/interfaces.go b/services/containerinstance/mgmt/2018-04-01/containerinstance/containerinstanceapi/interfaces.go index c69fb6e5f875..8b923d47d056 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/containerinstanceapi/interfaces.go +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/containerinstanceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) List(ctx context.Context) (result containerinstance.ContainerGroupListResultPage, err error) + ListComplete(ctx context.Context) (result containerinstance.ContainerGroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, containerGroupName string, resource containerinstance.Resource) (result containerinstance.ContainerGroup, err error) } diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/containerlogs.go b/services/containerinstance/mgmt/2018-04-01/containerinstance/containerlogs.go index d5077cdd8942..bbbc5d024c53 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/containerlogs.go +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/containerlogs.go @@ -35,7 +35,8 @@ func NewContainerLogsClient(subscriptionID string) ContainerLogsClient { return NewContainerLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client. +// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) ContainerLogsClient { return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/operations.go b/services/containerinstance/mgmt/2018-04-01/containerinstance/operations.go index 38919293b814..2c59f6e814b3 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/operations.go +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerinstance/mgmt/2018-04-01/containerinstance/startcontainer.go b/services/containerinstance/mgmt/2018-04-01/containerinstance/startcontainer.go index c91fdcf2360d..af824f278c6b 100644 --- a/services/containerinstance/mgmt/2018-04-01/containerinstance/startcontainer.go +++ b/services/containerinstance/mgmt/2018-04-01/containerinstance/startcontainer.go @@ -35,7 +35,8 @@ func NewStartContainerClient(subscriptionID string) StartContainerClient { return NewStartContainerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStartContainerClientWithBaseURI creates an instance of the StartContainerClient client. +// NewStartContainerClientWithBaseURI creates an instance of the StartContainerClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStartContainerClientWithBaseURI(baseURI string, subscriptionID string) StartContainerClient { return StartContainerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go b/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go index d52e3559bc40..b49a1b44bae2 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/container.go b/services/containerinstance/mgmt/2018-06-01/containerinstance/container.go index 98df0286eefb..e30c03c1af85 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/container.go +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/container.go @@ -35,7 +35,8 @@ func NewContainerClient(subscriptionID string) ContainerClient { return NewContainerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerClientWithBaseURI creates an instance of the ContainerClient client. +// NewContainerClientWithBaseURI creates an instance of the ContainerClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerClientWithBaseURI(baseURI string, subscriptionID string) ContainerClient { return ContainerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go index 039744100887..e6e69c1a1c7c 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroups.go @@ -36,7 +36,8 @@ func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go b/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go index ce07aa76b2c9..3534ee23d238 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/containergroupusage.go @@ -35,7 +35,9 @@ func NewContainerGroupUsageClient(subscriptionID string) ContainerGroupUsageClie return NewContainerGroupUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client. +// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerGroupUsageClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupUsageClient { return ContainerGroupUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/containerinstanceapi/interfaces.go b/services/containerinstance/mgmt/2018-06-01/containerinstance/containerinstanceapi/interfaces.go index 4adfe8287d6c..61881667fcdc 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/containerinstanceapi/interfaces.go +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/containerinstanceapi/interfaces.go @@ -29,7 +29,9 @@ type ContainerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) List(ctx context.Context) (result containerinstance.ContainerGroupListResultPage, err error) + ListComplete(ctx context.Context) (result containerinstance.ContainerGroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultIterator, err error) Restart(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroupsRestartFuture, err error) Stop(ctx context.Context, resourceGroupName string, containerGroupName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, containerGroupName string, resource containerinstance.Resource) (result containerinstance.ContainerGroup, err error) diff --git a/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go b/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go index 8873ba44904f..d8fad9c45c28 100644 --- a/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go +++ b/services/containerinstance/mgmt/2018-06-01/containerinstance/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/client.go b/services/containerinstance/mgmt/2018-09-01/containerinstance/client.go index a0f20fbb68b4..bc299cdea356 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/client.go +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/container.go b/services/containerinstance/mgmt/2018-09-01/containerinstance/container.go index 463e7c7638ac..364d9e6195fc 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/container.go +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/container.go @@ -35,7 +35,8 @@ func NewContainerClient(subscriptionID string) ContainerClient { return NewContainerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerClientWithBaseURI creates an instance of the ContainerClient client. +// NewContainerClientWithBaseURI creates an instance of the ContainerClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerClientWithBaseURI(baseURI string, subscriptionID string) ContainerClient { return ContainerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroups.go index a2a675b887bb..c1df73e73a18 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroups.go @@ -36,7 +36,8 @@ func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroupusage.go b/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroupusage.go index ac3f287c567b..03dad4c2b820 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroupusage.go +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/containergroupusage.go @@ -35,7 +35,9 @@ func NewContainerGroupUsageClient(subscriptionID string) ContainerGroupUsageClie return NewContainerGroupUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client. +// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerGroupUsageClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupUsageClient { return ContainerGroupUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/containerinstanceapi/interfaces.go b/services/containerinstance/mgmt/2018-09-01/containerinstance/containerinstanceapi/interfaces.go index 0aaed7d0d7b8..13831523ebb7 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/containerinstanceapi/interfaces.go +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/containerinstanceapi/interfaces.go @@ -29,7 +29,9 @@ type ContainerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) List(ctx context.Context) (result containerinstance.ContainerGroupListResultPage, err error) + ListComplete(ctx context.Context) (result containerinstance.ContainerGroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultIterator, err error) Restart(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroupsRestartFuture, err error) Stop(ctx context.Context, resourceGroupName string, containerGroupName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, containerGroupName string, resource containerinstance.Resource) (result containerinstance.ContainerGroup, err error) diff --git a/services/containerinstance/mgmt/2018-09-01/containerinstance/operations.go b/services/containerinstance/mgmt/2018-09-01/containerinstance/operations.go index 5687b37b5229..6d7da96fcec3 100644 --- a/services/containerinstance/mgmt/2018-09-01/containerinstance/operations.go +++ b/services/containerinstance/mgmt/2018-09-01/containerinstance/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go b/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go index 86b35d56d51c..23970e387e53 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go b/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go index d2c454561ed7..56366d98a42e 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go @@ -35,7 +35,8 @@ func NewContainerClient(subscriptionID string) ContainerClient { return NewContainerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerClientWithBaseURI creates an instance of the ContainerClient client. +// NewContainerClientWithBaseURI creates an instance of the ContainerClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerClientWithBaseURI(baseURI string, subscriptionID string) ContainerClient { return ContainerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go b/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go index 8467499652a7..37367bd55471 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go @@ -36,7 +36,8 @@ func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go b/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go index f4933f9a5c4f..6b92ed52015e 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go @@ -35,7 +35,9 @@ func NewContainerGroupUsageClient(subscriptionID string) ContainerGroupUsageClie return NewContainerGroupUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client. +// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerGroupUsageClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupUsageClient { return ContainerGroupUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/containerinstanceapi/interfaces.go b/services/containerinstance/mgmt/2018-10-01/containerinstance/containerinstanceapi/interfaces.go index a782941691a5..f491006801dc 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/containerinstanceapi/interfaces.go +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/containerinstanceapi/interfaces.go @@ -37,7 +37,9 @@ type ContainerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) List(ctx context.Context) (result containerinstance.ContainerGroupListResultPage, err error) + ListComplete(ctx context.Context) (result containerinstance.ContainerGroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultIterator, err error) Restart(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroupsRestartFuture, err error) Start(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroupsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, containerGroupName string) (result autorest.Response, err error) diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go b/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go index 23aa69498ab2..aa5da2025fe9 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go b/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go index d39598eeebbc..139723618835 100644 --- a/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go +++ b/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go @@ -35,7 +35,9 @@ func NewServiceAssociationLinkClient(subscriptionID string) ServiceAssociationLi return NewServiceAssociationLinkClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceAssociationLinkClientWithBaseURI creates an instance of the ServiceAssociationLinkClient client. +// NewServiceAssociationLinkClientWithBaseURI creates an instance of the ServiceAssociationLinkClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewServiceAssociationLinkClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinkClient { return ServiceAssociationLinkClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2017-03-01/containerregistry/client.go b/services/containerregistry/mgmt/2017-03-01/containerregistry/client.go index b2a221f4eb6f..1493cd854c74 100644 --- a/services/containerregistry/mgmt/2017-03-01/containerregistry/client.go +++ b/services/containerregistry/mgmt/2017-03-01/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerregistry/mgmt/2017-03-01/containerregistry/containerregistryapi/interfaces.go b/services/containerregistry/mgmt/2017-03-01/containerregistry/containerregistryapi/interfaces.go index f1f70a73a419..44ede0df020c 100644 --- a/services/containerregistry/mgmt/2017-03-01/containerregistry/containerregistryapi/interfaces.go +++ b/services/containerregistry/mgmt/2017-03-01/containerregistry/containerregistryapi/interfaces.go @@ -30,7 +30,9 @@ type RegistriesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.Registry, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters containerregistry.RegenerateCredentialParameters) (result containerregistry.RegistryListCredentialsResult, err error) Update(ctx context.Context, resourceGroupName string, registryName string, registryUpdateParameters containerregistry.RegistryUpdateParameters) (result containerregistry.Registry, err error) @@ -41,6 +43,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) diff --git a/services/containerregistry/mgmt/2017-03-01/containerregistry/operations.go b/services/containerregistry/mgmt/2017-03-01/containerregistry/operations.go index f647338b0f08..177416a21977 100644 --- a/services/containerregistry/mgmt/2017-03-01/containerregistry/operations.go +++ b/services/containerregistry/mgmt/2017-03-01/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerregistry/mgmt/2017-03-01/containerregistry/registries.go b/services/containerregistry/mgmt/2017-03-01/containerregistry/registries.go index 7f62c7075e4d..1b2292876fa2 100644 --- a/services/containerregistry/mgmt/2017-03-01/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2017-03-01/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2017-10-01/containerregistry/client.go b/services/containerregistry/mgmt/2017-10-01/containerregistry/client.go index fef0b24ba7f2..01e2dde6dc47 100644 --- a/services/containerregistry/mgmt/2017-10-01/containerregistry/client.go +++ b/services/containerregistry/mgmt/2017-10-01/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerregistry/mgmt/2017-10-01/containerregistry/containerregistryapi/interfaces.go b/services/containerregistry/mgmt/2017-10-01/containerregistry/containerregistryapi/interfaces.go index 7003c0f2d0ea..44543d225ff9 100644 --- a/services/containerregistry/mgmt/2017-10-01/containerregistry/containerregistryapi/interfaces.go +++ b/services/containerregistry/mgmt/2017-10-01/containerregistry/containerregistryapi/interfaces.go @@ -30,7 +30,9 @@ type RegistriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.Registry, err error) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters containerregistry.ImportImageParameters) (result containerregistry.RegistriesImportImageFuture, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListPolicies(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryPolicies, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) @@ -44,6 +46,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -54,6 +57,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -66,7 +70,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } diff --git a/services/containerregistry/mgmt/2017-10-01/containerregistry/operations.go b/services/containerregistry/mgmt/2017-10-01/containerregistry/operations.go index 6123d75bf384..2eaed86de9f2 100644 --- a/services/containerregistry/mgmt/2017-10-01/containerregistry/operations.go +++ b/services/containerregistry/mgmt/2017-10-01/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go b/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go index 4bd1689296cd..56180d277865 100644 --- a/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go b/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go index f356afa2d4f8..aef18a24a12e 100644 --- a/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go +++ b/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go b/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go index de31f53c3d02..ebe61d50b5ff 100644 --- a/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go +++ b/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/client.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/client.go index b463ed53737b..578a43823145 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/client.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/containerregistryapi/interfaces.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/containerregistryapi/interfaces.go index 1fd41f5019c2..7f37e8b5bfc9 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/containerregistryapi/interfaces.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/containerregistryapi/interfaces.go @@ -31,7 +31,9 @@ type RegistriesClientAPI interface { GetBuildSourceUploadURL(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.SourceUploadDefinition, err error) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters containerregistry.ImportImageParameters) (result containerregistry.RegistriesImportImageFuture, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListPolicies(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryPolicies, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) @@ -46,6 +48,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -56,6 +59,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -68,7 +72,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } @@ -81,6 +87,7 @@ type RunsClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, runID string) (result containerregistry.Run, err error) GetLogSasURL(ctx context.Context, resourceGroupName string, registryName string, runID string) (result containerregistry.RunGetLogResult, err error) List(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result containerregistry.RunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result containerregistry.RunListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, runID string, runUpdateParameters containerregistry.RunUpdateParameters) (result containerregistry.RunsUpdateFuture, err error) } @@ -93,6 +100,7 @@ type TasksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result containerregistry.Task, err error) GetDetails(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result containerregistry.Task, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskUpdateParameters containerregistry.TaskUpdateParameters) (result containerregistry.TasksUpdateFuture, err error) } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/operations.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/operations.go index 6123d75bf384..2eaed86de9f2 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/operations.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/registries.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/registries.go index 18fd04e47ce2..622d176b8a18 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/replications.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/replications.go index f356afa2d4f8..aef18a24a12e 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/replications.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/runs.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/runs.go index 61bf73f553b7..c60110a8b9fe 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/runs.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/runs.go @@ -36,7 +36,8 @@ func NewRunsClient(subscriptionID string) RunsClient { return NewRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunsClientWithBaseURI creates an instance of the RunsClient client. +// NewRunsClientWithBaseURI creates an instance of the RunsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunsClientWithBaseURI(baseURI string, subscriptionID string) RunsClient { return RunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/tasks.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/tasks.go index 7e4733fbfc06..085b4c9a7985 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/tasks.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/tasks.go @@ -36,7 +36,8 @@ func NewTasksClient(subscriptionID string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/webhooks.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/webhooks.go index de31f53c3d02..ebe61d50b5ff 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/webhooks.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/client.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/client.go index b463ed53737b..578a43823145 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/client.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/containerregistryapi/interfaces.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/containerregistryapi/interfaces.go index b1d105670ba1..31346b0129c7 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/containerregistryapi/interfaces.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/containerregistryapi/interfaces.go @@ -31,7 +31,9 @@ type RegistriesClientAPI interface { GetBuildSourceUploadURL(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.SourceUploadDefinition, err error) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters containerregistry.ImportImageParameters) (result containerregistry.RegistriesImportImageFuture, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListPolicies(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryPolicies, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) @@ -46,6 +48,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -56,6 +59,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -68,7 +72,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } @@ -81,6 +87,7 @@ type RunsClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, runID string) (result containerregistry.Run, err error) GetLogSasURL(ctx context.Context, resourceGroupName string, registryName string, runID string) (result containerregistry.RunGetLogResult, err error) List(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result containerregistry.RunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result containerregistry.RunListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, runID string, runUpdateParameters containerregistry.RunUpdateParameters) (result containerregistry.RunsUpdateFuture, err error) } @@ -93,6 +100,7 @@ type TasksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result containerregistry.Task, err error) GetDetails(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result containerregistry.Task, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskUpdateParameters containerregistry.TaskUpdateParameters) (result containerregistry.TasksUpdateFuture, err error) } diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/operations.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/operations.go index 6123d75bf384..2eaed86de9f2 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/operations.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/registries.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/registries.go index 90801f73a5b0..b22a71b73134 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/replications.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/replications.go index f356afa2d4f8..aef18a24a12e 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/replications.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/runs.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/runs.go index 2e5d7733981f..2544e80b23eb 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/runs.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/runs.go @@ -36,7 +36,8 @@ func NewRunsClient(subscriptionID string) RunsClient { return NewRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunsClientWithBaseURI creates an instance of the RunsClient client. +// NewRunsClientWithBaseURI creates an instance of the RunsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunsClientWithBaseURI(baseURI string, subscriptionID string) RunsClient { return RunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/tasks.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/tasks.go index bc3157709dd7..f6be4144dcca 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/tasks.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/tasks.go @@ -36,7 +36,8 @@ func NewTasksClient(subscriptionID string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/webhooks.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/webhooks.go index de31f53c3d02..ebe61d50b5ff 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/webhooks.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/client.go b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/client.go index b463ed53737b..578a43823145 100644 --- a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/client.go +++ b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/containerregistryapi/interfaces.go b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/containerregistryapi/interfaces.go index d2710aab0530..4485fbb5d921 100644 --- a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/containerregistryapi/interfaces.go +++ b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/containerregistryapi/interfaces.go @@ -31,7 +31,9 @@ type RegistriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.Registry, err error) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters containerregistry.ImportImageParameters) (result containerregistry.RegistriesImportImageFuture, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListPolicies(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryPolicies, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) @@ -45,6 +47,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -55,6 +58,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -67,7 +71,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } @@ -80,6 +86,7 @@ type ScopeMapsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string) (result containerregistry.ScopeMapsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string) (result containerregistry.ScopeMap, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ScopeMapListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ScopeMapListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string, scopeMapUpdateParameters containerregistry.ScopeMapUpdateParameters) (result containerregistry.ScopeMapsUpdateFuture, err error) } @@ -91,6 +98,7 @@ type TokensClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, tokenName string) (result containerregistry.TokensDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, tokenName string) (result containerregistry.Token, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TokenListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TokenListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, tokenName string, tokenUpdateParameters containerregistry.TokenUpdateParameters) (result containerregistry.TokensUpdateFuture, err error) } diff --git a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/operations.go b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/operations.go index 6123d75bf384..2eaed86de9f2 100644 --- a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/operations.go +++ b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/registries.go b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/registries.go index 3c38fa63a8c8..db2de9c534bc 100644 --- a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/replications.go b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/replications.go index f356afa2d4f8..aef18a24a12e 100644 --- a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/replications.go +++ b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/scopemaps.go b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/scopemaps.go index 0872a95f4632..dbf7034783a2 100644 --- a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/scopemaps.go +++ b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/scopemaps.go @@ -36,7 +36,8 @@ func NewScopeMapsClient(subscriptionID string) ScopeMapsClient { return NewScopeMapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScopeMapsClientWithBaseURI creates an instance of the ScopeMapsClient client. +// NewScopeMapsClientWithBaseURI creates an instance of the ScopeMapsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScopeMapsClientWithBaseURI(baseURI string, subscriptionID string) ScopeMapsClient { return ScopeMapsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/tokens.go b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/tokens.go index 8a3dafead703..124c140a881f 100644 --- a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/tokens.go +++ b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/tokens.go @@ -36,7 +36,8 @@ func NewTokensClient(subscriptionID string) TokensClient { return NewTokensClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTokensClientWithBaseURI creates an instance of the TokensClient client. +// NewTokensClientWithBaseURI creates an instance of the TokensClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTokensClientWithBaseURI(baseURI string, subscriptionID string) TokensClient { return TokensClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/webhooks.go b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/webhooks.go index de31f53c3d02..ebe61d50b5ff 100644 --- a/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/webhooks.go +++ b/services/containerregistry/mgmt/2019-05-01-preview/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go index b463ed53737b..578a43823145 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/containerregistryapi/interfaces.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/containerregistryapi/interfaces.go index 979ce381290a..be9de4b6c560 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/containerregistryapi/interfaces.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/containerregistryapi/interfaces.go @@ -31,7 +31,9 @@ type RegistriesClientAPI interface { GetBuildSourceUploadURL(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.SourceUploadDefinition, err error) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters containerregistry.ImportImageParameters) (result containerregistry.RegistriesImportImageFuture, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters containerregistry.RegenerateCredentialParameters) (result containerregistry.RegistryListCredentialsResult, err error) @@ -44,6 +46,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -54,6 +57,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -66,7 +70,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } @@ -79,6 +85,7 @@ type RunsClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, runID string) (result containerregistry.Run, err error) GetLogSasURL(ctx context.Context, resourceGroupName string, registryName string, runID string) (result containerregistry.RunGetLogResult, err error) List(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result containerregistry.RunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result containerregistry.RunListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, runID string, runUpdateParameters containerregistry.RunUpdateParameters) (result containerregistry.RunsUpdateFuture, err error) } @@ -91,6 +98,7 @@ type TasksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result containerregistry.Task, err error) GetDetails(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result containerregistry.Task, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskUpdateParameters containerregistry.TaskUpdateParameters) (result containerregistry.TasksUpdateFuture, err error) } diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go index 66c8936b93ef..4453275d8ba6 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go index 2c6601a227ae..cba9cdcc1a1d 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go index 352d05a6a618..5a1e2919c766 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go index 2e5d7733981f..2544e80b23eb 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go @@ -36,7 +36,8 @@ func NewRunsClient(subscriptionID string) RunsClient { return NewRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunsClientWithBaseURI creates an instance of the RunsClient client. +// NewRunsClientWithBaseURI creates an instance of the RunsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunsClientWithBaseURI(baseURI string, subscriptionID string) RunsClient { return RunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go index bc3157709dd7..f6be4144dcca 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go @@ -36,7 +36,8 @@ func NewTasksClient(subscriptionID string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go index 156bbfefb5f6..22483e4f48ed 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/client.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/client.go index b463ed53737b..578a43823145 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/client.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/containerregistryapi/interfaces.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/containerregistryapi/interfaces.go index 7c377d3501ee..6c5c08af0f7e 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/containerregistryapi/interfaces.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/containerregistryapi/interfaces.go @@ -32,7 +32,9 @@ type RegistriesClientAPI interface { GetBuildSourceUploadURL(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.SourceUploadDefinition, err error) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters containerregistry.ImportImageParameters) (result containerregistry.RegistriesImportImageFuture, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters containerregistry.RegenerateCredentialParameters) (result containerregistry.RegistryListCredentialsResult, err error) @@ -45,6 +47,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -55,6 +58,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -67,7 +71,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } @@ -80,6 +86,7 @@ type RunsClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, runID string) (result containerregistry.Run, err error) GetLogSasURL(ctx context.Context, resourceGroupName string, registryName string, runID string) (result containerregistry.RunGetLogResult, err error) List(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result containerregistry.RunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32) (result containerregistry.RunListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, runID string, runUpdateParameters containerregistry.RunUpdateParameters) (result containerregistry.RunsUpdateFuture, err error) } @@ -91,6 +98,7 @@ type TaskRunsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, taskRunName string) (result containerregistry.TaskRunsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, taskRunName string) (result containerregistry.TaskRun, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskRunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskRunListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, taskRunName string, updateParameters containerregistry.TaskRunUpdateParameters) (result containerregistry.TaskRunsUpdateFuture, err error) } @@ -103,6 +111,7 @@ type TasksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result containerregistry.Task, err error) GetDetails(ctx context.Context, resourceGroupName string, registryName string, taskName string) (result containerregistry.Task, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskUpdateParameters containerregistry.TaskUpdateParameters) (result containerregistry.TasksUpdateFuture, err error) } @@ -114,6 +123,7 @@ type ScopeMapsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string) (result containerregistry.ScopeMapsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string) (result containerregistry.ScopeMap, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ScopeMapListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ScopeMapListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, scopeMapName string, scopeMapUpdateParameters containerregistry.ScopeMapUpdateParameters) (result containerregistry.ScopeMapsUpdateFuture, err error) } @@ -125,6 +135,7 @@ type TokensClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, tokenName string) (result containerregistry.TokensDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, tokenName string) (result containerregistry.Token, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TokenListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TokenListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, tokenName string, tokenUpdateParameters containerregistry.TokenUpdateParameters) (result containerregistry.TokensUpdateFuture, err error) } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/operations.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/operations.go index 66c8936b93ef..4453275d8ba6 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/operations.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/registries.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/registries.go index 16cf6c62c4fa..bc0a317fbf92 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/replications.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/replications.go index 352d05a6a618..5a1e2919c766 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/replications.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/runs.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/runs.go index 4fe2f7abe68c..0c818aea46d4 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/runs.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/runs.go @@ -36,7 +36,8 @@ func NewRunsClient(subscriptionID string) RunsClient { return NewRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunsClientWithBaseURI creates an instance of the RunsClient client. +// NewRunsClientWithBaseURI creates an instance of the RunsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunsClientWithBaseURI(baseURI string, subscriptionID string) RunsClient { return RunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/scopemaps.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/scopemaps.go index 0872a95f4632..dbf7034783a2 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/scopemaps.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/scopemaps.go @@ -36,7 +36,8 @@ func NewScopeMapsClient(subscriptionID string) ScopeMapsClient { return NewScopeMapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScopeMapsClientWithBaseURI creates an instance of the ScopeMapsClient client. +// NewScopeMapsClientWithBaseURI creates an instance of the ScopeMapsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScopeMapsClientWithBaseURI(baseURI string, subscriptionID string) ScopeMapsClient { return ScopeMapsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/taskruns.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/taskruns.go index 784174b4bec8..429a677a8cb4 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/taskruns.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/taskruns.go @@ -36,7 +36,8 @@ func NewTaskRunsClient(subscriptionID string) TaskRunsClient { return NewTaskRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTaskRunsClientWithBaseURI creates an instance of the TaskRunsClient client. +// NewTaskRunsClientWithBaseURI creates an instance of the TaskRunsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTaskRunsClientWithBaseURI(baseURI string, subscriptionID string) TaskRunsClient { return TaskRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tasks.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tasks.go index 49daf87d4bba..3ace85a49eb9 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tasks.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tasks.go @@ -36,7 +36,8 @@ func NewTasksClient(subscriptionID string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tokens.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tokens.go index 8a3dafead703..124c140a881f 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tokens.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tokens.go @@ -36,7 +36,8 @@ func NewTokensClient(subscriptionID string) TokensClient { return NewTokensClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTokensClientWithBaseURI creates an instance of the TokensClient client. +// NewTokensClientWithBaseURI creates an instance of the TokensClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTokensClientWithBaseURI(baseURI string, subscriptionID string) TokensClient { return TokensClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/webhooks.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/webhooks.go index 156bbfefb5f6..22483e4f48ed 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/webhooks.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2016-03-30/containerservice/client.go b/services/containerservice/mgmt/2016-03-30/containerservice/client.go index 846298937631..a4c367b90174 100644 --- a/services/containerservice/mgmt/2016-03-30/containerservice/client.go +++ b/services/containerservice/mgmt/2016-03-30/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go b/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go index b5f981b94e3a..4ad7e5c31edc 100644 --- a/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2016-09-30/containerservice/client.go b/services/containerservice/mgmt/2016-09-30/containerservice/client.go index 06f057b5d9bd..f591cc5b55af 100644 --- a/services/containerservice/mgmt/2016-09-30/containerservice/client.go +++ b/services/containerservice/mgmt/2016-09-30/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2016-09-30/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2016-09-30/containerservice/containerserviceapi/interfaces.go index 7e75a771d634..bb359539bd6f 100644 --- a/services/containerservice/mgmt/2016-09-30/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2016-09-30/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) } var _ ContainerServicesClientAPI = (*containerservice.ContainerServicesClient)(nil) diff --git a/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go b/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go index 330976dfbbc5..e6f08d18643a 100644 --- a/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2017-01-31/containerservice/client.go b/services/containerservice/mgmt/2017-01-31/containerservice/client.go index f5d07407edbf..c04761a7e7e6 100644 --- a/services/containerservice/mgmt/2017-01-31/containerservice/client.go +++ b/services/containerservice/mgmt/2017-01-31/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2017-01-31/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2017-01-31/containerservice/containerserviceapi/interfaces.go index eeb5f7b6da9b..0cc0e28338aa 100644 --- a/services/containerservice/mgmt/2017-01-31/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2017-01-31/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) } var _ ContainerServicesClientAPI = (*containerservice.ContainerServicesClient)(nil) diff --git a/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go b/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go index 594b1c8f1175..4dca92bb782e 100644 --- a/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2017-07-01/containerservice/client.go b/services/containerservice/mgmt/2017-07-01/containerservice/client.go index d27853be33c0..41f34bff741f 100644 --- a/services/containerservice/mgmt/2017-07-01/containerservice/client.go +++ b/services/containerservice/mgmt/2017-07-01/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2017-07-01/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2017-07-01/containerservice/containerserviceapi/interfaces.go index 6a3f12f28e33..80326f941686 100644 --- a/services/containerservice/mgmt/2017-07-01/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2017-07-01/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) } var _ ContainerServicesClientAPI = (*containerservice.ContainerServicesClient)(nil) diff --git a/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go b/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go index eac7c50e45ef..010f006acbbf 100644 --- a/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2017-07-01/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -60,34 +62,35 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + }}}}}); err != nil { return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error()) } @@ -119,9 +122,6 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context "api-version": APIVersion, } - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/containerservice/mgmt/2017-07-01/containerservice/models.go b/services/containerservice/mgmt/2017-07-01/containerservice/models.go index 5897a21ccf53..25571b4486b1 100644 --- a/services/containerservice/mgmt/2017-07-01/containerservice/models.go +++ b/services/containerservice/mgmt/2017-07-01/containerservice/models.go @@ -464,48 +464,11 @@ type AgentPoolProfile struct { OsType OSType `json:"osType,omitempty"` } -// Componentsschemascontainerserviceallof1 ... -type Componentsschemascontainerserviceallof1 struct { - // Properties - Properties of the container service. - *Properties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemascontainerserviceallof1. -func (c Componentsschemascontainerserviceallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.Properties != nil { - objectMap["properties"] = c.Properties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemascontainerserviceallof1 struct. -func (c *Componentsschemascontainerserviceallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - c.Properties = &properties - } - } - } - - return nil -} - // ContainerService container service. type ContainerService struct { autorest.Response `json:"-"` + // Properties - Properties of the container service. + *Properties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -516,22 +479,20 @@ type ContainerService struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // Properties - Properties of the container service. - *Properties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ContainerService. func (cs ContainerService) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if cs.Properties != nil { + objectMap["properties"] = cs.Properties + } 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) } @@ -544,6 +505,15 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var properties Properties + err = json.Unmarshal(*v, &properties) + if err != nil { + return err + } + cs.Properties = &properties + } case "id": if v != nil { var ID string @@ -589,15 +559,6 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { } cs.Tags = tags } - case "properties": - if v != nil { - var properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - cs.Properties = &properties - } } } diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/client.go b/services/containerservice/mgmt/2017-08-31/containerservice/client.go index d27853be33c0..858e168f208f 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/client.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/client.go @@ -1,4 +1,4 @@ -// Package containerservice implements the Azure ARM Containerservice service API version 2017-07-01. +// Package containerservice implements the Azure ARM Containerservice service API version . // // The Container Service Client. package containerservice @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2017-08-31/containerservice/containerserviceapi/interfaces.go index d8e17047b25e..f76761be1a9e 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) } var _ ContainerServicesClientAPI = (*containerservice.ContainerServicesClient)(nil) @@ -42,7 +44,9 @@ type ManagedClustersClientAPI interface { GetAccessProfiles(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) } var _ ManagedClustersClientAPI = (*containerservice.ManagedClustersClient)(nil) diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go b/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go index eac7c50e45ef..010f006acbbf 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -60,34 +62,35 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + }}}}}); err != nil { return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error()) } @@ -119,9 +122,6 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context "api-version": APIVersion, } - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go b/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go index 4d0edae44070..e8be5e569fc8 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -60,21 +61,21 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, + }}, }}, - {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}}}}); err != nil { + }}}}}); err != nil { return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error()) } @@ -106,9 +107,6 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, "api-version": APIVersion, } - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/models.go b/services/containerservice/mgmt/2017-08-31/containerservice/models.go index d447755ac9b9..93024ca0850d 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/models.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/models.go @@ -470,126 +470,11 @@ type AgentPoolProfile struct { OsType OSType `json:"osType,omitempty"` } -// Componentsschemascontainerserviceallof1 ... -type Componentsschemascontainerserviceallof1 struct { - // Properties - Properties of the container service. - *Properties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemascontainerserviceallof1. -func (c Componentsschemascontainerserviceallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.Properties != nil { - objectMap["properties"] = c.Properties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemascontainerserviceallof1 struct. -func (c *Componentsschemascontainerserviceallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - c.Properties = &properties - } - } - } - - return nil -} - -// Componentsschemasmanagedclusteraccessprofileallof1 ... -type Componentsschemasmanagedclusteraccessprofileallof1 struct { - // AccessProfile - AccessProfile of a managed cluster. - *AccessProfile `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemasmanagedclusteraccessprofileallof1. -func (c Componentsschemasmanagedclusteraccessprofileallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.AccessProfile != nil { - objectMap["properties"] = c.AccessProfile - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemasmanagedclusteraccessprofileallof1 struct. -func (c *Componentsschemasmanagedclusteraccessprofileallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 accessProfile AccessProfile - err = json.Unmarshal(*v, &accessProfile) - if err != nil { - return err - } - c.AccessProfile = &accessProfile - } - } - } - - return nil -} - -// Componentsschemasmanagedclusterallof1 ... -type Componentsschemasmanagedclusterallof1 struct { - // ManagedClusterProperties - Properties of a managed cluster. - *ManagedClusterProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemasmanagedclusterallof1. -func (c Componentsschemasmanagedclusterallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.ManagedClusterProperties != nil { - objectMap["properties"] = c.ManagedClusterProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemasmanagedclusterallof1 struct. -func (c *Componentsschemasmanagedclusterallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 managedClusterProperties ManagedClusterProperties - err = json.Unmarshal(*v, &managedClusterProperties) - if err != nil { - return err - } - c.ManagedClusterProperties = &managedClusterProperties - } - } - } - - return nil -} - // ContainerService container service. type ContainerService struct { autorest.Response `json:"-"` + // Properties - Properties of the container service. + *Properties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -600,22 +485,20 @@ type ContainerService struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // Properties - Properties of the container service. - *Properties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ContainerService. func (cs ContainerService) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if cs.Properties != nil { + objectMap["properties"] = cs.Properties + } 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) } @@ -628,6 +511,15 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var properties Properties + err = json.Unmarshal(*v, &properties) + if err != nil { + return err + } + cs.Properties = &properties + } case "id": if v != nil { var ID string @@ -673,15 +565,6 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { } cs.Tags = tags } - case "properties": - if v != nil { - var properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - cs.Properties = &properties - } } } @@ -919,6 +802,8 @@ func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult // ManagedCluster managed cluster. type ManagedCluster struct { autorest.Response `json:"-"` + // ManagedClusterProperties - Properties of a managed cluster. + *ManagedClusterProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -929,22 +814,20 @@ type ManagedCluster struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ManagedClusterProperties - Properties of a managed cluster. - *ManagedClusterProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ManagedCluster. func (mc ManagedCluster) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if mc.ManagedClusterProperties != nil { + objectMap["properties"] = mc.ManagedClusterProperties + } if mc.Location != nil { objectMap["location"] = mc.Location } if mc.Tags != nil { objectMap["tags"] = mc.Tags } - if mc.ManagedClusterProperties != nil { - objectMap["properties"] = mc.ManagedClusterProperties - } return json.Marshal(objectMap) } @@ -957,6 +840,15 @@ func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var managedClusterProperties ManagedClusterProperties + err = json.Unmarshal(*v, &managedClusterProperties) + if err != nil { + return err + } + mc.ManagedClusterProperties = &managedClusterProperties + } case "id": if v != nil { var ID string @@ -1002,15 +894,6 @@ func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { } mc.Tags = tags } - case "properties": - if v != nil { - var managedClusterProperties ManagedClusterProperties - err = json.Unmarshal(*v, &managedClusterProperties) - if err != nil { - return err - } - mc.ManagedClusterProperties = &managedClusterProperties - } } } @@ -1020,6 +903,8 @@ func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { // ManagedClusterAccessProfile managed cluster Access Profile. type ManagedClusterAccessProfile struct { autorest.Response `json:"-"` + // AccessProfile - AccessProfile of a managed cluster. + *AccessProfile `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1030,22 +915,20 @@ type ManagedClusterAccessProfile struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // AccessProfile - AccessProfile of a managed cluster. - *AccessProfile `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ManagedClusterAccessProfile. func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if mcap.AccessProfile != nil { + objectMap["properties"] = mcap.AccessProfile + } if mcap.Location != nil { objectMap["location"] = mcap.Location } if mcap.Tags != nil { objectMap["tags"] = mcap.Tags } - if mcap.AccessProfile != nil { - objectMap["properties"] = mcap.AccessProfile - } return json.Marshal(objectMap) } @@ -1058,6 +941,15 @@ func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var accessProfile AccessProfile + err = json.Unmarshal(*v, &accessProfile) + if err != nil { + return err + } + mcap.AccessProfile = &accessProfile + } case "id": if v != nil { var ID string @@ -1103,15 +995,6 @@ func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { } mcap.Tags = tags } - case "properties": - if v != nil { - var accessProfile AccessProfile - err = json.Unmarshal(*v, &accessProfile) - if err != nil { - return err - } - mcap.AccessProfile = &accessProfile - } } } diff --git a/services/containerservice/mgmt/2017-08-31/containerservice/version.go b/services/containerservice/mgmt/2017-08-31/containerservice/version.go index 652b5b209e37..d3bc933a65e4 100644 --- a/services/containerservice/mgmt/2017-08-31/containerservice/version.go +++ b/services/containerservice/mgmt/2017-08-31/containerservice/version.go @@ -21,7 +21,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.Number + " containerservice/2017-07-01" + return "Azure-SDK-For-Go/" + version.Number + " containerservice/2017-08-31" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/client.go b/services/containerservice/mgmt/2017-09-30/containerservice/client.go index d27853be33c0..858e168f208f 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/client.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/client.go @@ -1,4 +1,4 @@ -// Package containerservice implements the Azure ARM Containerservice service API version 2017-07-01. +// Package containerservice implements the Azure ARM Containerservice service API version . // // The Container Service Client. package containerservice @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2017-09-30/containerservice/containerserviceapi/interfaces.go index ae29432c96b9..167856922e6e 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -43,7 +45,9 @@ type ManagedClustersClientAPI interface { GetAccessProfiles(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) } var _ ManagedClustersClientAPI = (*containerservice.ManagedClustersClient)(nil) diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go b/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go index eada8b386a36..6e289aca8a16 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -60,34 +62,35 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + }}}}}); err != nil { return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error()) } @@ -119,9 +122,6 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context "api-version": APIVersion, } - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go b/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go index 4d0edae44070..e8be5e569fc8 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -60,21 +61,21 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, + }}, }}, - {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}}}}); err != nil { + }}}}}); err != nil { return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error()) } @@ -106,9 +107,6 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, "api-version": APIVersion, } - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/models.go b/services/containerservice/mgmt/2017-09-30/containerservice/models.go index 091593ba7e82..932ce31f0f94 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/models.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/models.go @@ -470,126 +470,11 @@ type AgentPoolProfile struct { OsType OSType `json:"osType,omitempty"` } -// Componentsschemascontainerserviceallof1 ... -type Componentsschemascontainerserviceallof1 struct { - // Properties - Properties of the container service. - *Properties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemascontainerserviceallof1. -func (c Componentsschemascontainerserviceallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.Properties != nil { - objectMap["properties"] = c.Properties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemascontainerserviceallof1 struct. -func (c *Componentsschemascontainerserviceallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - c.Properties = &properties - } - } - } - - return nil -} - -// Componentsschemasmanagedclusteraccessprofileallof1 ... -type Componentsschemasmanagedclusteraccessprofileallof1 struct { - // AccessProfile - AccessProfile of a managed cluster. - *AccessProfile `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemasmanagedclusteraccessprofileallof1. -func (c Componentsschemasmanagedclusteraccessprofileallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.AccessProfile != nil { - objectMap["properties"] = c.AccessProfile - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemasmanagedclusteraccessprofileallof1 struct. -func (c *Componentsschemasmanagedclusteraccessprofileallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 accessProfile AccessProfile - err = json.Unmarshal(*v, &accessProfile) - if err != nil { - return err - } - c.AccessProfile = &accessProfile - } - } - } - - return nil -} - -// Componentsschemasmanagedclusterallof1 ... -type Componentsschemasmanagedclusterallof1 struct { - // ManagedClusterProperties - Properties of a managed cluster. - *ManagedClusterProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemasmanagedclusterallof1. -func (c Componentsschemasmanagedclusterallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.ManagedClusterProperties != nil { - objectMap["properties"] = c.ManagedClusterProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemasmanagedclusterallof1 struct. -func (c *Componentsschemasmanagedclusterallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 managedClusterProperties ManagedClusterProperties - err = json.Unmarshal(*v, &managedClusterProperties) - if err != nil { - return err - } - c.ManagedClusterProperties = &managedClusterProperties - } - } - } - - return nil -} - // ContainerService container service. type ContainerService struct { autorest.Response `json:"-"` + // Properties - Properties of the container service. + *Properties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -600,22 +485,20 @@ type ContainerService struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // Properties - Properties of the container service. - *Properties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ContainerService. func (cs ContainerService) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if cs.Properties != nil { + objectMap["properties"] = cs.Properties + } 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) } @@ -628,6 +511,15 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var properties Properties + err = json.Unmarshal(*v, &properties) + if err != nil { + return err + } + cs.Properties = &properties + } case "id": if v != nil { var ID string @@ -673,15 +565,6 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { } cs.Tags = tags } - case "properties": - if v != nil { - var properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - cs.Properties = &properties - } } } @@ -919,6 +802,8 @@ func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult // ManagedCluster managed cluster. type ManagedCluster struct { autorest.Response `json:"-"` + // ManagedClusterProperties - Properties of a managed cluster. + *ManagedClusterProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -929,22 +814,20 @@ type ManagedCluster struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ManagedClusterProperties - Properties of a managed cluster. - *ManagedClusterProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ManagedCluster. func (mc ManagedCluster) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if mc.ManagedClusterProperties != nil { + objectMap["properties"] = mc.ManagedClusterProperties + } if mc.Location != nil { objectMap["location"] = mc.Location } if mc.Tags != nil { objectMap["tags"] = mc.Tags } - if mc.ManagedClusterProperties != nil { - objectMap["properties"] = mc.ManagedClusterProperties - } return json.Marshal(objectMap) } @@ -957,6 +840,15 @@ func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var managedClusterProperties ManagedClusterProperties + err = json.Unmarshal(*v, &managedClusterProperties) + if err != nil { + return err + } + mc.ManagedClusterProperties = &managedClusterProperties + } case "id": if v != nil { var ID string @@ -1002,15 +894,6 @@ func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { } mc.Tags = tags } - case "properties": - if v != nil { - var managedClusterProperties ManagedClusterProperties - err = json.Unmarshal(*v, &managedClusterProperties) - if err != nil { - return err - } - mc.ManagedClusterProperties = &managedClusterProperties - } } } @@ -1020,6 +903,8 @@ func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { // ManagedClusterAccessProfile managed cluster Access Profile. type ManagedClusterAccessProfile struct { autorest.Response `json:"-"` + // AccessProfile - AccessProfile of a managed cluster. + *AccessProfile `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1030,22 +915,20 @@ type ManagedClusterAccessProfile struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // AccessProfile - AccessProfile of a managed cluster. - *AccessProfile `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ManagedClusterAccessProfile. func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if mcap.AccessProfile != nil { + objectMap["properties"] = mcap.AccessProfile + } if mcap.Location != nil { objectMap["location"] = mcap.Location } if mcap.Tags != nil { objectMap["tags"] = mcap.Tags } - if mcap.AccessProfile != nil { - objectMap["properties"] = mcap.AccessProfile - } return json.Marshal(objectMap) } @@ -1058,6 +941,15 @@ func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var accessProfile AccessProfile + err = json.Unmarshal(*v, &accessProfile) + if err != nil { + return err + } + mcap.AccessProfile = &accessProfile + } case "id": if v != nil { var ID string @@ -1103,15 +995,6 @@ func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { } mcap.Tags = tags } - case "properties": - if v != nil { - var accessProfile AccessProfile - err = json.Unmarshal(*v, &accessProfile) - if err != nil { - return err - } - mcap.AccessProfile = &accessProfile - } } } diff --git a/services/containerservice/mgmt/2017-09-30/containerservice/version.go b/services/containerservice/mgmt/2017-09-30/containerservice/version.go index 652b5b209e37..550a9a973280 100644 --- a/services/containerservice/mgmt/2017-09-30/containerservice/version.go +++ b/services/containerservice/mgmt/2017-09-30/containerservice/version.go @@ -21,7 +21,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.Number + " containerservice/2017-07-01" + return "Azure-SDK-For-Go/" + version.Number + " containerservice/2017-09-30" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/client.go b/services/containerservice/mgmt/2018-03-31/containerservice/client.go index d27853be33c0..858e168f208f 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/client.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/client.go @@ -1,4 +1,4 @@ -// Package containerservice implements the Azure ARM Containerservice service API version 2017-07-01. +// Package containerservice implements the Azure ARM Containerservice service API version . // // The Container Service Client. package containerservice @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2018-03-31/containerservice/containerserviceapi/interfaces.go index a07a79cc64c1..8b1f85e4f12b 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -49,7 +51,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/containerservices.go b/services/containerservice/mgmt/2018-03-31/containerservice/containerservices.go index eada8b386a36..6e289aca8a16 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -60,34 +62,35 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + }}}}}); err != nil { return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error()) } @@ -119,9 +122,6 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context "api-version": APIVersion, } - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go b/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go index 957f65042304..8626541f7cc9 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -62,20 +63,30 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Pattern, Rule: `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, }}, - {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.ManagedClusterProperties.AadProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.AadProfile.ClientAppID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ManagedClusterProperties.AadProfile.ServerAppID", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { + {Target: "parameters.ManagedClusterProperties.AadProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.AadProfile.ClientAppID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.AadProfile.ServerAppID", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error()) } @@ -107,9 +118,6 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, "api-version": APIVersion, } - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/models.go b/services/containerservice/mgmt/2018-03-31/containerservice/models.go index 812def486f9b..11e2f34d3c27 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/models.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/models.go @@ -498,126 +498,11 @@ type AgentPoolProfile struct { OsType OSType `json:"osType,omitempty"` } -// Componentsschemascontainerserviceallof1 ... -type Componentsschemascontainerserviceallof1 struct { - // Properties - Properties of the container service. - *Properties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemascontainerserviceallof1. -func (c Componentsschemascontainerserviceallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.Properties != nil { - objectMap["properties"] = c.Properties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemascontainerserviceallof1 struct. -func (c *Componentsschemascontainerserviceallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - c.Properties = &properties - } - } - } - - return nil -} - -// Componentsschemasmanagedclusteraccessprofileallof1 ... -type Componentsschemasmanagedclusteraccessprofileallof1 struct { - // AccessProfile - AccessProfile of a managed cluster. - *AccessProfile `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemasmanagedclusteraccessprofileallof1. -func (c Componentsschemasmanagedclusteraccessprofileallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.AccessProfile != nil { - objectMap["properties"] = c.AccessProfile - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemasmanagedclusteraccessprofileallof1 struct. -func (c *Componentsschemasmanagedclusteraccessprofileallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 accessProfile AccessProfile - err = json.Unmarshal(*v, &accessProfile) - if err != nil { - return err - } - c.AccessProfile = &accessProfile - } - } - } - - return nil -} - -// Componentsschemasmanagedclusterallof1 ... -type Componentsschemasmanagedclusterallof1 struct { - // ManagedClusterProperties - Properties of a managed cluster. - *ManagedClusterProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Componentsschemasmanagedclusterallof1. -func (c Componentsschemasmanagedclusterallof1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if c.ManagedClusterProperties != nil { - objectMap["properties"] = c.ManagedClusterProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Componentsschemasmanagedclusterallof1 struct. -func (c *Componentsschemasmanagedclusterallof1) UnmarshalJSON(body []byte) error { - var m map[string]*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 managedClusterProperties ManagedClusterProperties - err = json.Unmarshal(*v, &managedClusterProperties) - if err != nil { - return err - } - c.ManagedClusterProperties = &managedClusterProperties - } - } - } - - return nil -} - // ContainerService container service. type ContainerService struct { autorest.Response `json:"-"` + // Properties - Properties of the container service. + *Properties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -628,22 +513,20 @@ type ContainerService struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // Properties - Properties of the container service. - *Properties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ContainerService. func (cs ContainerService) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if cs.Properties != nil { + objectMap["properties"] = cs.Properties + } 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) } @@ -656,6 +539,15 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var properties Properties + err = json.Unmarshal(*v, &properties) + if err != nil { + return err + } + cs.Properties = &properties + } case "id": if v != nil { var ID string @@ -701,15 +593,6 @@ func (cs *ContainerService) UnmarshalJSON(body []byte) error { } cs.Tags = tags } - case "properties": - if v != nil { - var properties Properties - err = json.Unmarshal(*v, &properties) - if err != nil { - return err - } - cs.Properties = &properties - } } } @@ -962,6 +845,8 @@ func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult // ManagedCluster managed cluster. type ManagedCluster struct { autorest.Response `json:"-"` + // ManagedClusterProperties - Properties of a managed cluster. + *ManagedClusterProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -972,22 +857,20 @@ type ManagedCluster struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ManagedClusterProperties - Properties of a managed cluster. - *ManagedClusterProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ManagedCluster. func (mc ManagedCluster) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if mc.ManagedClusterProperties != nil { + objectMap["properties"] = mc.ManagedClusterProperties + } if mc.Location != nil { objectMap["location"] = mc.Location } if mc.Tags != nil { objectMap["tags"] = mc.Tags } - if mc.ManagedClusterProperties != nil { - objectMap["properties"] = mc.ManagedClusterProperties - } return json.Marshal(objectMap) } @@ -1000,6 +883,15 @@ func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var managedClusterProperties ManagedClusterProperties + err = json.Unmarshal(*v, &managedClusterProperties) + if err != nil { + return err + } + mc.ManagedClusterProperties = &managedClusterProperties + } case "id": if v != nil { var ID string @@ -1045,15 +937,6 @@ func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { } mc.Tags = tags } - case "properties": - if v != nil { - var managedClusterProperties ManagedClusterProperties - err = json.Unmarshal(*v, &managedClusterProperties) - if err != nil { - return err - } - mc.ManagedClusterProperties = &managedClusterProperties - } } } @@ -1075,6 +958,8 @@ type ManagedClusterAADProfile struct { // ManagedClusterAccessProfile managed cluster Access Profile. type ManagedClusterAccessProfile struct { autorest.Response `json:"-"` + // AccessProfile - AccessProfile of a managed cluster. + *AccessProfile `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1085,22 +970,20 @@ type ManagedClusterAccessProfile struct { Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` - // AccessProfile - AccessProfile of a managed cluster. - *AccessProfile `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for ManagedClusterAccessProfile. func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if mcap.AccessProfile != nil { + objectMap["properties"] = mcap.AccessProfile + } if mcap.Location != nil { objectMap["location"] = mcap.Location } if mcap.Tags != nil { objectMap["tags"] = mcap.Tags } - if mcap.AccessProfile != nil { - objectMap["properties"] = mcap.AccessProfile - } return json.Marshal(objectMap) } @@ -1113,6 +996,15 @@ func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var accessProfile AccessProfile + err = json.Unmarshal(*v, &accessProfile) + if err != nil { + return err + } + mcap.AccessProfile = &accessProfile + } case "id": if v != nil { var ID string @@ -1158,15 +1050,6 @@ func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { } mcap.Tags = tags } - case "properties": - if v != nil { - var accessProfile AccessProfile - err = json.Unmarshal(*v, &accessProfile) - if err != nil { - return err - } - mcap.AccessProfile = &accessProfile - } } } diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/operations.go b/services/containerservice/mgmt/2018-03-31/containerservice/operations.go index 1a6474e5b014..80650bc42f34 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/operations.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerservice/mgmt/2018-03-31/containerservice/version.go b/services/containerservice/mgmt/2018-03-31/containerservice/version.go index 652b5b209e37..c2c4f9aefef8 100644 --- a/services/containerservice/mgmt/2018-03-31/containerservice/version.go +++ b/services/containerservice/mgmt/2018-03-31/containerservice/version.go @@ -21,7 +21,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.Number + " containerservice/2017-07-01" + return "Azure-SDK-For-Go/" + version.Number + " containerservice/2018-03-31" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/services/containerservice/mgmt/2019-02-01/containerservice/agentpools.go b/services/containerservice/mgmt/2019-02-01/containerservice/agentpools.go index b2e6892968d9..3905fe6b4c52 100644 --- a/services/containerservice/mgmt/2019-02-01/containerservice/agentpools.go +++ b/services/containerservice/mgmt/2019-02-01/containerservice/agentpools.go @@ -36,7 +36,8 @@ func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client. +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-02-01/containerservice/client.go b/services/containerservice/mgmt/2019-02-01/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/containerservice/mgmt/2019-02-01/containerservice/client.go +++ b/services/containerservice/mgmt/2019-02-01/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2019-02-01/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2019-02-01/containerservice/containerserviceapi/interfaces.go index 43260df63090..8284685dc083 100644 --- a/services/containerservice/mgmt/2019-02-01/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2019-02-01/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,7 +65,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) @@ -77,6 +83,7 @@ type AgentPoolsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedClusterName string, agentPoolName string) (result containerservice.AgentPoolsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedClusterName string, agentPoolName string) (result containerservice.AgentPool, err error) List(ctx context.Context, resourceGroupName string, managedClusterName string) (result containerservice.AgentPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, managedClusterName string) (result containerservice.AgentPoolListResultIterator, err error) } var _ AgentPoolsClientAPI = (*containerservice.AgentPoolsClient)(nil) diff --git a/services/containerservice/mgmt/2019-02-01/containerservice/containerservices.go b/services/containerservice/mgmt/2019-02-01/containerservice/containerservices.go index c3e6fa6ad1ed..6e289aca8a16 100644 --- a/services/containerservice/mgmt/2019-02-01/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2019-02-01/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-02-01/containerservice/managedclusters.go b/services/containerservice/mgmt/2019-02-01/containerservice/managedclusters.go index c8a57e3335be..59dffc756730 100644 --- a/services/containerservice/mgmt/2019-02-01/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2019-02-01/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-02-01/containerservice/openshiftmanagedclusters.go b/services/containerservice/mgmt/2019-02-01/containerservice/openshiftmanagedclusters.go index 180281349e42..2f407c484f79 100644 --- a/services/containerservice/mgmt/2019-02-01/containerservice/openshiftmanagedclusters.go +++ b/services/containerservice/mgmt/2019-02-01/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-02-01/containerservice/operations.go b/services/containerservice/mgmt/2019-02-01/containerservice/operations.go index 2b81f855b311..46f08f708c82 100644 --- a/services/containerservice/mgmt/2019-02-01/containerservice/operations.go +++ b/services/containerservice/mgmt/2019-02-01/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerservice/mgmt/2019-04-30/containerservice/agentpools.go b/services/containerservice/mgmt/2019-04-30/containerservice/agentpools.go index aacf0f9a20dc..6bf19d5ca5dc 100644 --- a/services/containerservice/mgmt/2019-04-30/containerservice/agentpools.go +++ b/services/containerservice/mgmt/2019-04-30/containerservice/agentpools.go @@ -36,7 +36,8 @@ func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client. +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-04-30/containerservice/client.go b/services/containerservice/mgmt/2019-04-30/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/containerservice/mgmt/2019-04-30/containerservice/client.go +++ b/services/containerservice/mgmt/2019-04-30/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2019-04-30/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2019-04-30/containerservice/containerserviceapi/interfaces.go index a9426db9b199..ca88e24ff2a6 100644 --- a/services/containerservice/mgmt/2019-04-30/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2019-04-30/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,7 +65,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) @@ -77,6 +83,7 @@ type AgentPoolsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPoolsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPool, err error) List(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultIterator, err error) } var _ AgentPoolsClientAPI = (*containerservice.AgentPoolsClient)(nil) diff --git a/services/containerservice/mgmt/2019-04-30/containerservice/containerservices.go b/services/containerservice/mgmt/2019-04-30/containerservice/containerservices.go index 8f753fe9b21e..39cd8f14ead8 100644 --- a/services/containerservice/mgmt/2019-04-30/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2019-04-30/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-04-30/containerservice/managedclusters.go b/services/containerservice/mgmt/2019-04-30/containerservice/managedclusters.go index 97fe1e65074c..8659df82f3a0 100644 --- a/services/containerservice/mgmt/2019-04-30/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2019-04-30/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-04-30/containerservice/openshiftmanagedclusters.go b/services/containerservice/mgmt/2019-04-30/containerservice/openshiftmanagedclusters.go index ac574f3c4121..0610faf69993 100644 --- a/services/containerservice/mgmt/2019-04-30/containerservice/openshiftmanagedclusters.go +++ b/services/containerservice/mgmt/2019-04-30/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-04-30/containerservice/operations.go b/services/containerservice/mgmt/2019-04-30/containerservice/operations.go index ba9955a7e4d6..04c41bf198cd 100644 --- a/services/containerservice/mgmt/2019-04-30/containerservice/operations.go +++ b/services/containerservice/mgmt/2019-04-30/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerservice/mgmt/2019-06-01/containerservice/agentpools.go b/services/containerservice/mgmt/2019-06-01/containerservice/agentpools.go index 386007ce4ac0..87af1e6d60ae 100644 --- a/services/containerservice/mgmt/2019-06-01/containerservice/agentpools.go +++ b/services/containerservice/mgmt/2019-06-01/containerservice/agentpools.go @@ -36,7 +36,8 @@ func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client. +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-06-01/containerservice/client.go b/services/containerservice/mgmt/2019-06-01/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/containerservice/mgmt/2019-06-01/containerservice/client.go +++ b/services/containerservice/mgmt/2019-06-01/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2019-06-01/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2019-06-01/containerservice/containerserviceapi/interfaces.go index 124d366f18ae..770b3b19362f 100644 --- a/services/containerservice/mgmt/2019-06-01/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2019-06-01/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,7 +65,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) @@ -79,6 +85,7 @@ type AgentPoolsClientAPI interface { GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolAvailableVersions, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPoolUpgradeProfile, err error) List(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultIterator, err error) } var _ AgentPoolsClientAPI = (*containerservice.AgentPoolsClient)(nil) diff --git a/services/containerservice/mgmt/2019-06-01/containerservice/containerservices.go b/services/containerservice/mgmt/2019-06-01/containerservice/containerservices.go index 578c318e3ac5..1f9010c1588c 100644 --- a/services/containerservice/mgmt/2019-06-01/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2019-06-01/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-06-01/containerservice/managedclusters.go b/services/containerservice/mgmt/2019-06-01/containerservice/managedclusters.go index 456dc7e84816..c5d602dc5c6c 100644 --- a/services/containerservice/mgmt/2019-06-01/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2019-06-01/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-06-01/containerservice/openshiftmanagedclusters.go b/services/containerservice/mgmt/2019-06-01/containerservice/openshiftmanagedclusters.go index ac574f3c4121..0610faf69993 100644 --- a/services/containerservice/mgmt/2019-06-01/containerservice/openshiftmanagedclusters.go +++ b/services/containerservice/mgmt/2019-06-01/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-06-01/containerservice/operations.go b/services/containerservice/mgmt/2019-06-01/containerservice/operations.go index 3061cc94f27f..43ca57295e76 100644 --- a/services/containerservice/mgmt/2019-06-01/containerservice/operations.go +++ b/services/containerservice/mgmt/2019-06-01/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerservice/mgmt/2019-08-01/containerservice/agentpools.go b/services/containerservice/mgmt/2019-08-01/containerservice/agentpools.go index 669d3c9b0412..328ad71e731a 100644 --- a/services/containerservice/mgmt/2019-08-01/containerservice/agentpools.go +++ b/services/containerservice/mgmt/2019-08-01/containerservice/agentpools.go @@ -36,7 +36,8 @@ func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client. +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-08-01/containerservice/client.go b/services/containerservice/mgmt/2019-08-01/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/containerservice/mgmt/2019-08-01/containerservice/client.go +++ b/services/containerservice/mgmt/2019-08-01/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2019-08-01/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2019-08-01/containerservice/containerserviceapi/interfaces.go index a8ab1592812e..fd28426261c2 100644 --- a/services/containerservice/mgmt/2019-08-01/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2019-08-01/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,7 +65,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) @@ -80,6 +86,7 @@ type AgentPoolsClientAPI interface { GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolAvailableVersions, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPoolUpgradeProfile, err error) List(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultIterator, err error) } var _ AgentPoolsClientAPI = (*containerservice.AgentPoolsClient)(nil) diff --git a/services/containerservice/mgmt/2019-08-01/containerservice/containerservices.go b/services/containerservice/mgmt/2019-08-01/containerservice/containerservices.go index 1bd2a37eec45..4e598cbfe88a 100644 --- a/services/containerservice/mgmt/2019-08-01/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2019-08-01/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-08-01/containerservice/managedclusters.go b/services/containerservice/mgmt/2019-08-01/containerservice/managedclusters.go index 9702c6cbdc45..b8920cc4dbad 100644 --- a/services/containerservice/mgmt/2019-08-01/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2019-08-01/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-08-01/containerservice/openshiftmanagedclusters.go b/services/containerservice/mgmt/2019-08-01/containerservice/openshiftmanagedclusters.go index ac574f3c4121..0610faf69993 100644 --- a/services/containerservice/mgmt/2019-08-01/containerservice/openshiftmanagedclusters.go +++ b/services/containerservice/mgmt/2019-08-01/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-08-01/containerservice/operations.go b/services/containerservice/mgmt/2019-08-01/containerservice/operations.go index a61a628971f6..c3c696b7eb82 100644 --- a/services/containerservice/mgmt/2019-08-01/containerservice/operations.go +++ b/services/containerservice/mgmt/2019-08-01/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/agentpools.go b/services/containerservice/mgmt/2019-10-01/containerservice/agentpools.go index 1412b4cb84c9..29dff30c5552 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/agentpools.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/agentpools.go @@ -36,7 +36,8 @@ func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client. +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/client.go b/services/containerservice/mgmt/2019-10-01/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/client.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2019-10-01/containerservice/containerserviceapi/interfaces.go index 3543d494ab11..e801c2a2f0eb 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,7 +65,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) @@ -81,6 +87,7 @@ type AgentPoolsClientAPI interface { GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolAvailableVersions, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPoolUpgradeProfile, err error) List(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultIterator, err error) } var _ AgentPoolsClientAPI = (*containerservice.AgentPoolsClient)(nil) diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/containerservices.go b/services/containerservice/mgmt/2019-10-01/containerservice/containerservices.go index 1bd2a37eec45..4e598cbfe88a 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/managedclusters.go b/services/containerservice/mgmt/2019-10-01/containerservice/managedclusters.go index 2fd0fa910f54..d114b8d9e04c 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/openshiftmanagedclusters.go b/services/containerservice/mgmt/2019-10-01/containerservice/openshiftmanagedclusters.go index ac574f3c4121..0610faf69993 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/openshiftmanagedclusters.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/operations.go b/services/containerservice/mgmt/2019-10-01/containerservice/operations.go index 978c301f731c..0474ce4ac830 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/operations.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerservice/mgmt/2019-11-01/containerservice/agentpools.go b/services/containerservice/mgmt/2019-11-01/containerservice/agentpools.go index 3926308d98f6..3fa2e5c3c503 100644 --- a/services/containerservice/mgmt/2019-11-01/containerservice/agentpools.go +++ b/services/containerservice/mgmt/2019-11-01/containerservice/agentpools.go @@ -36,7 +36,8 @@ func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client. +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-11-01/containerservice/client.go b/services/containerservice/mgmt/2019-11-01/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/containerservice/mgmt/2019-11-01/containerservice/client.go +++ b/services/containerservice/mgmt/2019-11-01/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/containerservice/mgmt/2019-11-01/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2019-11-01/containerservice/containerserviceapi/interfaces.go index 37ed6713c176..af5339fd733b 100644 --- a/services/containerservice/mgmt/2019-11-01/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2019-11-01/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,8 +65,11 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) + ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) ResetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterServicePrincipalProfile) (result containerservice.ManagedClustersResetServicePrincipalProfileFuture, err error) @@ -80,6 +87,7 @@ type AgentPoolsClientAPI interface { GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolAvailableVersions, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPoolUpgradeProfile, err error) List(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultIterator, err error) } var _ AgentPoolsClientAPI = (*containerservice.AgentPoolsClient)(nil) diff --git a/services/containerservice/mgmt/2019-11-01/containerservice/containerservices.go b/services/containerservice/mgmt/2019-11-01/containerservice/containerservices.go index 1bd2a37eec45..4e598cbfe88a 100644 --- a/services/containerservice/mgmt/2019-11-01/containerservice/containerservices.go +++ b/services/containerservice/mgmt/2019-11-01/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-11-01/containerservice/managedclusters.go b/services/containerservice/mgmt/2019-11-01/containerservice/managedclusters.go index 3fefb76debbd..db000d3372c9 100644 --- a/services/containerservice/mgmt/2019-11-01/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2019-11-01/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -847,6 +848,94 @@ func (client ManagedClustersClient) ListClusterAdminCredentialsResponder(resp *h return } +// ListClusterMonitoringUserCredentials gets cluster monitoring user credential of the managed cluster with a specified +// resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterMonitoringUserCredentials") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", err.Error()) + } + + req, err := client.ListClusterMonitoringUserCredentialsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", nil, "Failure preparing request") + return + } + + resp, err := client.ListClusterMonitoringUserCredentialsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure sending request") + return + } + + result, err = client.ListClusterMonitoringUserCredentialsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure responding to request") + } + + return +} + +// ListClusterMonitoringUserCredentialsPreparer prepares the ListClusterMonitoringUserCredentials request. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListClusterMonitoringUserCredentialsSender sends the ListClusterMonitoringUserCredentials request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListClusterMonitoringUserCredentialsResponder handles the response to the ListClusterMonitoringUserCredentials request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // ListClusterUserCredentials gets cluster user credential of the managed cluster with a specified resource group and // name. // Parameters: diff --git a/services/containerservice/mgmt/2019-11-01/containerservice/openshiftmanagedclusters.go b/services/containerservice/mgmt/2019-11-01/containerservice/openshiftmanagedclusters.go index ac574f3c4121..0610faf69993 100644 --- a/services/containerservice/mgmt/2019-11-01/containerservice/openshiftmanagedclusters.go +++ b/services/containerservice/mgmt/2019-11-01/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/containerservice/mgmt/2019-11-01/containerservice/operations.go b/services/containerservice/mgmt/2019-11-01/containerservice/operations.go index 766c2bb05521..4d6a05ce1648 100644 --- a/services/containerservice/mgmt/2019-11-01/containerservice/operations.go +++ b/services/containerservice/mgmt/2019-11-01/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/containerservice/mgmt/2020-01-01/containerservice/agentpools.go b/services/containerservice/mgmt/2020-01-01/containerservice/agentpools.go new file mode 100644 index 000000000000..09a29fd6969f --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/agentpools.go @@ -0,0 +1,622 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AgentPoolsClient is the the Container Service Client. +type AgentPoolsClient struct { + BaseClient +} + +// NewAgentPoolsClient creates an instance of the AgentPoolsClient client. +func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { + return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { + return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an agent pool in the specified managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// agentPoolName - the name of the agent pool. +// parameters - parameters supplied to the Create or Update an agent pool operation. +func (client AgentPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (result AgentPoolsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, agentPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AgentPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "agentPoolName": autorest.Encode("path", agentPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", 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 AgentPoolsClient) CreateOrUpdateSender(req *http.Request) (future AgentPoolsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result AgentPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the agent pool in the specified managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// agentPoolName - the name of the agent pool. +func (client AgentPoolsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, agentPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AgentPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "agentPoolName": autorest.Encode("path", agentPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", 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 AgentPoolsClient) DeleteSender(req *http.Request) (future AgentPoolsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of the agent pool by managed cluster and resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// agentPoolName - the name of the agent pool. +func (client AgentPoolsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPool, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, agentPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AgentPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "agentPoolName": autorest.Encode("path", agentPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) GetResponder(resp *http.Response) (result AgentPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAvailableAgentPoolVersions gets a list of supported versions for the specified agent pool. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolAvailableVersions, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetAvailableAgentPoolVersions") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", err.Error()) + } + + req, err := client.GetAvailableAgentPoolVersionsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", nil, "Failure preparing request") + return + } + + resp, err := client.GetAvailableAgentPoolVersionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure sending request") + return + } + + result, err = client.GetAvailableAgentPoolVersionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure responding to request") + } + + return +} + +// GetAvailableAgentPoolVersionsPreparer prepares the GetAvailableAgentPoolVersions request. +func (client AgentPoolsClient) GetAvailableAgentPoolVersionsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAvailableAgentPoolVersionsSender sends the GetAvailableAgentPoolVersions request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) GetAvailableAgentPoolVersionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetAvailableAgentPoolVersionsResponder handles the response to the GetAvailableAgentPoolVersions request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) GetAvailableAgentPoolVersionsResponder(resp *http.Response) (result AgentPoolAvailableVersions, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetUpgradeProfile gets the details of the upgrade profile for an agent pool with a specified resource group and +// managed cluster name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// agentPoolName - the name of the agent pool. +func (client AgentPoolsClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolUpgradeProfile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetUpgradeProfile") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "GetUpgradeProfile", err.Error()) + } + + req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName, agentPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpgradeProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure sending request") + return + } + + result, err = client.GetUpgradeProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure responding to request") + } + + return +} + +// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request. +func (client AgentPoolsClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "agentPoolName": autorest.Encode("path", agentPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) GetUpgradeProfileResponder(resp *http.Response) (result AgentPoolUpgradeProfile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent +// pool. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client AgentPoolsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.List") + defer func() { + sc := -1 + if result.aplr.Response.Response != nil { + sc = result.aplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.aplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure sending request") + return + } + + result.aplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AgentPoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.ContainerService/managedClusters/{resourceName}/agentPools", 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 AgentPoolsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) ListResponder(resp *http.Response) (result AgentPoolListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client AgentPoolsClient) listNextResults(ctx context.Context, lastResults AgentPoolListResult) (result AgentPoolListResult, err error) { + req, err := lastResults.agentPoolListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "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, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AgentPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.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, resourceName) + return +} diff --git a/services/containerservice/mgmt/2020-01-01/containerservice/client.go b/services/containerservice/mgmt/2020-01-01/containerservice/client.go new file mode 100644 index 000000000000..858e168f208f --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/client.go @@ -0,0 +1,52 @@ +// Package containerservice implements the Azure ARM Containerservice service API version . +// +// The Container Service Client. +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Containerservice + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Containerservice. +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/containerservice/mgmt/2020-01-01/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2020-01-01/containerservice/containerserviceapi/interfaces.go new file mode 100644 index 000000000000..718e3fe27ac9 --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/containerserviceapi/interfaces.go @@ -0,0 +1,93 @@ +package containerserviceapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-01-01/containerservice" +) + +// OpenShiftManagedClustersClientAPI contains the set of methods on the OpenShiftManagedClustersClient type. +type OpenShiftManagedClustersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.OpenShiftManagedCluster) (result containerservice.OpenShiftManagedClustersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) + List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) +} + +var _ OpenShiftManagedClustersClientAPI = (*containerservice.OpenShiftManagedClustersClient)(nil) + +// ContainerServicesClientAPI contains the set of methods on the ContainerServicesClient type. +type ContainerServicesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters containerservice.ContainerService) (result containerservice.ContainerServicesCreateOrUpdateFutureType, err error) + Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) + Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) + List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) + ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) +} + +var _ ContainerServicesClientAPI = (*containerservice.ContainerServicesClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result containerservice.OperationListResult, err error) +} + +var _ OperationsClientAPI = (*containerservice.OperationsClient)(nil) + +// ManagedClustersClientAPI contains the set of methods on the ManagedClustersClient type. +type ManagedClustersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedCluster) (result containerservice.ManagedClustersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClustersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedCluster, err error) + GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) + GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) + List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) + ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) + ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) + ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) + ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) + ResetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterServicePrincipalProfile) (result containerservice.ManagedClustersResetServicePrincipalProfileFuture, err error) + RotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClustersRotateClusterCertificatesFuture, err error) + UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.ManagedClustersUpdateTagsFuture, err error) +} + +var _ ManagedClustersClientAPI = (*containerservice.ManagedClustersClient)(nil) + +// AgentPoolsClientAPI contains the set of methods on the AgentPoolsClient type. +type AgentPoolsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters containerservice.AgentPool) (result containerservice.AgentPoolsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPoolsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPool, err error) + GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolAvailableVersions, err error) + GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPoolUpgradeProfile, err error) + List(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultIterator, err error) +} + +var _ AgentPoolsClientAPI = (*containerservice.AgentPoolsClient)(nil) diff --git a/services/containerservice/mgmt/2020-01-01/containerservice/containerservices.go b/services/containerservice/mgmt/2020-01-01/containerservice/containerservices.go new file mode 100644 index 000000000000..4e598cbfe88a --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/containerservices.go @@ -0,0 +1,624 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ContainerServicesClient is the the Container Service Client. +type ContainerServicesClient struct { + BaseClient +} + +// NewContainerServicesClient creates an instance of the ContainerServicesClient client. +func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { + return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { + return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and +// agents. +// Parameters: +// resourceGroupName - the name of the resource group. +// containerServiceName - the name of the container service in the specified subscription and resource group. +// parameters - parameters supplied to the Create or Update a Container Service operation. +func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFutureType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + }}}}}); err != nil { + return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, containerServiceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFutureType, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified container service in the specified subscription and resource group. The operation does +// not delete other resources created as part of creating a container service, including storage accounts, VMs, and +// availability sets. All the other resources created with the container service are part of the same resource group +// and can be deleted individually. +// Parameters: +// resourceGroupName - the name of the resource group. +// containerServiceName - the name of the container service in the specified subscription and resource group. +func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFutureType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFutureType, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the properties of the specified container service in the specified subscription and resource group. The +// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters +// and agents. +// Parameters: +// resourceGroupName - the name of the resource group. +// containerServiceName - the name of the container service in the specified subscription and resource group. +func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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, containerServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of container services in the specified subscription. The operation returns properties of each +// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. +func (client ContainerServicesClient) List(ctx context.Context) (result ListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List") + defer func() { + sc := -1 + if result.lr.Response.Response != nil { + sc = result.lr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure sending request") + return + } + + result.lr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) ListResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ContainerServicesClient) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.listResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "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, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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 a list of container services in the specified subscription and resource group. The +// operation returns properties of each container service including state, orchestrator, number of masters and agents, +// and FQDNs of masters and agents. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lr.Response.Response != nil { + sc = result.lr.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, "containerservice.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-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.ContainerService/containerServices", 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 ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client ContainerServicesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.listResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "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, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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 +} + +// ListOrchestrators gets a list of supported orchestrators in the specified subscription. The operation returns +// properties of each orchestrator including version, available upgrades and whether that version or upgrades are in +// preview. +// Parameters: +// location - the name of a supported Azure region. +// resourceType - resource type for which the list of orchestrators needs to be returned +func (client ContainerServicesClient) ListOrchestrators(ctx context.Context, location string, resourceType string) (result OrchestratorVersionProfileListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListOrchestrators") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListOrchestratorsPreparer(ctx, location, resourceType) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", nil, "Failure preparing request") + return + } + + resp, err := client.ListOrchestratorsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", resp, "Failure sending request") + return + } + + result, err = client.ListOrchestratorsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", resp, "Failure responding to request") + } + + return +} + +// ListOrchestratorsPreparer prepares the ListOrchestrators request. +func (client ContainerServicesClient) ListOrchestratorsPreparer(ctx context.Context, location string, resourceType string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(resourceType) > 0 { + queryParameters["resource-type"] = autorest.Encode("query", resourceType) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListOrchestratorsSender sends the ListOrchestrators request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) ListOrchestratorsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListOrchestratorsResponder handles the response to the ListOrchestrators request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) ListOrchestratorsResponder(resp *http.Response) (result OrchestratorVersionProfileListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/containerservice/mgmt/2020-01-01/containerservice/managedclusters.go b/services/containerservice/mgmt/2020-01-01/containerservice/managedclusters.go new file mode 100644 index 000000000000..45d692b86c05 --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/managedclusters.go @@ -0,0 +1,1384 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ManagedClustersClient is the the Container Service Client. +type ManagedClustersClient struct { + BaseClient +} + +// NewManagedClustersClient creates an instance of the ManagedClustersClient client. +func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { + return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { + return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a managed cluster with the specified configuration for agents and Kubernetes +// version. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// parameters - parameters supplied to the Create or Update a Managed Cluster operation. +func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (result ManagedClustersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.ManagedClusterProperties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + }}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Pattern, Rule: `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMaximum, Rule: int64(120), Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMinimum, Rule: int64(4), Chain: nil}, + }}, + }}, + }}, + {Target: "parameters.ManagedClusterProperties.AadProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.AadProfile.ClientAppID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.AadProfile.ServerAppID", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.ContainerService/managedClusters/{resourceName}", 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 ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the managed cluster with a specified resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.ContainerService/managedClusters/{resourceName}", 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 ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of the managed cluster with a specified resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedCluster, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.ContainerService/managedClusters/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) GetResponder(resp *http.Response) (result ManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAccessProfile gets the accessProfile for the specified role name of the managed cluster with a specified resource +// group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// roleName - the name of the role for managed cluster accessProfile resource. +func (client ManagedClustersClient) GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetAccessProfile") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "GetAccessProfile", err.Error()) + } + + req, err := client.GetAccessProfilePreparer(ctx, resourceGroupName, resourceName, roleName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", nil, "Failure preparing request") + return + } + + resp, err := client.GetAccessProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure sending request") + return + } + + result, err = client.GetAccessProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure responding to request") + } + + return +} + +// GetAccessProfilePreparer prepares the GetAccessProfile request. +func (client ManagedClustersClient) GetAccessProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "roleName": autorest.Encode("path", roleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAccessProfileSender sends the GetAccessProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) GetAccessProfileSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetAccessProfileResponder handles the response to the GetAccessProfile request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) GetAccessProfileResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetUpgradeProfile gets the details of the upgrade profile for a managed cluster with a specified resource group and +// name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClusterUpgradeProfile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetUpgradeProfile") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "GetUpgradeProfile", err.Error()) + } + + req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpgradeProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure sending request") + return + } + + result, err = client.GetUpgradeProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure responding to request") + } + + return +} + +// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request. +func (client ManagedClustersClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) GetUpgradeProfileResponder(resp *http.Response) (result ManagedClusterUpgradeProfile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of managed clusters in the specified subscription. The operation returns properties of each managed +// cluster. +func (client ManagedClustersClient) List(ctx context.Context) (result ManagedClusterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List") + defer func() { + sc := -1 + if result.mclr.Response.Response != nil { + sc = result.mclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.mclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure sending request") + return + } + + result.mclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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}/providers/Microsoft.ContainerService/managedClusters", 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 ManagedClustersClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListResponder(resp *http.Response) (result ManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ManagedClustersClient) listNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { + req, err := lastResults.managedClusterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "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, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ManagedClustersClient) ListComplete(ctx context.Context) (result ManagedClusterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.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 managed clusters in the specified subscription and resource group. The operation returns +// properties of each managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.mclr.Response.Response != nil { + sc = result.mclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.mclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.mclr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ManagedClustersClient) 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-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.ContainerService/managedClusters", 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 ManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client ManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { + req, err := lastResults.managedClusterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "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, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.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 +} + +// ListClusterAdminCredentials gets cluster admin credential of the managed cluster with a specified resource group and +// name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterAdminCredentials") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterAdminCredentials", err.Error()) + } + + req, err := client.ListClusterAdminCredentialsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", nil, "Failure preparing request") + return + } + + resp, err := client.ListClusterAdminCredentialsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure sending request") + return + } + + result, err = client.ListClusterAdminCredentialsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure responding to request") + } + + return +} + +// ListClusterAdminCredentialsPreparer prepares the ListClusterAdminCredentials request. +func (client ManagedClustersClient) ListClusterAdminCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListClusterAdminCredentialsSender sends the ListClusterAdminCredentials request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListClusterAdminCredentialsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListClusterAdminCredentialsResponder handles the response to the ListClusterAdminCredentials request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListClusterAdminCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListClusterMonitoringUserCredentials gets cluster monitoring user credential of the managed cluster with a specified +// resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterMonitoringUserCredentials") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", err.Error()) + } + + req, err := client.ListClusterMonitoringUserCredentialsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", nil, "Failure preparing request") + return + } + + resp, err := client.ListClusterMonitoringUserCredentialsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure sending request") + return + } + + result, err = client.ListClusterMonitoringUserCredentialsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure responding to request") + } + + return +} + +// ListClusterMonitoringUserCredentialsPreparer prepares the ListClusterMonitoringUserCredentials request. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListClusterMonitoringUserCredentialsSender sends the ListClusterMonitoringUserCredentials request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListClusterMonitoringUserCredentialsResponder handles the response to the ListClusterMonitoringUserCredentials request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListClusterUserCredentials gets cluster user credential of the managed cluster with a specified resource group and +// name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterUserCredentials") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterUserCredentials", err.Error()) + } + + req, err := client.ListClusterUserCredentialsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", nil, "Failure preparing request") + return + } + + resp, err := client.ListClusterUserCredentialsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure sending request") + return + } + + result, err = client.ListClusterUserCredentialsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure responding to request") + } + + return +} + +// ListClusterUserCredentialsPreparer prepares the ListClusterUserCredentials request. +func (client ManagedClustersClient) ListClusterUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListClusterUserCredentialsSender sends the ListClusterUserCredentials request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListClusterUserCredentialsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListClusterUserCredentialsResponder handles the response to the ListClusterUserCredentials request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListClusterUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ResetAADProfile update the AAD Profile for a managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// parameters - parameters supplied to the Reset AAD Profile operation for a Managed Cluster. +func (client ManagedClustersClient) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (result ManagedClustersResetAADProfileFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetAADProfile") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ClientAppID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ServerAppID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ResetAADProfile", err.Error()) + } + + req, err := client.ResetAADProfilePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", nil, "Failure preparing request") + return + } + + result, err = client.ResetAADProfileSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", result.Response(), "Failure sending request") + return + } + + return +} + +// ResetAADProfilePreparer prepares the ResetAADProfile request. +func (client ManagedClustersClient) ResetAADProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-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.ContainerService/managedClusters/{resourceName}/resetAADProfile", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetAADProfileSender sends the ResetAADProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (future ManagedClustersResetAADProfileFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ResetAADProfileResponder handles the response to the ResetAADProfile request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResetServicePrincipalProfile update the service principal Profile for a managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// parameters - parameters supplied to the Reset Service Principal Profile operation for a Managed Cluster. +func (client ManagedClustersClient) ResetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (result ManagedClustersResetServicePrincipalProfileFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetServicePrincipalProfile") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", err.Error()) + } + + req, err := client.ResetServicePrincipalProfilePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", nil, "Failure preparing request") + return + } + + result, err = client.ResetServicePrincipalProfileSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", result.Response(), "Failure sending request") + return + } + + return +} + +// ResetServicePrincipalProfilePreparer prepares the ResetServicePrincipalProfile request. +func (client ManagedClustersClient) ResetServicePrincipalProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-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.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetServicePrincipalProfileSender sends the ResetServicePrincipalProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http.Request) (future ManagedClustersResetServicePrincipalProfileFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ResetServicePrincipalProfileResponder handles the response to the ResetServicePrincipalProfile request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// RotateClusterCertificates rotate certificates of a managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) RotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersRotateClusterCertificatesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.RotateClusterCertificates") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "RotateClusterCertificates", err.Error()) + } + + req, err := client.RotateClusterCertificatesPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", nil, "Failure preparing request") + return + } + + result, err = client.RotateClusterCertificatesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", result.Response(), "Failure sending request") + return + } + + return +} + +// RotateClusterCertificatesPreparer prepares the RotateClusterCertificates request. +func (client ManagedClustersClient) RotateClusterCertificatesPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RotateClusterCertificatesSender sends the RotateClusterCertificates request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) RotateClusterCertificatesSender(req *http.Request) (future ManagedClustersRotateClusterCertificatesFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RotateClusterCertificatesResponder handles the response to the RotateClusterCertificates request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) RotateClusterCertificatesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateTags updates a managed cluster with the specified tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// parameters - parameters supplied to the Update Managed Cluster Tags operation. +func (client ManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result ManagedClustersUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.UpdateTags") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "UpdateTags", err.Error()) + } + + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-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.ContainerService/managedClusters/{resourceName}", 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 ManagedClustersClient) UpdateTagsSender(req *http.Request) (future ManagedClustersUpdateTagsFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result ManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/containerservice/mgmt/2020-01-01/containerservice/models.go b/services/containerservice/mgmt/2020-01-01/containerservice/models.go new file mode 100644 index 000000000000..2901a9539c57 --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/models.go @@ -0,0 +1,3516 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/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/containerservice/mgmt/2020-01-01/containerservice" + +// AgentPoolType enumerates the values for agent pool type. +type AgentPoolType string + +const ( + // AvailabilitySet ... + AvailabilitySet AgentPoolType = "AvailabilitySet" + // VirtualMachineScaleSets ... + VirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets" +) + +// PossibleAgentPoolTypeValues returns an array of possible values for the AgentPoolType const type. +func PossibleAgentPoolTypeValues() []AgentPoolType { + return []AgentPoolType{AvailabilitySet, VirtualMachineScaleSets} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindAADIdentityProvider ... + KindAADIdentityProvider Kind = "AADIdentityProvider" + // KindOpenShiftManagedClusterBaseIdentityProvider ... + KindOpenShiftManagedClusterBaseIdentityProvider Kind = "OpenShiftManagedClusterBaseIdentityProvider" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{KindAADIdentityProvider, KindOpenShiftManagedClusterBaseIdentityProvider} +} + +// LoadBalancerSku enumerates the values for load balancer sku. +type LoadBalancerSku string + +const ( + // Basic ... + Basic LoadBalancerSku = "basic" + // Standard ... + Standard LoadBalancerSku = "standard" +) + +// PossibleLoadBalancerSkuValues returns an array of possible values for the LoadBalancerSku const type. +func PossibleLoadBalancerSkuValues() []LoadBalancerSku { + return []LoadBalancerSku{Basic, Standard} +} + +// NetworkPlugin enumerates the values for network plugin. +type NetworkPlugin string + +const ( + // Azure ... + Azure NetworkPlugin = "azure" + // Kubenet ... + Kubenet NetworkPlugin = "kubenet" +) + +// PossibleNetworkPluginValues returns an array of possible values for the NetworkPlugin const type. +func PossibleNetworkPluginValues() []NetworkPlugin { + return []NetworkPlugin{Azure, Kubenet} +} + +// NetworkPolicy enumerates the values for network policy. +type NetworkPolicy string + +const ( + // NetworkPolicyAzure ... + NetworkPolicyAzure NetworkPolicy = "azure" + // NetworkPolicyCalico ... + NetworkPolicyCalico NetworkPolicy = "calico" +) + +// PossibleNetworkPolicyValues returns an array of possible values for the NetworkPolicy const type. +func PossibleNetworkPolicyValues() []NetworkPolicy { + return []NetworkPolicy{NetworkPolicyAzure, NetworkPolicyCalico} +} + +// OpenShiftAgentPoolProfileRole enumerates the values for open shift agent pool profile role. +type OpenShiftAgentPoolProfileRole string + +const ( + // Compute ... + Compute OpenShiftAgentPoolProfileRole = "compute" + // Infra ... + Infra OpenShiftAgentPoolProfileRole = "infra" +) + +// PossibleOpenShiftAgentPoolProfileRoleValues returns an array of possible values for the OpenShiftAgentPoolProfileRole const type. +func PossibleOpenShiftAgentPoolProfileRoleValues() []OpenShiftAgentPoolProfileRole { + return []OpenShiftAgentPoolProfileRole{Compute, Infra} +} + +// OpenShiftContainerServiceVMSize enumerates the values for open shift container service vm size. +type OpenShiftContainerServiceVMSize string + +const ( + // StandardD16sV3 ... + StandardD16sV3 OpenShiftContainerServiceVMSize = "Standard_D16s_v3" + // StandardD2sV3 ... + StandardD2sV3 OpenShiftContainerServiceVMSize = "Standard_D2s_v3" + // StandardD32sV3 ... + StandardD32sV3 OpenShiftContainerServiceVMSize = "Standard_D32s_v3" + // StandardD4sV3 ... + StandardD4sV3 OpenShiftContainerServiceVMSize = "Standard_D4s_v3" + // StandardD64sV3 ... + StandardD64sV3 OpenShiftContainerServiceVMSize = "Standard_D64s_v3" + // StandardD8sV3 ... + StandardD8sV3 OpenShiftContainerServiceVMSize = "Standard_D8s_v3" + // StandardDS12V2 ... + StandardDS12V2 OpenShiftContainerServiceVMSize = "Standard_DS12_v2" + // StandardDS13V2 ... + StandardDS13V2 OpenShiftContainerServiceVMSize = "Standard_DS13_v2" + // StandardDS14V2 ... + StandardDS14V2 OpenShiftContainerServiceVMSize = "Standard_DS14_v2" + // StandardDS15V2 ... + StandardDS15V2 OpenShiftContainerServiceVMSize = "Standard_DS15_v2" + // StandardDS4V2 ... + StandardDS4V2 OpenShiftContainerServiceVMSize = "Standard_DS4_v2" + // StandardDS5V2 ... + StandardDS5V2 OpenShiftContainerServiceVMSize = "Standard_DS5_v2" + // StandardE16sV3 ... + StandardE16sV3 OpenShiftContainerServiceVMSize = "Standard_E16s_v3" + // StandardE20sV3 ... + StandardE20sV3 OpenShiftContainerServiceVMSize = "Standard_E20s_v3" + // StandardE32sV3 ... + StandardE32sV3 OpenShiftContainerServiceVMSize = "Standard_E32s_v3" + // StandardE4sV3 ... + StandardE4sV3 OpenShiftContainerServiceVMSize = "Standard_E4s_v3" + // StandardE64sV3 ... + StandardE64sV3 OpenShiftContainerServiceVMSize = "Standard_E64s_v3" + // StandardE8sV3 ... + StandardE8sV3 OpenShiftContainerServiceVMSize = "Standard_E8s_v3" + // StandardF16s ... + StandardF16s OpenShiftContainerServiceVMSize = "Standard_F16s" + // StandardF16sV2 ... + StandardF16sV2 OpenShiftContainerServiceVMSize = "Standard_F16s_v2" + // StandardF32sV2 ... + StandardF32sV2 OpenShiftContainerServiceVMSize = "Standard_F32s_v2" + // StandardF64sV2 ... + StandardF64sV2 OpenShiftContainerServiceVMSize = "Standard_F64s_v2" + // StandardF72sV2 ... + StandardF72sV2 OpenShiftContainerServiceVMSize = "Standard_F72s_v2" + // StandardF8s ... + StandardF8s OpenShiftContainerServiceVMSize = "Standard_F8s" + // StandardF8sV2 ... + StandardF8sV2 OpenShiftContainerServiceVMSize = "Standard_F8s_v2" + // StandardGS2 ... + StandardGS2 OpenShiftContainerServiceVMSize = "Standard_GS2" + // StandardGS3 ... + StandardGS3 OpenShiftContainerServiceVMSize = "Standard_GS3" + // StandardGS4 ... + StandardGS4 OpenShiftContainerServiceVMSize = "Standard_GS4" + // StandardGS5 ... + StandardGS5 OpenShiftContainerServiceVMSize = "Standard_GS5" + // StandardL16s ... + StandardL16s OpenShiftContainerServiceVMSize = "Standard_L16s" + // StandardL32s ... + StandardL32s OpenShiftContainerServiceVMSize = "Standard_L32s" + // StandardL4s ... + StandardL4s OpenShiftContainerServiceVMSize = "Standard_L4s" + // StandardL8s ... + StandardL8s OpenShiftContainerServiceVMSize = "Standard_L8s" +) + +// PossibleOpenShiftContainerServiceVMSizeValues returns an array of possible values for the OpenShiftContainerServiceVMSize const type. +func PossibleOpenShiftContainerServiceVMSizeValues() []OpenShiftContainerServiceVMSize { + return []OpenShiftContainerServiceVMSize{StandardD16sV3, StandardD2sV3, StandardD32sV3, StandardD4sV3, StandardD64sV3, StandardD8sV3, StandardDS12V2, StandardDS13V2, StandardDS14V2, StandardDS15V2, StandardDS4V2, StandardDS5V2, StandardE16sV3, StandardE20sV3, StandardE32sV3, StandardE4sV3, StandardE64sV3, StandardE8sV3, StandardF16s, StandardF16sV2, StandardF32sV2, StandardF64sV2, StandardF72sV2, StandardF8s, StandardF8sV2, StandardGS2, StandardGS3, StandardGS4, StandardGS5, StandardL16s, StandardL32s, StandardL4s, StandardL8s} +} + +// OrchestratorTypes enumerates the values for orchestrator types. +type OrchestratorTypes string + +const ( + // Custom ... + Custom OrchestratorTypes = "Custom" + // DCOS ... + DCOS OrchestratorTypes = "DCOS" + // DockerCE ... + DockerCE OrchestratorTypes = "DockerCE" + // Kubernetes ... + Kubernetes OrchestratorTypes = "Kubernetes" + // Swarm ... + Swarm OrchestratorTypes = "Swarm" +) + +// PossibleOrchestratorTypesValues returns an array of possible values for the OrchestratorTypes const type. +func PossibleOrchestratorTypesValues() []OrchestratorTypes { + return []OrchestratorTypes{Custom, DCOS, DockerCE, Kubernetes, Swarm} +} + +// OSType enumerates the values for os type. +type OSType string + +const ( + // Linux ... + Linux OSType = "Linux" + // Windows ... + Windows OSType = "Windows" +) + +// PossibleOSTypeValues returns an array of possible values for the OSType const type. +func PossibleOSTypeValues() []OSType { + return []OSType{Linux, Windows} +} + +// OutboundType enumerates the values for outbound type. +type OutboundType string + +const ( + // LoadBalancer ... + LoadBalancer OutboundType = "loadBalancer" + // UserDefinedRouting ... + UserDefinedRouting OutboundType = "userDefinedRouting" +) + +// PossibleOutboundTypeValues returns an array of possible values for the OutboundType const type. +func PossibleOutboundTypeValues() []OutboundType { + return []OutboundType{LoadBalancer, UserDefinedRouting} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // None ... + None ResourceIdentityType = "None" + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{None, SystemAssigned} +} + +// ScaleSetEvictionPolicy enumerates the values for scale set eviction policy. +type ScaleSetEvictionPolicy string + +const ( + // Deallocate ... + Deallocate ScaleSetEvictionPolicy = "Deallocate" + // Delete ... + Delete ScaleSetEvictionPolicy = "Delete" +) + +// PossibleScaleSetEvictionPolicyValues returns an array of possible values for the ScaleSetEvictionPolicy const type. +func PossibleScaleSetEvictionPolicyValues() []ScaleSetEvictionPolicy { + return []ScaleSetEvictionPolicy{Deallocate, Delete} +} + +// ScaleSetPriority enumerates the values for scale set priority. +type ScaleSetPriority string + +const ( + // Low ... + Low ScaleSetPriority = "Low" + // Regular ... + Regular ScaleSetPriority = "Regular" +) + +// PossibleScaleSetPriorityValues returns an array of possible values for the ScaleSetPriority const type. +func PossibleScaleSetPriorityValues() []ScaleSetPriority { + return []ScaleSetPriority{Low, Regular} +} + +// StorageProfileTypes enumerates the values for storage profile types. +type StorageProfileTypes string + +const ( + // ManagedDisks ... + ManagedDisks StorageProfileTypes = "ManagedDisks" + // StorageAccount ... + StorageAccount StorageProfileTypes = "StorageAccount" +) + +// PossibleStorageProfileTypesValues returns an array of possible values for the StorageProfileTypes const type. +func PossibleStorageProfileTypesValues() []StorageProfileTypes { + return []StorageProfileTypes{ManagedDisks, StorageAccount} +} + +// VMSizeTypes enumerates the values for vm size types. +type VMSizeTypes string + +const ( + // VMSizeTypesStandardA1 ... + VMSizeTypesStandardA1 VMSizeTypes = "Standard_A1" + // VMSizeTypesStandardA10 ... + VMSizeTypesStandardA10 VMSizeTypes = "Standard_A10" + // VMSizeTypesStandardA11 ... + VMSizeTypesStandardA11 VMSizeTypes = "Standard_A11" + // VMSizeTypesStandardA1V2 ... + VMSizeTypesStandardA1V2 VMSizeTypes = "Standard_A1_v2" + // VMSizeTypesStandardA2 ... + VMSizeTypesStandardA2 VMSizeTypes = "Standard_A2" + // VMSizeTypesStandardA2mV2 ... + VMSizeTypesStandardA2mV2 VMSizeTypes = "Standard_A2m_v2" + // VMSizeTypesStandardA2V2 ... + VMSizeTypesStandardA2V2 VMSizeTypes = "Standard_A2_v2" + // VMSizeTypesStandardA3 ... + VMSizeTypesStandardA3 VMSizeTypes = "Standard_A3" + // VMSizeTypesStandardA4 ... + VMSizeTypesStandardA4 VMSizeTypes = "Standard_A4" + // VMSizeTypesStandardA4mV2 ... + VMSizeTypesStandardA4mV2 VMSizeTypes = "Standard_A4m_v2" + // VMSizeTypesStandardA4V2 ... + VMSizeTypesStandardA4V2 VMSizeTypes = "Standard_A4_v2" + // VMSizeTypesStandardA5 ... + VMSizeTypesStandardA5 VMSizeTypes = "Standard_A5" + // VMSizeTypesStandardA6 ... + VMSizeTypesStandardA6 VMSizeTypes = "Standard_A6" + // VMSizeTypesStandardA7 ... + VMSizeTypesStandardA7 VMSizeTypes = "Standard_A7" + // VMSizeTypesStandardA8 ... + VMSizeTypesStandardA8 VMSizeTypes = "Standard_A8" + // VMSizeTypesStandardA8mV2 ... + VMSizeTypesStandardA8mV2 VMSizeTypes = "Standard_A8m_v2" + // VMSizeTypesStandardA8V2 ... + VMSizeTypesStandardA8V2 VMSizeTypes = "Standard_A8_v2" + // VMSizeTypesStandardA9 ... + VMSizeTypesStandardA9 VMSizeTypes = "Standard_A9" + // VMSizeTypesStandardB2ms ... + VMSizeTypesStandardB2ms VMSizeTypes = "Standard_B2ms" + // VMSizeTypesStandardB2s ... + VMSizeTypesStandardB2s VMSizeTypes = "Standard_B2s" + // VMSizeTypesStandardB4ms ... + VMSizeTypesStandardB4ms VMSizeTypes = "Standard_B4ms" + // VMSizeTypesStandardB8ms ... + VMSizeTypesStandardB8ms VMSizeTypes = "Standard_B8ms" + // VMSizeTypesStandardD1 ... + VMSizeTypesStandardD1 VMSizeTypes = "Standard_D1" + // VMSizeTypesStandardD11 ... + VMSizeTypesStandardD11 VMSizeTypes = "Standard_D11" + // VMSizeTypesStandardD11V2 ... + VMSizeTypesStandardD11V2 VMSizeTypes = "Standard_D11_v2" + // VMSizeTypesStandardD11V2Promo ... + VMSizeTypesStandardD11V2Promo VMSizeTypes = "Standard_D11_v2_Promo" + // VMSizeTypesStandardD12 ... + VMSizeTypesStandardD12 VMSizeTypes = "Standard_D12" + // VMSizeTypesStandardD12V2 ... + VMSizeTypesStandardD12V2 VMSizeTypes = "Standard_D12_v2" + // VMSizeTypesStandardD12V2Promo ... + VMSizeTypesStandardD12V2Promo VMSizeTypes = "Standard_D12_v2_Promo" + // VMSizeTypesStandardD13 ... + VMSizeTypesStandardD13 VMSizeTypes = "Standard_D13" + // VMSizeTypesStandardD13V2 ... + VMSizeTypesStandardD13V2 VMSizeTypes = "Standard_D13_v2" + // VMSizeTypesStandardD13V2Promo ... + VMSizeTypesStandardD13V2Promo VMSizeTypes = "Standard_D13_v2_Promo" + // VMSizeTypesStandardD14 ... + VMSizeTypesStandardD14 VMSizeTypes = "Standard_D14" + // VMSizeTypesStandardD14V2 ... + VMSizeTypesStandardD14V2 VMSizeTypes = "Standard_D14_v2" + // VMSizeTypesStandardD14V2Promo ... + VMSizeTypesStandardD14V2Promo VMSizeTypes = "Standard_D14_v2_Promo" + // VMSizeTypesStandardD15V2 ... + VMSizeTypesStandardD15V2 VMSizeTypes = "Standard_D15_v2" + // VMSizeTypesStandardD16sV3 ... + VMSizeTypesStandardD16sV3 VMSizeTypes = "Standard_D16s_v3" + // VMSizeTypesStandardD16V3 ... + VMSizeTypesStandardD16V3 VMSizeTypes = "Standard_D16_v3" + // VMSizeTypesStandardD1V2 ... + VMSizeTypesStandardD1V2 VMSizeTypes = "Standard_D1_v2" + // VMSizeTypesStandardD2 ... + VMSizeTypesStandardD2 VMSizeTypes = "Standard_D2" + // VMSizeTypesStandardD2sV3 ... + VMSizeTypesStandardD2sV3 VMSizeTypes = "Standard_D2s_v3" + // VMSizeTypesStandardD2V2 ... + VMSizeTypesStandardD2V2 VMSizeTypes = "Standard_D2_v2" + // VMSizeTypesStandardD2V2Promo ... + VMSizeTypesStandardD2V2Promo VMSizeTypes = "Standard_D2_v2_Promo" + // VMSizeTypesStandardD2V3 ... + VMSizeTypesStandardD2V3 VMSizeTypes = "Standard_D2_v3" + // VMSizeTypesStandardD3 ... + VMSizeTypesStandardD3 VMSizeTypes = "Standard_D3" + // VMSizeTypesStandardD32sV3 ... + VMSizeTypesStandardD32sV3 VMSizeTypes = "Standard_D32s_v3" + // VMSizeTypesStandardD32V3 ... + VMSizeTypesStandardD32V3 VMSizeTypes = "Standard_D32_v3" + // VMSizeTypesStandardD3V2 ... + VMSizeTypesStandardD3V2 VMSizeTypes = "Standard_D3_v2" + // VMSizeTypesStandardD3V2Promo ... + VMSizeTypesStandardD3V2Promo VMSizeTypes = "Standard_D3_v2_Promo" + // VMSizeTypesStandardD4 ... + VMSizeTypesStandardD4 VMSizeTypes = "Standard_D4" + // VMSizeTypesStandardD4sV3 ... + VMSizeTypesStandardD4sV3 VMSizeTypes = "Standard_D4s_v3" + // VMSizeTypesStandardD4V2 ... + VMSizeTypesStandardD4V2 VMSizeTypes = "Standard_D4_v2" + // VMSizeTypesStandardD4V2Promo ... + VMSizeTypesStandardD4V2Promo VMSizeTypes = "Standard_D4_v2_Promo" + // VMSizeTypesStandardD4V3 ... + VMSizeTypesStandardD4V3 VMSizeTypes = "Standard_D4_v3" + // VMSizeTypesStandardD5V2 ... + VMSizeTypesStandardD5V2 VMSizeTypes = "Standard_D5_v2" + // VMSizeTypesStandardD5V2Promo ... + VMSizeTypesStandardD5V2Promo VMSizeTypes = "Standard_D5_v2_Promo" + // VMSizeTypesStandardD64sV3 ... + VMSizeTypesStandardD64sV3 VMSizeTypes = "Standard_D64s_v3" + // VMSizeTypesStandardD64V3 ... + VMSizeTypesStandardD64V3 VMSizeTypes = "Standard_D64_v3" + // VMSizeTypesStandardD8sV3 ... + VMSizeTypesStandardD8sV3 VMSizeTypes = "Standard_D8s_v3" + // VMSizeTypesStandardD8V3 ... + VMSizeTypesStandardD8V3 VMSizeTypes = "Standard_D8_v3" + // VMSizeTypesStandardDS1 ... + VMSizeTypesStandardDS1 VMSizeTypes = "Standard_DS1" + // VMSizeTypesStandardDS11 ... + VMSizeTypesStandardDS11 VMSizeTypes = "Standard_DS11" + // VMSizeTypesStandardDS11V2 ... + VMSizeTypesStandardDS11V2 VMSizeTypes = "Standard_DS11_v2" + // VMSizeTypesStandardDS11V2Promo ... + VMSizeTypesStandardDS11V2Promo VMSizeTypes = "Standard_DS11_v2_Promo" + // VMSizeTypesStandardDS12 ... + VMSizeTypesStandardDS12 VMSizeTypes = "Standard_DS12" + // VMSizeTypesStandardDS12V2 ... + VMSizeTypesStandardDS12V2 VMSizeTypes = "Standard_DS12_v2" + // VMSizeTypesStandardDS12V2Promo ... + VMSizeTypesStandardDS12V2Promo VMSizeTypes = "Standard_DS12_v2_Promo" + // VMSizeTypesStandardDS13 ... + VMSizeTypesStandardDS13 VMSizeTypes = "Standard_DS13" + // VMSizeTypesStandardDS132V2 ... + VMSizeTypesStandardDS132V2 VMSizeTypes = "Standard_DS13-2_v2" + // VMSizeTypesStandardDS134V2 ... + VMSizeTypesStandardDS134V2 VMSizeTypes = "Standard_DS13-4_v2" + // VMSizeTypesStandardDS13V2 ... + VMSizeTypesStandardDS13V2 VMSizeTypes = "Standard_DS13_v2" + // VMSizeTypesStandardDS13V2Promo ... + VMSizeTypesStandardDS13V2Promo VMSizeTypes = "Standard_DS13_v2_Promo" + // VMSizeTypesStandardDS14 ... + VMSizeTypesStandardDS14 VMSizeTypes = "Standard_DS14" + // VMSizeTypesStandardDS144V2 ... + VMSizeTypesStandardDS144V2 VMSizeTypes = "Standard_DS14-4_v2" + // VMSizeTypesStandardDS148V2 ... + VMSizeTypesStandardDS148V2 VMSizeTypes = "Standard_DS14-8_v2" + // VMSizeTypesStandardDS14V2 ... + VMSizeTypesStandardDS14V2 VMSizeTypes = "Standard_DS14_v2" + // VMSizeTypesStandardDS14V2Promo ... + VMSizeTypesStandardDS14V2Promo VMSizeTypes = "Standard_DS14_v2_Promo" + // VMSizeTypesStandardDS15V2 ... + VMSizeTypesStandardDS15V2 VMSizeTypes = "Standard_DS15_v2" + // VMSizeTypesStandardDS1V2 ... + VMSizeTypesStandardDS1V2 VMSizeTypes = "Standard_DS1_v2" + // VMSizeTypesStandardDS2 ... + VMSizeTypesStandardDS2 VMSizeTypes = "Standard_DS2" + // VMSizeTypesStandardDS2V2 ... + VMSizeTypesStandardDS2V2 VMSizeTypes = "Standard_DS2_v2" + // VMSizeTypesStandardDS2V2Promo ... + VMSizeTypesStandardDS2V2Promo VMSizeTypes = "Standard_DS2_v2_Promo" + // VMSizeTypesStandardDS3 ... + VMSizeTypesStandardDS3 VMSizeTypes = "Standard_DS3" + // VMSizeTypesStandardDS3V2 ... + VMSizeTypesStandardDS3V2 VMSizeTypes = "Standard_DS3_v2" + // VMSizeTypesStandardDS3V2Promo ... + VMSizeTypesStandardDS3V2Promo VMSizeTypes = "Standard_DS3_v2_Promo" + // VMSizeTypesStandardDS4 ... + VMSizeTypesStandardDS4 VMSizeTypes = "Standard_DS4" + // VMSizeTypesStandardDS4V2 ... + VMSizeTypesStandardDS4V2 VMSizeTypes = "Standard_DS4_v2" + // VMSizeTypesStandardDS4V2Promo ... + VMSizeTypesStandardDS4V2Promo VMSizeTypes = "Standard_DS4_v2_Promo" + // VMSizeTypesStandardDS5V2 ... + VMSizeTypesStandardDS5V2 VMSizeTypes = "Standard_DS5_v2" + // VMSizeTypesStandardDS5V2Promo ... + VMSizeTypesStandardDS5V2Promo VMSizeTypes = "Standard_DS5_v2_Promo" + // VMSizeTypesStandardE16sV3 ... + VMSizeTypesStandardE16sV3 VMSizeTypes = "Standard_E16s_v3" + // VMSizeTypesStandardE16V3 ... + VMSizeTypesStandardE16V3 VMSizeTypes = "Standard_E16_v3" + // VMSizeTypesStandardE2sV3 ... + VMSizeTypesStandardE2sV3 VMSizeTypes = "Standard_E2s_v3" + // VMSizeTypesStandardE2V3 ... + VMSizeTypesStandardE2V3 VMSizeTypes = "Standard_E2_v3" + // VMSizeTypesStandardE3216sV3 ... + VMSizeTypesStandardE3216sV3 VMSizeTypes = "Standard_E32-16s_v3" + // VMSizeTypesStandardE328sV3 ... + VMSizeTypesStandardE328sV3 VMSizeTypes = "Standard_E32-8s_v3" + // VMSizeTypesStandardE32sV3 ... + VMSizeTypesStandardE32sV3 VMSizeTypes = "Standard_E32s_v3" + // VMSizeTypesStandardE32V3 ... + VMSizeTypesStandardE32V3 VMSizeTypes = "Standard_E32_v3" + // VMSizeTypesStandardE4sV3 ... + VMSizeTypesStandardE4sV3 VMSizeTypes = "Standard_E4s_v3" + // VMSizeTypesStandardE4V3 ... + VMSizeTypesStandardE4V3 VMSizeTypes = "Standard_E4_v3" + // VMSizeTypesStandardE6416sV3 ... + VMSizeTypesStandardE6416sV3 VMSizeTypes = "Standard_E64-16s_v3" + // VMSizeTypesStandardE6432sV3 ... + VMSizeTypesStandardE6432sV3 VMSizeTypes = "Standard_E64-32s_v3" + // VMSizeTypesStandardE64sV3 ... + VMSizeTypesStandardE64sV3 VMSizeTypes = "Standard_E64s_v3" + // VMSizeTypesStandardE64V3 ... + VMSizeTypesStandardE64V3 VMSizeTypes = "Standard_E64_v3" + // VMSizeTypesStandardE8sV3 ... + VMSizeTypesStandardE8sV3 VMSizeTypes = "Standard_E8s_v3" + // VMSizeTypesStandardE8V3 ... + VMSizeTypesStandardE8V3 VMSizeTypes = "Standard_E8_v3" + // VMSizeTypesStandardF1 ... + VMSizeTypesStandardF1 VMSizeTypes = "Standard_F1" + // VMSizeTypesStandardF16 ... + VMSizeTypesStandardF16 VMSizeTypes = "Standard_F16" + // VMSizeTypesStandardF16s ... + VMSizeTypesStandardF16s VMSizeTypes = "Standard_F16s" + // VMSizeTypesStandardF16sV2 ... + VMSizeTypesStandardF16sV2 VMSizeTypes = "Standard_F16s_v2" + // VMSizeTypesStandardF1s ... + VMSizeTypesStandardF1s VMSizeTypes = "Standard_F1s" + // VMSizeTypesStandardF2 ... + VMSizeTypesStandardF2 VMSizeTypes = "Standard_F2" + // VMSizeTypesStandardF2s ... + VMSizeTypesStandardF2s VMSizeTypes = "Standard_F2s" + // VMSizeTypesStandardF2sV2 ... + VMSizeTypesStandardF2sV2 VMSizeTypes = "Standard_F2s_v2" + // VMSizeTypesStandardF32sV2 ... + VMSizeTypesStandardF32sV2 VMSizeTypes = "Standard_F32s_v2" + // VMSizeTypesStandardF4 ... + VMSizeTypesStandardF4 VMSizeTypes = "Standard_F4" + // VMSizeTypesStandardF4s ... + VMSizeTypesStandardF4s VMSizeTypes = "Standard_F4s" + // VMSizeTypesStandardF4sV2 ... + VMSizeTypesStandardF4sV2 VMSizeTypes = "Standard_F4s_v2" + // VMSizeTypesStandardF64sV2 ... + VMSizeTypesStandardF64sV2 VMSizeTypes = "Standard_F64s_v2" + // VMSizeTypesStandardF72sV2 ... + VMSizeTypesStandardF72sV2 VMSizeTypes = "Standard_F72s_v2" + // VMSizeTypesStandardF8 ... + VMSizeTypesStandardF8 VMSizeTypes = "Standard_F8" + // VMSizeTypesStandardF8s ... + VMSizeTypesStandardF8s VMSizeTypes = "Standard_F8s" + // VMSizeTypesStandardF8sV2 ... + VMSizeTypesStandardF8sV2 VMSizeTypes = "Standard_F8s_v2" + // VMSizeTypesStandardG1 ... + VMSizeTypesStandardG1 VMSizeTypes = "Standard_G1" + // VMSizeTypesStandardG2 ... + VMSizeTypesStandardG2 VMSizeTypes = "Standard_G2" + // VMSizeTypesStandardG3 ... + VMSizeTypesStandardG3 VMSizeTypes = "Standard_G3" + // VMSizeTypesStandardG4 ... + VMSizeTypesStandardG4 VMSizeTypes = "Standard_G4" + // VMSizeTypesStandardG5 ... + VMSizeTypesStandardG5 VMSizeTypes = "Standard_G5" + // VMSizeTypesStandardGS1 ... + VMSizeTypesStandardGS1 VMSizeTypes = "Standard_GS1" + // VMSizeTypesStandardGS2 ... + VMSizeTypesStandardGS2 VMSizeTypes = "Standard_GS2" + // VMSizeTypesStandardGS3 ... + VMSizeTypesStandardGS3 VMSizeTypes = "Standard_GS3" + // VMSizeTypesStandardGS4 ... + VMSizeTypesStandardGS4 VMSizeTypes = "Standard_GS4" + // VMSizeTypesStandardGS44 ... + VMSizeTypesStandardGS44 VMSizeTypes = "Standard_GS4-4" + // VMSizeTypesStandardGS48 ... + VMSizeTypesStandardGS48 VMSizeTypes = "Standard_GS4-8" + // VMSizeTypesStandardGS5 ... + VMSizeTypesStandardGS5 VMSizeTypes = "Standard_GS5" + // VMSizeTypesStandardGS516 ... + VMSizeTypesStandardGS516 VMSizeTypes = "Standard_GS5-16" + // VMSizeTypesStandardGS58 ... + VMSizeTypesStandardGS58 VMSizeTypes = "Standard_GS5-8" + // VMSizeTypesStandardH16 ... + VMSizeTypesStandardH16 VMSizeTypes = "Standard_H16" + // VMSizeTypesStandardH16m ... + VMSizeTypesStandardH16m VMSizeTypes = "Standard_H16m" + // VMSizeTypesStandardH16mr ... + VMSizeTypesStandardH16mr VMSizeTypes = "Standard_H16mr" + // VMSizeTypesStandardH16r ... + VMSizeTypesStandardH16r VMSizeTypes = "Standard_H16r" + // VMSizeTypesStandardH8 ... + VMSizeTypesStandardH8 VMSizeTypes = "Standard_H8" + // VMSizeTypesStandardH8m ... + VMSizeTypesStandardH8m VMSizeTypes = "Standard_H8m" + // VMSizeTypesStandardL16s ... + VMSizeTypesStandardL16s VMSizeTypes = "Standard_L16s" + // VMSizeTypesStandardL32s ... + VMSizeTypesStandardL32s VMSizeTypes = "Standard_L32s" + // VMSizeTypesStandardL4s ... + VMSizeTypesStandardL4s VMSizeTypes = "Standard_L4s" + // VMSizeTypesStandardL8s ... + VMSizeTypesStandardL8s VMSizeTypes = "Standard_L8s" + // VMSizeTypesStandardM12832ms ... + VMSizeTypesStandardM12832ms VMSizeTypes = "Standard_M128-32ms" + // VMSizeTypesStandardM12864ms ... + VMSizeTypesStandardM12864ms VMSizeTypes = "Standard_M128-64ms" + // VMSizeTypesStandardM128ms ... + VMSizeTypesStandardM128ms VMSizeTypes = "Standard_M128ms" + // VMSizeTypesStandardM128s ... + VMSizeTypesStandardM128s VMSizeTypes = "Standard_M128s" + // VMSizeTypesStandardM6416ms ... + VMSizeTypesStandardM6416ms VMSizeTypes = "Standard_M64-16ms" + // VMSizeTypesStandardM6432ms ... + VMSizeTypesStandardM6432ms VMSizeTypes = "Standard_M64-32ms" + // VMSizeTypesStandardM64ms ... + VMSizeTypesStandardM64ms VMSizeTypes = "Standard_M64ms" + // VMSizeTypesStandardM64s ... + VMSizeTypesStandardM64s VMSizeTypes = "Standard_M64s" + // VMSizeTypesStandardNC12 ... + VMSizeTypesStandardNC12 VMSizeTypes = "Standard_NC12" + // VMSizeTypesStandardNC12sV2 ... + VMSizeTypesStandardNC12sV2 VMSizeTypes = "Standard_NC12s_v2" + // VMSizeTypesStandardNC12sV3 ... + VMSizeTypesStandardNC12sV3 VMSizeTypes = "Standard_NC12s_v3" + // VMSizeTypesStandardNC24 ... + VMSizeTypesStandardNC24 VMSizeTypes = "Standard_NC24" + // VMSizeTypesStandardNC24r ... + VMSizeTypesStandardNC24r VMSizeTypes = "Standard_NC24r" + // VMSizeTypesStandardNC24rsV2 ... + VMSizeTypesStandardNC24rsV2 VMSizeTypes = "Standard_NC24rs_v2" + // VMSizeTypesStandardNC24rsV3 ... + VMSizeTypesStandardNC24rsV3 VMSizeTypes = "Standard_NC24rs_v3" + // VMSizeTypesStandardNC24sV2 ... + VMSizeTypesStandardNC24sV2 VMSizeTypes = "Standard_NC24s_v2" + // VMSizeTypesStandardNC24sV3 ... + VMSizeTypesStandardNC24sV3 VMSizeTypes = "Standard_NC24s_v3" + // VMSizeTypesStandardNC6 ... + VMSizeTypesStandardNC6 VMSizeTypes = "Standard_NC6" + // VMSizeTypesStandardNC6sV2 ... + VMSizeTypesStandardNC6sV2 VMSizeTypes = "Standard_NC6s_v2" + // VMSizeTypesStandardNC6sV3 ... + VMSizeTypesStandardNC6sV3 VMSizeTypes = "Standard_NC6s_v3" + // VMSizeTypesStandardND12s ... + VMSizeTypesStandardND12s VMSizeTypes = "Standard_ND12s" + // VMSizeTypesStandardND24rs ... + VMSizeTypesStandardND24rs VMSizeTypes = "Standard_ND24rs" + // VMSizeTypesStandardND24s ... + VMSizeTypesStandardND24s VMSizeTypes = "Standard_ND24s" + // VMSizeTypesStandardND6s ... + VMSizeTypesStandardND6s VMSizeTypes = "Standard_ND6s" + // VMSizeTypesStandardNV12 ... + VMSizeTypesStandardNV12 VMSizeTypes = "Standard_NV12" + // VMSizeTypesStandardNV24 ... + VMSizeTypesStandardNV24 VMSizeTypes = "Standard_NV24" + // VMSizeTypesStandardNV6 ... + VMSizeTypesStandardNV6 VMSizeTypes = "Standard_NV6" +) + +// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type. +func PossibleVMSizeTypesValues() []VMSizeTypes { + return []VMSizeTypes{VMSizeTypesStandardA1, VMSizeTypesStandardA10, VMSizeTypesStandardA11, VMSizeTypesStandardA1V2, VMSizeTypesStandardA2, VMSizeTypesStandardA2mV2, VMSizeTypesStandardA2V2, VMSizeTypesStandardA3, VMSizeTypesStandardA4, VMSizeTypesStandardA4mV2, VMSizeTypesStandardA4V2, VMSizeTypesStandardA5, VMSizeTypesStandardA6, VMSizeTypesStandardA7, VMSizeTypesStandardA8, VMSizeTypesStandardA8mV2, VMSizeTypesStandardA8V2, VMSizeTypesStandardA9, VMSizeTypesStandardB2ms, VMSizeTypesStandardB2s, VMSizeTypesStandardB4ms, VMSizeTypesStandardB8ms, VMSizeTypesStandardD1, VMSizeTypesStandardD11, VMSizeTypesStandardD11V2, VMSizeTypesStandardD11V2Promo, VMSizeTypesStandardD12, VMSizeTypesStandardD12V2, VMSizeTypesStandardD12V2Promo, VMSizeTypesStandardD13, VMSizeTypesStandardD13V2, VMSizeTypesStandardD13V2Promo, VMSizeTypesStandardD14, VMSizeTypesStandardD14V2, VMSizeTypesStandardD14V2Promo, VMSizeTypesStandardD15V2, VMSizeTypesStandardD16sV3, VMSizeTypesStandardD16V3, VMSizeTypesStandardD1V2, VMSizeTypesStandardD2, VMSizeTypesStandardD2sV3, VMSizeTypesStandardD2V2, VMSizeTypesStandardD2V2Promo, VMSizeTypesStandardD2V3, VMSizeTypesStandardD3, VMSizeTypesStandardD32sV3, VMSizeTypesStandardD32V3, VMSizeTypesStandardD3V2, VMSizeTypesStandardD3V2Promo, VMSizeTypesStandardD4, VMSizeTypesStandardD4sV3, VMSizeTypesStandardD4V2, VMSizeTypesStandardD4V2Promo, VMSizeTypesStandardD4V3, VMSizeTypesStandardD5V2, VMSizeTypesStandardD5V2Promo, VMSizeTypesStandardD64sV3, VMSizeTypesStandardD64V3, VMSizeTypesStandardD8sV3, VMSizeTypesStandardD8V3, VMSizeTypesStandardDS1, VMSizeTypesStandardDS11, VMSizeTypesStandardDS11V2, VMSizeTypesStandardDS11V2Promo, VMSizeTypesStandardDS12, VMSizeTypesStandardDS12V2, VMSizeTypesStandardDS12V2Promo, VMSizeTypesStandardDS13, VMSizeTypesStandardDS132V2, VMSizeTypesStandardDS134V2, VMSizeTypesStandardDS13V2, VMSizeTypesStandardDS13V2Promo, VMSizeTypesStandardDS14, VMSizeTypesStandardDS144V2, VMSizeTypesStandardDS148V2, VMSizeTypesStandardDS14V2, VMSizeTypesStandardDS14V2Promo, VMSizeTypesStandardDS15V2, VMSizeTypesStandardDS1V2, VMSizeTypesStandardDS2, VMSizeTypesStandardDS2V2, VMSizeTypesStandardDS2V2Promo, VMSizeTypesStandardDS3, VMSizeTypesStandardDS3V2, VMSizeTypesStandardDS3V2Promo, VMSizeTypesStandardDS4, VMSizeTypesStandardDS4V2, VMSizeTypesStandardDS4V2Promo, VMSizeTypesStandardDS5V2, VMSizeTypesStandardDS5V2Promo, VMSizeTypesStandardE16sV3, VMSizeTypesStandardE16V3, VMSizeTypesStandardE2sV3, VMSizeTypesStandardE2V3, VMSizeTypesStandardE3216sV3, VMSizeTypesStandardE328sV3, VMSizeTypesStandardE32sV3, VMSizeTypesStandardE32V3, VMSizeTypesStandardE4sV3, VMSizeTypesStandardE4V3, VMSizeTypesStandardE6416sV3, VMSizeTypesStandardE6432sV3, VMSizeTypesStandardE64sV3, VMSizeTypesStandardE64V3, VMSizeTypesStandardE8sV3, VMSizeTypesStandardE8V3, VMSizeTypesStandardF1, VMSizeTypesStandardF16, VMSizeTypesStandardF16s, VMSizeTypesStandardF16sV2, VMSizeTypesStandardF1s, VMSizeTypesStandardF2, VMSizeTypesStandardF2s, VMSizeTypesStandardF2sV2, VMSizeTypesStandardF32sV2, VMSizeTypesStandardF4, VMSizeTypesStandardF4s, VMSizeTypesStandardF4sV2, VMSizeTypesStandardF64sV2, VMSizeTypesStandardF72sV2, VMSizeTypesStandardF8, VMSizeTypesStandardF8s, VMSizeTypesStandardF8sV2, VMSizeTypesStandardG1, VMSizeTypesStandardG2, VMSizeTypesStandardG3, VMSizeTypesStandardG4, VMSizeTypesStandardG5, VMSizeTypesStandardGS1, VMSizeTypesStandardGS2, VMSizeTypesStandardGS3, VMSizeTypesStandardGS4, VMSizeTypesStandardGS44, VMSizeTypesStandardGS48, VMSizeTypesStandardGS5, VMSizeTypesStandardGS516, VMSizeTypesStandardGS58, VMSizeTypesStandardH16, VMSizeTypesStandardH16m, VMSizeTypesStandardH16mr, VMSizeTypesStandardH16r, VMSizeTypesStandardH8, VMSizeTypesStandardH8m, VMSizeTypesStandardL16s, VMSizeTypesStandardL32s, VMSizeTypesStandardL4s, VMSizeTypesStandardL8s, VMSizeTypesStandardM12832ms, VMSizeTypesStandardM12864ms, VMSizeTypesStandardM128ms, VMSizeTypesStandardM128s, VMSizeTypesStandardM6416ms, VMSizeTypesStandardM6432ms, VMSizeTypesStandardM64ms, VMSizeTypesStandardM64s, VMSizeTypesStandardNC12, VMSizeTypesStandardNC12sV2, VMSizeTypesStandardNC12sV3, VMSizeTypesStandardNC24, VMSizeTypesStandardNC24r, VMSizeTypesStandardNC24rsV2, VMSizeTypesStandardNC24rsV3, VMSizeTypesStandardNC24sV2, VMSizeTypesStandardNC24sV3, VMSizeTypesStandardNC6, VMSizeTypesStandardNC6sV2, VMSizeTypesStandardNC6sV3, VMSizeTypesStandardND12s, VMSizeTypesStandardND24rs, VMSizeTypesStandardND24s, VMSizeTypesStandardND6s, VMSizeTypesStandardNV12, VMSizeTypesStandardNV24, VMSizeTypesStandardNV6} +} + +// AccessProfile profile for enabling a user to access a managed cluster. +type AccessProfile struct { + // KubeConfig - Base64-encoded Kubernetes configuration file. + KubeConfig *[]byte `json:"kubeConfig,omitempty"` +} + +// AgentPool agent Pool. +type AgentPool struct { + autorest.Response `json:"-"` + // ManagedClusterAgentPoolProfileProperties - Properties of an agent pool. + *ManagedClusterAgentPoolProfileProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,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"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AgentPool. +func (ap AgentPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.ManagedClusterAgentPoolProfileProperties != nil { + objectMap["properties"] = ap.ManagedClusterAgentPoolProfileProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AgentPool struct. +func (ap *AgentPool) UnmarshalJSON(body []byte) error { + var m map[string]*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 managedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties + err = json.Unmarshal(*v, &managedClusterAgentPoolProfileProperties) + if err != nil { + return err + } + ap.ManagedClusterAgentPoolProfileProperties = &managedClusterAgentPoolProfileProperties + } + 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 + } + } + } + + return nil +} + +// AgentPoolAvailableVersions the list of available versions for an agent pool. +type AgentPoolAvailableVersions struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the agent pool available versions. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the agent pool available versions. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the agent pool available versions. + Type *string `json:"type,omitempty"` + // AgentPoolAvailableVersionsProperties - Properties of agent pool available versions. + *AgentPoolAvailableVersionsProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AgentPoolAvailableVersions. +func (apav AgentPoolAvailableVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apav.AgentPoolAvailableVersionsProperties != nil { + objectMap["properties"] = apav.AgentPoolAvailableVersionsProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AgentPoolAvailableVersions struct. +func (apav *AgentPoolAvailableVersions) UnmarshalJSON(body []byte) error { + 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 + } + apav.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + apav.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + apav.Type = &typeVar + } + case "properties": + if v != nil { + var agentPoolAvailableVersionsProperties AgentPoolAvailableVersionsProperties + err = json.Unmarshal(*v, &agentPoolAvailableVersionsProperties) + if err != nil { + return err + } + apav.AgentPoolAvailableVersionsProperties = &agentPoolAvailableVersionsProperties + } + } + } + + return nil +} + +// AgentPoolAvailableVersionsProperties the list of available agent pool versions. +type AgentPoolAvailableVersionsProperties struct { + // AgentPoolVersions - List of versions available for agent pool. + AgentPoolVersions *[]AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem `json:"agentPoolVersions,omitempty"` +} + +// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem ... +type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct { + // Default - Whether this version is the default agent pool version. + Default *bool `json:"default,omitempty"` + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` +} + +// AgentPoolListResult the response from the List Agent Pools operation. +type AgentPoolListResult struct { + autorest.Response `json:"-"` + // Value - The list of agent pools. + Value *[]AgentPool `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of agent pool results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AgentPoolListResultIterator provides access to a complete listing of AgentPool values. +type AgentPoolListResultIterator struct { + i int + page AgentPoolListResultPage +} + +// 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 *AgentPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultIterator.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 *AgentPoolListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AgentPoolListResultIterator) 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 AgentPoolListResultIterator) Response() AgentPoolListResult { + 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 AgentPoolListResultIterator) Value() AgentPool { + if !iter.page.NotDone() { + return AgentPool{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AgentPoolListResultIterator type. +func NewAgentPoolListResultIterator(page AgentPoolListResultPage) AgentPoolListResultIterator { + return AgentPoolListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aplr AgentPoolListResult) IsEmpty() bool { + return aplr.Value == nil || len(*aplr.Value) == 0 +} + +// agentPoolListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aplr AgentPoolListResult) agentPoolListResultPreparer(ctx context.Context) (*http.Request, error) { + if aplr.NextLink == nil || len(to.String(aplr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aplr.NextLink))) +} + +// AgentPoolListResultPage contains a page of AgentPool values. +type AgentPoolListResultPage struct { + fn func(context.Context, AgentPoolListResult) (AgentPoolListResult, error) + aplr AgentPoolListResult +} + +// 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 *AgentPoolListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.aplr) + if err != nil { + return err + } + page.aplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AgentPoolListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AgentPoolListResultPage) NotDone() bool { + return !page.aplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AgentPoolListResultPage) Response() AgentPoolListResult { + return page.aplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AgentPoolListResultPage) Values() []AgentPool { + if page.aplr.IsEmpty() { + return nil + } + return *page.aplr.Value +} + +// Creates a new instance of the AgentPoolListResultPage type. +func NewAgentPoolListResultPage(getNextPage func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)) AgentPoolListResultPage { + return AgentPoolListResultPage{fn: getNextPage} +} + +// AgentPoolProfile profile for the container service agent pool. +type AgentPoolProfile struct { + // Name - Unique name of the agent pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' + VMSize VMSizeTypes `json:"vmSize,omitempty"` + // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` + // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool. + DNSPrefix *string `json:"dnsPrefix,omitempty"` + // Fqdn - READ-ONLY; FQDN for the agent pool. + Fqdn *string `json:"fqdn,omitempty"` + // Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator. + Ports *[]int32 `json:"ports,omitempty"` + // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks' + StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` + // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` +} + +// AgentPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AgentPoolsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AgentPoolsCreateOrUpdateFuture) Result(client AgentPoolsClient) (ap AgentPool, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent { + ap, err = client.CreateOrUpdateResponder(ap.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", ap.Response.Response, "Failure responding to request") + } + } + return +} + +// AgentPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AgentPoolsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AgentPoolsDeleteFuture) Result(client AgentPoolsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// AgentPoolUpgradeProfile the list of available upgrades for an agent pool. +type AgentPoolUpgradeProfile struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the agent pool upgrade profile. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the agent pool upgrade profile. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the agent pool upgrade profile. + Type *string `json:"type,omitempty"` + // AgentPoolUpgradeProfileProperties - Properties of agent pool upgrade profile. + *AgentPoolUpgradeProfileProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AgentPoolUpgradeProfile. +func (apup AgentPoolUpgradeProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apup.AgentPoolUpgradeProfileProperties != nil { + objectMap["properties"] = apup.AgentPoolUpgradeProfileProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AgentPoolUpgradeProfile struct. +func (apup *AgentPoolUpgradeProfile) UnmarshalJSON(body []byte) error { + 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 + } + apup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + apup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + apup.Type = &typeVar + } + case "properties": + if v != nil { + var agentPoolUpgradeProfileProperties AgentPoolUpgradeProfileProperties + err = json.Unmarshal(*v, &agentPoolUpgradeProfileProperties) + if err != nil { + return err + } + apup.AgentPoolUpgradeProfileProperties = &agentPoolUpgradeProfileProperties + } + } + } + + return nil +} + +// AgentPoolUpgradeProfileProperties the list of available upgrade versions. +type AgentPoolUpgradeProfileProperties struct { + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // Upgrades - List of orchestrator types and versions available for upgrade. + Upgrades *[]AgentPoolUpgradeProfilePropertiesUpgradesItem `json:"upgrades,omitempty"` +} + +// AgentPoolUpgradeProfilePropertiesUpgradesItem ... +type AgentPoolUpgradeProfilePropertiesUpgradesItem struct { + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` +} + +// CloudError an error response from the Container service. +type CloudError struct { + // Error - Details about the error. + Error *CloudErrorBody `json:"error,omitempty"` +} + +// CloudErrorBody an error response from the Container 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"` +} + +// ContainerService container service. +type ContainerService struct { + autorest.Response `json:"-"` + // Properties - Properties of the container service. + *Properties `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 ContainerService. +func (cs ContainerService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cs.Properties != nil { + objectMap["properties"] = cs.Properties + } + if cs.Location != nil { + objectMap["location"] = cs.Location + } + if cs.Tags != nil { + objectMap["tags"] = cs.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ContainerService struct. +func (cs *ContainerService) UnmarshalJSON(body []byte) error { + var m map[string]*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 properties Properties + err = json.Unmarshal(*v, &properties) + if err != nil { + return err + } + cs.Properties = &properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cs.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cs.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cs.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cs.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cs.Tags = tags + } + } + } + + return nil +} + +// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ContainerServicesCreateOrUpdateFutureType struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType") + 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, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request") + } + } + return +} + +// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ContainerServicesDeleteFutureType struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType") + return + } + ar.Response = future.Response() + return +} + +// CredentialResult the credential result response. +type CredentialResult struct { + // Name - READ-ONLY; The name of the credential. + Name *string `json:"name,omitempty"` + // Value - READ-ONLY; Base64-encoded Kubernetes configuration file. + Value *[]byte `json:"value,omitempty"` +} + +// CredentialResults the list of credential result response. +type CredentialResults struct { + autorest.Response `json:"-"` + // Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file. + Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` +} + +// CustomProfile properties to configure a custom container service cluster. +type CustomProfile struct { + // Orchestrator - The name of the custom orchestrator to use. + Orchestrator *string `json:"orchestrator,omitempty"` +} + +// DiagnosticsProfile profile for diagnostics on the container service cluster. +type DiagnosticsProfile struct { + // VMDiagnostics - Profile for diagnostics on the container service VMs. + VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"` +} + +// KeyVaultSecretRef reference to a secret stored in Azure Key Vault. +type KeyVaultSecretRef struct { + // VaultID - Key vault identifier. + VaultID *string `json:"vaultID,omitempty"` + // SecretName - The secret name. + SecretName *string `json:"secretName,omitempty"` + // Version - The secret version. + Version *string `json:"version,omitempty"` +} + +// LinuxProfile profile for Linux VMs in the container service cluster. +type LinuxProfile struct { + // AdminUsername - The administrator username to use for Linux VMs. + AdminUsername *string `json:"adminUsername,omitempty"` + // SSH - SSH configuration for Linux-based VMs running on Azure. + SSH *SSHConfiguration `json:"ssh,omitempty"` +} + +// ListResult the response from the List Container Services operation. +type ListResult struct { + autorest.Response `json:"-"` + // Value - The list of container services. + Value *[]ContainerService `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of container service results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListResultIterator provides access to a complete listing of ContainerService values. +type ListResultIterator struct { + i int + page ListResultPage +} + +// 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 *ListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.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 *ListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListResultIterator) 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 ListResultIterator) Response() ListResult { + 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 ListResultIterator) Value() ContainerService { + if !iter.page.NotDone() { + return ContainerService{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListResultIterator type. +func NewListResultIterator(page ListResultPage) ListResultIterator { + return ListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lr ListResult) IsEmpty() bool { + return lr.Value == nil || len(*lr.Value) == 0 +} + +// listResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) { + if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lr.NextLink))) +} + +// ListResultPage contains a page of ContainerService values. +type ListResultPage struct { + fn func(context.Context, ListResult) (ListResult, error) + lr ListResult +} + +// 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 *ListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lr) + if err != nil { + return err + } + page.lr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListResultPage) NotDone() bool { + return !page.lr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListResultPage) Response() ListResult { + return page.lr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListResultPage) Values() []ContainerService { + if page.lr.IsEmpty() { + return nil + } + return *page.lr.Value +} + +// Creates a new instance of the ListResultPage type. +func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return ListResultPage{fn: getNextPage} +} + +// ManagedCluster managed cluster. +type ManagedCluster struct { + autorest.Response `json:"-"` + // ManagedClusterProperties - Properties of a managed cluster. + *ManagedClusterProperties `json:"properties,omitempty"` + // Identity - The identity of the managed cluster, if configured. + Identity *ManagedClusterIdentity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ManagedCluster. +func (mc ManagedCluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mc.ManagedClusterProperties != nil { + objectMap["properties"] = mc.ManagedClusterProperties + } + if mc.Identity != nil { + objectMap["identity"] = mc.Identity + } + if mc.Location != nil { + objectMap["location"] = mc.Location + } + if mc.Tags != nil { + objectMap["tags"] = mc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct. +func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { + var m map[string]*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 managedClusterProperties ManagedClusterProperties + err = json.Unmarshal(*v, &managedClusterProperties) + if err != nil { + return err + } + mc.ManagedClusterProperties = &managedClusterProperties + } + case "identity": + if v != nil { + var identity ManagedClusterIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + mc.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mc.Tags = tags + } + } + } + + return nil +} + +// ManagedClusterAADProfile aADProfile specifies attributes for Azure Active Directory integration. +type ManagedClusterAADProfile struct { + // ClientAppID - The client AAD application ID. + ClientAppID *string `json:"clientAppID,omitempty"` + // ServerAppID - The server AAD application ID. + ServerAppID *string `json:"serverAppID,omitempty"` + // ServerAppSecret - The server AAD application secret. + ServerAppSecret *string `json:"serverAppSecret,omitempty"` + // TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. + TenantID *string `json:"tenantID,omitempty"` +} + +// ManagedClusterAccessProfile managed cluster Access Profile. +type ManagedClusterAccessProfile struct { + autorest.Response `json:"-"` + // AccessProfile - AccessProfile of a managed cluster. + *AccessProfile `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 ManagedClusterAccessProfile. +func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcap.AccessProfile != nil { + objectMap["properties"] = mcap.AccessProfile + } + if mcap.Location != nil { + objectMap["location"] = mcap.Location + } + if mcap.Tags != nil { + objectMap["tags"] = mcap.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct. +func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { + var m map[string]*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 accessProfile AccessProfile + err = json.Unmarshal(*v, &accessProfile) + if err != nil { + return err + } + mcap.AccessProfile = &accessProfile + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mcap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mcap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mcap.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mcap.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mcap.Tags = tags + } + } + } + + return nil +} + +// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster. +type ManagedClusterAddonProfile struct { + // Enabled - Whether the add-on is enabled or not. + Enabled *bool `json:"enabled,omitempty"` + // Config - Key-value pairs for configuring an add-on. + Config map[string]*string `json:"config"` + // Identity - READ-ONLY; Information of user assigned identity used by this add-on. + Identity *ManagedClusterAddonProfileIdentity `json:"identity,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile. +func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcap.Enabled != nil { + objectMap["enabled"] = mcap.Enabled + } + if mcap.Config != nil { + objectMap["config"] = mcap.Config + } + return json.Marshal(objectMap) +} + +// ManagedClusterAddonProfileIdentity information of user assigned identity used by this add-on. +type ManagedClusterAddonProfileIdentity struct { + // ResourceID - The resource id of the user assigned identity. + ResourceID *string `json:"resourceId,omitempty"` + // ClientID - The client id of the user assigned identity. + ClientID *string `json:"clientId,omitempty"` + // ObjectID - The object id of the user assigned identity. + ObjectID *string `json:"objectId,omitempty"` +} + +// ManagedClusterAgentPoolProfile profile for the container service agent pool. +type ManagedClusterAgentPoolProfile struct { + // Name - Unique name of the agent pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' + VMSize VMSizeTypes `json:"vmSize,omitempty"` + // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` + // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + // MaxPods - Maximum number of pods that can run on a node. + MaxPods *int32 `json:"maxPods,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // MaxCount - Maximum number of nodes for auto-scaling + MaxCount *int32 `json:"maxCount,omitempty"` + // MinCount - Minimum number of nodes for auto-scaling + MinCount *int32 `json:"minCount,omitempty"` + // EnableAutoScaling - Whether to enable auto-scaler + EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` + // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + Type AgentPoolType `json:"type,omitempty"` + // OrchestratorVersion - Version of orchestrator specified when creating the managed cluster. + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + AvailabilityZones *[]string `json:"availabilityZones,omitempty"` + // EnableNodePublicIP - Enable public IP for nodes + EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` + // ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular' + ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"` + // ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate' + ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` + // Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set. + Tags map[string]*string `json:"tags"` + // NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool. + NodeLabels map[string]*string `json:"nodeLabels"` + // NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + NodeTaints *[]string `json:"nodeTaints,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfile. +func (mcapp ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcapp.Name != nil { + objectMap["name"] = mcapp.Name + } + if mcapp.Count != nil { + objectMap["count"] = mcapp.Count + } + if mcapp.VMSize != "" { + objectMap["vmSize"] = mcapp.VMSize + } + if mcapp.OsDiskSizeGB != nil { + objectMap["osDiskSizeGB"] = mcapp.OsDiskSizeGB + } + if mcapp.VnetSubnetID != nil { + objectMap["vnetSubnetID"] = mcapp.VnetSubnetID + } + if mcapp.MaxPods != nil { + objectMap["maxPods"] = mcapp.MaxPods + } + if mcapp.OsType != "" { + objectMap["osType"] = mcapp.OsType + } + if mcapp.MaxCount != nil { + objectMap["maxCount"] = mcapp.MaxCount + } + if mcapp.MinCount != nil { + objectMap["minCount"] = mcapp.MinCount + } + if mcapp.EnableAutoScaling != nil { + objectMap["enableAutoScaling"] = mcapp.EnableAutoScaling + } + if mcapp.Type != "" { + objectMap["type"] = mcapp.Type + } + if mcapp.OrchestratorVersion != nil { + objectMap["orchestratorVersion"] = mcapp.OrchestratorVersion + } + if mcapp.AvailabilityZones != nil { + objectMap["availabilityZones"] = mcapp.AvailabilityZones + } + if mcapp.EnableNodePublicIP != nil { + objectMap["enableNodePublicIP"] = mcapp.EnableNodePublicIP + } + if mcapp.ScaleSetPriority != "" { + objectMap["scaleSetPriority"] = mcapp.ScaleSetPriority + } + if mcapp.ScaleSetEvictionPolicy != "" { + objectMap["scaleSetEvictionPolicy"] = mcapp.ScaleSetEvictionPolicy + } + if mcapp.Tags != nil { + objectMap["tags"] = mcapp.Tags + } + if mcapp.NodeLabels != nil { + objectMap["nodeLabels"] = mcapp.NodeLabels + } + if mcapp.NodeTaints != nil { + objectMap["nodeTaints"] = mcapp.NodeTaints + } + return json.Marshal(objectMap) +} + +// ManagedClusterAgentPoolProfileProperties properties for the container service agent pool profile. +type ManagedClusterAgentPoolProfileProperties struct { + // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' + VMSize VMSizeTypes `json:"vmSize,omitempty"` + // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` + // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + // MaxPods - Maximum number of pods that can run on a node. + MaxPods *int32 `json:"maxPods,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // MaxCount - Maximum number of nodes for auto-scaling + MaxCount *int32 `json:"maxCount,omitempty"` + // MinCount - Minimum number of nodes for auto-scaling + MinCount *int32 `json:"minCount,omitempty"` + // EnableAutoScaling - Whether to enable auto-scaler + EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` + // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + Type AgentPoolType `json:"type,omitempty"` + // OrchestratorVersion - Version of orchestrator specified when creating the managed cluster. + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + AvailabilityZones *[]string `json:"availabilityZones,omitempty"` + // EnableNodePublicIP - Enable public IP for nodes + EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` + // ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Low', 'Regular' + ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"` + // ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for low priority virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate' + ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` + // Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set. + Tags map[string]*string `json:"tags"` + // NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool. + NodeLabels map[string]*string `json:"nodeLabels"` + // NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + NodeTaints *[]string `json:"nodeTaints,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfileProperties. +func (mcappp ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcappp.Count != nil { + objectMap["count"] = mcappp.Count + } + if mcappp.VMSize != "" { + objectMap["vmSize"] = mcappp.VMSize + } + if mcappp.OsDiskSizeGB != nil { + objectMap["osDiskSizeGB"] = mcappp.OsDiskSizeGB + } + if mcappp.VnetSubnetID != nil { + objectMap["vnetSubnetID"] = mcappp.VnetSubnetID + } + if mcappp.MaxPods != nil { + objectMap["maxPods"] = mcappp.MaxPods + } + if mcappp.OsType != "" { + objectMap["osType"] = mcappp.OsType + } + if mcappp.MaxCount != nil { + objectMap["maxCount"] = mcappp.MaxCount + } + if mcappp.MinCount != nil { + objectMap["minCount"] = mcappp.MinCount + } + if mcappp.EnableAutoScaling != nil { + objectMap["enableAutoScaling"] = mcappp.EnableAutoScaling + } + if mcappp.Type != "" { + objectMap["type"] = mcappp.Type + } + if mcappp.OrchestratorVersion != nil { + objectMap["orchestratorVersion"] = mcappp.OrchestratorVersion + } + if mcappp.AvailabilityZones != nil { + objectMap["availabilityZones"] = mcappp.AvailabilityZones + } + if mcappp.EnableNodePublicIP != nil { + objectMap["enableNodePublicIP"] = mcappp.EnableNodePublicIP + } + if mcappp.ScaleSetPriority != "" { + objectMap["scaleSetPriority"] = mcappp.ScaleSetPriority + } + if mcappp.ScaleSetEvictionPolicy != "" { + objectMap["scaleSetEvictionPolicy"] = mcappp.ScaleSetEvictionPolicy + } + if mcappp.Tags != nil { + objectMap["tags"] = mcappp.Tags + } + if mcappp.NodeLabels != nil { + objectMap["nodeLabels"] = mcappp.NodeLabels + } + if mcappp.NodeTaints != nil { + objectMap["nodeTaints"] = mcappp.NodeTaints + } + return json.Marshal(objectMap) +} + +// ManagedClusterAPIServerAccessProfile access profile for managed cluster API server. +type ManagedClusterAPIServerAccessProfile struct { + // AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server. + AuthorizedIPRanges *[]string `json:"authorizedIPRanges,omitempty"` + // EnablePrivateCluster - Whether to create the cluster as a private cluster or not. + EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"` +} + +// ManagedClusterIdentity identity for the managed cluster. +type ManagedClusterIdentity struct { + // PrincipalID - READ-ONLY; The principal id of the system assigned identity which is used by master components. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id of the system assigned identity which is used by master components. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead. Possible values include: 'SystemAssigned', 'None' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// ManagedClusterListResult the response from the List Managed Clusters operation. +type ManagedClusterListResult struct { + autorest.Response `json:"-"` + // Value - The list of managed clusters. + Value *[]ManagedCluster `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of managed cluster results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values. +type ManagedClusterListResultIterator struct { + i int + page ManagedClusterListResultPage +} + +// 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 *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.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 *ManagedClusterListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ManagedClusterListResultIterator) 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 ManagedClusterListResultIterator) Response() ManagedClusterListResult { + 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 ManagedClusterListResultIterator) Value() ManagedCluster { + if !iter.page.NotDone() { + return ManagedCluster{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ManagedClusterListResultIterator type. +func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator { + return ManagedClusterListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (mclr ManagedClusterListResult) IsEmpty() bool { + return mclr.Value == nil || len(*mclr.Value) == 0 +} + +// managedClusterListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { + if mclr.NextLink == nil || len(to.String(mclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(mclr.NextLink))) +} + +// ManagedClusterListResultPage contains a page of ManagedCluster values. +type ManagedClusterListResultPage struct { + fn func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error) + mclr ManagedClusterListResult +} + +// 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 *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.mclr) + if err != nil { + return err + } + page.mclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ManagedClusterListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ManagedClusterListResultPage) NotDone() bool { + return !page.mclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ManagedClusterListResultPage) Response() ManagedClusterListResult { + return page.mclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ManagedClusterListResultPage) Values() []ManagedCluster { + if page.mclr.IsEmpty() { + return nil + } + return *page.mclr.Value +} + +// Creates a new instance of the ManagedClusterListResultPage type. +func NewManagedClusterListResultPage(getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage { + return ManagedClusterListResultPage{fn: getNextPage} +} + +// ManagedClusterLoadBalancerProfile profile of the managed cluster load balancer. +type ManagedClusterLoadBalancerProfile struct { + // ManagedOutboundIPs - Desired managed outbound IPs for the cluster load balancer. + ManagedOutboundIPs *ManagedClusterLoadBalancerProfileManagedOutboundIPs `json:"managedOutboundIPs,omitempty"` + // OutboundIPPrefixes - Desired outbound IP Prefix resources for the cluster load balancer. + OutboundIPPrefixes *ManagedClusterLoadBalancerProfileOutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"` + // OutboundIPs - Desired outbound IP resources for the cluster load balancer. + OutboundIPs *ManagedClusterLoadBalancerProfileOutboundIPs `json:"outboundIPs,omitempty"` + // EffectiveOutboundIPs - The effective outbound IP resources of the cluster load balancer. + EffectiveOutboundIPs *[]ResourceReference `json:"effectiveOutboundIPs,omitempty"` + // AllocatedOutboundPorts - Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. + AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` + // IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` +} + +// ManagedClusterLoadBalancerProfileManagedOutboundIPs desired managed outbound IPs for the cluster load +// balancer. +type ManagedClusterLoadBalancerProfileManagedOutboundIPs struct { + // Count - Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + Count *int32 `json:"count,omitempty"` +} + +// ManagedClusterLoadBalancerProfileOutboundIPPrefixes desired outbound IP Prefix resources for the cluster +// load balancer. +type ManagedClusterLoadBalancerProfileOutboundIPPrefixes struct { + // PublicIPPrefixes - A list of public IP prefix resources. + PublicIPPrefixes *[]ResourceReference `json:"publicIPPrefixes,omitempty"` +} + +// ManagedClusterLoadBalancerProfileOutboundIPs desired outbound IP resources for the cluster load +// balancer. +type ManagedClusterLoadBalancerProfileOutboundIPs struct { + // PublicIPs - A list of public IP resources. + PublicIPs *[]ResourceReference `json:"publicIPs,omitempty"` +} + +// ManagedClusterPoolUpgradeProfile the list of available upgrade versions. +type ManagedClusterPoolUpgradeProfile struct { + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // Name - Pool name. + Name *string `json:"name,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // Upgrades - List of orchestrator types and versions available for upgrade. + Upgrades *[]ManagedClusterPoolUpgradeProfileUpgradesItem `json:"upgrades,omitempty"` +} + +// ManagedClusterPoolUpgradeProfileUpgradesItem ... +type ManagedClusterPoolUpgradeProfileUpgradesItem struct { + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` +} + +// ManagedClusterProperties properties of the managed cluster. +type ManagedClusterProperties struct { + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // MaxAgentPools - READ-ONLY; The max number of agent pools for the managed cluster. + MaxAgentPools *int32 `json:"maxAgentPools,omitempty"` + // KubernetesVersion - Version of Kubernetes specified when creating the managed cluster. + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // DNSPrefix - DNS prefix specified when creating the managed cluster. + DNSPrefix *string `json:"dnsPrefix,omitempty"` + // Fqdn - READ-ONLY; FQDN for the master pool. + Fqdn *string `json:"fqdn,omitempty"` + // PrivateFQDN - READ-ONLY; FQDN of private cluster. + PrivateFQDN *string `json:"privateFQDN,omitempty"` + // AgentPoolProfiles - Properties of the agent pool. + AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` + // LinuxProfile - Profile for Linux VMs in the container service cluster. + LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` + // WindowsProfile - Profile for Windows VMs in the container service cluster. + WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"` + // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. + ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` + // AddonProfiles - Profile of managed cluster add-on. + AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"` + // NodeResourceGroup - Name of the resource group containing agent pool nodes. + NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` + // EnableRBAC - Whether to enable Kubernetes Role-Based Access Control. + EnableRBAC *bool `json:"enableRBAC,omitempty"` + // EnablePodSecurityPolicy - (PREVIEW) Whether to enable Kubernetes Pod security policy. + EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"` + // NetworkProfile - Profile of network configuration. + NetworkProfile *NetworkProfileType `json:"networkProfile,omitempty"` + // AadProfile - Profile of Azure Active Directory configuration. + AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"` + // APIServerAccessProfile - Access profile for managed cluster API server. + APIServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"` + // DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest. + DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"` + // IdentityProfile - Identities associated with the cluster. + IdentityProfile map[string]*ManagedClusterPropertiesIdentityProfileValue `json:"identityProfile"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterProperties. +func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcp.KubernetesVersion != nil { + objectMap["kubernetesVersion"] = mcp.KubernetesVersion + } + if mcp.DNSPrefix != nil { + objectMap["dnsPrefix"] = mcp.DNSPrefix + } + if mcp.AgentPoolProfiles != nil { + objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles + } + if mcp.LinuxProfile != nil { + objectMap["linuxProfile"] = mcp.LinuxProfile + } + if mcp.WindowsProfile != nil { + objectMap["windowsProfile"] = mcp.WindowsProfile + } + if mcp.ServicePrincipalProfile != nil { + objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile + } + if mcp.AddonProfiles != nil { + objectMap["addonProfiles"] = mcp.AddonProfiles + } + if mcp.NodeResourceGroup != nil { + objectMap["nodeResourceGroup"] = mcp.NodeResourceGroup + } + if mcp.EnableRBAC != nil { + objectMap["enableRBAC"] = mcp.EnableRBAC + } + if mcp.EnablePodSecurityPolicy != nil { + objectMap["enablePodSecurityPolicy"] = mcp.EnablePodSecurityPolicy + } + if mcp.NetworkProfile != nil { + objectMap["networkProfile"] = mcp.NetworkProfile + } + if mcp.AadProfile != nil { + objectMap["aadProfile"] = mcp.AadProfile + } + if mcp.APIServerAccessProfile != nil { + objectMap["apiServerAccessProfile"] = mcp.APIServerAccessProfile + } + if mcp.DiskEncryptionSetID != nil { + objectMap["diskEncryptionSetID"] = mcp.DiskEncryptionSetID + } + if mcp.IdentityProfile != nil { + objectMap["identityProfile"] = mcp.IdentityProfile + } + return json.Marshal(objectMap) +} + +// ManagedClusterPropertiesIdentityProfileValue ... +type ManagedClusterPropertiesIdentityProfileValue struct { + // ResourceID - The resource id of the user assigned identity. + ResourceID *string `json:"resourceId,omitempty"` + // ClientID - The client id of the user assigned identity. + ClientID *string `json:"clientId,omitempty"` + // ObjectID - The object id of the user assigned identity. + ObjectID *string `json:"objectId,omitempty"` +} + +// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ManagedClustersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { + mc, err = client.CreateOrUpdateResponder(mc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request") + } + } + return +} + +// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ManagedClustersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to +// use for manipulating Azure APIs. +type ManagedClusterServicePrincipalProfile struct { + // ClientID - The ID for the service principal. + ClientID *string `json:"clientId,omitempty"` + // Secret - The secret password associated with the service principal in plain text. + Secret *string `json:"secret,omitempty"` +} + +// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ManagedClustersResetAADProfileFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture") + return + } + ar.Response = future.Response() + return +} + +// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ManagedClustersResetServicePrincipalProfileFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture") + return + } + ar.Response = future.Response() + return +} + +// ManagedClustersRotateClusterCertificatesFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ManagedClustersRotateClusterCertificatesFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersRotateClusterCertificatesFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRotateClusterCertificatesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRotateClusterCertificatesFuture") + return + } + ar.Response = future.Response() + return +} + +// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ManagedClustersUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersUpdateTagsFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { + mc, err = client.UpdateTagsResponder(mc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", mc.Response.Response, "Failure responding to request") + } + } + return +} + +// ManagedClusterUpgradeProfile the list of available upgrades for compute pools. +type ManagedClusterUpgradeProfile struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of upgrade profile. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of upgrade profile. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of upgrade profile. + Type *string `json:"type,omitempty"` + // ManagedClusterUpgradeProfileProperties - Properties of upgrade profile. + *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile. +func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcup.ManagedClusterUpgradeProfileProperties != nil { + objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct. +func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error { + 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 + } + mcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mcup.Type = &typeVar + } + case "properties": + if v != nil { + var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties + err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties) + if err != nil { + return err + } + mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties + } + } + } + + return nil +} + +// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles. +type ManagedClusterUpgradeProfileProperties struct { + // ControlPlaneProfile - The list of available upgrade versions for the control plane. + ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"` + // AgentPoolProfiles - The list of available upgrade versions for agent pools. + AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"` +} + +// ManagedClusterWindowsProfile profile for Windows VMs in the container service cluster. +type ManagedClusterWindowsProfile struct { + // AdminUsername - The administrator username to use for Windows VMs. + AdminUsername *string `json:"adminUsername,omitempty"` + // AdminPassword - The administrator password to use for Windows VMs. + AdminPassword *string `json:"adminPassword,omitempty"` +} + +// MasterProfile profile for the container service master. +type MasterProfile struct { + // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. + Count *int32 `json:"count,omitempty"` + // DNSPrefix - DNS prefix to be used to create the FQDN for the master pool. + DNSPrefix *string `json:"dnsPrefix,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' + VMSize VMSizeTypes `json:"vmSize,omitempty"` + // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` + // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + // FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters. + FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"` + // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks' + StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` + // Fqdn - READ-ONLY; FQDN for the master pool. + Fqdn *string `json:"fqdn,omitempty"` +} + +// NetworkProfile represents the OpenShift networking configuration +type NetworkProfile struct { + // VnetCidr - CIDR for the OpenShift Vnet. + VnetCidr *string `json:"vnetCidr,omitempty"` + // PeerVnetID - CIDR of the Vnet to peer. + PeerVnetID *string `json:"peerVnetId,omitempty"` + // VnetID - ID of the Vnet created for OSA cluster. + VnetID *string `json:"vnetId,omitempty"` +} + +// NetworkProfileType profile of network configuration. +type NetworkProfileType struct { + // NetworkPlugin - Network plugin used for building Kubernetes network. Possible values include: 'Azure', 'Kubenet' + NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"` + // NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'NetworkPolicyCalico', 'NetworkPolicyAzure' + NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"` + // PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used. + PodCidr *string `json:"podCidr,omitempty"` + // ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. + ServiceCidr *string `json:"serviceCidr,omitempty"` + // DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. + DNSServiceIP *string `json:"dnsServiceIP,omitempty"` + // DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. + DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"` + // OutboundType - The outbound (egress) routing method. Possible values include: 'LoadBalancer', 'UserDefinedRouting' + OutboundType OutboundType `json:"outboundType,omitempty"` + // LoadBalancerSku - The load balancer sku for the managed cluster. Possible values include: 'Standard', 'Basic' + LoadBalancerSku LoadBalancerSku `json:"loadBalancerSku,omitempty"` + // LoadBalancerProfile - Profile of the cluster load balancer. + LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"` +} + +// OpenShiftManagedCluster openShift Managed cluster. +type OpenShiftManagedCluster struct { + autorest.Response `json:"-"` + // Plan - Define the resource plan as required by ARM for billing purposes + Plan *PurchasePlan `json:"plan,omitempty"` + // OpenShiftManagedClusterProperties - Properties of a OpenShift managed cluster. + *OpenShiftManagedClusterProperties `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 OpenShiftManagedCluster. +func (osmc OpenShiftManagedCluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if osmc.Plan != nil { + objectMap["plan"] = osmc.Plan + } + if osmc.OpenShiftManagedClusterProperties != nil { + objectMap["properties"] = osmc.OpenShiftManagedClusterProperties + } + if osmc.Location != nil { + objectMap["location"] = osmc.Location + } + if osmc.Tags != nil { + objectMap["tags"] = osmc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedCluster struct. +func (osmc *OpenShiftManagedCluster) UnmarshalJSON(body []byte) error { + 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 PurchasePlan + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + osmc.Plan = &plan + } + case "properties": + if v != nil { + var openShiftManagedClusterProperties OpenShiftManagedClusterProperties + err = json.Unmarshal(*v, &openShiftManagedClusterProperties) + if err != nil { + return err + } + osmc.OpenShiftManagedClusterProperties = &openShiftManagedClusterProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + osmc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + osmc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + osmc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + osmc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + osmc.Tags = tags + } + } + } + + return nil +} + +// OpenShiftManagedClusterAADIdentityProvider defines the Identity provider for MS AAD. +type OpenShiftManagedClusterAADIdentityProvider struct { + // ClientID - The clientId password associated with the provider. + ClientID *string `json:"clientId,omitempty"` + // Secret - The secret password associated with the provider. + Secret *string `json:"secret,omitempty"` + // TenantID - The tenantId associated with the provider. + TenantID *string `json:"tenantId,omitempty"` + // CustomerAdminGroupID - The groupId to be granted cluster admin role. + CustomerAdminGroupID *string `json:"customerAdminGroupId,omitempty"` + // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider' + Kind Kind `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for OpenShiftManagedClusterAADIdentityProvider. +func (osmcaip OpenShiftManagedClusterAADIdentityProvider) MarshalJSON() ([]byte, error) { + osmcaip.Kind = KindAADIdentityProvider + objectMap := make(map[string]interface{}) + if osmcaip.ClientID != nil { + objectMap["clientId"] = osmcaip.ClientID + } + if osmcaip.Secret != nil { + objectMap["secret"] = osmcaip.Secret + } + if osmcaip.TenantID != nil { + objectMap["tenantId"] = osmcaip.TenantID + } + if osmcaip.CustomerAdminGroupID != nil { + objectMap["customerAdminGroupId"] = osmcaip.CustomerAdminGroupID + } + if osmcaip.Kind != "" { + objectMap["kind"] = osmcaip.Kind + } + return json.Marshal(objectMap) +} + +// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. +func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) { + return &osmcaip, true +} + +// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. +func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) { + return nil, false +} + +// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. +func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) { + return &osmcaip, true +} + +// OpenShiftManagedClusterAgentPoolProfile defines the configuration of the OpenShift cluster VMs. +type OpenShiftManagedClusterAgentPoolProfile struct { + // Name - Unique name of the pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of agents (VMs) to host docker containers. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s' + VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"` + // SubnetCidr - Subnet CIDR for the peering. + SubnetCidr *string `json:"subnetCidr,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // Role - Define the role of the AgentPoolProfile. Possible values include: 'Compute', 'Infra' + Role OpenShiftAgentPoolProfileRole `json:"role,omitempty"` +} + +// OpenShiftManagedClusterAuthProfile defines all possible authentication profiles for the OpenShift +// cluster. +type OpenShiftManagedClusterAuthProfile struct { + // IdentityProviders - Type of authentication profile to use. + IdentityProviders *[]OpenShiftManagedClusterIdentityProvider `json:"identityProviders,omitempty"` +} + +// BasicOpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider. +type BasicOpenShiftManagedClusterBaseIdentityProvider interface { + AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) + AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) +} + +// OpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider. +type OpenShiftManagedClusterBaseIdentityProvider struct { + // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider' + Kind Kind `json:"kind,omitempty"` +} + +func unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(body []byte) (BasicOpenShiftManagedClusterBaseIdentityProvider, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindAADIdentityProvider): + var osmcaip OpenShiftManagedClusterAADIdentityProvider + err := json.Unmarshal(body, &osmcaip) + return osmcaip, err + default: + var osmcbip OpenShiftManagedClusterBaseIdentityProvider + err := json.Unmarshal(body, &osmcbip) + return osmcbip, err + } +} +func unmarshalBasicOpenShiftManagedClusterBaseIdentityProviderArray(body []byte) ([]BasicOpenShiftManagedClusterBaseIdentityProvider, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + osmcbipArray := make([]BasicOpenShiftManagedClusterBaseIdentityProvider, len(rawMessages)) + + for index, rawMessage := range rawMessages { + osmcbip, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*rawMessage) + if err != nil { + return nil, err + } + osmcbipArray[index] = osmcbip + } + return osmcbipArray, nil +} + +// MarshalJSON is the custom marshaler for OpenShiftManagedClusterBaseIdentityProvider. +func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) MarshalJSON() ([]byte, error) { + osmcbip.Kind = KindOpenShiftManagedClusterBaseIdentityProvider + objectMap := make(map[string]interface{}) + if osmcbip.Kind != "" { + objectMap["kind"] = osmcbip.Kind + } + return json.Marshal(objectMap) +} + +// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. +func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) { + return nil, false +} + +// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. +func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) { + return &osmcbip, true +} + +// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. +func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) { + return &osmcbip, true +} + +// OpenShiftManagedClusterIdentityProvider defines the configuration of the identity providers to be used +// in the OpenShift cluster. +type OpenShiftManagedClusterIdentityProvider struct { + // Name - Name of the provider. + Name *string `json:"name,omitempty"` + // Provider - Configuration of the provider. + Provider BasicOpenShiftManagedClusterBaseIdentityProvider `json:"provider,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedClusterIdentityProvider struct. +func (osmcip *OpenShiftManagedClusterIdentityProvider) UnmarshalJSON(body []byte) error { + 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 + } + osmcip.Name = &name + } + case "provider": + if v != nil { + provider, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*v) + if err != nil { + return err + } + osmcip.Provider = provider + } + } + } + + return nil +} + +// OpenShiftManagedClusterListResult the response from the List OpenShift Managed Clusters operation. +type OpenShiftManagedClusterListResult struct { + autorest.Response `json:"-"` + // Value - The list of OpenShift managed clusters. + Value *[]OpenShiftManagedCluster `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of OpenShift managed cluster results. + NextLink *string `json:"nextLink,omitempty"` +} + +// OpenShiftManagedClusterListResultIterator provides access to a complete listing of +// OpenShiftManagedCluster values. +type OpenShiftManagedClusterListResultIterator struct { + i int + page OpenShiftManagedClusterListResultPage +} + +// 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 *OpenShiftManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultIterator.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 *OpenShiftManagedClusterListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OpenShiftManagedClusterListResultIterator) 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 OpenShiftManagedClusterListResultIterator) Response() OpenShiftManagedClusterListResult { + 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 OpenShiftManagedClusterListResultIterator) Value() OpenShiftManagedCluster { + if !iter.page.NotDone() { + return OpenShiftManagedCluster{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OpenShiftManagedClusterListResultIterator type. +func NewOpenShiftManagedClusterListResultIterator(page OpenShiftManagedClusterListResultPage) OpenShiftManagedClusterListResultIterator { + return OpenShiftManagedClusterListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (osmclr OpenShiftManagedClusterListResult) IsEmpty() bool { + return osmclr.Value == nil || len(*osmclr.Value) == 0 +} + +// openShiftManagedClusterListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (osmclr OpenShiftManagedClusterListResult) openShiftManagedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { + if osmclr.NextLink == nil || len(to.String(osmclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(osmclr.NextLink))) +} + +// OpenShiftManagedClusterListResultPage contains a page of OpenShiftManagedCluster values. +type OpenShiftManagedClusterListResultPage struct { + fn func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error) + osmclr OpenShiftManagedClusterListResult +} + +// 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 *OpenShiftManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.osmclr) + if err != nil { + return err + } + page.osmclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OpenShiftManagedClusterListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OpenShiftManagedClusterListResultPage) NotDone() bool { + return !page.osmclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OpenShiftManagedClusterListResultPage) Response() OpenShiftManagedClusterListResult { + return page.osmclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OpenShiftManagedClusterListResultPage) Values() []OpenShiftManagedCluster { + if page.osmclr.IsEmpty() { + return nil + } + return *page.osmclr.Value +} + +// Creates a new instance of the OpenShiftManagedClusterListResultPage type. +func NewOpenShiftManagedClusterListResultPage(getNextPage func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error)) OpenShiftManagedClusterListResultPage { + return OpenShiftManagedClusterListResultPage{fn: getNextPage} +} + +// OpenShiftManagedClusterMasterPoolProfile openShiftManagedClusterMaterPoolProfile contains configuration +// for OpenShift master VMs. +type OpenShiftManagedClusterMasterPoolProfile struct { + // Name - Unique name of the master pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of masters (VMs) to host docker containers. The default value is 3. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s' + VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"` + // SubnetCidr - Subnet CIDR for the peering. + SubnetCidr *string `json:"subnetCidr,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` +} + +// OpenShiftManagedClusterProperties properties of the OpenShift managed cluster. +type OpenShiftManagedClusterProperties struct { + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // OpenShiftVersion - Version of OpenShift specified when creating the cluster. + OpenShiftVersion *string `json:"openShiftVersion,omitempty"` + // ClusterVersion - READ-ONLY; Version of OpenShift specified when creating the cluster. + ClusterVersion *string `json:"clusterVersion,omitempty"` + // PublicHostname - READ-ONLY; Service generated FQDN for OpenShift API server. + PublicHostname *string `json:"publicHostname,omitempty"` + // Fqdn - READ-ONLY; Service generated FQDN for OpenShift API server loadbalancer internal hostname. + Fqdn *string `json:"fqdn,omitempty"` + // NetworkProfile - Configuration for OpenShift networking. + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + // RouterProfiles - Configuration for OpenShift router(s). + RouterProfiles *[]OpenShiftRouterProfile `json:"routerProfiles,omitempty"` + // MasterPoolProfile - Configuration for OpenShift master VMs. + MasterPoolProfile *OpenShiftManagedClusterMasterPoolProfile `json:"masterPoolProfile,omitempty"` + // AgentPoolProfiles - Configuration of OpenShift cluster VMs. + AgentPoolProfiles *[]OpenShiftManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` + // AuthProfile - Configures OpenShift authentication. + AuthProfile *OpenShiftManagedClusterAuthProfile `json:"authProfile,omitempty"` +} + +// OpenShiftManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type OpenShiftManagedClustersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *OpenShiftManagedClustersCreateOrUpdateFuture) Result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent { + osmc, err = client.CreateOrUpdateResponder(osmc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", osmc.Response.Response, "Failure responding to request") + } + } + return +} + +// OpenShiftManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type OpenShiftManagedClustersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *OpenShiftManagedClustersDeleteFuture) Result(client OpenShiftManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// OpenShiftManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type OpenShiftManagedClustersUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *OpenShiftManagedClustersUpdateTagsFuture) Result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent { + osmc, err = client.UpdateTagsResponder(osmc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", osmc.Response.Response, "Failure responding to request") + } + } + return +} + +// OpenShiftRouterProfile represents an OpenShift router +type OpenShiftRouterProfile struct { + // Name - Name of the router profile. + Name *string `json:"name,omitempty"` + // PublicSubdomain - READ-ONLY; DNS subdomain for OpenShift router. + PublicSubdomain *string `json:"publicSubdomain,omitempty"` + // Fqdn - READ-ONLY; Auto-allocated FQDN for the OpenShift router. + Fqdn *string `json:"fqdn,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"` +} + +// 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 - Describes the properties of a Compute Operation Value Display. + *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"` +} + +// OrchestratorProfile contains information about orchestrator. +type OrchestratorProfile struct { + // OrchestratorType - Orchestrator type. + OrchestratorType *string `json:"orchestratorType,omitempty"` + // OrchestratorVersion - Orchestrator version (major, minor, patch). + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` +} + +// OrchestratorProfileType profile for the container service orchestrator. +type OrchestratorProfileType struct { + // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom' + OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"` + // OrchestratorVersion - The version of the orchestrator to use. You can specify the major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` +} + +// OrchestratorVersionProfile the profile of an orchestrator and its available versions. +type OrchestratorVersionProfile struct { + // OrchestratorType - Orchestrator type. + OrchestratorType *string `json:"orchestratorType,omitempty"` + // OrchestratorVersion - Orchestrator version (major, minor, patch). + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + // Default - Installed by default if version is not specified. + Default *bool `json:"default,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` + // Upgrades - The list of available upgrade versions. + Upgrades *[]OrchestratorProfile `json:"upgrades,omitempty"` +} + +// OrchestratorVersionProfileListResult the list of versions for supported orchestrators. +type OrchestratorVersionProfileListResult struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the orchestrator version profile list result. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the orchestrator version profile list result. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the orchestrator version profile list result. + Type *string `json:"type,omitempty"` + // OrchestratorVersionProfileProperties - The properties of an orchestrator version profile. + *OrchestratorVersionProfileProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult. +func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ovplr.OrchestratorVersionProfileProperties != nil { + objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct. +func (ovplr *OrchestratorVersionProfileListResult) UnmarshalJSON(body []byte) error { + 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 + } + ovplr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ovplr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ovplr.Type = &typeVar + } + case "properties": + if v != nil { + var orchestratorVersionProfileProperties OrchestratorVersionProfileProperties + err = json.Unmarshal(*v, &orchestratorVersionProfileProperties) + if err != nil { + return err + } + ovplr.OrchestratorVersionProfileProperties = &orchestratorVersionProfileProperties + } + } + } + + return nil +} + +// OrchestratorVersionProfileProperties the properties of an orchestrator version profile. +type OrchestratorVersionProfileProperties struct { + // Orchestrators - List of orchestrator version profiles. + Orchestrators *[]OrchestratorVersionProfile `json:"orchestrators,omitempty"` +} + +// Properties properties of the container service. +type Properties struct { + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // OrchestratorProfile - Profile for the container service orchestrator. + OrchestratorProfile *OrchestratorProfileType `json:"orchestratorProfile,omitempty"` + // CustomProfile - Properties to configure a custom container service cluster. + CustomProfile *CustomProfile `json:"customProfile,omitempty"` + // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified. + ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` + // MasterProfile - Profile for the container service master. + MasterProfile *MasterProfile `json:"masterProfile,omitempty"` + // AgentPoolProfiles - Properties of the agent pool. + AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"` + // WindowsProfile - Profile for Windows VMs in the container service cluster. + WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"` + // LinuxProfile - Profile for Linux VMs in the container service cluster. + LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` + // DiagnosticsProfile - Profile for diagnostics in the container service cluster. + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` +} + +// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace. +type PurchasePlan struct { + // 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 promotion code. + PromotionCode *string `json:"promotionCode,omitempty"` + // Publisher - The plan ID. + Publisher *string `json:"publisher,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) +} + +// ResourceReference a reference to an Azure resource. +type ResourceReference struct { + // ID - The fully qualified Azure resource id. + ID *string `json:"id,omitempty"` +} + +// ServicePrincipalProfile information about a service principal identity for the cluster to use for +// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. +type ServicePrincipalProfile struct { + // ClientID - The ID for the service principal. + ClientID *string `json:"clientId,omitempty"` + // Secret - The secret password associated with the service principal in plain text. + Secret *string `json:"secret,omitempty"` + // KeyVaultSecretRef - Reference to a secret stored in Azure Key Vault. + KeyVaultSecretRef *KeyVaultSecretRef `json:"keyVaultSecretRef,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. Only expect one key specified. + PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` +} + +// SSHPublicKey contains information about SSH certificate public key data. +type SSHPublicKey struct { + // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. + KeyData *string `json:"keyData,omitempty"` +} + +// SubResource reference to another subresource. +type SubResource struct { + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,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"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,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) +} + +// UserAssignedIdentity ... +type UserAssignedIdentity struct { + // ResourceID - The resource id of the user assigned identity. + ResourceID *string `json:"resourceId,omitempty"` + // ClientID - The client id of the user assigned identity. + ClientID *string `json:"clientId,omitempty"` + // ObjectID - The object id of the user assigned identity. + ObjectID *string `json:"objectId,omitempty"` +} + +// VMDiagnostics profile for diagnostics on the container service VMs. +type VMDiagnostics struct { + // Enabled - Whether the VM diagnostic agent is provisioned on the VM. + Enabled *bool `json:"enabled,omitempty"` + // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored. + StorageURI *string `json:"storageUri,omitempty"` +} + +// WindowsProfile profile for Windows VMs in the container service cluster. +type WindowsProfile struct { + // AdminUsername - The administrator username to use for Windows VMs. + AdminUsername *string `json:"adminUsername,omitempty"` + // AdminPassword - The administrator password to use for Windows VMs. + AdminPassword *string `json:"adminPassword,omitempty"` +} diff --git a/services/containerservice/mgmt/2020-01-01/containerservice/openshiftmanagedclusters.go b/services/containerservice/mgmt/2020-01-01/containerservice/openshiftmanagedclusters.go new file mode 100644 index 000000000000..0610faf69993 --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/openshiftmanagedclusters.go @@ -0,0 +1,619 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OpenShiftManagedClustersClient is the the Container Service Client. +type OpenShiftManagedClustersClient struct { + BaseClient +} + +// NewOpenShiftManagedClustersClient creates an instance of the OpenShiftManagedClustersClient client. +func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedClustersClient { + return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { + return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a OpenShift managed cluster with the specified configuration for agents and +// OpenShift version. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the OpenShift managed cluster resource. +// parameters - parameters supplied to the Create or Update an OpenShift Managed Cluster operation. +func (client OpenShiftManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters OpenShiftManagedCluster) (result OpenShiftManagedClustersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties.OpenShiftVersion", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.OpenShiftManagedClusterProperties.MasterPoolProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties.MasterPoolProfile.Count", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client OpenShiftManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters OpenShiftManagedCluster) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + 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.ContainerService/openShiftManagedClusters/{resourceName}", 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 OpenShiftManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future OpenShiftManagedClustersCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the OpenShift managed cluster with a specified resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the OpenShift managed cluster resource. +func (client OpenShiftManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result OpenShiftManagedClustersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client OpenShiftManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", 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 OpenShiftManagedClustersClient) DeleteSender(req *http.Request) (future OpenShiftManagedClustersDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of the managed OpenShift cluster with a specified resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the OpenShift managed cluster resource. +func (client OpenShiftManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result OpenShiftManagedCluster, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client OpenShiftManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client OpenShiftManagedClustersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) GetResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of +// each OpenShift managed cluster. +func (client OpenShiftManagedClustersClient) List(ctx context.Context) (result OpenShiftManagedClusterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.List") + defer func() { + sc := -1 + if result.osmclr.Response.Response != nil { + sc = result.osmclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.osmclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", resp, "Failure sending request") + return + } + + result.osmclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OpenShiftManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters", 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 OpenShiftManagedClustersClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) ListResponder(resp *http.Response) (result OpenShiftManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OpenShiftManagedClustersClient) listNextResults(ctx context.Context, lastResults OpenShiftManagedClusterListResult) (result OpenShiftManagedClusterListResult, err error) { + req, err := lastResults.openShiftManagedClusterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "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, "containerservice.OpenShiftManagedClustersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OpenShiftManagedClustersClient) ListComplete(ctx context.Context) (result OpenShiftManagedClusterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.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 OpenShift managed clusters in the specified subscription and resource group. The operation +// returns properties of each OpenShift managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client OpenShiftManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result OpenShiftManagedClusterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.osmclr.Response.Response != nil { + sc = result.osmclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.osmclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.osmclr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client OpenShiftManagedClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters", 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 OpenShiftManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result OpenShiftManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client OpenShiftManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults OpenShiftManagedClusterListResult) (result OpenShiftManagedClusterListResult, err error) { + req, err := lastResults.openShiftManagedClusterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "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, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client OpenShiftManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result OpenShiftManagedClusterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.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 OpenShift managed cluster with the specified tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the OpenShift managed cluster resource. +// parameters - parameters supplied to the Update OpenShift Managed Cluster Tags operation. +func (client OpenShiftManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result OpenShiftManagedClustersUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.UpdateTags") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "UpdateTags", err.Error()) + } + + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client OpenShiftManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + 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.ContainerService/openShiftManagedClusters/{resourceName}", 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 OpenShiftManagedClustersClient) UpdateTagsSender(req *http.Request) (future OpenShiftManagedClustersUpdateTagsFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/containerservice/mgmt/2020-01-01/containerservice/operations.go b/services/containerservice/mgmt/2020-01-01/containerservice/operations.go new file mode 100644 index 000000000000..f2e414d11f88 --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/operations.go @@ -0,0 +1,110 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the the Container Service 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, "containerservice.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, "containerservice.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2020-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.ContainerService/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/containerservice/mgmt/2020-01-01/containerservice/version.go b/services/containerservice/mgmt/2020-01-01/containerservice/version.go new file mode 100644 index 000000000000..d7303bc129e7 --- /dev/null +++ b/services/containerservice/mgmt/2020-01-01/containerservice/version.go @@ -0,0 +1,30 @@ +package containerservice + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " containerservice/2020-01-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/client.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/client.go index 8799ab4fb9c6..686008d9006b 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/client.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go index 3019e7ed3fca..f21635ea7a43 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go @@ -36,7 +36,8 @@ func NewCollectionClient(subscriptionID string) CollectionClient { return NewCollectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCollectionClientWithBaseURI creates an instance of the CollectionClient client. +// NewCollectionClientWithBaseURI creates an instance of the CollectionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string) CollectionClient { return CollectionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go index 4a514d1b2b2f..258476575ef5 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go @@ -36,7 +36,9 @@ func NewCollectionPartitionClient(subscriptionID string) CollectionPartitionClie return NewCollectionPartitionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCollectionPartitionClientWithBaseURI creates an instance of the CollectionPartitionClient client. +// NewCollectionPartitionClientWithBaseURI creates an instance of the CollectionPartitionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string) CollectionPartitionClient { return CollectionPartitionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go index 8f027b5490b8..d958987d78fb 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go @@ -36,7 +36,9 @@ func NewCollectionPartitionRegionClient(subscriptionID string) CollectionPartiti return NewCollectionPartitionRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCollectionPartitionRegionClientWithBaseURI creates an instance of the CollectionPartitionRegionClient client. +// NewCollectionPartitionRegionClientWithBaseURI creates an instance of the CollectionPartitionRegionClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string) CollectionPartitionRegionClient { return CollectionPartitionRegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go index 0aae092d46c6..3c5534a72ed0 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go @@ -36,7 +36,9 @@ func NewCollectionRegionClient(subscriptionID string) CollectionRegionClient { return NewCollectionRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCollectionRegionClientWithBaseURI creates an instance of the CollectionRegionClient client. +// NewCollectionRegionClientWithBaseURI creates an instance of the CollectionRegionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string) CollectionRegionClient { return CollectionRegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go index 6dc44902d600..1f2dac7316ec 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go @@ -36,7 +36,8 @@ func NewDatabaseClient(subscriptionID string) DatabaseClient { return NewDatabaseClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseClientWithBaseURI creates an instance of the DatabaseClient client. +// NewDatabaseClientWithBaseURI creates an instance of the DatabaseClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string) DatabaseClient { return DatabaseClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go index 23e0b50a26f5..96b077c86781 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go @@ -36,7 +36,9 @@ func NewDatabaseAccountRegionClient(subscriptionID string) DatabaseAccountRegion return NewDatabaseAccountRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseAccountRegionClientWithBaseURI creates an instance of the DatabaseAccountRegionClient client. +// NewDatabaseAccountRegionClientWithBaseURI creates an instance of the DatabaseAccountRegionClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountRegionClient { return DatabaseAccountRegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go index 961d731a5ffa..8377a88a4fdc 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go @@ -36,7 +36,9 @@ func NewDatabaseAccountsClient(subscriptionID string) DatabaseAccountsClient { return NewDatabaseAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client. +// NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountsClient { return DatabaseAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/documentdbapi/interfaces.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/documentdbapi/interfaces.go index d09c8c1125c0..2e4b274066f2 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/documentdbapi/interfaces.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/documentdbapi/interfaces.go @@ -104,6 +104,7 @@ var _ DatabaseAccountsClientAPI = (*documentdb.DatabaseAccountsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result documentdb.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result documentdb.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*documentdb.OperationsClient)(nil) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go index f294c8839b61..d378e86820ac 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go index 5a5dde502f71..b9b799e15910 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go @@ -36,7 +36,9 @@ func NewPartitionKeyRangeIDClient(subscriptionID string) PartitionKeyRangeIDClie return NewPartitionKeyRangeIDClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPartitionKeyRangeIDClientWithBaseURI creates an instance of the PartitionKeyRangeIDClient client. +// NewPartitionKeyRangeIDClientWithBaseURI creates an instance of the PartitionKeyRangeIDClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string) PartitionKeyRangeIDClient { return PartitionKeyRangeIDClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go index d5a47e1bb7f4..c815599ba093 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go @@ -36,7 +36,9 @@ func NewPartitionKeyRangeIDRegionClient(subscriptionID string) PartitionKeyRange return NewPartitionKeyRangeIDRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPartitionKeyRangeIDRegionClientWithBaseURI creates an instance of the PartitionKeyRangeIDRegionClient client. +// NewPartitionKeyRangeIDRegionClientWithBaseURI creates an instance of the PartitionKeyRangeIDRegionClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string) PartitionKeyRangeIDRegionClient { return PartitionKeyRangeIDRegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go index bf37a1d3f0d1..5c05ed365526 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go @@ -36,7 +36,8 @@ func NewPercentileClient(subscriptionID string) PercentileClient { return NewPercentileClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPercentileClientWithBaseURI creates an instance of the PercentileClient client. +// NewPercentileClientWithBaseURI creates an instance of the PercentileClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string) PercentileClient { return PercentileClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go index b9ed0211b47c..1d3546bcdf86 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go @@ -36,7 +36,9 @@ func NewPercentileSourceTargetClient(subscriptionID string) PercentileSourceTarg return NewPercentileSourceTargetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPercentileSourceTargetClientWithBaseURI creates an instance of the PercentileSourceTargetClient client. +// NewPercentileSourceTargetClientWithBaseURI creates an instance of the PercentileSourceTargetClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string) PercentileSourceTargetClient { return PercentileSourceTargetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go index 9ddaa71f79c6..b5b6163d7ba5 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go @@ -36,7 +36,9 @@ func NewPercentileTargetClient(subscriptionID string) PercentileTargetClient { return NewPercentileTargetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPercentileTargetClientWithBaseURI creates an instance of the PercentileTargetClient client. +// NewPercentileTargetClientWithBaseURI creates an instance of the PercentileTargetClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string) PercentileTargetClient { return PercentileTargetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/cassandraresources.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/cassandraresources.go index d42def907fad..49920e02edcf 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/cassandraresources.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/cassandraresources.go @@ -36,7 +36,9 @@ func NewCassandraResourcesClient(subscriptionID string) CassandraResourcesClient return NewCassandraResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCassandraResourcesClientWithBaseURI creates an instance of the CassandraResourcesClient client. +// NewCassandraResourcesClientWithBaseURI creates an instance of the CassandraResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCassandraResourcesClientWithBaseURI(baseURI string, subscriptionID string) CassandraResourcesClient { return CassandraResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/client.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/client.go index 91c192f5586d..126e99bc5f6a 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/client.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/collection.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/collection.go index ed7b9378a244..74ec68cb0cc9 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/collection.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/collection.go @@ -36,7 +36,8 @@ func NewCollectionClient(subscriptionID string) CollectionClient { return NewCollectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCollectionClientWithBaseURI creates an instance of the CollectionClient client. +// NewCollectionClientWithBaseURI creates an instance of the CollectionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string) CollectionClient { return CollectionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionpartition.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionpartition.go index 6ea57e74e8e8..7a813b06279d 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionpartition.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionpartition.go @@ -36,7 +36,9 @@ func NewCollectionPartitionClient(subscriptionID string) CollectionPartitionClie return NewCollectionPartitionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCollectionPartitionClientWithBaseURI creates an instance of the CollectionPartitionClient client. +// NewCollectionPartitionClientWithBaseURI creates an instance of the CollectionPartitionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string) CollectionPartitionClient { return CollectionPartitionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionpartitionregion.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionpartitionregion.go index cefb87c5d7b1..249a5c4c7c8c 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionpartitionregion.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionpartitionregion.go @@ -36,7 +36,9 @@ func NewCollectionPartitionRegionClient(subscriptionID string) CollectionPartiti return NewCollectionPartitionRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCollectionPartitionRegionClientWithBaseURI creates an instance of the CollectionPartitionRegionClient client. +// NewCollectionPartitionRegionClientWithBaseURI creates an instance of the CollectionPartitionRegionClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string) CollectionPartitionRegionClient { return CollectionPartitionRegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionregion.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionregion.go index f7c83b560c18..ea8247250b8e 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionregion.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/collectionregion.go @@ -36,7 +36,9 @@ func NewCollectionRegionClient(subscriptionID string) CollectionRegionClient { return NewCollectionRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCollectionRegionClientWithBaseURI creates an instance of the CollectionRegionClient client. +// NewCollectionRegionClientWithBaseURI creates an instance of the CollectionRegionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string) CollectionRegionClient { return CollectionRegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/database.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/database.go index 26481502adc1..42318e085862 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/database.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/database.go @@ -36,7 +36,8 @@ func NewDatabaseClient(subscriptionID string) DatabaseClient { return NewDatabaseClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseClientWithBaseURI creates an instance of the DatabaseClient client. +// NewDatabaseClientWithBaseURI creates an instance of the DatabaseClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string) DatabaseClient { return DatabaseClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccountregion.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccountregion.go index 899bbcafc721..f0f1e226d4d5 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccountregion.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccountregion.go @@ -36,7 +36,9 @@ func NewDatabaseAccountRegionClient(subscriptionID string) DatabaseAccountRegion return NewDatabaseAccountRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseAccountRegionClientWithBaseURI creates an instance of the DatabaseAccountRegionClient client. +// NewDatabaseAccountRegionClientWithBaseURI creates an instance of the DatabaseAccountRegionClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountRegionClient { return DatabaseAccountRegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccounts.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccounts.go index ae6d08975b79..b22489682a26 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccounts.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccounts.go @@ -36,7 +36,9 @@ func NewDatabaseAccountsClient(subscriptionID string) DatabaseAccountsClient { return NewDatabaseAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client. +// NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAccountsClient { return DatabaseAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/documentdbapi/interfaces.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/documentdbapi/interfaces.go index 70eaaf8ffd88..e68f12a58ffe 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/documentdbapi/interfaces.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/documentdbapi/interfaces.go @@ -50,6 +50,7 @@ var _ DatabaseAccountsClientAPI = (*documentdb.DatabaseAccountsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result documentdb.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result documentdb.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*documentdb.OperationsClient)(nil) diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/gremlinresources.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/gremlinresources.go index 713581f0fb05..4e0a34151cb3 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/gremlinresources.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/gremlinresources.go @@ -36,7 +36,9 @@ func NewGremlinResourcesClient(subscriptionID string) GremlinResourcesClient { return NewGremlinResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGremlinResourcesClientWithBaseURI creates an instance of the GremlinResourcesClient client. +// NewGremlinResourcesClientWithBaseURI creates an instance of the GremlinResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGremlinResourcesClientWithBaseURI(baseURI string, subscriptionID string) GremlinResourcesClient { return GremlinResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/mongodbresources.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/mongodbresources.go index dac30da929e5..230837f29bef 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/mongodbresources.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/mongodbresources.go @@ -36,7 +36,9 @@ func NewMongoDBResourcesClient(subscriptionID string) MongoDBResourcesClient { return NewMongoDBResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMongoDBResourcesClientWithBaseURI creates an instance of the MongoDBResourcesClient client. +// NewMongoDBResourcesClientWithBaseURI creates an instance of the MongoDBResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMongoDBResourcesClientWithBaseURI(baseURI string, subscriptionID string) MongoDBResourcesClient { return MongoDBResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/operations.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/operations.go index 1140bd169a16..99ce65a864e2 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/operations.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/partitionkeyrangeid.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/partitionkeyrangeid.go index 5c61784a631b..d86355f2ce91 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/partitionkeyrangeid.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/partitionkeyrangeid.go @@ -36,7 +36,9 @@ func NewPartitionKeyRangeIDClient(subscriptionID string) PartitionKeyRangeIDClie return NewPartitionKeyRangeIDClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPartitionKeyRangeIDClientWithBaseURI creates an instance of the PartitionKeyRangeIDClient client. +// NewPartitionKeyRangeIDClientWithBaseURI creates an instance of the PartitionKeyRangeIDClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string) PartitionKeyRangeIDClient { return PartitionKeyRangeIDClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/partitionkeyrangeidregion.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/partitionkeyrangeidregion.go index 02623e00b87a..9dc8d3151ee5 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/partitionkeyrangeidregion.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/partitionkeyrangeidregion.go @@ -36,7 +36,9 @@ func NewPartitionKeyRangeIDRegionClient(subscriptionID string) PartitionKeyRange return NewPartitionKeyRangeIDRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPartitionKeyRangeIDRegionClientWithBaseURI creates an instance of the PartitionKeyRangeIDRegionClient client. +// NewPartitionKeyRangeIDRegionClientWithBaseURI creates an instance of the PartitionKeyRangeIDRegionClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string) PartitionKeyRangeIDRegionClient { return PartitionKeyRangeIDRegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/percentile.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/percentile.go index 5c2938efff6a..bbd45db1bdc5 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/percentile.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/percentile.go @@ -36,7 +36,8 @@ func NewPercentileClient(subscriptionID string) PercentileClient { return NewPercentileClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPercentileClientWithBaseURI creates an instance of the PercentileClient client. +// NewPercentileClientWithBaseURI creates an instance of the PercentileClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string) PercentileClient { return PercentileClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/percentilesourcetarget.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/percentilesourcetarget.go index 823a14b715ee..d78a3ba089dd 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/percentilesourcetarget.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/percentilesourcetarget.go @@ -36,7 +36,9 @@ func NewPercentileSourceTargetClient(subscriptionID string) PercentileSourceTarg return NewPercentileSourceTargetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPercentileSourceTargetClientWithBaseURI creates an instance of the PercentileSourceTargetClient client. +// NewPercentileSourceTargetClientWithBaseURI creates an instance of the PercentileSourceTargetClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string) PercentileSourceTargetClient { return PercentileSourceTargetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/percentiletarget.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/percentiletarget.go index c7d6a4589223..42c6101f2d1d 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/percentiletarget.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/percentiletarget.go @@ -36,7 +36,9 @@ func NewPercentileTargetClient(subscriptionID string) PercentileTargetClient { return NewPercentileTargetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPercentileTargetClientWithBaseURI creates an instance of the PercentileTargetClient client. +// NewPercentileTargetClientWithBaseURI creates an instance of the PercentileTargetClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string) PercentileTargetClient { return PercentileTargetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/sqlresources.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/sqlresources.go index c441798bb509..2b52801d89ea 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/sqlresources.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/sqlresources.go @@ -36,7 +36,8 @@ func NewSQLResourcesClient(subscriptionID string) SQLResourcesClient { return NewSQLResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSQLResourcesClientWithBaseURI creates an instance of the SQLResourcesClient client. +// NewSQLResourcesClientWithBaseURI creates an instance of the SQLResourcesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSQLResourcesClientWithBaseURI(baseURI string, subscriptionID string) SQLResourcesClient { return SQLResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -1930,7 +1931,7 @@ func (client SQLResourcesClient) ListSQLStoredProceduresPreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2023,7 +2024,7 @@ func (client SQLResourcesClient) ListSQLTriggersPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2116,7 +2117,7 @@ func (client SQLResourcesClient) ListSQLUserDefinedFunctionsPreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/tableresources.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/tableresources.go index c19d55fde275..996ea017b73e 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/tableresources.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/tableresources.go @@ -36,7 +36,8 @@ func NewTableResourcesClient(subscriptionID string) TableResourcesClient { return NewTableResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTableResourcesClientWithBaseURI creates an instance of the TableResourcesClient client. +// NewTableResourcesClientWithBaseURI creates an instance of the TableResourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string) TableResourcesClient { return TableResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/cassandraresources.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/cassandraresources.go new file mode 100644 index 000000000000..50135c1245c8 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/cassandraresources.go @@ -0,0 +1,1181 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CassandraResourcesClient is the azure Cosmos DB Database Service Resource Provider REST API +type CassandraResourcesClient struct { + BaseClient +} + +// NewCassandraResourcesClient creates an instance of the CassandraResourcesClient client. +func NewCassandraResourcesClient(subscriptionID string, subscriptionID1 string) CassandraResourcesClient { + return NewCassandraResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewCassandraResourcesClientWithBaseURI creates an instance of the CassandraResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewCassandraResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CassandraResourcesClient { + return CassandraResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// CreateUpdateCassandraKeyspace create or update an Azure Cosmos DB Cassandra keyspace +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +// createUpdateCassandraKeyspaceParameters - the parameters to provide for the current Cassandra keyspace. +func (client CassandraResourcesClient) CreateUpdateCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, createUpdateCassandraKeyspaceParameters CassandraKeyspaceCreateUpdateParameters) (result CassandraResourcesCreateUpdateCassandraKeyspaceFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.CreateUpdateCassandraKeyspace") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateCassandraKeyspaceParameters, + Constraints: []validation.Constraint{{Target: "createUpdateCassandraKeyspaceParameters.CassandraKeyspaceCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateCassandraKeyspaceParameters.CassandraKeyspaceCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateCassandraKeyspaceParameters.CassandraKeyspaceCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateCassandraKeyspaceParameters.CassandraKeyspaceCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "CreateUpdateCassandraKeyspace", err.Error()) + } + + req, err := client.CreateUpdateCassandraKeyspacePreparer(ctx, resourceGroupName, accountName, keyspaceName, createUpdateCassandraKeyspaceParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "CreateUpdateCassandraKeyspace", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateCassandraKeyspaceSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "CreateUpdateCassandraKeyspace", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateCassandraKeyspacePreparer prepares the CreateUpdateCassandraKeyspace request. +func (client CassandraResourcesClient) CreateUpdateCassandraKeyspacePreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, createUpdateCassandraKeyspaceParameters CassandraKeyspaceCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", pathParameters), + autorest.WithJSON(createUpdateCassandraKeyspaceParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateCassandraKeyspaceSender sends the CreateUpdateCassandraKeyspace request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) CreateUpdateCassandraKeyspaceSender(req *http.Request) (future CassandraResourcesCreateUpdateCassandraKeyspaceFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateCassandraKeyspaceResponder handles the response to the CreateUpdateCassandraKeyspace request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) CreateUpdateCassandraKeyspaceResponder(resp *http.Response) (result CassandraKeyspaceGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateUpdateCassandraTable create or update an Azure Cosmos DB Cassandra Table +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +// tableName - cosmos DB table name. +// createUpdateCassandraTableParameters - the parameters to provide for the current Cassandra Table. +func (client CassandraResourcesClient) CreateUpdateCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, createUpdateCassandraTableParameters CassandraTableCreateUpdateParameters) (result CassandraResourcesCreateUpdateCassandraTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.CreateUpdateCassandraTable") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateCassandraTableParameters, + Constraints: []validation.Constraint{{Target: "createUpdateCassandraTableParameters.CassandraTableCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateCassandraTableParameters.CassandraTableCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateCassandraTableParameters.CassandraTableCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateCassandraTableParameters.CassandraTableCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "CreateUpdateCassandraTable", err.Error()) + } + + req, err := client.CreateUpdateCassandraTablePreparer(ctx, resourceGroupName, accountName, keyspaceName, tableName, createUpdateCassandraTableParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "CreateUpdateCassandraTable", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateCassandraTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "CreateUpdateCassandraTable", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateCassandraTablePreparer prepares the CreateUpdateCassandraTable request. +func (client CassandraResourcesClient) CreateUpdateCassandraTablePreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, createUpdateCassandraTableParameters CassandraTableCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", pathParameters), + autorest.WithJSON(createUpdateCassandraTableParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateCassandraTableSender sends the CreateUpdateCassandraTable request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) CreateUpdateCassandraTableSender(req *http.Request) (future CassandraResourcesCreateUpdateCassandraTableFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateCassandraTableResponder handles the response to the CreateUpdateCassandraTable request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) CreateUpdateCassandraTableResponder(resp *http.Response) (result CassandraTableGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DeleteCassandraKeyspace deletes an existing Azure Cosmos DB Cassandra keyspace. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +func (client CassandraResourcesClient) DeleteCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (result CassandraResourcesDeleteCassandraKeyspaceFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.DeleteCassandraKeyspace") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "DeleteCassandraKeyspace", err.Error()) + } + + req, err := client.DeleteCassandraKeyspacePreparer(ctx, resourceGroupName, accountName, keyspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "DeleteCassandraKeyspace", nil, "Failure preparing request") + return + } + + result, err = client.DeleteCassandraKeyspaceSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "DeleteCassandraKeyspace", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteCassandraKeyspacePreparer prepares the DeleteCassandraKeyspace request. +func (client CassandraResourcesClient) DeleteCassandraKeyspacePreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteCassandraKeyspaceSender sends the DeleteCassandraKeyspace request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) DeleteCassandraKeyspaceSender(req *http.Request) (future CassandraResourcesDeleteCassandraKeyspaceFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteCassandraKeyspaceResponder handles the response to the DeleteCassandraKeyspace request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) DeleteCassandraKeyspaceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteCassandraTable deletes an existing Azure Cosmos DB Cassandra table. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +// tableName - cosmos DB table name. +func (client CassandraResourcesClient) DeleteCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (result CassandraResourcesDeleteCassandraTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.DeleteCassandraTable") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "DeleteCassandraTable", err.Error()) + } + + req, err := client.DeleteCassandraTablePreparer(ctx, resourceGroupName, accountName, keyspaceName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "DeleteCassandraTable", nil, "Failure preparing request") + return + } + + result, err = client.DeleteCassandraTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "DeleteCassandraTable", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteCassandraTablePreparer prepares the DeleteCassandraTable request. +func (client CassandraResourcesClient) DeleteCassandraTablePreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteCassandraTableSender sends the DeleteCassandraTable request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) DeleteCassandraTableSender(req *http.Request) (future CassandraResourcesDeleteCassandraTableFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteCassandraTableResponder handles the response to the DeleteCassandraTable request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) DeleteCassandraTableResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetCassandraKeyspace gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the +// provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +func (client CassandraResourcesClient) GetCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (result CassandraKeyspaceGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.GetCassandraKeyspace") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "GetCassandraKeyspace", err.Error()) + } + + req, err := client.GetCassandraKeyspacePreparer(ctx, resourceGroupName, accountName, keyspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraKeyspace", nil, "Failure preparing request") + return + } + + resp, err := client.GetCassandraKeyspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraKeyspace", resp, "Failure sending request") + return + } + + result, err = client.GetCassandraKeyspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraKeyspace", resp, "Failure responding to request") + } + + return +} + +// GetCassandraKeyspacePreparer prepares the GetCassandraKeyspace request. +func (client CassandraResourcesClient) GetCassandraKeyspacePreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCassandraKeyspaceSender sends the GetCassandraKeyspace request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) GetCassandraKeyspaceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetCassandraKeyspaceResponder handles the response to the GetCassandraKeyspace request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) GetCassandraKeyspaceResponder(resp *http.Response) (result CassandraKeyspaceGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetCassandraKeyspaceThroughput gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB +// database account with the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +func (client CassandraResourcesClient) GetCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.GetCassandraKeyspaceThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "GetCassandraKeyspaceThroughput", err.Error()) + } + + req, err := client.GetCassandraKeyspaceThroughputPreparer(ctx, resourceGroupName, accountName, keyspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraKeyspaceThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetCassandraKeyspaceThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraKeyspaceThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetCassandraKeyspaceThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraKeyspaceThroughput", resp, "Failure responding to request") + } + + return +} + +// GetCassandraKeyspaceThroughputPreparer prepares the GetCassandraKeyspaceThroughput request. +func (client CassandraResourcesClient) GetCassandraKeyspaceThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCassandraKeyspaceThroughputSender sends the GetCassandraKeyspaceThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) GetCassandraKeyspaceThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetCassandraKeyspaceThroughputResponder handles the response to the GetCassandraKeyspaceThroughput request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) GetCassandraKeyspaceThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetCassandraTable gets the Cassandra table under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +// tableName - cosmos DB table name. +func (client CassandraResourcesClient) GetCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (result CassandraTableGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.GetCassandraTable") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "GetCassandraTable", err.Error()) + } + + req, err := client.GetCassandraTablePreparer(ctx, resourceGroupName, accountName, keyspaceName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraTable", nil, "Failure preparing request") + return + } + + resp, err := client.GetCassandraTableSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraTable", resp, "Failure sending request") + return + } + + result, err = client.GetCassandraTableResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraTable", resp, "Failure responding to request") + } + + return +} + +// GetCassandraTablePreparer prepares the GetCassandraTable request. +func (client CassandraResourcesClient) GetCassandraTablePreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCassandraTableSender sends the GetCassandraTable request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) GetCassandraTableSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetCassandraTableResponder handles the response to the GetCassandraTable request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) GetCassandraTableResponder(resp *http.Response) (result CassandraTableGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetCassandraTableThroughput gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB +// database account with the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +// tableName - cosmos DB table name. +func (client CassandraResourcesClient) GetCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.GetCassandraTableThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "GetCassandraTableThroughput", err.Error()) + } + + req, err := client.GetCassandraTableThroughputPreparer(ctx, resourceGroupName, accountName, keyspaceName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraTableThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetCassandraTableThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraTableThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetCassandraTableThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "GetCassandraTableThroughput", resp, "Failure responding to request") + } + + return +} + +// GetCassandraTableThroughputPreparer prepares the GetCassandraTableThroughput request. +func (client CassandraResourcesClient) GetCassandraTableThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCassandraTableThroughputSender sends the GetCassandraTableThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) GetCassandraTableThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetCassandraTableThroughputResponder handles the response to the GetCassandraTableThroughput request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) GetCassandraTableThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListCassandraKeyspaces lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client CassandraResourcesClient) ListCassandraKeyspaces(ctx context.Context, resourceGroupName string, accountName string) (result CassandraKeyspaceListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.ListCassandraKeyspaces") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "ListCassandraKeyspaces", err.Error()) + } + + req, err := client.ListCassandraKeyspacesPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "ListCassandraKeyspaces", nil, "Failure preparing request") + return + } + + resp, err := client.ListCassandraKeyspacesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "ListCassandraKeyspaces", resp, "Failure sending request") + return + } + + result, err = client.ListCassandraKeyspacesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "ListCassandraKeyspaces", resp, "Failure responding to request") + } + + return +} + +// ListCassandraKeyspacesPreparer prepares the ListCassandraKeyspaces request. +func (client CassandraResourcesClient) ListCassandraKeyspacesPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListCassandraKeyspacesSender sends the ListCassandraKeyspaces request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) ListCassandraKeyspacesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListCassandraKeyspacesResponder handles the response to the ListCassandraKeyspaces request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) ListCassandraKeyspacesResponder(resp *http.Response) (result CassandraKeyspaceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListCassandraTables lists the Cassandra table under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +func (client CassandraResourcesClient) ListCassandraTables(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (result CassandraTableListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.ListCassandraTables") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "ListCassandraTables", err.Error()) + } + + req, err := client.ListCassandraTablesPreparer(ctx, resourceGroupName, accountName, keyspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "ListCassandraTables", nil, "Failure preparing request") + return + } + + resp, err := client.ListCassandraTablesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "ListCassandraTables", resp, "Failure sending request") + return + } + + result, err = client.ListCassandraTablesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "ListCassandraTables", resp, "Failure responding to request") + } + + return +} + +// ListCassandraTablesPreparer prepares the ListCassandraTables request. +func (client CassandraResourcesClient) ListCassandraTablesPreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListCassandraTablesSender sends the ListCassandraTables request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) ListCassandraTablesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListCassandraTablesResponder handles the response to the ListCassandraTables request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) ListCassandraTablesResponder(resp *http.Response) (result CassandraTableListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateCassandraKeyspaceThroughput update RUs per second of an Azure Cosmos DB Cassandra Keyspace +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +// updateThroughputParameters - the RUs per second of the parameters to provide for the current Cassandra +// Keyspace. +func (client CassandraResourcesClient) UpdateCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result CassandraResourcesUpdateCassandraKeyspaceThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.UpdateCassandraKeyspaceThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "UpdateCassandraKeyspaceThroughput", err.Error()) + } + + req, err := client.UpdateCassandraKeyspaceThroughputPreparer(ctx, resourceGroupName, accountName, keyspaceName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "UpdateCassandraKeyspaceThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateCassandraKeyspaceThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "UpdateCassandraKeyspaceThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateCassandraKeyspaceThroughputPreparer prepares the UpdateCassandraKeyspaceThroughput request. +func (client CassandraResourcesClient) UpdateCassandraKeyspaceThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateCassandraKeyspaceThroughputSender sends the UpdateCassandraKeyspaceThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) UpdateCassandraKeyspaceThroughputSender(req *http.Request) (future CassandraResourcesUpdateCassandraKeyspaceThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateCassandraKeyspaceThroughputResponder handles the response to the UpdateCassandraKeyspaceThroughput request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) UpdateCassandraKeyspaceThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateCassandraTableThroughput update RUs per second of an Azure Cosmos DB Cassandra table +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyspaceName - cosmos DB keyspace name. +// tableName - cosmos DB table name. +// updateThroughputParameters - the RUs per second of the parameters to provide for the current Cassandra +// table. +func (client CassandraResourcesClient) UpdateCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result CassandraResourcesUpdateCassandraTableThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CassandraResourcesClient.UpdateCassandraTableThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.CassandraResourcesClient", "UpdateCassandraTableThroughput", err.Error()) + } + + req, err := client.UpdateCassandraTableThroughputPreparer(ctx, resourceGroupName, accountName, keyspaceName, tableName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "UpdateCassandraTableThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateCassandraTableThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesClient", "UpdateCassandraTableThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateCassandraTableThroughputPreparer prepares the UpdateCassandraTableThroughput request. +func (client CassandraResourcesClient) UpdateCassandraTableThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "keyspaceName": autorest.Encode("path", keyspaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateCassandraTableThroughputSender sends the UpdateCassandraTableThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client CassandraResourcesClient) UpdateCassandraTableThroughputSender(req *http.Request) (future CassandraResourcesUpdateCassandraTableThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateCassandraTableThroughputResponder handles the response to the UpdateCassandraTableThroughput request. The method always +// closes the http.Response Body. +func (client CassandraResourcesClient) UpdateCassandraTableThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/client.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/client.go new file mode 100644 index 000000000000..81a12f33ea0d --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/client.go @@ -0,0 +1,54 @@ +// Package documentdb implements the Azure ARM Documentdb service API version . +// +// Azure Cosmos DB Database Service Resource Provider REST API +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Documentdb + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Documentdb. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string + SubscriptionID1 string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string, subscriptionID1 string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// 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, subscriptionID1 string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + SubscriptionID1: subscriptionID1, + } +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/collection.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/collection.go new file mode 100644 index 000000000000..a4a414f9c4ea --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/collection.go @@ -0,0 +1,331 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CollectionClient is the azure Cosmos DB Database Service Resource Provider REST API +type CollectionClient struct { + BaseClient +} + +// NewCollectionClient creates an instance of the CollectionClient client. +func NewCollectionClient(subscriptionID string, subscriptionID1 string) CollectionClient { + return NewCollectionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewCollectionClientWithBaseURI creates an instance of the CollectionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionClient { + return CollectionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetricDefinitions retrieves metric definitions for the given collection. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +func (client CollectionClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string) (result MetricDefinitionsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CollectionClient.ListMetricDefinitions") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CollectionClient", "ListMetricDefinitions", err.Error()) + } + + req, err := client.ListMetricDefinitionsPreparer(ctx, resourceGroupName, accountName, databaseRid, collectionRid) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListMetricDefinitions", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricDefinitionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListMetricDefinitions", resp, "Failure sending request") + return + } + + result, err = client.ListMetricDefinitionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListMetricDefinitions", resp, "Failure responding to request") + } + + return +} + +// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request. +func (client CollectionClient) ListMetricDefinitionsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the +// http.Response Body if it receives an error. +func (client CollectionClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always +// closes the http.Response Body. +func (client CollectionClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListMetrics retrieves the metrics determined by the given filter for the given database account and collection. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client CollectionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result MetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CollectionClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CollectionClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, databaseRid, collectionRid, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client CollectionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client CollectionClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client CollectionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListUsages retrieves the usages (most recent storage data) for the given collection. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is +// name.value (name of the metric, can have an or of multiple names). +func (client CollectionClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result UsagesResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CollectionClient.ListUsages") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CollectionClient", "ListUsages", err.Error()) + } + + req, err := client.ListUsagesPreparer(ctx, resourceGroupName, accountName, databaseRid, collectionRid, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListUsages", nil, "Failure preparing request") + return + } + + resp, err := client.ListUsagesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListUsages", resp, "Failure sending request") + return + } + + result, err = client.ListUsagesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionClient", "ListUsages", resp, "Failure responding to request") + } + + return +} + +// ListUsagesPreparer prepares the ListUsages request. +func (client CollectionClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListUsagesSender sends the ListUsages request. The method will close the +// http.Response Body if it receives an error. +func (client CollectionClient) ListUsagesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListUsagesResponder handles the response to the ListUsages request. The method always +// closes the http.Response Body. +func (client CollectionClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionpartition.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionpartition.go new file mode 100644 index 000000000000..82146a6d34b6 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionpartition.go @@ -0,0 +1,239 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CollectionPartitionClient is the azure Cosmos DB Database Service Resource Provider REST API +type CollectionPartitionClient struct { + BaseClient +} + +// NewCollectionPartitionClient creates an instance of the CollectionPartitionClient client. +func NewCollectionPartitionClient(subscriptionID string, subscriptionID1 string) CollectionPartitionClient { + return NewCollectionPartitionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewCollectionPartitionClientWithBaseURI creates an instance of the CollectionPartitionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionClient { + return CollectionPartitionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given collection, split by partition. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client CollectionPartitionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result PartitionMetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CollectionPartitionClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CollectionPartitionClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, databaseRid, collectionRid, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client CollectionPartitionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client CollectionPartitionClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client CollectionPartitionClient) ListMetricsResponder(resp *http.Response) (result PartitionMetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListUsages retrieves the usages (most recent storage data) for the given collection, split by partition. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is +// name.value (name of the metric, can have an or of multiple names). +func (client CollectionPartitionClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result PartitionUsagesResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CollectionPartitionClient.ListUsages") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CollectionPartitionClient", "ListUsages", err.Error()) + } + + req, err := client.ListUsagesPreparer(ctx, resourceGroupName, accountName, databaseRid, collectionRid, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionClient", "ListUsages", nil, "Failure preparing request") + return + } + + resp, err := client.ListUsagesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionClient", "ListUsages", resp, "Failure sending request") + return + } + + result, err = client.ListUsagesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionClient", "ListUsages", resp, "Failure responding to request") + } + + return +} + +// ListUsagesPreparer prepares the ListUsages request. +func (client CollectionPartitionClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListUsagesSender sends the ListUsages request. The method will close the +// http.Response Body if it receives an error. +func (client CollectionPartitionClient) ListUsagesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListUsagesResponder handles the response to the ListUsages request. The method always +// closes the http.Response Body. +func (client CollectionPartitionClient) ListUsagesResponder(resp *http.Response) (result PartitionUsagesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionpartitionregion.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionpartitionregion.go new file mode 100644 index 000000000000..41494746aca6 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionpartitionregion.go @@ -0,0 +1,144 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CollectionPartitionRegionClient is the azure Cosmos DB Database Service Resource Provider REST API +type CollectionPartitionRegionClient struct { + BaseClient +} + +// NewCollectionPartitionRegionClient creates an instance of the CollectionPartitionRegionClient client. +func NewCollectionPartitionRegionClient(subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient { + return NewCollectionPartitionRegionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewCollectionPartitionRegionClientWithBaseURI creates an instance of the CollectionPartitionRegionClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient { + return CollectionPartitionRegionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given collection and region, split by +// partition. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// region - cosmos DB region, with spaces between words and each word capitalized. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client CollectionPartitionRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string) (result PartitionMetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CollectionPartitionRegionClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CollectionPartitionRegionClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, region, databaseRid, collectionRid, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionRegionClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionRegionClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionPartitionRegionClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client CollectionPartitionRegionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "region": autorest.Encode("path", region), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client CollectionPartitionRegionClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client CollectionPartitionRegionClient) ListMetricsResponder(resp *http.Response) (result PartitionMetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionregion.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionregion.go new file mode 100644 index 000000000000..6661be96d7c2 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/collectionregion.go @@ -0,0 +1,144 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CollectionRegionClient is the azure Cosmos DB Database Service Resource Provider REST API +type CollectionRegionClient struct { + BaseClient +} + +// NewCollectionRegionClient creates an instance of the CollectionRegionClient client. +func NewCollectionRegionClient(subscriptionID string, subscriptionID1 string) CollectionRegionClient { + return NewCollectionRegionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewCollectionRegionClientWithBaseURI creates an instance of the CollectionRegionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionRegionClient { + return CollectionRegionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given database account, collection and +// region. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// region - cosmos DB region, with spaces between words and each word capitalized. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client CollectionRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string) (result MetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CollectionRegionClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.CollectionRegionClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, region, databaseRid, collectionRid, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionRegionClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.CollectionRegionClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CollectionRegionClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client CollectionRegionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "region": autorest.Encode("path", region), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client CollectionRegionClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client CollectionRegionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/database.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/database.go new file mode 100644 index 000000000000..e3bc56645ac7 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/database.go @@ -0,0 +1,325 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DatabaseClient is the azure Cosmos DB Database Service Resource Provider REST API +type DatabaseClient struct { + BaseClient +} + +// NewDatabaseClient creates an instance of the DatabaseClient client. +func NewDatabaseClient(subscriptionID string, subscriptionID1 string) DatabaseClient { + return NewDatabaseClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewDatabaseClientWithBaseURI creates an instance of the DatabaseClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseClient { + return DatabaseClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetricDefinitions retrieves metric definitions for the given database. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +func (client DatabaseClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string, databaseRid string) (result MetricDefinitionsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseClient.ListMetricDefinitions") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseClient", "ListMetricDefinitions", err.Error()) + } + + req, err := client.ListMetricDefinitionsPreparer(ctx, resourceGroupName, accountName, databaseRid) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListMetricDefinitions", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricDefinitionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListMetricDefinitions", resp, "Failure sending request") + return + } + + result, err = client.ListMetricDefinitionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListMetricDefinitions", resp, "Failure responding to request") + } + + return +} + +// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request. +func (client DatabaseClient) ListMetricDefinitionsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseRid": autorest.Encode("path", databaseRid), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always +// closes the http.Response Body. +func (client DatabaseClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListMetrics retrieves the metrics determined by the given filter for the given database account and database. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client DatabaseClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, filter string) (result MetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, databaseRid, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client DatabaseClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseRid": autorest.Encode("path", databaseRid), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client DatabaseClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListUsages retrieves the usages (most recent data) for the given database. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is +// name.value (name of the metric, can have an or of multiple names). +func (client DatabaseClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, filter string) (result UsagesResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseClient.ListUsages") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseClient", "ListUsages", err.Error()) + } + + req, err := client.ListUsagesPreparer(ctx, resourceGroupName, accountName, databaseRid, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListUsages", nil, "Failure preparing request") + return + } + + resp, err := client.ListUsagesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListUsages", resp, "Failure sending request") + return + } + + result, err = client.ListUsagesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseClient", "ListUsages", resp, "Failure responding to request") + } + + return +} + +// ListUsagesPreparer prepares the ListUsages request. +func (client DatabaseClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseRid": autorest.Encode("path", databaseRid), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListUsagesSender sends the ListUsages request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseClient) ListUsagesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListUsagesResponder handles the response to the ListUsages request. The method always +// closes the http.Response Body. +func (client DatabaseClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/databaseaccountregion.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/databaseaccountregion.go new file mode 100644 index 000000000000..efd7898184c8 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/databaseaccountregion.go @@ -0,0 +1,139 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DatabaseAccountRegionClient is the azure Cosmos DB Database Service Resource Provider REST API +type DatabaseAccountRegionClient struct { + BaseClient +} + +// NewDatabaseAccountRegionClient creates an instance of the DatabaseAccountRegionClient client. +func NewDatabaseAccountRegionClient(subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient { + return NewDatabaseAccountRegionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewDatabaseAccountRegionClientWithBaseURI creates an instance of the DatabaseAccountRegionClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient { + return DatabaseAccountRegionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given database account and region. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// region - cosmos DB region, with spaces between words and each word capitalized. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client DatabaseAccountRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, filter string) (result MetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountRegionClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountRegionClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, region, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountRegionClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountRegionClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountRegionClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client DatabaseAccountRegionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, region string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "region": autorest.Encode("path", region), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountRegionClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client DatabaseAccountRegionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/databaseaccounts.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/databaseaccounts.go new file mode 100644 index 000000000000..d842f44a08ed --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/databaseaccounts.go @@ -0,0 +1,1662 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DatabaseAccountsClient is the azure Cosmos DB Database Service Resource Provider REST API +type DatabaseAccountsClient struct { + BaseClient +} + +// NewDatabaseAccountsClient creates an instance of the DatabaseAccountsClient client. +func NewDatabaseAccountsClient(subscriptionID string, subscriptionID1 string) DatabaseAccountsClient { + return NewDatabaseAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountsClient { + return DatabaseAccountsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// CheckNameExists checks that the Azure Cosmos DB account name already exists. A valid account name may contain only +// lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. +// Parameters: +// accountName - cosmos DB database account name. +func (client DatabaseAccountsClient) CheckNameExists(ctx context.Context, accountName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.CheckNameExists") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "CheckNameExists", err.Error()) + } + + req, err := client.CheckNameExistsPreparer(ctx, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "CheckNameExists", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameExistsSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "CheckNameExists", resp, "Failure sending request") + return + } + + result, err = client.CheckNameExistsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "CheckNameExists", resp, "Failure responding to request") + } + + return +} + +// CheckNameExistsPreparer prepares the CheckNameExists request. +func (client DatabaseAccountsClient) CheckNameExistsPreparer(ctx context.Context, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckNameExistsSender sends the CheckNameExists request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) CheckNameExistsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameExistsResponder handles the response to the CheckNameExists request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) CheckNameExistsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateOrUpdate creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when +// performing updates on an account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// createUpdateParameters - the parameters to provide for the current database account. +func (client DatabaseAccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters) (result DatabaseAccountsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateParameters, + Constraints: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMaximum, Rule: int64(2147483647), Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(86400), Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, + }}, + }}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.Locations", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.DatabaseAccountOfferType", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, createUpdateParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DatabaseAccountsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters) (*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 = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}", pathParameters), + autorest.WithJSON(createUpdateParameters), + 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 DatabaseAccountsClient) CreateOrUpdateSender(req *http.Request) (future DatabaseAccountsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseAccountGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client DatabaseAccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DatabaseAccountsClient) 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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{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 DatabaseAccountsClient) DeleteSender(req *http.Request) (future DatabaseAccountsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// FailoverPriorityChange changes the failover priority for the Azure Cosmos DB database account. A failover priority +// of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover +// priority values must be unique for each of the regions in which the database account exists. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// failoverParameters - the new failover policies for the database account. +func (client DatabaseAccountsClient) FailoverPriorityChange(ctx context.Context, resourceGroupName string, accountName string, failoverParameters FailoverPolicies) (result DatabaseAccountsFailoverPriorityChangeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.FailoverPriorityChange") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: failoverParameters, + Constraints: []validation.Constraint{{Target: "failoverParameters.FailoverPolicies", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "FailoverPriorityChange", err.Error()) + } + + req, err := client.FailoverPriorityChangePreparer(ctx, resourceGroupName, accountName, failoverParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "FailoverPriorityChange", nil, "Failure preparing request") + return + } + + result, err = client.FailoverPriorityChangeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "FailoverPriorityChange", result.Response(), "Failure sending request") + return + } + + return +} + +// FailoverPriorityChangePreparer prepares the FailoverPriorityChange request. +func (client DatabaseAccountsClient) FailoverPriorityChangePreparer(ctx context.Context, resourceGroupName string, accountName string, failoverParameters FailoverPolicies) (*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 = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange", pathParameters), + autorest.WithJSON(failoverParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// FailoverPriorityChangeSender sends the FailoverPriorityChange request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) FailoverPriorityChangeSender(req *http.Request) (future DatabaseAccountsFailoverPriorityChangeFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// FailoverPriorityChangeResponder handles the response to the FailoverPriorityChange request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) FailoverPriorityChangeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the properties of an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client DatabaseAccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DatabaseAccountsClient) 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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{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 DatabaseAccountsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) GetResponder(resp *http.Response) (result DatabaseAccountGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetReadOnlyKeys lists the read-only access keys for the specified Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client DatabaseAccountsClient) GetReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListReadOnlyKeysResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.GetReadOnlyKeys") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "GetReadOnlyKeys", err.Error()) + } + + req, err := client.GetReadOnlyKeysPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "GetReadOnlyKeys", nil, "Failure preparing request") + return + } + + resp, err := client.GetReadOnlyKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "GetReadOnlyKeys", resp, "Failure sending request") + return + } + + result, err = client.GetReadOnlyKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "GetReadOnlyKeys", resp, "Failure responding to request") + } + + return +} + +// GetReadOnlyKeysPreparer prepares the GetReadOnlyKeys request. +func (client DatabaseAccountsClient) GetReadOnlyKeysPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetReadOnlyKeysSender sends the GetReadOnlyKeys request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) GetReadOnlyKeysSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetReadOnlyKeysResponder handles the response to the GetReadOnlyKeys request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) GetReadOnlyKeysResponder(resp *http.Response) (result DatabaseAccountListReadOnlyKeysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the Azure Cosmos DB database accounts available under the subscription. +func (client DatabaseAccountsClient) List(ctx context.Context) (result DatabaseAccountsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.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, "documentdb.DatabaseAccountsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client DatabaseAccountsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts", 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 DatabaseAccountsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) ListResponder(resp *http.Response) (result DatabaseAccountsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all the Azure Cosmos DB database accounts available under the given resource group. +// Parameters: +// resourceGroupName - name of an Azure resource group. +func (client DatabaseAccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DatabaseAccountsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "ListByResourceGroup", err.Error()) + } + + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DatabaseAccountsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts", 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 DatabaseAccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) ListByResourceGroupResponder(resp *http.Response) (result DatabaseAccountsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListConnectionStrings lists the connection strings for the specified Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client DatabaseAccountsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListConnectionStringsResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListConnectionStrings") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "ListConnectionStrings", err.Error()) + } + + req, err := client.ListConnectionStringsPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListConnectionStrings", nil, "Failure preparing request") + return + } + + resp, err := client.ListConnectionStringsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListConnectionStrings", resp, "Failure sending request") + return + } + + result, err = client.ListConnectionStringsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListConnectionStrings", resp, "Failure responding to request") + } + + return +} + +// ListConnectionStringsPreparer prepares the ListConnectionStrings request. +func (client DatabaseAccountsClient) ListConnectionStringsPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) ListConnectionStringsResponder(resp *http.Response) (result DatabaseAccountListConnectionStringsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListKeys lists the access keys for the specified Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client DatabaseAccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListKeysResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListKeys") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "ListKeys", err.Error()) + } + + req, err := client.ListKeysPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListKeys", nil, "Failure preparing request") + return + } + + resp, err := client.ListKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListKeys", resp, "Failure sending request") + return + } + + result, err = client.ListKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListKeys", resp, "Failure responding to request") + } + + return +} + +// ListKeysPreparer prepares the ListKeys request. +func (client DatabaseAccountsClient) ListKeysPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListKeysSender sends the ListKeys request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListKeysResponder handles the response to the ListKeys request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) ListKeysResponder(resp *http.Response) (result DatabaseAccountListKeysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListMetricDefinitions retrieves metric definitions for the given database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client DatabaseAccountsClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string) (result MetricDefinitionsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListMetricDefinitions") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "ListMetricDefinitions", err.Error()) + } + + req, err := client.ListMetricDefinitionsPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListMetricDefinitions", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricDefinitionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListMetricDefinitions", resp, "Failure sending request") + return + } + + result, err = client.ListMetricDefinitionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListMetricDefinitions", resp, "Failure responding to request") + } + + return +} + +// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request. +func (client DatabaseAccountsClient) ListMetricDefinitionsPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListMetrics retrieves the metrics determined by the given filter for the given database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client DatabaseAccountsClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, filter string) (result MetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client DatabaseAccountsClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, filter 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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListReadOnlyKeys lists the read-only access keys for the specified Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client DatabaseAccountsClient) ListReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListReadOnlyKeysResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListReadOnlyKeys") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "ListReadOnlyKeys", err.Error()) + } + + req, err := client.ListReadOnlyKeysPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListReadOnlyKeys", nil, "Failure preparing request") + return + } + + resp, err := client.ListReadOnlyKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListReadOnlyKeys", resp, "Failure sending request") + return + } + + result, err = client.ListReadOnlyKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListReadOnlyKeys", resp, "Failure responding to request") + } + + return +} + +// ListReadOnlyKeysPreparer prepares the ListReadOnlyKeys request. +func (client DatabaseAccountsClient) ListReadOnlyKeysPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListReadOnlyKeysSender sends the ListReadOnlyKeys request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) ListReadOnlyKeysSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListReadOnlyKeysResponder handles the response to the ListReadOnlyKeys request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) ListReadOnlyKeysResponder(resp *http.Response) (result DatabaseAccountListReadOnlyKeysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListUsages retrieves the usages (most recent data) for the given database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is +// name.value (name of the metric, can have an or of multiple names). +func (client DatabaseAccountsClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, filter string) (result UsagesResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListUsages") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "ListUsages", err.Error()) + } + + req, err := client.ListUsagesPreparer(ctx, resourceGroupName, accountName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListUsages", nil, "Failure preparing request") + return + } + + resp, err := client.ListUsagesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListUsages", resp, "Failure sending request") + return + } + + result, err = client.ListUsagesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "ListUsages", resp, "Failure responding to request") + } + + return +} + +// ListUsagesPreparer prepares the ListUsages request. +func (client DatabaseAccountsClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, accountName string, filter 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 = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListUsagesSender sends the ListUsages request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) ListUsagesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListUsagesResponder handles the response to the ListUsages request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// OfflineRegion offline the specified region for the specified Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// regionParameterForOffline - cosmos DB region to offline for the database account. +func (client DatabaseAccountsClient) OfflineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline RegionForOnlineOffline) (result DatabaseAccountsOfflineRegionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.OfflineRegion") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: regionParameterForOffline, + Constraints: []validation.Constraint{{Target: "regionParameterForOffline.Region", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "OfflineRegion", err.Error()) + } + + req, err := client.OfflineRegionPreparer(ctx, resourceGroupName, accountName, regionParameterForOffline) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "OfflineRegion", nil, "Failure preparing request") + return + } + + result, err = client.OfflineRegionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "OfflineRegion", result.Response(), "Failure sending request") + return + } + + return +} + +// OfflineRegionPreparer prepares the OfflineRegion request. +func (client DatabaseAccountsClient) OfflineRegionPreparer(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline RegionForOnlineOffline) (*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 = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/offlineRegion", pathParameters), + autorest.WithJSON(regionParameterForOffline), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// OfflineRegionSender sends the OfflineRegion request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) OfflineRegionSender(req *http.Request) (future DatabaseAccountsOfflineRegionFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// OfflineRegionResponder handles the response to the OfflineRegion request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) OfflineRegionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// OnlineRegion online the specified region for the specified Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// regionParameterForOnline - cosmos DB region to online for the database account. +func (client DatabaseAccountsClient) OnlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline RegionForOnlineOffline) (result DatabaseAccountsOnlineRegionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.OnlineRegion") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: regionParameterForOnline, + Constraints: []validation.Constraint{{Target: "regionParameterForOnline.Region", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "OnlineRegion", err.Error()) + } + + req, err := client.OnlineRegionPreparer(ctx, resourceGroupName, accountName, regionParameterForOnline) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "OnlineRegion", nil, "Failure preparing request") + return + } + + result, err = client.OnlineRegionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "OnlineRegion", result.Response(), "Failure sending request") + return + } + + return +} + +// OnlineRegionPreparer prepares the OnlineRegion request. +func (client DatabaseAccountsClient) OnlineRegionPreparer(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline RegionForOnlineOffline) (*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 = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/onlineRegion", pathParameters), + autorest.WithJSON(regionParameterForOnline), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// OnlineRegionSender sends the OnlineRegion request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) OnlineRegionSender(req *http.Request) (future DatabaseAccountsOnlineRegionFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// OnlineRegionResponder handles the response to the OnlineRegion request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) OnlineRegionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// RegenerateKey regenerates an access key for the specified Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// keyToRegenerate - the name of the key to regenerate. +func (client DatabaseAccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters) (result DatabaseAccountsRegenerateKeyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.RegenerateKey") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "RegenerateKey", err.Error()) + } + + req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, accountName, keyToRegenerate) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "RegenerateKey", nil, "Failure preparing request") + return + } + + result, err = client.RegenerateKeySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "RegenerateKey", result.Response(), "Failure sending request") + return + } + + return +} + +// RegenerateKeyPreparer prepares the RegenerateKey request. +func (client DatabaseAccountsClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters) (*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 = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/regenerateKey", pathParameters), + autorest.WithJSON(keyToRegenerate), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegenerateKeySender sends the RegenerateKey request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) RegenerateKeySender(req *http.Request) (future DatabaseAccountsRegenerateKeyFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RegenerateKeyResponder handles the response to the RegenerateKey request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) RegenerateKeyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates the properties of an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// updateParameters - the parameters to provide for the current database account. +func (client DatabaseAccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, updateParameters DatabaseAccountUpdateParameters) (result DatabaseAccountsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.DatabaseAccountsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, updateParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client DatabaseAccountsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, updateParameters DatabaseAccountUpdateParameters) (*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 = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}", pathParameters), + autorest.WithJSON(updateParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseAccountsClient) UpdateSender(req *http.Request) (future DatabaseAccountsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DatabaseAccountsClient) UpdateResponder(resp *http.Response) (result DatabaseAccountGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/documentdbapi/interfaces.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/documentdbapi/interfaces.go new file mode 100644 index 000000000000..3095ba7fec9d --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/documentdbapi/interfaces.go @@ -0,0 +1,252 @@ +package documentdbapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-12-12/documentdb" + "github.com/Azure/go-autorest/autorest" +) + +// DatabaseAccountsClientAPI contains the set of methods on the DatabaseAccountsClient type. +type DatabaseAccountsClientAPI interface { + CheckNameExists(ctx context.Context, accountName string) (result autorest.Response, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters documentdb.DatabaseAccountCreateUpdateParameters) (result documentdb.DatabaseAccountsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.DatabaseAccountsDeleteFuture, err error) + FailoverPriorityChange(ctx context.Context, resourceGroupName string, accountName string, failoverParameters documentdb.FailoverPolicies) (result documentdb.DatabaseAccountsFailoverPriorityChangeFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.DatabaseAccountGetResults, err error) + GetReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.DatabaseAccountListReadOnlyKeysResult, err error) + List(ctx context.Context) (result documentdb.DatabaseAccountsListResult, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result documentdb.DatabaseAccountsListResult, err error) + ListConnectionStrings(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.DatabaseAccountListConnectionStringsResult, err error) + ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.DatabaseAccountListKeysResult, err error) + ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.MetricDefinitionsListResult, err error) + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, filter string) (result documentdb.MetricListResult, err error) + ListReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.DatabaseAccountListReadOnlyKeysResult, err error) + ListUsages(ctx context.Context, resourceGroupName string, accountName string, filter string) (result documentdb.UsagesResult, err error) + OfflineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline documentdb.RegionForOnlineOffline) (result documentdb.DatabaseAccountsOfflineRegionFuture, err error) + OnlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline documentdb.RegionForOnlineOffline) (result documentdb.DatabaseAccountsOnlineRegionFuture, err error) + RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate documentdb.DatabaseAccountRegenerateKeyParameters) (result documentdb.DatabaseAccountsRegenerateKeyFuture, err error) + Update(ctx context.Context, resourceGroupName string, accountName string, updateParameters documentdb.DatabaseAccountUpdateParameters) (result documentdb.DatabaseAccountsUpdateFuture, err error) +} + +var _ DatabaseAccountsClientAPI = (*documentdb.DatabaseAccountsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result documentdb.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result documentdb.OperationListResultIterator, err error) +} + +var _ OperationsClientAPI = (*documentdb.OperationsClient)(nil) + +// DatabaseClientAPI contains the set of methods on the DatabaseClient type. +type DatabaseClientAPI interface { + ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string, databaseRid string) (result documentdb.MetricDefinitionsListResult, err error) + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, filter string) (result documentdb.MetricListResult, err error) + ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, filter string) (result documentdb.UsagesResult, err error) +} + +var _ DatabaseClientAPI = (*documentdb.DatabaseClient)(nil) + +// CollectionClientAPI contains the set of methods on the CollectionClient type. +type CollectionClientAPI interface { + ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string) (result documentdb.MetricDefinitionsListResult, err error) + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result documentdb.MetricListResult, err error) + ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result documentdb.UsagesResult, err error) +} + +var _ CollectionClientAPI = (*documentdb.CollectionClient)(nil) + +// CollectionRegionClientAPI contains the set of methods on the CollectionRegionClient type. +type CollectionRegionClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string) (result documentdb.MetricListResult, err error) +} + +var _ CollectionRegionClientAPI = (*documentdb.CollectionRegionClient)(nil) + +// DatabaseAccountRegionClientAPI contains the set of methods on the DatabaseAccountRegionClient type. +type DatabaseAccountRegionClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, filter string) (result documentdb.MetricListResult, err error) +} + +var _ DatabaseAccountRegionClientAPI = (*documentdb.DatabaseAccountRegionClient)(nil) + +// PercentileSourceTargetClientAPI contains the set of methods on the PercentileSourceTargetClient type. +type PercentileSourceTargetClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, sourceRegion string, targetRegion string, filter string) (result documentdb.PercentileMetricListResult, err error) +} + +var _ PercentileSourceTargetClientAPI = (*documentdb.PercentileSourceTargetClient)(nil) + +// PercentileTargetClientAPI contains the set of methods on the PercentileTargetClient type. +type PercentileTargetClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, targetRegion string, filter string) (result documentdb.PercentileMetricListResult, err error) +} + +var _ PercentileTargetClientAPI = (*documentdb.PercentileTargetClient)(nil) + +// PercentileClientAPI contains the set of methods on the PercentileClient type. +type PercentileClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, filter string) (result documentdb.PercentileMetricListResult, err error) +} + +var _ PercentileClientAPI = (*documentdb.PercentileClient)(nil) + +// CollectionPartitionRegionClientAPI contains the set of methods on the CollectionPartitionRegionClient type. +type CollectionPartitionRegionClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string) (result documentdb.PartitionMetricListResult, err error) +} + +var _ CollectionPartitionRegionClientAPI = (*documentdb.CollectionPartitionRegionClient)(nil) + +// CollectionPartitionClientAPI contains the set of methods on the CollectionPartitionClient type. +type CollectionPartitionClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result documentdb.PartitionMetricListResult, err error) + ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result documentdb.PartitionUsagesResult, err error) +} + +var _ CollectionPartitionClientAPI = (*documentdb.CollectionPartitionClient)(nil) + +// PartitionKeyRangeIDClientAPI contains the set of methods on the PartitionKeyRangeIDClient type. +type PartitionKeyRangeIDClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string) (result documentdb.PartitionMetricListResult, err error) +} + +var _ PartitionKeyRangeIDClientAPI = (*documentdb.PartitionKeyRangeIDClient)(nil) + +// PartitionKeyRangeIDRegionClientAPI contains the set of methods on the PartitionKeyRangeIDRegionClient type. +type PartitionKeyRangeIDRegionClientAPI interface { + ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string) (result documentdb.PartitionMetricListResult, err error) +} + +var _ PartitionKeyRangeIDRegionClientAPI = (*documentdb.PartitionKeyRangeIDRegionClient)(nil) + +// SQLResourcesClientAPI contains the set of methods on the SQLResourcesClient type. +type SQLResourcesClientAPI interface { + CreateUpdateSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, createUpdateSQLContainerParameters documentdb.SQLContainerCreateUpdateParameters) (result documentdb.SQLResourcesCreateUpdateSQLContainerFuture, err error) + CreateUpdateSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateSQLDatabaseParameters documentdb.SQLDatabaseCreateUpdateParameters) (result documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture, err error) + CreateUpdateSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, createUpdateSQLStoredProcedureParameters documentdb.SQLStoredProcedureCreateUpdateParameters) (result documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture, err error) + CreateUpdateSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, createUpdateSQLTriggerParameters documentdb.SQLTriggerCreateUpdateParameters) (result documentdb.SQLResourcesCreateUpdateSQLTriggerFuture, err error) + CreateUpdateSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, createUpdateSQLUserDefinedFunctionParameters documentdb.SQLUserDefinedFunctionCreateUpdateParameters) (result documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture, err error) + DeleteSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result documentdb.SQLResourcesDeleteSQLContainerFuture, err error) + DeleteSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.SQLResourcesDeleteSQLDatabaseFuture, err error) + DeleteSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string) (result documentdb.SQLResourcesDeleteSQLStoredProcedureFuture, err error) + DeleteSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string) (result documentdb.SQLResourcesDeleteSQLTriggerFuture, err error) + DeleteSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string) (result documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture, err error) + GetSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result documentdb.SQLContainerGetResults, err error) + GetSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result documentdb.ThroughputSettingsGetResults, err error) + GetSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.SQLDatabaseGetResults, err error) + GetSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.ThroughputSettingsGetResults, err error) + GetSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string) (result documentdb.SQLStoredProcedureGetResults, err error) + GetSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string) (result documentdb.SQLTriggerGetResults, err error) + GetSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string) (result documentdb.SQLUserDefinedFunctionGetResults, err error) + ListSQLContainers(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.SQLContainerListResult, err error) + ListSQLDatabases(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.SQLDatabaseListResult, err error) + ListSQLStoredProcedures(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result documentdb.SQLStoredProcedureListResult, err error) + ListSQLTriggers(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result documentdb.SQLTriggerListResult, err error) + ListSQLUserDefinedFunctions(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result documentdb.SQLUserDefinedFunctionListResult, err error) + UpdateSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.SQLResourcesUpdateSQLContainerThroughputFuture, err error) + UpdateSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture, err error) +} + +var _ SQLResourcesClientAPI = (*documentdb.SQLResourcesClient)(nil) + +// MongoDBResourcesClientAPI contains the set of methods on the MongoDBResourcesClient type. +type MongoDBResourcesClientAPI interface { + CreateUpdateMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, createUpdateMongoDBCollectionParameters documentdb.MongoDBCollectionCreateUpdateParameters) (result documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture, err error) + CreateUpdateMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateMongoDBDatabaseParameters documentdb.MongoDBDatabaseCreateUpdateParameters) (result documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture, err error) + DeleteMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (result documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture, err error) + DeleteMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture, err error) + GetMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (result documentdb.MongoDBCollectionGetResults, err error) + GetMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (result documentdb.ThroughputSettingsGetResults, err error) + GetMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.MongoDBDatabaseGetResults, err error) + GetMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.ThroughputSettingsGetResults, err error) + ListMongoDBCollections(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.MongoDBCollectionListResult, err error) + ListMongoDBDatabases(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.MongoDBDatabaseListResult, err error) + UpdateMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture, err error) + UpdateMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture, err error) +} + +var _ MongoDBResourcesClientAPI = (*documentdb.MongoDBResourcesClient)(nil) + +// TableResourcesClientAPI contains the set of methods on the TableResourcesClient type. +type TableResourcesClientAPI interface { + CreateUpdateTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, createUpdateTableParameters documentdb.TableCreateUpdateParameters) (result documentdb.TableResourcesCreateUpdateTableFuture, err error) + DeleteTable(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result documentdb.TableResourcesDeleteTableFuture, err error) + GetTable(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result documentdb.TableGetResults, err error) + GetTableThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result documentdb.ThroughputSettingsGetResults, err error) + ListTables(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.TableListResult, err error) + UpdateTableThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.TableResourcesUpdateTableThroughputFuture, err error) +} + +var _ TableResourcesClientAPI = (*documentdb.TableResourcesClient)(nil) + +// CassandraResourcesClientAPI contains the set of methods on the CassandraResourcesClient type. +type CassandraResourcesClientAPI interface { + CreateUpdateCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, createUpdateCassandraKeyspaceParameters documentdb.CassandraKeyspaceCreateUpdateParameters) (result documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture, err error) + CreateUpdateCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, createUpdateCassandraTableParameters documentdb.CassandraTableCreateUpdateParameters) (result documentdb.CassandraResourcesCreateUpdateCassandraTableFuture, err error) + DeleteCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (result documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture, err error) + DeleteCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (result documentdb.CassandraResourcesDeleteCassandraTableFuture, err error) + GetCassandraKeyspace(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (result documentdb.CassandraKeyspaceGetResults, err error) + GetCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (result documentdb.ThroughputSettingsGetResults, err error) + GetCassandraTable(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (result documentdb.CassandraTableGetResults, err error) + GetCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string) (result documentdb.ThroughputSettingsGetResults, err error) + ListCassandraKeyspaces(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.CassandraKeyspaceListResult, err error) + ListCassandraTables(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string) (result documentdb.CassandraTableListResult, err error) + UpdateCassandraKeyspaceThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture, err error) + UpdateCassandraTableThroughput(ctx context.Context, resourceGroupName string, accountName string, keyspaceName string, tableName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture, err error) +} + +var _ CassandraResourcesClientAPI = (*documentdb.CassandraResourcesClient)(nil) + +// GremlinResourcesClientAPI contains the set of methods on the GremlinResourcesClient type. +type GremlinResourcesClientAPI interface { + CreateUpdateGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateGremlinDatabaseParameters documentdb.GremlinDatabaseCreateUpdateParameters) (result documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture, err error) + CreateUpdateGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, createUpdateGremlinGraphParameters documentdb.GremlinGraphCreateUpdateParameters) (result documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture, err error) + DeleteGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.GremlinResourcesDeleteGremlinDatabaseFuture, err error) + DeleteGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (result documentdb.GremlinResourcesDeleteGremlinGraphFuture, err error) + GetGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.GremlinDatabaseGetResults, err error) + GetGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.ThroughputSettingsGetResults, err error) + GetGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (result documentdb.GremlinGraphGetResults, err error) + GetGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (result documentdb.ThroughputSettingsGetResults, err error) + ListGremlinDatabases(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.GremlinDatabaseListResult, err error) + ListGremlinGraphs(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result documentdb.GremlinGraphListResult, err error) + UpdateGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture, err error) + UpdateGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, updateThroughputParameters documentdb.ThroughputSettingsUpdateParameters) (result documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture, err error) +} + +var _ GremlinResourcesClientAPI = (*documentdb.GremlinResourcesClient)(nil) + +// PrivateLinkResourcesClientAPI contains the set of methods on the PrivateLinkResourcesClient type. +type PrivateLinkResourcesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, accountName string, groupName string) (result documentdb.PrivateLinkResource, err error) + ListByDatabaseAccount(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.PrivateLinkResourceListResult, err error) +} + +var _ PrivateLinkResourcesClientAPI = (*documentdb.PrivateLinkResourcesClient)(nil) + +// PrivateEndpointConnectionsClientAPI contains the set of methods on the PrivateEndpointConnectionsClient type. +type PrivateEndpointConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters documentdb.PrivateEndpointConnection) (result documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result documentdb.PrivateEndpointConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result documentdb.PrivateEndpointConnection, err error) + ListByDatabaseAccount(ctx context.Context, resourceGroupName string, accountName string) (result documentdb.PrivateEndpointConnectionListResult, err error) +} + +var _ PrivateEndpointConnectionsClientAPI = (*documentdb.PrivateEndpointConnectionsClient)(nil) diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/gremlinresources.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/gremlinresources.go new file mode 100644 index 000000000000..4876a8cb4e00 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/gremlinresources.go @@ -0,0 +1,1187 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// GremlinResourcesClient is the azure Cosmos DB Database Service Resource Provider REST API +type GremlinResourcesClient struct { + BaseClient +} + +// NewGremlinResourcesClient creates an instance of the GremlinResourcesClient client. +func NewGremlinResourcesClient(subscriptionID string, subscriptionID1 string) GremlinResourcesClient { + return NewGremlinResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewGremlinResourcesClientWithBaseURI creates an instance of the GremlinResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewGremlinResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) GremlinResourcesClient { + return GremlinResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// CreateUpdateGremlinDatabase create or update an Azure Cosmos DB Gremlin database +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// createUpdateGremlinDatabaseParameters - the parameters to provide for the current Gremlin database. +func (client GremlinResourcesClient) CreateUpdateGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateGremlinDatabaseParameters GremlinDatabaseCreateUpdateParameters) (result GremlinResourcesCreateUpdateGremlinDatabaseFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.CreateUpdateGremlinDatabase") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateGremlinDatabaseParameters, + Constraints: []validation.Constraint{{Target: "createUpdateGremlinDatabaseParameters.GremlinDatabaseCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateGremlinDatabaseParameters.GremlinDatabaseCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateGremlinDatabaseParameters.GremlinDatabaseCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateGremlinDatabaseParameters.GremlinDatabaseCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "CreateUpdateGremlinDatabase", err.Error()) + } + + req, err := client.CreateUpdateGremlinDatabasePreparer(ctx, resourceGroupName, accountName, databaseName, createUpdateGremlinDatabaseParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "CreateUpdateGremlinDatabase", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateGremlinDatabaseSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "CreateUpdateGremlinDatabase", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateGremlinDatabasePreparer prepares the CreateUpdateGremlinDatabase request. +func (client GremlinResourcesClient) CreateUpdateGremlinDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateGremlinDatabaseParameters GremlinDatabaseCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", pathParameters), + autorest.WithJSON(createUpdateGremlinDatabaseParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateGremlinDatabaseSender sends the CreateUpdateGremlinDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) CreateUpdateGremlinDatabaseSender(req *http.Request) (future GremlinResourcesCreateUpdateGremlinDatabaseFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateGremlinDatabaseResponder handles the response to the CreateUpdateGremlinDatabase request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) CreateUpdateGremlinDatabaseResponder(resp *http.Response) (result GremlinDatabaseGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateUpdateGremlinGraph create or update an Azure Cosmos DB Gremlin graph +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// graphName - cosmos DB graph name. +// createUpdateGremlinGraphParameters - the parameters to provide for the current Gremlin graph. +func (client GremlinResourcesClient) CreateUpdateGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, createUpdateGremlinGraphParameters GremlinGraphCreateUpdateParameters) (result GremlinResourcesCreateUpdateGremlinGraphFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.CreateUpdateGremlinGraph") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateGremlinGraphParameters, + Constraints: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, + {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, + }}, + {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "CreateUpdateGremlinGraph", err.Error()) + } + + req, err := client.CreateUpdateGremlinGraphPreparer(ctx, resourceGroupName, accountName, databaseName, graphName, createUpdateGremlinGraphParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "CreateUpdateGremlinGraph", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateGremlinGraphSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "CreateUpdateGremlinGraph", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateGremlinGraphPreparer prepares the CreateUpdateGremlinGraph request. +func (client GremlinResourcesClient) CreateUpdateGremlinGraphPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, createUpdateGremlinGraphParameters GremlinGraphCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "graphName": autorest.Encode("path", graphName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", pathParameters), + autorest.WithJSON(createUpdateGremlinGraphParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateGremlinGraphSender sends the CreateUpdateGremlinGraph request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) CreateUpdateGremlinGraphSender(req *http.Request) (future GremlinResourcesCreateUpdateGremlinGraphFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateGremlinGraphResponder handles the response to the CreateUpdateGremlinGraph request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) CreateUpdateGremlinGraphResponder(resp *http.Response) (result GremlinGraphGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DeleteGremlinDatabase deletes an existing Azure Cosmos DB Gremlin database. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client GremlinResourcesClient) DeleteGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result GremlinResourcesDeleteGremlinDatabaseFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.DeleteGremlinDatabase") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "DeleteGremlinDatabase", err.Error()) + } + + req, err := client.DeleteGremlinDatabasePreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "DeleteGremlinDatabase", nil, "Failure preparing request") + return + } + + result, err = client.DeleteGremlinDatabaseSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "DeleteGremlinDatabase", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteGremlinDatabasePreparer prepares the DeleteGremlinDatabase request. +func (client GremlinResourcesClient) DeleteGremlinDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteGremlinDatabaseSender sends the DeleteGremlinDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) DeleteGremlinDatabaseSender(req *http.Request) (future GremlinResourcesDeleteGremlinDatabaseFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteGremlinDatabaseResponder handles the response to the DeleteGremlinDatabase request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) DeleteGremlinDatabaseResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteGremlinGraph deletes an existing Azure Cosmos DB Gremlin graph. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// graphName - cosmos DB graph name. +func (client GremlinResourcesClient) DeleteGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (result GremlinResourcesDeleteGremlinGraphFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.DeleteGremlinGraph") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "DeleteGremlinGraph", err.Error()) + } + + req, err := client.DeleteGremlinGraphPreparer(ctx, resourceGroupName, accountName, databaseName, graphName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "DeleteGremlinGraph", nil, "Failure preparing request") + return + } + + result, err = client.DeleteGremlinGraphSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "DeleteGremlinGraph", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteGremlinGraphPreparer prepares the DeleteGremlinGraph request. +func (client GremlinResourcesClient) DeleteGremlinGraphPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "graphName": autorest.Encode("path", graphName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteGremlinGraphSender sends the DeleteGremlinGraph request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) DeleteGremlinGraphSender(req *http.Request) (future GremlinResourcesDeleteGremlinGraphFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteGremlinGraphResponder handles the response to the DeleteGremlinGraph request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) DeleteGremlinGraphResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetGremlinDatabase gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided +// name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client GremlinResourcesClient) GetGremlinDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result GremlinDatabaseGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.GetGremlinDatabase") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "GetGremlinDatabase", err.Error()) + } + + req, err := client.GetGremlinDatabasePreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.GetGremlinDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinDatabase", resp, "Failure sending request") + return + } + + result, err = client.GetGremlinDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinDatabase", resp, "Failure responding to request") + } + + return +} + +// GetGremlinDatabasePreparer prepares the GetGremlinDatabase request. +func (client GremlinResourcesClient) GetGremlinDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetGremlinDatabaseSender sends the GetGremlinDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) GetGremlinDatabaseSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetGremlinDatabaseResponder handles the response to the GetGremlinDatabase request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) GetGremlinDatabaseResponder(resp *http.Response) (result GremlinDatabaseGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetGremlinDatabaseThroughput gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB +// database account with the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client GremlinResourcesClient) GetGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.GetGremlinDatabaseThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "GetGremlinDatabaseThroughput", err.Error()) + } + + req, err := client.GetGremlinDatabaseThroughputPreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinDatabaseThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetGremlinDatabaseThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinDatabaseThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetGremlinDatabaseThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinDatabaseThroughput", resp, "Failure responding to request") + } + + return +} + +// GetGremlinDatabaseThroughputPreparer prepares the GetGremlinDatabaseThroughput request. +func (client GremlinResourcesClient) GetGremlinDatabaseThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetGremlinDatabaseThroughputSender sends the GetGremlinDatabaseThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) GetGremlinDatabaseThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetGremlinDatabaseThroughputResponder handles the response to the GetGremlinDatabaseThroughput request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) GetGremlinDatabaseThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetGremlinGraph gets the Gremlin graph under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// graphName - cosmos DB graph name. +func (client GremlinResourcesClient) GetGremlinGraph(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (result GremlinGraphGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.GetGremlinGraph") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "GetGremlinGraph", err.Error()) + } + + req, err := client.GetGremlinGraphPreparer(ctx, resourceGroupName, accountName, databaseName, graphName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinGraph", nil, "Failure preparing request") + return + } + + resp, err := client.GetGremlinGraphSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinGraph", resp, "Failure sending request") + return + } + + result, err = client.GetGremlinGraphResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinGraph", resp, "Failure responding to request") + } + + return +} + +// GetGremlinGraphPreparer prepares the GetGremlinGraph request. +func (client GremlinResourcesClient) GetGremlinGraphPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "graphName": autorest.Encode("path", graphName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetGremlinGraphSender sends the GetGremlinGraph request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) GetGremlinGraphSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetGremlinGraphResponder handles the response to the GetGremlinGraph request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) GetGremlinGraphResponder(resp *http.Response) (result GremlinGraphGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetGremlinGraphThroughput gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with +// the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// graphName - cosmos DB graph name. +func (client GremlinResourcesClient) GetGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.GetGremlinGraphThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "GetGremlinGraphThroughput", err.Error()) + } + + req, err := client.GetGremlinGraphThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, graphName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinGraphThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetGremlinGraphThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinGraphThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetGremlinGraphThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "GetGremlinGraphThroughput", resp, "Failure responding to request") + } + + return +} + +// GetGremlinGraphThroughputPreparer prepares the GetGremlinGraphThroughput request. +func (client GremlinResourcesClient) GetGremlinGraphThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "graphName": autorest.Encode("path", graphName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetGremlinGraphThroughputSender sends the GetGremlinGraphThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) GetGremlinGraphThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetGremlinGraphThroughputResponder handles the response to the GetGremlinGraphThroughput request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) GetGremlinGraphThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListGremlinDatabases lists the Gremlin databases under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client GremlinResourcesClient) ListGremlinDatabases(ctx context.Context, resourceGroupName string, accountName string) (result GremlinDatabaseListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.ListGremlinDatabases") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "ListGremlinDatabases", err.Error()) + } + + req, err := client.ListGremlinDatabasesPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "ListGremlinDatabases", nil, "Failure preparing request") + return + } + + resp, err := client.ListGremlinDatabasesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "ListGremlinDatabases", resp, "Failure sending request") + return + } + + result, err = client.ListGremlinDatabasesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "ListGremlinDatabases", resp, "Failure responding to request") + } + + return +} + +// ListGremlinDatabasesPreparer prepares the ListGremlinDatabases request. +func (client GremlinResourcesClient) ListGremlinDatabasesPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListGremlinDatabasesSender sends the ListGremlinDatabases request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) ListGremlinDatabasesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListGremlinDatabasesResponder handles the response to the ListGremlinDatabases request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) ListGremlinDatabasesResponder(resp *http.Response) (result GremlinDatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListGremlinGraphs lists the Gremlin graph under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client GremlinResourcesClient) ListGremlinGraphs(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result GremlinGraphListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.ListGremlinGraphs") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "ListGremlinGraphs", err.Error()) + } + + req, err := client.ListGremlinGraphsPreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "ListGremlinGraphs", nil, "Failure preparing request") + return + } + + resp, err := client.ListGremlinGraphsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "ListGremlinGraphs", resp, "Failure sending request") + return + } + + result, err = client.ListGremlinGraphsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "ListGremlinGraphs", resp, "Failure responding to request") + } + + return +} + +// ListGremlinGraphsPreparer prepares the ListGremlinGraphs request. +func (client GremlinResourcesClient) ListGremlinGraphsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListGremlinGraphsSender sends the ListGremlinGraphs request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) ListGremlinGraphsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListGremlinGraphsResponder handles the response to the ListGremlinGraphs request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) ListGremlinGraphsResponder(resp *http.Response) (result GremlinGraphListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateGremlinDatabaseThroughput update RUs per second of an Azure Cosmos DB Gremlin database +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// updateThroughputParameters - the RUs per second of the parameters to provide for the current Gremlin +// database. +func (client GremlinResourcesClient) UpdateGremlinDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result GremlinResourcesUpdateGremlinDatabaseThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.UpdateGremlinDatabaseThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "UpdateGremlinDatabaseThroughput", err.Error()) + } + + req, err := client.UpdateGremlinDatabaseThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "UpdateGremlinDatabaseThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateGremlinDatabaseThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "UpdateGremlinDatabaseThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateGremlinDatabaseThroughputPreparer prepares the UpdateGremlinDatabaseThroughput request. +func (client GremlinResourcesClient) UpdateGremlinDatabaseThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateGremlinDatabaseThroughputSender sends the UpdateGremlinDatabaseThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) UpdateGremlinDatabaseThroughputSender(req *http.Request) (future GremlinResourcesUpdateGremlinDatabaseThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateGremlinDatabaseThroughputResponder handles the response to the UpdateGremlinDatabaseThroughput request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) UpdateGremlinDatabaseThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateGremlinGraphThroughput update RUs per second of an Azure Cosmos DB Gremlin graph +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// graphName - cosmos DB graph name. +// updateThroughputParameters - the RUs per second of the parameters to provide for the current Gremlin graph. +func (client GremlinResourcesClient) UpdateGremlinGraphThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result GremlinResourcesUpdateGremlinGraphThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GremlinResourcesClient.UpdateGremlinGraphThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.GremlinResourcesClient", "UpdateGremlinGraphThroughput", err.Error()) + } + + req, err := client.UpdateGremlinGraphThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, graphName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "UpdateGremlinGraphThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateGremlinGraphThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesClient", "UpdateGremlinGraphThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateGremlinGraphThroughputPreparer prepares the UpdateGremlinGraphThroughput request. +func (client GremlinResourcesClient) UpdateGremlinGraphThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, graphName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "graphName": autorest.Encode("path", graphName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateGremlinGraphThroughputSender sends the UpdateGremlinGraphThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client GremlinResourcesClient) UpdateGremlinGraphThroughputSender(req *http.Request) (future GremlinResourcesUpdateGremlinGraphThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateGremlinGraphThroughputResponder handles the response to the UpdateGremlinGraphThroughput request. The method always +// closes the http.Response Body. +func (client GremlinResourcesClient) UpdateGremlinGraphThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/models.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/models.go new file mode 100644 index 000000000000..08338ca509b3 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/models.go @@ -0,0 +1,6095 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-12-12/documentdb" + +// CompositePathSortOrder enumerates the values for composite path sort order. +type CompositePathSortOrder string + +const ( + // Ascending ... + Ascending CompositePathSortOrder = "Ascending" + // Descending ... + Descending CompositePathSortOrder = "Descending" +) + +// PossibleCompositePathSortOrderValues returns an array of possible values for the CompositePathSortOrder const type. +func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { + return []CompositePathSortOrder{Ascending, Descending} +} + +// ConflictResolutionMode enumerates the values for conflict resolution mode. +type ConflictResolutionMode string + +const ( + // Custom ... + Custom ConflictResolutionMode = "Custom" + // LastWriterWins ... + LastWriterWins ConflictResolutionMode = "LastWriterWins" +) + +// PossibleConflictResolutionModeValues returns an array of possible values for the ConflictResolutionMode const type. +func PossibleConflictResolutionModeValues() []ConflictResolutionMode { + return []ConflictResolutionMode{Custom, LastWriterWins} +} + +// ConnectorOffer enumerates the values for connector offer. +type ConnectorOffer string + +const ( + // Small ... + Small ConnectorOffer = "Small" +) + +// PossibleConnectorOfferValues returns an array of possible values for the ConnectorOffer const type. +func PossibleConnectorOfferValues() []ConnectorOffer { + return []ConnectorOffer{Small} +} + +// DatabaseAccountKind enumerates the values for database account kind. +type DatabaseAccountKind string + +const ( + // GlobalDocumentDB ... + GlobalDocumentDB DatabaseAccountKind = "GlobalDocumentDB" + // MongoDB ... + MongoDB DatabaseAccountKind = "MongoDB" + // Parse ... + Parse DatabaseAccountKind = "Parse" +) + +// PossibleDatabaseAccountKindValues returns an array of possible values for the DatabaseAccountKind const type. +func PossibleDatabaseAccountKindValues() []DatabaseAccountKind { + return []DatabaseAccountKind{GlobalDocumentDB, MongoDB, Parse} +} + +// DatabaseAccountOfferType enumerates the values for database account offer type. +type DatabaseAccountOfferType string + +const ( + // Standard ... + Standard DatabaseAccountOfferType = "Standard" +) + +// PossibleDatabaseAccountOfferTypeValues returns an array of possible values for the DatabaseAccountOfferType const type. +func PossibleDatabaseAccountOfferTypeValues() []DatabaseAccountOfferType { + return []DatabaseAccountOfferType{Standard} +} + +// 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" +) + +// PossibleDataTypeValues returns an array of possible values for the DataType const type. +func PossibleDataTypeValues() []DataType { + return []DataType{LineString, MultiPolygon, Number, Point, Polygon, String} +} + +// 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" +) + +// PossibleDefaultConsistencyLevelValues returns an array of possible values for the DefaultConsistencyLevel const type. +func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel { + return []DefaultConsistencyLevel{BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong} +} + +// IndexingMode enumerates the values for indexing mode. +type IndexingMode string + +const ( + // Consistent ... + Consistent IndexingMode = "Consistent" + // Lazy ... + Lazy IndexingMode = "Lazy" + // None ... + None IndexingMode = "None" +) + +// PossibleIndexingModeValues returns an array of possible values for the IndexingMode const type. +func PossibleIndexingModeValues() []IndexingMode { + return []IndexingMode{Consistent, Lazy, None} +} + +// IndexKind enumerates the values for index kind. +type IndexKind string + +const ( + // Hash ... + Hash IndexKind = "Hash" + // Range ... + Range IndexKind = "Range" + // Spatial ... + Spatial IndexKind = "Spatial" +) + +// PossibleIndexKindValues returns an array of possible values for the IndexKind const type. +func PossibleIndexKindValues() []IndexKind { + return []IndexKind{Hash, Range, Spatial} +} + +// 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" +) + +// PossibleKeyKindValues returns an array of possible values for the KeyKind const type. +func PossibleKeyKindValues() []KeyKind { + return []KeyKind{Primary, PrimaryReadonly, Secondary, SecondaryReadonly} +} + +// PartitionKind enumerates the values for partition kind. +type PartitionKind string + +const ( + // PartitionKindHash ... + PartitionKindHash PartitionKind = "Hash" + // PartitionKindRange ... + PartitionKindRange PartitionKind = "Range" +) + +// PossiblePartitionKindValues returns an array of possible values for the PartitionKind const type. +func PossiblePartitionKindValues() []PartitionKind { + return []PartitionKind{PartitionKindHash, PartitionKindRange} +} + +// PrimaryAggregationType enumerates the values for primary aggregation type. +type PrimaryAggregationType string + +const ( + // PrimaryAggregationTypeAverage ... + PrimaryAggregationTypeAverage PrimaryAggregationType = "Average" + // PrimaryAggregationTypeLast ... + PrimaryAggregationTypeLast PrimaryAggregationType = "Last" + // PrimaryAggregationTypeMaximum ... + PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum" + // PrimaryAggregationTypeMinimum ... + PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum" + // PrimaryAggregationTypeNone ... + PrimaryAggregationTypeNone PrimaryAggregationType = "None" + // PrimaryAggregationTypeTotal ... + PrimaryAggregationTypeTotal PrimaryAggregationType = "Total" +) + +// PossiblePrimaryAggregationTypeValues returns an array of possible values for the PrimaryAggregationType const type. +func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { + return []PrimaryAggregationType{PrimaryAggregationTypeAverage, PrimaryAggregationTypeLast, PrimaryAggregationTypeMaximum, PrimaryAggregationTypeMinimum, PrimaryAggregationTypeNone, PrimaryAggregationTypeTotal} +} + +// SpatialType enumerates the values for spatial type. +type SpatialType string + +const ( + // SpatialTypeLineString ... + SpatialTypeLineString SpatialType = "LineString" + // SpatialTypeMultiPolygon ... + SpatialTypeMultiPolygon SpatialType = "MultiPolygon" + // SpatialTypePoint ... + SpatialTypePoint SpatialType = "Point" + // SpatialTypePolygon ... + SpatialTypePolygon SpatialType = "Polygon" +) + +// PossibleSpatialTypeValues returns an array of possible values for the SpatialType const type. +func PossibleSpatialTypeValues() []SpatialType { + return []SpatialType{SpatialTypeLineString, SpatialTypeMultiPolygon, SpatialTypePoint, SpatialTypePolygon} +} + +// TriggerOperation enumerates the values for trigger operation. +type TriggerOperation string + +const ( + // All ... + All TriggerOperation = "All" + // Create ... + Create TriggerOperation = "Create" + // Delete ... + Delete TriggerOperation = "Delete" + // Replace ... + Replace TriggerOperation = "Replace" + // Update ... + Update TriggerOperation = "Update" +) + +// PossibleTriggerOperationValues returns an array of possible values for the TriggerOperation const type. +func PossibleTriggerOperationValues() []TriggerOperation { + return []TriggerOperation{All, Create, Delete, Replace, Update} +} + +// TriggerType enumerates the values for trigger type. +type TriggerType string + +const ( + // Post ... + Post TriggerType = "Post" + // Pre ... + Pre TriggerType = "Pre" +) + +// PossibleTriggerTypeValues returns an array of possible values for the TriggerType const type. +func PossibleTriggerTypeValues() []TriggerType { + return []TriggerType{Post, Pre} +} + +// UnitType enumerates the values for unit 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" +) + +// PossibleUnitTypeValues returns an array of possible values for the UnitType const type. +func PossibleUnitTypeValues() []UnitType { + return []UnitType{Bytes, BytesPerSecond, Count, CountPerSecond, Milliseconds, Percent, Seconds} +} + +// ARMProxyResource the resource model definition for a ARM proxy resource. It will have everything other +// than required location and tags +type ARMProxyResource struct { + // 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"` +} + +// ARMResourceProperties the core properties of ARM resources. +type ARMResourceProperties struct { + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ARMResourceProperties. +func (arp ARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if arp.Location != nil { + objectMap["location"] = arp.Location + } + if arp.Tags != nil { + objectMap["tags"] = arp.Tags + } + return json.Marshal(objectMap) +} + +// AzureEntityResource the resource model definition for a 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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// Capability cosmos DB capability object +type Capability struct { + // Name - Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin". + Name *string `json:"name,omitempty"` +} + +// CassandraKeyspaceCreateUpdateParameters parameters to create and update Cosmos DB Cassandra keyspace. +type CassandraKeyspaceCreateUpdateParameters struct { + // CassandraKeyspaceCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra keyspace. + *CassandraKeyspaceCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CassandraKeyspaceCreateUpdateParameters. +func (ckcup CassandraKeyspaceCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ckcup.CassandraKeyspaceCreateUpdateProperties != nil { + objectMap["properties"] = ckcup.CassandraKeyspaceCreateUpdateProperties + } + if ckcup.Location != nil { + objectMap["location"] = ckcup.Location + } + if ckcup.Tags != nil { + objectMap["tags"] = ckcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceCreateUpdateParameters struct. +func (ckcup *CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 cassandraKeyspaceCreateUpdateProperties CassandraKeyspaceCreateUpdateProperties + err = json.Unmarshal(*v, &cassandraKeyspaceCreateUpdateProperties) + if err != nil { + return err + } + ckcup.CassandraKeyspaceCreateUpdateProperties = &cassandraKeyspaceCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ckcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ckcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ckcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ckcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ckcup.Tags = tags + } + } + } + + return nil +} + +// CassandraKeyspaceCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra +// keyspace. +type CassandraKeyspaceCreateUpdateProperties struct { + // Resource - The standard JSON format of a Cassandra keyspace + Resource *CassandraKeyspaceResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for CassandraKeyspaceCreateUpdateProperties. +func (ckcup CassandraKeyspaceCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ckcup.Resource != nil { + objectMap["resource"] = ckcup.Resource + } + if ckcup.Options != nil { + objectMap["options"] = ckcup.Options + } + return json.Marshal(objectMap) +} + +// CassandraKeyspaceGetProperties the properties of an Azure Cosmos DB Cassandra keyspace +type CassandraKeyspaceGetProperties struct { + Resource *CassandraKeyspaceGetPropertiesResource `json:"resource,omitempty"` +} + +// CassandraKeyspaceGetPropertiesResource ... +type CassandraKeyspaceGetPropertiesResource struct { + // ID - Name of the Cosmos DB Cassandra keyspace + ID *string `json:"id,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// CassandraKeyspaceGetResults an Azure Cosmos DB Cassandra keyspace. +type CassandraKeyspaceGetResults struct { + autorest.Response `json:"-"` + // CassandraKeyspaceGetProperties - The properties of an Azure Cosmos DB Cassandra keyspace + *CassandraKeyspaceGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CassandraKeyspaceGetResults. +func (ckgr CassandraKeyspaceGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ckgr.CassandraKeyspaceGetProperties != nil { + objectMap["properties"] = ckgr.CassandraKeyspaceGetProperties + } + if ckgr.Location != nil { + objectMap["location"] = ckgr.Location + } + if ckgr.Tags != nil { + objectMap["tags"] = ckgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CassandraKeyspaceGetResults struct. +func (ckgr *CassandraKeyspaceGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 cassandraKeyspaceGetProperties CassandraKeyspaceGetProperties + err = json.Unmarshal(*v, &cassandraKeyspaceGetProperties) + if err != nil { + return err + } + ckgr.CassandraKeyspaceGetProperties = &cassandraKeyspaceGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ckgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ckgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ckgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ckgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ckgr.Tags = tags + } + } + } + + return nil +} + +// CassandraKeyspaceListResult the List operation response, that contains the Cassandra keyspaces and their +// properties. +type CassandraKeyspaceListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Cassandra keyspaces and their properties. + Value *[]CassandraKeyspaceGetResults `json:"value,omitempty"` +} + +// CassandraKeyspaceResource cosmos DB Cassandra keyspace resource object +type CassandraKeyspaceResource struct { + // ID - Name of the Cosmos DB Cassandra keyspace + ID *string `json:"id,omitempty"` +} + +// CassandraPartitionKey cosmos DB Cassandra table partition key +type CassandraPartitionKey struct { + // Name - Name of the Cosmos DB Cassandra table partition key + Name *string `json:"name,omitempty"` +} + +// CassandraResourcesCreateUpdateCassandraKeyspaceFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type CassandraResourcesCreateUpdateCassandraKeyspaceFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CassandraResourcesCreateUpdateCassandraKeyspaceFuture) Result(client CassandraResourcesClient) (ckgr CassandraKeyspaceGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ckgr.Response.Response, err = future.GetResult(sender); err == nil && ckgr.Response.Response.StatusCode != http.StatusNoContent { + ckgr, err = client.CreateUpdateCassandraKeyspaceResponder(ckgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraKeyspaceFuture", "Result", ckgr.Response.Response, "Failure responding to request") + } + } + return +} + +// CassandraResourcesCreateUpdateCassandraTableFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type CassandraResourcesCreateUpdateCassandraTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CassandraResourcesCreateUpdateCassandraTableFuture) Result(client CassandraResourcesClient) (ctgr CassandraTableGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesCreateUpdateCassandraTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ctgr.Response.Response, err = future.GetResult(sender); err == nil && ctgr.Response.Response.StatusCode != http.StatusNoContent { + ctgr, err = client.CreateUpdateCassandraTableResponder(ctgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesCreateUpdateCassandraTableFuture", "Result", ctgr.Response.Response, "Failure responding to request") + } + } + return +} + +// CassandraResourcesDeleteCassandraKeyspaceFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type CassandraResourcesDeleteCassandraKeyspaceFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CassandraResourcesDeleteCassandraKeyspaceFuture) Result(client CassandraResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesDeleteCassandraKeyspaceFuture") + return + } + ar.Response = future.Response() + return +} + +// CassandraResourcesDeleteCassandraTableFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type CassandraResourcesDeleteCassandraTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CassandraResourcesDeleteCassandraTableFuture) Result(client CassandraResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesDeleteCassandraTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesDeleteCassandraTableFuture") + return + } + ar.Response = future.Response() + return +} + +// CassandraResourcesUpdateCassandraKeyspaceThroughputFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type CassandraResourcesUpdateCassandraKeyspaceThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CassandraResourcesUpdateCassandraKeyspaceThroughputFuture) Result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateCassandraKeyspaceThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraKeyspaceThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// CassandraResourcesUpdateCassandraTableThroughputFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type CassandraResourcesUpdateCassandraTableThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CassandraResourcesUpdateCassandraTableThroughputFuture) Result(client CassandraResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateCassandraTableThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.CassandraResourcesUpdateCassandraTableThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// CassandraSchema cosmos DB Cassandra table schema +type CassandraSchema struct { + // Columns - List of Cassandra table columns. + Columns *[]Column `json:"columns,omitempty"` + // PartitionKeys - List of partition key. + PartitionKeys *[]CassandraPartitionKey `json:"partitionKeys,omitempty"` + // ClusterKeys - List of cluster key. + ClusterKeys *[]ClusterKey `json:"clusterKeys,omitempty"` +} + +// CassandraTableCreateUpdateParameters parameters to create and update Cosmos DB Cassandra table. +type CassandraTableCreateUpdateParameters struct { + // CassandraTableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Cassandra table. + *CassandraTableCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CassandraTableCreateUpdateParameters. +func (ctcup CassandraTableCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ctcup.CassandraTableCreateUpdateProperties != nil { + objectMap["properties"] = ctcup.CassandraTableCreateUpdateProperties + } + if ctcup.Location != nil { + objectMap["location"] = ctcup.Location + } + if ctcup.Tags != nil { + objectMap["tags"] = ctcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CassandraTableCreateUpdateParameters struct. +func (ctcup *CassandraTableCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 cassandraTableCreateUpdateProperties CassandraTableCreateUpdateProperties + err = json.Unmarshal(*v, &cassandraTableCreateUpdateProperties) + if err != nil { + return err + } + ctcup.CassandraTableCreateUpdateProperties = &cassandraTableCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ctcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ctcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ctcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ctcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ctcup.Tags = tags + } + } + } + + return nil +} + +// CassandraTableCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra table. +type CassandraTableCreateUpdateProperties struct { + // Resource - The standard JSON format of a Cassandra table + Resource *CassandraTableResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for CassandraTableCreateUpdateProperties. +func (ctcup CassandraTableCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ctcup.Resource != nil { + objectMap["resource"] = ctcup.Resource + } + if ctcup.Options != nil { + objectMap["options"] = ctcup.Options + } + return json.Marshal(objectMap) +} + +// CassandraTableGetProperties the properties of an Azure Cosmos DB Cassandra table +type CassandraTableGetProperties struct { + Resource *CassandraTableGetPropertiesResource `json:"resource,omitempty"` +} + +// CassandraTableGetPropertiesResource ... +type CassandraTableGetPropertiesResource struct { + // ID - Name of the Cosmos DB Cassandra table + ID *string `json:"id,omitempty"` + // DefaultTTL - Time to live of the Cosmos DB Cassandra table + DefaultTTL *int32 `json:"defaultTtl,omitempty"` + // Schema - Schema of the Cosmos DB Cassandra table + Schema *CassandraSchema `json:"schema,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// CassandraTableGetResults an Azure Cosmos DB Cassandra table. +type CassandraTableGetResults struct { + autorest.Response `json:"-"` + // CassandraTableGetProperties - The properties of an Azure Cosmos DB Cassandra table + *CassandraTableGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CassandraTableGetResults. +func (ctgr CassandraTableGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ctgr.CassandraTableGetProperties != nil { + objectMap["properties"] = ctgr.CassandraTableGetProperties + } + if ctgr.Location != nil { + objectMap["location"] = ctgr.Location + } + if ctgr.Tags != nil { + objectMap["tags"] = ctgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CassandraTableGetResults struct. +func (ctgr *CassandraTableGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 cassandraTableGetProperties CassandraTableGetProperties + err = json.Unmarshal(*v, &cassandraTableGetProperties) + if err != nil { + return err + } + ctgr.CassandraTableGetProperties = &cassandraTableGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ctgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ctgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ctgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ctgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ctgr.Tags = tags + } + } + } + + return nil +} + +// CassandraTableListResult the List operation response, that contains the Cassandra tables and their +// properties. +type CassandraTableListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Cassandra tables and their properties. + Value *[]CassandraTableGetResults `json:"value,omitempty"` +} + +// CassandraTableResource cosmos DB Cassandra table resource object +type CassandraTableResource struct { + // ID - Name of the Cosmos DB Cassandra table + ID *string `json:"id,omitempty"` + // DefaultTTL - Time to live of the Cosmos DB Cassandra table + DefaultTTL *int32 `json:"defaultTtl,omitempty"` + // Schema - Schema of the Cosmos DB Cassandra table + Schema *CassandraSchema `json:"schema,omitempty"` +} + +// ClusterKey cosmos DB Cassandra table cluster key +type ClusterKey struct { + // Name - Name of the Cosmos DB Cassandra table cluster key + Name *string `json:"name,omitempty"` + // OrderBy - Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and "Desc" + OrderBy *string `json:"orderBy,omitempty"` +} + +// Column cosmos DB Cassandra table column +type Column struct { + // Name - Name of the Cosmos DB Cassandra table column + Name *string `json:"name,omitempty"` + // Type - Type of the Cosmos DB Cassandra table column + Type *string `json:"type,omitempty"` +} + +// CompositePath ... +type CompositePath struct { + // Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) + Path *string `json:"path,omitempty"` + // Order - Sort order for composite paths. Possible values include: 'Ascending', 'Descending' + Order CompositePathSortOrder `json:"order,omitempty"` +} + +// ConflictResolutionPolicy the conflict resolution policy for the container. +type ConflictResolutionPolicy struct { + // Mode - Indicates the conflict resolution mode. Possible values include: 'LastWriterWins', 'Custom' + Mode ConflictResolutionMode `json:"mode,omitempty"` + // ConflictResolutionPath - The conflict resolution path in the case of LastWriterWins mode. + ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty"` + // ConflictResolutionProcedure - The procedure to resolve conflicts in the case of custom mode. + ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty"` +} + +// 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 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"` + // MaxIntervalInSeconds - When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. + MaxIntervalInSeconds *int32 `json:"maxIntervalInSeconds,omitempty"` +} + +// ContainerPartitionKey the configuration of the partition key to be used for partitioning data into +// multiple partitions +type ContainerPartitionKey struct { + // Paths - List of paths using which data within the container can be partitioned + Paths *[]string `json:"paths,omitempty"` + // Kind - Indicates the kind of algorithm used for partitioning. Possible values include: 'PartitionKindHash', 'PartitionKindRange' + Kind PartitionKind `json:"kind,omitempty"` + // Version - Indicates the version of the partition key definition + Version *int32 `json:"version,omitempty"` +} + +// DatabaseAccountConnectionString connection string for the Cosmos DB account +type DatabaseAccountConnectionString struct { + // ConnectionString - READ-ONLY; Value of the connection string + ConnectionString *string `json:"connectionString,omitempty"` + // Description - READ-ONLY; Description of the connection string + Description *string `json:"description,omitempty"` +} + +// DatabaseAccountCreateUpdateParameters parameters to create and update Cosmos DB database accounts. +type DatabaseAccountCreateUpdateParameters struct { + // Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse' + Kind DatabaseAccountKind `json:"kind,omitempty"` + *DatabaseAccountCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for DatabaseAccountCreateUpdateParameters. +func (dacup DatabaseAccountCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dacup.Kind != "" { + objectMap["kind"] = dacup.Kind + } + if dacup.DatabaseAccountCreateUpdateProperties != nil { + objectMap["properties"] = dacup.DatabaseAccountCreateUpdateProperties + } + if dacup.Location != nil { + objectMap["location"] = dacup.Location + } + if dacup.Tags != nil { + objectMap["tags"] = dacup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DatabaseAccountCreateUpdateParameters struct. +func (dacup *DatabaseAccountCreateUpdateParameters) UnmarshalJSON(body []byte) error { + 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 DatabaseAccountKind + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + dacup.Kind = kind + } + case "properties": + if v != nil { + var databaseAccountCreateUpdateProperties DatabaseAccountCreateUpdateProperties + err = json.Unmarshal(*v, &databaseAccountCreateUpdateProperties) + if err != nil { + return err + } + dacup.DatabaseAccountCreateUpdateProperties = &databaseAccountCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dacup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dacup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dacup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dacup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dacup.Tags = tags + } + } + } + + return nil +} + +// DatabaseAccountCreateUpdateProperties properties to create and update Azure Cosmos DB database accounts. +type DatabaseAccountCreateUpdateProperties struct { + // ConsistencyPolicy - The consistency policy for the Cosmos DB account. + ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"` + // Locations - An array that contains the georeplication locations enabled for the Cosmos DB account. + Locations *[]Location `json:"locations,omitempty"` + // DatabaseAccountOfferType - The offer type for the database + DatabaseAccountOfferType *string `json:"databaseAccountOfferType,omitempty"` + // IPRangeFilter - Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. + IPRangeFilter *string `json:"ipRangeFilter,omitempty"` + // IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules. + IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"` + // EnableAutomaticFailover - Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. + EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"` + // Capabilities - List of Cosmos DB capabilities for the account + Capabilities *[]Capability `json:"capabilities,omitempty"` + // VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account. + VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + // EnableMultipleWriteLocations - Enables the account to write in multiple locations + 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 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"` +} + +// DatabaseAccountGetProperties properties for the database account. +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 DatabaseAccountOfferType `json:"databaseAccountOfferType,omitempty"` + // IPRangeFilter - Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. + IPRangeFilter *string `json:"ipRangeFilter,omitempty"` + // IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules. + IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"` + // EnableAutomaticFailover - Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. + EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"` + // ConsistencyPolicy - The consistency policy for the Cosmos DB database account. + ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"` + // Capabilities - List of Cosmos DB capabilities for the account + Capabilities *[]Capability `json:"capabilities,omitempty"` + // WriteLocations - READ-ONLY; An array that contains the write location for the Cosmos DB account. + WriteLocations *[]Location `json:"writeLocations,omitempty"` + // ReadLocations - READ-ONLY; An array that contains of the read locations enabled for the Cosmos DB account. + ReadLocations *[]Location `json:"readLocations,omitempty"` + // Locations - READ-ONLY; An array that contains all of the locations enabled for the Cosmos DB account. + Locations *[]Location `json:"locations,omitempty"` + // FailoverPolicies - READ-ONLY; An array that contains the regions ordered by their failover priorities. + FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"` + // VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account. + VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + // EnableMultipleWriteLocations - Enables the account to write in multiple locations + 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 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"` +} + +// DatabaseAccountGetResults an Azure Cosmos DB database account. +type DatabaseAccountGetResults struct { + autorest.Response `json:"-"` + // Kind - Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse' + Kind DatabaseAccountKind `json:"kind,omitempty"` + *DatabaseAccountGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for DatabaseAccountGetResults. +func (dagr DatabaseAccountGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dagr.Kind != "" { + objectMap["kind"] = dagr.Kind + } + if dagr.DatabaseAccountGetProperties != nil { + objectMap["properties"] = dagr.DatabaseAccountGetProperties + } + if dagr.Location != nil { + objectMap["location"] = dagr.Location + } + if dagr.Tags != nil { + objectMap["tags"] = dagr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DatabaseAccountGetResults struct. +func (dagr *DatabaseAccountGetResults) UnmarshalJSON(body []byte) error { + 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 DatabaseAccountKind + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + dagr.Kind = kind + } + case "properties": + if v != nil { + var databaseAccountGetProperties DatabaseAccountGetProperties + err = json.Unmarshal(*v, &databaseAccountGetProperties) + if err != nil { + return err + } + dagr.DatabaseAccountGetProperties = &databaseAccountGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dagr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dagr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dagr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + dagr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dagr.Tags = tags + } + } + } + + return nil +} + +// DatabaseAccountListConnectionStringsResult the connection strings for the given database account. +type DatabaseAccountListConnectionStringsResult struct { + autorest.Response `json:"-"` + // ConnectionStrings - An array that contains the connection strings for the Cosmos DB account. + ConnectionStrings *[]DatabaseAccountConnectionString `json:"connectionStrings,omitempty"` +} + +// DatabaseAccountListKeysResult the access keys for the given database account. +type DatabaseAccountListKeysResult struct { + autorest.Response `json:"-"` + // PrimaryMasterKey - READ-ONLY; Base 64 encoded value of the primary read-write key. + PrimaryMasterKey *string `json:"primaryMasterKey,omitempty"` + // SecondaryMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-write key. + SecondaryMasterKey *string `json:"secondaryMasterKey,omitempty"` + // PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key. + PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"` + // SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key. + SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"` +} + +// DatabaseAccountListReadOnlyKeysResult the read-only access keys for the given database account. +type DatabaseAccountListReadOnlyKeysResult struct { + autorest.Response `json:"-"` + // PrimaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the primary read-only key. + PrimaryReadonlyMasterKey *string `json:"primaryReadonlyMasterKey,omitempty"` + // SecondaryReadonlyMasterKey - READ-ONLY; Base 64 encoded value of the secondary read-only key. + SecondaryReadonlyMasterKey *string `json:"secondaryReadonlyMasterKey,omitempty"` +} + +// 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 KeyKind `json:"keyKind,omitempty"` +} + +// DatabaseAccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DatabaseAccountsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabaseAccountsCreateOrUpdateFuture) Result(client DatabaseAccountsClient) (dagr DatabaseAccountGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dagr.Response.Response, err = future.GetResult(sender); err == nil && dagr.Response.Response.StatusCode != http.StatusNoContent { + dagr, err = client.CreateOrUpdateResponder(dagr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsCreateOrUpdateFuture", "Result", dagr.Response.Response, "Failure responding to request") + } + } + return +} + +// DatabaseAccountsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DatabaseAccountsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabaseAccountsDeleteFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type DatabaseAccountsFailoverPriorityChangeFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabaseAccountsFailoverPriorityChangeFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsFailoverPriorityChangeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsFailoverPriorityChangeFuture") + return + } + ar.Response = future.Response() + return +} + +// DatabaseAccountsListResult the List operation response, that contains the database accounts and their +// properties. +type DatabaseAccountsListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of database account and their properties. + Value *[]DatabaseAccountGetResults `json:"value,omitempty"` +} + +// DatabaseAccountsOfflineRegionFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DatabaseAccountsOfflineRegionFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabaseAccountsOfflineRegionFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOfflineRegionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOfflineRegionFuture") + return + } + ar.Response = future.Response() + return +} + +// DatabaseAccountsOnlineRegionFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DatabaseAccountsOnlineRegionFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabaseAccountsOnlineRegionFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsOnlineRegionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsOnlineRegionFuture") + return + } + ar.Response = future.Response() + return +} + +// DatabaseAccountsRegenerateKeyFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DatabaseAccountsRegenerateKeyFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabaseAccountsRegenerateKeyFuture) Result(client DatabaseAccountsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsRegenerateKeyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsRegenerateKeyFuture") + return + } + ar.Response = future.Response() + return +} + +// DatabaseAccountsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DatabaseAccountsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabaseAccountsUpdateFuture) Result(client DatabaseAccountsClient) (dagr DatabaseAccountGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.DatabaseAccountsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dagr.Response.Response, err = future.GetResult(sender); err == nil && dagr.Response.Response.StatusCode != http.StatusNoContent { + dagr, err = client.UpdateResponder(dagr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsUpdateFuture", "Result", dagr.Response.Response, "Failure responding to request") + } + } + return +} + +// DatabaseAccountUpdateParameters parameters for patching Azure Cosmos DB database account properties. +type DatabaseAccountUpdateParameters struct { + Tags map[string]*string `json:"tags"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + *DatabaseAccountUpdateProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for DatabaseAccountUpdateParameters. +func (daup DatabaseAccountUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if daup.Tags != nil { + objectMap["tags"] = daup.Tags + } + if daup.Location != nil { + objectMap["location"] = daup.Location + } + if daup.DatabaseAccountUpdateProperties != nil { + objectMap["properties"] = daup.DatabaseAccountUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DatabaseAccountUpdateParameters struct. +func (daup *DatabaseAccountUpdateParameters) UnmarshalJSON(body []byte) error { + 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 + } + daup.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + daup.Location = &location + } + case "properties": + if v != nil { + var databaseAccountUpdateProperties DatabaseAccountUpdateProperties + err = json.Unmarshal(*v, &databaseAccountUpdateProperties) + if err != nil { + return err + } + daup.DatabaseAccountUpdateProperties = &databaseAccountUpdateProperties + } + } + } + + return nil +} + +// DatabaseAccountUpdateProperties properties to update Azure Cosmos DB database accounts. +type DatabaseAccountUpdateProperties struct { + // ConsistencyPolicy - The consistency policy for the Cosmos DB account. + ConsistencyPolicy *ConsistencyPolicy `json:"consistencyPolicy,omitempty"` + // Locations - An array that contains the georeplication locations enabled for the Cosmos DB account. + Locations *[]Location `json:"locations,omitempty"` + // IPRangeFilter - Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. + IPRangeFilter *string `json:"ipRangeFilter,omitempty"` + // IsVirtualNetworkFilterEnabled - Flag to indicate whether to enable/disable Virtual Network ACL rules. + IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"` + // EnableAutomaticFailover - Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. + EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"` + // Capabilities - List of Cosmos DB capabilities for the account + Capabilities *[]Capability `json:"capabilities,omitempty"` + // VirtualNetworkRules - List of Virtual Network ACL rules configured for the Cosmos DB account. + VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + // EnableMultipleWriteLocations - Enables the account to write in multiple locations + 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 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"` +} + +// ErrorResponse error Response. +type ErrorResponse struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Message - Error message indicating why the operation failed. + Message *string `json:"message,omitempty"` +} + +// ExcludedPath ... +type ExcludedPath 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"` +} + +// ExtendedResourceProperties the system generated resource properties associated with SQL databases, SQL +// containers, Gremlin databases and Gremlin graphs. +type ExtendedResourceProperties struct { + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// FailoverPolicies the list of new failover policies for the failover priority change. +type FailoverPolicies struct { + // FailoverPolicies - List of failover policies. + FailoverPolicies *[]FailoverPolicy `json:"failoverPolicies,omitempty"` +} + +// FailoverPolicy the failover policy for a given region of a database account. +type FailoverPolicy struct { + // ID - READ-ONLY; The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>. + ID *string `json:"id,omitempty"` + // LocationName - The name of the region in which the database account exists. + LocationName *string `json:"locationName,omitempty"` + // FailoverPriority - The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. + FailoverPriority *int32 `json:"failoverPriority,omitempty"` +} + +// GremlinDatabaseCreateUpdateParameters parameters to create and update Cosmos DB Gremlin database. +type GremlinDatabaseCreateUpdateParameters struct { + // GremlinDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin database. + *GremlinDatabaseCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GremlinDatabaseCreateUpdateParameters. +func (gdcup GremlinDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gdcup.GremlinDatabaseCreateUpdateProperties != nil { + objectMap["properties"] = gdcup.GremlinDatabaseCreateUpdateProperties + } + if gdcup.Location != nil { + objectMap["location"] = gdcup.Location + } + if gdcup.Tags != nil { + objectMap["tags"] = gdcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GremlinDatabaseCreateUpdateParameters struct. +func (gdcup *GremlinDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 gremlinDatabaseCreateUpdateProperties GremlinDatabaseCreateUpdateProperties + err = json.Unmarshal(*v, &gremlinDatabaseCreateUpdateProperties) + if err != nil { + return err + } + gdcup.GremlinDatabaseCreateUpdateProperties = &gremlinDatabaseCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gdcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gdcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gdcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + gdcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gdcup.Tags = tags + } + } + } + + return nil +} + +// GremlinDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin database. +type GremlinDatabaseCreateUpdateProperties struct { + // Resource - The standard JSON format of a Gremlin database + Resource *GremlinDatabaseResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for GremlinDatabaseCreateUpdateProperties. +func (gdcup GremlinDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gdcup.Resource != nil { + objectMap["resource"] = gdcup.Resource + } + if gdcup.Options != nil { + objectMap["options"] = gdcup.Options + } + return json.Marshal(objectMap) +} + +// GremlinDatabaseGetProperties the properties of an Azure Cosmos DB SQL database +type GremlinDatabaseGetProperties struct { + Resource *GremlinDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// GremlinDatabaseGetPropertiesResource ... +type GremlinDatabaseGetPropertiesResource struct { + // ID - Name of the Cosmos DB Gremlin database + ID *string `json:"id,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// GremlinDatabaseGetResults an Azure Cosmos DB Gremlin database. +type GremlinDatabaseGetResults struct { + autorest.Response `json:"-"` + // GremlinDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database + *GremlinDatabaseGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GremlinDatabaseGetResults. +func (gdgr GremlinDatabaseGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gdgr.GremlinDatabaseGetProperties != nil { + objectMap["properties"] = gdgr.GremlinDatabaseGetProperties + } + if gdgr.Location != nil { + objectMap["location"] = gdgr.Location + } + if gdgr.Tags != nil { + objectMap["tags"] = gdgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GremlinDatabaseGetResults struct. +func (gdgr *GremlinDatabaseGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 gremlinDatabaseGetProperties GremlinDatabaseGetProperties + err = json.Unmarshal(*v, &gremlinDatabaseGetProperties) + if err != nil { + return err + } + gdgr.GremlinDatabaseGetProperties = &gremlinDatabaseGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gdgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gdgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gdgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + gdgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gdgr.Tags = tags + } + } + } + + return nil +} + +// GremlinDatabaseListResult the List operation response, that contains the Gremlin databases and their +// properties. +type GremlinDatabaseListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Gremlin databases and their properties. + Value *[]GremlinDatabaseGetResults `json:"value,omitempty"` +} + +// GremlinDatabaseResource cosmos DB Gremlin database resource object +type GremlinDatabaseResource struct { + // ID - Name of the Cosmos DB Gremlin database + ID *string `json:"id,omitempty"` +} + +// GremlinGraphCreateUpdateParameters parameters to create and update Cosmos DB Gremlin graph. +type GremlinGraphCreateUpdateParameters struct { + // GremlinGraphCreateUpdateProperties - Properties to create and update Azure Cosmos DB Gremlin graph. + *GremlinGraphCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GremlinGraphCreateUpdateParameters. +func (ggcup GremlinGraphCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ggcup.GremlinGraphCreateUpdateProperties != nil { + objectMap["properties"] = ggcup.GremlinGraphCreateUpdateProperties + } + if ggcup.Location != nil { + objectMap["location"] = ggcup.Location + } + if ggcup.Tags != nil { + objectMap["tags"] = ggcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GremlinGraphCreateUpdateParameters struct. +func (ggcup *GremlinGraphCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 gremlinGraphCreateUpdateProperties GremlinGraphCreateUpdateProperties + err = json.Unmarshal(*v, &gremlinGraphCreateUpdateProperties) + if err != nil { + return err + } + ggcup.GremlinGraphCreateUpdateProperties = &gremlinGraphCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ggcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ggcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ggcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ggcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ggcup.Tags = tags + } + } + } + + return nil +} + +// GremlinGraphCreateUpdateProperties properties to create and update Azure Cosmos DB Gremlin graph. +type GremlinGraphCreateUpdateProperties struct { + // Resource - The standard JSON format of a Gremlin graph + Resource *GremlinGraphResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for GremlinGraphCreateUpdateProperties. +func (ggcup GremlinGraphCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ggcup.Resource != nil { + objectMap["resource"] = ggcup.Resource + } + if ggcup.Options != nil { + objectMap["options"] = ggcup.Options + } + return json.Marshal(objectMap) +} + +// GremlinGraphGetProperties the properties of an Azure Cosmos DB Gremlin graph +type GremlinGraphGetProperties struct { + Resource *GremlinGraphGetPropertiesResource `json:"resource,omitempty"` +} + +// GremlinGraphGetPropertiesResource ... +type GremlinGraphGetPropertiesResource struct { + // ID - Name of the Cosmos DB Gremlin graph + ID *string `json:"id,omitempty"` + // IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph + IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` + // PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions + PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` + // DefaultTTL - Default time to live + DefaultTTL *int32 `json:"defaultTtl,omitempty"` + // UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. + UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` + // ConflictResolutionPolicy - The conflict resolution policy for the graph. + ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// GremlinGraphGetResults an Azure Cosmos DB Gremlin graph. +type GremlinGraphGetResults struct { + autorest.Response `json:"-"` + // GremlinGraphGetProperties - The properties of an Azure Cosmos DB Gremlin graph + *GremlinGraphGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GremlinGraphGetResults. +func (gggr GremlinGraphGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gggr.GremlinGraphGetProperties != nil { + objectMap["properties"] = gggr.GremlinGraphGetProperties + } + if gggr.Location != nil { + objectMap["location"] = gggr.Location + } + if gggr.Tags != nil { + objectMap["tags"] = gggr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GremlinGraphGetResults struct. +func (gggr *GremlinGraphGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 gremlinGraphGetProperties GremlinGraphGetProperties + err = json.Unmarshal(*v, &gremlinGraphGetProperties) + if err != nil { + return err + } + gggr.GremlinGraphGetProperties = &gremlinGraphGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gggr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gggr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gggr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + gggr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gggr.Tags = tags + } + } + } + + return nil +} + +// GremlinGraphListResult the List operation response, that contains the graphs and their properties. +type GremlinGraphListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of graphs and their properties. + Value *[]GremlinGraphGetResults `json:"value,omitempty"` +} + +// GremlinGraphResource cosmos DB Gremlin graph resource object +type GremlinGraphResource struct { + // ID - Name of the Cosmos DB Gremlin graph + ID *string `json:"id,omitempty"` + // IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph + IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` + // PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions + PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` + // DefaultTTL - Default time to live + DefaultTTL *int32 `json:"defaultTtl,omitempty"` + // UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. + UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` + // ConflictResolutionPolicy - The conflict resolution policy for the graph. + ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` +} + +// GremlinResourcesCreateUpdateGremlinDatabaseFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type GremlinResourcesCreateUpdateGremlinDatabaseFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GremlinResourcesCreateUpdateGremlinDatabaseFuture) Result(client GremlinResourcesClient) (gdgr GremlinDatabaseGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gdgr.Response.Response, err = future.GetResult(sender); err == nil && gdgr.Response.Response.StatusCode != http.StatusNoContent { + gdgr, err = client.CreateUpdateGremlinDatabaseResponder(gdgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinDatabaseFuture", "Result", gdgr.Response.Response, "Failure responding to request") + } + } + return +} + +// GremlinResourcesCreateUpdateGremlinGraphFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type GremlinResourcesCreateUpdateGremlinGraphFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GremlinResourcesCreateUpdateGremlinGraphFuture) Result(client GremlinResourcesClient) (gggr GremlinGraphGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gggr.Response.Response, err = future.GetResult(sender); err == nil && gggr.Response.Response.StatusCode != http.StatusNoContent { + gggr, err = client.CreateUpdateGremlinGraphResponder(gggr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesCreateUpdateGremlinGraphFuture", "Result", gggr.Response.Response, "Failure responding to request") + } + } + return +} + +// GremlinResourcesDeleteGremlinDatabaseFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type GremlinResourcesDeleteGremlinDatabaseFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GremlinResourcesDeleteGremlinDatabaseFuture) Result(client GremlinResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesDeleteGremlinDatabaseFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesDeleteGremlinDatabaseFuture") + return + } + ar.Response = future.Response() + return +} + +// GremlinResourcesDeleteGremlinGraphFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GremlinResourcesDeleteGremlinGraphFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GremlinResourcesDeleteGremlinGraphFuture) Result(client GremlinResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesDeleteGremlinGraphFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesDeleteGremlinGraphFuture") + return + } + ar.Response = future.Response() + return +} + +// GremlinResourcesUpdateGremlinDatabaseThroughputFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type GremlinResourcesUpdateGremlinDatabaseThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GremlinResourcesUpdateGremlinDatabaseThroughputFuture) Result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateGremlinDatabaseThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// GremlinResourcesUpdateGremlinGraphThroughputFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type GremlinResourcesUpdateGremlinGraphThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GremlinResourcesUpdateGremlinGraphThroughputFuture) Result(client GremlinResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateGremlinGraphThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.GremlinResourcesUpdateGremlinGraphThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// IncludedPath the paths that are included in indexing +type IncludedPath 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"` + // Indexes - List of indexes for this path + Indexes *[]Indexes `json:"indexes,omitempty"` +} + +// 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 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 IndexKind `json:"kind,omitempty"` +} + +// IndexingPolicy cosmos DB indexing policy +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 IndexingMode `json:"indexingMode,omitempty"` + // IncludedPaths - List of paths to include in the indexing + IncludedPaths *[]IncludedPath `json:"includedPaths,omitempty"` + // ExcludedPaths - List of paths to exclude from indexing + ExcludedPaths *[]ExcludedPath `json:"excludedPaths,omitempty"` + // CompositeIndexes - List of composite path list + CompositeIndexes *[][]CompositePath `json:"compositeIndexes,omitempty"` + // SpatialIndexes - List of spatial specifics + SpatialIndexes *[]SpatialSpec `json:"spatialIndexes,omitempty"` +} + +// Location a region in which the Azure Cosmos DB database account is deployed. +type Location struct { + // ID - READ-ONLY; The unique identifier of the region within the database account. Example: <accountName>-<locationName>. + ID *string `json:"id,omitempty"` + // LocationName - The name of the region. + LocationName *string `json:"locationName,omitempty"` + // DocumentEndpoint - READ-ONLY; The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/ + DocumentEndpoint *string `json:"documentEndpoint,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + // FailoverPriority - The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. + FailoverPriority *int32 `json:"failoverPriority,omitempty"` + // IsZoneRedundant - Flag to indicate whether or not this region is an AvailabilityZone region + IsZoneRedundant *bool `json:"isZoneRedundant,omitempty"` +} + +// Metric metric data +type Metric struct { + // StartTime - READ-ONLY; The start time for the metric (ISO-8601 format). + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; The end time for the metric (ISO-8601 format). + 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 UnitType `json:"unit,omitempty"` + // Name - READ-ONLY; The name information for the metric. + Name *MetricName `json:"name,omitempty"` + // MetricValues - READ-ONLY; The metric values for the specified time window and timestep. + MetricValues *[]MetricValue `json:"metricValues,omitempty"` +} + +// MetricAvailability the availability of the metric. +type MetricAvailability struct { + // TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values. + TimeGrain *string `json:"timeGrain,omitempty"` + // Retention - READ-ONLY; The retention for the metric values. + Retention *string `json:"retention,omitempty"` +} + +// MetricDefinition the definition of a metric. +type MetricDefinition struct { + // MetricAvailabilities - READ-ONLY; The list of metric availabilities for the account. + 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 UnitType `json:"unit,omitempty"` + // ResourceURI - READ-ONLY; The resource uri of the database. + ResourceURI *string `json:"resourceUri,omitempty"` + // Name - READ-ONLY; The name information for the metric. + Name *MetricName `json:"name,omitempty"` +} + +// MetricDefinitionsListResult the response to a list metric definitions request. +type MetricDefinitionsListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of metric definitions for the account. + Value *[]MetricDefinition `json:"value,omitempty"` +} + +// MetricListResult the response to a list metrics request. +type MetricListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of metrics for the account. + Value *[]Metric `json:"value,omitempty"` +} + +// MetricName a metric name. +type MetricName struct { + // Value - READ-ONLY; The name of the metric. + Value *string `json:"value,omitempty"` + // LocalizedValue - READ-ONLY; The friendly name of the metric. + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// MetricValue represents metrics values. +type MetricValue struct { + // Count - READ-ONLY; The number of values for the metric. + Count *float64 `json:"_count,omitempty"` + // Average - READ-ONLY; The average value of the metric. + Average *float64 `json:"average,omitempty"` + // Maximum - READ-ONLY; The max value of the metric. + Maximum *float64 `json:"maximum,omitempty"` + // Minimum - READ-ONLY; The min value of the metric. + Minimum *float64 `json:"minimum,omitempty"` + // Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format). + Timestamp *date.Time `json:"timestamp,omitempty"` + // Total - READ-ONLY; The total value of the metric. + Total *float64 `json:"total,omitempty"` +} + +// MongoDBCollectionCreateUpdateParameters parameters to create and update Cosmos DB MongoDB collection. +type MongoDBCollectionCreateUpdateParameters struct { + // MongoDBCollectionCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB collection. + *MongoDBCollectionCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for MongoDBCollectionCreateUpdateParameters. +func (mdccup MongoDBCollectionCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mdccup.MongoDBCollectionCreateUpdateProperties != nil { + objectMap["properties"] = mdccup.MongoDBCollectionCreateUpdateProperties + } + if mdccup.Location != nil { + objectMap["location"] = mdccup.Location + } + if mdccup.Tags != nil { + objectMap["tags"] = mdccup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MongoDBCollectionCreateUpdateParameters struct. +func (mdccup *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 mongoDBCollectionCreateUpdateProperties MongoDBCollectionCreateUpdateProperties + err = json.Unmarshal(*v, &mongoDBCollectionCreateUpdateProperties) + if err != nil { + return err + } + mdccup.MongoDBCollectionCreateUpdateProperties = &mongoDBCollectionCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mdccup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mdccup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mdccup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mdccup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mdccup.Tags = tags + } + } + } + + return nil +} + +// MongoDBCollectionCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB +// collection. +type MongoDBCollectionCreateUpdateProperties struct { + // Resource - The standard JSON format of a MongoDB collection + Resource *MongoDBCollectionResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for MongoDBCollectionCreateUpdateProperties. +func (mdccup MongoDBCollectionCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mdccup.Resource != nil { + objectMap["resource"] = mdccup.Resource + } + if mdccup.Options != nil { + objectMap["options"] = mdccup.Options + } + return json.Marshal(objectMap) +} + +// MongoDBCollectionGetProperties the properties of an Azure Cosmos DB MongoDB collection +type MongoDBCollectionGetProperties struct { + Resource *MongoDBCollectionGetPropertiesResource `json:"resource,omitempty"` +} + +// MongoDBCollectionGetPropertiesResource ... +type MongoDBCollectionGetPropertiesResource struct { + // ID - Name of the Cosmos DB MongoDB collection + ID *string `json:"id,omitempty"` + // ShardKey - A key-value pair of shard keys to be applied for the request. + ShardKey map[string]*string `json:"shardKey"` + // Indexes - List of index keys + Indexes *[]MongoIndex `json:"indexes,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for MongoDBCollectionGetPropertiesResource. +func (mdcgp MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mdcgp.ID != nil { + objectMap["id"] = mdcgp.ID + } + if mdcgp.ShardKey != nil { + objectMap["shardKey"] = mdcgp.ShardKey + } + if mdcgp.Indexes != nil { + objectMap["indexes"] = mdcgp.Indexes + } + return json.Marshal(objectMap) +} + +// MongoDBCollectionGetResults an Azure Cosmos DB MongoDB collection. +type MongoDBCollectionGetResults struct { + autorest.Response `json:"-"` + // MongoDBCollectionGetProperties - The properties of an Azure Cosmos DB MongoDB collection + *MongoDBCollectionGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for MongoDBCollectionGetResults. +func (mdcgr MongoDBCollectionGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mdcgr.MongoDBCollectionGetProperties != nil { + objectMap["properties"] = mdcgr.MongoDBCollectionGetProperties + } + if mdcgr.Location != nil { + objectMap["location"] = mdcgr.Location + } + if mdcgr.Tags != nil { + objectMap["tags"] = mdcgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MongoDBCollectionGetResults struct. +func (mdcgr *MongoDBCollectionGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 mongoDBCollectionGetProperties MongoDBCollectionGetProperties + err = json.Unmarshal(*v, &mongoDBCollectionGetProperties) + if err != nil { + return err + } + mdcgr.MongoDBCollectionGetProperties = &mongoDBCollectionGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mdcgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mdcgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mdcgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mdcgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mdcgr.Tags = tags + } + } + } + + return nil +} + +// MongoDBCollectionListResult the List operation response, that contains the MongoDB collections and their +// properties. +type MongoDBCollectionListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of MongoDB collections and their properties. + Value *[]MongoDBCollectionGetResults `json:"value,omitempty"` +} + +// MongoDBCollectionResource cosmos DB MongoDB collection resource object +type MongoDBCollectionResource struct { + // ID - Name of the Cosmos DB MongoDB collection + ID *string `json:"id,omitempty"` + // ShardKey - A key-value pair of shard keys to be applied for the request. + ShardKey map[string]*string `json:"shardKey"` + // Indexes - List of index keys + Indexes *[]MongoIndex `json:"indexes,omitempty"` +} + +// MarshalJSON is the custom marshaler for MongoDBCollectionResource. +func (mdcr MongoDBCollectionResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mdcr.ID != nil { + objectMap["id"] = mdcr.ID + } + if mdcr.ShardKey != nil { + objectMap["shardKey"] = mdcr.ShardKey + } + if mdcr.Indexes != nil { + objectMap["indexes"] = mdcr.Indexes + } + return json.Marshal(objectMap) +} + +// MongoDBDatabaseCreateUpdateParameters parameters to create and update Cosmos DB MongoDB database. +type MongoDBDatabaseCreateUpdateParameters struct { + // MongoDBDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB MongoDB database. + *MongoDBDatabaseCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for MongoDBDatabaseCreateUpdateParameters. +func (mddcup MongoDBDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mddcup.MongoDBDatabaseCreateUpdateProperties != nil { + objectMap["properties"] = mddcup.MongoDBDatabaseCreateUpdateProperties + } + if mddcup.Location != nil { + objectMap["location"] = mddcup.Location + } + if mddcup.Tags != nil { + objectMap["tags"] = mddcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseCreateUpdateParameters struct. +func (mddcup *MongoDBDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 mongoDBDatabaseCreateUpdateProperties MongoDBDatabaseCreateUpdateProperties + err = json.Unmarshal(*v, &mongoDBDatabaseCreateUpdateProperties) + if err != nil { + return err + } + mddcup.MongoDBDatabaseCreateUpdateProperties = &mongoDBDatabaseCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mddcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mddcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mddcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mddcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mddcup.Tags = tags + } + } + } + + return nil +} + +// MongoDBDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB database. +type MongoDBDatabaseCreateUpdateProperties struct { + // Resource - The standard JSON format of a MongoDB database + Resource *MongoDBDatabaseResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for MongoDBDatabaseCreateUpdateProperties. +func (mddcup MongoDBDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mddcup.Resource != nil { + objectMap["resource"] = mddcup.Resource + } + if mddcup.Options != nil { + objectMap["options"] = mddcup.Options + } + return json.Marshal(objectMap) +} + +// MongoDBDatabaseGetProperties the properties of an Azure Cosmos DB MongoDB database +type MongoDBDatabaseGetProperties struct { + Resource *MongoDBDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// MongoDBDatabaseGetPropertiesResource ... +type MongoDBDatabaseGetPropertiesResource struct { + // ID - Name of the Cosmos DB MongoDB database + ID *string `json:"id,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// MongoDBDatabaseGetResults an Azure Cosmos DB MongoDB database. +type MongoDBDatabaseGetResults struct { + autorest.Response `json:"-"` + // MongoDBDatabaseGetProperties - The properties of an Azure Cosmos DB MongoDB database + *MongoDBDatabaseGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for MongoDBDatabaseGetResults. +func (mddgr MongoDBDatabaseGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mddgr.MongoDBDatabaseGetProperties != nil { + objectMap["properties"] = mddgr.MongoDBDatabaseGetProperties + } + if mddgr.Location != nil { + objectMap["location"] = mddgr.Location + } + if mddgr.Tags != nil { + objectMap["tags"] = mddgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MongoDBDatabaseGetResults struct. +func (mddgr *MongoDBDatabaseGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 mongoDBDatabaseGetProperties MongoDBDatabaseGetProperties + err = json.Unmarshal(*v, &mongoDBDatabaseGetProperties) + if err != nil { + return err + } + mddgr.MongoDBDatabaseGetProperties = &mongoDBDatabaseGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mddgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mddgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mddgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mddgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mddgr.Tags = tags + } + } + } + + return nil +} + +// MongoDBDatabaseListResult the List operation response, that contains the MongoDB databases and their +// properties. +type MongoDBDatabaseListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of MongoDB databases and their properties. + Value *[]MongoDBDatabaseGetResults `json:"value,omitempty"` +} + +// MongoDBDatabaseResource cosmos DB MongoDB database resource object +type MongoDBDatabaseResource struct { + // ID - Name of the Cosmos DB MongoDB database + ID *string `json:"id,omitempty"` +} + +// MongoDBResourcesCreateUpdateMongoDBCollectionFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type MongoDBResourcesCreateUpdateMongoDBCollectionFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MongoDBResourcesCreateUpdateMongoDBCollectionFuture) Result(client MongoDBResourcesClient) (mdcgr MongoDBCollectionGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mdcgr.Response.Response, err = future.GetResult(sender); err == nil && mdcgr.Response.Response.StatusCode != http.StatusNoContent { + mdcgr, err = client.CreateUpdateMongoDBCollectionResponder(mdcgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBCollectionFuture", "Result", mdcgr.Response.Response, "Failure responding to request") + } + } + return +} + +// MongoDBResourcesCreateUpdateMongoDBDatabaseFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type MongoDBResourcesCreateUpdateMongoDBDatabaseFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MongoDBResourcesCreateUpdateMongoDBDatabaseFuture) Result(client MongoDBResourcesClient) (mddgr MongoDBDatabaseGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mddgr.Response.Response, err = future.GetResult(sender); err == nil && mddgr.Response.Response.StatusCode != http.StatusNoContent { + mddgr, err = client.CreateUpdateMongoDBDatabaseResponder(mddgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesCreateUpdateMongoDBDatabaseFuture", "Result", mddgr.Response.Response, "Failure responding to request") + } + } + return +} + +// MongoDBResourcesDeleteMongoDBCollectionFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type MongoDBResourcesDeleteMongoDBCollectionFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MongoDBResourcesDeleteMongoDBCollectionFuture) Result(client MongoDBResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoDBCollectionFuture") + return + } + ar.Response = future.Response() + return +} + +// MongoDBResourcesDeleteMongoDBDatabaseFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type MongoDBResourcesDeleteMongoDBDatabaseFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MongoDBResourcesDeleteMongoDBDatabaseFuture) Result(client MongoDBResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesDeleteMongoDBDatabaseFuture") + return + } + ar.Response = future.Response() + return +} + +// MongoDBResourcesUpdateMongoDBCollectionThroughputFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type MongoDBResourcesUpdateMongoDBCollectionThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MongoDBResourcesUpdateMongoDBCollectionThroughputFuture) Result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateMongoDBCollectionThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBCollectionThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture) Result(client MongoDBResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateMongoDBDatabaseThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// MongoIndex cosmos DB MongoDB collection index key +type MongoIndex struct { + // Key - Cosmos DB MongoDB collection index keys + Key *MongoIndexKeys `json:"key,omitempty"` + // Options - Cosmos DB MongoDB collection index key options + Options *MongoIndexOptions `json:"options,omitempty"` +} + +// MongoIndexKeys cosmos DB MongoDB collection resource object +type MongoIndexKeys struct { + // Keys - List of keys for each MongoDB collection in the Azure Cosmos DB service + Keys *[]string `json:"keys,omitempty"` +} + +// MongoIndexOptions cosmos DB MongoDB collection index options +type MongoIndexOptions struct { + // ExpireAfterSeconds - Expire after seconds + ExpireAfterSeconds *int32 `json:"expireAfterSeconds,omitempty"` + // Unique - Is unique or not + Unique *bool `json:"unique,omitempty"` +} + +// Operation REST API operation +type Operation struct { + // Name - Operation name: {provider}/{resource}/{operation} + Name *string `json:"name,omitempty"` + // Display - The object that represents the operation. + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay the object that represents the operation. +type OperationDisplay struct { + // Provider - Service provider: Microsoft.ResourceProvider + Provider *string `json:"Provider,omitempty"` + // Resource - Resource on which the operation is performed: Profile, endpoint, etc. + Resource *string `json:"Resource,omitempty"` + // Operation - Operation type: Read, write, delete, etc. + Operation *string `json:"Operation,omitempty"` + // Description - Description of operation + Description *string `json:"Description,omitempty"` +} + +// OperationListResult result of the request to list Resource Provider 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 operations supported by the 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 +} + +// operationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(olr.NextLink))) +} + +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(context.Context, OperationListResult) (OperationListResult, error) + olr OperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationListResultPage) Response() OperationListResult { + return page.olr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { + return nil + } + return *page.olr.Value +} + +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + +// PartitionMetric the metric values for a single partition. +type PartitionMetric struct { + // PartitionID - READ-ONLY; The partition id (GUID identifier) of the metric values. + PartitionID *string `json:"partitionId,omitempty"` + // PartitionKeyRangeID - READ-ONLY; The partition key range id (integer identifier) of the metric values. + PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"` + // StartTime - READ-ONLY; The start time for the metric (ISO-8601 format). + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; The end time for the metric (ISO-8601 format). + 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 UnitType `json:"unit,omitempty"` + // Name - READ-ONLY; The name information for the metric. + Name *MetricName `json:"name,omitempty"` + // MetricValues - READ-ONLY; The metric values for the specified time window and timestep. + MetricValues *[]MetricValue `json:"metricValues,omitempty"` +} + +// PartitionMetricListResult the response to a list partition metrics request. +type PartitionMetricListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of partition-level metrics for the account. + Value *[]PartitionMetric `json:"value,omitempty"` +} + +// PartitionUsage the partition level usage data for a usage request. +type PartitionUsage struct { + // PartitionID - READ-ONLY; The partition id (GUID identifier) of the usages. + 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 UnitType `json:"unit,omitempty"` + // Name - READ-ONLY; The name information for the metric. + Name *MetricName `json:"name,omitempty"` + // QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values. + QuotaPeriod *string `json:"quotaPeriod,omitempty"` + // Limit - READ-ONLY; Maximum value for this metric + Limit *int64 `json:"limit,omitempty"` + // CurrentValue - READ-ONLY; Current value for this metric + CurrentValue *int64 `json:"currentValue,omitempty"` +} + +// PartitionUsagesResult the response to a list partition level usage request. +type PartitionUsagesResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of partition-level usages for the database. A usage is a point in time metric + Value *[]PartitionUsage `json:"value,omitempty"` +} + +// PercentileMetric percentile Metric data +type PercentileMetric struct { + // StartTime - READ-ONLY; The start time for the metric (ISO-8601 format). + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - READ-ONLY; The end time for the metric (ISO-8601 format). + 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 UnitType `json:"unit,omitempty"` + // Name - READ-ONLY; The name information for the metric. + Name *MetricName `json:"name,omitempty"` + // MetricValues - READ-ONLY; The percentile metric values for the specified time window and timestep. + MetricValues *[]PercentileMetricValue `json:"metricValues,omitempty"` +} + +// PercentileMetricListResult the response to a list percentile metrics request. +type PercentileMetricListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of percentile metrics for the account. + Value *[]PercentileMetric `json:"value,omitempty"` +} + +// PercentileMetricValue represents percentile metrics values. +type PercentileMetricValue struct { + // P10 - READ-ONLY; The 10th percentile value for the metric. + P10 *float64 `json:"P10,omitempty"` + // P25 - READ-ONLY; The 25th percentile value for the metric. + P25 *float64 `json:"P25,omitempty"` + // P50 - READ-ONLY; The 50th percentile value for the metric. + P50 *float64 `json:"P50,omitempty"` + // P75 - READ-ONLY; The 75th percentile value for the metric. + P75 *float64 `json:"P75,omitempty"` + // P90 - READ-ONLY; The 90th percentile value for the metric. + P90 *float64 `json:"P90,omitempty"` + // P95 - READ-ONLY; The 95th percentile value for the metric. + P95 *float64 `json:"P95,omitempty"` + // P99 - READ-ONLY; The 99th percentile value for the metric. + P99 *float64 `json:"P99,omitempty"` + // Count - READ-ONLY; The number of values for the metric. + Count *float64 `json:"_count,omitempty"` + // Average - READ-ONLY; The average value of the metric. + Average *float64 `json:"average,omitempty"` + // Maximum - READ-ONLY; The max value of the metric. + Maximum *float64 `json:"maximum,omitempty"` + // Minimum - READ-ONLY; The min value of the metric. + Minimum *float64 `json:"minimum,omitempty"` + // Timestamp - READ-ONLY; The metric timestamp (ISO-8601 format). + Timestamp *date.Time `json:"timestamp,omitempty"` + // Total - READ-ONLY; The total value of the metric. + Total *float64 `json:"total,omitempty"` +} + +// PrivateEndpointConnection a private endpoint connection +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Resource 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. Ex- 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 +} + +// PrivateEndpointConnectionListResult a list of private endpoint connections +type PrivateEndpointConnectionListResult struct { + autorest.Response `json:"-"` + // Value - Array of private endpoint connections + Value *[]PrivateEndpointConnection `json:"value,omitempty"` +} + +// PrivateEndpointConnectionProperties properties of a private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - Private endpoint which the connection belongs to. + PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - Connection State of the Private Endpoint Connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` +} + +// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type PrivateEndpointConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) Result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(pec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsCreateOrUpdateFuture", "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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsDeleteFuture) Result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.PrivateEndpointConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateEndpointProperty private endpoint which the connection belongs to. +type PrivateEndpointProperty struct { + // ID - Resource id of the private endpoint. + ID *string `json:"id,omitempty"` +} + +// PrivateLinkResource a private link resource +type PrivateLinkResource struct { + autorest.Response `json:"-"` + // PrivateLinkResourceProperties - Resource properties. + *PrivateLinkResourceProperties `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 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"` +} + +// PrivateLinkServiceConnectionStateProperty connection State of the Private Endpoint Connection. +type PrivateLinkServiceConnectionStateProperty 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; Any action that is required beyond basic workflow (approve/ reject/ disconnect) + ActionsRequired *string `json:"actionsRequired,omitempty"` +} + +// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than +// required location and tags +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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// RegionForOnlineOffline cosmos DB region to online or offline. +type RegionForOnlineOffline struct { + // Region - Cosmos DB region, with spaces between words and each word capitalized. + Region *string `json:"region,omitempty"` +} + +// Resource ... +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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// SpatialSpec ... +type SpatialSpec struct { + // Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) + Path *string `json:"path,omitempty"` + // Types - List of path's spatial type + Types *[]SpatialType `json:"types,omitempty"` +} + +// SQLContainerCreateUpdateParameters parameters to create and update Cosmos DB container. +type SQLContainerCreateUpdateParameters struct { + // SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container. + *SQLContainerCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLContainerCreateUpdateParameters. +func (sccup SQLContainerCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sccup.SQLContainerCreateUpdateProperties != nil { + objectMap["properties"] = sccup.SQLContainerCreateUpdateProperties + } + if sccup.Location != nil { + objectMap["location"] = sccup.Location + } + if sccup.Tags != nil { + objectMap["tags"] = sccup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLContainerCreateUpdateParameters struct. +func (sccup *SQLContainerCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLContainerCreateUpdateProperties SQLContainerCreateUpdateProperties + err = json.Unmarshal(*v, &SQLContainerCreateUpdateProperties) + if err != nil { + return err + } + sccup.SQLContainerCreateUpdateProperties = &SQLContainerCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sccup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sccup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sccup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sccup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sccup.Tags = tags + } + } + } + + return nil +} + +// SQLContainerCreateUpdateProperties properties to create and update Azure Cosmos DB container. +type SQLContainerCreateUpdateProperties struct { + // Resource - The standard JSON format of a container + Resource *SQLContainerResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for SQLContainerCreateUpdateProperties. +func (sccup SQLContainerCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sccup.Resource != nil { + objectMap["resource"] = sccup.Resource + } + if sccup.Options != nil { + objectMap["options"] = sccup.Options + } + return json.Marshal(objectMap) +} + +// SQLContainerGetProperties the properties of an Azure Cosmos DB container +type SQLContainerGetProperties struct { + Resource *SQLContainerGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLContainerGetPropertiesResource ... +type SQLContainerGetPropertiesResource struct { + // ID - Name of the Cosmos DB SQL container + ID *string `json:"id,omitempty"` + // IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container + IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` + // PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions + PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` + // DefaultTTL - Default time to live + DefaultTTL *int32 `json:"defaultTtl,omitempty"` + // UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. + UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` + // ConflictResolutionPolicy - The conflict resolution policy for the container. + ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// SQLContainerGetResults an Azure Cosmos DB container. +type SQLContainerGetResults struct { + autorest.Response `json:"-"` + // SQLContainerGetProperties - The properties of an Azure Cosmos DB container + *SQLContainerGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLContainerGetResults. +func (scgr SQLContainerGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if scgr.SQLContainerGetProperties != nil { + objectMap["properties"] = scgr.SQLContainerGetProperties + } + if scgr.Location != nil { + objectMap["location"] = scgr.Location + } + if scgr.Tags != nil { + objectMap["tags"] = scgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLContainerGetResults struct. +func (scgr *SQLContainerGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLContainerGetProperties SQLContainerGetProperties + err = json.Unmarshal(*v, &SQLContainerGetProperties) + if err != nil { + return err + } + scgr.SQLContainerGetProperties = &SQLContainerGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + scgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + scgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + scgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + scgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + scgr.Tags = tags + } + } + } + + return nil +} + +// SQLContainerListResult the List operation response, that contains the containers and their properties. +type SQLContainerListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of containers and their properties. + Value *[]SQLContainerGetResults `json:"value,omitempty"` +} + +// SQLContainerResource cosmos DB SQL container resource object +type SQLContainerResource struct { + // ID - Name of the Cosmos DB SQL container + ID *string `json:"id,omitempty"` + // IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container + IndexingPolicy *IndexingPolicy `json:"indexingPolicy,omitempty"` + // PartitionKey - The configuration of the partition key to be used for partitioning data into multiple partitions + PartitionKey *ContainerPartitionKey `json:"partitionKey,omitempty"` + // DefaultTTL - Default time to live + DefaultTTL *int32 `json:"defaultTtl,omitempty"` + // UniqueKeyPolicy - The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. + UniqueKeyPolicy *UniqueKeyPolicy `json:"uniqueKeyPolicy,omitempty"` + // ConflictResolutionPolicy - The conflict resolution policy for the container. + ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` +} + +// SQLDatabaseCreateUpdateParameters parameters to create and update Cosmos DB SQL database. +type SQLDatabaseCreateUpdateParameters struct { + // SQLDatabaseCreateUpdateProperties - Properties to create and update Azure Cosmos DB SQL database. + *SQLDatabaseCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLDatabaseCreateUpdateParameters. +func (sdcup SQLDatabaseCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdcup.SQLDatabaseCreateUpdateProperties != nil { + objectMap["properties"] = sdcup.SQLDatabaseCreateUpdateProperties + } + if sdcup.Location != nil { + objectMap["location"] = sdcup.Location + } + if sdcup.Tags != nil { + objectMap["tags"] = sdcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLDatabaseCreateUpdateParameters struct. +func (sdcup *SQLDatabaseCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLDatabaseCreateUpdateProperties SQLDatabaseCreateUpdateProperties + err = json.Unmarshal(*v, &SQLDatabaseCreateUpdateProperties) + if err != nil { + return err + } + sdcup.SQLDatabaseCreateUpdateProperties = &SQLDatabaseCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sdcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sdcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sdcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sdcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sdcup.Tags = tags + } + } + } + + return nil +} + +// SQLDatabaseCreateUpdateProperties properties to create and update Azure Cosmos DB SQL database. +type SQLDatabaseCreateUpdateProperties struct { + // Resource - The standard JSON format of a SQL database + Resource *SQLDatabaseResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for SQLDatabaseCreateUpdateProperties. +func (sdcup SQLDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdcup.Resource != nil { + objectMap["resource"] = sdcup.Resource + } + if sdcup.Options != nil { + objectMap["options"] = sdcup.Options + } + return json.Marshal(objectMap) +} + +// SQLDatabaseGetProperties the properties of an Azure Cosmos DB SQL database +type SQLDatabaseGetProperties struct { + Resource *SQLDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLDatabaseGetPropertiesResource ... +type SQLDatabaseGetPropertiesResource struct { + // ID - Name of the Cosmos DB SQL database + ID *string `json:"id,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` + // Colls - A system generated property that specified the addressable path of the collections resource. + Colls *string `json:"_colls,omitempty"` + // Users - A system generated property that specifies the addressable path of the users resource. + Users *string `json:"_users,omitempty"` +} + +// SQLDatabaseGetResults an Azure Cosmos DB SQL database. +type SQLDatabaseGetResults struct { + autorest.Response `json:"-"` + // SQLDatabaseGetProperties - The properties of an Azure Cosmos DB SQL database + *SQLDatabaseGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLDatabaseGetResults. +func (sdgr SQLDatabaseGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sdgr.SQLDatabaseGetProperties != nil { + objectMap["properties"] = sdgr.SQLDatabaseGetProperties + } + if sdgr.Location != nil { + objectMap["location"] = sdgr.Location + } + if sdgr.Tags != nil { + objectMap["tags"] = sdgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLDatabaseGetResults struct. +func (sdgr *SQLDatabaseGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLDatabaseGetProperties SQLDatabaseGetProperties + err = json.Unmarshal(*v, &SQLDatabaseGetProperties) + if err != nil { + return err + } + sdgr.SQLDatabaseGetProperties = &SQLDatabaseGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sdgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sdgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sdgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sdgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sdgr.Tags = tags + } + } + } + + return nil +} + +// SQLDatabaseListResult the List operation response, that contains the SQL databases and their properties. +type SQLDatabaseListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of SQL databases and their properties. + Value *[]SQLDatabaseGetResults `json:"value,omitempty"` +} + +// SQLDatabaseResource cosmos DB SQL database resource object +type SQLDatabaseResource struct { + // ID - Name of the Cosmos DB SQL database + ID *string `json:"id,omitempty"` +} + +// SQLResourcesCreateUpdateSQLContainerFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLResourcesCreateUpdateSQLContainerFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesCreateUpdateSQLContainerFuture) Result(client SQLResourcesClient) (scgr SQLContainerGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLContainerFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLContainerFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if scgr.Response.Response, err = future.GetResult(sender); err == nil && scgr.Response.Response.StatusCode != http.StatusNoContent { + scgr, err = client.CreateUpdateSQLContainerResponder(scgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLContainerFuture", "Result", scgr.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLResourcesCreateUpdateSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLResourcesCreateUpdateSQLDatabaseFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesCreateUpdateSQLDatabaseFuture) Result(client SQLResourcesClient) (sdgr SQLDatabaseGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sdgr.Response.Response, err = future.GetResult(sender); err == nil && sdgr.Response.Response.StatusCode != http.StatusNoContent { + sdgr, err = client.CreateUpdateSQLDatabaseResponder(sdgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLDatabaseFuture", "Result", sdgr.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLResourcesCreateUpdateSQLStoredProcedureFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type SQLResourcesCreateUpdateSQLStoredProcedureFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesCreateUpdateSQLStoredProcedureFuture) Result(client SQLResourcesClient) (sspgr SQLStoredProcedureGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sspgr.Response.Response, err = future.GetResult(sender); err == nil && sspgr.Response.Response.StatusCode != http.StatusNoContent { + sspgr, err = client.CreateUpdateSQLStoredProcedureResponder(sspgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLStoredProcedureFuture", "Result", sspgr.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLResourcesCreateUpdateSQLTriggerFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLResourcesCreateUpdateSQLTriggerFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesCreateUpdateSQLTriggerFuture) Result(client SQLResourcesClient) (stgr SQLTriggerGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLTriggerFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLTriggerFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if stgr.Response.Response, err = future.GetResult(sender); err == nil && stgr.Response.Response.StatusCode != http.StatusNoContent { + stgr, err = client.CreateUpdateSQLTriggerResponder(stgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLTriggerFuture", "Result", stgr.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture) Result(client SQLResourcesClient) (sudfgr SQLUserDefinedFunctionGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sudfgr.Response.Response, err = future.GetResult(sender); err == nil && sudfgr.Response.Response.StatusCode != http.StatusNoContent { + sudfgr, err = client.CreateUpdateSQLUserDefinedFunctionResponder(sudfgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture", "Result", sudfgr.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLResourcesDeleteSQLContainerFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLResourcesDeleteSQLContainerFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesDeleteSQLContainerFuture) Result(client SQLResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLContainerFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLContainerFuture") + return + } + ar.Response = future.Response() + return +} + +// SQLResourcesDeleteSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLResourcesDeleteSQLDatabaseFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesDeleteSQLDatabaseFuture) Result(client SQLResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLDatabaseFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLDatabaseFuture") + return + } + ar.Response = future.Response() + return +} + +// SQLResourcesDeleteSQLStoredProcedureFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLResourcesDeleteSQLStoredProcedureFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesDeleteSQLStoredProcedureFuture) Result(client SQLResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLStoredProcedureFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLStoredProcedureFuture") + return + } + ar.Response = future.Response() + return +} + +// SQLResourcesDeleteSQLTriggerFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SQLResourcesDeleteSQLTriggerFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesDeleteSQLTriggerFuture) Result(client SQLResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLTriggerFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLTriggerFuture") + return + } + ar.Response = future.Response() + return +} + +// SQLResourcesDeleteSQLUserDefinedFunctionFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type SQLResourcesDeleteSQLUserDefinedFunctionFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesDeleteSQLUserDefinedFunctionFuture) Result(client SQLResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesDeleteSQLUserDefinedFunctionFuture") + return + } + ar.Response = future.Response() + return +} + +// SQLResourcesUpdateSQLContainerThroughputFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type SQLResourcesUpdateSQLContainerThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesUpdateSQLContainerThroughputFuture) Result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLContainerThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesUpdateSQLContainerThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateSQLContainerThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLContainerThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLResourcesUpdateSQLDatabaseThroughputFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type SQLResourcesUpdateSQLDatabaseThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SQLResourcesUpdateSQLDatabaseThroughputFuture) Result(client SQLResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateSQLDatabaseThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesUpdateSQLDatabaseThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// SQLStoredProcedureCreateUpdateParameters parameters to create and update Cosmos DB storedProcedure. +type SQLStoredProcedureCreateUpdateParameters struct { + // SQLStoredProcedureCreateUpdateProperties - Properties to create and update Azure Cosmos DB storedProcedure. + *SQLStoredProcedureCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLStoredProcedureCreateUpdateParameters. +func (sspcup SQLStoredProcedureCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sspcup.SQLStoredProcedureCreateUpdateProperties != nil { + objectMap["properties"] = sspcup.SQLStoredProcedureCreateUpdateProperties + } + if sspcup.Location != nil { + objectMap["location"] = sspcup.Location + } + if sspcup.Tags != nil { + objectMap["tags"] = sspcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLStoredProcedureCreateUpdateParameters struct. +func (sspcup *SQLStoredProcedureCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLStoredProcedureCreateUpdateProperties SQLStoredProcedureCreateUpdateProperties + err = json.Unmarshal(*v, &SQLStoredProcedureCreateUpdateProperties) + if err != nil { + return err + } + sspcup.SQLStoredProcedureCreateUpdateProperties = &SQLStoredProcedureCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sspcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sspcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sspcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sspcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sspcup.Tags = tags + } + } + } + + return nil +} + +// SQLStoredProcedureCreateUpdateProperties properties to create and update Azure Cosmos DB +// storedProcedure. +type SQLStoredProcedureCreateUpdateProperties struct { + // Resource - The standard JSON format of a storedProcedure + Resource *SQLStoredProcedureResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for SQLStoredProcedureCreateUpdateProperties. +func (sspcup SQLStoredProcedureCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sspcup.Resource != nil { + objectMap["resource"] = sspcup.Resource + } + if sspcup.Options != nil { + objectMap["options"] = sspcup.Options + } + return json.Marshal(objectMap) +} + +// SQLStoredProcedureGetProperties the properties of an Azure Cosmos DB StoredProcedure +type SQLStoredProcedureGetProperties struct { + Resource *SQLStoredProcedureGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLStoredProcedureGetPropertiesResource ... +type SQLStoredProcedureGetPropertiesResource struct { + // ID - Name of the Cosmos DB SQL storedProcedure + ID *string `json:"id,omitempty"` + // Body - Body of the Stored Procedure + Body *string `json:"body,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// SQLStoredProcedureGetResults an Azure Cosmos DB storedProcedure. +type SQLStoredProcedureGetResults struct { + autorest.Response `json:"-"` + // SQLStoredProcedureGetProperties - The properties of an Azure Cosmos DB storedProcedure + *SQLStoredProcedureGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLStoredProcedureGetResults. +func (sspgr SQLStoredProcedureGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sspgr.SQLStoredProcedureGetProperties != nil { + objectMap["properties"] = sspgr.SQLStoredProcedureGetProperties + } + if sspgr.Location != nil { + objectMap["location"] = sspgr.Location + } + if sspgr.Tags != nil { + objectMap["tags"] = sspgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLStoredProcedureGetResults struct. +func (sspgr *SQLStoredProcedureGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLStoredProcedureGetProperties SQLStoredProcedureGetProperties + err = json.Unmarshal(*v, &SQLStoredProcedureGetProperties) + if err != nil { + return err + } + sspgr.SQLStoredProcedureGetProperties = &SQLStoredProcedureGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sspgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sspgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sspgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sspgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sspgr.Tags = tags + } + } + } + + return nil +} + +// SQLStoredProcedureListResult the List operation response, that contains the storedProcedures and their +// properties. +type SQLStoredProcedureListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of storedProcedures and their properties. + Value *[]SQLStoredProcedureGetResults `json:"value,omitempty"` +} + +// SQLStoredProcedureResource cosmos DB SQL storedProcedure resource object +type SQLStoredProcedureResource struct { + // ID - Name of the Cosmos DB SQL storedProcedure + ID *string `json:"id,omitempty"` + // Body - Body of the Stored Procedure + Body *string `json:"body,omitempty"` +} + +// SQLTriggerCreateUpdateParameters parameters to create and update Cosmos DB trigger. +type SQLTriggerCreateUpdateParameters struct { + // SQLTriggerCreateUpdateProperties - Properties to create and update Azure Cosmos DB trigger. + *SQLTriggerCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLTriggerCreateUpdateParameters. +func (stcup SQLTriggerCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if stcup.SQLTriggerCreateUpdateProperties != nil { + objectMap["properties"] = stcup.SQLTriggerCreateUpdateProperties + } + if stcup.Location != nil { + objectMap["location"] = stcup.Location + } + if stcup.Tags != nil { + objectMap["tags"] = stcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLTriggerCreateUpdateParameters struct. +func (stcup *SQLTriggerCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLTriggerCreateUpdateProperties SQLTriggerCreateUpdateProperties + err = json.Unmarshal(*v, &SQLTriggerCreateUpdateProperties) + if err != nil { + return err + } + stcup.SQLTriggerCreateUpdateProperties = &SQLTriggerCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + stcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + stcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + stcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + stcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + stcup.Tags = tags + } + } + } + + return nil +} + +// SQLTriggerCreateUpdateProperties properties to create and update Azure Cosmos DB trigger. +type SQLTriggerCreateUpdateProperties struct { + // Resource - The standard JSON format of a trigger + Resource *SQLTriggerResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for SQLTriggerCreateUpdateProperties. +func (stcup SQLTriggerCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if stcup.Resource != nil { + objectMap["resource"] = stcup.Resource + } + if stcup.Options != nil { + objectMap["options"] = stcup.Options + } + return json.Marshal(objectMap) +} + +// SQLTriggerGetProperties the properties of an Azure Cosmos DB trigger +type SQLTriggerGetProperties struct { + Resource *SQLTriggerGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLTriggerGetPropertiesResource ... +type SQLTriggerGetPropertiesResource struct { + // ID - Name of the Cosmos DB SQL trigger + ID *string `json:"id,omitempty"` + // Body - Body of the Trigger + Body *string `json:"body,omitempty"` + // TriggerType - Type of the Trigger. Possible values include: 'Pre', 'Post' + TriggerType TriggerType `json:"triggerType,omitempty"` + // TriggerOperation - The operation the trigger is associated with. Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace' + TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// SQLTriggerGetResults an Azure Cosmos DB trigger. +type SQLTriggerGetResults struct { + autorest.Response `json:"-"` + // SQLTriggerGetProperties - The properties of an Azure Cosmos DB trigger + *SQLTriggerGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLTriggerGetResults. +func (stgr SQLTriggerGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if stgr.SQLTriggerGetProperties != nil { + objectMap["properties"] = stgr.SQLTriggerGetProperties + } + if stgr.Location != nil { + objectMap["location"] = stgr.Location + } + if stgr.Tags != nil { + objectMap["tags"] = stgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLTriggerGetResults struct. +func (stgr *SQLTriggerGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLTriggerGetProperties SQLTriggerGetProperties + err = json.Unmarshal(*v, &SQLTriggerGetProperties) + if err != nil { + return err + } + stgr.SQLTriggerGetProperties = &SQLTriggerGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + stgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + stgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + stgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + stgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + stgr.Tags = tags + } + } + } + + return nil +} + +// SQLTriggerListResult the List operation response, that contains the triggers and their properties. +type SQLTriggerListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of triggers and their properties. + Value *[]SQLTriggerGetResults `json:"value,omitempty"` +} + +// SQLTriggerResource cosmos DB SQL trigger resource object +type SQLTriggerResource struct { + // ID - Name of the Cosmos DB SQL trigger + 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 TriggerType `json:"triggerType,omitempty"` + // TriggerOperation - The operation the trigger is associated with. Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace' + TriggerOperation TriggerOperation `json:"triggerOperation,omitempty"` +} + +// SQLUserDefinedFunctionCreateUpdateParameters parameters to create and update Cosmos DB +// userDefinedFunction. +type SQLUserDefinedFunctionCreateUpdateParameters struct { + // SQLUserDefinedFunctionCreateUpdateProperties - Properties to create and update Azure Cosmos DB userDefinedFunction. + *SQLUserDefinedFunctionCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLUserDefinedFunctionCreateUpdateParameters. +func (sudfcup SQLUserDefinedFunctionCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sudfcup.SQLUserDefinedFunctionCreateUpdateProperties != nil { + objectMap["properties"] = sudfcup.SQLUserDefinedFunctionCreateUpdateProperties + } + if sudfcup.Location != nil { + objectMap["location"] = sudfcup.Location + } + if sudfcup.Tags != nil { + objectMap["tags"] = sudfcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLUserDefinedFunctionCreateUpdateParameters struct. +func (sudfcup *SQLUserDefinedFunctionCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLUserDefinedFunctionCreateUpdateProperties SQLUserDefinedFunctionCreateUpdateProperties + err = json.Unmarshal(*v, &SQLUserDefinedFunctionCreateUpdateProperties) + if err != nil { + return err + } + sudfcup.SQLUserDefinedFunctionCreateUpdateProperties = &SQLUserDefinedFunctionCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sudfcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sudfcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sudfcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sudfcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sudfcup.Tags = tags + } + } + } + + return nil +} + +// SQLUserDefinedFunctionCreateUpdateProperties properties to create and update Azure Cosmos DB +// userDefinedFunction. +type SQLUserDefinedFunctionCreateUpdateProperties struct { + // Resource - The standard JSON format of a userDefinedFunction + Resource *SQLUserDefinedFunctionResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for SQLUserDefinedFunctionCreateUpdateProperties. +func (sudfcup SQLUserDefinedFunctionCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sudfcup.Resource != nil { + objectMap["resource"] = sudfcup.Resource + } + if sudfcup.Options != nil { + objectMap["options"] = sudfcup.Options + } + return json.Marshal(objectMap) +} + +// SQLUserDefinedFunctionGetProperties the properties of an Azure Cosmos DB userDefinedFunction +type SQLUserDefinedFunctionGetProperties struct { + Resource *SQLUserDefinedFunctionGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLUserDefinedFunctionGetPropertiesResource ... +type SQLUserDefinedFunctionGetPropertiesResource struct { + // ID - Name of the Cosmos DB SQL userDefinedFunction + ID *string `json:"id,omitempty"` + // Body - Body of the User Defined Function + Body *string `json:"body,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// SQLUserDefinedFunctionGetResults an Azure Cosmos DB userDefinedFunction. +type SQLUserDefinedFunctionGetResults struct { + autorest.Response `json:"-"` + // SQLUserDefinedFunctionGetProperties - The properties of an Azure Cosmos DB userDefinedFunction + *SQLUserDefinedFunctionGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLUserDefinedFunctionGetResults. +func (sudfgr SQLUserDefinedFunctionGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sudfgr.SQLUserDefinedFunctionGetProperties != nil { + objectMap["properties"] = sudfgr.SQLUserDefinedFunctionGetProperties + } + if sudfgr.Location != nil { + objectMap["location"] = sudfgr.Location + } + if sudfgr.Tags != nil { + objectMap["tags"] = sudfgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLUserDefinedFunctionGetResults struct. +func (sudfgr *SQLUserDefinedFunctionGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 SQLUserDefinedFunctionGetProperties SQLUserDefinedFunctionGetProperties + err = json.Unmarshal(*v, &SQLUserDefinedFunctionGetProperties) + if err != nil { + return err + } + sudfgr.SQLUserDefinedFunctionGetProperties = &SQLUserDefinedFunctionGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + sudfgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + sudfgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sudfgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + sudfgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + sudfgr.Tags = tags + } + } + } + + return nil +} + +// SQLUserDefinedFunctionListResult the List operation response, that contains the userDefinedFunctions and +// their properties. +type SQLUserDefinedFunctionListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of userDefinedFunctions and their properties. + Value *[]SQLUserDefinedFunctionGetResults `json:"value,omitempty"` +} + +// SQLUserDefinedFunctionResource cosmos DB SQL userDefinedFunction resource object +type SQLUserDefinedFunctionResource struct { + // ID - Name of the Cosmos DB SQL userDefinedFunction + ID *string `json:"id,omitempty"` + // Body - Body of the User Defined Function + Body *string `json:"body,omitempty"` +} + +// TableCreateUpdateParameters parameters to create and update Cosmos DB Table. +type TableCreateUpdateParameters struct { + // TableCreateUpdateProperties - Properties to create and update Azure Cosmos DB Table. + *TableCreateUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TableCreateUpdateParameters. +func (tcup TableCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tcup.TableCreateUpdateProperties != nil { + objectMap["properties"] = tcup.TableCreateUpdateProperties + } + if tcup.Location != nil { + objectMap["location"] = tcup.Location + } + if tcup.Tags != nil { + objectMap["tags"] = tcup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TableCreateUpdateParameters struct. +func (tcup *TableCreateUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 tableCreateUpdateProperties TableCreateUpdateProperties + err = json.Unmarshal(*v, &tableCreateUpdateProperties) + if err != nil { + return err + } + tcup.TableCreateUpdateProperties = &tableCreateUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + tcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + tcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + tcup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + tcup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + tcup.Tags = tags + } + } + } + + return nil +} + +// TableCreateUpdateProperties properties to create and update Azure Cosmos DB Table. +type TableCreateUpdateProperties struct { + // Resource - The standard JSON format of a Table + Resource *TableResource `json:"resource,omitempty"` + // Options - A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. + Options map[string]*string `json:"options"` +} + +// MarshalJSON is the custom marshaler for TableCreateUpdateProperties. +func (tcup TableCreateUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tcup.Resource != nil { + objectMap["resource"] = tcup.Resource + } + if tcup.Options != nil { + objectMap["options"] = tcup.Options + } + return json.Marshal(objectMap) +} + +// TableGetProperties the properties of an Azure Cosmos Table +type TableGetProperties struct { + Resource *TableGetPropertiesResource `json:"resource,omitempty"` +} + +// TableGetPropertiesResource ... +type TableGetPropertiesResource struct { + // ID - Name of the Cosmos DB table + ID *string `json:"id,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// TableGetResults an Azure Cosmos DB Table. +type TableGetResults struct { + autorest.Response `json:"-"` + // TableGetProperties - The properties of an Azure Cosmos DB Table + *TableGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TableGetResults. +func (tgr TableGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tgr.TableGetProperties != nil { + objectMap["properties"] = tgr.TableGetProperties + } + if tgr.Location != nil { + objectMap["location"] = tgr.Location + } + if tgr.Tags != nil { + objectMap["tags"] = tgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TableGetResults struct. +func (tgr *TableGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 tableGetProperties TableGetProperties + err = json.Unmarshal(*v, &tableGetProperties) + if err != nil { + return err + } + tgr.TableGetProperties = &tableGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + tgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + tgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + tgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + tgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + tgr.Tags = tags + } + } + } + + return nil +} + +// TableListResult the List operation response, that contains the Table and their properties. +type TableListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Table and their properties. + Value *[]TableGetResults `json:"value,omitempty"` +} + +// TableResource cosmos DB table resource object +type TableResource struct { + // ID - Name of the Cosmos DB table + ID *string `json:"id,omitempty"` +} + +// TableResourcesCreateUpdateTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type TableResourcesCreateUpdateTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *TableResourcesCreateUpdateTableFuture) Result(client TableResourcesClient) (tgr TableGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesCreateUpdateTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesCreateUpdateTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tgr.Response.Response, err = future.GetResult(sender); err == nil && tgr.Response.Response.StatusCode != http.StatusNoContent { + tgr, err = client.CreateUpdateTableResponder(tgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesCreateUpdateTableFuture", "Result", tgr.Response.Response, "Failure responding to request") + } + } + return +} + +// TableResourcesDeleteTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type TableResourcesDeleteTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *TableResourcesDeleteTableFuture) Result(client TableResourcesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesDeleteTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesDeleteTableFuture") + return + } + ar.Response = future.Response() + return +} + +// TableResourcesUpdateTableThroughputFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type TableResourcesUpdateTableThroughputFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *TableResourcesUpdateTableThroughputFuture) Result(client TableResourcesClient) (tsgr ThroughputSettingsGetResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesUpdateTableThroughputFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("documentdb.TableResourcesUpdateTableThroughputFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tsgr.Response.Response, err = future.GetResult(sender); err == nil && tsgr.Response.Response.StatusCode != http.StatusNoContent { + tsgr, err = client.UpdateTableThroughputResponder(tsgr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesUpdateTableThroughputFuture", "Result", tsgr.Response.Response, "Failure responding to request") + } + } + return +} + +// ThroughputSettingsGetProperties the properties of an Azure Cosmos DB resource throughput +type ThroughputSettingsGetProperties struct { + Resource *ThroughputSettingsGetPropertiesResource `json:"resource,omitempty"` +} + +// ThroughputSettingsGetPropertiesResource ... +type ThroughputSettingsGetPropertiesResource struct { + // Throughput - Value of the Cosmos DB resource throughput + Throughput *int32 `json:"throughput,omitempty"` + // MinimumThroughput - READ-ONLY; The minimum throughput of the resource + MinimumThroughput *string `json:"minimumThroughput,omitempty"` + // OfferReplacePending - READ-ONLY; The throughput replace is pending + OfferReplacePending *string `json:"offerReplacePending,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` +} + +// ThroughputSettingsGetResults an Azure Cosmos DB resource throughput. +type ThroughputSettingsGetResults struct { + autorest.Response `json:"-"` + // ThroughputSettingsGetProperties - The properties of an Azure Cosmos DB resource throughput + *ThroughputSettingsGetProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ThroughputSettingsGetResults. +func (tsgr ThroughputSettingsGetResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tsgr.ThroughputSettingsGetProperties != nil { + objectMap["properties"] = tsgr.ThroughputSettingsGetProperties + } + if tsgr.Location != nil { + objectMap["location"] = tsgr.Location + } + if tsgr.Tags != nil { + objectMap["tags"] = tsgr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ThroughputSettingsGetResults struct. +func (tsgr *ThroughputSettingsGetResults) UnmarshalJSON(body []byte) error { + var m map[string]*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 throughputSettingsGetProperties ThroughputSettingsGetProperties + err = json.Unmarshal(*v, &throughputSettingsGetProperties) + if err != nil { + return err + } + tsgr.ThroughputSettingsGetProperties = &throughputSettingsGetProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + tsgr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + tsgr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + tsgr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + tsgr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + tsgr.Tags = tags + } + } + } + + return nil +} + +// ThroughputSettingsResource cosmos DB resource throughput object +type ThroughputSettingsResource struct { + // Throughput - Value of the Cosmos DB resource throughput + Throughput *int32 `json:"throughput,omitempty"` + // MinimumThroughput - READ-ONLY; The minimum throughput of the resource + MinimumThroughput *string `json:"minimumThroughput,omitempty"` + // OfferReplacePending - READ-ONLY; The throughput replace is pending + OfferReplacePending *string `json:"offerReplacePending,omitempty"` +} + +// ThroughputSettingsUpdateParameters parameters to update Cosmos DB resource throughput. +type ThroughputSettingsUpdateParameters struct { + // ThroughputSettingsUpdateProperties - Properties to update Azure Cosmos DB resource throughput. + *ThroughputSettingsUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The unique resource identifier of the ARM resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the ARM resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of Azure resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource group to which the resource belongs. + Location *string `json:"location,omitempty"` + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ThroughputSettingsUpdateParameters. +func (tsup ThroughputSettingsUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tsup.ThroughputSettingsUpdateProperties != nil { + objectMap["properties"] = tsup.ThroughputSettingsUpdateProperties + } + if tsup.Location != nil { + objectMap["location"] = tsup.Location + } + if tsup.Tags != nil { + objectMap["tags"] = tsup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ThroughputSettingsUpdateParameters struct. +func (tsup *ThroughputSettingsUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 throughputSettingsUpdateProperties ThroughputSettingsUpdateProperties + err = json.Unmarshal(*v, &throughputSettingsUpdateProperties) + if err != nil { + return err + } + tsup.ThroughputSettingsUpdateProperties = &throughputSettingsUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + tsup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + tsup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + tsup.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + tsup.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + tsup.Tags = tags + } + } + } + + return nil +} + +// ThroughputSettingsUpdateProperties properties to update Azure Cosmos DB resource throughput. +type ThroughputSettingsUpdateProperties struct { + // Resource - The standard JSON format of a resource throughput + Resource *ThroughputSettingsResource `json:"resource,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"` + // 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. Ex- 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) +} + +// UniqueKey the unique key on that enforces uniqueness constraint on documents in the collection in the +// Azure Cosmos DB service. +type UniqueKey struct { + // Paths - List of paths must be unique for each document in the Azure Cosmos DB service + Paths *[]string `json:"paths,omitempty"` +} + +// UniqueKeyPolicy the unique key policy configuration for specifying uniqueness constraints on documents +// in the collection in the Azure Cosmos DB service. +type UniqueKeyPolicy struct { + // UniqueKeys - List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. + UniqueKeys *[]UniqueKey `json:"uniqueKeys,omitempty"` +} + +// 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 UnitType `json:"unit,omitempty"` + // Name - READ-ONLY; The name information for the metric. + Name *MetricName `json:"name,omitempty"` + // QuotaPeriod - READ-ONLY; The quota period used to summarize the usage values. + QuotaPeriod *string `json:"quotaPeriod,omitempty"` + // Limit - READ-ONLY; Maximum value for this metric + Limit *int64 `json:"limit,omitempty"` + // CurrentValue - READ-ONLY; Current value for this metric + CurrentValue *int64 `json:"currentValue,omitempty"` +} + +// UsagesResult the response to a list usage request. +type UsagesResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of usages for the database. A usage is a point in time metric + Value *[]Usage `json:"value,omitempty"` +} + +// VirtualNetworkRule virtual Network ACL Rule object +type VirtualNetworkRule struct { + // ID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + ID *string `json:"id,omitempty"` + // IgnoreMissingVNetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled. + IgnoreMissingVNetServiceEndpoint *bool `json:"ignoreMissingVNetServiceEndpoint,omitempty"` +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/mongodbresources.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/mongodbresources.go new file mode 100644 index 000000000000..587eac8a89ff --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/mongodbresources.go @@ -0,0 +1,1181 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MongoDBResourcesClient is the azure Cosmos DB Database Service Resource Provider REST API +type MongoDBResourcesClient struct { + BaseClient +} + +// NewMongoDBResourcesClient creates an instance of the MongoDBResourcesClient client. +func NewMongoDBResourcesClient(subscriptionID string, subscriptionID1 string) MongoDBResourcesClient { + return NewMongoDBResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewMongoDBResourcesClientWithBaseURI creates an instance of the MongoDBResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewMongoDBResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) MongoDBResourcesClient { + return MongoDBResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// CreateUpdateMongoDBCollection create or update an Azure Cosmos DB MongoDB Collection +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// collectionName - cosmos DB collection name. +// createUpdateMongoDBCollectionParameters - the parameters to provide for the current MongoDB Collection. +func (client MongoDBResourcesClient) CreateUpdateMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, createUpdateMongoDBCollectionParameters MongoDBCollectionCreateUpdateParameters) (result MongoDBResourcesCreateUpdateMongoDBCollectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.CreateUpdateMongoDBCollection") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateMongoDBCollectionParameters, + Constraints: []validation.Constraint{{Target: "createUpdateMongoDBCollectionParameters.MongoDBCollectionCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateMongoDBCollectionParameters.MongoDBCollectionCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateMongoDBCollectionParameters.MongoDBCollectionCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateMongoDBCollectionParameters.MongoDBCollectionCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "CreateUpdateMongoDBCollection", err.Error()) + } + + req, err := client.CreateUpdateMongoDBCollectionPreparer(ctx, resourceGroupName, accountName, databaseName, collectionName, createUpdateMongoDBCollectionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "CreateUpdateMongoDBCollection", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateMongoDBCollectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "CreateUpdateMongoDBCollection", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateMongoDBCollectionPreparer prepares the CreateUpdateMongoDBCollection request. +func (client MongoDBResourcesClient) CreateUpdateMongoDBCollectionPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, createUpdateMongoDBCollectionParameters MongoDBCollectionCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionName": autorest.Encode("path", collectionName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", pathParameters), + autorest.WithJSON(createUpdateMongoDBCollectionParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateMongoDBCollectionSender sends the CreateUpdateMongoDBCollection request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) CreateUpdateMongoDBCollectionSender(req *http.Request) (future MongoDBResourcesCreateUpdateMongoDBCollectionFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateMongoDBCollectionResponder handles the response to the CreateUpdateMongoDBCollection request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) CreateUpdateMongoDBCollectionResponder(resp *http.Response) (result MongoDBCollectionGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateUpdateMongoDBDatabase create or updates Azure Cosmos DB MongoDB database +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// createUpdateMongoDBDatabaseParameters - the parameters to provide for the current MongoDB database. +func (client MongoDBResourcesClient) CreateUpdateMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateMongoDBDatabaseParameters MongoDBDatabaseCreateUpdateParameters) (result MongoDBResourcesCreateUpdateMongoDBDatabaseFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.CreateUpdateMongoDBDatabase") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateMongoDBDatabaseParameters, + Constraints: []validation.Constraint{{Target: "createUpdateMongoDBDatabaseParameters.MongoDBDatabaseCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateMongoDBDatabaseParameters.MongoDBDatabaseCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateMongoDBDatabaseParameters.MongoDBDatabaseCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateMongoDBDatabaseParameters.MongoDBDatabaseCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "CreateUpdateMongoDBDatabase", err.Error()) + } + + req, err := client.CreateUpdateMongoDBDatabasePreparer(ctx, resourceGroupName, accountName, databaseName, createUpdateMongoDBDatabaseParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "CreateUpdateMongoDBDatabase", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateMongoDBDatabaseSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "CreateUpdateMongoDBDatabase", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateMongoDBDatabasePreparer prepares the CreateUpdateMongoDBDatabase request. +func (client MongoDBResourcesClient) CreateUpdateMongoDBDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateMongoDBDatabaseParameters MongoDBDatabaseCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", pathParameters), + autorest.WithJSON(createUpdateMongoDBDatabaseParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateMongoDBDatabaseSender sends the CreateUpdateMongoDBDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) CreateUpdateMongoDBDatabaseSender(req *http.Request) (future MongoDBResourcesCreateUpdateMongoDBDatabaseFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateMongoDBDatabaseResponder handles the response to the CreateUpdateMongoDBDatabase request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) CreateUpdateMongoDBDatabaseResponder(resp *http.Response) (result MongoDBDatabaseGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DeleteMongoDBCollection deletes an existing Azure Cosmos DB MongoDB Collection. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// collectionName - cosmos DB collection name. +func (client MongoDBResourcesClient) DeleteMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (result MongoDBResourcesDeleteMongoDBCollectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.DeleteMongoDBCollection") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "DeleteMongoDBCollection", err.Error()) + } + + req, err := client.DeleteMongoDBCollectionPreparer(ctx, resourceGroupName, accountName, databaseName, collectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "DeleteMongoDBCollection", nil, "Failure preparing request") + return + } + + result, err = client.DeleteMongoDBCollectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "DeleteMongoDBCollection", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteMongoDBCollectionPreparer prepares the DeleteMongoDBCollection request. +func (client MongoDBResourcesClient) DeleteMongoDBCollectionPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionName": autorest.Encode("path", collectionName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteMongoDBCollectionSender sends the DeleteMongoDBCollection request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) DeleteMongoDBCollectionSender(req *http.Request) (future MongoDBResourcesDeleteMongoDBCollectionFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteMongoDBCollectionResponder handles the response to the DeleteMongoDBCollection request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) DeleteMongoDBCollectionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteMongoDBDatabase deletes an existing Azure Cosmos DB MongoDB database. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client MongoDBResourcesClient) DeleteMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result MongoDBResourcesDeleteMongoDBDatabaseFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.DeleteMongoDBDatabase") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "DeleteMongoDBDatabase", err.Error()) + } + + req, err := client.DeleteMongoDBDatabasePreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "DeleteMongoDBDatabase", nil, "Failure preparing request") + return + } + + result, err = client.DeleteMongoDBDatabaseSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "DeleteMongoDBDatabase", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteMongoDBDatabasePreparer prepares the DeleteMongoDBDatabase request. +func (client MongoDBResourcesClient) DeleteMongoDBDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteMongoDBDatabaseSender sends the DeleteMongoDBDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) DeleteMongoDBDatabaseSender(req *http.Request) (future MongoDBResourcesDeleteMongoDBDatabaseFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteMongoDBDatabaseResponder handles the response to the DeleteMongoDBDatabase request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) DeleteMongoDBDatabaseResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetMongoDBCollection gets the MongoDB collection under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// collectionName - cosmos DB collection name. +func (client MongoDBResourcesClient) GetMongoDBCollection(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (result MongoDBCollectionGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.GetMongoDBCollection") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "GetMongoDBCollection", err.Error()) + } + + req, err := client.GetMongoDBCollectionPreparer(ctx, resourceGroupName, accountName, databaseName, collectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBCollection", nil, "Failure preparing request") + return + } + + resp, err := client.GetMongoDBCollectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBCollection", resp, "Failure sending request") + return + } + + result, err = client.GetMongoDBCollectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBCollection", resp, "Failure responding to request") + } + + return +} + +// GetMongoDBCollectionPreparer prepares the GetMongoDBCollection request. +func (client MongoDBResourcesClient) GetMongoDBCollectionPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionName": autorest.Encode("path", collectionName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetMongoDBCollectionSender sends the GetMongoDBCollection request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) GetMongoDBCollectionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetMongoDBCollectionResponder handles the response to the GetMongoDBCollection request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) GetMongoDBCollectionResponder(resp *http.Response) (result MongoDBCollectionGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMongoDBCollectionThroughput gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB +// database account with the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// collectionName - cosmos DB collection name. +func (client MongoDBResourcesClient) GetMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.GetMongoDBCollectionThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "GetMongoDBCollectionThroughput", err.Error()) + } + + req, err := client.GetMongoDBCollectionThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, collectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBCollectionThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetMongoDBCollectionThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBCollectionThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetMongoDBCollectionThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBCollectionThroughput", resp, "Failure responding to request") + } + + return +} + +// GetMongoDBCollectionThroughputPreparer prepares the GetMongoDBCollectionThroughput request. +func (client MongoDBResourcesClient) GetMongoDBCollectionThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionName": autorest.Encode("path", collectionName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetMongoDBCollectionThroughputSender sends the GetMongoDBCollectionThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) GetMongoDBCollectionThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetMongoDBCollectionThroughputResponder handles the response to the GetMongoDBCollectionThroughput request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) GetMongoDBCollectionThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMongoDBDatabase gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided +// name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client MongoDBResourcesClient) GetMongoDBDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result MongoDBDatabaseGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.GetMongoDBDatabase") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "GetMongoDBDatabase", err.Error()) + } + + req, err := client.GetMongoDBDatabasePreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.GetMongoDBDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBDatabase", resp, "Failure sending request") + return + } + + result, err = client.GetMongoDBDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBDatabase", resp, "Failure responding to request") + } + + return +} + +// GetMongoDBDatabasePreparer prepares the GetMongoDBDatabase request. +func (client MongoDBResourcesClient) GetMongoDBDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetMongoDBDatabaseSender sends the GetMongoDBDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) GetMongoDBDatabaseSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetMongoDBDatabaseResponder handles the response to the GetMongoDBDatabase request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) GetMongoDBDatabaseResponder(resp *http.Response) (result MongoDBDatabaseGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMongoDBDatabaseThroughput gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB +// database account with the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client MongoDBResourcesClient) GetMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.GetMongoDBDatabaseThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "GetMongoDBDatabaseThroughput", err.Error()) + } + + req, err := client.GetMongoDBDatabaseThroughputPreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBDatabaseThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetMongoDBDatabaseThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBDatabaseThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetMongoDBDatabaseThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "GetMongoDBDatabaseThroughput", resp, "Failure responding to request") + } + + return +} + +// GetMongoDBDatabaseThroughputPreparer prepares the GetMongoDBDatabaseThroughput request. +func (client MongoDBResourcesClient) GetMongoDBDatabaseThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetMongoDBDatabaseThroughputSender sends the GetMongoDBDatabaseThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) GetMongoDBDatabaseThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetMongoDBDatabaseThroughputResponder handles the response to the GetMongoDBDatabaseThroughput request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) GetMongoDBDatabaseThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListMongoDBCollections lists the MongoDB collection under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client MongoDBResourcesClient) ListMongoDBCollections(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result MongoDBCollectionListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.ListMongoDBCollections") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "ListMongoDBCollections", err.Error()) + } + + req, err := client.ListMongoDBCollectionsPreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "ListMongoDBCollections", nil, "Failure preparing request") + return + } + + resp, err := client.ListMongoDBCollectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "ListMongoDBCollections", resp, "Failure sending request") + return + } + + result, err = client.ListMongoDBCollectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "ListMongoDBCollections", resp, "Failure responding to request") + } + + return +} + +// ListMongoDBCollectionsPreparer prepares the ListMongoDBCollections request. +func (client MongoDBResourcesClient) ListMongoDBCollectionsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMongoDBCollectionsSender sends the ListMongoDBCollections request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) ListMongoDBCollectionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMongoDBCollectionsResponder handles the response to the ListMongoDBCollections request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) ListMongoDBCollectionsResponder(resp *http.Response) (result MongoDBCollectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListMongoDBDatabases lists the MongoDB databases under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client MongoDBResourcesClient) ListMongoDBDatabases(ctx context.Context, resourceGroupName string, accountName string) (result MongoDBDatabaseListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.ListMongoDBDatabases") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "ListMongoDBDatabases", err.Error()) + } + + req, err := client.ListMongoDBDatabasesPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "ListMongoDBDatabases", nil, "Failure preparing request") + return + } + + resp, err := client.ListMongoDBDatabasesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "ListMongoDBDatabases", resp, "Failure sending request") + return + } + + result, err = client.ListMongoDBDatabasesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "ListMongoDBDatabases", resp, "Failure responding to request") + } + + return +} + +// ListMongoDBDatabasesPreparer prepares the ListMongoDBDatabases request. +func (client MongoDBResourcesClient) ListMongoDBDatabasesPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMongoDBDatabasesSender sends the ListMongoDBDatabases request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) ListMongoDBDatabasesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMongoDBDatabasesResponder handles the response to the ListMongoDBDatabases request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) ListMongoDBDatabasesResponder(resp *http.Response) (result MongoDBDatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateMongoDBCollectionThroughput update the RUs per second of an Azure Cosmos DB MongoDB collection +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// collectionName - cosmos DB collection name. +// updateThroughputParameters - the RUs per second of the parameters to provide for the current MongoDB +// collection. +func (client MongoDBResourcesClient) UpdateMongoDBCollectionThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result MongoDBResourcesUpdateMongoDBCollectionThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.UpdateMongoDBCollectionThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "UpdateMongoDBCollectionThroughput", err.Error()) + } + + req, err := client.UpdateMongoDBCollectionThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, collectionName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "UpdateMongoDBCollectionThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateMongoDBCollectionThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "UpdateMongoDBCollectionThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateMongoDBCollectionThroughputPreparer prepares the UpdateMongoDBCollectionThroughput request. +func (client MongoDBResourcesClient) UpdateMongoDBCollectionThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, collectionName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionName": autorest.Encode("path", collectionName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateMongoDBCollectionThroughputSender sends the UpdateMongoDBCollectionThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) UpdateMongoDBCollectionThroughputSender(req *http.Request) (future MongoDBResourcesUpdateMongoDBCollectionThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateMongoDBCollectionThroughputResponder handles the response to the UpdateMongoDBCollectionThroughput request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) UpdateMongoDBCollectionThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateMongoDBDatabaseThroughput update RUs per second of the an Azure Cosmos DB MongoDB database +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// updateThroughputParameters - the RUs per second of the parameters to provide for the current MongoDB +// database. +func (client MongoDBResourcesClient) UpdateMongoDBDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MongoDBResourcesClient.UpdateMongoDBDatabaseThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.MongoDBResourcesClient", "UpdateMongoDBDatabaseThroughput", err.Error()) + } + + req, err := client.UpdateMongoDBDatabaseThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "UpdateMongoDBDatabaseThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateMongoDBDatabaseThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.MongoDBResourcesClient", "UpdateMongoDBDatabaseThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateMongoDBDatabaseThroughputPreparer prepares the UpdateMongoDBDatabaseThroughput request. +func (client MongoDBResourcesClient) UpdateMongoDBDatabaseThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateMongoDBDatabaseThroughputSender sends the UpdateMongoDBDatabaseThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client MongoDBResourcesClient) UpdateMongoDBDatabaseThroughputSender(req *http.Request) (future MongoDBResourcesUpdateMongoDBDatabaseThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateMongoDBDatabaseThroughputResponder handles the response to the UpdateMongoDBDatabaseThroughput request. The method always +// closes the http.Response Body. +func (client MongoDBResourcesClient) UpdateMongoDBDatabaseThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/operations.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/operations.go new file mode 100644 index 000000000000..fd9ced83d290 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/operations.go @@ -0,0 +1,148 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the azure Cosmos DB Database Service Resource Provider REST API +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string, subscriptionID1 string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// 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, subscriptionID1 string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// List lists all of the available Cosmos DB Resource Provider 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, "documentdb.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, "documentdb.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.olr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.DocumentDB/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.operationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "documentdb.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, "documentdb.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.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/cosmos-db/mgmt/2019-12-12/documentdb/partitionkeyrangeid.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/partitionkeyrangeid.go new file mode 100644 index 000000000000..c619369d8ae1 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/partitionkeyrangeid.go @@ -0,0 +1,143 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PartitionKeyRangeIDClient is the azure Cosmos DB Database Service Resource Provider REST API +type PartitionKeyRangeIDClient struct { + BaseClient +} + +// NewPartitionKeyRangeIDClient creates an instance of the PartitionKeyRangeIDClient client. +func NewPartitionKeyRangeIDClient(subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient { + return NewPartitionKeyRangeIDClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewPartitionKeyRangeIDClientWithBaseURI creates an instance of the PartitionKeyRangeIDClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient { + return PartitionKeyRangeIDClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given partition key range id. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +// partitionKeyRangeID - partition Key Range Id for which to get data. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client PartitionKeyRangeIDClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string) (result PartitionMetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PartitionKeyRangeIDClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PartitionKeyRangeIDClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, databaseRid, collectionRid, partitionKeyRangeID, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PartitionKeyRangeIDClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.PartitionKeyRangeIDClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PartitionKeyRangeIDClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client PartitionKeyRangeIDClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "partitionKeyRangeId": autorest.Encode("path", partitionKeyRangeID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client PartitionKeyRangeIDClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client PartitionKeyRangeIDClient) ListMetricsResponder(resp *http.Response) (result PartitionMetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/partitionkeyrangeidregion.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/partitionkeyrangeidregion.go new file mode 100644 index 000000000000..eb3935488f59 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/partitionkeyrangeidregion.go @@ -0,0 +1,145 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PartitionKeyRangeIDRegionClient is the azure Cosmos DB Database Service Resource Provider REST API +type PartitionKeyRangeIDRegionClient struct { + BaseClient +} + +// NewPartitionKeyRangeIDRegionClient creates an instance of the PartitionKeyRangeIDRegionClient client. +func NewPartitionKeyRangeIDRegionClient(subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient { + return NewPartitionKeyRangeIDRegionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewPartitionKeyRangeIDRegionClientWithBaseURI creates an instance of the PartitionKeyRangeIDRegionClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient { + return PartitionKeyRangeIDRegionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given partition key range id and region. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// region - cosmos DB region, with spaces between words and each word capitalized. +// databaseRid - cosmos DB database rid. +// collectionRid - cosmos DB collection rid. +// partitionKeyRangeID - partition Key Range Id for which to get data. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client PartitionKeyRangeIDRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string) (result PartitionMetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PartitionKeyRangeIDRegionClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PartitionKeyRangeIDRegionClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeID, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PartitionKeyRangeIDRegionClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.PartitionKeyRangeIDRegionClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PartitionKeyRangeIDRegionClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client PartitionKeyRangeIDRegionClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "collectionRid": autorest.Encode("path", collectionRid), + "databaseRid": autorest.Encode("path", databaseRid), + "partitionKeyRangeId": autorest.Encode("path", partitionKeyRangeID), + "region": autorest.Encode("path", region), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client PartitionKeyRangeIDRegionClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client PartitionKeyRangeIDRegionClient) ListMetricsResponder(resp *http.Response) (result PartitionMetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/percentile.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/percentile.go new file mode 100644 index 000000000000..7e730946e8d8 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/percentile.go @@ -0,0 +1,137 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PercentileClient is the azure Cosmos DB Database Service Resource Provider REST API +type PercentileClient struct { + BaseClient +} + +// NewPercentileClient creates an instance of the PercentileClient client. +func NewPercentileClient(subscriptionID string, subscriptionID1 string) PercentileClient { + return NewPercentileClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewPercentileClientWithBaseURI creates an instance of the PercentileClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileClient { + return PercentileClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given database account. This url is only +// for PBS and Replication Latency data +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client PercentileClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, filter string) (result PercentileMetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PercentileClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PercentileClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PercentileClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.PercentileClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PercentileClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client PercentileClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, filter 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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client PercentileClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client PercentileClient) ListMetricsResponder(resp *http.Response) (result PercentileMetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/percentilesourcetarget.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/percentilesourcetarget.go new file mode 100644 index 000000000000..ffe426d5a844 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/percentilesourcetarget.go @@ -0,0 +1,144 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PercentileSourceTargetClient is the azure Cosmos DB Database Service Resource Provider REST API +type PercentileSourceTargetClient struct { + BaseClient +} + +// NewPercentileSourceTargetClient creates an instance of the PercentileSourceTargetClient client. +func NewPercentileSourceTargetClient(subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient { + return NewPercentileSourceTargetClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewPercentileSourceTargetClientWithBaseURI creates an instance of the PercentileSourceTargetClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient { + return PercentileSourceTargetClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given account, source and target region. +// This url is only for PBS and Replication Latency data +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// sourceRegion - source region from which data is written. Cosmos DB region, with spaces between words and +// each word capitalized. +// targetRegion - target region to which data is written. Cosmos DB region, with spaces between words and each +// word capitalized. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client PercentileSourceTargetClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, sourceRegion string, targetRegion string, filter string) (result PercentileMetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PercentileSourceTargetClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PercentileSourceTargetClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, sourceRegion, targetRegion, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PercentileSourceTargetClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.PercentileSourceTargetClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PercentileSourceTargetClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client PercentileSourceTargetClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, sourceRegion string, targetRegion string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sourceRegion": autorest.Encode("path", sourceRegion), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "targetRegion": autorest.Encode("path", targetRegion), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client PercentileSourceTargetClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client PercentileSourceTargetClient) ListMetricsResponder(resp *http.Response) (result PercentileMetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/percentiletarget.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/percentiletarget.go new file mode 100644 index 000000000000..756f3678c8d6 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/percentiletarget.go @@ -0,0 +1,141 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PercentileTargetClient is the azure Cosmos DB Database Service Resource Provider REST API +type PercentileTargetClient struct { + BaseClient +} + +// NewPercentileTargetClient creates an instance of the PercentileTargetClient client. +func NewPercentileTargetClient(subscriptionID string, subscriptionID1 string) PercentileTargetClient { + return NewPercentileTargetClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewPercentileTargetClientWithBaseURI creates an instance of the PercentileTargetClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileTargetClient { + return PercentileTargetClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// ListMetrics retrieves the metrics determined by the given filter for the given account target region. This url is +// only for PBS and Replication Latency data +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// targetRegion - target region to which data is written. Cosmos DB region, with spaces between words and each +// word capitalized. +// filter - an OData filter expression that describes a subset of metrics to return. The parameters that can be +// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and +// timeGrain. The supported operator is eq. +func (client PercentileTargetClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, targetRegion string, filter string) (result PercentileMetricListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PercentileTargetClient.ListMetrics") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PercentileTargetClient", "ListMetrics", err.Error()) + } + + req, err := client.ListMetricsPreparer(ctx, resourceGroupName, accountName, targetRegion, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PercentileTargetClient", "ListMetrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListMetricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.PercentileTargetClient", "ListMetrics", resp, "Failure sending request") + return + } + + result, err = client.ListMetricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PercentileTargetClient", "ListMetrics", resp, "Failure responding to request") + } + + return +} + +// ListMetricsPreparer prepares the ListMetrics request. +func (client PercentileTargetClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, accountName string, targetRegion string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "targetRegion": autorest.Encode("path", targetRegion), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client PercentileTargetClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client PercentileTargetClient) ListMetricsResponder(resp *http.Response) (result PercentileMetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/privateendpointconnections.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/privateendpointconnections.go new file mode 100644 index 000000000000..cd07529ec10e --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/privateendpointconnections.go @@ -0,0 +1,415 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateEndpointConnectionsClient is the azure Cosmos DB Database Service Resource Provider REST API +type PrivateEndpointConnectionsClient struct { + BaseClient +} + +// NewPrivateEndpointConnectionsClient creates an instance of the PrivateEndpointConnectionsClient client. +func NewPrivateEndpointConnectionsClient(subscriptionID string, subscriptionID1 string) PrivateEndpointConnectionsClient { + return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// 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, subscriptionID1 string) PrivateEndpointConnectionsClient { + return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// CreateOrUpdate approve or reject a private endpoint connection with a given name. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// accountName - cosmos DB database account name. +// privateEndpointConnectionName - the name of the private endpoint connection. +func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PrivateEndpointConnectionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateEndpointConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a private endpoint connection with a given name. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// accountName - cosmos DB database account name. +// privateEndpointConnectionName - the name of the private endpoint connection. +func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.DocumentDB/databaseAccounts/{accountName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a private endpoint connection. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// accountName - cosmos DB database account name. +// privateEndpointConnectionName - the name of the private endpoint connection. +func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.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, "documentdb.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.DocumentDB/databaseAccounts/{accountName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabaseAccount list all private endpoint connections on a Cosmos DB account. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// accountName - cosmos DB database account name. +func (client PrivateEndpointConnectionsClient) ListByDatabaseAccount(ctx context.Context, resourceGroupName string, accountName string) (result PrivateEndpointConnectionListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByDatabaseAccount") + defer func() { + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PrivateEndpointConnectionsClient", "ListByDatabaseAccount", err.Error()) + } + + req, err := client.ListByDatabaseAccountPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsClient", "ListByDatabaseAccount", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsClient", "ListByDatabaseAccount", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateEndpointConnectionsClient", "ListByDatabaseAccount", resp, "Failure responding to request") + } + + return +} + +// ListByDatabaseAccountPreparer prepares the ListByDatabaseAccount request. +func (client PrivateEndpointConnectionsClient) ListByDatabaseAccountPreparer(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 = "2019-08-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.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByDatabaseAccountSender sends the ListByDatabaseAccount request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) ListByDatabaseAccountSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByDatabaseAccountResponder handles the response to the ListByDatabaseAccount request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) ListByDatabaseAccountResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/privatelinkresources.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/privatelinkresources.go new file mode 100644 index 000000000000..fea8f87d8af6 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/privatelinkresources.go @@ -0,0 +1,224 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateLinkResourcesClient is the azure Cosmos DB Database Service Resource Provider REST API +type PrivateLinkResourcesClient struct { + BaseClient +} + +// NewPrivateLinkResourcesClient creates an instance of the PrivateLinkResourcesClient client. +func NewPrivateLinkResourcesClient(subscriptionID string, subscriptionID1 string) PrivateLinkResourcesClient { + return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// 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, subscriptionID1 string) PrivateLinkResourcesClient { + return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// Get gets the private link resources that need to be created for a Cosmos DB account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// groupName - the name of the private link resource. +func (client PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, accountName string, groupName 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: 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PrivateLinkResourcesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, groupName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.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, "documentdb.PrivateLinkResourcesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateLinkResourcesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkResourcesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, groupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "groupName": autorest.Encode("path", groupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabaseAccount gets the private link resources that need to be created for a Cosmos DB account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client PrivateLinkResourcesClient) ListByDatabaseAccount(ctx context.Context, resourceGroupName string, accountName string) (result PrivateLinkResourceListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByDatabaseAccount") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.PrivateLinkResourcesClient", "ListByDatabaseAccount", err.Error()) + } + + req, err := client.ListByDatabaseAccountPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateLinkResourcesClient", "ListByDatabaseAccount", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.PrivateLinkResourcesClient", "ListByDatabaseAccount", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.PrivateLinkResourcesClient", "ListByDatabaseAccount", resp, "Failure responding to request") + } + + return +} + +// ListByDatabaseAccountPreparer prepares the ListByDatabaseAccount request. +func (client PrivateLinkResourcesClient) ListByDatabaseAccountPreparer(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 = "2019-08-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.DocumentDB/databaseAccounts/{accountName}/privateLinkResources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByDatabaseAccountSender sends the ListByDatabaseAccount request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkResourcesClient) ListByDatabaseAccountSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByDatabaseAccountResponder handles the response to the ListByDatabaseAccount request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) ListByDatabaseAccountResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/sqlresources.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/sqlresources.go new file mode 100644 index 000000000000..262864fac7e2 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/sqlresources.go @@ -0,0 +1,2343 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SQLResourcesClient is the azure Cosmos DB Database Service Resource Provider REST API +type SQLResourcesClient struct { + BaseClient +} + +// NewSQLResourcesClient creates an instance of the SQLResourcesClient client. +func NewSQLResourcesClient(subscriptionID string, subscriptionID1 string) SQLResourcesClient { + return NewSQLResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewSQLResourcesClientWithBaseURI creates an instance of the SQLResourcesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSQLResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) SQLResourcesClient { + return SQLResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// CreateUpdateSQLContainer create or update an Azure Cosmos DB SQL container +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// createUpdateSQLContainerParameters - the parameters to provide for the current SQL container. +func (client SQLResourcesClient) CreateUpdateSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, createUpdateSQLContainerParameters SQLContainerCreateUpdateParameters) (result SQLResourcesCreateUpdateSQLContainerFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.CreateUpdateSQLContainer") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateSQLContainerParameters, + Constraints: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, + {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, + }}, + {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "CreateUpdateSQLContainer", err.Error()) + } + + req, err := client.CreateUpdateSQLContainerPreparer(ctx, resourceGroupName, accountName, databaseName, containerName, createUpdateSQLContainerParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLContainer", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateSQLContainerSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLContainer", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateSQLContainerPreparer prepares the CreateUpdateSQLContainer request. +func (client SQLResourcesClient) CreateUpdateSQLContainerPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, createUpdateSQLContainerParameters SQLContainerCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", pathParameters), + autorest.WithJSON(createUpdateSQLContainerParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateSQLContainerSender sends the CreateUpdateSQLContainer request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) CreateUpdateSQLContainerSender(req *http.Request) (future SQLResourcesCreateUpdateSQLContainerFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateSQLContainerResponder handles the response to the CreateUpdateSQLContainer request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) CreateUpdateSQLContainerResponder(resp *http.Response) (result SQLContainerGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateUpdateSQLDatabase create or update an Azure Cosmos DB SQL database +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// createUpdateSQLDatabaseParameters - the parameters to provide for the current SQL database. +func (client SQLResourcesClient) CreateUpdateSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateSQLDatabaseParameters SQLDatabaseCreateUpdateParameters) (result SQLResourcesCreateUpdateSQLDatabaseFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.CreateUpdateSQLDatabase") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateSQLDatabaseParameters, + Constraints: []validation.Constraint{{Target: "createUpdateSQLDatabaseParameters.SQLDatabaseCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLDatabaseParameters.SQLDatabaseCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLDatabaseParameters.SQLDatabaseCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateSQLDatabaseParameters.SQLDatabaseCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "CreateUpdateSQLDatabase", err.Error()) + } + + req, err := client.CreateUpdateSQLDatabasePreparer(ctx, resourceGroupName, accountName, databaseName, createUpdateSQLDatabaseParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLDatabase", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateSQLDatabaseSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLDatabase", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateSQLDatabasePreparer prepares the CreateUpdateSQLDatabase request. +func (client SQLResourcesClient) CreateUpdateSQLDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, createUpdateSQLDatabaseParameters SQLDatabaseCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", pathParameters), + autorest.WithJSON(createUpdateSQLDatabaseParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateSQLDatabaseSender sends the CreateUpdateSQLDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) CreateUpdateSQLDatabaseSender(req *http.Request) (future SQLResourcesCreateUpdateSQLDatabaseFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateSQLDatabaseResponder handles the response to the CreateUpdateSQLDatabase request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) CreateUpdateSQLDatabaseResponder(resp *http.Response) (result SQLDatabaseGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateUpdateSQLStoredProcedure create or update an Azure Cosmos DB SQL storedProcedure +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// storedProcedureName - cosmos DB storedProcedure name. +// createUpdateSQLStoredProcedureParameters - the parameters to provide for the current SQL storedProcedure. +func (client SQLResourcesClient) CreateUpdateSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, createUpdateSQLStoredProcedureParameters SQLStoredProcedureCreateUpdateParameters) (result SQLResourcesCreateUpdateSQLStoredProcedureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.CreateUpdateSQLStoredProcedure") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateSQLStoredProcedureParameters, + Constraints: []validation.Constraint{{Target: "createUpdateSQLStoredProcedureParameters.SQLStoredProcedureCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLStoredProcedureParameters.SQLStoredProcedureCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLStoredProcedureParameters.SQLStoredProcedureCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateSQLStoredProcedureParameters.SQLStoredProcedureCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "CreateUpdateSQLStoredProcedure", err.Error()) + } + + req, err := client.CreateUpdateSQLStoredProcedurePreparer(ctx, resourceGroupName, accountName, databaseName, containerName, storedProcedureName, createUpdateSQLStoredProcedureParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLStoredProcedure", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateSQLStoredProcedureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLStoredProcedure", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateSQLStoredProcedurePreparer prepares the CreateUpdateSQLStoredProcedure request. +func (client SQLResourcesClient) CreateUpdateSQLStoredProcedurePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string, createUpdateSQLStoredProcedureParameters SQLStoredProcedureCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "storedProcedureName": autorest.Encode("path", storedProcedureName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", pathParameters), + autorest.WithJSON(createUpdateSQLStoredProcedureParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateSQLStoredProcedureSender sends the CreateUpdateSQLStoredProcedure request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) CreateUpdateSQLStoredProcedureSender(req *http.Request) (future SQLResourcesCreateUpdateSQLStoredProcedureFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateSQLStoredProcedureResponder handles the response to the CreateUpdateSQLStoredProcedure request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) CreateUpdateSQLStoredProcedureResponder(resp *http.Response) (result SQLStoredProcedureGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateUpdateSQLTrigger create or update an Azure Cosmos DB SQL trigger +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// triggerName - cosmos DB trigger name. +// createUpdateSQLTriggerParameters - the parameters to provide for the current SQL trigger. +func (client SQLResourcesClient) CreateUpdateSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, createUpdateSQLTriggerParameters SQLTriggerCreateUpdateParameters) (result SQLResourcesCreateUpdateSQLTriggerFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.CreateUpdateSQLTrigger") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateSQLTriggerParameters, + Constraints: []validation.Constraint{{Target: "createUpdateSQLTriggerParameters.SQLTriggerCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLTriggerParameters.SQLTriggerCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLTriggerParameters.SQLTriggerCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateSQLTriggerParameters.SQLTriggerCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "CreateUpdateSQLTrigger", err.Error()) + } + + req, err := client.CreateUpdateSQLTriggerPreparer(ctx, resourceGroupName, accountName, databaseName, containerName, triggerName, createUpdateSQLTriggerParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLTrigger", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateSQLTriggerSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLTrigger", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateSQLTriggerPreparer prepares the CreateUpdateSQLTrigger request. +func (client SQLResourcesClient) CreateUpdateSQLTriggerPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string, createUpdateSQLTriggerParameters SQLTriggerCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", pathParameters), + autorest.WithJSON(createUpdateSQLTriggerParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateSQLTriggerSender sends the CreateUpdateSQLTrigger request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) CreateUpdateSQLTriggerSender(req *http.Request) (future SQLResourcesCreateUpdateSQLTriggerFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateSQLTriggerResponder handles the response to the CreateUpdateSQLTrigger request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) CreateUpdateSQLTriggerResponder(resp *http.Response) (result SQLTriggerGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateUpdateSQLUserDefinedFunction create or update an Azure Cosmos DB SQL userDefinedFunction +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// userDefinedFunctionName - cosmos DB userDefinedFunction name. +// createUpdateSQLUserDefinedFunctionParameters - the parameters to provide for the current SQL +// userDefinedFunction. +func (client SQLResourcesClient) CreateUpdateSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, createUpdateSQLUserDefinedFunctionParameters SQLUserDefinedFunctionCreateUpdateParameters) (result SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.CreateUpdateSQLUserDefinedFunction") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateSQLUserDefinedFunctionParameters, + Constraints: []validation.Constraint{{Target: "createUpdateSQLUserDefinedFunctionParameters.SQLUserDefinedFunctionCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLUserDefinedFunctionParameters.SQLUserDefinedFunctionCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateSQLUserDefinedFunctionParameters.SQLUserDefinedFunctionCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateSQLUserDefinedFunctionParameters.SQLUserDefinedFunctionCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "CreateUpdateSQLUserDefinedFunction", err.Error()) + } + + req, err := client.CreateUpdateSQLUserDefinedFunctionPreparer(ctx, resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, createUpdateSQLUserDefinedFunctionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLUserDefinedFunction", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateSQLUserDefinedFunctionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "CreateUpdateSQLUserDefinedFunction", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateSQLUserDefinedFunctionPreparer prepares the CreateUpdateSQLUserDefinedFunction request. +func (client SQLResourcesClient) CreateUpdateSQLUserDefinedFunctionPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string, createUpdateSQLUserDefinedFunctionParameters SQLUserDefinedFunctionCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "userDefinedFunctionName": autorest.Encode("path", userDefinedFunctionName), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", pathParameters), + autorest.WithJSON(createUpdateSQLUserDefinedFunctionParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateSQLUserDefinedFunctionSender sends the CreateUpdateSQLUserDefinedFunction request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) CreateUpdateSQLUserDefinedFunctionSender(req *http.Request) (future SQLResourcesCreateUpdateSQLUserDefinedFunctionFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateSQLUserDefinedFunctionResponder handles the response to the CreateUpdateSQLUserDefinedFunction request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) CreateUpdateSQLUserDefinedFunctionResponder(resp *http.Response) (result SQLUserDefinedFunctionGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DeleteSQLContainer deletes an existing Azure Cosmos DB SQL container. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +func (client SQLResourcesClient) DeleteSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result SQLResourcesDeleteSQLContainerFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.DeleteSQLContainer") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "DeleteSQLContainer", err.Error()) + } + + req, err := client.DeleteSQLContainerPreparer(ctx, resourceGroupName, accountName, databaseName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLContainer", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSQLContainerSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLContainer", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteSQLContainerPreparer prepares the DeleteSQLContainer request. +func (client SQLResourcesClient) DeleteSQLContainerPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSQLContainerSender sends the DeleteSQLContainer request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) DeleteSQLContainerSender(req *http.Request) (future SQLResourcesDeleteSQLContainerFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteSQLContainerResponder handles the response to the DeleteSQLContainer request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) DeleteSQLContainerResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteSQLDatabase deletes an existing Azure Cosmos DB SQL database. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client SQLResourcesClient) DeleteSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result SQLResourcesDeleteSQLDatabaseFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.DeleteSQLDatabase") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "DeleteSQLDatabase", err.Error()) + } + + req, err := client.DeleteSQLDatabasePreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLDatabase", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSQLDatabaseSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLDatabase", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteSQLDatabasePreparer prepares the DeleteSQLDatabase request. +func (client SQLResourcesClient) DeleteSQLDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSQLDatabaseSender sends the DeleteSQLDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) DeleteSQLDatabaseSender(req *http.Request) (future SQLResourcesDeleteSQLDatabaseFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteSQLDatabaseResponder handles the response to the DeleteSQLDatabase request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) DeleteSQLDatabaseResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteSQLStoredProcedure deletes an existing Azure Cosmos DB SQL storedProcedure. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// storedProcedureName - cosmos DB storedProcedure name. +func (client SQLResourcesClient) DeleteSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string) (result SQLResourcesDeleteSQLStoredProcedureFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.DeleteSQLStoredProcedure") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "DeleteSQLStoredProcedure", err.Error()) + } + + req, err := client.DeleteSQLStoredProcedurePreparer(ctx, resourceGroupName, accountName, databaseName, containerName, storedProcedureName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLStoredProcedure", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSQLStoredProcedureSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLStoredProcedure", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteSQLStoredProcedurePreparer prepares the DeleteSQLStoredProcedure request. +func (client SQLResourcesClient) DeleteSQLStoredProcedurePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "storedProcedureName": autorest.Encode("path", storedProcedureName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSQLStoredProcedureSender sends the DeleteSQLStoredProcedure request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) DeleteSQLStoredProcedureSender(req *http.Request) (future SQLResourcesDeleteSQLStoredProcedureFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteSQLStoredProcedureResponder handles the response to the DeleteSQLStoredProcedure request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) DeleteSQLStoredProcedureResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteSQLTrigger deletes an existing Azure Cosmos DB SQL trigger. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// triggerName - cosmos DB trigger name. +func (client SQLResourcesClient) DeleteSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string) (result SQLResourcesDeleteSQLTriggerFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.DeleteSQLTrigger") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "DeleteSQLTrigger", err.Error()) + } + + req, err := client.DeleteSQLTriggerPreparer(ctx, resourceGroupName, accountName, databaseName, containerName, triggerName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLTrigger", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSQLTriggerSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLTrigger", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteSQLTriggerPreparer prepares the DeleteSQLTrigger request. +func (client SQLResourcesClient) DeleteSQLTriggerPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSQLTriggerSender sends the DeleteSQLTrigger request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) DeleteSQLTriggerSender(req *http.Request) (future SQLResourcesDeleteSQLTriggerFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteSQLTriggerResponder handles the response to the DeleteSQLTrigger request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) DeleteSQLTriggerResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteSQLUserDefinedFunction deletes an existing Azure Cosmos DB SQL userDefinedFunction. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// userDefinedFunctionName - cosmos DB userDefinedFunction name. +func (client SQLResourcesClient) DeleteSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string) (result SQLResourcesDeleteSQLUserDefinedFunctionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.DeleteSQLUserDefinedFunction") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "DeleteSQLUserDefinedFunction", err.Error()) + } + + req, err := client.DeleteSQLUserDefinedFunctionPreparer(ctx, resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLUserDefinedFunction", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSQLUserDefinedFunctionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "DeleteSQLUserDefinedFunction", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteSQLUserDefinedFunctionPreparer prepares the DeleteSQLUserDefinedFunction request. +func (client SQLResourcesClient) DeleteSQLUserDefinedFunctionPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "userDefinedFunctionName": autorest.Encode("path", userDefinedFunctionName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSQLUserDefinedFunctionSender sends the DeleteSQLUserDefinedFunction request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) DeleteSQLUserDefinedFunctionSender(req *http.Request) (future SQLResourcesDeleteSQLUserDefinedFunctionFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteSQLUserDefinedFunctionResponder handles the response to the DeleteSQLUserDefinedFunction request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) DeleteSQLUserDefinedFunctionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetSQLContainer gets the SQL container under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +func (client SQLResourcesClient) GetSQLContainer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result SQLContainerGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.GetSQLContainer") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "GetSQLContainer", err.Error()) + } + + req, err := client.GetSQLContainerPreparer(ctx, resourceGroupName, accountName, databaseName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLContainer", nil, "Failure preparing request") + return + } + + resp, err := client.GetSQLContainerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLContainer", resp, "Failure sending request") + return + } + + result, err = client.GetSQLContainerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLContainer", resp, "Failure responding to request") + } + + return +} + +// GetSQLContainerPreparer prepares the GetSQLContainer request. +func (client SQLResourcesClient) GetSQLContainerPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSQLContainerSender sends the GetSQLContainer request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) GetSQLContainerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetSQLContainerResponder handles the response to the GetSQLContainer request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) GetSQLContainerResponder(resp *http.Response) (result SQLContainerGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSQLContainerThroughput gets the RUs per second of the SQL container under an existing Azure Cosmos DB database +// account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +func (client SQLResourcesClient) GetSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.GetSQLContainerThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "GetSQLContainerThroughput", err.Error()) + } + + req, err := client.GetSQLContainerThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLContainerThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetSQLContainerThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLContainerThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetSQLContainerThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLContainerThroughput", resp, "Failure responding to request") + } + + return +} + +// GetSQLContainerThroughputPreparer prepares the GetSQLContainerThroughput request. +func (client SQLResourcesClient) GetSQLContainerThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSQLContainerThroughputSender sends the GetSQLContainerThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) GetSQLContainerThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetSQLContainerThroughputResponder handles the response to the GetSQLContainerThroughput request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) GetSQLContainerThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSQLDatabase gets the SQL database under an existing Azure Cosmos DB database account with the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client SQLResourcesClient) GetSQLDatabase(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result SQLDatabaseGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.GetSQLDatabase") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "GetSQLDatabase", err.Error()) + } + + req, err := client.GetSQLDatabasePreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.GetSQLDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLDatabase", resp, "Failure sending request") + return + } + + result, err = client.GetSQLDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLDatabase", resp, "Failure responding to request") + } + + return +} + +// GetSQLDatabasePreparer prepares the GetSQLDatabase request. +func (client SQLResourcesClient) GetSQLDatabasePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSQLDatabaseSender sends the GetSQLDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) GetSQLDatabaseSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetSQLDatabaseResponder handles the response to the GetSQLDatabase request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) GetSQLDatabaseResponder(resp *http.Response) (result SQLDatabaseGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSQLDatabaseThroughput gets the RUs per second of the SQL database under an existing Azure Cosmos DB database +// account with the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client SQLResourcesClient) GetSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.GetSQLDatabaseThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "GetSQLDatabaseThroughput", err.Error()) + } + + req, err := client.GetSQLDatabaseThroughputPreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLDatabaseThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetSQLDatabaseThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLDatabaseThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetSQLDatabaseThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLDatabaseThroughput", resp, "Failure responding to request") + } + + return +} + +// GetSQLDatabaseThroughputPreparer prepares the GetSQLDatabaseThroughput request. +func (client SQLResourcesClient) GetSQLDatabaseThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSQLDatabaseThroughputSender sends the GetSQLDatabaseThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) GetSQLDatabaseThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetSQLDatabaseThroughputResponder handles the response to the GetSQLDatabaseThroughput request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) GetSQLDatabaseThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSQLStoredProcedure gets the SQL storedProcedure under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// storedProcedureName - cosmos DB storedProcedure name. +func (client SQLResourcesClient) GetSQLStoredProcedure(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string) (result SQLStoredProcedureGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.GetSQLStoredProcedure") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "GetSQLStoredProcedure", err.Error()) + } + + req, err := client.GetSQLStoredProcedurePreparer(ctx, resourceGroupName, accountName, databaseName, containerName, storedProcedureName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLStoredProcedure", nil, "Failure preparing request") + return + } + + resp, err := client.GetSQLStoredProcedureSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLStoredProcedure", resp, "Failure sending request") + return + } + + result, err = client.GetSQLStoredProcedureResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLStoredProcedure", resp, "Failure responding to request") + } + + return +} + +// GetSQLStoredProcedurePreparer prepares the GetSQLStoredProcedure request. +func (client SQLResourcesClient) GetSQLStoredProcedurePreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, storedProcedureName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "storedProcedureName": autorest.Encode("path", storedProcedureName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSQLStoredProcedureSender sends the GetSQLStoredProcedure request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) GetSQLStoredProcedureSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetSQLStoredProcedureResponder handles the response to the GetSQLStoredProcedure request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) GetSQLStoredProcedureResponder(resp *http.Response) (result SQLStoredProcedureGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSQLTrigger gets the SQL trigger under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// triggerName - cosmos DB trigger name. +func (client SQLResourcesClient) GetSQLTrigger(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string) (result SQLTriggerGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.GetSQLTrigger") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "GetSQLTrigger", err.Error()) + } + + req, err := client.GetSQLTriggerPreparer(ctx, resourceGroupName, accountName, databaseName, containerName, triggerName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLTrigger", nil, "Failure preparing request") + return + } + + resp, err := client.GetSQLTriggerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLTrigger", resp, "Failure sending request") + return + } + + result, err = client.GetSQLTriggerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLTrigger", resp, "Failure responding to request") + } + + return +} + +// GetSQLTriggerPreparer prepares the GetSQLTrigger request. +func (client SQLResourcesClient) GetSQLTriggerPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, triggerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "triggerName": autorest.Encode("path", triggerName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSQLTriggerSender sends the GetSQLTrigger request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) GetSQLTriggerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetSQLTriggerResponder handles the response to the GetSQLTrigger request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) GetSQLTriggerResponder(resp *http.Response) (result SQLTriggerGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSQLUserDefinedFunction gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// userDefinedFunctionName - cosmos DB userDefinedFunction name. +func (client SQLResourcesClient) GetSQLUserDefinedFunction(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string) (result SQLUserDefinedFunctionGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.GetSQLUserDefinedFunction") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "GetSQLUserDefinedFunction", err.Error()) + } + + req, err := client.GetSQLUserDefinedFunctionPreparer(ctx, resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLUserDefinedFunction", nil, "Failure preparing request") + return + } + + resp, err := client.GetSQLUserDefinedFunctionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLUserDefinedFunction", resp, "Failure sending request") + return + } + + result, err = client.GetSQLUserDefinedFunctionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "GetSQLUserDefinedFunction", resp, "Failure responding to request") + } + + return +} + +// GetSQLUserDefinedFunctionPreparer prepares the GetSQLUserDefinedFunction request. +func (client SQLResourcesClient) GetSQLUserDefinedFunctionPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, userDefinedFunctionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "userDefinedFunctionName": autorest.Encode("path", userDefinedFunctionName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSQLUserDefinedFunctionSender sends the GetSQLUserDefinedFunction request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) GetSQLUserDefinedFunctionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetSQLUserDefinedFunctionResponder handles the response to the GetSQLUserDefinedFunction request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) GetSQLUserDefinedFunctionResponder(resp *http.Response) (result SQLUserDefinedFunctionGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSQLContainers lists the SQL container under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +func (client SQLResourcesClient) ListSQLContainers(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (result SQLContainerListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.ListSQLContainers") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "ListSQLContainers", err.Error()) + } + + req, err := client.ListSQLContainersPreparer(ctx, resourceGroupName, accountName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLContainers", nil, "Failure preparing request") + return + } + + resp, err := client.ListSQLContainersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLContainers", resp, "Failure sending request") + return + } + + result, err = client.ListSQLContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLContainers", resp, "Failure responding to request") + } + + return +} + +// ListSQLContainersPreparer prepares the ListSQLContainers request. +func (client SQLResourcesClient) ListSQLContainersPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSQLContainersSender sends the ListSQLContainers request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) ListSQLContainersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSQLContainersResponder handles the response to the ListSQLContainers request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) ListSQLContainersResponder(resp *http.Response) (result SQLContainerListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSQLDatabases lists the SQL databases under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client SQLResourcesClient) ListSQLDatabases(ctx context.Context, resourceGroupName string, accountName string) (result SQLDatabaseListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.ListSQLDatabases") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "ListSQLDatabases", err.Error()) + } + + req, err := client.ListSQLDatabasesPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLDatabases", nil, "Failure preparing request") + return + } + + resp, err := client.ListSQLDatabasesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLDatabases", resp, "Failure sending request") + return + } + + result, err = client.ListSQLDatabasesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLDatabases", resp, "Failure responding to request") + } + + return +} + +// ListSQLDatabasesPreparer prepares the ListSQLDatabases request. +func (client SQLResourcesClient) ListSQLDatabasesPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSQLDatabasesSender sends the ListSQLDatabases request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) ListSQLDatabasesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSQLDatabasesResponder handles the response to the ListSQLDatabases request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) ListSQLDatabasesResponder(resp *http.Response) (result SQLDatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSQLStoredProcedures lists the SQL storedProcedure under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +func (client SQLResourcesClient) ListSQLStoredProcedures(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result SQLStoredProcedureListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.ListSQLStoredProcedures") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "ListSQLStoredProcedures", err.Error()) + } + + req, err := client.ListSQLStoredProceduresPreparer(ctx, resourceGroupName, accountName, databaseName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLStoredProcedures", nil, "Failure preparing request") + return + } + + resp, err := client.ListSQLStoredProceduresSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLStoredProcedures", resp, "Failure sending request") + return + } + + result, err = client.ListSQLStoredProceduresResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLStoredProcedures", resp, "Failure responding to request") + } + + return +} + +// ListSQLStoredProceduresPreparer prepares the ListSQLStoredProcedures request. +func (client SQLResourcesClient) ListSQLStoredProceduresPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSQLStoredProceduresSender sends the ListSQLStoredProcedures request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) ListSQLStoredProceduresSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSQLStoredProceduresResponder handles the response to the ListSQLStoredProcedures request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) ListSQLStoredProceduresResponder(resp *http.Response) (result SQLStoredProcedureListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSQLTriggers lists the SQL trigger under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +func (client SQLResourcesClient) ListSQLTriggers(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result SQLTriggerListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.ListSQLTriggers") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "ListSQLTriggers", err.Error()) + } + + req, err := client.ListSQLTriggersPreparer(ctx, resourceGroupName, accountName, databaseName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLTriggers", nil, "Failure preparing request") + return + } + + resp, err := client.ListSQLTriggersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLTriggers", resp, "Failure sending request") + return + } + + result, err = client.ListSQLTriggersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLTriggers", resp, "Failure responding to request") + } + + return +} + +// ListSQLTriggersPreparer prepares the ListSQLTriggers request. +func (client SQLResourcesClient) ListSQLTriggersPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSQLTriggersSender sends the ListSQLTriggers request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) ListSQLTriggersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSQLTriggersResponder handles the response to the ListSQLTriggers request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) ListSQLTriggersResponder(resp *http.Response) (result SQLTriggerListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSQLUserDefinedFunctions lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +func (client SQLResourcesClient) ListSQLUserDefinedFunctions(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (result SQLUserDefinedFunctionListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.ListSQLUserDefinedFunctions") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "ListSQLUserDefinedFunctions", err.Error()) + } + + req, err := client.ListSQLUserDefinedFunctionsPreparer(ctx, resourceGroupName, accountName, databaseName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLUserDefinedFunctions", nil, "Failure preparing request") + return + } + + resp, err := client.ListSQLUserDefinedFunctionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLUserDefinedFunctions", resp, "Failure sending request") + return + } + + result, err = client.ListSQLUserDefinedFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "ListSQLUserDefinedFunctions", resp, "Failure responding to request") + } + + return +} + +// ListSQLUserDefinedFunctionsPreparer prepares the ListSQLUserDefinedFunctions request. +func (client SQLResourcesClient) ListSQLUserDefinedFunctionsPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSQLUserDefinedFunctionsSender sends the ListSQLUserDefinedFunctions request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) ListSQLUserDefinedFunctionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSQLUserDefinedFunctionsResponder handles the response to the ListSQLUserDefinedFunctions request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) ListSQLUserDefinedFunctionsResponder(resp *http.Response) (result SQLUserDefinedFunctionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateSQLContainerThroughput update RUs per second of an Azure Cosmos DB SQL container +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// containerName - cosmos DB container name. +// updateThroughputParameters - the parameters to provide for the RUs per second of the current SQL container. +func (client SQLResourcesClient) UpdateSQLContainerThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result SQLResourcesUpdateSQLContainerThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.UpdateSQLContainerThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "UpdateSQLContainerThroughput", err.Error()) + } + + req, err := client.UpdateSQLContainerThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, containerName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "UpdateSQLContainerThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSQLContainerThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "UpdateSQLContainerThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateSQLContainerThroughputPreparer prepares the UpdateSQLContainerThroughput request. +func (client SQLResourcesClient) UpdateSQLContainerThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, containerName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "containerName": autorest.Encode("path", containerName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSQLContainerThroughputSender sends the UpdateSQLContainerThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) UpdateSQLContainerThroughputSender(req *http.Request) (future SQLResourcesUpdateSQLContainerThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateSQLContainerThroughputResponder handles the response to the UpdateSQLContainerThroughput request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) UpdateSQLContainerThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateSQLDatabaseThroughput update RUs per second of an Azure Cosmos DB SQL database +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// databaseName - cosmos DB database name. +// updateThroughputParameters - the parameters to provide for the RUs per second of the current SQL database. +func (client SQLResourcesClient) UpdateSQLDatabaseThroughput(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result SQLResourcesUpdateSQLDatabaseThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLResourcesClient.UpdateSQLDatabaseThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.SQLResourcesClient", "UpdateSQLDatabaseThroughput", err.Error()) + } + + req, err := client.UpdateSQLDatabaseThroughputPreparer(ctx, resourceGroupName, accountName, databaseName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "UpdateSQLDatabaseThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSQLDatabaseThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.SQLResourcesClient", "UpdateSQLDatabaseThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateSQLDatabaseThroughputPreparer prepares the UpdateSQLDatabaseThroughput request. +func (client SQLResourcesClient) UpdateSQLDatabaseThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, databaseName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSQLDatabaseThroughputSender sends the UpdateSQLDatabaseThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client SQLResourcesClient) UpdateSQLDatabaseThroughputSender(req *http.Request) (future SQLResourcesUpdateSQLDatabaseThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateSQLDatabaseThroughputResponder handles the response to the UpdateSQLDatabaseThroughput request. The method always +// closes the http.Response Body. +func (client SQLResourcesClient) UpdateSQLDatabaseThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/tableresources.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/tableresources.go new file mode 100644 index 000000000000..fc0e07807507 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/tableresources.go @@ -0,0 +1,604 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TableResourcesClient is the azure Cosmos DB Database Service Resource Provider REST API +type TableResourcesClient struct { + BaseClient +} + +// NewTableResourcesClient creates an instance of the TableResourcesClient client. +func NewTableResourcesClient(subscriptionID string, subscriptionID1 string) TableResourcesClient { + return NewTableResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) +} + +// NewTableResourcesClientWithBaseURI creates an instance of the TableResourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) TableResourcesClient { + return TableResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} +} + +// CreateUpdateTable create or update an Azure Cosmos DB Table +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// tableName - cosmos DB table name. +// createUpdateTableParameters - the parameters to provide for the current Table. +func (client TableResourcesClient) CreateUpdateTable(ctx context.Context, resourceGroupName string, accountName string, tableName string, createUpdateTableParameters TableCreateUpdateParameters) (result TableResourcesCreateUpdateTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableResourcesClient.CreateUpdateTable") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: createUpdateTableParameters, + Constraints: []validation.Constraint{{Target: "createUpdateTableParameters.TableCreateUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateTableParameters.TableCreateUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createUpdateTableParameters.TableCreateUpdateProperties.Resource.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "createUpdateTableParameters.TableCreateUpdateProperties.Options", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.TableResourcesClient", "CreateUpdateTable", err.Error()) + } + + req, err := client.CreateUpdateTablePreparer(ctx, resourceGroupName, accountName, tableName, createUpdateTableParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "CreateUpdateTable", nil, "Failure preparing request") + return + } + + result, err = client.CreateUpdateTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "CreateUpdateTable", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateUpdateTablePreparer prepares the CreateUpdateTable request. +func (client TableResourcesClient) CreateUpdateTablePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string, createUpdateTableParameters TableCreateUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", pathParameters), + autorest.WithJSON(createUpdateTableParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateUpdateTableSender sends the CreateUpdateTable request. The method will close the +// http.Response Body if it receives an error. +func (client TableResourcesClient) CreateUpdateTableSender(req *http.Request) (future TableResourcesCreateUpdateTableFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateUpdateTableResponder handles the response to the CreateUpdateTable request. The method always +// closes the http.Response Body. +func (client TableResourcesClient) CreateUpdateTableResponder(resp *http.Response) (result TableGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DeleteTable deletes an existing Azure Cosmos DB Table. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// tableName - cosmos DB table name. +func (client TableResourcesClient) DeleteTable(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result TableResourcesDeleteTableFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableResourcesClient.DeleteTable") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.TableResourcesClient", "DeleteTable", err.Error()) + } + + req, err := client.DeleteTablePreparer(ctx, resourceGroupName, accountName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "DeleteTable", nil, "Failure preparing request") + return + } + + result, err = client.DeleteTableSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "DeleteTable", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteTablePreparer prepares the DeleteTable request. +func (client TableResourcesClient) DeleteTablePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteTableSender sends the DeleteTable request. The method will close the +// http.Response Body if it receives an error. +func (client TableResourcesClient) DeleteTableSender(req *http.Request) (future TableResourcesDeleteTableFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteTableResponder handles the response to the DeleteTable request. The method always +// closes the http.Response Body. +func (client TableResourcesClient) DeleteTableResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetTable gets the Tables under an existing Azure Cosmos DB database account with the provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// tableName - cosmos DB table name. +func (client TableResourcesClient) GetTable(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result TableGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableResourcesClient.GetTable") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.TableResourcesClient", "GetTable", err.Error()) + } + + req, err := client.GetTablePreparer(ctx, resourceGroupName, accountName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "GetTable", nil, "Failure preparing request") + return + } + + resp, err := client.GetTableSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "GetTable", resp, "Failure sending request") + return + } + + result, err = client.GetTableResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "GetTable", resp, "Failure responding to request") + } + + return +} + +// GetTablePreparer prepares the GetTable request. +func (client TableResourcesClient) GetTablePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetTableSender sends the GetTable request. The method will close the +// http.Response Body if it receives an error. +func (client TableResourcesClient) GetTableSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetTableResponder handles the response to the GetTable request. The method always +// closes the http.Response Body. +func (client TableResourcesClient) GetTableResponder(resp *http.Response) (result TableGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTableThroughput gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the +// provided name. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// tableName - cosmos DB table name. +func (client TableResourcesClient) GetTableThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result ThroughputSettingsGetResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableResourcesClient.GetTableThroughput") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.TableResourcesClient", "GetTableThroughput", err.Error()) + } + + req, err := client.GetTableThroughputPreparer(ctx, resourceGroupName, accountName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "GetTableThroughput", nil, "Failure preparing request") + return + } + + resp, err := client.GetTableThroughputSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "GetTableThroughput", resp, "Failure sending request") + return + } + + result, err = client.GetTableThroughputResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "GetTableThroughput", resp, "Failure responding to request") + } + + return +} + +// GetTableThroughputPreparer prepares the GetTableThroughput request. +func (client TableResourcesClient) GetTableThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetTableThroughputSender sends the GetTableThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client TableResourcesClient) GetTableThroughputSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetTableThroughputResponder handles the response to the GetTableThroughput request. The method always +// closes the http.Response Body. +func (client TableResourcesClient) GetTableThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTables lists the Tables under an existing Azure Cosmos DB database account. +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +func (client TableResourcesClient) ListTables(ctx context.Context, resourceGroupName string, accountName string) (result TableListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableResourcesClient.ListTables") + defer func() { + 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: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}}); err != nil { + return result, validation.NewError("documentdb.TableResourcesClient", "ListTables", err.Error()) + } + + req, err := client.ListTablesPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "ListTables", nil, "Failure preparing request") + return + } + + resp, err := client.ListTablesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "ListTables", resp, "Failure sending request") + return + } + + result, err = client.ListTablesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "ListTables", resp, "Failure responding to request") + } + + return +} + +// ListTablesPreparer prepares the ListTables request. +func (client TableResourcesClient) ListTablesPreparer(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 = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListTablesSender sends the ListTables request. The method will close the +// http.Response Body if it receives an error. +func (client TableResourcesClient) ListTablesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListTablesResponder handles the response to the ListTables request. The method always +// closes the http.Response Body. +func (client TableResourcesClient) ListTablesResponder(resp *http.Response) (result TableListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTableThroughput update RUs per second of an Azure Cosmos DB Table +// Parameters: +// resourceGroupName - name of an Azure resource group. +// accountName - cosmos DB database account name. +// tableName - cosmos DB table name. +// updateThroughputParameters - the parameters to provide for the RUs per second of the current Table. +func (client TableResourcesClient) UpdateTableThroughput(ctx context.Context, resourceGroupName string, accountName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (result TableResourcesUpdateTableThroughputFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableResourcesClient.UpdateTableThroughput") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, 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}, + {Target: "accountName", Name: validation.Pattern, Rule: `^[a-z0-9]+(-[a-z0-9]+)*`, Chain: nil}}}, + {TargetValue: updateThroughputParameters, + Constraints: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "updateThroughputParameters.ThroughputSettingsUpdateProperties.Resource.Throughput", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("documentdb.TableResourcesClient", "UpdateTableThroughput", err.Error()) + } + + req, err := client.UpdateTableThroughputPreparer(ctx, resourceGroupName, accountName, tableName, updateThroughputParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "UpdateTableThroughput", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTableThroughputSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "documentdb.TableResourcesClient", "UpdateTableThroughput", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTableThroughputPreparer prepares the UpdateTableThroughput request. +func (client TableResourcesClient) UpdateTableThroughputPreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string, updateThroughputParameters ThroughputSettingsUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-12-12" + 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.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default", pathParameters), + autorest.WithJSON(updateThroughputParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTableThroughputSender sends the UpdateTableThroughput request. The method will close the +// http.Response Body if it receives an error. +func (client TableResourcesClient) UpdateTableThroughputSender(req *http.Request) (future TableResourcesUpdateTableThroughputFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTableThroughputResponder handles the response to the UpdateTableThroughput request. The method always +// closes the http.Response Body. +func (client TableResourcesClient) UpdateTableThroughputResponder(resp *http.Response) (result ThroughputSettingsGetResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/cosmos-db/mgmt/2019-12-12/documentdb/version.go b/services/cosmos-db/mgmt/2019-12-12/documentdb/version.go new file mode 100644 index 000000000000..23bb00db60d5 --- /dev/null +++ b/services/cosmos-db/mgmt/2019-12-12/documentdb/version.go @@ -0,0 +1,30 @@ +package documentdb + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " documentdb/2019-12-12" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/billingaccountdimensions.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/billingaccountdimensions.go index 441f9acb4b4e..7b5ba55c1960 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/billingaccountdimensions.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/billingaccountdimensions.go @@ -36,7 +36,9 @@ func NewBillingAccountDimensionsClient(subscriptionID string) BillingAccountDime return NewBillingAccountDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBillingAccountDimensionsClientWithBaseURI creates an instance of the BillingAccountDimensionsClient client. +// NewBillingAccountDimensionsClientWithBaseURI creates an instance of the BillingAccountDimensionsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewBillingAccountDimensionsClientWithBaseURI(baseURI string, subscriptionID string) BillingAccountDimensionsClient { return BillingAccountDimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/client.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/client.go index 63f863cffa66..da13253173e0 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/client.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/costmanagementapi/interfaces.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/costmanagementapi/interfaces.go index 4ef51042f734..4864747b3429 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/costmanagementapi/interfaces.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/costmanagementapi/interfaces.go @@ -70,6 +70,7 @@ var _ ResourceGroupDimensionsClientAPI = (*costmanagement.ResourceGroupDimension // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result costmanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result costmanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*costmanagement.OperationsClient)(nil) diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/operations.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/operations.go index 29c5d263a605..7715d7556ac6 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/operations.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/reportconfig.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/reportconfig.go index 85d29456c95f..f015586e693d 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/reportconfig.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/reportconfig.go @@ -36,7 +36,8 @@ func NewReportConfigClient(subscriptionID string) ReportConfigClient { return NewReportConfigClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReportConfigClientWithBaseURI creates an instance of the ReportConfigClient client. +// NewReportConfigClientWithBaseURI creates an instance of the ReportConfigClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportConfigClientWithBaseURI(baseURI string, subscriptionID string) ReportConfigClient { return ReportConfigClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/resourcegroupdimensions.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/resourcegroupdimensions.go index 98a08e2ab3f6..089bdc66e000 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/resourcegroupdimensions.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/resourcegroupdimensions.go @@ -36,7 +36,9 @@ func NewResourceGroupDimensionsClient(subscriptionID string) ResourceGroupDimens return NewResourceGroupDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceGroupDimensionsClientWithBaseURI creates an instance of the ResourceGroupDimensionsClient client. +// NewResourceGroupDimensionsClientWithBaseURI creates an instance of the ResourceGroupDimensionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceGroupDimensionsClientWithBaseURI(baseURI string, subscriptionID string) ResourceGroupDimensionsClient { return ResourceGroupDimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/subscriptiondimensions.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/subscriptiondimensions.go index 0e2155d8499f..1a66d073906c 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/subscriptiondimensions.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/subscriptiondimensions.go @@ -36,7 +36,9 @@ func NewSubscriptionDimensionsClient(subscriptionID string) SubscriptionDimensio return NewSubscriptionDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionDimensionsClientWithBaseURI creates an instance of the SubscriptionDimensionsClient client. +// NewSubscriptionDimensionsClientWithBaseURI creates an instance of the SubscriptionDimensionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewSubscriptionDimensionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionDimensionsClient { return SubscriptionDimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/costmanagement/mgmt/2019-01-01/costmanagement/client.go b/services/costmanagement/mgmt/2019-01-01/costmanagement/client.go index 2bf25df0d98e..65586f5d4ef9 100644 --- a/services/costmanagement/mgmt/2019-01-01/costmanagement/client.go +++ b/services/costmanagement/mgmt/2019-01-01/costmanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/costmanagement/mgmt/2019-01-01/costmanagement/costmanagementapi/interfaces.go b/services/costmanagement/mgmt/2019-01-01/costmanagement/costmanagementapi/interfaces.go index cebfc869d44d..29c44dde2d4e 100644 --- a/services/costmanagement/mgmt/2019-01-01/costmanagement/costmanagementapi/interfaces.go +++ b/services/costmanagement/mgmt/2019-01-01/costmanagement/costmanagementapi/interfaces.go @@ -52,6 +52,7 @@ var _ ExportsClientAPI = (*costmanagement.ExportsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result costmanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result costmanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*costmanagement.OperationsClient)(nil) diff --git a/services/costmanagement/mgmt/2019-01-01/costmanagement/dimensions.go b/services/costmanagement/mgmt/2019-01-01/costmanagement/dimensions.go index 39e31d5869a5..2610dc35d3cc 100644 --- a/services/costmanagement/mgmt/2019-01-01/costmanagement/dimensions.go +++ b/services/costmanagement/mgmt/2019-01-01/costmanagement/dimensions.go @@ -36,7 +36,8 @@ func NewDimensionsClient(subscriptionID string) DimensionsClient { return NewDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client. +// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDimensionsClientWithBaseURI(baseURI string, subscriptionID string) DimensionsClient { return DimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/costmanagement/mgmt/2019-01-01/costmanagement/exports.go b/services/costmanagement/mgmt/2019-01-01/costmanagement/exports.go index 92a86288b3b8..4d5e1a3171ad 100644 --- a/services/costmanagement/mgmt/2019-01-01/costmanagement/exports.go +++ b/services/costmanagement/mgmt/2019-01-01/costmanagement/exports.go @@ -36,7 +36,8 @@ func NewExportsClient(subscriptionID string) ExportsClient { return NewExportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExportsClientWithBaseURI creates an instance of the ExportsClient client. +// NewExportsClientWithBaseURI creates an instance of the ExportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExportsClientWithBaseURI(baseURI string, subscriptionID string) ExportsClient { return ExportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/costmanagement/mgmt/2019-01-01/costmanagement/operations.go b/services/costmanagement/mgmt/2019-01-01/costmanagement/operations.go index 050b0145afba..c27984dddf75 100644 --- a/services/costmanagement/mgmt/2019-01-01/costmanagement/operations.go +++ b/services/costmanagement/mgmt/2019-01-01/costmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/costmanagement/mgmt/2019-01-01/costmanagement/query.go b/services/costmanagement/mgmt/2019-01-01/costmanagement/query.go index 2bfea775cdc7..e5abdae5861d 100644 --- a/services/costmanagement/mgmt/2019-01-01/costmanagement/query.go +++ b/services/costmanagement/mgmt/2019-01-01/costmanagement/query.go @@ -36,7 +36,8 @@ func NewQueryClient(subscriptionID string) QueryClient { return NewQueryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueryClientWithBaseURI creates an instance of the QueryClient client. +// NewQueryClientWithBaseURI creates an instance of the QueryClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryClientWithBaseURI(baseURI string, subscriptionID string) QueryClient { return QueryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/costmanagement/mgmt/2019-10-01/costmanagement/client.go b/services/costmanagement/mgmt/2019-10-01/costmanagement/client.go index 4b604b5ee4e5..497961a2c98a 100644 --- a/services/costmanagement/mgmt/2019-10-01/costmanagement/client.go +++ b/services/costmanagement/mgmt/2019-10-01/costmanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/costmanagement/mgmt/2019-10-01/costmanagement/costmanagementapi/interfaces.go b/services/costmanagement/mgmt/2019-10-01/costmanagement/costmanagementapi/interfaces.go index 99f0991e8484..2b203fdae114 100644 --- a/services/costmanagement/mgmt/2019-10-01/costmanagement/costmanagementapi/interfaces.go +++ b/services/costmanagement/mgmt/2019-10-01/costmanagement/costmanagementapi/interfaces.go @@ -52,6 +52,7 @@ var _ ExportsClientAPI = (*costmanagement.ExportsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result costmanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result costmanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*costmanagement.OperationsClient)(nil) diff --git a/services/costmanagement/mgmt/2019-10-01/costmanagement/dimensions.go b/services/costmanagement/mgmt/2019-10-01/costmanagement/dimensions.go index b195239fdec5..5c740eba3929 100644 --- a/services/costmanagement/mgmt/2019-10-01/costmanagement/dimensions.go +++ b/services/costmanagement/mgmt/2019-10-01/costmanagement/dimensions.go @@ -36,7 +36,8 @@ func NewDimensionsClient(subscriptionID string) DimensionsClient { return NewDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client. +// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDimensionsClientWithBaseURI(baseURI string, subscriptionID string) DimensionsClient { return DimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -54,9 +55,11 @@ func NewDimensionsClientWithBaseURI(baseURI string, subscriptionID string) Dimen // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for // billingProfile scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and +// for invoiceSection scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. +// partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked +// account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for +// consolidated account // filter - may be used to filter dimensions by properties/category, properties/usageStart, // properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. // expand - may be used to expand the properties/data within a dimension category. By default, data is not diff --git a/services/costmanagement/mgmt/2019-10-01/costmanagement/exports.go b/services/costmanagement/mgmt/2019-10-01/costmanagement/exports.go index 9042b6af21cc..df476cb3ab2d 100644 --- a/services/costmanagement/mgmt/2019-10-01/costmanagement/exports.go +++ b/services/costmanagement/mgmt/2019-10-01/costmanagement/exports.go @@ -36,7 +36,8 @@ func NewExportsClient(subscriptionID string) ExportsClient { return NewExportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExportsClientWithBaseURI creates an instance of the ExportsClient client. +// NewExportsClientWithBaseURI creates an instance of the ExportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExportsClientWithBaseURI(baseURI string, subscriptionID string) ExportsClient { return ExportsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -56,9 +57,11 @@ func NewExportsClientWithBaseURI(baseURI string, subscriptionID string) ExportsC // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for // billingProfile scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and +// for invoiceSection scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. +// partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked +// account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for +// consolidated account // exportName - export Name. // parameters - parameters supplied to the CreateOrUpdate Export operation. func (client ExportsClient) CreateOrUpdate(ctx context.Context, scope string, exportName string, parameters Export) (result Export, err error) { @@ -160,9 +163,11 @@ func (client ExportsClient) CreateOrUpdateResponder(resp *http.Response) (result // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for // billingProfile scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and +// for invoiceSection scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. +// partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked +// account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for +// consolidated account // exportName - export Name. func (client ExportsClient) Delete(ctx context.Context, scope string, exportName string) (result autorest.Response, err error) { if tracing.IsEnabled() { @@ -249,9 +254,11 @@ func (client ExportsClient) DeleteResponder(resp *http.Response) (result autores // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for // billingProfile scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and +// for invoiceSection scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. +// partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked +// account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for +// consolidated account // exportName - export Name. func (client ExportsClient) Execute(ctx context.Context, scope string, exportName string) (result autorest.Response, err error) { if tracing.IsEnabled() { @@ -338,9 +345,11 @@ func (client ExportsClient) ExecuteResponder(resp *http.Response) (result autore // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for // billingProfile scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and +// for invoiceSection scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. +// partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked +// account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for +// consolidated account // exportName - export Name. func (client ExportsClient) Get(ctx context.Context, scope string, exportName string) (result Export, err error) { if tracing.IsEnabled() { @@ -428,9 +437,11 @@ func (client ExportsClient) GetResponder(resp *http.Response) (result Export, er // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for // billingProfile scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and +// for invoiceSection scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. +// partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked +// account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for +// consolidated account // exportName - export Name. func (client ExportsClient) GetExecutionHistory(ctx context.Context, scope string, exportName string) (result ExportExecutionListResult, err error) { if tracing.IsEnabled() { @@ -518,9 +529,11 @@ func (client ExportsClient) GetExecutionHistoryResponder(resp *http.Response) (r // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for // billingProfile scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and +// for invoiceSection scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. +// partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked +// account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for +// consolidated account func (client ExportsClient) List(ctx context.Context, scope string) (result ExportListResult, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ExportsClient.List") diff --git a/services/costmanagement/mgmt/2019-10-01/costmanagement/operations.go b/services/costmanagement/mgmt/2019-10-01/costmanagement/operations.go index d8eb4bd62a9d..487eacf7d036 100644 --- a/services/costmanagement/mgmt/2019-10-01/costmanagement/operations.go +++ b/services/costmanagement/mgmt/2019-10-01/costmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/costmanagement/mgmt/2019-10-01/costmanagement/query.go b/services/costmanagement/mgmt/2019-10-01/costmanagement/query.go index faaec591ea5b..401542306a14 100644 --- a/services/costmanagement/mgmt/2019-10-01/costmanagement/query.go +++ b/services/costmanagement/mgmt/2019-10-01/costmanagement/query.go @@ -36,7 +36,8 @@ func NewQueryClient(subscriptionID string) QueryClient { return NewQueryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueryClientWithBaseURI creates an instance of the QueryClient client. +// NewQueryClientWithBaseURI creates an instance of the QueryClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryClientWithBaseURI(baseURI string, subscriptionID string) QueryClient { return QueryClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -55,9 +56,11 @@ func NewQueryClientWithBaseURI(baseURI string, subscriptionID string) QueryClien // '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for // billingProfile scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' -// for invoiceSection scope, and +// for invoiceSection scope, // 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for -// partners. +// partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked +// account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for +// consolidated account // parameters - parameters supplied to the CreateOrUpdate Query Config operation. func (client QueryClient) Usage(ctx context.Context, scope string, parameters QueryDefinition) (result QueryResult, err error) { if tracing.IsEnabled() { diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/authorizationpolicies.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/authorizationpolicies.go index c6df4329cafe..4820cd02a56f 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/authorizationpolicies.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/authorizationpolicies.go @@ -38,7 +38,9 @@ func NewAuthorizationPoliciesClient(subscriptionID string) AuthorizationPolicies return NewAuthorizationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationPoliciesClientWithBaseURI creates an instance of the AuthorizationPoliciesClient client. +// NewAuthorizationPoliciesClientWithBaseURI creates an instance of the AuthorizationPoliciesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewAuthorizationPoliciesClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationPoliciesClient { return AuthorizationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/client.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/client.go index 6d1e9352d47c..48951478058e 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/client.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/connectormappings.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/connectormappings.go index 941ad2a3a640..d65c167987c7 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/connectormappings.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/connectormappings.go @@ -38,7 +38,9 @@ func NewConnectorMappingsClient(subscriptionID string) ConnectorMappingsClient { return NewConnectorMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectorMappingsClientWithBaseURI creates an instance of the ConnectorMappingsClient client. +// NewConnectorMappingsClientWithBaseURI creates an instance of the ConnectorMappingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewConnectorMappingsClientWithBaseURI(baseURI string, subscriptionID string) ConnectorMappingsClient { return ConnectorMappingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/connectors.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/connectors.go index 9d5338d37bf4..863e5731ae24 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/connectors.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/connectors.go @@ -38,7 +38,8 @@ func NewConnectorsClient(subscriptionID string) ConnectorsClient { return NewConnectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectorsClientWithBaseURI creates an instance of the ConnectorsClient client. +// NewConnectorsClientWithBaseURI creates an instance of the ConnectorsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectorsClient { return ConnectorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/customerinsightsapi/interfaces.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/customerinsightsapi/interfaces.go index 2f260e8966f7..19d986891f57 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/customerinsightsapi/interfaces.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/customerinsightsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result customerinsights.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result customerinsights.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*customerinsights.OperationsClient)(nil) @@ -36,7 +37,9 @@ type HubsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.HubsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.Hub, err error) List(ctx context.Context) (result customerinsights.HubListResultPage, err error) + ListComplete(ctx context.Context) (result customerinsights.HubListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result customerinsights.HubListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result customerinsights.HubListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, hubName string, parameters customerinsights.Hub) (result customerinsights.Hub, err error) } @@ -49,6 +52,7 @@ type ProfilesClientAPI interface { Get(ctx context.Context, resourceGroupName string, hubName string, profileName string, localeCode string) (result customerinsights.ProfileResourceFormat, err error) GetEnrichingKpis(ctx context.Context, resourceGroupName string, hubName string, profileName string) (result customerinsights.ListKpiDefinition, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.ProfileListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.ProfileListResultIterator, err error) } var _ ProfilesClientAPI = (*customerinsights.ProfilesClient)(nil) @@ -58,6 +62,7 @@ type InteractionsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, interactionName string, parameters customerinsights.InteractionResourceFormat) (result customerinsights.InteractionsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, interactionName string, localeCode string) (result customerinsights.InteractionResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.InteractionListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.InteractionListResultIterator, err error) SuggestRelationshipLinks(ctx context.Context, resourceGroupName string, hubName string, interactionName string) (result customerinsights.SuggestRelationshipLinksResponse, err error) } @@ -69,6 +74,7 @@ type RelationshipsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, relationshipName string) (result customerinsights.RelationshipsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, relationshipName string) (result customerinsights.RelationshipResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipListResultIterator, err error) } var _ RelationshipsClientAPI = (*customerinsights.RelationshipsClient)(nil) @@ -79,6 +85,7 @@ type RelationshipLinksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, relationshipLinkName string) (result customerinsights.RelationshipLinksDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, relationshipLinkName string) (result customerinsights.RelationshipLinkResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipLinkListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipLinkListResultIterator, err error) } var _ RelationshipLinksClientAPI = (*customerinsights.RelationshipLinksClient)(nil) @@ -88,6 +95,7 @@ type AuthorizationPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string, parameters customerinsights.AuthorizationPolicyResourceFormat) (result customerinsights.AuthorizationPolicyResourceFormat, err error) Get(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicyResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.AuthorizationPolicyListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.AuthorizationPolicyListResultIterator, err error) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicy, err error) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicy, err error) } @@ -100,6 +108,7 @@ type ConnectorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.ConnectorListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.ConnectorListResultIterator, err error) } var _ ConnectorsClientAPI = (*customerinsights.ConnectorsClient)(nil) @@ -110,6 +119,7 @@ type ConnectorMappingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, connectorName string, mappingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hubName string, connectorName string, mappingName string) (result customerinsights.ConnectorMappingResourceFormat, err error) ListByConnector(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorMappingListResultPage, err error) + ListByConnectorComplete(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorMappingListResultIterator, err error) } var _ ConnectorMappingsClientAPI = (*customerinsights.ConnectorMappingsClient)(nil) @@ -120,6 +130,7 @@ type KpiClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result customerinsights.KpiDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result customerinsights.KpiResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.KpiListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.KpiListResultIterator, err error) Reprocess(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result autorest.Response, err error) } @@ -129,6 +140,7 @@ var _ KpiClientAPI = (*customerinsights.KpiClient)(nil) type WidgetTypesClientAPI interface { Get(ctx context.Context, resourceGroupName string, hubName string, widgetTypeName string) (result customerinsights.WidgetTypeResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.WidgetTypeListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.WidgetTypeListResultIterator, err error) } var _ WidgetTypesClientAPI = (*customerinsights.WidgetTypesClient)(nil) @@ -139,6 +151,7 @@ type ViewsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, viewName string, userID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hubName string, viewName string, userID string) (result customerinsights.ViewResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string, userID string) (result customerinsights.ViewListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string, userID string) (result customerinsights.ViewListResultIterator, err error) } var _ ViewsClientAPI = (*customerinsights.ViewsClient)(nil) @@ -149,6 +162,7 @@ type LinksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, linkName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hubName string, linkName string) (result customerinsights.LinkResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.LinkListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.LinkListResultIterator, err error) } var _ LinksClientAPI = (*customerinsights.LinksClient)(nil) @@ -156,6 +170,7 @@ var _ LinksClientAPI = (*customerinsights.LinksClient)(nil) // RolesClientAPI contains the set of methods on the RolesClient type. type RolesClientAPI interface { ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleListResultIterator, err error) } var _ RolesClientAPI = (*customerinsights.RolesClient)(nil) @@ -166,6 +181,7 @@ type RoleAssignmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, assignmentName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hubName string, assignmentName string) (result customerinsights.RoleAssignmentResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleAssignmentListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleAssignmentListResultIterator, err error) } var _ RoleAssignmentsClientAPI = (*customerinsights.RoleAssignmentsClient)(nil) diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go index 1962df828166..b918ee89ad34 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go @@ -38,7 +38,8 @@ func NewHubsClient(subscriptionID string) HubsClient { return NewHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHubsClientWithBaseURI creates an instance of the HubsClient client. +// NewHubsClientWithBaseURI creates an instance of the HubsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewHubsClientWithBaseURI(baseURI string, subscriptionID string) HubsClient { return HubsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/images.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/images.go index 0744bdfc2a63..a1f14ef1eea7 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/images.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/images.go @@ -37,7 +37,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/interactions.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/interactions.go index dc16c919c153..661093d48423 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/interactions.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/interactions.go @@ -38,7 +38,8 @@ func NewInteractionsClient(subscriptionID string) InteractionsClient { return NewInteractionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInteractionsClientWithBaseURI creates an instance of the InteractionsClient client. +// NewInteractionsClientWithBaseURI creates an instance of the InteractionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInteractionsClientWithBaseURI(baseURI string, subscriptionID string) InteractionsClient { return InteractionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/kpi.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/kpi.go index 2b433abbdf91..e8a063a531e6 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/kpi.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/kpi.go @@ -38,7 +38,8 @@ func NewKpiClient(subscriptionID string) KpiClient { return NewKpiClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewKpiClientWithBaseURI creates an instance of the KpiClient client. +// NewKpiClientWithBaseURI creates an instance of the KpiClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewKpiClientWithBaseURI(baseURI string, subscriptionID string) KpiClient { return KpiClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/links.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/links.go index 2482fd58104c..53bce37223ea 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/links.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/links.go @@ -38,7 +38,8 @@ func NewLinksClient(subscriptionID string) LinksClient { return NewLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinksClientWithBaseURI creates an instance of the LinksClient client. +// NewLinksClientWithBaseURI creates an instance of the LinksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinksClientWithBaseURI(baseURI string, subscriptionID string) LinksClient { return LinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/operations.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/operations.go index e00025ef1bd9..c039b93d8fe7 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/operations.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/profiles.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/profiles.go index fb173e4969a4..9fc942ec2140 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/profiles.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/profiles.go @@ -38,7 +38,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/relationshiplinks.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/relationshiplinks.go index 2e0425a7d715..971462b020af 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/relationshiplinks.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/relationshiplinks.go @@ -38,7 +38,9 @@ func NewRelationshipLinksClient(subscriptionID string) RelationshipLinksClient { return NewRelationshipLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRelationshipLinksClientWithBaseURI creates an instance of the RelationshipLinksClient client. +// NewRelationshipLinksClientWithBaseURI creates an instance of the RelationshipLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRelationshipLinksClientWithBaseURI(baseURI string, subscriptionID string) RelationshipLinksClient { return RelationshipLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/relationships.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/relationships.go index 5dd1621b06b9..9f2aad3d67c0 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/relationships.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/relationships.go @@ -38,7 +38,8 @@ func NewRelationshipsClient(subscriptionID string) RelationshipsClient { return NewRelationshipsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRelationshipsClientWithBaseURI creates an instance of the RelationshipsClient client. +// NewRelationshipsClientWithBaseURI creates an instance of the RelationshipsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRelationshipsClientWithBaseURI(baseURI string, subscriptionID string) RelationshipsClient { return RelationshipsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/roleassignments.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/roleassignments.go index 83d2580781da..72b4825e3778 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/roleassignments.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/roleassignments.go @@ -38,7 +38,8 @@ func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/roles.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/roles.go index 238cf8347a1d..8772f2fbeb4c 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/roles.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/roles.go @@ -37,7 +37,8 @@ func NewRolesClient(subscriptionID string) RolesClient { return NewRolesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRolesClientWithBaseURI creates an instance of the RolesClient client. +// NewRolesClientWithBaseURI creates an instance of the RolesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRolesClientWithBaseURI(baseURI string, subscriptionID string) RolesClient { return RolesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/views.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/views.go index 19c80bc51e99..b273136ded57 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/views.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/views.go @@ -38,7 +38,8 @@ func NewViewsClient(subscriptionID string) ViewsClient { return NewViewsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewViewsClientWithBaseURI creates an instance of the ViewsClient client. +// NewViewsClientWithBaseURI creates an instance of the ViewsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewViewsClientWithBaseURI(baseURI string, subscriptionID string) ViewsClient { return ViewsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/widgettypes.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/widgettypes.go index 4ab030437a9b..2ac351e19b12 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/widgettypes.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/widgettypes.go @@ -37,7 +37,8 @@ func NewWidgetTypesClient(subscriptionID string) WidgetTypesClient { return NewWidgetTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWidgetTypesClientWithBaseURI creates an instance of the WidgetTypesClient client. +// NewWidgetTypesClientWithBaseURI creates an instance of the WidgetTypesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWidgetTypesClientWithBaseURI(baseURI string, subscriptionID string) WidgetTypesClient { return WidgetTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/authorizationpolicies.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/authorizationpolicies.go index 069fde57d69c..187bc6620be7 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/authorizationpolicies.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/authorizationpolicies.go @@ -38,7 +38,9 @@ func NewAuthorizationPoliciesClient(subscriptionID string) AuthorizationPolicies return NewAuthorizationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationPoliciesClientWithBaseURI creates an instance of the AuthorizationPoliciesClient client. +// NewAuthorizationPoliciesClientWithBaseURI creates an instance of the AuthorizationPoliciesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewAuthorizationPoliciesClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationPoliciesClient { return AuthorizationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/client.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/client.go index 31891ea42135..f4ba39be3288 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/client.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/connectormappings.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/connectormappings.go index 32b75b0b5d27..985453a1f697 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/connectormappings.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/connectormappings.go @@ -38,7 +38,9 @@ func NewConnectorMappingsClient(subscriptionID string) ConnectorMappingsClient { return NewConnectorMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectorMappingsClientWithBaseURI creates an instance of the ConnectorMappingsClient client. +// NewConnectorMappingsClientWithBaseURI creates an instance of the ConnectorMappingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewConnectorMappingsClientWithBaseURI(baseURI string, subscriptionID string) ConnectorMappingsClient { return ConnectorMappingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/connectors.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/connectors.go index c64d4acf104b..c0b104fc1f4d 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/connectors.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/connectors.go @@ -38,7 +38,8 @@ func NewConnectorsClient(subscriptionID string) ConnectorsClient { return NewConnectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectorsClientWithBaseURI creates an instance of the ConnectorsClient client. +// NewConnectorsClientWithBaseURI creates an instance of the ConnectorsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectorsClient { return ConnectorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/customerinsightsapi/interfaces.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/customerinsightsapi/interfaces.go index 8c9a7dc0c3bf..38762f91ea93 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/customerinsightsapi/interfaces.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/customerinsightsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result customerinsights.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result customerinsights.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*customerinsights.OperationsClient)(nil) @@ -36,7 +37,9 @@ type HubsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.HubsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.Hub, err error) List(ctx context.Context) (result customerinsights.HubListResultPage, err error) + ListComplete(ctx context.Context) (result customerinsights.HubListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result customerinsights.HubListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result customerinsights.HubListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, hubName string, parameters customerinsights.Hub) (result customerinsights.Hub, err error) } @@ -49,6 +52,7 @@ type ProfilesClientAPI interface { Get(ctx context.Context, resourceGroupName string, hubName string, profileName string, localeCode string) (result customerinsights.ProfileResourceFormat, err error) GetEnrichingKpis(ctx context.Context, resourceGroupName string, hubName string, profileName string) (result customerinsights.ListKpiDefinition, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.ProfileListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.ProfileListResultIterator, err error) } var _ ProfilesClientAPI = (*customerinsights.ProfilesClient)(nil) @@ -58,6 +62,7 @@ type InteractionsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, interactionName string, parameters customerinsights.InteractionResourceFormat) (result customerinsights.InteractionsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, interactionName string, localeCode string) (result customerinsights.InteractionResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.InteractionListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.InteractionListResultIterator, err error) SuggestRelationshipLinks(ctx context.Context, resourceGroupName string, hubName string, interactionName string) (result customerinsights.SuggestRelationshipLinksResponse, err error) } @@ -69,6 +74,7 @@ type RelationshipsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, relationshipName string) (result customerinsights.RelationshipsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, relationshipName string) (result customerinsights.RelationshipResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipListResultIterator, err error) } var _ RelationshipsClientAPI = (*customerinsights.RelationshipsClient)(nil) @@ -79,6 +85,7 @@ type RelationshipLinksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, relationshipLinkName string) (result customerinsights.RelationshipLinksDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, relationshipLinkName string) (result customerinsights.RelationshipLinkResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipLinkListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipLinkListResultIterator, err error) } var _ RelationshipLinksClientAPI = (*customerinsights.RelationshipLinksClient)(nil) @@ -88,6 +95,7 @@ type AuthorizationPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string, parameters customerinsights.AuthorizationPolicyResourceFormat) (result customerinsights.AuthorizationPolicyResourceFormat, err error) Get(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicyResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.AuthorizationPolicyListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.AuthorizationPolicyListResultIterator, err error) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicy, err error) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicy, err error) } @@ -100,6 +108,7 @@ type ConnectorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.ConnectorListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.ConnectorListResultIterator, err error) } var _ ConnectorsClientAPI = (*customerinsights.ConnectorsClient)(nil) @@ -110,6 +119,7 @@ type ConnectorMappingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, connectorName string, mappingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hubName string, connectorName string, mappingName string) (result customerinsights.ConnectorMappingResourceFormat, err error) ListByConnector(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorMappingListResultPage, err error) + ListByConnectorComplete(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorMappingListResultIterator, err error) } var _ ConnectorMappingsClientAPI = (*customerinsights.ConnectorMappingsClient)(nil) @@ -120,6 +130,7 @@ type KpiClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result customerinsights.KpiDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result customerinsights.KpiResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.KpiListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.KpiListResultIterator, err error) Reprocess(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result autorest.Response, err error) } @@ -129,6 +140,7 @@ var _ KpiClientAPI = (*customerinsights.KpiClient)(nil) type WidgetTypesClientAPI interface { Get(ctx context.Context, resourceGroupName string, hubName string, widgetTypeName string) (result customerinsights.WidgetTypeResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.WidgetTypeListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.WidgetTypeListResultIterator, err error) } var _ WidgetTypesClientAPI = (*customerinsights.WidgetTypesClient)(nil) @@ -139,6 +151,7 @@ type ViewsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, viewName string, userID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hubName string, viewName string, userID string) (result customerinsights.ViewResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string, userID string) (result customerinsights.ViewListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string, userID string) (result customerinsights.ViewListResultIterator, err error) } var _ ViewsClientAPI = (*customerinsights.ViewsClient)(nil) @@ -149,6 +162,7 @@ type LinksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, linkName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hubName string, linkName string) (result customerinsights.LinkResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.LinkListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.LinkListResultIterator, err error) } var _ LinksClientAPI = (*customerinsights.LinksClient)(nil) @@ -156,6 +170,7 @@ var _ LinksClientAPI = (*customerinsights.LinksClient)(nil) // RolesClientAPI contains the set of methods on the RolesClient type. type RolesClientAPI interface { ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleListResultIterator, err error) } var _ RolesClientAPI = (*customerinsights.RolesClient)(nil) @@ -166,6 +181,7 @@ type RoleAssignmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hubName string, assignmentName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, hubName string, assignmentName string) (result customerinsights.RoleAssignmentResourceFormat, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleAssignmentListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleAssignmentListResultIterator, err error) } var _ RoleAssignmentsClientAPI = (*customerinsights.RoleAssignmentsClient)(nil) @@ -186,6 +202,7 @@ type PredictionsClientAPI interface { GetModelStatus(ctx context.Context, resourceGroupName string, hubName string, predictionName string) (result customerinsights.PredictionModelStatus, err error) GetTrainingResults(ctx context.Context, resourceGroupName string, hubName string, predictionName string) (result customerinsights.PredictionTrainingResults, err error) ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.PredictionListResultPage, err error) + ListByHubComplete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.PredictionListResultIterator, err error) ModelStatus(ctx context.Context, resourceGroupName string, hubName string, predictionName string, parameters customerinsights.PredictionModelStatus) (result autorest.Response, err error) } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go index bfed25dec61f..8a68b931db5f 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go @@ -38,7 +38,8 @@ func NewHubsClient(subscriptionID string) HubsClient { return NewHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHubsClientWithBaseURI creates an instance of the HubsClient client. +// NewHubsClientWithBaseURI creates an instance of the HubsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewHubsClientWithBaseURI(baseURI string, subscriptionID string) HubsClient { return HubsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/images.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/images.go index 070e2a618696..2e2de696d924 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/images.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/images.go @@ -37,7 +37,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/interactions.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/interactions.go index 93d6f2b4c036..7074c48a80ea 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/interactions.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/interactions.go @@ -38,7 +38,8 @@ func NewInteractionsClient(subscriptionID string) InteractionsClient { return NewInteractionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInteractionsClientWithBaseURI creates an instance of the InteractionsClient client. +// NewInteractionsClientWithBaseURI creates an instance of the InteractionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInteractionsClientWithBaseURI(baseURI string, subscriptionID string) InteractionsClient { return InteractionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/kpi.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/kpi.go index 3417dfcca863..ed76ce37cdec 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/kpi.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/kpi.go @@ -38,7 +38,8 @@ func NewKpiClient(subscriptionID string) KpiClient { return NewKpiClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewKpiClientWithBaseURI creates an instance of the KpiClient client. +// NewKpiClientWithBaseURI creates an instance of the KpiClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewKpiClientWithBaseURI(baseURI string, subscriptionID string) KpiClient { return KpiClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/links.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/links.go index 59412fbaa96a..30c0fbae9fac 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/links.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/links.go @@ -38,7 +38,8 @@ func NewLinksClient(subscriptionID string) LinksClient { return NewLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinksClientWithBaseURI creates an instance of the LinksClient client. +// NewLinksClientWithBaseURI creates an instance of the LinksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinksClientWithBaseURI(baseURI string, subscriptionID string) LinksClient { return LinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/operations.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/operations.go index 57dc9266873c..45b7e7285d4c 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/operations.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/predictions.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/predictions.go index 669bc2306912..a6f5633f68d9 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/predictions.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/predictions.go @@ -38,7 +38,8 @@ func NewPredictionsClient(subscriptionID string) PredictionsClient { return NewPredictionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPredictionsClientWithBaseURI creates an instance of the PredictionsClient client. +// NewPredictionsClientWithBaseURI creates an instance of the PredictionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPredictionsClientWithBaseURI(baseURI string, subscriptionID string) PredictionsClient { return PredictionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/profiles.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/profiles.go index 7496104cbe8f..f489463af243 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/profiles.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/profiles.go @@ -38,7 +38,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/relationshiplinks.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/relationshiplinks.go index 8f591bfbc20b..7ce1c468624d 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/relationshiplinks.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/relationshiplinks.go @@ -38,7 +38,9 @@ func NewRelationshipLinksClient(subscriptionID string) RelationshipLinksClient { return NewRelationshipLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRelationshipLinksClientWithBaseURI creates an instance of the RelationshipLinksClient client. +// NewRelationshipLinksClientWithBaseURI creates an instance of the RelationshipLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRelationshipLinksClientWithBaseURI(baseURI string, subscriptionID string) RelationshipLinksClient { return RelationshipLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/relationships.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/relationships.go index f64acca94358..52c194ebe9ac 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/relationships.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/relationships.go @@ -38,7 +38,8 @@ func NewRelationshipsClient(subscriptionID string) RelationshipsClient { return NewRelationshipsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRelationshipsClientWithBaseURI creates an instance of the RelationshipsClient client. +// NewRelationshipsClientWithBaseURI creates an instance of the RelationshipsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRelationshipsClientWithBaseURI(baseURI string, subscriptionID string) RelationshipsClient { return RelationshipsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/roleassignments.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/roleassignments.go index a3a55f9f0990..dec6ea2575f5 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/roleassignments.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/roleassignments.go @@ -38,7 +38,8 @@ func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/roles.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/roles.go index c4a0e43b83c5..3b141ae37971 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/roles.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/roles.go @@ -37,7 +37,8 @@ func NewRolesClient(subscriptionID string) RolesClient { return NewRolesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRolesClientWithBaseURI creates an instance of the RolesClient client. +// NewRolesClientWithBaseURI creates an instance of the RolesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRolesClientWithBaseURI(baseURI string, subscriptionID string) RolesClient { return RolesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/views.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/views.go index ead688686eb7..3f00944f55b0 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/views.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/views.go @@ -38,7 +38,8 @@ func NewViewsClient(subscriptionID string) ViewsClient { return NewViewsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewViewsClientWithBaseURI creates an instance of the ViewsClient client. +// NewViewsClientWithBaseURI creates an instance of the ViewsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewViewsClientWithBaseURI(baseURI string, subscriptionID string) ViewsClient { return ViewsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/widgettypes.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/widgettypes.go index 8b5abcbe9324..c0c2231ba092 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/widgettypes.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/widgettypes.go @@ -37,7 +37,8 @@ func NewWidgetTypesClient(subscriptionID string) WidgetTypesClient { return NewWidgetTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWidgetTypesClientWithBaseURI creates an instance of the WidgetTypesClient client. +// NewWidgetTypesClientWithBaseURI creates an instance of the WidgetTypesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWidgetTypesClientWithBaseURI(baseURI string, subscriptionID string) WidgetTypesClient { return WidgetTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databox/mgmt/2018-01-01/databox/client.go b/services/databox/mgmt/2018-01-01/databox/client.go index c21569ceca0a..a51e14d1bcf8 100644 --- a/services/databox/mgmt/2018-01-01/databox/client.go +++ b/services/databox/mgmt/2018-01-01/databox/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/databox/mgmt/2018-01-01/databox/databoxapi/interfaces.go b/services/databox/mgmt/2018-01-01/databox/databoxapi/interfaces.go index eb8a66eb0459..379211d6ae18 100644 --- a/services/databox/mgmt/2018-01-01/databox/databoxapi/interfaces.go +++ b/services/databox/mgmt/2018-01-01/databox/databoxapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result databox.OperationListPage, err error) + ListComplete(ctx context.Context) (result databox.OperationListIterator, err error) } var _ OperationsClientAPI = (*databox.OperationsClient)(nil) @@ -38,7 +39,9 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobName string) (result databox.JobsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, jobName string, expand string) (result databox.JobResource, err error) List(ctx context.Context, skipToken string) (result databox.JobResourceListPage, err error) + ListComplete(ctx context.Context, skipToken string) (result databox.JobResourceListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result databox.JobResourceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result databox.JobResourceListIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, jobName string) (result databox.UnencryptedCredentialsList, err error) Update(ctx context.Context, resourceGroupName string, jobName string, jobResourceUpdateParameter databox.JobResourceUpdateParameter, ifMatch string) (result databox.JobsUpdateFuture, err error) } @@ -48,6 +51,7 @@ var _ JobsClientAPI = (*databox.JobsClient)(nil) // ServiceClientAPI contains the set of methods on the ServiceClient type. type ServiceClientAPI interface { ListAvailableSkus(ctx context.Context, location string, availableSkuRequest databox.AvailableSkuRequest) (result databox.AvailableSkusResultPage, err error) + ListAvailableSkusComplete(ctx context.Context, location string, availableSkuRequest databox.AvailableSkuRequest) (result databox.AvailableSkusResultIterator, err error) ValidateAddressMethod(ctx context.Context, location string, validateAddress databox.ValidateAddress) (result databox.AddressValidationOutput, err error) } diff --git a/services/databox/mgmt/2018-01-01/databox/jobs.go b/services/databox/mgmt/2018-01-01/databox/jobs.go index 962964654607..cb2adbde2c93 100644 --- a/services/databox/mgmt/2018-01-01/databox/jobs.go +++ b/services/databox/mgmt/2018-01-01/databox/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/databox/mgmt/2018-01-01/databox/operations.go b/services/databox/mgmt/2018-01-01/databox/operations.go index e1ee8c26810f..d4900e949665 100644 --- a/services/databox/mgmt/2018-01-01/databox/operations.go +++ b/services/databox/mgmt/2018-01-01/databox/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/databox/mgmt/2018-01-01/databox/service.go b/services/databox/mgmt/2018-01-01/databox/service.go index bf8ea075a717..6887588ebe56 100644 --- a/services/databox/mgmt/2018-01-01/databox/service.go +++ b/services/databox/mgmt/2018-01-01/databox/service.go @@ -36,7 +36,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databox/mgmt/2019-09-01/databox/client.go b/services/databox/mgmt/2019-09-01/databox/client.go index 48425d265a05..e3c392513336 100644 --- a/services/databox/mgmt/2019-09-01/databox/client.go +++ b/services/databox/mgmt/2019-09-01/databox/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/databox/mgmt/2019-09-01/databox/databoxapi/interfaces.go b/services/databox/mgmt/2019-09-01/databox/databoxapi/interfaces.go index 6a3e0c9c84da..e5bced3fba9b 100644 --- a/services/databox/mgmt/2019-09-01/databox/databoxapi/interfaces.go +++ b/services/databox/mgmt/2019-09-01/databox/databoxapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result databox.OperationListPage, err error) + ListComplete(ctx context.Context) (result databox.OperationListIterator, err error) } var _ OperationsClientAPI = (*databox.OperationsClient)(nil) @@ -38,7 +39,9 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobName string) (result databox.JobsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, jobName string, expand string) (result databox.JobResource, err error) List(ctx context.Context, skipToken string) (result databox.JobResourceListPage, err error) + ListComplete(ctx context.Context, skipToken string) (result databox.JobResourceListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result databox.JobResourceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result databox.JobResourceListIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, jobName string) (result databox.UnencryptedCredentialsList, err error) Update(ctx context.Context, resourceGroupName string, jobName string, jobResourceUpdateParameter databox.JobResourceUpdateParameter, ifMatch string) (result databox.JobsUpdateFuture, err error) } @@ -48,7 +51,9 @@ var _ JobsClientAPI = (*databox.JobsClient)(nil) // ServiceClientAPI contains the set of methods on the ServiceClient type. type ServiceClientAPI interface { ListAvailableSkus(ctx context.Context, location string, availableSkuRequest databox.AvailableSkuRequest) (result databox.AvailableSkusResultPage, err error) + ListAvailableSkusComplete(ctx context.Context, location string, availableSkuRequest databox.AvailableSkuRequest) (result databox.AvailableSkusResultIterator, err error) ListAvailableSkusByResourceGroup(ctx context.Context, resourceGroupName string, location string, availableSkuRequest databox.AvailableSkuRequest) (result databox.AvailableSkusResultPage, err error) + ListAvailableSkusByResourceGroupComplete(ctx context.Context, resourceGroupName string, location string, availableSkuRequest databox.AvailableSkuRequest) (result databox.AvailableSkusResultIterator, err error) RegionConfiguration(ctx context.Context, location string, regionConfigurationRequest databox.RegionConfigurationRequest) (result databox.RegionConfigurationResponse, err error) ValidateAddressMethod(ctx context.Context, location string, validateAddress databox.ValidateAddress) (result databox.AddressValidationOutput, err error) ValidateInputs(ctx context.Context, location string, validationRequest databox.BasicValidationRequest) (result databox.ValidationResponse, err error) diff --git a/services/databox/mgmt/2019-09-01/databox/jobs.go b/services/databox/mgmt/2019-09-01/databox/jobs.go index 485c00ed6310..87da4b16325d 100644 --- a/services/databox/mgmt/2019-09-01/databox/jobs.go +++ b/services/databox/mgmt/2019-09-01/databox/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/databox/mgmt/2019-09-01/databox/operations.go b/services/databox/mgmt/2019-09-01/databox/operations.go index 59771136ee8b..842fad538eca 100644 --- a/services/databox/mgmt/2019-09-01/databox/operations.go +++ b/services/databox/mgmt/2019-09-01/databox/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/databox/mgmt/2019-09-01/databox/service.go b/services/databox/mgmt/2019-09-01/databox/service.go index c588c0b52613..4906c8a919c7 100644 --- a/services/databox/mgmt/2019-09-01/databox/service.go +++ b/services/databox/mgmt/2019-09-01/databox/service.go @@ -36,7 +36,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/alerts.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/alerts.go index 60ac781dddaf..4cc6d2cd2740 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/alerts.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/alerts.go @@ -35,7 +35,8 @@ func NewAlertsClient(subscriptionID string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/bandwidthschedules.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/bandwidthschedules.go index 405205caa0d3..2e0d9c006984 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/bandwidthschedules.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/bandwidthschedules.go @@ -36,7 +36,9 @@ func NewBandwidthSchedulesClient(subscriptionID string) BandwidthSchedulesClient return NewBandwidthSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBandwidthSchedulesClientWithBaseURI creates an instance of the BandwidthSchedulesClient client. +// NewBandwidthSchedulesClientWithBaseURI creates an instance of the BandwidthSchedulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewBandwidthSchedulesClientWithBaseURI(baseURI string, subscriptionID string) BandwidthSchedulesClient { return BandwidthSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/client.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/client.go index d47519ebaf3e..1a0ad84453ea 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/client.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/databoxedgeapi/interfaces.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/databoxedgeapi/interfaces.go index 605c9c9e6904..58dea03925cf 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/databoxedgeapi/interfaces.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/databoxedgeapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result databoxedge.OperationsListPage, err error) + ListComplete(ctx context.Context) (result databoxedge.OperationsListIterator, err error) } var _ OperationsClientAPI = (*databoxedge.OperationsClient)(nil) @@ -41,7 +42,9 @@ type DevicesClientAPI interface { GetUpdateSummary(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.UpdateSummary, err error) InstallUpdates(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.DevicesInstallUpdatesFuture, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string) (result databoxedge.DeviceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string) (result databoxedge.DeviceListIterator, err error) ListBySubscription(ctx context.Context, expand string) (result databoxedge.DeviceListPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string) (result databoxedge.DeviceListIterator, err error) ScanForUpdates(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.DevicesScanForUpdatesFuture, err error) Update(ctx context.Context, deviceName string, parameters databoxedge.DevicePatch, resourceGroupName string) (result databoxedge.Device, err error) UploadCertificate(ctx context.Context, deviceName string, parameters databoxedge.UploadCertificateRequest, resourceGroupName string) (result databoxedge.UploadCertificateResponse, err error) @@ -53,6 +56,7 @@ var _ DevicesClientAPI = (*databoxedge.DevicesClient)(nil) type AlertsClientAPI interface { Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.Alert, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.AlertListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.AlertListIterator, err error) } var _ AlertsClientAPI = (*databoxedge.AlertsClient)(nil) @@ -63,6 +67,7 @@ type BandwidthSchedulesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.BandwidthSchedulesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.BandwidthSchedule, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.BandwidthSchedulesListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.BandwidthSchedulesListIterator, err error) } var _ BandwidthSchedulesClientAPI = (*databoxedge.BandwidthSchedulesClient)(nil) @@ -87,6 +92,7 @@ type OrdersClientAPI interface { Delete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrdersDeleteFuture, err error) Get(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.Order, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrderListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrderListIterator, err error) } var _ OrdersClientAPI = (*databoxedge.OrdersClient)(nil) @@ -97,6 +103,7 @@ type RolesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.RolesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.RoleModel, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.RoleListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.RoleListIterator, err error) } var _ RolesClientAPI = (*databoxedge.RolesClient)(nil) @@ -107,6 +114,7 @@ type SharesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.SharesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.Share, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.ShareListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.ShareListIterator, err error) Refresh(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.SharesRefreshFuture, err error) } @@ -118,6 +126,7 @@ type StorageAccountCredentialsClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.StorageAccountCredentialsDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.StorageAccountCredential, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.StorageAccountCredentialListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.StorageAccountCredentialListIterator, err error) } var _ StorageAccountCredentialsClientAPI = (*databoxedge.StorageAccountCredentialsClient)(nil) @@ -128,6 +137,7 @@ type TriggersClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.TriggersDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.TriggerModel, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string, expand string) (result databoxedge.TriggerListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string, expand string) (result databoxedge.TriggerListIterator, err error) } var _ TriggersClientAPI = (*databoxedge.TriggersClient)(nil) @@ -138,6 +148,7 @@ type UsersClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.UsersDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.User, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.UserListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.UserListIterator, err error) } var _ UsersClientAPI = (*databoxedge.UsersClient)(nil) diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/devices.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/devices.go index 3e688657b1d1..d65fa6565968 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/devices.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/devices.go @@ -36,7 +36,8 @@ func NewDevicesClient(subscriptionID string) DevicesClient { return NewDevicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client. +// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDevicesClientWithBaseURI(baseURI string, subscriptionID string) DevicesClient { return DevicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/jobs.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/jobs.go index 793689c273b0..1cc52c411e1d 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/jobs.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/jobs.go @@ -35,7 +35,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/operations.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/operations.go index 47a0db9e1e81..c92cd93ddb7a 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/operations.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/operationsstatus.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/operationsstatus.go index e08a6177b3cc..eb8a22b679f0 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/operationsstatus.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/operationsstatus.go @@ -35,7 +35,9 @@ func NewOperationsStatusClient(subscriptionID string) OperationsStatusClient { return NewOperationsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsStatusClientWithBaseURI creates an instance of the OperationsStatusClient client. +// NewOperationsStatusClientWithBaseURI creates an instance of the OperationsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationsStatusClientWithBaseURI(baseURI string, subscriptionID string) OperationsStatusClient { return OperationsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/orders.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/orders.go index 5b989ab89c2c..b0bd58db2097 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/orders.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/orders.go @@ -36,7 +36,8 @@ func NewOrdersClient(subscriptionID string) OrdersClient { return NewOrdersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOrdersClientWithBaseURI creates an instance of the OrdersClient client. +// NewOrdersClientWithBaseURI creates an instance of the OrdersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOrdersClientWithBaseURI(baseURI string, subscriptionID string) OrdersClient { return OrdersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/roles.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/roles.go index 5324a10c4a75..05dd009bac07 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/roles.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/roles.go @@ -35,7 +35,8 @@ func NewRolesClient(subscriptionID string) RolesClient { return NewRolesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRolesClientWithBaseURI creates an instance of the RolesClient client. +// NewRolesClientWithBaseURI creates an instance of the RolesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRolesClientWithBaseURI(baseURI string, subscriptionID string) RolesClient { return RolesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/shares.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/shares.go index 04dc7f8e4157..fad811308e96 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/shares.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/shares.go @@ -36,7 +36,8 @@ func NewSharesClient(subscriptionID string) SharesClient { return NewSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSharesClientWithBaseURI creates an instance of the SharesClient client. +// NewSharesClientWithBaseURI creates an instance of the SharesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSharesClientWithBaseURI(baseURI string, subscriptionID string) SharesClient { return SharesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/storageaccountcredentials.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/storageaccountcredentials.go index 4eb785135af9..d1128ed2086d 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/storageaccountcredentials.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/storageaccountcredentials.go @@ -36,7 +36,9 @@ func NewStorageAccountCredentialsClient(subscriptionID string) StorageAccountCre return NewStorageAccountCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client. +// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewStorageAccountCredentialsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountCredentialsClient { return StorageAccountCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/triggers.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/triggers.go index 47ab4172d287..7ba8c8725594 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/triggers.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/triggers.go @@ -35,7 +35,8 @@ func NewTriggersClient(subscriptionID string) TriggersClient { return NewTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client. +// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) TriggersClient { return TriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-03-01/databoxedge/users.go b/services/databoxedge/mgmt/2019-03-01/databoxedge/users.go index 7fba6cb567c2..2b01004cc94c 100644 --- a/services/databoxedge/mgmt/2019-03-01/databoxedge/users.go +++ b/services/databoxedge/mgmt/2019-03-01/databoxedge/users.go @@ -36,7 +36,8 @@ func NewUsersClient(subscriptionID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/alerts.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/alerts.go index 942ea572ba27..d43652a2e1af 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/alerts.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/alerts.go @@ -35,7 +35,8 @@ func NewAlertsClient(subscriptionID string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/bandwidthschedules.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/bandwidthschedules.go index 8224612fd704..306df26070a1 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/bandwidthschedules.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/bandwidthschedules.go @@ -36,7 +36,9 @@ func NewBandwidthSchedulesClient(subscriptionID string) BandwidthSchedulesClient return NewBandwidthSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBandwidthSchedulesClientWithBaseURI creates an instance of the BandwidthSchedulesClient client. +// NewBandwidthSchedulesClientWithBaseURI creates an instance of the BandwidthSchedulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewBandwidthSchedulesClientWithBaseURI(baseURI string, subscriptionID string) BandwidthSchedulesClient { return BandwidthSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/client.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/client.go index 36593d1fec80..4cb16385d063 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/client.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/databoxedgeapi/interfaces.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/databoxedgeapi/interfaces.go index 545baab9a791..65a11112d859 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/databoxedgeapi/interfaces.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/databoxedgeapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result databoxedge.OperationsListPage, err error) + ListComplete(ctx context.Context) (result databoxedge.OperationsListIterator, err error) } var _ OperationsClientAPI = (*databoxedge.OperationsClient)(nil) @@ -41,7 +42,9 @@ type DevicesClientAPI interface { GetUpdateSummary(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.UpdateSummary, err error) InstallUpdates(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.DevicesInstallUpdatesFuture, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string) (result databoxedge.DeviceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string) (result databoxedge.DeviceListIterator, err error) ListBySubscription(ctx context.Context, expand string) (result databoxedge.DeviceListPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string) (result databoxedge.DeviceListIterator, err error) ScanForUpdates(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.DevicesScanForUpdatesFuture, err error) Update(ctx context.Context, deviceName string, parameters databoxedge.DevicePatch, resourceGroupName string) (result databoxedge.Device, err error) UploadCertificate(ctx context.Context, deviceName string, parameters databoxedge.UploadCertificateRequest, resourceGroupName string) (result databoxedge.UploadCertificateResponse, err error) @@ -53,6 +56,7 @@ var _ DevicesClientAPI = (*databoxedge.DevicesClient)(nil) type AlertsClientAPI interface { Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.Alert, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.AlertListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.AlertListIterator, err error) } var _ AlertsClientAPI = (*databoxedge.AlertsClient)(nil) @@ -63,6 +67,7 @@ type BandwidthSchedulesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.BandwidthSchedulesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.BandwidthSchedule, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.BandwidthSchedulesListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.BandwidthSchedulesListIterator, err error) } var _ BandwidthSchedulesClientAPI = (*databoxedge.BandwidthSchedulesClient)(nil) @@ -94,6 +99,7 @@ type OrdersClientAPI interface { Delete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrdersDeleteFuture, err error) Get(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.Order, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrderListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrderListIterator, err error) } var _ OrdersClientAPI = (*databoxedge.OrdersClient)(nil) @@ -104,6 +110,7 @@ type RolesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.RolesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.RoleModel, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.RoleListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.RoleListIterator, err error) } var _ RolesClientAPI = (*databoxedge.RolesClient)(nil) @@ -114,6 +121,7 @@ type SharesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.SharesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.Share, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.ShareListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.ShareListIterator, err error) Refresh(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.SharesRefreshFuture, err error) } @@ -125,6 +133,7 @@ type StorageAccountCredentialsClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.StorageAccountCredentialsDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.StorageAccountCredential, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.StorageAccountCredentialListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.StorageAccountCredentialListIterator, err error) } var _ StorageAccountCredentialsClientAPI = (*databoxedge.StorageAccountCredentialsClient)(nil) @@ -135,6 +144,7 @@ type TriggersClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.TriggersDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.TriggerModel, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string, expand string) (result databoxedge.TriggerListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string, expand string) (result databoxedge.TriggerListIterator, err error) } var _ TriggersClientAPI = (*databoxedge.TriggersClient)(nil) @@ -145,6 +155,7 @@ type UsersClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.UsersDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.User, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.UserListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.UserListIterator, err error) } var _ UsersClientAPI = (*databoxedge.UsersClient)(nil) diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/devices.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/devices.go index 3ba730cbaca4..e8d6b39663d8 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/devices.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/devices.go @@ -36,7 +36,8 @@ func NewDevicesClient(subscriptionID string) DevicesClient { return NewDevicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client. +// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDevicesClientWithBaseURI(baseURI string, subscriptionID string) DevicesClient { return DevicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/jobs.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/jobs.go index cb77c8a60081..0b37f9697f92 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/jobs.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/jobs.go @@ -35,7 +35,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/nodes.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/nodes.go index 86b9766a31ca..77d28ea3a06e 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/nodes.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/nodes.go @@ -35,7 +35,8 @@ func NewNodesClient(subscriptionID string) NodesClient { return NewNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodesClientWithBaseURI creates an instance of the NodesClient client. +// NewNodesClientWithBaseURI creates an instance of the NodesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNodesClientWithBaseURI(baseURI string, subscriptionID string) NodesClient { return NodesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/operations.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/operations.go index bcb8d20176f9..706f9080eb28 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/operations.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/operationsstatus.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/operationsstatus.go index 2e00a4ab98b1..7f00cce7f5e7 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/operationsstatus.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/operationsstatus.go @@ -35,7 +35,9 @@ func NewOperationsStatusClient(subscriptionID string) OperationsStatusClient { return NewOperationsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsStatusClientWithBaseURI creates an instance of the OperationsStatusClient client. +// NewOperationsStatusClientWithBaseURI creates an instance of the OperationsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationsStatusClientWithBaseURI(baseURI string, subscriptionID string) OperationsStatusClient { return OperationsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/orders.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/orders.go index 380f0452d415..c629981e7f16 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/orders.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/orders.go @@ -36,7 +36,8 @@ func NewOrdersClient(subscriptionID string) OrdersClient { return NewOrdersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOrdersClientWithBaseURI creates an instance of the OrdersClient client. +// NewOrdersClientWithBaseURI creates an instance of the OrdersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOrdersClientWithBaseURI(baseURI string, subscriptionID string) OrdersClient { return OrdersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/roles.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/roles.go index a59b590769ab..9263b19e3c86 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/roles.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/roles.go @@ -35,7 +35,8 @@ func NewRolesClient(subscriptionID string) RolesClient { return NewRolesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRolesClientWithBaseURI creates an instance of the RolesClient client. +// NewRolesClientWithBaseURI creates an instance of the RolesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRolesClientWithBaseURI(baseURI string, subscriptionID string) RolesClient { return RolesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/shares.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/shares.go index 9990a6891be4..936a940a7683 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/shares.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/shares.go @@ -36,7 +36,8 @@ func NewSharesClient(subscriptionID string) SharesClient { return NewSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSharesClientWithBaseURI creates an instance of the SharesClient client. +// NewSharesClientWithBaseURI creates an instance of the SharesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSharesClientWithBaseURI(baseURI string, subscriptionID string) SharesClient { return SharesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/storageaccountcredentials.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/storageaccountcredentials.go index 4bc7578180fe..1b68296ddc6d 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/storageaccountcredentials.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/storageaccountcredentials.go @@ -36,7 +36,9 @@ func NewStorageAccountCredentialsClient(subscriptionID string) StorageAccountCre return NewStorageAccountCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client. +// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewStorageAccountCredentialsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountCredentialsClient { return StorageAccountCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/triggers.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/triggers.go index 0d669df50718..bf17921223a9 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/triggers.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/triggers.go @@ -35,7 +35,8 @@ func NewTriggersClient(subscriptionID string) TriggersClient { return NewTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client. +// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) TriggersClient { return TriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-07-01/databoxedge/users.go b/services/databoxedge/mgmt/2019-07-01/databoxedge/users.go index eeca2f8a653d..c65459c882e4 100644 --- a/services/databoxedge/mgmt/2019-07-01/databoxedge/users.go +++ b/services/databoxedge/mgmt/2019-07-01/databoxedge/users.go @@ -36,7 +36,8 @@ func NewUsersClient(subscriptionID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/alerts.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/alerts.go index 4b01b0dcd67b..fb683f088ad5 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/alerts.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/alerts.go @@ -35,7 +35,8 @@ func NewAlertsClient(subscriptionID string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/bandwidthschedules.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/bandwidthschedules.go index 70d871e40fd9..8b32309d4dd6 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/bandwidthschedules.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/bandwidthschedules.go @@ -36,7 +36,9 @@ func NewBandwidthSchedulesClient(subscriptionID string) BandwidthSchedulesClient return NewBandwidthSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBandwidthSchedulesClientWithBaseURI creates an instance of the BandwidthSchedulesClient client. +// NewBandwidthSchedulesClientWithBaseURI creates an instance of the BandwidthSchedulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewBandwidthSchedulesClientWithBaseURI(baseURI string, subscriptionID string) BandwidthSchedulesClient { return BandwidthSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/client.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/client.go index fbba95136b41..0a5fb435f45c 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/client.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/containers.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/containers.go index 2df7b0d2dcf6..aeebdbbd4ff7 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/containers.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/containers.go @@ -36,7 +36,8 @@ func NewContainersClient(subscriptionID string) ContainersClient { return NewContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainersClientWithBaseURI creates an instance of the ContainersClient client. +// NewContainersClientWithBaseURI creates an instance of the ContainersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainersClientWithBaseURI(baseURI string, subscriptionID string) ContainersClient { return ContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/databoxedgeapi/interfaces.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/databoxedgeapi/interfaces.go index bc07b99271ff..4ef90dfb32ea 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/databoxedgeapi/interfaces.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/databoxedgeapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result databoxedge.OperationsListPage, err error) + ListComplete(ctx context.Context) (result databoxedge.OperationsListIterator, err error) } var _ OperationsClientAPI = (*databoxedge.OperationsClient)(nil) @@ -41,7 +42,9 @@ type DevicesClientAPI interface { GetUpdateSummary(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.UpdateSummary, err error) InstallUpdates(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.DevicesInstallUpdatesFuture, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string) (result databoxedge.DeviceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string) (result databoxedge.DeviceListIterator, err error) ListBySubscription(ctx context.Context, expand string) (result databoxedge.DeviceListPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string) (result databoxedge.DeviceListIterator, err error) ScanForUpdates(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.DevicesScanForUpdatesFuture, err error) Update(ctx context.Context, deviceName string, parameters databoxedge.DevicePatch, resourceGroupName string) (result databoxedge.Device, err error) UploadCertificate(ctx context.Context, deviceName string, parameters databoxedge.UploadCertificateRequest, resourceGroupName string) (result databoxedge.UploadCertificateResponse, err error) @@ -53,6 +56,7 @@ var _ DevicesClientAPI = (*databoxedge.DevicesClient)(nil) type AlertsClientAPI interface { Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.Alert, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.AlertListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.AlertListIterator, err error) } var _ AlertsClientAPI = (*databoxedge.AlertsClient)(nil) @@ -63,6 +67,7 @@ type BandwidthSchedulesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.BandwidthSchedulesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.BandwidthSchedule, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.BandwidthSchedulesListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.BandwidthSchedulesListIterator, err error) } var _ BandwidthSchedulesClientAPI = (*databoxedge.BandwidthSchedulesClient)(nil) @@ -94,6 +99,7 @@ type OrdersClientAPI interface { Delete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrdersDeleteFuture, err error) Get(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.Order, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrderListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.OrderListIterator, err error) } var _ OrdersClientAPI = (*databoxedge.OrdersClient)(nil) @@ -104,6 +110,7 @@ type RolesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.RolesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.RoleModel, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.RoleListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.RoleListIterator, err error) } var _ RolesClientAPI = (*databoxedge.RolesClient)(nil) @@ -114,6 +121,7 @@ type SharesClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.SharesDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.Share, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.ShareListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.ShareListIterator, err error) Refresh(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.SharesRefreshFuture, err error) } @@ -125,6 +133,7 @@ type StorageAccountCredentialsClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.StorageAccountCredentialsDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.StorageAccountCredential, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.StorageAccountCredentialListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.StorageAccountCredentialListIterator, err error) } var _ StorageAccountCredentialsClientAPI = (*databoxedge.StorageAccountCredentialsClient)(nil) @@ -135,6 +144,7 @@ type StorageAccountsClientAPI interface { Delete(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string) (result databoxedge.StorageAccountsDeleteFuture, err error) Get(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string) (result databoxedge.StorageAccount, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.StorageAccountListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string) (result databoxedge.StorageAccountListIterator, err error) } var _ StorageAccountsClientAPI = (*databoxedge.StorageAccountsClient)(nil) @@ -145,6 +155,7 @@ type ContainersClientAPI interface { Delete(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string) (result databoxedge.ContainersDeleteFuture, err error) Get(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string) (result databoxedge.Container, err error) ListByStorageAccount(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string) (result databoxedge.ContainerListPage, err error) + ListByStorageAccountComplete(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string) (result databoxedge.ContainerListIterator, err error) Refresh(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string) (result databoxedge.ContainersRefreshFuture, err error) } @@ -156,6 +167,7 @@ type TriggersClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.TriggersDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.TriggerModel, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string, filter string) (result databoxedge.TriggerListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string, filter string) (result databoxedge.TriggerListIterator, err error) } var _ TriggersClientAPI = (*databoxedge.TriggersClient)(nil) @@ -166,6 +178,7 @@ type UsersClientAPI interface { Delete(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.UsersDeleteFuture, err error) Get(ctx context.Context, deviceName string, name string, resourceGroupName string) (result databoxedge.User, err error) ListByDataBoxEdgeDevice(ctx context.Context, deviceName string, resourceGroupName string, filter string) (result databoxedge.UserListPage, err error) + ListByDataBoxEdgeDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string, filter string) (result databoxedge.UserListIterator, err error) } var _ UsersClientAPI = (*databoxedge.UsersClient)(nil) diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/devices.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/devices.go index bb9bb9f5c3a5..ffc4d29ae15c 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/devices.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/devices.go @@ -36,7 +36,8 @@ func NewDevicesClient(subscriptionID string) DevicesClient { return NewDevicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client. +// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDevicesClientWithBaseURI(baseURI string, subscriptionID string) DevicesClient { return DevicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/jobs.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/jobs.go index 17c9baaf5437..f76af4f826fb 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/jobs.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/jobs.go @@ -35,7 +35,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/nodes.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/nodes.go index 088bfc06da0c..91f8614112ca 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/nodes.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/nodes.go @@ -35,7 +35,8 @@ func NewNodesClient(subscriptionID string) NodesClient { return NewNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodesClientWithBaseURI creates an instance of the NodesClient client. +// NewNodesClientWithBaseURI creates an instance of the NodesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNodesClientWithBaseURI(baseURI string, subscriptionID string) NodesClient { return NodesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/operations.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/operations.go index 2489a2c89838..b4bdfbacd8d1 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/operations.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/operationsstatus.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/operationsstatus.go index e59dc248475e..1c8f5df3300e 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/operationsstatus.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/operationsstatus.go @@ -35,7 +35,9 @@ func NewOperationsStatusClient(subscriptionID string) OperationsStatusClient { return NewOperationsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsStatusClientWithBaseURI creates an instance of the OperationsStatusClient client. +// NewOperationsStatusClientWithBaseURI creates an instance of the OperationsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationsStatusClientWithBaseURI(baseURI string, subscriptionID string) OperationsStatusClient { return OperationsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/orders.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/orders.go index 1d072dac306a..5c52c85b0d34 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/orders.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/orders.go @@ -36,7 +36,8 @@ func NewOrdersClient(subscriptionID string) OrdersClient { return NewOrdersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOrdersClientWithBaseURI creates an instance of the OrdersClient client. +// NewOrdersClientWithBaseURI creates an instance of the OrdersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOrdersClientWithBaseURI(baseURI string, subscriptionID string) OrdersClient { return OrdersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/roles.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/roles.go index 15ae9ad57184..9ae659ecb74e 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/roles.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/roles.go @@ -35,7 +35,8 @@ func NewRolesClient(subscriptionID string) RolesClient { return NewRolesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRolesClientWithBaseURI creates an instance of the RolesClient client. +// NewRolesClientWithBaseURI creates an instance of the RolesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRolesClientWithBaseURI(baseURI string, subscriptionID string) RolesClient { return RolesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/shares.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/shares.go index 707eb0279167..7a8b08655b01 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/shares.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/shares.go @@ -36,7 +36,8 @@ func NewSharesClient(subscriptionID string) SharesClient { return NewSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSharesClientWithBaseURI creates an instance of the SharesClient client. +// NewSharesClientWithBaseURI creates an instance of the SharesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSharesClientWithBaseURI(baseURI string, subscriptionID string) SharesClient { return SharesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/skus.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/skus.go index e93e4f5b2c60..eb1c00cd23f4 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/skus.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/skus.go @@ -35,7 +35,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/storageaccountcredentials.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/storageaccountcredentials.go index 6f0be6351e0e..13d1ed1d9eab 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/storageaccountcredentials.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/storageaccountcredentials.go @@ -36,7 +36,9 @@ func NewStorageAccountCredentialsClient(subscriptionID string) StorageAccountCre return NewStorageAccountCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client. +// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewStorageAccountCredentialsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountCredentialsClient { return StorageAccountCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/storageaccounts.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/storageaccounts.go index a23c9eed1a14..990a7028c31b 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/storageaccounts.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/storageaccounts.go @@ -36,7 +36,8 @@ func NewStorageAccountsClient(subscriptionID string) StorageAccountsClient { return NewStorageAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountsClientWithBaseURI creates an instance of the StorageAccountsClient client. +// NewStorageAccountsClientWithBaseURI creates an instance of the StorageAccountsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStorageAccountsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountsClient { return StorageAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/triggers.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/triggers.go index ff022cb26f31..5bd2186460bc 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/triggers.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/triggers.go @@ -35,7 +35,8 @@ func NewTriggersClient(subscriptionID string) TriggersClient { return NewTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client. +// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) TriggersClient { return TriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databoxedge/mgmt/2019-08-01/databoxedge/users.go b/services/databoxedge/mgmt/2019-08-01/databoxedge/users.go index 88ae1bdea0e9..4d69122a6186 100644 --- a/services/databoxedge/mgmt/2019-08-01/databoxedge/users.go +++ b/services/databoxedge/mgmt/2019-08-01/databoxedge/users.go @@ -36,7 +36,8 @@ func NewUsersClient(subscriptionID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/databricks/mgmt/2018-04-01/databricks/client.go b/services/databricks/mgmt/2018-04-01/databricks/client.go index cee8daa3781b..9931948e9ddd 100644 --- a/services/databricks/mgmt/2018-04-01/databricks/client.go +++ b/services/databricks/mgmt/2018-04-01/databricks/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/databricks/mgmt/2018-04-01/databricks/databricksapi/interfaces.go b/services/databricks/mgmt/2018-04-01/databricks/databricksapi/interfaces.go index 3497f0174a02..cf94c13c3106 100644 --- a/services/databricks/mgmt/2018-04-01/databricks/databricksapi/interfaces.go +++ b/services/databricks/mgmt/2018-04-01/databricks/databricksapi/interfaces.go @@ -28,7 +28,9 @@ type WorkspacesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result databricks.WorkspacesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result databricks.Workspace, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result databricks.WorkspaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result databricks.WorkspaceListResultIterator, err error) ListBySubscription(ctx context.Context) (result databricks.WorkspaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result databricks.WorkspaceListResultIterator, err error) Update(ctx context.Context, parameters databricks.WorkspaceUpdate, resourceGroupName string, workspaceName string) (result databricks.WorkspacesUpdateFuture, err error) } @@ -37,6 +39,7 @@ var _ WorkspacesClientAPI = (*databricks.WorkspacesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result databricks.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result databricks.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*databricks.OperationsClient)(nil) diff --git a/services/databricks/mgmt/2018-04-01/databricks/operations.go b/services/databricks/mgmt/2018-04-01/databricks/operations.go index 24ee785a04be..fa7be12289c0 100644 --- a/services/databricks/mgmt/2018-04-01/databricks/operations.go +++ b/services/databricks/mgmt/2018-04-01/databricks/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/databricks/mgmt/2018-04-01/databricks/workspaces.go b/services/databricks/mgmt/2018-04-01/databricks/workspaces.go index cc9d858d1887..2cb4d5c19326 100644 --- a/services/databricks/mgmt/2018-04-01/databricks/workspaces.go +++ b/services/databricks/mgmt/2018-04-01/databricks/workspaces.go @@ -36,7 +36,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } diff --git a/services/datacatalog/mgmt/2016-03-30/datacatalog/adccatalogs.go b/services/datacatalog/mgmt/2016-03-30/datacatalog/adccatalogs.go index 053129fcbca8..547c17746b77 100644 --- a/services/datacatalog/mgmt/2016-03-30/datacatalog/adccatalogs.go +++ b/services/datacatalog/mgmt/2016-03-30/datacatalog/adccatalogs.go @@ -37,7 +37,8 @@ func NewADCCatalogsClient(subscriptionID string, catalogName string) ADCCatalogs return NewADCCatalogsClientWithBaseURI(DefaultBaseURI, subscriptionID, catalogName) } -// NewADCCatalogsClientWithBaseURI creates an instance of the ADCCatalogsClient client. +// NewADCCatalogsClientWithBaseURI creates an instance of the ADCCatalogsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewADCCatalogsClientWithBaseURI(baseURI string, subscriptionID string, catalogName string) ADCCatalogsClient { return ADCCatalogsClient{NewWithBaseURI(baseURI, subscriptionID, catalogName)} } diff --git a/services/datacatalog/mgmt/2016-03-30/datacatalog/adcoperations.go b/services/datacatalog/mgmt/2016-03-30/datacatalog/adcoperations.go index b1125f8c8c3d..f19d032ec6fa 100644 --- a/services/datacatalog/mgmt/2016-03-30/datacatalog/adcoperations.go +++ b/services/datacatalog/mgmt/2016-03-30/datacatalog/adcoperations.go @@ -36,7 +36,8 @@ func NewADCOperationsClient(subscriptionID string, catalogName string) ADCOperat return NewADCOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, catalogName) } -// NewADCOperationsClientWithBaseURI creates an instance of the ADCOperationsClient client. +// NewADCOperationsClientWithBaseURI creates an instance of the ADCOperationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewADCOperationsClientWithBaseURI(baseURI string, subscriptionID string, catalogName string) ADCOperationsClient { return ADCOperationsClient{NewWithBaseURI(baseURI, subscriptionID, catalogName)} } diff --git a/services/datacatalog/mgmt/2016-03-30/datacatalog/client.go b/services/datacatalog/mgmt/2016-03-30/datacatalog/client.go index 322fc4479bea..20bbcc3c9117 100644 --- a/services/datacatalog/mgmt/2016-03-30/datacatalog/client.go +++ b/services/datacatalog/mgmt/2016-03-30/datacatalog/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string, catalogName string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, catalogName) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, catalogName string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/activityruns.go b/services/datafactory/mgmt/2018-06-01/datafactory/activityruns.go index ae94efdbb01f..8f6f8f448455 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/activityruns.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/activityruns.go @@ -37,7 +37,8 @@ func NewActivityRunsClient(subscriptionID string) ActivityRunsClient { return NewActivityRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityRunsClientWithBaseURI creates an instance of the ActivityRunsClient client. +// NewActivityRunsClientWithBaseURI creates an instance of the ActivityRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityRunsClientWithBaseURI(baseURI string, subscriptionID string) ActivityRunsClient { return ActivityRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/client.go b/services/datafactory/mgmt/2018-06-01/datafactory/client.go index 8fb1140cd52c..4825f9ccc422 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/client.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/datafactoryapi/interfaces.go b/services/datafactory/mgmt/2018-06-01/datafactory/datafactoryapi/interfaces.go index cf9ac665bd95..fbd8f7d03ae0 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/datafactoryapi/interfaces.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/datafactoryapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result datafactory.OperationListResponsePage, err error) + ListComplete(ctx context.Context) (result datafactory.OperationListResponseIterator, err error) } var _ OperationsClientAPI = (*datafactory.OperationsClient)(nil) @@ -39,7 +40,9 @@ type FactoriesClientAPI interface { GetDataPlaneAccess(ctx context.Context, resourceGroupName string, factoryName string, policy datafactory.UserAccessPolicy) (result datafactory.AccessPolicyResponse, err error) GetGitHubAccessToken(ctx context.Context, resourceGroupName string, factoryName string, gitHubAccessTokenRequest datafactory.GitHubAccessTokenRequest) (result datafactory.GitHubAccessTokenResponse, err error) List(ctx context.Context) (result datafactory.FactoryListResponsePage, err error) + ListComplete(ctx context.Context) (result datafactory.FactoryListResponseIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result datafactory.FactoryListResponsePage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result datafactory.FactoryListResponseIterator, err error) Update(ctx context.Context, resourceGroupName string, factoryName string, factoryUpdateParameters datafactory.FactoryUpdateParameters) (result datafactory.Factory, err error) } @@ -64,6 +67,7 @@ type IntegrationRuntimesClientAPI interface { GetStatus(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result datafactory.IntegrationRuntimeStatusResponse, err error) ListAuthKeys(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result datafactory.IntegrationRuntimeAuthKeys, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.IntegrationRuntimeListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.IntegrationRuntimeListResponseIterator, err error) RegenerateAuthKey(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, regenerateKeyParameters datafactory.IntegrationRuntimeRegenerateKeyParameters) (result datafactory.IntegrationRuntimeAuthKeys, err error) RemoveLinks(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, linkedIntegrationRuntimeRequest datafactory.LinkedIntegrationRuntimeRequest) (result autorest.Response, err error) Start(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result datafactory.IntegrationRuntimesStartFuture, err error) @@ -99,6 +103,7 @@ type LinkedServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string, ifNoneMatch string) (result datafactory.LinkedServiceResource, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.LinkedServiceListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.LinkedServiceListResponseIterator, err error) } var _ LinkedServicesClientAPI = (*datafactory.LinkedServicesClient)(nil) @@ -109,6 +114,7 @@ type DatasetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, datasetName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string, datasetName string, ifNoneMatch string) (result datafactory.DatasetResource, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.DatasetListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.DatasetListResponseIterator, err error) } var _ DatasetsClientAPI = (*datafactory.DatasetsClient)(nil) @@ -120,6 +126,7 @@ type PipelinesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string, ifNoneMatch string) (result datafactory.PipelineResource, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.PipelineListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.PipelineListResponseIterator, err error) } var _ PipelinesClientAPI = (*datafactory.PipelinesClient)(nil) @@ -147,6 +154,7 @@ type TriggersClientAPI interface { Get(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, ifNoneMatch string) (result datafactory.TriggerResource, err error) GetEventSubscriptionStatus(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.TriggerSubscriptionOperationStatus, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.TriggerListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.TriggerListResponseIterator, err error) Start(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.TriggersStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.TriggersStopFuture, err error) SubscribeToEvents(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.TriggersSubscribeToEventsFuture, err error) @@ -168,6 +176,7 @@ type RerunTriggersClientAPI interface { Cancel(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, rerunTriggerName string) (result datafactory.RerunTriggersCancelFuture, err error) Create(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, rerunTriggerName string, rerunTumblingWindowTriggerActionParameters datafactory.RerunTumblingWindowTriggerActionParameters) (result datafactory.TriggerResource, err error) ListByTrigger(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.RerunTriggerListResponsePage, err error) + ListByTriggerComplete(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.RerunTriggerListResponseIterator, err error) Start(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, rerunTriggerName string) (result datafactory.RerunTriggersStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, rerunTriggerName string) (result datafactory.RerunTriggersStopFuture, err error) } @@ -180,6 +189,7 @@ type DataFlowsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, dataFlowName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string, dataFlowName string, ifNoneMatch string) (result datafactory.DataFlowResource, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.DataFlowListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.DataFlowListResponseIterator, err error) } var _ DataFlowsClientAPI = (*datafactory.DataFlowsClient)(nil) @@ -191,6 +201,7 @@ type DataFlowDebugSessionClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, request datafactory.DeleteDataFlowDebugSessionRequest) (result autorest.Response, err error) ExecuteCommand(ctx context.Context, resourceGroupName string, factoryName string, request datafactory.DataFlowDebugCommandRequest) (result datafactory.DataFlowDebugSessionExecuteCommandFuture, err error) QueryByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.QueryDataFlowDebugSessionsResponsePage, err error) + QueryByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.QueryDataFlowDebugSessionsResponseIterator, err error) } var _ DataFlowDebugSessionClientAPI = (*datafactory.DataFlowDebugSessionClient)(nil) diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/dataflowdebugsession.go b/services/datafactory/mgmt/2018-06-01/datafactory/dataflowdebugsession.go index 91bab8cfe2e1..4390b73af1f7 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/dataflowdebugsession.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/dataflowdebugsession.go @@ -37,7 +37,9 @@ func NewDataFlowDebugSessionClient(subscriptionID string) DataFlowDebugSessionCl return NewDataFlowDebugSessionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataFlowDebugSessionClientWithBaseURI creates an instance of the DataFlowDebugSessionClient client. +// NewDataFlowDebugSessionClientWithBaseURI creates an instance of the DataFlowDebugSessionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDataFlowDebugSessionClientWithBaseURI(baseURI string, subscriptionID string) DataFlowDebugSessionClient { return DataFlowDebugSessionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/dataflows.go b/services/datafactory/mgmt/2018-06-01/datafactory/dataflows.go index b8d003bd0f90..873854533f12 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/dataflows.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/dataflows.go @@ -37,7 +37,8 @@ func NewDataFlowsClient(subscriptionID string) DataFlowsClient { return NewDataFlowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataFlowsClientWithBaseURI creates an instance of the DataFlowsClient client. +// NewDataFlowsClientWithBaseURI creates an instance of the DataFlowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataFlowsClientWithBaseURI(baseURI string, subscriptionID string) DataFlowsClient { return DataFlowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/datasets.go b/services/datafactory/mgmt/2018-06-01/datafactory/datasets.go index 9f30025d49f4..3aa3cad41805 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/datasets.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/datasets.go @@ -37,7 +37,8 @@ func NewDatasetsClient(subscriptionID string) DatasetsClient { return NewDatasetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatasetsClientWithBaseURI creates an instance of the DatasetsClient client. +// NewDatasetsClientWithBaseURI creates an instance of the DatasetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatasetsClientWithBaseURI(baseURI string, subscriptionID string) DatasetsClient { return DatasetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/exposurecontrol.go b/services/datafactory/mgmt/2018-06-01/datafactory/exposurecontrol.go index 7463fdaa347e..7a3f875b1126 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/exposurecontrol.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/exposurecontrol.go @@ -37,7 +37,8 @@ func NewExposureControlClient(subscriptionID string) ExposureControlClient { return NewExposureControlClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExposureControlClientWithBaseURI creates an instance of the ExposureControlClient client. +// NewExposureControlClientWithBaseURI creates an instance of the ExposureControlClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExposureControlClientWithBaseURI(baseURI string, subscriptionID string) ExposureControlClient { return ExposureControlClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/factories.go b/services/datafactory/mgmt/2018-06-01/datafactory/factories.go index a38f605234f1..f4b4f9292fdd 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/factories.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/factories.go @@ -37,7 +37,8 @@ func NewFactoriesClient(subscriptionID string) FactoriesClient { return NewFactoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFactoriesClientWithBaseURI creates an instance of the FactoriesClient client. +// NewFactoriesClientWithBaseURI creates an instance of the FactoriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFactoriesClientWithBaseURI(baseURI string, subscriptionID string) FactoriesClient { return FactoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimenodes.go b/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimenodes.go index 007184ec149e..a33e73be463c 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimenodes.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimenodes.go @@ -37,7 +37,9 @@ func NewIntegrationRuntimeNodesClient(subscriptionID string) IntegrationRuntimeN return NewIntegrationRuntimeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationRuntimeNodesClientWithBaseURI creates an instance of the IntegrationRuntimeNodesClient client. +// 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)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimeobjectmetadata.go b/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimeobjectmetadata.go index a32e614cd3f1..419e23c6fb71 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimeobjectmetadata.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimeobjectmetadata.go @@ -38,7 +38,8 @@ func NewIntegrationRuntimeObjectMetadataClient(subscriptionID string) Integratio } // NewIntegrationRuntimeObjectMetadataClientWithBaseURI creates an instance of the -// IntegrationRuntimeObjectMetadataClient client. +// 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)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimes.go b/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimes.go index 7be42541bdae..9729cf903ba9 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimes.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/integrationruntimes.go @@ -37,7 +37,9 @@ func NewIntegrationRuntimesClient(subscriptionID string) IntegrationRuntimesClie return NewIntegrationRuntimesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationRuntimesClientWithBaseURI creates an instance of the IntegrationRuntimesClient client. +// 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)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/linkedservices.go b/services/datafactory/mgmt/2018-06-01/datafactory/linkedservices.go index 2dc34f42c5d8..7079b43a217c 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/linkedservices.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/linkedservices.go @@ -37,7 +37,8 @@ func NewLinkedServicesClient(subscriptionID string) LinkedServicesClient { return NewLinkedServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedServicesClientWithBaseURI creates an instance of the LinkedServicesClient client. +// NewLinkedServicesClientWithBaseURI creates an instance of the LinkedServicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedServicesClientWithBaseURI(baseURI string, subscriptionID string) LinkedServicesClient { return LinkedServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/operations.go b/services/datafactory/mgmt/2018-06-01/datafactory/operations.go index f5ccc98dcddf..b0eff6eb954f 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/operations.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/pipelineruns.go b/services/datafactory/mgmt/2018-06-01/datafactory/pipelineruns.go index 446ab3d5c2ba..9625f588ceaf 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/pipelineruns.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/pipelineruns.go @@ -37,7 +37,8 @@ func NewPipelineRunsClient(subscriptionID string) PipelineRunsClient { return NewPipelineRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPipelineRunsClientWithBaseURI creates an instance of the PipelineRunsClient client. +// NewPipelineRunsClientWithBaseURI creates an instance of the PipelineRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPipelineRunsClientWithBaseURI(baseURI string, subscriptionID string) PipelineRunsClient { return PipelineRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/pipelines.go b/services/datafactory/mgmt/2018-06-01/datafactory/pipelines.go index bb39a45be6f3..ae2209f922f6 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/pipelines.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/pipelines.go @@ -37,7 +37,8 @@ func NewPipelinesClient(subscriptionID string) PipelinesClient { return NewPipelinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPipelinesClientWithBaseURI creates an instance of the PipelinesClient client. +// NewPipelinesClientWithBaseURI creates an instance of the PipelinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPipelinesClientWithBaseURI(baseURI string, subscriptionID string) PipelinesClient { return PipelinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/reruntriggers.go b/services/datafactory/mgmt/2018-06-01/datafactory/reruntriggers.go index e7ef76f62d09..c34b8d25ea6e 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/reruntriggers.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/reruntriggers.go @@ -37,7 +37,8 @@ func NewRerunTriggersClient(subscriptionID string) RerunTriggersClient { return NewRerunTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRerunTriggersClientWithBaseURI creates an instance of the RerunTriggersClient client. +// NewRerunTriggersClientWithBaseURI creates an instance of the RerunTriggersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRerunTriggersClientWithBaseURI(baseURI string, subscriptionID string) RerunTriggersClient { return RerunTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/triggerruns.go b/services/datafactory/mgmt/2018-06-01/datafactory/triggerruns.go index 266c3fe6ff9f..a6346a64820c 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/triggerruns.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/triggerruns.go @@ -37,7 +37,8 @@ func NewTriggerRunsClient(subscriptionID string) TriggerRunsClient { return NewTriggerRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTriggerRunsClientWithBaseURI creates an instance of the TriggerRunsClient client. +// NewTriggerRunsClientWithBaseURI creates an instance of the TriggerRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTriggerRunsClientWithBaseURI(baseURI string, subscriptionID string) TriggerRunsClient { return TriggerRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/triggers.go b/services/datafactory/mgmt/2018-06-01/datafactory/triggers.go index ace9d7cfbbce..aaac3f2c8ec3 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/triggers.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/triggers.go @@ -37,7 +37,8 @@ func NewTriggersClient(subscriptionID string) TriggersClient { return NewTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client. +// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) TriggersClient { return TriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/analytics/2016-11-01-preview/catalog/catalogapi/interfaces.go b/services/datalake/analytics/2016-11-01-preview/catalog/catalogapi/interfaces.go index de16b7189fda..150eb93ce64b 100644 --- a/services/datalake/analytics/2016-11-01-preview/catalog/catalogapi/interfaces.go +++ b/services/datalake/analytics/2016-11-01-preview/catalog/catalogapi/interfaces.go @@ -47,27 +47,49 @@ type ClientAPI interface { GrantACL(ctx context.Context, accountName string, parameters catalog.ACLCreateOrUpdateParameters) (result autorest.Response, err error) GrantACLToDatabase(ctx context.Context, accountName string, databaseName string, parameters catalog.ACLCreateOrUpdateParameters) (result autorest.Response, err error) ListAcls(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.ACLListPage, err error) + ListAclsComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.ACLListIterator, err error) ListAclsByDatabase(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.ACLListPage, err error) + ListAclsByDatabaseComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.ACLListIterator, err error) ListAssemblies(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLAssemblyListPage, err error) + ListAssembliesComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLAssemblyListIterator, err error) ListCredentials(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLCredentialListPage, err error) + ListCredentialsComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLCredentialListIterator, err error) ListDatabases(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLDatabaseListPage, err error) + ListDatabasesComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLDatabaseListIterator, err error) ListExternalDataSources(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLExternalDataSourceListPage, err error) + ListExternalDataSourcesComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLExternalDataSourceListIterator, err error) ListPackages(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLPackageListPage, err error) + ListPackagesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLPackageListIterator, err error) ListProcedures(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLProcedureListPage, err error) + ListProceduresComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLProcedureListIterator, err error) ListSchemas(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLSchemaListPage, err error) + ListSchemasComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLSchemaListIterator, err error) ListTableFragments(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableFragmentListPage, err error) + ListTableFragmentsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableFragmentListIterator, err error) ListTablePartitions(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTablePartitionListPage, err error) + ListTablePartitionsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTablePartitionListIterator, err error) ListTables(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, basic *bool) (result catalog.USQLTableListPage, err error) + ListTablesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, basic *bool) (result catalog.USQLTableListIterator, err error) ListTablesByDatabase(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, basic *bool) (result catalog.USQLTableListPage, err error) + ListTablesByDatabaseComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, basic *bool) (result catalog.USQLTableListIterator, err error) ListTableStatistics(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableStatisticsListPage, err error) + ListTableStatisticsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableStatisticsListIterator, err error) ListTableStatisticsByDatabase(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableStatisticsListPage, err error) + ListTableStatisticsByDatabaseComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableStatisticsListIterator, err error) ListTableStatisticsByDatabaseAndSchema(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableStatisticsListPage, err error) + ListTableStatisticsByDatabaseAndSchemaComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableStatisticsListIterator, err error) ListTableTypes(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableTypeListPage, err error) + ListTableTypesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableTypeListIterator, err error) ListTableValuedFunctions(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableValuedFunctionListPage, err error) + ListTableValuedFunctionsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableValuedFunctionListIterator, err error) ListTableValuedFunctionsByDatabase(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableValuedFunctionListPage, err error) + ListTableValuedFunctionsByDatabaseComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTableValuedFunctionListIterator, err error) ListTypes(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTypeListPage, err error) + ListTypesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLTypeListIterator, err error) ListViews(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLViewListPage, err error) + ListViewsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLViewListIterator, err error) ListViewsByDatabase(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLViewListPage, err error) + ListViewsByDatabaseComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result catalog.USQLViewListIterator, err error) PreviewTable(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, maxRows *int64, maxColumns *int64) (result catalog.USQLTablePreview, err error) PreviewTablePartition(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, partitionName string, maxRows *int64, maxColumns *int64) (result catalog.USQLTablePreview, err error) RevokeACL(ctx context.Context, accountName string, parameters catalog.ACLDeleteParameters) (result autorest.Response, err error) diff --git a/services/datalake/analytics/2016-11-01/job/jobapi/interfaces.go b/services/datalake/analytics/2016-11-01/job/jobapi/interfaces.go index 7a3a85d6adc9..d0f1b45e2931 100644 --- a/services/datalake/analytics/2016-11-01/job/jobapi/interfaces.go +++ b/services/datalake/analytics/2016-11-01/job/jobapi/interfaces.go @@ -29,6 +29,7 @@ import ( type PipelineClientAPI interface { Get(ctx context.Context, accountName string, pipelineIdentity uuid.UUID, startDateTime *date.Time, endDateTime *date.Time) (result job.PipelineInformation, err error) List(ctx context.Context, accountName string, startDateTime *date.Time, endDateTime *date.Time) (result job.PipelineInformationListResultPage, err error) + ListComplete(ctx context.Context, accountName string, startDateTime *date.Time, endDateTime *date.Time) (result job.PipelineInformationListResultIterator, err error) } var _ PipelineClientAPI = (*job.PipelineClient)(nil) @@ -37,6 +38,7 @@ var _ PipelineClientAPI = (*job.PipelineClient)(nil) type RecurrenceClientAPI interface { Get(ctx context.Context, accountName string, recurrenceIdentity uuid.UUID, startDateTime *date.Time, endDateTime *date.Time) (result job.RecurrenceInformation, err error) List(ctx context.Context, accountName string, startDateTime *date.Time, endDateTime *date.Time) (result job.RecurrenceInformationListResultPage, err error) + ListComplete(ctx context.Context, accountName string, startDateTime *date.Time, endDateTime *date.Time) (result job.RecurrenceInformationListResultIterator, err error) } var _ RecurrenceClientAPI = (*job.RecurrenceClient)(nil) @@ -50,6 +52,7 @@ type ClientAPI interface { GetDebugDataPath(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.DataPath, err error) GetStatistics(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.Statistics, err error) List(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result job.InfoListResultPage, err error) + ListComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result job.InfoListResultIterator, err error) } var _ ClientAPI = (*job.Client)(nil) diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/accountapi/interfaces.go b/services/datalake/analytics/mgmt/2016-11-01/account/accountapi/interfaces.go index 3e57f45be58b..e50fee8d750a 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/accountapi/interfaces.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/accountapi/interfaces.go @@ -30,7 +30,9 @@ type AccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string) (result account.AccountsDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, accountName string) (result account.DataLakeAnalyticsAccount, err error) List(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeAnalyticsAccountListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeAnalyticsAccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeAnalyticsAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeAnalyticsAccountListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters *account.UpdateDataLakeAnalyticsAccountParameters) (result account.AccountsUpdateFutureType, err error) } @@ -42,6 +44,7 @@ type DataLakeStoreAccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result account.DataLakeStoreAccountInformation, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeStoreAccountInformationListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeStoreAccountInformationListResultIterator, err error) } var _ DataLakeStoreAccountsClientAPI = (*account.DataLakeStoreAccountsClient)(nil) @@ -53,8 +56,11 @@ type StorageAccountsClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.StorageAccountInformation, err error) GetStorageContainer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.StorageContainer, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.StorageAccountInformationListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.StorageAccountInformationListResultIterator, err error) ListSasTokens(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.SasTokenInformationListResultPage, err error) + ListSasTokensComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.SasTokenInformationListResultIterator, err error) ListStorageContainers(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.StorageContainerListResultPage, err error) + ListStorageContainersComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.StorageContainerListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters *account.UpdateStorageAccountParameters) (result autorest.Response, err error) } @@ -66,6 +72,7 @@ type ComputePoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (result account.ComputePolicy, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result account.ComputePolicyListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result account.ComputePolicyListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters *account.UpdateComputePolicyParameters) (result account.ComputePolicy, err error) } @@ -77,6 +84,7 @@ type FirewallRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result account.FirewallRule, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result account.FirewallRuleListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result account.FirewallRuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters *account.UpdateFirewallRuleParameters) (result account.FirewallRule, err error) } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go b/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go index 27ad4acd7a8e..7aadc75125d4 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/client.go b/services/datalake/analytics/mgmt/2016-11-01/account/client.go index 76477f63fec1..2e7a39098ec9 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/client.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go b/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go index d098c7937b9d..6060f5e550e8 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go @@ -36,7 +36,8 @@ func NewComputePoliciesClient(subscriptionID string) ComputePoliciesClient { return NewComputePoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewComputePoliciesClientWithBaseURI creates an instance of the ComputePoliciesClient client. +// NewComputePoliciesClientWithBaseURI creates an instance of the ComputePoliciesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewComputePoliciesClientWithBaseURI(baseURI string, subscriptionID string) ComputePoliciesClient { return ComputePoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go b/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go index 87526468d0f7..3909db8fb761 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go @@ -36,7 +36,9 @@ func NewDataLakeStoreAccountsClient(subscriptionID string) DataLakeStoreAccounts return NewDataLakeStoreAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataLakeStoreAccountsClientWithBaseURI creates an instance of the DataLakeStoreAccountsClient client. +// NewDataLakeStoreAccountsClientWithBaseURI creates an instance of the DataLakeStoreAccountsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDataLakeStoreAccountsClientWithBaseURI(baseURI string, subscriptionID string) DataLakeStoreAccountsClient { return DataLakeStoreAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/firewallrules.go b/services/datalake/analytics/mgmt/2016-11-01/account/firewallrules.go index 4bbddb090604..5058c8548b09 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/firewallrules.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/firewallrules.go @@ -36,7 +36,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/locations.go b/services/datalake/analytics/mgmt/2016-11-01/account/locations.go index ca1a3fd77f1c..81c50f1cf311 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/locations.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/operations.go b/services/datalake/analytics/mgmt/2016-11-01/account/operations.go index a267b332e5d0..3812b633dcd6 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/operations.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go b/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go index 94496f4dfd09..a2f2c6df36aa 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go @@ -36,7 +36,8 @@ func NewStorageAccountsClient(subscriptionID string) StorageAccountsClient { return NewStorageAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountsClientWithBaseURI creates an instance of the StorageAccountsClient client. +// NewStorageAccountsClientWithBaseURI creates an instance of the StorageAccountsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStorageAccountsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountsClient { return StorageAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/store/mgmt/2016-11-01/account/accountapi/interfaces.go b/services/datalake/store/mgmt/2016-11-01/account/accountapi/interfaces.go index 6997cb3882d6..ea8c288b7acd 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/accountapi/interfaces.go +++ b/services/datalake/store/mgmt/2016-11-01/account/accountapi/interfaces.go @@ -31,7 +31,9 @@ type AccountsClientAPI interface { EnableKeyVault(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string) (result account.DataLakeStoreAccount, err error) List(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeStoreAccountListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeStoreAccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeStoreAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result account.DataLakeStoreAccountListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters account.UpdateDataLakeStoreAccountParameters) (result account.AccountsUpdateFutureType, err error) } @@ -43,6 +45,7 @@ type FirewallRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result account.FirewallRule, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result account.FirewallRuleListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result account.FirewallRuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters *account.UpdateFirewallRuleParameters) (result account.FirewallRule, err error) } @@ -54,6 +57,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string) (result account.VirtualNetworkRule, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result account.VirtualNetworkRuleListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result account.VirtualNetworkRuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, parameters *account.UpdateVirtualNetworkRuleParameters) (result account.VirtualNetworkRule, err error) } @@ -65,6 +69,7 @@ type TrustedIDProvidersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string) (result account.TrustedIDProvider, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result account.TrustedIDProviderListResultPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result account.TrustedIDProviderListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string, parameters *account.UpdateTrustedIDProviderParameters) (result account.TrustedIDProvider, err error) } diff --git a/services/datalake/store/mgmt/2016-11-01/account/accounts.go b/services/datalake/store/mgmt/2016-11-01/account/accounts.go index 50b543a42b34..18b03a0ab512 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/accounts.go +++ b/services/datalake/store/mgmt/2016-11-01/account/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/datalake/store/mgmt/2016-11-01/account/client.go b/services/datalake/store/mgmt/2016-11-01/account/client.go index d0b410873c46..b7026d9a5846 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/client.go +++ b/services/datalake/store/mgmt/2016-11-01/account/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go b/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go index 8f03d94a9fa8..1ee2ef2fd100 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go +++ b/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go @@ -36,7 +36,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/store/mgmt/2016-11-01/account/locations.go b/services/datalake/store/mgmt/2016-11-01/account/locations.go index c4fb8df6ef62..21c2f35f7e15 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/locations.go +++ b/services/datalake/store/mgmt/2016-11-01/account/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/store/mgmt/2016-11-01/account/operations.go b/services/datalake/store/mgmt/2016-11-01/account/operations.go index 936b27590479..6b17a8d9dcf2 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/operations.go +++ b/services/datalake/store/mgmt/2016-11-01/account/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/datalake/store/mgmt/2016-11-01/account/trustedidproviders.go b/services/datalake/store/mgmt/2016-11-01/account/trustedidproviders.go index 35ff323248fe..22dd629e46d1 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/trustedidproviders.go +++ b/services/datalake/store/mgmt/2016-11-01/account/trustedidproviders.go @@ -36,7 +36,9 @@ func NewTrustedIDProvidersClient(subscriptionID string) TrustedIDProvidersClient return NewTrustedIDProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTrustedIDProvidersClientWithBaseURI creates an instance of the TrustedIDProvidersClient client. +// NewTrustedIDProvidersClientWithBaseURI creates an instance of the TrustedIDProvidersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTrustedIDProvidersClientWithBaseURI(baseURI string, subscriptionID string) TrustedIDProvidersClient { return TrustedIDProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go b/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go index f12000d586d6..1292aafb1bf2 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go +++ b/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go @@ -36,7 +36,9 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/client.go b/services/datamigration/mgmt/2018-04-19/datamigration/client.go index 898cc1ada833..c5b9a3e0854a 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/client.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/datamigrationapi/interfaces.go b/services/datamigration/mgmt/2018-04-19/datamigration/datamigrationapi/interfaces.go index e6dba1faad94..eb09e1a8e2fe 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/datamigrationapi/interfaces.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/datamigrationapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { ListSkus(ctx context.Context) (result datamigration.ResourceSkusResultPage, err error) + ListSkusComplete(ctx context.Context) (result datamigration.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*datamigration.ResourceSkusClient)(nil) @@ -38,8 +39,11 @@ type ServicesClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, deleteRunningTasks *bool) (result datamigration.ServicesDeleteFuture, err error) Get(ctx context.Context, groupName string, serviceName string) (result datamigration.Service, err error) List(ctx context.Context) (result datamigration.ServiceListPage, err error) + ListComplete(ctx context.Context) (result datamigration.ServiceListIterator, err error) ListByResourceGroup(ctx context.Context, groupName string) (result datamigration.ServiceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, groupName string) (result datamigration.ServiceListIterator, err error) ListSkus(ctx context.Context, groupName string, serviceName string) (result datamigration.ServiceSkuListPage, err error) + ListSkusComplete(ctx context.Context, groupName string, serviceName string) (result datamigration.ServiceSkuListIterator, err error) NestedCheckNameAvailability(ctx context.Context, groupName string, serviceName string, parameters datamigration.NameAvailabilityRequest) (result datamigration.NameAvailabilityResponse, err error) Start(ctx context.Context, groupName string, serviceName string) (result datamigration.ServicesStartFuture, err error) Stop(ctx context.Context, groupName string, serviceName string) (result datamigration.ServicesStopFuture, err error) @@ -55,6 +59,7 @@ type TasksClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, taskName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string, taskName string, expand string) (result datamigration.ProjectTask, err error) List(ctx context.Context, groupName string, serviceName string, projectName string, taskType string) (result datamigration.TaskListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string, projectName string, taskType string) (result datamigration.TaskListIterator, err error) Update(ctx context.Context, parameters datamigration.ProjectTask, groupName string, serviceName string, projectName string, taskName string) (result datamigration.ProjectTask, err error) } @@ -66,6 +71,7 @@ type ProjectsClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string) (result datamigration.Project, err error) ListByResourceGroup(ctx context.Context, groupName string, serviceName string) (result datamigration.ProjectListPage, err error) + ListByResourceGroupComplete(ctx context.Context, groupName string, serviceName string) (result datamigration.ProjectListIterator, err error) Update(ctx context.Context, parameters datamigration.Project, groupName string, serviceName string, projectName string) (result datamigration.Project, err error) } @@ -74,6 +80,7 @@ var _ ProjectsClientAPI = (*datamigration.ProjectsClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result datamigration.QuotaListPage, err error) + ListComplete(ctx context.Context, location string) (result datamigration.QuotaListIterator, err error) } var _ UsagesClientAPI = (*datamigration.UsagesClient)(nil) @@ -81,6 +88,7 @@ var _ UsagesClientAPI = (*datamigration.UsagesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result datamigration.ServiceOperationListPage, err error) + ListComplete(ctx context.Context) (result datamigration.ServiceOperationListIterator, err error) } var _ OperationsClientAPI = (*datamigration.OperationsClient)(nil) diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/operations.go b/services/datamigration/mgmt/2018-04-19/datamigration/operations.go index b5d295752fce..b4c354d2efda 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/operations.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/projects.go b/services/datamigration/mgmt/2018-04-19/datamigration/projects.go index c09086979068..52c41f5b504d 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/projects.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/projects.go @@ -35,7 +35,8 @@ func NewProjectsClient(subscriptionID string) ProjectsClient { return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string) ProjectsClient { return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/resourceskus.go b/services/datamigration/mgmt/2018-04-19/datamigration/resourceskus.go index a62fcfd92e96..d87be5f95ec5 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/resourceskus.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/services.go b/services/datamigration/mgmt/2018-04-19/datamigration/services.go index 1dac3c042105..79d2fe7db39e 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/services.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/tasks.go b/services/datamigration/mgmt/2018-04-19/datamigration/tasks.go index a6f881c1a01a..0fb6d721ef64 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/tasks.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/tasks.go @@ -35,7 +35,8 @@ func NewTasksClient(subscriptionID string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datamigration/mgmt/2018-04-19/datamigration/usages.go b/services/datamigration/mgmt/2018-04-19/datamigration/usages.go index 70bfb53cef38..589cad4df25e 100644 --- a/services/datamigration/mgmt/2018-04-19/datamigration/usages.go +++ b/services/datamigration/mgmt/2018-04-19/datamigration/usages.go @@ -35,7 +35,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/accounts.go b/services/datashare/mgmt/2019-11-01/datashare/accounts.go index a6f223dd5992..1bc4fd0bfae2 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/accounts.go +++ b/services/datashare/mgmt/2019-11-01/datashare/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/client.go b/services/datashare/mgmt/2019-11-01/datashare/client.go index de12f9c689d9..03ccba7b5667 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/client.go +++ b/services/datashare/mgmt/2019-11-01/datashare/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/datashare/mgmt/2019-11-01/datashare/consumerinvitations.go b/services/datashare/mgmt/2019-11-01/datashare/consumerinvitations.go index 3fb5b0818b00..783dd9b8de3a 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/consumerinvitations.go +++ b/services/datashare/mgmt/2019-11-01/datashare/consumerinvitations.go @@ -36,7 +36,9 @@ func NewConsumerInvitationsClient(subscriptionID string) ConsumerInvitationsClie return NewConsumerInvitationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerInvitationsClientWithBaseURI creates an instance of the ConsumerInvitationsClient client. +// NewConsumerInvitationsClientWithBaseURI creates an instance of the ConsumerInvitationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewConsumerInvitationsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerInvitationsClient { return ConsumerInvitationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/consumersourcedatasets.go b/services/datashare/mgmt/2019-11-01/datashare/consumersourcedatasets.go index 18a6baf1fb8b..bc9391cff1e3 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/consumersourcedatasets.go +++ b/services/datashare/mgmt/2019-11-01/datashare/consumersourcedatasets.go @@ -35,7 +35,9 @@ func NewConsumerSourceDataSetsClient(subscriptionID string) ConsumerSourceDataSe return NewConsumerSourceDataSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerSourceDataSetsClientWithBaseURI creates an instance of the ConsumerSourceDataSetsClient client. +// NewConsumerSourceDataSetsClientWithBaseURI creates an instance of the ConsumerSourceDataSetsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewConsumerSourceDataSetsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerSourceDataSetsClient { return ConsumerSourceDataSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/datasetmappings.go b/services/datashare/mgmt/2019-11-01/datashare/datasetmappings.go index 7b191048f461..5dc9ecb0f659 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/datasetmappings.go +++ b/services/datashare/mgmt/2019-11-01/datashare/datasetmappings.go @@ -35,7 +35,8 @@ func NewDataSetMappingsClient(subscriptionID string) DataSetMappingsClient { return NewDataSetMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataSetMappingsClientWithBaseURI creates an instance of the DataSetMappingsClient client. +// NewDataSetMappingsClientWithBaseURI creates an instance of the DataSetMappingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataSetMappingsClientWithBaseURI(baseURI string, subscriptionID string) DataSetMappingsClient { return DataSetMappingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/datasets.go b/services/datashare/mgmt/2019-11-01/datashare/datasets.go index 7e6e3df8fc66..676747703fe0 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/datasets.go +++ b/services/datashare/mgmt/2019-11-01/datashare/datasets.go @@ -35,7 +35,8 @@ func NewDataSetsClient(subscriptionID string) DataSetsClient { return NewDataSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataSetsClientWithBaseURI creates an instance of the DataSetsClient client. +// NewDataSetsClientWithBaseURI creates an instance of the DataSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataSetsClientWithBaseURI(baseURI string, subscriptionID string) DataSetsClient { return DataSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/datashareapi/interfaces.go b/services/datashare/mgmt/2019-11-01/datashare/datashareapi/interfaces.go index 84cab0ea6297..b7d296dec725 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/datashareapi/interfaces.go +++ b/services/datashare/mgmt/2019-11-01/datashare/datashareapi/interfaces.go @@ -29,7 +29,9 @@ type AccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string) (result datashare.AccountsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string) (result datashare.Account, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result datashare.AccountListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result datashare.AccountListIterator, err error) ListBySubscription(ctx context.Context, skipToken string) (result datashare.AccountListPage, err error) + ListBySubscriptionComplete(ctx context.Context, skipToken string) (result datashare.AccountListIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, accountUpdateParameters datashare.AccountUpdateParameters) (result datashare.Account, err error) } @@ -39,6 +41,7 @@ var _ AccountsClientAPI = (*datashare.AccountsClient)(nil) type ConsumerInvitationsClientAPI interface { Get(ctx context.Context, location string, invitationID string) (result datashare.ConsumerInvitation, err error) ListInvitations(ctx context.Context, skipToken string) (result datashare.ConsumerInvitationListPage, err error) + ListInvitationsComplete(ctx context.Context, skipToken string) (result datashare.ConsumerInvitationListIterator, err error) RejectInvitation(ctx context.Context, location string, invitation datashare.ConsumerInvitation) (result datashare.ConsumerInvitation, err error) } @@ -50,6 +53,7 @@ type DataSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string) (result datashare.DataSetsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string) (result datashare.DataSetModel, err error) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.DataSetListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.DataSetListIterator, err error) } var _ DataSetsClientAPI = (*datashare.DataSetsClient)(nil) @@ -60,6 +64,7 @@ type DataSetMappingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string) (result datashare.DataSetMappingModel, err error) ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.DataSetMappingListPage, err error) + ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.DataSetMappingListIterator, err error) } var _ DataSetMappingsClientAPI = (*datashare.DataSetMappingsClient)(nil) @@ -70,6 +75,7 @@ type InvitationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string) (result datashare.Invitation, err error) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.InvitationListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.InvitationListIterator, err error) } var _ InvitationsClientAPI = (*datashare.InvitationsClient)(nil) @@ -77,6 +83,7 @@ var _ InvitationsClientAPI = (*datashare.InvitationsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result datashare.OperationListPage, err error) + ListComplete(ctx context.Context) (result datashare.OperationListIterator, err error) } var _ OperationsClientAPI = (*datashare.OperationsClient)(nil) @@ -87,8 +94,11 @@ type SharesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result datashare.SharesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result datashare.Share, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareListPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareListIterator, err error) ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization datashare.ShareSynchronization, skipToken string) (result datashare.SynchronizationDetailsListPage, err error) + ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization datashare.ShareSynchronization, skipToken string) (result datashare.SynchronizationDetailsListIterator, err error) ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ShareSynchronizationListPage, err error) + ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ShareSynchronizationListIterator, err error) } var _ SharesClientAPI = (*datashare.SharesClient)(nil) @@ -97,6 +107,7 @@ var _ SharesClientAPI = (*datashare.SharesClient)(nil) type ProviderShareSubscriptionsClientAPI interface { GetByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string) (result datashare.ProviderShareSubscription, err error) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ProviderShareSubscriptionListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ProviderShareSubscriptionListIterator, err error) Reinstate(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string) (result datashare.ProviderShareSubscription, err error) Revoke(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string) (result datashare.ProviderShareSubscriptionsRevokeFuture, err error) } @@ -110,9 +121,13 @@ type ShareSubscriptionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string) (result datashare.ShareSubscriptionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string) (result datashare.ShareSubscription, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareSubscriptionListPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareSubscriptionListIterator, err error) ListSourceShareSynchronizationSettings(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.SourceShareSynchronizationSettingListPage, err error) + ListSourceShareSynchronizationSettingsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.SourceShareSynchronizationSettingListIterator, err error) ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization datashare.ShareSubscriptionSynchronization, skipToken string) (result datashare.SynchronizationDetailsListPage, err error) + ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization datashare.ShareSubscriptionSynchronization, skipToken string) (result datashare.SynchronizationDetailsListIterator, err error) ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ShareSubscriptionSynchronizationListPage, err error) + ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ShareSubscriptionSynchronizationListIterator, err error) SynchronizeMethod(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, synchronize datashare.Synchronize) (result datashare.ShareSubscriptionsSynchronizeMethodFuture, err error) } @@ -121,6 +136,7 @@ var _ ShareSubscriptionsClientAPI = (*datashare.ShareSubscriptionsClient)(nil) // ConsumerSourceDataSetsClientAPI contains the set of methods on the ConsumerSourceDataSetsClient type. type ConsumerSourceDataSetsClientAPI interface { ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ConsumerSourceDataSetListPage, err error) + ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ConsumerSourceDataSetListIterator, err error) } var _ ConsumerSourceDataSetsClientAPI = (*datashare.ConsumerSourceDataSetsClient)(nil) @@ -131,6 +147,7 @@ type SynchronizationSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, synchronizationSettingName string) (result datashare.SynchronizationSettingsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, synchronizationSettingName string) (result datashare.SynchronizationSettingModel, err error) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.SynchronizationSettingListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.SynchronizationSettingListIterator, err error) } var _ SynchronizationSettingsClientAPI = (*datashare.SynchronizationSettingsClient)(nil) @@ -141,6 +158,7 @@ type TriggersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, triggerName string) (result datashare.TriggersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, triggerName string) (result datashare.TriggerModel, err error) ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.TriggerListPage, err error) + ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.TriggerListIterator, err error) } var _ TriggersClientAPI = (*datashare.TriggersClient)(nil) diff --git a/services/datashare/mgmt/2019-11-01/datashare/invitations.go b/services/datashare/mgmt/2019-11-01/datashare/invitations.go index a30e426f71c3..816895f2a574 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/invitations.go +++ b/services/datashare/mgmt/2019-11-01/datashare/invitations.go @@ -35,7 +35,8 @@ func NewInvitationsClient(subscriptionID string) InvitationsClient { return NewInvitationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInvitationsClientWithBaseURI creates an instance of the InvitationsClient client. +// NewInvitationsClientWithBaseURI creates an instance of the InvitationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInvitationsClientWithBaseURI(baseURI string, subscriptionID string) InvitationsClient { return InvitationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/operations.go b/services/datashare/mgmt/2019-11-01/datashare/operations.go index ea17af90cb0d..3ed11f5cf39a 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/operations.go +++ b/services/datashare/mgmt/2019-11-01/datashare/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/providersharesubscriptions.go b/services/datashare/mgmt/2019-11-01/datashare/providersharesubscriptions.go index 0eba20ca48b6..a5329b9557d4 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/providersharesubscriptions.go +++ b/services/datashare/mgmt/2019-11-01/datashare/providersharesubscriptions.go @@ -35,7 +35,9 @@ func NewProviderShareSubscriptionsClient(subscriptionID string) ProviderShareSub return NewProviderShareSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderShareSubscriptionsClientWithBaseURI creates an instance of the ProviderShareSubscriptionsClient client. +// NewProviderShareSubscriptionsClientWithBaseURI creates an instance of the ProviderShareSubscriptionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProviderShareSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ProviderShareSubscriptionsClient { return ProviderShareSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/shares.go b/services/datashare/mgmt/2019-11-01/datashare/shares.go index 124e0dc75a99..66f29c73835d 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/shares.go +++ b/services/datashare/mgmt/2019-11-01/datashare/shares.go @@ -35,7 +35,8 @@ func NewSharesClient(subscriptionID string) SharesClient { return NewSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSharesClientWithBaseURI creates an instance of the SharesClient client. +// NewSharesClientWithBaseURI creates an instance of the SharesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSharesClientWithBaseURI(baseURI string, subscriptionID string) SharesClient { return SharesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/sharesubscriptions.go b/services/datashare/mgmt/2019-11-01/datashare/sharesubscriptions.go index 70ef3d859592..4d55c3554c19 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/sharesubscriptions.go +++ b/services/datashare/mgmt/2019-11-01/datashare/sharesubscriptions.go @@ -36,7 +36,9 @@ func NewShareSubscriptionsClient(subscriptionID string) ShareSubscriptionsClient return NewShareSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewShareSubscriptionsClientWithBaseURI creates an instance of the ShareSubscriptionsClient client. +// NewShareSubscriptionsClientWithBaseURI creates an instance of the ShareSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewShareSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ShareSubscriptionsClient { return ShareSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/synchronizationsettings.go b/services/datashare/mgmt/2019-11-01/datashare/synchronizationsettings.go index c37c178511ac..e074beff8660 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/synchronizationsettings.go +++ b/services/datashare/mgmt/2019-11-01/datashare/synchronizationsettings.go @@ -35,7 +35,9 @@ func NewSynchronizationSettingsClient(subscriptionID string) SynchronizationSett return NewSynchronizationSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSynchronizationSettingsClientWithBaseURI creates an instance of the SynchronizationSettingsClient client. +// NewSynchronizationSettingsClientWithBaseURI creates an instance of the SynchronizationSettingsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewSynchronizationSettingsClientWithBaseURI(baseURI string, subscriptionID string) SynchronizationSettingsClient { return SynchronizationSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/datashare/mgmt/2019-11-01/datashare/triggers.go b/services/datashare/mgmt/2019-11-01/datashare/triggers.go index 966a9d8695f5..9dd199afe49f 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/triggers.go +++ b/services/datashare/mgmt/2019-11-01/datashare/triggers.go @@ -35,7 +35,8 @@ func NewTriggersClient(subscriptionID string) TriggersClient { return NewTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client. +// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) TriggersClient { return TriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/client.go b/services/devspaces/mgmt/2019-04-01/devspaces/client.go index 036d8f5c358a..fa03dadc8f9b 100644 --- a/services/devspaces/mgmt/2019-04-01/devspaces/client.go +++ b/services/devspaces/mgmt/2019-04-01/devspaces/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/containerhostmappings.go b/services/devspaces/mgmt/2019-04-01/devspaces/containerhostmappings.go index 66f7659fc549..85d75760b551 100644 --- a/services/devspaces/mgmt/2019-04-01/devspaces/containerhostmappings.go +++ b/services/devspaces/mgmt/2019-04-01/devspaces/containerhostmappings.go @@ -36,7 +36,9 @@ func NewContainerHostMappingsClient(subscriptionID string) ContainerHostMappings return NewContainerHostMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerHostMappingsClientWithBaseURI creates an instance of the ContainerHostMappingsClient client. +// NewContainerHostMappingsClientWithBaseURI creates an instance of the ContainerHostMappingsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewContainerHostMappingsClientWithBaseURI(baseURI string, subscriptionID string) ContainerHostMappingsClient { return ContainerHostMappingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/controllers.go b/services/devspaces/mgmt/2019-04-01/devspaces/controllers.go index 67139bb63022..d7c2484f9ce2 100644 --- a/services/devspaces/mgmt/2019-04-01/devspaces/controllers.go +++ b/services/devspaces/mgmt/2019-04-01/devspaces/controllers.go @@ -36,7 +36,8 @@ func NewControllersClient(subscriptionID string) ControllersClient { return NewControllersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewControllersClientWithBaseURI creates an instance of the ControllersClient client. +// NewControllersClientWithBaseURI creates an instance of the ControllersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewControllersClientWithBaseURI(baseURI string, subscriptionID string) ControllersClient { return ControllersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/devspacesapi/interfaces.go b/services/devspaces/mgmt/2019-04-01/devspaces/devspacesapi/interfaces.go index 0c6ca34b43e5..2ca0cb72e99c 100644 --- a/services/devspaces/mgmt/2019-04-01/devspaces/devspacesapi/interfaces.go +++ b/services/devspaces/mgmt/2019-04-01/devspaces/devspacesapi/interfaces.go @@ -32,6 +32,7 @@ var _ ContainerHostMappingsClientAPI = (*devspaces.ContainerHostMappingsClient)( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result devspaces.ResourceProviderOperationListPage, err error) + ListComplete(ctx context.Context) (result devspaces.ResourceProviderOperationListIterator, err error) } var _ OperationsClientAPI = (*devspaces.OperationsClient)(nil) @@ -42,7 +43,9 @@ type ControllersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string) (result devspaces.ControllersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, name string) (result devspaces.Controller, err error) List(ctx context.Context) (result devspaces.ControllerListPage, err error) + ListComplete(ctx context.Context) (result devspaces.ControllerListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devspaces.ControllerListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devspaces.ControllerListIterator, err error) ListConnectionDetails(ctx context.Context, resourceGroupName string, name string, listConnectionDetailsParameters devspaces.ListConnectionDetailsParameters) (result devspaces.ControllerConnectionDetailsList, err error) Update(ctx context.Context, resourceGroupName string, name string, controllerUpdateParameters devspaces.ControllerUpdateParameters) (result devspaces.Controller, err error) } diff --git a/services/devspaces/mgmt/2019-04-01/devspaces/operations.go b/services/devspaces/mgmt/2019-04-01/devspaces/operations.go index eddf7c0e2a71..cc590c47e916 100644 --- a/services/devspaces/mgmt/2019-04-01/devspaces/operations.go +++ b/services/devspaces/mgmt/2019-04-01/devspaces/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/armtemplates.go b/services/devtestlabs/mgmt/2016-05-15/dtl/armtemplates.go index dd664fff9994..4457cb12e350 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/armtemplates.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/armtemplates.go @@ -35,7 +35,8 @@ func NewArmTemplatesClient(subscriptionID string) ArmTemplatesClient { return NewArmTemplatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArmTemplatesClientWithBaseURI creates an instance of the ArmTemplatesClient client. +// NewArmTemplatesClientWithBaseURI creates an instance of the ArmTemplatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArmTemplatesClientWithBaseURI(baseURI string, subscriptionID string) ArmTemplatesClient { return ArmTemplatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/artifacts.go b/services/devtestlabs/mgmt/2016-05-15/dtl/artifacts.go index 41c0ea8103e7..3867950f98d1 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/artifacts.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/artifacts.go @@ -35,7 +35,8 @@ func NewArtifactsClient(subscriptionID string) ArtifactsClient { return NewArtifactsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient client. +// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactsClientWithBaseURI(baseURI string, subscriptionID string) ArtifactsClient { return ArtifactsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/artifactsources.go b/services/devtestlabs/mgmt/2016-05-15/dtl/artifactsources.go index 26d630d85aff..c534dfcf7bef 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/artifactsources.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/artifactsources.go @@ -36,7 +36,8 @@ func NewArtifactSourcesClient(subscriptionID string) ArtifactSourcesClient { return NewArtifactSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client. +// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactSourcesClientWithBaseURI(baseURI string, subscriptionID string) ArtifactSourcesClient { return ArtifactSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/client.go b/services/devtestlabs/mgmt/2016-05-15/dtl/client.go index 032c34907701..9efc11fd7d2e 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/client.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/costs.go b/services/devtestlabs/mgmt/2016-05-15/dtl/costs.go index 688f6584f011..eedc50d06f8b 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/costs.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/costs.go @@ -36,7 +36,8 @@ func NewCostsClient(subscriptionID string) CostsClient { return NewCostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCostsClientWithBaseURI creates an instance of the CostsClient client. +// NewCostsClientWithBaseURI creates an instance of the CostsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCostsClientWithBaseURI(baseURI string, subscriptionID string) CostsClient { return CostsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go b/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go index ab92cc4103bc..e07f274ab00d 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go @@ -36,7 +36,8 @@ func NewCustomImagesClient(subscriptionID string) CustomImagesClient { return NewCustomImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomImagesClientWithBaseURI creates an instance of the CustomImagesClient client. +// NewCustomImagesClientWithBaseURI creates an instance of the CustomImagesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomImagesClientWithBaseURI(baseURI string, subscriptionID string) CustomImagesClient { return CustomImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go b/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go index 6f13c616d4b2..48cc804986da 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/dtlapi/interfaces.go b/services/devtestlabs/mgmt/2016-05-15/dtl/dtlapi/interfaces.go index 35d821fd3d45..b79c948f6608 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/dtlapi/interfaces.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/dtlapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ProviderOperationsClientAPI contains the set of methods on the ProviderOperationsClient type. type ProviderOperationsClientAPI interface { List(ctx context.Context) (result dtl.ProviderOperationResultPage, err error) + ListComplete(ctx context.Context) (result dtl.ProviderOperationResultIterator, err error) } var _ ProviderOperationsClientAPI = (*dtl.ProviderOperationsClient)(nil) @@ -40,8 +41,11 @@ type LabsClientAPI interface { GenerateUploadURI(ctx context.Context, resourceGroupName string, name string, generateUploadURIParameter dtl.GenerateUploadURIParameter) (result dtl.GenerateUploadURIResponse, err error) Get(ctx context.Context, resourceGroupName string, name string, expand string) (result dtl.Lab, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationLabPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationLabIterator, err error) ListBySubscription(ctx context.Context, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationLabPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationLabIterator, err error) ListVhds(ctx context.Context, resourceGroupName string, name string) (result dtl.ResponseWithContinuationLabVhdPage, err error) + ListVhdsComplete(ctx context.Context, resourceGroupName string, name string) (result dtl.ResponseWithContinuationLabVhdIterator, err error) Update(ctx context.Context, resourceGroupName string, name string, lab dtl.LabFragment) (result dtl.Lab, err error) } @@ -61,7 +65,9 @@ type GlobalSchedulesClientAPI interface { Execute(ctx context.Context, resourceGroupName string, name string) (result dtl.GlobalSchedulesExecuteFuture, err error) Get(ctx context.Context, resourceGroupName string, name string, expand string) (result dtl.Schedule, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationSchedulePage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationScheduleIterator, err error) ListBySubscription(ctx context.Context, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationSchedulePage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationScheduleIterator, err error) Retarget(ctx context.Context, resourceGroupName string, name string, retargetScheduleProperties dtl.RetargetScheduleProperties) (result dtl.GlobalSchedulesRetargetFuture, err error) Update(ctx context.Context, resourceGroupName string, name string, schedule dtl.ScheduleFragment) (result dtl.Schedule, err error) } @@ -74,6 +80,7 @@ type ArtifactSourcesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.ArtifactSource, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationArtifactSourcePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationArtifactSourceIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, artifactSource dtl.ArtifactSourceFragment) (result dtl.ArtifactSource, err error) } @@ -83,6 +90,7 @@ var _ ArtifactSourcesClientAPI = (*dtl.ArtifactSourcesClient)(nil) type ArmTemplatesClientAPI interface { Get(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result dtl.ArmTemplate, err error) List(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationArmTemplatePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationArmTemplateIterator, err error) } var _ ArmTemplatesClientAPI = (*dtl.ArmTemplatesClient)(nil) @@ -92,6 +100,7 @@ type ArtifactsClientAPI interface { GenerateArmTemplate(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, generateArmTemplateRequest dtl.GenerateArmTemplateRequest) (result dtl.ArmTemplateInfo, err error) Get(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result dtl.Artifact, err error) List(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationArtifactPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationArtifactIterator, err error) } var _ ArtifactsClientAPI = (*dtl.ArtifactsClient)(nil) @@ -110,6 +119,7 @@ type CustomImagesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.CustomImagesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.CustomImage, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationCustomImagePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationCustomImageIterator, err error) } var _ CustomImagesClientAPI = (*dtl.CustomImagesClient)(nil) @@ -120,6 +130,7 @@ type FormulasClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.Formula, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationFormulaPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationFormulaIterator, err error) } var _ FormulasClientAPI = (*dtl.FormulasClient)(nil) @@ -127,6 +138,7 @@ var _ FormulasClientAPI = (*dtl.FormulasClient)(nil) // GalleryImagesClientAPI contains the set of methods on the GalleryImagesClient type. type GalleryImagesClientAPI interface { List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationGalleryImagePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationGalleryImageIterator, err error) } var _ GalleryImagesClientAPI = (*dtl.GalleryImagesClient)(nil) @@ -137,6 +149,7 @@ type NotificationChannelsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.NotificationChannel, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationNotificationChannelPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationNotificationChannelIterator, err error) Notify(ctx context.Context, resourceGroupName string, labName string, name string, notifyParameters dtl.NotifyParameters) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, notificationChannel dtl.NotificationChannelFragment) (result dtl.NotificationChannel, err error) } @@ -156,6 +169,7 @@ type PoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, expand string) (result dtl.Policy, err error) List(ctx context.Context, resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationPolicyPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationPolicyIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, policy dtl.PolicyFragment) (result dtl.Policy, err error) } @@ -168,7 +182,9 @@ type SchedulesClientAPI interface { Execute(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.SchedulesExecuteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.Schedule, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationSchedulePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationScheduleIterator, err error) ListApplicable(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ResponseWithContinuationSchedulePage, err error) + ListApplicableComplete(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ResponseWithContinuationScheduleIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, schedule dtl.ScheduleFragment) (result dtl.Schedule, err error) } @@ -180,6 +196,7 @@ type ServiceRunnersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ServiceRunner, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationServiceRunnerPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationServiceRunnerIterator, err error) } var _ ServiceRunnersClientAPI = (*dtl.ServiceRunnersClient)(nil) @@ -190,6 +207,7 @@ type UsersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.UsersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.User, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationUserPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationUserIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, userParameter dtl.UserFragment) (result dtl.User, err error) } @@ -203,6 +221,7 @@ type DisksClientAPI interface { Detach(ctx context.Context, resourceGroupName string, labName string, userName string, name string, detachDiskProperties dtl.DetachDiskProperties) (result dtl.DisksDetachFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result dtl.Disk, err error) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationDiskPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationDiskIterator, err error) } var _ DisksClientAPI = (*dtl.DisksClient)(nil) @@ -213,6 +232,7 @@ type EnvironmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result dtl.EnvironmentsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result dtl.Environment, err error) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationDtlEnvironmentPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationDtlEnvironmentIterator, err error) } var _ EnvironmentsClientAPI = (*dtl.EnvironmentsClient)(nil) @@ -223,6 +243,7 @@ type SecretsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result dtl.Secret, err error) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationSecretPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationSecretIterator, err error) } var _ SecretsClientAPI = (*dtl.SecretsClient)(nil) @@ -237,6 +258,7 @@ type VirtualMachinesClientAPI interface { DetachDataDisk(ctx context.Context, resourceGroupName string, labName string, name string, detachDataDiskProperties dtl.DetachDataDiskProperties) (result dtl.VirtualMachinesDetachDataDiskFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.LabVirtualMachine, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationLabVirtualMachinePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationLabVirtualMachineIterator, err error) ListApplicableSchedules(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ApplicableSchedule, err error) Start(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualMachinesStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualMachinesStopFuture, err error) @@ -252,6 +274,7 @@ type VirtualMachineSchedulesClientAPI interface { Execute(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string) (result dtl.VirtualMachineSchedulesExecuteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, expand string) (result dtl.Schedule, err error) List(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationSchedulePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationScheduleIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, schedule dtl.ScheduleFragment) (result dtl.Schedule, err error) } @@ -263,6 +286,7 @@ type VirtualNetworksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualNetworksDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.VirtualNetwork, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationVirtualNetworkPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ResponseWithContinuationVirtualNetworkIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, virtualNetwork dtl.VirtualNetworkFragment) (result dtl.VirtualNetwork, err error) } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go b/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go index 284a4432747d..d915f25ba702 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go @@ -36,7 +36,8 @@ func NewEnvironmentsClient(subscriptionID string) EnvironmentsClient { return NewEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client. +// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) EnvironmentsClient { return EnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go b/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go index 4013db88157b..22209f58163d 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go @@ -36,7 +36,8 @@ func NewFormulasClient(subscriptionID string) FormulasClient { return NewFormulasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFormulasClientWithBaseURI creates an instance of the FormulasClient client. +// NewFormulasClientWithBaseURI creates an instance of the FormulasClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFormulasClientWithBaseURI(baseURI string, subscriptionID string) FormulasClient { return FormulasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/galleryimages.go b/services/devtestlabs/mgmt/2016-05-15/dtl/galleryimages.go index 7fc0b6308bd9..c532ae46d331 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/galleryimages.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/galleryimages.go @@ -35,7 +35,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go b/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go index 65cd3f24e933..fe1ef4ffbb4d 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go @@ -36,7 +36,8 @@ func NewGlobalSchedulesClient(subscriptionID string) GlobalSchedulesClient { return NewGlobalSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalSchedulesClientWithBaseURI creates an instance of the GlobalSchedulesClient client. +// NewGlobalSchedulesClientWithBaseURI creates an instance of the GlobalSchedulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGlobalSchedulesClientWithBaseURI(baseURI string, subscriptionID string) GlobalSchedulesClient { return GlobalSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go b/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go index a27151906050..6c21e08cd7db 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go @@ -36,7 +36,8 @@ func NewLabsClient(subscriptionID string) LabsClient { return NewLabsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLabsClientWithBaseURI creates an instance of the LabsClient client. +// NewLabsClientWithBaseURI creates an instance of the LabsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLabsClientWithBaseURI(baseURI string, subscriptionID string) LabsClient { return LabsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/notificationchannels.go b/services/devtestlabs/mgmt/2016-05-15/dtl/notificationchannels.go index f3ccbaf34407..c40bf7c16e52 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/notificationchannels.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/notificationchannels.go @@ -36,7 +36,9 @@ func NewNotificationChannelsClient(subscriptionID string) NotificationChannelsCl return NewNotificationChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationChannelsClientWithBaseURI creates an instance of the NotificationChannelsClient client. +// NewNotificationChannelsClientWithBaseURI creates an instance of the NotificationChannelsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewNotificationChannelsClientWithBaseURI(baseURI string, subscriptionID string) NotificationChannelsClient { return NotificationChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/operations.go b/services/devtestlabs/mgmt/2016-05-15/dtl/operations.go index 741bb7cfb696..65e5621f6317 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/operations.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/policies.go b/services/devtestlabs/mgmt/2016-05-15/dtl/policies.go index a22e37302ee1..eb8a9c745664 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/policies.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/policies.go @@ -36,7 +36,8 @@ func NewPoliciesClient(subscriptionID string) PoliciesClient { return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client. +// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient { return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/policysets.go b/services/devtestlabs/mgmt/2016-05-15/dtl/policysets.go index bb96aad45d2b..5d86be46a7c4 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/policysets.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/policysets.go @@ -35,7 +35,8 @@ func NewPolicySetsClient(subscriptionID string) PolicySetsClient { return NewPolicySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySetsClientWithBaseURI creates an instance of the PolicySetsClient client. +// NewPolicySetsClientWithBaseURI creates an instance of the PolicySetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySetsClient { return PolicySetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/provideroperations.go b/services/devtestlabs/mgmt/2016-05-15/dtl/provideroperations.go index 26c08983d2eb..18915183a348 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/provideroperations.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/provideroperations.go @@ -35,7 +35,9 @@ func NewProviderOperationsClient(subscriptionID string) ProviderOperationsClient return NewProviderOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsClientWithBaseURI creates an instance of the ProviderOperationsClient client. +// NewProviderOperationsClientWithBaseURI creates an instance of the ProviderOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProviderOperationsClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsClient { return ProviderOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go b/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go index 910b48d6a0a9..31a41f179d59 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go @@ -36,7 +36,8 @@ func NewSchedulesClient(subscriptionID string) SchedulesClient { return NewSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSchedulesClientWithBaseURI creates an instance of the SchedulesClient client. +// NewSchedulesClientWithBaseURI creates an instance of the SchedulesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSchedulesClientWithBaseURI(baseURI string, subscriptionID string) SchedulesClient { return SchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/secrets.go b/services/devtestlabs/mgmt/2016-05-15/dtl/secrets.go index 16922c0d8b3c..4a67a4e43ba7 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/secrets.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/secrets.go @@ -36,7 +36,8 @@ func NewSecretsClient(subscriptionID string) SecretsClient { return NewSecretsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecretsClientWithBaseURI creates an instance of the SecretsClient client. +// NewSecretsClientWithBaseURI creates an instance of the SecretsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecretsClientWithBaseURI(baseURI string, subscriptionID string) SecretsClient { return SecretsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/servicerunners.go b/services/devtestlabs/mgmt/2016-05-15/dtl/servicerunners.go index d49825fa00ea..e6d7fecf7717 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/servicerunners.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/servicerunners.go @@ -35,7 +35,8 @@ func NewServiceRunnersClient(subscriptionID string) ServiceRunnersClient { return NewServiceRunnersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceRunnersClientWithBaseURI creates an instance of the ServiceRunnersClient client. +// NewServiceRunnersClientWithBaseURI creates an instance of the ServiceRunnersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceRunnersClientWithBaseURI(baseURI string, subscriptionID string) ServiceRunnersClient { return ServiceRunnersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/users.go b/services/devtestlabs/mgmt/2016-05-15/dtl/users.go index cd0069c2c445..43d23d81b1de 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/users.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/users.go @@ -35,7 +35,8 @@ func NewUsersClient(subscriptionID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go b/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go index ef90467727cb..07d11ab71c70 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go b/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go index 077c1afcd371..305d4995aff1 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go @@ -36,7 +36,9 @@ func NewVirtualMachineSchedulesClient(subscriptionID string) VirtualMachineSched return NewVirtualMachineSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSchedulesClientWithBaseURI creates an instance of the VirtualMachineSchedulesClient client. +// NewVirtualMachineSchedulesClientWithBaseURI creates an instance of the VirtualMachineSchedulesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewVirtualMachineSchedulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSchedulesClient { return VirtualMachineSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go b/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go index dcf1a10562eb..d3da7274cbee 100644 --- a/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go +++ b/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/armtemplates.go b/services/devtestlabs/mgmt/2018-09-15/dtl/armtemplates.go index f7425f06b6f0..b2a4610b5565 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/armtemplates.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/armtemplates.go @@ -35,7 +35,8 @@ func NewArmTemplatesClient(subscriptionID string) ArmTemplatesClient { return NewArmTemplatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArmTemplatesClientWithBaseURI creates an instance of the ArmTemplatesClient client. +// NewArmTemplatesClientWithBaseURI creates an instance of the ArmTemplatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArmTemplatesClientWithBaseURI(baseURI string, subscriptionID string) ArmTemplatesClient { return ArmTemplatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/artifacts.go b/services/devtestlabs/mgmt/2018-09-15/dtl/artifacts.go index 5b629bdf3950..bb87f66be7f6 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/artifacts.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/artifacts.go @@ -35,7 +35,8 @@ func NewArtifactsClient(subscriptionID string) ArtifactsClient { return NewArtifactsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient client. +// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactsClientWithBaseURI(baseURI string, subscriptionID string) ArtifactsClient { return ArtifactsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/artifactsources.go b/services/devtestlabs/mgmt/2018-09-15/dtl/artifactsources.go index bb9efa9babb5..81bf6b859f06 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/artifactsources.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/artifactsources.go @@ -36,7 +36,8 @@ func NewArtifactSourcesClient(subscriptionID string) ArtifactSourcesClient { return NewArtifactSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client. +// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactSourcesClientWithBaseURI(baseURI string, subscriptionID string) ArtifactSourcesClient { return ArtifactSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/client.go b/services/devtestlabs/mgmt/2018-09-15/dtl/client.go index f9c187ce9c41..c6396ed5f27b 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/client.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/costs.go b/services/devtestlabs/mgmt/2018-09-15/dtl/costs.go index ee4e3b18e078..9e57410f7ccd 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/costs.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/costs.go @@ -36,7 +36,8 @@ func NewCostsClient(subscriptionID string) CostsClient { return NewCostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCostsClientWithBaseURI creates an instance of the CostsClient client. +// NewCostsClientWithBaseURI creates an instance of the CostsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCostsClientWithBaseURI(baseURI string, subscriptionID string) CostsClient { return CostsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/customimages.go b/services/devtestlabs/mgmt/2018-09-15/dtl/customimages.go index 3ef86b4c1e24..d808599dc7e2 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/customimages.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/customimages.go @@ -36,7 +36,8 @@ func NewCustomImagesClient(subscriptionID string) CustomImagesClient { return NewCustomImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomImagesClientWithBaseURI creates an instance of the CustomImagesClient client. +// NewCustomImagesClientWithBaseURI creates an instance of the CustomImagesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomImagesClientWithBaseURI(baseURI string, subscriptionID string) CustomImagesClient { return CustomImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/disks.go b/services/devtestlabs/mgmt/2018-09-15/dtl/disks.go index 2a85ed985d97..4aceac08ff82 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/disks.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/dtlapi/interfaces.go b/services/devtestlabs/mgmt/2018-09-15/dtl/dtlapi/interfaces.go index 6a8b229473ab..fcfb8c90b6ea 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/dtlapi/interfaces.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/dtlapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ProviderOperationsClientAPI contains the set of methods on the ProviderOperationsClient type. type ProviderOperationsClientAPI interface { List(ctx context.Context) (result dtl.ProviderOperationResultPage, err error) + ListComplete(ctx context.Context) (result dtl.ProviderOperationResultIterator, err error) } var _ ProviderOperationsClientAPI = (*dtl.ProviderOperationsClient)(nil) @@ -41,8 +42,11 @@ type LabsClientAPI interface { Get(ctx context.Context, resourceGroupName string, name string, expand string) (result dtl.Lab, err error) ImportVirtualMachine(ctx context.Context, resourceGroupName string, name string, importLabVirtualMachineRequest dtl.ImportLabVirtualMachineRequest) (result dtl.LabsImportVirtualMachineFuture, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result dtl.LabListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result dtl.LabListIterator, err error) ListBySubscription(ctx context.Context, expand string, filter string, top *int32, orderby string) (result dtl.LabListPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string, filter string, top *int32, orderby string) (result dtl.LabListIterator, err error) ListVhds(ctx context.Context, resourceGroupName string, name string) (result dtl.LabVhdListPage, err error) + ListVhdsComplete(ctx context.Context, resourceGroupName string, name string) (result dtl.LabVhdListIterator, err error) Update(ctx context.Context, resourceGroupName string, name string, lab dtl.LabFragment) (result dtl.Lab, err error) } @@ -62,7 +66,9 @@ type GlobalSchedulesClientAPI interface { Execute(ctx context.Context, resourceGroupName string, name string) (result dtl.GlobalSchedulesExecuteFuture, err error) Get(ctx context.Context, resourceGroupName string, name string, expand string) (result dtl.Schedule, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListIterator, err error) ListBySubscription(ctx context.Context, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListIterator, err error) Retarget(ctx context.Context, resourceGroupName string, name string, retargetScheduleProperties dtl.RetargetScheduleProperties) (result dtl.GlobalSchedulesRetargetFuture, err error) Update(ctx context.Context, resourceGroupName string, name string, schedule dtl.ScheduleFragment) (result dtl.Schedule, err error) } @@ -75,6 +81,7 @@ type ArtifactSourcesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.ArtifactSource, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ArtifactSourceListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ArtifactSourceListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, artifactSource dtl.ArtifactSourceFragment) (result dtl.ArtifactSource, err error) } @@ -84,6 +91,7 @@ var _ ArtifactSourcesClientAPI = (*dtl.ArtifactSourcesClient)(nil) type ArmTemplatesClientAPI interface { Get(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result dtl.ArmTemplate, err error) List(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result dtl.ArmTemplateListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result dtl.ArmTemplateListIterator, err error) } var _ ArmTemplatesClientAPI = (*dtl.ArmTemplatesClient)(nil) @@ -93,6 +101,7 @@ type ArtifactsClientAPI interface { GenerateArmTemplate(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, generateArmTemplateRequest dtl.GenerateArmTemplateRequest) (result dtl.ArmTemplateInfo, err error) Get(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result dtl.Artifact, err error) List(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result dtl.ArtifactListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result dtl.ArtifactListIterator, err error) } var _ ArtifactsClientAPI = (*dtl.ArtifactsClient)(nil) @@ -111,6 +120,7 @@ type CustomImagesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.CustomImagesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.CustomImage, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.CustomImageListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.CustomImageListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, customImage dtl.CustomImageFragment) (result dtl.CustomImage, err error) } @@ -122,6 +132,7 @@ type FormulasClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.Formula, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.FormulaListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.FormulaListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, formula dtl.FormulaFragment) (result dtl.Formula, err error) } @@ -130,6 +141,7 @@ var _ FormulasClientAPI = (*dtl.FormulasClient)(nil) // GalleryImagesClientAPI contains the set of methods on the GalleryImagesClient type. type GalleryImagesClientAPI interface { List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.GalleryImageListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.GalleryImageListIterator, err error) } var _ GalleryImagesClientAPI = (*dtl.GalleryImagesClient)(nil) @@ -140,6 +152,7 @@ type NotificationChannelsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.NotificationChannel, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.NotificationChannelListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.NotificationChannelListIterator, err error) Notify(ctx context.Context, resourceGroupName string, labName string, name string, notifyParameters dtl.NotifyParameters) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, notificationChannel dtl.NotificationChannelFragment) (result dtl.NotificationChannel, err error) } @@ -159,6 +172,7 @@ type PoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, expand string) (result dtl.Policy, err error) List(ctx context.Context, resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string) (result dtl.PolicyListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string) (result dtl.PolicyListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, policy dtl.PolicyFragment) (result dtl.Policy, err error) } @@ -171,7 +185,9 @@ type SchedulesClientAPI interface { Execute(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.SchedulesExecuteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.Schedule, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListIterator, err error) ListApplicable(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ScheduleListPage, err error) + ListApplicableComplete(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ScheduleListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, schedule dtl.ScheduleFragment) (result dtl.Schedule, err error) } @@ -192,6 +208,7 @@ type UsersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.UsersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.User, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.UserListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.UserListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, userParameter dtl.UserFragment) (result dtl.User, err error) } @@ -205,6 +222,7 @@ type DisksClientAPI interface { Detach(ctx context.Context, resourceGroupName string, labName string, userName string, name string, detachDiskProperties dtl.DetachDiskProperties) (result dtl.DisksDetachFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result dtl.Disk, err error) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.DiskListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.DiskListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, userName string, name string, disk dtl.DiskFragment) (result dtl.Disk, err error) } @@ -216,6 +234,7 @@ type EnvironmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result dtl.EnvironmentsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result dtl.Environment, err error) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.EnvironmentListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.EnvironmentListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, userName string, name string, dtlEnvironment dtl.EnvironmentFragment) (result dtl.Environment, err error) } @@ -227,6 +246,7 @@ type SecretsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result dtl.Secret, err error) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.SecretListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.SecretListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, userName string, name string, secret dtl.SecretFragment) (result dtl.Secret, err error) } @@ -238,6 +258,7 @@ type ServiceFabricsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result dtl.ServiceFabricsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result dtl.ServiceFabric, err error) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.ServiceFabricListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result dtl.ServiceFabricListIterator, err error) ListApplicableSchedules(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result dtl.ApplicableSchedule, err error) Start(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result dtl.ServiceFabricsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result dtl.ServiceFabricsStopFuture, err error) @@ -253,6 +274,7 @@ type ServiceFabricSchedulesClientAPI interface { Execute(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, name string) (result dtl.ServiceFabricSchedulesExecuteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, name string, expand string) (result dtl.Schedule, err error) List(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, userName string, serviceFabricName string, name string, schedule dtl.ScheduleFragment) (result dtl.Schedule, err error) } @@ -269,6 +291,7 @@ type VirtualMachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.LabVirtualMachine, err error) GetRdpFileContents(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.RdpConnection, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.LabVirtualMachineListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.LabVirtualMachineListIterator, err error) ListApplicableSchedules(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ApplicableSchedule, err error) Redeploy(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualMachinesRedeployFuture, err error) Resize(ctx context.Context, resourceGroupName string, labName string, name string, resizeLabVirtualMachineProperties dtl.ResizeLabVirtualMachineProperties) (result dtl.VirtualMachinesResizeFuture, err error) @@ -289,6 +312,7 @@ type VirtualMachineSchedulesClientAPI interface { Execute(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string) (result dtl.VirtualMachineSchedulesExecuteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, expand string) (result dtl.Schedule, err error) List(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string) (result dtl.ScheduleListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, schedule dtl.ScheduleFragment) (result dtl.Schedule, err error) } @@ -300,6 +324,7 @@ type VirtualNetworksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualNetworksDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result dtl.VirtualNetwork, err error) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.VirtualNetworkListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result dtl.VirtualNetworkListIterator, err error) Update(ctx context.Context, resourceGroupName string, labName string, name string, virtualNetwork dtl.VirtualNetworkFragment) (result dtl.VirtualNetwork, err error) } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/environments.go b/services/devtestlabs/mgmt/2018-09-15/dtl/environments.go index a710d520c413..a4ca4e418d4f 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/environments.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/environments.go @@ -36,7 +36,8 @@ func NewEnvironmentsClient(subscriptionID string) EnvironmentsClient { return NewEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client. +// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) EnvironmentsClient { return EnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/formulas.go b/services/devtestlabs/mgmt/2018-09-15/dtl/formulas.go index 7e57e5c987ff..4758eca67d70 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/formulas.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/formulas.go @@ -36,7 +36,8 @@ func NewFormulasClient(subscriptionID string) FormulasClient { return NewFormulasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFormulasClientWithBaseURI creates an instance of the FormulasClient client. +// NewFormulasClientWithBaseURI creates an instance of the FormulasClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFormulasClientWithBaseURI(baseURI string, subscriptionID string) FormulasClient { return FormulasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/galleryimages.go b/services/devtestlabs/mgmt/2018-09-15/dtl/galleryimages.go index 4e8d8bda2dd2..7df1e7e9b02e 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/galleryimages.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/galleryimages.go @@ -35,7 +35,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/globalschedules.go b/services/devtestlabs/mgmt/2018-09-15/dtl/globalschedules.go index acdbd3aa9070..e597705173e4 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/globalschedules.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/globalschedules.go @@ -36,7 +36,8 @@ func NewGlobalSchedulesClient(subscriptionID string) GlobalSchedulesClient { return NewGlobalSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalSchedulesClientWithBaseURI creates an instance of the GlobalSchedulesClient client. +// NewGlobalSchedulesClientWithBaseURI creates an instance of the GlobalSchedulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGlobalSchedulesClientWithBaseURI(baseURI string, subscriptionID string) GlobalSchedulesClient { return GlobalSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/labs.go b/services/devtestlabs/mgmt/2018-09-15/dtl/labs.go index 253c93a5b441..6c4c5a29d89a 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/labs.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/labs.go @@ -35,7 +35,8 @@ func NewLabsClient(subscriptionID string) LabsClient { return NewLabsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLabsClientWithBaseURI creates an instance of the LabsClient client. +// NewLabsClientWithBaseURI creates an instance of the LabsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLabsClientWithBaseURI(baseURI string, subscriptionID string) LabsClient { return LabsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/notificationchannels.go b/services/devtestlabs/mgmt/2018-09-15/dtl/notificationchannels.go index ea52873bf53d..0db0ecb9ed56 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/notificationchannels.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/notificationchannels.go @@ -36,7 +36,9 @@ func NewNotificationChannelsClient(subscriptionID string) NotificationChannelsCl return NewNotificationChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationChannelsClientWithBaseURI creates an instance of the NotificationChannelsClient client. +// NewNotificationChannelsClientWithBaseURI creates an instance of the NotificationChannelsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewNotificationChannelsClientWithBaseURI(baseURI string, subscriptionID string) NotificationChannelsClient { return NotificationChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/operations.go b/services/devtestlabs/mgmt/2018-09-15/dtl/operations.go index 441870934493..fc692567bc51 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/operations.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/policies.go b/services/devtestlabs/mgmt/2018-09-15/dtl/policies.go index 612f8f7cbdc3..d709d0e1343f 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/policies.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/policies.go @@ -36,7 +36,8 @@ func NewPoliciesClient(subscriptionID string) PoliciesClient { return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client. +// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient { return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/policysets.go b/services/devtestlabs/mgmt/2018-09-15/dtl/policysets.go index 660b139cd91b..54bacbfc28d5 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/policysets.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/policysets.go @@ -35,7 +35,8 @@ func NewPolicySetsClient(subscriptionID string) PolicySetsClient { return NewPolicySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySetsClientWithBaseURI creates an instance of the PolicySetsClient client. +// NewPolicySetsClientWithBaseURI creates an instance of the PolicySetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySetsClient { return PolicySetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/provideroperations.go b/services/devtestlabs/mgmt/2018-09-15/dtl/provideroperations.go index 9587cb716320..be1d3e8327d1 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/provideroperations.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/provideroperations.go @@ -35,7 +35,9 @@ func NewProviderOperationsClient(subscriptionID string) ProviderOperationsClient return NewProviderOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsClientWithBaseURI creates an instance of the ProviderOperationsClient client. +// NewProviderOperationsClientWithBaseURI creates an instance of the ProviderOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProviderOperationsClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsClient { return ProviderOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/schedules.go b/services/devtestlabs/mgmt/2018-09-15/dtl/schedules.go index d30391fec48f..c5ac1e776700 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/schedules.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/schedules.go @@ -36,7 +36,8 @@ func NewSchedulesClient(subscriptionID string) SchedulesClient { return NewSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSchedulesClientWithBaseURI creates an instance of the SchedulesClient client. +// NewSchedulesClientWithBaseURI creates an instance of the SchedulesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSchedulesClientWithBaseURI(baseURI string, subscriptionID string) SchedulesClient { return SchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/secrets.go b/services/devtestlabs/mgmt/2018-09-15/dtl/secrets.go index dc8202c91a15..4bd5f0048698 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/secrets.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/secrets.go @@ -36,7 +36,8 @@ func NewSecretsClient(subscriptionID string) SecretsClient { return NewSecretsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecretsClientWithBaseURI creates an instance of the SecretsClient client. +// NewSecretsClientWithBaseURI creates an instance of the SecretsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecretsClientWithBaseURI(baseURI string, subscriptionID string) SecretsClient { return SecretsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/servicefabrics.go b/services/devtestlabs/mgmt/2018-09-15/dtl/servicefabrics.go index f71f6a5143b9..c0a36a7f4a76 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/servicefabrics.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/servicefabrics.go @@ -36,7 +36,8 @@ func NewServiceFabricsClient(subscriptionID string) ServiceFabricsClient { return NewServiceFabricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceFabricsClientWithBaseURI creates an instance of the ServiceFabricsClient client. +// NewServiceFabricsClientWithBaseURI creates an instance of the ServiceFabricsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceFabricsClientWithBaseURI(baseURI string, subscriptionID string) ServiceFabricsClient { return ServiceFabricsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/servicefabricschedules.go b/services/devtestlabs/mgmt/2018-09-15/dtl/servicefabricschedules.go index 88ca2e609489..2073e02e6800 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/servicefabricschedules.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/servicefabricschedules.go @@ -36,7 +36,9 @@ func NewServiceFabricSchedulesClient(subscriptionID string) ServiceFabricSchedul return NewServiceFabricSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceFabricSchedulesClientWithBaseURI creates an instance of the ServiceFabricSchedulesClient client. +// NewServiceFabricSchedulesClientWithBaseURI creates an instance of the ServiceFabricSchedulesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewServiceFabricSchedulesClientWithBaseURI(baseURI string, subscriptionID string) ServiceFabricSchedulesClient { return ServiceFabricSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/servicerunners.go b/services/devtestlabs/mgmt/2018-09-15/dtl/servicerunners.go index 9fffb31a78c9..fe5c64f7dff1 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/servicerunners.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/servicerunners.go @@ -35,7 +35,8 @@ func NewServiceRunnersClient(subscriptionID string) ServiceRunnersClient { return NewServiceRunnersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceRunnersClientWithBaseURI creates an instance of the ServiceRunnersClient client. +// NewServiceRunnersClientWithBaseURI creates an instance of the ServiceRunnersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceRunnersClientWithBaseURI(baseURI string, subscriptionID string) ServiceRunnersClient { return ServiceRunnersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/users.go b/services/devtestlabs/mgmt/2018-09-15/dtl/users.go index 80d9a6d0b7ff..d9927a0345a3 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/users.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/users.go @@ -35,7 +35,8 @@ func NewUsersClient(subscriptionID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/virtualmachines.go b/services/devtestlabs/mgmt/2018-09-15/dtl/virtualmachines.go index c60a9f6ea88d..2f681da06dba 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/virtualmachines.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/virtualmachineschedules.go b/services/devtestlabs/mgmt/2018-09-15/dtl/virtualmachineschedules.go index 1487bd7b5b57..4b05ffed17dc 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/virtualmachineschedules.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/virtualmachineschedules.go @@ -36,7 +36,9 @@ func NewVirtualMachineSchedulesClient(subscriptionID string) VirtualMachineSched return NewVirtualMachineSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSchedulesClientWithBaseURI creates an instance of the VirtualMachineSchedulesClient client. +// NewVirtualMachineSchedulesClientWithBaseURI creates an instance of the VirtualMachineSchedulesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewVirtualMachineSchedulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSchedulesClient { return VirtualMachineSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/devtestlabs/mgmt/2018-09-15/dtl/virtualnetworks.go b/services/devtestlabs/mgmt/2018-09-15/dtl/virtualnetworks.go index e0c7c51ed5ba..b0f3910789a3 100644 --- a/services/devtestlabs/mgmt/2018-09-15/dtl/virtualnetworks.go +++ b/services/devtestlabs/mgmt/2018-09-15/dtl/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/dns/mgmt/2016-04-01/dns/client.go b/services/dns/mgmt/2016-04-01/dns/client.go index 4dfa42b84d6f..99354b4c36a1 100644 --- a/services/dns/mgmt/2016-04-01/dns/client.go +++ b/services/dns/mgmt/2016-04-01/dns/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/dns/mgmt/2016-04-01/dns/dnsapi/interfaces.go b/services/dns/mgmt/2016-04-01/dns/dnsapi/interfaces.go index 0a0816a30adb..9a29117a4841 100644 --- a/services/dns/mgmt/2016-04-01/dns/dnsapi/interfaces.go +++ b/services/dns/mgmt/2016-04-01/dns/dnsapi/interfaces.go @@ -29,7 +29,9 @@ type RecordSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType) (result dns.RecordSet, err error) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByTypeComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, parameters dns.RecordSet, ifMatch string) (result dns.RecordSet, err error) } @@ -41,7 +43,9 @@ type ZonesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result dns.ZonesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, zoneName string) (result dns.Zone, err error) List(ctx context.Context, top *int32) (result dns.ZoneListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result dns.ZoneListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultIterator, err error) } var _ ZonesClientAPI = (*dns.ZonesClient)(nil) diff --git a/services/dns/mgmt/2016-04-01/dns/recordsets.go b/services/dns/mgmt/2016-04-01/dns/recordsets.go index 67b0e73a0982..4f6b99b589b5 100644 --- a/services/dns/mgmt/2016-04-01/dns/recordsets.go +++ b/services/dns/mgmt/2016-04-01/dns/recordsets.go @@ -36,7 +36,8 @@ func NewRecordSetsClient(subscriptionID string) RecordSetsClient { return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client. +// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/dns/mgmt/2016-04-01/dns/zones.go b/services/dns/mgmt/2016-04-01/dns/zones.go index 27e713b923d7..2d997f025bbf 100644 --- a/services/dns/mgmt/2016-04-01/dns/zones.go +++ b/services/dns/mgmt/2016-04-01/dns/zones.go @@ -36,7 +36,8 @@ func NewZonesClient(subscriptionID string) ZonesClient { return NewZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewZonesClientWithBaseURI creates an instance of the ZonesClient client. +// NewZonesClientWithBaseURI creates an instance of the ZonesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient { return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/dns/mgmt/2017-09-01/dns/client.go b/services/dns/mgmt/2017-09-01/dns/client.go index 482d2f94352c..e536413281aa 100644 --- a/services/dns/mgmt/2017-09-01/dns/client.go +++ b/services/dns/mgmt/2017-09-01/dns/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/dns/mgmt/2017-09-01/dns/dnsapi/interfaces.go b/services/dns/mgmt/2017-09-01/dns/dnsapi/interfaces.go index c9e23a7bc05a..58690133f7bc 100644 --- a/services/dns/mgmt/2017-09-01/dns/dnsapi/interfaces.go +++ b/services/dns/mgmt/2017-09-01/dns/dnsapi/interfaces.go @@ -29,7 +29,9 @@ type RecordSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType) (result dns.RecordSet, err error) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByTypeComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, parameters dns.RecordSet, ifMatch string) (result dns.RecordSet, err error) } @@ -41,7 +43,9 @@ type ZonesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result dns.ZonesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, zoneName string) (result dns.Zone, err error) List(ctx context.Context, top *int32) (result dns.ZoneListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result dns.ZoneListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultIterator, err error) } var _ ZonesClientAPI = (*dns.ZonesClient)(nil) diff --git a/services/dns/mgmt/2017-09-01/dns/recordsets.go b/services/dns/mgmt/2017-09-01/dns/recordsets.go index b341b1e4456a..0ef767424e4a 100644 --- a/services/dns/mgmt/2017-09-01/dns/recordsets.go +++ b/services/dns/mgmt/2017-09-01/dns/recordsets.go @@ -36,7 +36,8 @@ func NewRecordSetsClient(subscriptionID string) RecordSetsClient { return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client. +// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/dns/mgmt/2017-09-01/dns/zones.go b/services/dns/mgmt/2017-09-01/dns/zones.go index 7bc248d69e4d..cf9a443926f9 100644 --- a/services/dns/mgmt/2017-09-01/dns/zones.go +++ b/services/dns/mgmt/2017-09-01/dns/zones.go @@ -36,7 +36,8 @@ func NewZonesClient(subscriptionID string) ZonesClient { return NewZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewZonesClientWithBaseURI creates an instance of the ZonesClient client. +// NewZonesClientWithBaseURI creates an instance of the ZonesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient { return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/dns/mgmt/2017-10-01/dns/client.go b/services/dns/mgmt/2017-10-01/dns/client.go index a89f2dd318a1..5940712298c4 100644 --- a/services/dns/mgmt/2017-10-01/dns/client.go +++ b/services/dns/mgmt/2017-10-01/dns/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/dns/mgmt/2017-10-01/dns/dnsapi/interfaces.go b/services/dns/mgmt/2017-10-01/dns/dnsapi/interfaces.go index 4cc9d552bddf..f6daacabc288 100644 --- a/services/dns/mgmt/2017-10-01/dns/dnsapi/interfaces.go +++ b/services/dns/mgmt/2017-10-01/dns/dnsapi/interfaces.go @@ -29,8 +29,11 @@ type RecordSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType) (result dns.RecordSet, err error) ListAllByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result dns.RecordSetListResultPage, err error) + ListAllByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result dns.RecordSetListResultIterator, err error) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByTypeComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, parameters dns.RecordSet, ifMatch string) (result dns.RecordSet, err error) } @@ -42,7 +45,9 @@ type ZonesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result dns.ZonesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, zoneName string) (result dns.Zone, err error) List(ctx context.Context, top *int32) (result dns.ZoneListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result dns.ZoneListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, zoneName string, parameters dns.ZoneUpdate, ifMatch string) (result dns.Zone, err error) } diff --git a/services/dns/mgmt/2017-10-01/dns/recordsets.go b/services/dns/mgmt/2017-10-01/dns/recordsets.go index e20b90cb1454..8d9f1a8fea29 100644 --- a/services/dns/mgmt/2017-10-01/dns/recordsets.go +++ b/services/dns/mgmt/2017-10-01/dns/recordsets.go @@ -36,7 +36,8 @@ func NewRecordSetsClient(subscriptionID string) RecordSetsClient { return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client. +// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/dns/mgmt/2017-10-01/dns/zones.go b/services/dns/mgmt/2017-10-01/dns/zones.go index dfbc8f465c41..cb810986ed38 100644 --- a/services/dns/mgmt/2017-10-01/dns/zones.go +++ b/services/dns/mgmt/2017-10-01/dns/zones.go @@ -36,7 +36,8 @@ func NewZonesClient(subscriptionID string) ZonesClient { return NewZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewZonesClientWithBaseURI creates an instance of the ZonesClient client. +// NewZonesClientWithBaseURI creates an instance of the ZonesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient { return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/dns/mgmt/2018-05-01/dns/client.go b/services/dns/mgmt/2018-05-01/dns/client.go index cf17ca134ab0..fb721c511bd6 100644 --- a/services/dns/mgmt/2018-05-01/dns/client.go +++ b/services/dns/mgmt/2018-05-01/dns/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/dns/mgmt/2018-05-01/dns/dnsapi/interfaces.go b/services/dns/mgmt/2018-05-01/dns/dnsapi/interfaces.go index 1e9eb8c0783a..df204724ceda 100644 --- a/services/dns/mgmt/2018-05-01/dns/dnsapi/interfaces.go +++ b/services/dns/mgmt/2018-05-01/dns/dnsapi/interfaces.go @@ -29,8 +29,11 @@ type RecordSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType) (result dns.RecordSet, err error) ListAllByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result dns.RecordSetListResultPage, err error) + ListAllByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result dns.RecordSetListResultIterator, err error) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByTypeComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, parameters dns.RecordSet, ifMatch string) (result dns.RecordSet, err error) } @@ -42,7 +45,9 @@ type ZonesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result dns.ZonesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, zoneName string) (result dns.Zone, err error) List(ctx context.Context, top *int32) (result dns.ZoneListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result dns.ZoneListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, zoneName string, parameters dns.ZoneUpdate, ifMatch string) (result dns.Zone, err error) } diff --git a/services/dns/mgmt/2018-05-01/dns/recordsets.go b/services/dns/mgmt/2018-05-01/dns/recordsets.go index a54a79fa17de..8ca7dfb7ec80 100644 --- a/services/dns/mgmt/2018-05-01/dns/recordsets.go +++ b/services/dns/mgmt/2018-05-01/dns/recordsets.go @@ -35,7 +35,8 @@ func NewRecordSetsClient(subscriptionID string) RecordSetsClient { return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client. +// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/dns/mgmt/2018-05-01/dns/resourcereference.go b/services/dns/mgmt/2018-05-01/dns/resourcereference.go index 35f01ca41b50..418c65b3ae33 100644 --- a/services/dns/mgmt/2018-05-01/dns/resourcereference.go +++ b/services/dns/mgmt/2018-05-01/dns/resourcereference.go @@ -35,7 +35,9 @@ func NewResourceReferenceClient(subscriptionID string) ResourceReferenceClient { return NewResourceReferenceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceReferenceClientWithBaseURI creates an instance of the ResourceReferenceClient client. +// NewResourceReferenceClientWithBaseURI creates an instance of the ResourceReferenceClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewResourceReferenceClientWithBaseURI(baseURI string, subscriptionID string) ResourceReferenceClient { return ResourceReferenceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/dns/mgmt/2018-05-01/dns/zones.go b/services/dns/mgmt/2018-05-01/dns/zones.go index de1ede07511d..4d5bb9204efb 100644 --- a/services/dns/mgmt/2018-05-01/dns/zones.go +++ b/services/dns/mgmt/2018-05-01/dns/zones.go @@ -35,7 +35,8 @@ func NewZonesClient(subscriptionID string) ZonesClient { return NewZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewZonesClientWithBaseURI creates an instance of the ZonesClient client. +// NewZonesClientWithBaseURI creates an instance of the ZonesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient { return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/domainservices/mgmt/2017-01-01/aad/aadapi/interfaces.go b/services/domainservices/mgmt/2017-01-01/aad/aadapi/interfaces.go index 4cd8fe0ba45f..cb0435efb507 100644 --- a/services/domainservices/mgmt/2017-01-01/aad/aadapi/interfaces.go +++ b/services/domainservices/mgmt/2017-01-01/aad/aadapi/interfaces.go @@ -25,6 +25,7 @@ import ( // DomainServiceOperationsClientAPI contains the set of methods on the DomainServiceOperationsClient type. type DomainServiceOperationsClientAPI interface { List(ctx context.Context) (result aad.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result aad.OperationEntityListResultIterator, err error) } var _ DomainServiceOperationsClientAPI = (*aad.DomainServiceOperationsClient)(nil) @@ -35,7 +36,9 @@ type DomainServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, domainServiceName string) (result aad.DomainServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, domainServiceName string) (result aad.DomainService, err error) List(ctx context.Context) (result aad.DomainServiceListResultPage, err error) + ListComplete(ctx context.Context) (result aad.DomainServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result aad.DomainServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result aad.DomainServiceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, domainServiceName string, domainService aad.DomainService) (result aad.DomainServicesUpdateFuture, err error) } diff --git a/services/domainservices/mgmt/2017-01-01/aad/client.go b/services/domainservices/mgmt/2017-01-01/aad/client.go index 301896863995..16e56daaa290 100644 --- a/services/domainservices/mgmt/2017-01-01/aad/client.go +++ b/services/domainservices/mgmt/2017-01-01/aad/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/domainservices/mgmt/2017-01-01/aad/domainserviceoperations.go b/services/domainservices/mgmt/2017-01-01/aad/domainserviceoperations.go index 3735d50e27ce..0d13c24e01aa 100644 --- a/services/domainservices/mgmt/2017-01-01/aad/domainserviceoperations.go +++ b/services/domainservices/mgmt/2017-01-01/aad/domainserviceoperations.go @@ -35,7 +35,9 @@ func NewDomainServiceOperationsClient(subscriptionID string) DomainServiceOperat return NewDomainServiceOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainServiceOperationsClientWithBaseURI creates an instance of the DomainServiceOperationsClient client. +// NewDomainServiceOperationsClientWithBaseURI creates an instance of the DomainServiceOperationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDomainServiceOperationsClientWithBaseURI(baseURI string, subscriptionID string) DomainServiceOperationsClient { return DomainServiceOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/domainservices/mgmt/2017-01-01/aad/domainservices.go b/services/domainservices/mgmt/2017-01-01/aad/domainservices.go index 3b19e52aad80..394650cfaafe 100644 --- a/services/domainservices/mgmt/2017-01-01/aad/domainservices.go +++ b/services/domainservices/mgmt/2017-01-01/aad/domainservices.go @@ -36,7 +36,8 @@ func NewDomainServicesClient(subscriptionID string) DomainServicesClient { return NewDomainServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainServicesClientWithBaseURI creates an instance of the DomainServicesClient client. +// NewDomainServicesClientWithBaseURI creates an instance of the DomainServicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainServicesClientWithBaseURI(baseURI string, subscriptionID string) DomainServicesClient { return DomainServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/domainservices/mgmt/2017-06-01/aad/aadapi/interfaces.go b/services/domainservices/mgmt/2017-06-01/aad/aadapi/interfaces.go index 2fa637e9d9a0..1f03df950c61 100644 --- a/services/domainservices/mgmt/2017-06-01/aad/aadapi/interfaces.go +++ b/services/domainservices/mgmt/2017-06-01/aad/aadapi/interfaces.go @@ -25,6 +25,7 @@ import ( // DomainServiceOperationsClientAPI contains the set of methods on the DomainServiceOperationsClient type. type DomainServiceOperationsClientAPI interface { List(ctx context.Context) (result aad.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result aad.OperationEntityListResultIterator, err error) } var _ DomainServiceOperationsClientAPI = (*aad.DomainServiceOperationsClient)(nil) @@ -35,7 +36,9 @@ type DomainServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, domainServiceName string) (result aad.DomainServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, domainServiceName string) (result aad.DomainService, err error) List(ctx context.Context) (result aad.DomainServiceListResultPage, err error) + ListComplete(ctx context.Context) (result aad.DomainServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result aad.DomainServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result aad.DomainServiceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, domainServiceName string, domainService aad.DomainService) (result aad.DomainServicesUpdateFuture, err error) } diff --git a/services/domainservices/mgmt/2017-06-01/aad/client.go b/services/domainservices/mgmt/2017-06-01/aad/client.go index 875442063134..aa2c1ca579a8 100644 --- a/services/domainservices/mgmt/2017-06-01/aad/client.go +++ b/services/domainservices/mgmt/2017-06-01/aad/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/domainservices/mgmt/2017-06-01/aad/domainserviceoperations.go b/services/domainservices/mgmt/2017-06-01/aad/domainserviceoperations.go index a79f5eb7536f..faef80ac56dd 100644 --- a/services/domainservices/mgmt/2017-06-01/aad/domainserviceoperations.go +++ b/services/domainservices/mgmt/2017-06-01/aad/domainserviceoperations.go @@ -35,7 +35,9 @@ func NewDomainServiceOperationsClient(subscriptionID string) DomainServiceOperat return NewDomainServiceOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainServiceOperationsClientWithBaseURI creates an instance of the DomainServiceOperationsClient client. +// NewDomainServiceOperationsClientWithBaseURI creates an instance of the DomainServiceOperationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDomainServiceOperationsClientWithBaseURI(baseURI string, subscriptionID string) DomainServiceOperationsClient { return DomainServiceOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/domainservices/mgmt/2017-06-01/aad/domainservices.go b/services/domainservices/mgmt/2017-06-01/aad/domainservices.go index 9c4e3fc68441..644aeb6a3b45 100644 --- a/services/domainservices/mgmt/2017-06-01/aad/domainservices.go +++ b/services/domainservices/mgmt/2017-06-01/aad/domainservices.go @@ -36,7 +36,8 @@ func NewDomainServicesClient(subscriptionID string) DomainServicesClient { return NewDomainServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainServicesClientWithBaseURI creates an instance of the DomainServicesClient client. +// NewDomainServicesClientWithBaseURI creates an instance of the DomainServicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainServicesClientWithBaseURI(baseURI string, subscriptionID string) DomainServicesClient { return DomainServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2018-01-01/eventgrid/client.go b/services/eventgrid/mgmt/2018-01-01/eventgrid/client.go index 677813b81fba..cacacfd5468d 100644 --- a/services/eventgrid/mgmt/2018-01-01/eventgrid/client.go +++ b/services/eventgrid/mgmt/2018-01-01/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go b/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go index e4b30c04623a..70ee264cac39 100644 --- a/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go +++ b/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2018-01-01/eventgrid/operations.go b/services/eventgrid/mgmt/2018-01-01/eventgrid/operations.go index 9fee80856cf8..e8c6f0e154f5 100644 --- a/services/eventgrid/mgmt/2018-01-01/eventgrid/operations.go +++ b/services/eventgrid/mgmt/2018-01-01/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go b/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go index 18bd94bbe356..9c13b84ae593 100644 --- a/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go +++ b/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2018-01-01/eventgrid/topictypes.go b/services/eventgrid/mgmt/2018-01-01/eventgrid/topictypes.go index 0d6542b556b1..33e98bf0b894 100644 --- a/services/eventgrid/mgmt/2018-01-01/eventgrid/topictypes.go +++ b/services/eventgrid/mgmt/2018-01-01/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2019-01-01/eventgrid/client.go b/services/eventgrid/mgmt/2019-01-01/eventgrid/client.go index db60412d516d..094166ddbd52 100644 --- a/services/eventgrid/mgmt/2019-01-01/eventgrid/client.go +++ b/services/eventgrid/mgmt/2019-01-01/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/eventgrid/mgmt/2019-01-01/eventgrid/eventsubscriptions.go b/services/eventgrid/mgmt/2019-01-01/eventgrid/eventsubscriptions.go index 99566449fe6e..cf0496c76401 100644 --- a/services/eventgrid/mgmt/2019-01-01/eventgrid/eventsubscriptions.go +++ b/services/eventgrid/mgmt/2019-01-01/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2019-01-01/eventgrid/operations.go b/services/eventgrid/mgmt/2019-01-01/eventgrid/operations.go index 358d7c9e8cde..ab562a99e06f 100644 --- a/services/eventgrid/mgmt/2019-01-01/eventgrid/operations.go +++ b/services/eventgrid/mgmt/2019-01-01/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/eventgrid/mgmt/2019-01-01/eventgrid/topics.go b/services/eventgrid/mgmt/2019-01-01/eventgrid/topics.go index 5dfb0354253f..3d4c3c4cf7ae 100644 --- a/services/eventgrid/mgmt/2019-01-01/eventgrid/topics.go +++ b/services/eventgrid/mgmt/2019-01-01/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2019-01-01/eventgrid/topictypes.go b/services/eventgrid/mgmt/2019-01-01/eventgrid/topictypes.go index 8619807bc009..7542f722282a 100644 --- a/services/eventgrid/mgmt/2019-01-01/eventgrid/topictypes.go +++ b/services/eventgrid/mgmt/2019-01-01/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2019-06-01/eventgrid/client.go b/services/eventgrid/mgmt/2019-06-01/eventgrid/client.go index 4a9d76f10349..c05e1bd0ac62 100644 --- a/services/eventgrid/mgmt/2019-06-01/eventgrid/client.go +++ b/services/eventgrid/mgmt/2019-06-01/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/eventgrid/mgmt/2019-06-01/eventgrid/domains.go b/services/eventgrid/mgmt/2019-06-01/eventgrid/domains.go index fb3650ac5c8c..bf4330ac403e 100644 --- a/services/eventgrid/mgmt/2019-06-01/eventgrid/domains.go +++ b/services/eventgrid/mgmt/2019-06-01/eventgrid/domains.go @@ -36,7 +36,8 @@ func NewDomainsClient(subscriptionID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, subscriptionID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2019-06-01/eventgrid/domaintopics.go b/services/eventgrid/mgmt/2019-06-01/eventgrid/domaintopics.go index 8f1cf1bea559..25e809f0e1b0 100644 --- a/services/eventgrid/mgmt/2019-06-01/eventgrid/domaintopics.go +++ b/services/eventgrid/mgmt/2019-06-01/eventgrid/domaintopics.go @@ -35,7 +35,8 @@ func NewDomainTopicsClient(subscriptionID string) DomainTopicsClient { return NewDomainTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainTopicsClientWithBaseURI creates an instance of the DomainTopicsClient client. +// NewDomainTopicsClientWithBaseURI creates an instance of the DomainTopicsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainTopicsClientWithBaseURI(baseURI string, subscriptionID string) DomainTopicsClient { return DomainTopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2019-06-01/eventgrid/eventgridapi/interfaces.go b/services/eventgrid/mgmt/2019-06-01/eventgrid/eventgridapi/interfaces.go index 68ce8048ea42..a8815e5473a5 100644 --- a/services/eventgrid/mgmt/2019-06-01/eventgrid/eventgridapi/interfaces.go +++ b/services/eventgrid/mgmt/2019-06-01/eventgrid/eventgridapi/interfaces.go @@ -28,7 +28,9 @@ type DomainsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.DomainsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.Domain, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.DomainsListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.DomainsListResultIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32) (result eventgrid.DomainsListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32) (result eventgrid.DomainsListResultIterator, err error) ListSharedAccessKeys(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.DomainSharedAccessKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, domainName string, regenerateKeyRequest eventgrid.DomainRegenerateKeyRequest) (result eventgrid.DomainSharedAccessKeys, err error) Update(ctx context.Context, resourceGroupName string, domainName string, domainUpdateParameters eventgrid.DomainUpdateParameters) (result eventgrid.DomainsUpdateFuture, err error) @@ -42,6 +44,7 @@ type DomainTopicsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, domainName string, domainTopicName string) (result eventgrid.DomainTopicsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, domainName string, domainTopicName string) (result eventgrid.DomainTopic, err error) ListByDomain(ctx context.Context, resourceGroupName string, domainName string, filter string, top *int32) (result eventgrid.DomainTopicsListResultPage, err error) + ListByDomainComplete(ctx context.Context, resourceGroupName string, domainName string, filter string, top *int32) (result eventgrid.DomainTopicsListResultIterator, err error) } var _ DomainTopicsClientAPI = (*eventgrid.DomainTopicsClient)(nil) @@ -53,15 +56,25 @@ type EventSubscriptionsClientAPI interface { Get(ctx context.Context, scope string, eventSubscriptionName string) (result eventgrid.EventSubscription, err error) GetFullURL(ctx context.Context, scope string, eventSubscriptionName string) (result eventgrid.EventSubscriptionFullURL, err error) ListByDomainTopic(ctx context.Context, resourceGroupName string, domainName string, topicName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListByDomainTopicComplete(ctx context.Context, resourceGroupName string, domainName string, topicName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListByResource(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListByResourceComplete(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalByResourceGroupForTopicType(ctx context.Context, resourceGroupName string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalByResourceGroupForTopicTypeComplete(ctx context.Context, resourceGroupName string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalBySubscription(ctx context.Context, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalBySubscriptionComplete(ctx context.Context, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalBySubscriptionForTopicType(ctx context.Context, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalBySubscriptionForTopicTypeComplete(ctx context.Context, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalByResourceGroup(ctx context.Context, resourceGroupName string, location string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalByResourceGroupComplete(ctx context.Context, resourceGroupName string, location string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalByResourceGroupForTopicType(ctx context.Context, resourceGroupName string, location string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalByResourceGroupForTopicTypeComplete(ctx context.Context, resourceGroupName string, location string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalBySubscription(ctx context.Context, location string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalBySubscriptionComplete(ctx context.Context, location string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalBySubscriptionForTopicType(ctx context.Context, location string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalBySubscriptionForTopicTypeComplete(ctx context.Context, location string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) Update(ctx context.Context, scope string, eventSubscriptionName string, eventSubscriptionUpdateParameters eventgrid.EventSubscriptionUpdateParameters) (result eventgrid.EventSubscriptionsUpdateFuture, err error) } @@ -80,7 +93,9 @@ type TopicsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.TopicsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.Topic, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.TopicsListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.TopicsListResultIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32) (result eventgrid.TopicsListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32) (result eventgrid.TopicsListResultIterator, err error) ListEventTypes(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (result eventgrid.EventTypesListResult, err error) ListSharedAccessKeys(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.TopicSharedAccessKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, topicName string, regenerateKeyRequest eventgrid.TopicRegenerateKeyRequest) (result eventgrid.TopicSharedAccessKeys, err error) diff --git a/services/eventgrid/mgmt/2019-06-01/eventgrid/eventsubscriptions.go b/services/eventgrid/mgmt/2019-06-01/eventgrid/eventsubscriptions.go index 94d46e735aee..ca806b87d045 100644 --- a/services/eventgrid/mgmt/2019-06-01/eventgrid/eventsubscriptions.go +++ b/services/eventgrid/mgmt/2019-06-01/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2019-06-01/eventgrid/operations.go b/services/eventgrid/mgmt/2019-06-01/eventgrid/operations.go index 165a15cb5372..b1ada8f408f6 100644 --- a/services/eventgrid/mgmt/2019-06-01/eventgrid/operations.go +++ b/services/eventgrid/mgmt/2019-06-01/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/eventgrid/mgmt/2019-06-01/eventgrid/topics.go b/services/eventgrid/mgmt/2019-06-01/eventgrid/topics.go index 7eb016d0ff77..63a5916be948 100644 --- a/services/eventgrid/mgmt/2019-06-01/eventgrid/topics.go +++ b/services/eventgrid/mgmt/2019-06-01/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventgrid/mgmt/2019-06-01/eventgrid/topictypes.go b/services/eventgrid/mgmt/2019-06-01/eventgrid/topictypes.go index ffb53bef6805..5dbe55bf161f 100644 --- a/services/eventgrid/mgmt/2019-06-01/eventgrid/topictypes.go +++ b/services/eventgrid/mgmt/2019-06-01/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventhub/mgmt/2015-08-01/eventhub/client.go b/services/eventhub/mgmt/2015-08-01/eventhub/client.go index b5fd785a2a18..62ae3ad13117 100644 --- a/services/eventhub/mgmt/2015-08-01/eventhub/client.go +++ b/services/eventhub/mgmt/2015-08-01/eventhub/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/eventhub/mgmt/2015-08-01/eventhub/consumergroups.go b/services/eventhub/mgmt/2015-08-01/eventhub/consumergroups.go index 79147ccbbb76..395a6f3cf928 100644 --- a/services/eventhub/mgmt/2015-08-01/eventhub/consumergroups.go +++ b/services/eventhub/mgmt/2015-08-01/eventhub/consumergroups.go @@ -36,7 +36,8 @@ func NewConsumerGroupsClient(subscriptionID string) ConsumerGroupsClient { return NewConsumerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client. +// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConsumerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerGroupsClient { return ConsumerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventhub/mgmt/2015-08-01/eventhub/eventhubapi/interfaces.go b/services/eventhub/mgmt/2015-08-01/eventhub/eventhubapi/interfaces.go index ce30e411d638..a1b8a25ec1b1 100644 --- a/services/eventhub/mgmt/2015-08-01/eventhub/eventhubapi/interfaces.go +++ b/services/eventhub/mgmt/2015-08-01/eventhub/eventhubapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result eventhub.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result eventhub.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*eventhub.OperationsClient)(nil) @@ -40,8 +41,11 @@ type NamespacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.NamespaceResource, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result eventhub.SharedAccessAuthorizationRuleResource, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.SharedAccessAuthorizationRuleListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result eventhub.NamespaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result eventhub.NamespaceListResultIterator, err error) ListBySubscription(ctx context.Context) (result eventhub.NamespaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result eventhub.NamespaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result eventhub.ResourceListKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters eventhub.RegenerateKeysParameters) (result eventhub.ResourceListKeys, err error) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters eventhub.NamespaceUpdateParameter) (result eventhub.NamespaceResource, err error) @@ -58,7 +62,9 @@ type EventHubsClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result eventhub.ResourceType, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result eventhub.SharedAccessAuthorizationRuleResource, err error) ListAll(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.ListResultPage, err error) + ListAllComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.ListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result eventhub.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result eventhub.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result eventhub.ResourceListKeys, err error) PostAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result eventhub.SharedAccessAuthorizationRuleResource, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters eventhub.RegenerateKeysParameters) (result eventhub.ResourceListKeys, err error) @@ -72,6 +78,7 @@ type ConsumerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result eventhub.ConsumerGroupResource, err error) ListAll(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result eventhub.ConsumerGroupListResultPage, err error) + ListAllComplete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result eventhub.ConsumerGroupListResultIterator, err error) } var _ ConsumerGroupsClientAPI = (*eventhub.ConsumerGroupsClient)(nil) diff --git a/services/eventhub/mgmt/2015-08-01/eventhub/eventhubs.go b/services/eventhub/mgmt/2015-08-01/eventhub/eventhubs.go index 60aeeb2b1285..8ee050215299 100644 --- a/services/eventhub/mgmt/2015-08-01/eventhub/eventhubs.go +++ b/services/eventhub/mgmt/2015-08-01/eventhub/eventhubs.go @@ -36,7 +36,8 @@ func NewEventHubsClient(subscriptionID string) EventHubsClient { return NewEventHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client. +// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventHubsClient { return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventhub/mgmt/2015-08-01/eventhub/namespaces.go b/services/eventhub/mgmt/2015-08-01/eventhub/namespaces.go index ede9922bcbfc..ed2e516b2014 100644 --- a/services/eventhub/mgmt/2015-08-01/eventhub/namespaces.go +++ b/services/eventhub/mgmt/2015-08-01/eventhub/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventhub/mgmt/2015-08-01/eventhub/operations.go b/services/eventhub/mgmt/2015-08-01/eventhub/operations.go index 37bb17ba5f84..ac6d68c1b788 100644 --- a/services/eventhub/mgmt/2015-08-01/eventhub/operations.go +++ b/services/eventhub/mgmt/2015-08-01/eventhub/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/client.go b/services/eventhub/mgmt/2017-04-01/eventhub/client.go index 87055b6514ce..7be22d87dce0 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/client.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go index 4dd760880816..9af57dcf7b87 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go @@ -36,7 +36,8 @@ func NewConsumerGroupsClient(subscriptionID string) ConsumerGroupsClient { return NewConsumerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client. +// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConsumerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerGroupsClient { return ConsumerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go b/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go index 3a202f057d52..e4d771e165d4 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go @@ -36,7 +36,9 @@ func NewDisasterRecoveryConfigsClient(subscriptionID string) DisasterRecoveryCon return NewDisasterRecoveryConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisasterRecoveryConfigsClientWithBaseURI creates an instance of the DisasterRecoveryConfigsClient client. +// NewDisasterRecoveryConfigsClientWithBaseURI creates an instance of the DisasterRecoveryConfigsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDisasterRecoveryConfigsClientWithBaseURI(baseURI string, subscriptionID string) DisasterRecoveryConfigsClient { return DisasterRecoveryConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/eventhubapi/interfaces.go b/services/eventhub/mgmt/2017-04-01/eventhub/eventhubapi/interfaces.go index 80789f252a5d..2fe1bf45b111 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/eventhubapi/interfaces.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/eventhubapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result eventhub.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result eventhub.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*eventhub.OperationsClient)(nil) @@ -43,10 +44,14 @@ type NamespacesClientAPI interface { GetMessagingPlan(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.MessagingPlan, err error) GetNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.NetworkRuleSet, err error) List(ctx context.Context) (result eventhub.EHNamespaceListResultPage, err error) + ListComplete(ctx context.Context) (result eventhub.EHNamespaceListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.AuthorizationRuleListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result eventhub.EHNamespaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result eventhub.EHNamespaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result eventhub.AccessKeys, err error) ListNetworkRuleSets(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.NetworkRuleSetListResultPage, err error) + ListNetworkRuleSetsComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.NetworkRuleSetListResultIterator, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters eventhub.RegenerateAccessKeyParameters) (result eventhub.AccessKeys, err error) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters eventhub.EHNamespace) (result eventhub.EHNamespace, err error) } @@ -63,7 +68,9 @@ type DisasterRecoveryConfigsClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result eventhub.ArmDisasterRecovery, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string) (result eventhub.AuthorizationRule, err error) List(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.ArmDisasterRecoveryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.ArmDisasterRecoveryListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result eventhub.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result eventhub.AuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string) (result eventhub.AccessKeys, err error) } @@ -78,7 +85,9 @@ type EventHubsClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result eventhub.Model, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result eventhub.AuthorizationRule, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result eventhub.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result eventhub.AuthorizationRuleListResultIterator, err error) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result eventhub.ListResultPage, err error) + ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result eventhub.ListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result eventhub.AccessKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters eventhub.RegenerateAccessKeyParameters) (result eventhub.AccessKeys, err error) } @@ -91,6 +100,7 @@ type ConsumerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result eventhub.ConsumerGroup, err error) ListByEventHub(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, skip *int32, top *int32) (result eventhub.ConsumerGroupListResultPage, err error) + ListByEventHubComplete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, skip *int32, top *int32) (result eventhub.ConsumerGroupListResultIterator, err error) } var _ ConsumerGroupsClientAPI = (*eventhub.ConsumerGroupsClient)(nil) @@ -98,6 +108,7 @@ var _ ConsumerGroupsClientAPI = (*eventhub.ConsumerGroupsClient)(nil) // RegionsClientAPI contains the set of methods on the RegionsClient type. type RegionsClientAPI interface { ListBySku(ctx context.Context, sku string) (result eventhub.MessagingRegionsListResultPage, err error) + ListBySkuComplete(ctx context.Context, sku string) (result eventhub.MessagingRegionsListResultIterator, err error) } var _ RegionsClientAPI = (*eventhub.RegionsClient)(nil) diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go index d9b70ccb444a..fca6d126f577 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go @@ -36,7 +36,8 @@ func NewEventHubsClient(subscriptionID string) EventHubsClient { return NewEventHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client. +// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventHubsClient { return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -153,7 +154,8 @@ func (client EventHubsClient) CreateOrUpdateResponder(resp *http.Response) (resu return } -// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for the specified Event Hub. +// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for the specified Event Hub. Creation/update +// of the AuthorizationRule will take a few seconds to take effect. // Parameters: // resourceGroupName - name of the resource group within the azure subscription. // namespaceName - the Namespace name diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go b/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go index 919bea875af1..26518905413a 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/operations.go b/services/eventhub/mgmt/2017-04-01/eventhub/operations.go index e2a19e4ef243..3f0ed4e3538e 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/operations.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/regions.go b/services/eventhub/mgmt/2017-04-01/eventhub/regions.go index 4a9368437350..61d58dc22e36 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/regions.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/regions.go @@ -36,7 +36,8 @@ func NewRegionsClient(subscriptionID string) RegionsClient { return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/client.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/client.go new file mode 100644 index 000000000000..d7ad8fcda876 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/client.go @@ -0,0 +1,217 @@ +// Package frontdoor implements the Azure ARM Frontdoor service API version . +// +// FrontDoor Client +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +const ( + // DefaultBaseURI is the default URI used for the service Frontdoor + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Frontdoor. +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, + } +} + +// CheckFrontDoorNameAvailability check the availability of a Front Door resource name. +// Parameters: +// checkFrontDoorNameAvailabilityInput - input to check. +func (client BaseClient) CheckFrontDoorNameAvailability(ctx context.Context, checkFrontDoorNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckFrontDoorNameAvailability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: checkFrontDoorNameAvailabilityInput, + Constraints: []validation.Constraint{{Target: "checkFrontDoorNameAvailabilityInput.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.BaseClient", "CheckFrontDoorNameAvailability", err.Error()) + } + + req, err := client.CheckFrontDoorNameAvailabilityPreparer(ctx, checkFrontDoorNameAvailabilityInput) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.BaseClient", "CheckFrontDoorNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckFrontDoorNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.BaseClient", "CheckFrontDoorNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckFrontDoorNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.BaseClient", "CheckFrontDoorNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckFrontDoorNameAvailabilityPreparer prepares the CheckFrontDoorNameAvailability request. +func (client BaseClient) CheckFrontDoorNameAvailabilityPreparer(ctx context.Context, checkFrontDoorNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) { + const APIVersion = "2020-01-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.WithPath("/providers/Microsoft.Network/checkFrontDoorNameAvailability"), + autorest.WithJSON(checkFrontDoorNameAvailabilityInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckFrontDoorNameAvailabilitySender sends the CheckFrontDoorNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CheckFrontDoorNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckFrontDoorNameAvailabilityResponder handles the response to the CheckFrontDoorNameAvailability request. The method always +// closes the http.Response Body. +func (client BaseClient) CheckFrontDoorNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityOutput, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CheckFrontDoorNameAvailabilityWithSubscription check the availability of a Front Door subdomain. +// Parameters: +// checkFrontDoorNameAvailabilityInput - input to check. +func (client BaseClient) CheckFrontDoorNameAvailabilityWithSubscription(ctx context.Context, checkFrontDoorNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckFrontDoorNameAvailabilityWithSubscription") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: checkFrontDoorNameAvailabilityInput, + Constraints: []validation.Constraint{{Target: "checkFrontDoorNameAvailabilityInput.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.BaseClient", "CheckFrontDoorNameAvailabilityWithSubscription", err.Error()) + } + + req, err := client.CheckFrontDoorNameAvailabilityWithSubscriptionPreparer(ctx, checkFrontDoorNameAvailabilityInput) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.BaseClient", "CheckFrontDoorNameAvailabilityWithSubscription", nil, "Failure preparing request") + return + } + + resp, err := client.CheckFrontDoorNameAvailabilityWithSubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.BaseClient", "CheckFrontDoorNameAvailabilityWithSubscription", resp, "Failure sending request") + return + } + + result, err = client.CheckFrontDoorNameAvailabilityWithSubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.BaseClient", "CheckFrontDoorNameAvailabilityWithSubscription", resp, "Failure responding to request") + } + + return +} + +// CheckFrontDoorNameAvailabilityWithSubscriptionPreparer prepares the CheckFrontDoorNameAvailabilityWithSubscription request. +func (client BaseClient) CheckFrontDoorNameAvailabilityWithSubscriptionPreparer(ctx context.Context, checkFrontDoorNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-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/checkFrontDoorNameAvailability", pathParameters), + autorest.WithJSON(checkFrontDoorNameAvailabilityInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckFrontDoorNameAvailabilityWithSubscriptionSender sends the CheckFrontDoorNameAvailabilityWithSubscription request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CheckFrontDoorNameAvailabilityWithSubscriptionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckFrontDoorNameAvailabilityWithSubscriptionResponder handles the response to the CheckFrontDoorNameAvailabilityWithSubscription request. The method always +// closes the http.Response Body. +func (client BaseClient) CheckFrontDoorNameAvailabilityWithSubscriptionResponder(resp *http.Response) (result CheckNameAvailabilityOutput, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/endpoints.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/endpoints.go new file mode 100644 index 000000000000..0f8445f227dd --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/endpoints.go @@ -0,0 +1,138 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// EndpointsClient is the frontDoor Client +type EndpointsClient struct { + BaseClient +} + +// NewEndpointsClient creates an instance of the EndpointsClient client. +func NewEndpointsClient(subscriptionID string) EndpointsClient { + return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { + return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// PurgeContent removes a content from Front Door. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// contentFilePaths - the path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' +// which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders +// and files in the directory. +func (client EndpointsClient) PurgeContent(ctx context.Context, resourceGroupName string, frontDoorName string, contentFilePaths PurgeParameters) (result EndpointsPurgeContentFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.PurgeContent") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: contentFilePaths, + Constraints: []validation.Constraint{{Target: "contentFilePaths.ContentPaths", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.EndpointsClient", "PurgeContent", err.Error()) + } + + req, err := client.PurgeContentPreparer(ctx, resourceGroupName, frontDoorName, contentFilePaths) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.EndpointsClient", "PurgeContent", nil, "Failure preparing request") + return + } + + result, err = client.PurgeContentSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.EndpointsClient", "PurgeContent", result.Response(), "Failure sending request") + return + } + + return +} + +// PurgeContentPreparer prepares the PurgeContent request. +func (client EndpointsClient) PurgeContentPreparer(ctx context.Context, resourceGroupName string, frontDoorName string, contentFilePaths PurgeParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-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/frontDoors/{frontDoorName}/purge", pathParameters), + autorest.WithJSON(contentFilePaths), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PurgeContentSender sends the PurgeContent request. The method will close the +// http.Response Body if it receives an error. +func (client EndpointsClient) PurgeContentSender(req *http.Request) (future EndpointsPurgeContentFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// PurgeContentResponder handles the response to the PurgeContent request. The method always +// closes the http.Response Body. +func (client EndpointsClient) PurgeContentResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/experiments.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/experiments.go new file mode 100644 index 000000000000..baa977a3bfc1 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/experiments.go @@ -0,0 +1,537 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ExperimentsClient is the frontDoor Client +type ExperimentsClient struct { + BaseClient +} + +// NewExperimentsClient creates an instance of the ExperimentsClient client. +func NewExperimentsClient(subscriptionID string) ExperimentsClient { + return NewExperimentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExperimentsClientWithBaseURI creates an instance of the ExperimentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewExperimentsClientWithBaseURI(baseURI string, subscriptionID string) ExperimentsClient { + return ExperimentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate sends the create or update request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +// experimentName - the Experiment identifier associated with the Experiment +// parameters - the Experiment resource +func (client ExperimentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters Experiment) (result ExperimentsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExperimentsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: experimentName, + Constraints: []validation.Constraint{{Target: "experimentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.ExperimentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, profileName, experimentName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExperimentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters Experiment) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "experimentName": autorest.Encode("path", experimentName), + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}", 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 ExperimentsClient) CreateOrUpdateSender(req *http.Request) (future ExperimentsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExperimentsClient) CreateOrUpdateResponder(resp *http.Response) (result Experiment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete sends the delete request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +// experimentName - the Experiment identifier associated with the Experiment +func (client ExperimentsClient) Delete(ctx context.Context, resourceGroupName string, profileName string, experimentName string) (result ExperimentsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExperimentsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: experimentName, + Constraints: []validation.Constraint{{Target: "experimentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.ExperimentsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, profileName, experimentName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExperimentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, profileName string, experimentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "experimentName": autorest.Encode("path", experimentName), + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}", 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 ExperimentsClient) DeleteSender(req *http.Request) (future ExperimentsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExperimentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get sends the get request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +// experimentName - the Experiment identifier associated with the Experiment +func (client ExperimentsClient) Get(ctx context.Context, resourceGroupName string, profileName string, experimentName string) (result Experiment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExperimentsClient.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: experimentName, + Constraints: []validation.Constraint{{Target: "experimentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.ExperimentsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, profileName, experimentName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExperimentsClient) GetPreparer(ctx context.Context, resourceGroupName string, profileName string, experimentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "experimentName": autorest.Encode("path", experimentName), + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + 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/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ExperimentsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExperimentsClient) GetResponder(resp *http.Response) (result Experiment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByProfile sends the list by profile request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +func (client ExperimentsClient) ListByProfile(ctx context.Context, resourceGroupName string, profileName string) (result ExperimentListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExperimentsClient.ListByProfile") + defer func() { + sc := -1 + if result.el.Response.Response != nil { + sc = result.el.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.ExperimentsClient", "ListByProfile", err.Error()) + } + + result.fn = client.listByProfileNextResults + req, err := client.ListByProfilePreparer(ctx, resourceGroupName, profileName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "ListByProfile", nil, "Failure preparing request") + return + } + + resp, err := client.ListByProfileSender(req) + if err != nil { + result.el.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "ListByProfile", resp, "Failure sending request") + return + } + + result.el, err = client.ListByProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "ListByProfile", resp, "Failure responding to request") + } + + return +} + +// ListByProfilePreparer prepares the ListByProfile request. +func (client ExperimentsClient) ListByProfilePreparer(ctx context.Context, resourceGroupName string, profileName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + 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/NetworkExperimentProfiles/{profileName}/Experiments", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByProfileSender sends the ListByProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ExperimentsClient) ListByProfileSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByProfileResponder handles the response to the ListByProfile request. The method always +// closes the http.Response Body. +func (client ExperimentsClient) ListByProfileResponder(resp *http.Response) (result ExperimentList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByProfileNextResults retrieves the next set of results, if any. +func (client ExperimentsClient) listByProfileNextResults(ctx context.Context, lastResults ExperimentList) (result ExperimentList, err error) { + req, err := lastResults.experimentListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "listByProfileNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "listByProfileNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "listByProfileNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByProfileComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExperimentsClient) ListByProfileComplete(ctx context.Context, resourceGroupName string, profileName string) (result ExperimentListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExperimentsClient.ListByProfile") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByProfile(ctx, resourceGroupName, profileName) + return +} + +// Update updates an Experiment +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +// experimentName - the Experiment identifier associated with the Experiment +// parameters - the Experiment Update Model +func (client ExperimentsClient) Update(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters ExperimentUpdateModel) (result ExperimentsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExperimentsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: experimentName, + Constraints: []validation.Constraint{{Target: "experimentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.ExperimentsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, profileName, experimentName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ExperimentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters ExperimentUpdateModel) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "experimentName": autorest.Encode("path", experimentName), + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}", 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 ExperimentsClient) UpdateSender(req *http.Request) (future ExperimentsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ExperimentsClient) UpdateResponder(resp *http.Response) (result Experiment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/frontdoorapi/interfaces.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/frontdoorapi/interfaces.go new file mode 100644 index 000000000000..f50db4a9a2ad --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/frontdoorapi/interfaces.go @@ -0,0 +1,136 @@ +package frontdoorapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2020-01-01/frontdoor" + "github.com/Azure/go-autorest/autorest/date" +) + +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + CheckFrontDoorNameAvailability(ctx context.Context, checkFrontDoorNameAvailabilityInput frontdoor.CheckNameAvailabilityInput) (result frontdoor.CheckNameAvailabilityOutput, err error) + CheckFrontDoorNameAvailabilityWithSubscription(ctx context.Context, checkFrontDoorNameAvailabilityInput frontdoor.CheckNameAvailabilityInput) (result frontdoor.CheckNameAvailabilityOutput, err error) +} + +var _ BaseClientAPI = (*frontdoor.BaseClient)(nil) + +// NetworkExperimentProfilesClientAPI contains the set of methods on the NetworkExperimentProfilesClient type. +type NetworkExperimentProfilesClientAPI interface { + CreateOrUpdate(ctx context.Context, profileName string, resourceGroupName string, parameters frontdoor.Profile) (result frontdoor.NetworkExperimentProfilesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, profileName string) (result frontdoor.NetworkExperimentProfilesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, profileName string) (result frontdoor.Profile, err error) + List(ctx context.Context) (result frontdoor.ProfileListPage, err error) + ListComplete(ctx context.Context) (result frontdoor.ProfileListIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result frontdoor.ProfileListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result frontdoor.ProfileListIterator, err error) + Update(ctx context.Context, resourceGroupName string, profileName string, parameters frontdoor.ProfileUpdateModel) (result frontdoor.NetworkExperimentProfilesUpdateFuture, err error) +} + +var _ NetworkExperimentProfilesClientAPI = (*frontdoor.NetworkExperimentProfilesClient)(nil) + +// PreconfiguredEndpointsClientAPI contains the set of methods on the PreconfiguredEndpointsClient type. +type PreconfiguredEndpointsClientAPI interface { + List(ctx context.Context, resourceGroupName string, profileName string) (result frontdoor.PreconfiguredEndpointListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, profileName string) (result frontdoor.PreconfiguredEndpointListIterator, err error) +} + +var _ PreconfiguredEndpointsClientAPI = (*frontdoor.PreconfiguredEndpointsClient)(nil) + +// ExperimentsClientAPI contains the set of methods on the ExperimentsClient type. +type ExperimentsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters frontdoor.Experiment) (result frontdoor.ExperimentsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, profileName string, experimentName string) (result frontdoor.ExperimentsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, profileName string, experimentName string) (result frontdoor.Experiment, err error) + ListByProfile(ctx context.Context, resourceGroupName string, profileName string) (result frontdoor.ExperimentListPage, err error) + ListByProfileComplete(ctx context.Context, resourceGroupName string, profileName string) (result frontdoor.ExperimentListIterator, err error) + Update(ctx context.Context, resourceGroupName string, profileName string, experimentName string, parameters frontdoor.ExperimentUpdateModel) (result frontdoor.ExperimentsUpdateFuture, err error) +} + +var _ ExperimentsClientAPI = (*frontdoor.ExperimentsClient)(nil) + +// ReportsClientAPI contains the set of methods on the ReportsClient type. +type ReportsClientAPI interface { + GetLatencyScorecards(ctx context.Context, resourceGroupName string, profileName string, experimentName string, aggregationInterval frontdoor.LatencyScorecardAggregationInterval, endDateTimeUTC string, country string) (result frontdoor.LatencyScorecard, err error) + GetTimeseries(ctx context.Context, resourceGroupName string, profileName string, experimentName string, startDateTimeUTC date.Time, endDateTimeUTC date.Time, aggregationInterval frontdoor.TimeseriesAggregationInterval, timeseriesType frontdoor.TimeseriesType, endpoint string, country string) (result frontdoor.Timeseries, err error) +} + +var _ ReportsClientAPI = (*frontdoor.ReportsClient)(nil) + +// FrontDoorsClientAPI contains the set of methods on the FrontDoorsClient type. +type FrontDoorsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, frontDoorParameters frontdoor.FrontDoor) (result frontdoor.FrontDoorsCreateOrUpdateFutureType, err error) + Delete(ctx context.Context, resourceGroupName string, frontDoorName string) (result frontdoor.FrontDoorsDeleteFutureType, err error) + Get(ctx context.Context, resourceGroupName string, frontDoorName string) (result frontdoor.FrontDoor, err error) + List(ctx context.Context) (result frontdoor.ListResultPage, err error) + ListComplete(ctx context.Context) (result frontdoor.ListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result frontdoor.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result frontdoor.ListResultIterator, err error) + ValidateCustomDomain(ctx context.Context, resourceGroupName string, frontDoorName string, customDomainProperties frontdoor.ValidateCustomDomainInput) (result frontdoor.ValidateCustomDomainOutput, err error) +} + +var _ FrontDoorsClientAPI = (*frontdoor.FrontDoorsClient)(nil) + +// FrontendEndpointsClientAPI contains the set of methods on the FrontendEndpointsClient type. +type FrontendEndpointsClientAPI interface { + DisableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string) (result frontdoor.FrontendEndpointsDisableHTTPSFuture, err error) + EnableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, customHTTPSConfiguration frontdoor.CustomHTTPSConfiguration) (result frontdoor.FrontendEndpointsEnableHTTPSFuture, err error) + Get(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string) (result frontdoor.FrontendEndpoint, err error) + ListByFrontDoor(ctx context.Context, resourceGroupName string, frontDoorName string) (result frontdoor.FrontendEndpointsListResultPage, err error) + ListByFrontDoorComplete(ctx context.Context, resourceGroupName string, frontDoorName string) (result frontdoor.FrontendEndpointsListResultIterator, err error) +} + +var _ FrontendEndpointsClientAPI = (*frontdoor.FrontendEndpointsClient)(nil) + +// EndpointsClientAPI contains the set of methods on the EndpointsClient type. +type EndpointsClientAPI interface { + PurgeContent(ctx context.Context, resourceGroupName string, frontDoorName string, contentFilePaths frontdoor.PurgeParameters) (result frontdoor.EndpointsPurgeContentFuture, err error) +} + +var _ EndpointsClientAPI = (*frontdoor.EndpointsClient)(nil) + +// RulesEnginesClientAPI contains the set of methods on the RulesEnginesClient type. +type RulesEnginesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, rulesEngineParameters frontdoor.RulesEngine) (result frontdoor.RulesEnginesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string) (result frontdoor.RulesEnginesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string) (result frontdoor.RulesEngine, err error) + ListByFrontDoor(ctx context.Context, resourceGroupName string, frontDoorName string) (result frontdoor.RulesEngineListResultPage, err error) + ListByFrontDoorComplete(ctx context.Context, resourceGroupName string, frontDoorName string) (result frontdoor.RulesEngineListResultIterator, err error) +} + +var _ RulesEnginesClientAPI = (*frontdoor.RulesEnginesClient)(nil) + +// PoliciesClientAPI contains the set of methods on the PoliciesClient type. +type PoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters frontdoor.WebApplicationFirewallPolicy) (result frontdoor.PoliciesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, policyName string) (result frontdoor.PoliciesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, policyName string) (result frontdoor.WebApplicationFirewallPolicy, err error) + List(ctx context.Context, resourceGroupName string) (result frontdoor.WebApplicationFirewallPolicyListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result frontdoor.WebApplicationFirewallPolicyListIterator, err error) +} + +var _ PoliciesClientAPI = (*frontdoor.PoliciesClient)(nil) + +// ManagedRuleSetsClientAPI contains the set of methods on the ManagedRuleSetsClient type. +type ManagedRuleSetsClientAPI interface { + List(ctx context.Context) (result frontdoor.ManagedRuleSetDefinitionListPage, err error) + ListComplete(ctx context.Context) (result frontdoor.ManagedRuleSetDefinitionListIterator, err error) +} + +var _ ManagedRuleSetsClientAPI = (*frontdoor.ManagedRuleSetsClient)(nil) diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/frontdoors.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/frontdoors.go new file mode 100644 index 000000000000..4060433a0102 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/frontdoors.go @@ -0,0 +1,638 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FrontDoorsClient is the frontDoor Client +type FrontDoorsClient struct { + BaseClient +} + +// NewFrontDoorsClient creates an instance of the FrontDoorsClient client. +func NewFrontDoorsClient(subscriptionID string) FrontDoorsClient { + return NewFrontDoorsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFrontDoorsClientWithBaseURI creates an instance of the FrontDoorsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewFrontDoorsClientWithBaseURI(baseURI string, subscriptionID string) FrontDoorsClient { + return FrontDoorsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a new Front Door with a Front Door name under the specified subscription and resource group. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// frontDoorParameters - front Door properties needed to create a new Front Door. +func (client FrontDoorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, frontDoorParameters FrontDoor) (result FrontDoorsCreateOrUpdateFutureType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontDoorsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontDoorsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, frontDoorName, frontDoorParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client FrontDoorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, frontDoorName string, frontDoorParameters FrontDoor) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.Network/frontDoors/{frontDoorName}", pathParameters), + autorest.WithJSON(frontDoorParameters), + 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 FrontDoorsClient) CreateOrUpdateSender(req *http.Request) (future FrontDoorsCreateOrUpdateFutureType, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FrontDoorsClient) CreateOrUpdateResponder(resp *http.Response) (result FrontDoor, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an existing Front Door with the specified parameters. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +func (client FrontDoorsClient) Delete(ctx context.Context, resourceGroupName string, frontDoorName string) (result FrontDoorsDeleteFutureType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontDoorsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontDoorsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, frontDoorName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client FrontDoorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, frontDoorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.Network/frontDoors/{frontDoorName}", 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 FrontDoorsClient) DeleteSender(req *http.Request) (future FrontDoorsDeleteFutureType, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FrontDoorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a Front Door with the specified Front Door name under the specified subscription and resource group. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +func (client FrontDoorsClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string) (result FrontDoor, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontDoorsClient.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontDoorsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, frontDoorName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client FrontDoorsClient) GetPreparer(ctx context.Context, resourceGroupName string, frontDoorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.Network/frontDoors/{frontDoorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client FrontDoorsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FrontDoorsClient) GetResponder(resp *http.Response) (result FrontDoor, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all of the Front Doors within an Azure subscription. +func (client FrontDoorsClient) List(ctx context.Context) (result ListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontDoorsClient.List") + defer func() { + sc := -1 + if result.lr.Response.Response != nil { + sc = result.lr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "List", resp, "Failure sending request") + return + } + + result.lr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client FrontDoorsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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}/providers/Microsoft.Network/frontDoors", 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 FrontDoorsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FrontDoorsClient) ListResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client FrontDoorsClient) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.listResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "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, "frontdoor.FrontDoorsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client FrontDoorsClient) ListComplete(ctx context.Context) (result ListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontDoorsClient.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 of the Front Doors within a resource group under a subscription. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +func (client FrontDoorsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontDoorsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lr.Response.Response != nil { + sc = result.lr.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontDoorsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client FrontDoorsClient) 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-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.Network/frontDoors", 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 FrontDoorsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client FrontDoorsClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client FrontDoorsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.listResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "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, "frontdoor.FrontDoorsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client FrontDoorsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontDoorsClient.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 +} + +// ValidateCustomDomain validates the custom domain mapping to ensure it maps to the correct Front Door endpoint in +// DNS. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// customDomainProperties - custom domain to be validated. +func (client FrontDoorsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, frontDoorName string, customDomainProperties ValidateCustomDomainInput) (result ValidateCustomDomainOutput, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontDoorsClient.ValidateCustomDomain") + defer func() { + 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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: customDomainProperties, + Constraints: []validation.Constraint{{Target: "customDomainProperties.HostName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontDoorsClient", "ValidateCustomDomain", err.Error()) + } + + req, err := client.ValidateCustomDomainPreparer(ctx, resourceGroupName, frontDoorName, customDomainProperties) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "ValidateCustomDomain", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateCustomDomainSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "ValidateCustomDomain", resp, "Failure sending request") + return + } + + result, err = client.ValidateCustomDomainResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsClient", "ValidateCustomDomain", resp, "Failure responding to request") + } + + return +} + +// ValidateCustomDomainPreparer prepares the ValidateCustomDomain request. +func (client FrontDoorsClient) ValidateCustomDomainPreparer(ctx context.Context, resourceGroupName string, frontDoorName string, customDomainProperties ValidateCustomDomainInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-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/frontDoors/{frontDoorName}/validateCustomDomain", pathParameters), + autorest.WithJSON(customDomainProperties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateCustomDomainSender sends the ValidateCustomDomain request. The method will close the +// http.Response Body if it receives an error. +func (client FrontDoorsClient) ValidateCustomDomainSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ValidateCustomDomainResponder handles the response to the ValidateCustomDomain request. The method always +// closes the http.Response Body. +func (client FrontDoorsClient) ValidateCustomDomainResponder(resp *http.Response) (result ValidateCustomDomainOutput, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/frontendendpoints.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/frontendendpoints.go new file mode 100644 index 000000000000..29c4b1ba69b0 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/frontendendpoints.go @@ -0,0 +1,459 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FrontendEndpointsClient is the frontDoor Client +type FrontendEndpointsClient struct { + BaseClient +} + +// NewFrontendEndpointsClient creates an instance of the FrontendEndpointsClient client. +func NewFrontendEndpointsClient(subscriptionID string) FrontendEndpointsClient { + return NewFrontendEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFrontendEndpointsClientWithBaseURI creates an instance of the FrontendEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewFrontendEndpointsClientWithBaseURI(baseURI string, subscriptionID string) FrontendEndpointsClient { + return FrontendEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// DisableHTTPS disables a frontendEndpoint for HTTPS traffic +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// frontendEndpointName - name of the Frontend endpoint which is unique within the Front Door. +func (client FrontendEndpointsClient) DisableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string) (result FrontendEndpointsDisableHTTPSFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontendEndpointsClient.DisableHTTPS") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: frontendEndpointName, + Constraints: []validation.Constraint{{Target: "frontendEndpointName", Name: validation.MaxLength, Rule: 255, Chain: nil}, + {Target: "frontendEndpointName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "frontendEndpointName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontendEndpointsClient", "DisableHTTPS", err.Error()) + } + + req, err := client.DisableHTTPSPreparer(ctx, resourceGroupName, frontDoorName, frontendEndpointName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "DisableHTTPS", nil, "Failure preparing request") + return + } + + result, err = client.DisableHTTPSSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "DisableHTTPS", result.Response(), "Failure sending request") + return + } + + return +} + +// DisableHTTPSPreparer prepares the DisableHTTPS request. +func (client FrontendEndpointsClient) DisableHTTPSPreparer(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "frontendEndpointName": autorest.Encode("path", frontendEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisableHTTPSSender sends the DisableHTTPS request. The method will close the +// http.Response Body if it receives an error. +func (client FrontendEndpointsClient) DisableHTTPSSender(req *http.Request) (future FrontendEndpointsDisableHTTPSFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DisableHTTPSResponder handles the response to the DisableHTTPS request. The method always +// closes the http.Response Body. +func (client FrontendEndpointsClient) DisableHTTPSResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnableHTTPS enables a frontendEndpoint for HTTPS traffic +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// frontendEndpointName - name of the Frontend endpoint which is unique within the Front Door. +// customHTTPSConfiguration - the configuration specifying how to enable HTTPS +func (client FrontendEndpointsClient) EnableHTTPS(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, customHTTPSConfiguration CustomHTTPSConfiguration) (result FrontendEndpointsEnableHTTPSFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontendEndpointsClient.EnableHTTPS") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: frontendEndpointName, + Constraints: []validation.Constraint{{Target: "frontendEndpointName", Name: validation.MaxLength, Rule: 255, Chain: nil}, + {Target: "frontendEndpointName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "frontendEndpointName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: customHTTPSConfiguration, + Constraints: []validation.Constraint{{Target: "customHTTPSConfiguration.ProtocolType", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontendEndpointsClient", "EnableHTTPS", err.Error()) + } + + req, err := client.EnableHTTPSPreparer(ctx, resourceGroupName, frontDoorName, frontendEndpointName, customHTTPSConfiguration) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "EnableHTTPS", nil, "Failure preparing request") + return + } + + result, err = client.EnableHTTPSSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "EnableHTTPS", result.Response(), "Failure sending request") + return + } + + return +} + +// EnableHTTPSPreparer prepares the EnableHTTPS request. +func (client FrontendEndpointsClient) EnableHTTPSPreparer(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string, customHTTPSConfiguration CustomHTTPSConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "frontendEndpointName": autorest.Encode("path", frontendEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-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/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps", pathParameters), + autorest.WithJSON(customHTTPSConfiguration), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnableHTTPSSender sends the EnableHTTPS request. The method will close the +// http.Response Body if it receives an error. +func (client FrontendEndpointsClient) EnableHTTPSSender(req *http.Request) (future FrontendEndpointsEnableHTTPSFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// EnableHTTPSResponder handles the response to the EnableHTTPS request. The method always +// closes the http.Response Body. +func (client FrontendEndpointsClient) EnableHTTPSResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a Frontend endpoint with the specified name within the specified Front Door. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// frontendEndpointName - name of the Frontend endpoint which is unique within the Front Door. +func (client FrontendEndpointsClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string) (result FrontendEndpoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontendEndpointsClient.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: frontendEndpointName, + Constraints: []validation.Constraint{{Target: "frontendEndpointName", Name: validation.MaxLength, Rule: 255, Chain: nil}, + {Target: "frontendEndpointName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "frontendEndpointName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontendEndpointsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, frontDoorName, frontendEndpointName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client FrontendEndpointsClient) GetPreparer(ctx context.Context, resourceGroupName string, frontDoorName string, frontendEndpointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "frontendEndpointName": autorest.Encode("path", frontendEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client FrontendEndpointsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FrontendEndpointsClient) GetResponder(resp *http.Response) (result FrontendEndpoint, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByFrontDoor lists all of the frontend endpoints within a Front Door. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +func (client FrontendEndpointsClient) ListByFrontDoor(ctx context.Context, resourceGroupName string, frontDoorName string) (result FrontendEndpointsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontendEndpointsClient.ListByFrontDoor") + defer func() { + sc := -1 + if result.felr.Response.Response != nil { + sc = result.felr.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.FrontendEndpointsClient", "ListByFrontDoor", err.Error()) + } + + result.fn = client.listByFrontDoorNextResults + req, err := client.ListByFrontDoorPreparer(ctx, resourceGroupName, frontDoorName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "ListByFrontDoor", nil, "Failure preparing request") + return + } + + resp, err := client.ListByFrontDoorSender(req) + if err != nil { + result.felr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "ListByFrontDoor", resp, "Failure sending request") + return + } + + result.felr, err = client.ListByFrontDoorResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "ListByFrontDoor", resp, "Failure responding to request") + } + + return +} + +// ListByFrontDoorPreparer prepares the ListByFrontDoor request. +func (client FrontendEndpointsClient) ListByFrontDoorPreparer(ctx context.Context, resourceGroupName string, frontDoorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.Network/frontDoors/{frontDoorName}/frontendEndpoints", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByFrontDoorSender sends the ListByFrontDoor request. The method will close the +// http.Response Body if it receives an error. +func (client FrontendEndpointsClient) ListByFrontDoorSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByFrontDoorResponder handles the response to the ListByFrontDoor request. The method always +// closes the http.Response Body. +func (client FrontendEndpointsClient) ListByFrontDoorResponder(resp *http.Response) (result FrontendEndpointsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByFrontDoorNextResults retrieves the next set of results, if any. +func (client FrontendEndpointsClient) listByFrontDoorNextResults(ctx context.Context, lastResults FrontendEndpointsListResult) (result FrontendEndpointsListResult, err error) { + req, err := lastResults.frontendEndpointsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "listByFrontDoorNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByFrontDoorSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "listByFrontDoorNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByFrontDoorResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsClient", "listByFrontDoorNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByFrontDoorComplete enumerates all values, automatically crossing page boundaries as required. +func (client FrontendEndpointsClient) ListByFrontDoorComplete(ctx context.Context, resourceGroupName string, frontDoorName string) (result FrontendEndpointsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontendEndpointsClient.ListByFrontDoor") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByFrontDoor(ctx, resourceGroupName, frontDoorName) + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/managedrulesets.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/managedrulesets.go new file mode 100644 index 000000000000..637e557fd374 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/managedrulesets.go @@ -0,0 +1,152 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ManagedRuleSetsClient is the frontDoor Client +type ManagedRuleSetsClient struct { + BaseClient +} + +// NewManagedRuleSetsClient creates an instance of the ManagedRuleSetsClient client. +func NewManagedRuleSetsClient(subscriptionID string) ManagedRuleSetsClient { + return NewManagedRuleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewManagedRuleSetsClientWithBaseURI creates an instance of the ManagedRuleSetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewManagedRuleSetsClientWithBaseURI(baseURI string, subscriptionID string) ManagedRuleSetsClient { + return ManagedRuleSetsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all available managed rule sets. +func (client ManagedRuleSetsClient) List(ctx context.Context) (result ManagedRuleSetDefinitionListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedRuleSetsClient.List") + defer func() { + sc := -1 + if result.mrsdl.Response.Response != nil { + sc = result.mrsdl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ManagedRuleSetsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.mrsdl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.ManagedRuleSetsClient", "List", resp, "Failure sending request") + return + } + + result.mrsdl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ManagedRuleSetsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ManagedRuleSetsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets", 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 ManagedRuleSetsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ManagedRuleSetsClient) ListResponder(resp *http.Response) (result ManagedRuleSetDefinitionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ManagedRuleSetsClient) listNextResults(ctx context.Context, lastResults ManagedRuleSetDefinitionList) (result ManagedRuleSetDefinitionList, err error) { + req, err := lastResults.managedRuleSetDefinitionListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.ManagedRuleSetsClient", "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, "frontdoor.ManagedRuleSetsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ManagedRuleSetsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ManagedRuleSetsClient) ListComplete(ctx context.Context) (result ManagedRuleSetDefinitionListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedRuleSetsClient.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/frontdoor/mgmt/2020-01-01/frontdoor/models.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/models.go new file mode 100644 index 000000000000..1304425193a2 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/models.go @@ -0,0 +1,5150 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/frontdoor/mgmt/2020-01-01/frontdoor" + +// ActionType enumerates the values for action type. +type ActionType string + +const ( + // Allow ... + Allow ActionType = "Allow" + // Block ... + Block ActionType = "Block" + // Log ... + Log ActionType = "Log" + // Redirect ... + Redirect ActionType = "Redirect" +) + +// PossibleActionTypeValues returns an array of possible values for the ActionType const type. +func PossibleActionTypeValues() []ActionType { + return []ActionType{Allow, Block, Log, Redirect} +} + +// AggregationInterval enumerates the values for aggregation interval. +type AggregationInterval string + +const ( + // Daily ... + Daily AggregationInterval = "Daily" + // Hourly ... + Hourly AggregationInterval = "Hourly" +) + +// PossibleAggregationIntervalValues returns an array of possible values for the AggregationInterval const type. +func PossibleAggregationIntervalValues() []AggregationInterval { + return []AggregationInterval{Daily, Hourly} +} + +// Availability enumerates the values for availability. +type Availability string + +const ( + // Available ... + Available Availability = "Available" + // Unavailable ... + Unavailable Availability = "Unavailable" +) + +// PossibleAvailabilityValues returns an array of possible values for the Availability const type. +func PossibleAvailabilityValues() []Availability { + return []Availability{Available, Unavailable} +} + +// BackendEnabledState enumerates the values for backend enabled state. +type BackendEnabledState string + +const ( + // Disabled ... + Disabled BackendEnabledState = "Disabled" + // Enabled ... + Enabled BackendEnabledState = "Enabled" +) + +// PossibleBackendEnabledStateValues returns an array of possible values for the BackendEnabledState const type. +func PossibleBackendEnabledStateValues() []BackendEnabledState { + return []BackendEnabledState{Disabled, Enabled} +} + +// CertificateSource enumerates the values for certificate source. +type CertificateSource string + +const ( + // CertificateSourceAzureKeyVault ... + CertificateSourceAzureKeyVault CertificateSource = "AzureKeyVault" + // CertificateSourceFrontDoor ... + CertificateSourceFrontDoor CertificateSource = "FrontDoor" +) + +// PossibleCertificateSourceValues returns an array of possible values for the CertificateSource const type. +func PossibleCertificateSourceValues() []CertificateSource { + return []CertificateSource{CertificateSourceAzureKeyVault, CertificateSourceFrontDoor} +} + +// CertificateType enumerates the values for certificate type. +type CertificateType string + +const ( + // Dedicated ... + Dedicated CertificateType = "Dedicated" +) + +// PossibleCertificateTypeValues returns an array of possible values for the CertificateType const type. +func PossibleCertificateTypeValues() []CertificateType { + return []CertificateType{Dedicated} +} + +// CustomHTTPSProvisioningState enumerates the values for custom https provisioning state. +type CustomHTTPSProvisioningState string + +const ( + // CustomHTTPSProvisioningStateDisabled ... + CustomHTTPSProvisioningStateDisabled CustomHTTPSProvisioningState = "Disabled" + // CustomHTTPSProvisioningStateDisabling ... + CustomHTTPSProvisioningStateDisabling CustomHTTPSProvisioningState = "Disabling" + // CustomHTTPSProvisioningStateEnabled ... + CustomHTTPSProvisioningStateEnabled CustomHTTPSProvisioningState = "Enabled" + // CustomHTTPSProvisioningStateEnabling ... + CustomHTTPSProvisioningStateEnabling CustomHTTPSProvisioningState = "Enabling" + // CustomHTTPSProvisioningStateFailed ... + CustomHTTPSProvisioningStateFailed CustomHTTPSProvisioningState = "Failed" +) + +// PossibleCustomHTTPSProvisioningStateValues returns an array of possible values for the CustomHTTPSProvisioningState const type. +func PossibleCustomHTTPSProvisioningStateValues() []CustomHTTPSProvisioningState { + return []CustomHTTPSProvisioningState{CustomHTTPSProvisioningStateDisabled, CustomHTTPSProvisioningStateDisabling, CustomHTTPSProvisioningStateEnabled, CustomHTTPSProvisioningStateEnabling, CustomHTTPSProvisioningStateFailed} +} + +// CustomHTTPSProvisioningSubstate enumerates the values for custom https provisioning substate. +type CustomHTTPSProvisioningSubstate string + +const ( + // CertificateDeleted ... + CertificateDeleted CustomHTTPSProvisioningSubstate = "CertificateDeleted" + // CertificateDeployed ... + CertificateDeployed CustomHTTPSProvisioningSubstate = "CertificateDeployed" + // DeletingCertificate ... + DeletingCertificate CustomHTTPSProvisioningSubstate = "DeletingCertificate" + // DeployingCertificate ... + DeployingCertificate CustomHTTPSProvisioningSubstate = "DeployingCertificate" + // DomainControlValidationRequestApproved ... + DomainControlValidationRequestApproved CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved" + // DomainControlValidationRequestRejected ... + DomainControlValidationRequestRejected CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected" + // DomainControlValidationRequestTimedOut ... + DomainControlValidationRequestTimedOut CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut" + // IssuingCertificate ... + IssuingCertificate CustomHTTPSProvisioningSubstate = "IssuingCertificate" + // PendingDomainControlValidationREquestApproval ... + PendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval" + // SubmittingDomainControlValidationRequest ... + SubmittingDomainControlValidationRequest CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest" +) + +// PossibleCustomHTTPSProvisioningSubstateValues returns an array of possible values for the CustomHTTPSProvisioningSubstate const type. +func PossibleCustomHTTPSProvisioningSubstateValues() []CustomHTTPSProvisioningSubstate { + return []CustomHTTPSProvisioningSubstate{CertificateDeleted, CertificateDeployed, DeletingCertificate, DeployingCertificate, DomainControlValidationRequestApproved, DomainControlValidationRequestRejected, DomainControlValidationRequestTimedOut, IssuingCertificate, PendingDomainControlValidationREquestApproval, SubmittingDomainControlValidationRequest} +} + +// CustomRuleEnabledState enumerates the values for custom rule enabled state. +type CustomRuleEnabledState string + +const ( + // CustomRuleEnabledStateDisabled ... + CustomRuleEnabledStateDisabled CustomRuleEnabledState = "Disabled" + // CustomRuleEnabledStateEnabled ... + CustomRuleEnabledStateEnabled CustomRuleEnabledState = "Enabled" +) + +// PossibleCustomRuleEnabledStateValues returns an array of possible values for the CustomRuleEnabledState const type. +func PossibleCustomRuleEnabledStateValues() []CustomRuleEnabledState { + return []CustomRuleEnabledState{CustomRuleEnabledStateDisabled, CustomRuleEnabledStateEnabled} +} + +// DynamicCompressionEnabled enumerates the values for dynamic compression enabled. +type DynamicCompressionEnabled string + +const ( + // DynamicCompressionEnabledDisabled ... + DynamicCompressionEnabledDisabled DynamicCompressionEnabled = "Disabled" + // DynamicCompressionEnabledEnabled ... + DynamicCompressionEnabledEnabled DynamicCompressionEnabled = "Enabled" +) + +// PossibleDynamicCompressionEnabledValues returns an array of possible values for the DynamicCompressionEnabled const type. +func PossibleDynamicCompressionEnabledValues() []DynamicCompressionEnabled { + return []DynamicCompressionEnabled{DynamicCompressionEnabledDisabled, DynamicCompressionEnabledEnabled} +} + +// EnabledState enumerates the values for enabled state. +type EnabledState string + +const ( + // EnabledStateDisabled ... + EnabledStateDisabled EnabledState = "Disabled" + // EnabledStateEnabled ... + EnabledStateEnabled EnabledState = "Enabled" +) + +// PossibleEnabledStateValues returns an array of possible values for the EnabledState const type. +func PossibleEnabledStateValues() []EnabledState { + return []EnabledState{EnabledStateDisabled, EnabledStateEnabled} +} + +// EndpointType enumerates the values for endpoint type. +type EndpointType string + +const ( + // AFD ... + AFD EndpointType = "AFD" + // ATM ... + ATM EndpointType = "ATM" + // AzureRegion ... + AzureRegion EndpointType = "AzureRegion" + // CDN ... + CDN EndpointType = "CDN" +) + +// PossibleEndpointTypeValues returns an array of possible values for the EndpointType const type. +func PossibleEndpointTypeValues() []EndpointType { + return []EndpointType{AFD, ATM, AzureRegion, CDN} +} + +// EnforceCertificateNameCheckEnabledState enumerates the values for enforce certificate name check enabled +// state. +type EnforceCertificateNameCheckEnabledState string + +const ( + // EnforceCertificateNameCheckEnabledStateDisabled ... + EnforceCertificateNameCheckEnabledStateDisabled EnforceCertificateNameCheckEnabledState = "Disabled" + // EnforceCertificateNameCheckEnabledStateEnabled ... + EnforceCertificateNameCheckEnabledStateEnabled EnforceCertificateNameCheckEnabledState = "Enabled" +) + +// PossibleEnforceCertificateNameCheckEnabledStateValues returns an array of possible values for the EnforceCertificateNameCheckEnabledState const type. +func PossibleEnforceCertificateNameCheckEnabledStateValues() []EnforceCertificateNameCheckEnabledState { + return []EnforceCertificateNameCheckEnabledState{EnforceCertificateNameCheckEnabledStateDisabled, EnforceCertificateNameCheckEnabledStateEnabled} +} + +// ForwardingProtocol enumerates the values for forwarding protocol. +type ForwardingProtocol string + +const ( + // HTTPOnly ... + HTTPOnly ForwardingProtocol = "HttpOnly" + // HTTPSOnly ... + HTTPSOnly ForwardingProtocol = "HttpsOnly" + // MatchRequest ... + MatchRequest ForwardingProtocol = "MatchRequest" +) + +// PossibleForwardingProtocolValues returns an array of possible values for the ForwardingProtocol const type. +func PossibleForwardingProtocolValues() []ForwardingProtocol { + return []ForwardingProtocol{HTTPOnly, HTTPSOnly, MatchRequest} +} + +// HeaderActionType enumerates the values for header action type. +type HeaderActionType string + +const ( + // Append ... + Append HeaderActionType = "Append" + // Delete ... + Delete HeaderActionType = "Delete" + // Overwrite ... + Overwrite HeaderActionType = "Overwrite" +) + +// PossibleHeaderActionTypeValues returns an array of possible values for the HeaderActionType const type. +func PossibleHeaderActionTypeValues() []HeaderActionType { + return []HeaderActionType{Append, Delete, Overwrite} +} + +// HealthProbeEnabled enumerates the values for health probe enabled. +type HealthProbeEnabled string + +const ( + // HealthProbeEnabledDisabled ... + HealthProbeEnabledDisabled HealthProbeEnabled = "Disabled" + // HealthProbeEnabledEnabled ... + HealthProbeEnabledEnabled HealthProbeEnabled = "Enabled" +) + +// PossibleHealthProbeEnabledValues returns an array of possible values for the HealthProbeEnabled const type. +func PossibleHealthProbeEnabledValues() []HealthProbeEnabled { + return []HealthProbeEnabled{HealthProbeEnabledDisabled, HealthProbeEnabledEnabled} +} + +// HealthProbeMethod enumerates the values for health probe method. +type HealthProbeMethod string + +const ( + // GET ... + GET HealthProbeMethod = "GET" + // HEAD ... + HEAD HealthProbeMethod = "HEAD" +) + +// PossibleHealthProbeMethodValues returns an array of possible values for the HealthProbeMethod const type. +func PossibleHealthProbeMethodValues() []HealthProbeMethod { + return []HealthProbeMethod{GET, HEAD} +} + +// LatencyScorecardAggregationInterval enumerates the values for latency scorecard aggregation interval. +type LatencyScorecardAggregationInterval string + +const ( + // LatencyScorecardAggregationIntervalDaily ... + LatencyScorecardAggregationIntervalDaily LatencyScorecardAggregationInterval = "Daily" + // LatencyScorecardAggregationIntervalMonthly ... + LatencyScorecardAggregationIntervalMonthly LatencyScorecardAggregationInterval = "Monthly" + // LatencyScorecardAggregationIntervalWeekly ... + LatencyScorecardAggregationIntervalWeekly LatencyScorecardAggregationInterval = "Weekly" +) + +// PossibleLatencyScorecardAggregationIntervalValues returns an array of possible values for the LatencyScorecardAggregationInterval const type. +func PossibleLatencyScorecardAggregationIntervalValues() []LatencyScorecardAggregationInterval { + return []LatencyScorecardAggregationInterval{LatencyScorecardAggregationIntervalDaily, LatencyScorecardAggregationIntervalMonthly, LatencyScorecardAggregationIntervalWeekly} +} + +// ManagedRuleEnabledState enumerates the values for managed rule enabled state. +type ManagedRuleEnabledState string + +const ( + // ManagedRuleEnabledStateDisabled ... + ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" + // ManagedRuleEnabledStateEnabled ... + ManagedRuleEnabledStateEnabled ManagedRuleEnabledState = "Enabled" +) + +// PossibleManagedRuleEnabledStateValues returns an array of possible values for the ManagedRuleEnabledState const type. +func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { + return []ManagedRuleEnabledState{ManagedRuleEnabledStateDisabled, ManagedRuleEnabledStateEnabled} +} + +// ManagedRuleExclusionMatchVariable enumerates the values for managed rule exclusion match variable. +type ManagedRuleExclusionMatchVariable string + +const ( + // QueryStringArgNames ... + QueryStringArgNames ManagedRuleExclusionMatchVariable = "QueryStringArgNames" + // RequestBodyPostArgNames ... + RequestBodyPostArgNames ManagedRuleExclusionMatchVariable = "RequestBodyPostArgNames" + // RequestCookieNames ... + RequestCookieNames ManagedRuleExclusionMatchVariable = "RequestCookieNames" + // RequestHeaderNames ... + RequestHeaderNames ManagedRuleExclusionMatchVariable = "RequestHeaderNames" +) + +// PossibleManagedRuleExclusionMatchVariableValues returns an array of possible values for the ManagedRuleExclusionMatchVariable const type. +func PossibleManagedRuleExclusionMatchVariableValues() []ManagedRuleExclusionMatchVariable { + return []ManagedRuleExclusionMatchVariable{QueryStringArgNames, RequestBodyPostArgNames, RequestCookieNames, RequestHeaderNames} +} + +// ManagedRuleExclusionSelectorMatchOperator enumerates the values for managed rule exclusion selector match +// operator. +type ManagedRuleExclusionSelectorMatchOperator string + +const ( + // Contains ... + Contains ManagedRuleExclusionSelectorMatchOperator = "Contains" + // EndsWith ... + EndsWith ManagedRuleExclusionSelectorMatchOperator = "EndsWith" + // Equals ... + Equals ManagedRuleExclusionSelectorMatchOperator = "Equals" + // EqualsAny ... + EqualsAny ManagedRuleExclusionSelectorMatchOperator = "EqualsAny" + // StartsWith ... + StartsWith ManagedRuleExclusionSelectorMatchOperator = "StartsWith" +) + +// PossibleManagedRuleExclusionSelectorMatchOperatorValues returns an array of possible values for the ManagedRuleExclusionSelectorMatchOperator const type. +func PossibleManagedRuleExclusionSelectorMatchOperatorValues() []ManagedRuleExclusionSelectorMatchOperator { + return []ManagedRuleExclusionSelectorMatchOperator{Contains, EndsWith, Equals, EqualsAny, StartsWith} +} + +// MatchProcessingBehavior enumerates the values for match processing behavior. +type MatchProcessingBehavior string + +const ( + // Continue ... + Continue MatchProcessingBehavior = "Continue" + // Stop ... + Stop MatchProcessingBehavior = "Stop" +) + +// PossibleMatchProcessingBehaviorValues returns an array of possible values for the MatchProcessingBehavior const type. +func PossibleMatchProcessingBehaviorValues() []MatchProcessingBehavior { + return []MatchProcessingBehavior{Continue, Stop} +} + +// MatchVariable enumerates the values for match variable. +type MatchVariable string + +const ( + // Cookies ... + Cookies MatchVariable = "Cookies" + // PostArgs ... + PostArgs MatchVariable = "PostArgs" + // QueryString ... + QueryString MatchVariable = "QueryString" + // RemoteAddr ... + RemoteAddr MatchVariable = "RemoteAddr" + // RequestBody ... + RequestBody MatchVariable = "RequestBody" + // RequestHeader ... + RequestHeader MatchVariable = "RequestHeader" + // RequestMethod ... + RequestMethod MatchVariable = "RequestMethod" + // RequestURI ... + RequestURI MatchVariable = "RequestUri" + // SocketAddr ... + SocketAddr MatchVariable = "SocketAddr" +) + +// PossibleMatchVariableValues returns an array of possible values for the MatchVariable const type. +func PossibleMatchVariableValues() []MatchVariable { + return []MatchVariable{Cookies, PostArgs, QueryString, RemoteAddr, RequestBody, RequestHeader, RequestMethod, RequestURI, SocketAddr} +} + +// MinimumTLSVersion enumerates the values for minimum tls version. +type MinimumTLSVersion string + +const ( + // OneFullStopTwo ... + OneFullStopTwo MinimumTLSVersion = "1.2" + // OneFullStopZero ... + OneFullStopZero MinimumTLSVersion = "1.0" +) + +// PossibleMinimumTLSVersionValues returns an array of possible values for the MinimumTLSVersion const type. +func PossibleMinimumTLSVersionValues() []MinimumTLSVersion { + return []MinimumTLSVersion{OneFullStopTwo, OneFullStopZero} +} + +// NetworkExperimentResourceState enumerates the values for network experiment resource state. +type NetworkExperimentResourceState string + +const ( + // NetworkExperimentResourceStateCreating ... + NetworkExperimentResourceStateCreating NetworkExperimentResourceState = "Creating" + // NetworkExperimentResourceStateDeleting ... + NetworkExperimentResourceStateDeleting NetworkExperimentResourceState = "Deleting" + // NetworkExperimentResourceStateDisabled ... + NetworkExperimentResourceStateDisabled NetworkExperimentResourceState = "Disabled" + // NetworkExperimentResourceStateDisabling ... + NetworkExperimentResourceStateDisabling NetworkExperimentResourceState = "Disabling" + // NetworkExperimentResourceStateEnabled ... + NetworkExperimentResourceStateEnabled NetworkExperimentResourceState = "Enabled" + // NetworkExperimentResourceStateEnabling ... + NetworkExperimentResourceStateEnabling NetworkExperimentResourceState = "Enabling" +) + +// PossibleNetworkExperimentResourceStateValues returns an array of possible values for the NetworkExperimentResourceState const type. +func PossibleNetworkExperimentResourceStateValues() []NetworkExperimentResourceState { + return []NetworkExperimentResourceState{NetworkExperimentResourceStateCreating, NetworkExperimentResourceStateDeleting, NetworkExperimentResourceStateDisabled, NetworkExperimentResourceStateDisabling, NetworkExperimentResourceStateEnabled, NetworkExperimentResourceStateEnabling} +} + +// NetworkOperationStatus enumerates the values for network operation status. +type NetworkOperationStatus string + +const ( + // Failed ... + Failed NetworkOperationStatus = "Failed" + // InProgress ... + InProgress NetworkOperationStatus = "InProgress" + // Succeeded ... + Succeeded NetworkOperationStatus = "Succeeded" +) + +// PossibleNetworkOperationStatusValues returns an array of possible values for the NetworkOperationStatus const type. +func PossibleNetworkOperationStatusValues() []NetworkOperationStatus { + return []NetworkOperationStatus{Failed, InProgress, Succeeded} +} + +// OdataType enumerates the values for odata type. +type OdataType string + +const ( + // OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration ... + OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration OdataType = "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration" + // OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration ... + OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration OdataType = "#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration" + // OdataTypeRouteConfiguration ... + OdataTypeRouteConfiguration OdataType = "RouteConfiguration" +) + +// PossibleOdataTypeValues returns an array of possible values for the OdataType const type. +func PossibleOdataTypeValues() []OdataType { + return []OdataType{OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration, OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration, OdataTypeRouteConfiguration} +} + +// Operator enumerates the values for operator. +type Operator string + +const ( + // OperatorAny ... + OperatorAny Operator = "Any" + // OperatorBeginsWith ... + OperatorBeginsWith Operator = "BeginsWith" + // OperatorContains ... + OperatorContains Operator = "Contains" + // OperatorEndsWith ... + OperatorEndsWith Operator = "EndsWith" + // OperatorEqual ... + OperatorEqual Operator = "Equal" + // OperatorGeoMatch ... + OperatorGeoMatch Operator = "GeoMatch" + // OperatorGreaterThan ... + OperatorGreaterThan Operator = "GreaterThan" + // OperatorGreaterThanOrEqual ... + OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual" + // OperatorIPMatch ... + OperatorIPMatch Operator = "IPMatch" + // OperatorLessThan ... + OperatorLessThan Operator = "LessThan" + // OperatorLessThanOrEqual ... + OperatorLessThanOrEqual Operator = "LessThanOrEqual" + // OperatorRegEx ... + OperatorRegEx Operator = "RegEx" +) + +// PossibleOperatorValues returns an array of possible values for the Operator const type. +func PossibleOperatorValues() []Operator { + return []Operator{OperatorAny, OperatorBeginsWith, OperatorContains, OperatorEndsWith, OperatorEqual, OperatorGeoMatch, OperatorGreaterThan, OperatorGreaterThanOrEqual, OperatorIPMatch, OperatorLessThan, OperatorLessThanOrEqual, OperatorRegEx} +} + +// PolicyEnabledState enumerates the values for policy enabled state. +type PolicyEnabledState string + +const ( + // PolicyEnabledStateDisabled ... + PolicyEnabledStateDisabled PolicyEnabledState = "Disabled" + // PolicyEnabledStateEnabled ... + PolicyEnabledStateEnabled PolicyEnabledState = "Enabled" +) + +// PossiblePolicyEnabledStateValues returns an array of possible values for the PolicyEnabledState const type. +func PossiblePolicyEnabledStateValues() []PolicyEnabledState { + return []PolicyEnabledState{PolicyEnabledStateDisabled, PolicyEnabledStateEnabled} +} + +// PolicyMode enumerates the values for policy mode. +type PolicyMode string + +const ( + // Detection ... + Detection PolicyMode = "Detection" + // Prevention ... + Prevention PolicyMode = "Prevention" +) + +// PossiblePolicyModeValues returns an array of possible values for the PolicyMode const type. +func PossiblePolicyModeValues() []PolicyMode { + return []PolicyMode{Detection, Prevention} +} + +// PolicyResourceState enumerates the values for policy resource state. +type PolicyResourceState string + +const ( + // PolicyResourceStateCreating ... + PolicyResourceStateCreating PolicyResourceState = "Creating" + // PolicyResourceStateDeleting ... + PolicyResourceStateDeleting PolicyResourceState = "Deleting" + // PolicyResourceStateDisabled ... + PolicyResourceStateDisabled PolicyResourceState = "Disabled" + // PolicyResourceStateDisabling ... + PolicyResourceStateDisabling PolicyResourceState = "Disabling" + // PolicyResourceStateEnabled ... + PolicyResourceStateEnabled PolicyResourceState = "Enabled" + // PolicyResourceStateEnabling ... + PolicyResourceStateEnabling PolicyResourceState = "Enabling" +) + +// PossiblePolicyResourceStateValues returns an array of possible values for the PolicyResourceState const type. +func PossiblePolicyResourceStateValues() []PolicyResourceState { + return []PolicyResourceState{PolicyResourceStateCreating, PolicyResourceStateDeleting, PolicyResourceStateDisabled, PolicyResourceStateDisabling, PolicyResourceStateEnabled, PolicyResourceStateEnabling} +} + +// Protocol enumerates the values for protocol. +type Protocol string + +const ( + // HTTP ... + HTTP Protocol = "Http" + // HTTPS ... + HTTPS Protocol = "Https" +) + +// PossibleProtocolValues returns an array of possible values for the Protocol const type. +func PossibleProtocolValues() []Protocol { + return []Protocol{HTTP, HTTPS} +} + +// Query enumerates the values for query. +type Query string + +const ( + // StripAll ... + StripAll Query = "StripAll" + // StripNone ... + StripNone Query = "StripNone" +) + +// PossibleQueryValues returns an array of possible values for the Query const type. +func PossibleQueryValues() []Query { + return []Query{StripAll, StripNone} +} + +// RedirectProtocol enumerates the values for redirect protocol. +type RedirectProtocol string + +const ( + // RedirectProtocolHTTPOnly ... + RedirectProtocolHTTPOnly RedirectProtocol = "HttpOnly" + // RedirectProtocolHTTPSOnly ... + RedirectProtocolHTTPSOnly RedirectProtocol = "HttpsOnly" + // RedirectProtocolMatchRequest ... + RedirectProtocolMatchRequest RedirectProtocol = "MatchRequest" +) + +// PossibleRedirectProtocolValues returns an array of possible values for the RedirectProtocol const type. +func PossibleRedirectProtocolValues() []RedirectProtocol { + return []RedirectProtocol{RedirectProtocolHTTPOnly, RedirectProtocolHTTPSOnly, RedirectProtocolMatchRequest} +} + +// RedirectType enumerates the values for redirect type. +type RedirectType string + +const ( + // Found ... + Found RedirectType = "Found" + // Moved ... + Moved RedirectType = "Moved" + // PermanentRedirect ... + PermanentRedirect RedirectType = "PermanentRedirect" + // TemporaryRedirect ... + TemporaryRedirect RedirectType = "TemporaryRedirect" +) + +// PossibleRedirectTypeValues returns an array of possible values for the RedirectType const type. +func PossibleRedirectTypeValues() []RedirectType { + return []RedirectType{Found, Moved, PermanentRedirect, TemporaryRedirect} +} + +// ResourceState enumerates the values for resource state. +type ResourceState string + +const ( + // ResourceStateCreating ... + ResourceStateCreating ResourceState = "Creating" + // ResourceStateDeleting ... + ResourceStateDeleting ResourceState = "Deleting" + // ResourceStateDisabled ... + ResourceStateDisabled ResourceState = "Disabled" + // ResourceStateDisabling ... + ResourceStateDisabling ResourceState = "Disabling" + // ResourceStateEnabled ... + ResourceStateEnabled ResourceState = "Enabled" + // ResourceStateEnabling ... + ResourceStateEnabling ResourceState = "Enabling" +) + +// PossibleResourceStateValues returns an array of possible values for the ResourceState const type. +func PossibleResourceStateValues() []ResourceState { + return []ResourceState{ResourceStateCreating, ResourceStateDeleting, ResourceStateDisabled, ResourceStateDisabling, ResourceStateEnabled, ResourceStateEnabling} +} + +// ResourceType enumerates the values for resource type. +type ResourceType string + +const ( + // MicrosoftNetworkfrontDoors ... + MicrosoftNetworkfrontDoors ResourceType = "Microsoft.Network/frontDoors" + // MicrosoftNetworkfrontDoorsfrontendEndpoints ... + MicrosoftNetworkfrontDoorsfrontendEndpoints ResourceType = "Microsoft.Network/frontDoors/frontendEndpoints" +) + +// PossibleResourceTypeValues returns an array of possible values for the ResourceType const type. +func PossibleResourceTypeValues() []ResourceType { + return []ResourceType{MicrosoftNetworkfrontDoors, MicrosoftNetworkfrontDoorsfrontendEndpoints} +} + +// RoutingRuleEnabledState enumerates the values for routing rule enabled state. +type RoutingRuleEnabledState string + +const ( + // RoutingRuleEnabledStateDisabled ... + RoutingRuleEnabledStateDisabled RoutingRuleEnabledState = "Disabled" + // RoutingRuleEnabledStateEnabled ... + RoutingRuleEnabledStateEnabled RoutingRuleEnabledState = "Enabled" +) + +// PossibleRoutingRuleEnabledStateValues returns an array of possible values for the RoutingRuleEnabledState const type. +func PossibleRoutingRuleEnabledStateValues() []RoutingRuleEnabledState { + return []RoutingRuleEnabledState{RoutingRuleEnabledStateDisabled, RoutingRuleEnabledStateEnabled} +} + +// RulesEngineMatchVariable enumerates the values for rules engine match variable. +type RulesEngineMatchVariable string + +const ( + // RulesEngineMatchVariableIsMobile ... + RulesEngineMatchVariableIsMobile RulesEngineMatchVariable = "IsMobile" + // RulesEngineMatchVariablePostArgs ... + RulesEngineMatchVariablePostArgs RulesEngineMatchVariable = "PostArgs" + // RulesEngineMatchVariableQueryString ... + RulesEngineMatchVariableQueryString RulesEngineMatchVariable = "QueryString" + // RulesEngineMatchVariableRemoteAddr ... + RulesEngineMatchVariableRemoteAddr RulesEngineMatchVariable = "RemoteAddr" + // RulesEngineMatchVariableRequestBody ... + RulesEngineMatchVariableRequestBody RulesEngineMatchVariable = "RequestBody" + // RulesEngineMatchVariableRequestFilename ... + RulesEngineMatchVariableRequestFilename RulesEngineMatchVariable = "RequestFilename" + // RulesEngineMatchVariableRequestFilenameExtension ... + RulesEngineMatchVariableRequestFilenameExtension RulesEngineMatchVariable = "RequestFilenameExtension" + // RulesEngineMatchVariableRequestHeader ... + RulesEngineMatchVariableRequestHeader RulesEngineMatchVariable = "RequestHeader" + // RulesEngineMatchVariableRequestMethod ... + RulesEngineMatchVariableRequestMethod RulesEngineMatchVariable = "RequestMethod" + // RulesEngineMatchVariableRequestPath ... + RulesEngineMatchVariableRequestPath RulesEngineMatchVariable = "RequestPath" + // RulesEngineMatchVariableRequestScheme ... + RulesEngineMatchVariableRequestScheme RulesEngineMatchVariable = "RequestScheme" + // RulesEngineMatchVariableRequestURI ... + RulesEngineMatchVariableRequestURI RulesEngineMatchVariable = "RequestUri" +) + +// PossibleRulesEngineMatchVariableValues returns an array of possible values for the RulesEngineMatchVariable const type. +func PossibleRulesEngineMatchVariableValues() []RulesEngineMatchVariable { + return []RulesEngineMatchVariable{RulesEngineMatchVariableIsMobile, RulesEngineMatchVariablePostArgs, RulesEngineMatchVariableQueryString, RulesEngineMatchVariableRemoteAddr, RulesEngineMatchVariableRequestBody, RulesEngineMatchVariableRequestFilename, RulesEngineMatchVariableRequestFilenameExtension, RulesEngineMatchVariableRequestHeader, RulesEngineMatchVariableRequestMethod, RulesEngineMatchVariableRequestPath, RulesEngineMatchVariableRequestScheme, RulesEngineMatchVariableRequestURI} +} + +// RulesEngineOperator enumerates the values for rules engine operator. +type RulesEngineOperator string + +const ( + // RulesEngineOperatorAny ... + RulesEngineOperatorAny RulesEngineOperator = "Any" + // RulesEngineOperatorBeginsWith ... + RulesEngineOperatorBeginsWith RulesEngineOperator = "BeginsWith" + // RulesEngineOperatorContains ... + RulesEngineOperatorContains RulesEngineOperator = "Contains" + // RulesEngineOperatorEndsWith ... + RulesEngineOperatorEndsWith RulesEngineOperator = "EndsWith" + // RulesEngineOperatorEqual ... + RulesEngineOperatorEqual RulesEngineOperator = "Equal" + // RulesEngineOperatorGeoMatch ... + RulesEngineOperatorGeoMatch RulesEngineOperator = "GeoMatch" + // RulesEngineOperatorGreaterThan ... + RulesEngineOperatorGreaterThan RulesEngineOperator = "GreaterThan" + // RulesEngineOperatorGreaterThanOrEqual ... + RulesEngineOperatorGreaterThanOrEqual RulesEngineOperator = "GreaterThanOrEqual" + // RulesEngineOperatorIPMatch ... + RulesEngineOperatorIPMatch RulesEngineOperator = "IPMatch" + // RulesEngineOperatorLessThan ... + RulesEngineOperatorLessThan RulesEngineOperator = "LessThan" + // RulesEngineOperatorLessThanOrEqual ... + RulesEngineOperatorLessThanOrEqual RulesEngineOperator = "LessThanOrEqual" +) + +// PossibleRulesEngineOperatorValues returns an array of possible values for the RulesEngineOperator const type. +func PossibleRulesEngineOperatorValues() []RulesEngineOperator { + return []RulesEngineOperator{RulesEngineOperatorAny, RulesEngineOperatorBeginsWith, RulesEngineOperatorContains, RulesEngineOperatorEndsWith, RulesEngineOperatorEqual, RulesEngineOperatorGeoMatch, RulesEngineOperatorGreaterThan, RulesEngineOperatorGreaterThanOrEqual, RulesEngineOperatorIPMatch, RulesEngineOperatorLessThan, RulesEngineOperatorLessThanOrEqual} +} + +// RuleType enumerates the values for rule type. +type RuleType string + +const ( + // MatchRule ... + MatchRule RuleType = "MatchRule" + // RateLimitRule ... + RateLimitRule RuleType = "RateLimitRule" +) + +// PossibleRuleTypeValues returns an array of possible values for the RuleType const type. +func PossibleRuleTypeValues() []RuleType { + return []RuleType{MatchRule, RateLimitRule} +} + +// SessionAffinityEnabledState enumerates the values for session affinity enabled state. +type SessionAffinityEnabledState string + +const ( + // SessionAffinityEnabledStateDisabled ... + SessionAffinityEnabledStateDisabled SessionAffinityEnabledState = "Disabled" + // SessionAffinityEnabledStateEnabled ... + SessionAffinityEnabledStateEnabled SessionAffinityEnabledState = "Enabled" +) + +// PossibleSessionAffinityEnabledStateValues returns an array of possible values for the SessionAffinityEnabledState const type. +func PossibleSessionAffinityEnabledStateValues() []SessionAffinityEnabledState { + return []SessionAffinityEnabledState{SessionAffinityEnabledStateDisabled, SessionAffinityEnabledStateEnabled} +} + +// State enumerates the values for state. +type State string + +const ( + // StateDisabled ... + StateDisabled State = "Disabled" + // StateEnabled ... + StateEnabled State = "Enabled" +) + +// PossibleStateValues returns an array of possible values for the State const type. +func PossibleStateValues() []State { + return []State{StateDisabled, StateEnabled} +} + +// TimeseriesAggregationInterval enumerates the values for timeseries aggregation interval. +type TimeseriesAggregationInterval string + +const ( + // TimeseriesAggregationIntervalDaily ... + TimeseriesAggregationIntervalDaily TimeseriesAggregationInterval = "Daily" + // TimeseriesAggregationIntervalHourly ... + TimeseriesAggregationIntervalHourly TimeseriesAggregationInterval = "Hourly" +) + +// PossibleTimeseriesAggregationIntervalValues returns an array of possible values for the TimeseriesAggregationInterval const type. +func PossibleTimeseriesAggregationIntervalValues() []TimeseriesAggregationInterval { + return []TimeseriesAggregationInterval{TimeseriesAggregationIntervalDaily, TimeseriesAggregationIntervalHourly} +} + +// TimeseriesType enumerates the values for timeseries type. +type TimeseriesType string + +const ( + // LatencyP50 ... + LatencyP50 TimeseriesType = "LatencyP50" + // LatencyP75 ... + LatencyP75 TimeseriesType = "LatencyP75" + // LatencyP95 ... + LatencyP95 TimeseriesType = "LatencyP95" + // MeasurementCounts ... + MeasurementCounts TimeseriesType = "MeasurementCounts" +) + +// PossibleTimeseriesTypeValues returns an array of possible values for the TimeseriesType const type. +func PossibleTimeseriesTypeValues() []TimeseriesType { + return []TimeseriesType{LatencyP50, LatencyP75, LatencyP95, MeasurementCounts} +} + +// Transform enumerates the values for transform. +type Transform string + +const ( + // Lowercase ... + Lowercase Transform = "Lowercase" + // RemoveNulls ... + RemoveNulls Transform = "RemoveNulls" + // Trim ... + Trim Transform = "Trim" + // Uppercase ... + Uppercase Transform = "Uppercase" + // URLDecode ... + URLDecode Transform = "UrlDecode" + // URLEncode ... + URLEncode Transform = "UrlEncode" +) + +// PossibleTransformValues returns an array of possible values for the Transform const type. +func PossibleTransformValues() []Transform { + return []Transform{Lowercase, RemoveNulls, Trim, Uppercase, URLDecode, URLEncode} +} + +// TransformType enumerates the values for transform type. +type TransformType string + +const ( + // TransformTypeLowercase ... + TransformTypeLowercase TransformType = "Lowercase" + // TransformTypeRemoveNulls ... + TransformTypeRemoveNulls TransformType = "RemoveNulls" + // TransformTypeTrim ... + TransformTypeTrim TransformType = "Trim" + // TransformTypeUppercase ... + TransformTypeUppercase TransformType = "Uppercase" + // TransformTypeURLDecode ... + TransformTypeURLDecode TransformType = "UrlDecode" + // TransformTypeURLEncode ... + TransformTypeURLEncode TransformType = "UrlEncode" +) + +// PossibleTransformTypeValues returns an array of possible values for the TransformType const type. +func PossibleTransformTypeValues() []TransformType { + return []TransformType{TransformTypeLowercase, TransformTypeRemoveNulls, TransformTypeTrim, TransformTypeUppercase, TransformTypeURLDecode, TransformTypeURLEncode} +} + +// 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 are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'InProgress', 'Succeeded', 'Failed' + Status NetworkOperationStatus `json:"status,omitempty"` + Error *Error `json:"error,omitempty"` +} + +// Backend backend address of a frontDoor load balancer. +type Backend struct { + // Address - Location of the backend (IP address or FQDN) + Address *string `json:"address,omitempty"` + // PrivateLinkID - If this backend is private, provide the private link resource Id. Populating this optional field indicates that this backend is 'Private' + PrivateLinkID *string `json:"privateLinkId,omitempty"` + // Location - Region of the backend if it is in Azure. Mandatory field if backend is 'Private' + Location *string `json:"location,omitempty"` + // HTTPPort - The HTTP TCP port number. Must be between 1 and 65535. + HTTPPort *int32 `json:"httpPort,omitempty"` + // HTTPSPort - The HTTPS TCP port number. Must be between 1 and 65535. + HTTPSPort *int32 `json:"httpsPort,omitempty"` + // EnabledState - Whether to enable use of this backend. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + EnabledState BackendEnabledState `json:"enabledState,omitempty"` + // Priority - Priority to use for load balancing. Higher priorities will not be used for load balancing if any lower priority backend is healthy. + Priority *int32 `json:"priority,omitempty"` + // Weight - Weight of this endpoint for load balancing purposes. + Weight *int32 `json:"weight,omitempty"` + // BackendHostHeader - The value to use as the host header sent to the backend. If blank or unspecified, this defaults to the incoming host. + BackendHostHeader *string `json:"backendHostHeader,omitempty"` +} + +// BackendPool a backend pool is a collection of backends that can be routed to. +type BackendPool struct { + // BackendPoolProperties - Properties of the Front Door Backend Pool + *BackendPoolProperties `json:"properties,omitempty"` + // Name - Resource name. + 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 BackendPool. +func (bp BackendPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bp.BackendPoolProperties != nil { + objectMap["properties"] = bp.BackendPoolProperties + } + if bp.Name != nil { + objectMap["name"] = bp.Name + } + if bp.ID != nil { + objectMap["id"] = bp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BackendPool struct. +func (bp *BackendPool) UnmarshalJSON(body []byte) error { + var m map[string]*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 backendPoolProperties BackendPoolProperties + err = json.Unmarshal(*v, &backendPoolProperties) + if err != nil { + return err + } + bp.BackendPoolProperties = &backendPoolProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bp.ID = &ID + } + } + } + + return nil +} + +// BackendPoolListResult result of the request to list Backend Pools. It contains a list of Backend Pools +// objects and a URL link to get the next set of results. +type BackendPoolListResult struct { + // Value - READ-ONLY; List of Backend Pools within a Front Door. + Value *[]BackendPool `json:"value,omitempty"` + // NextLink - URL to get the next set of BackendPool objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// BackendPoolProperties the JSON object that contains the properties required to create a Backend Pool. +type BackendPoolProperties struct { + // ResourceState - Resource status. Possible values include: 'ResourceStateCreating', 'ResourceStateEnabling', 'ResourceStateEnabled', 'ResourceStateDisabling', 'ResourceStateDisabled', 'ResourceStateDeleting' + ResourceState ResourceState `json:"resourceState,omitempty"` + // Backends - The set of backends for this pool + Backends *[]Backend `json:"backends,omitempty"` + // LoadBalancingSettings - Load balancing settings for a backend pool + LoadBalancingSettings *SubResource `json:"loadBalancingSettings,omitempty"` + // HealthProbeSettings - L7 health probe settings for a backend pool + HealthProbeSettings *SubResource `json:"healthProbeSettings,omitempty"` +} + +// BackendPoolsSettings settings that apply to all backend pools. +type BackendPoolsSettings struct { + // EnforceCertificateNameCheck - Whether to enforce certificate name check on HTTPS requests to all backend pools. No effect on non-HTTPS requests. Possible values include: 'EnforceCertificateNameCheckEnabledStateEnabled', 'EnforceCertificateNameCheckEnabledStateDisabled' + EnforceCertificateNameCheck EnforceCertificateNameCheckEnabledState `json:"enforceCertificateNameCheck,omitempty"` + // SendRecvTimeoutSeconds - Send and receive timeout on forwarding request to the backend. When timeout is reached, the request fails and returns. + SendRecvTimeoutSeconds *int32 `json:"sendRecvTimeoutSeconds,omitempty"` +} + +// BackendPoolUpdateParameters a collection of backends that can be routed to. +type BackendPoolUpdateParameters struct { + // Backends - The set of backends for this pool + Backends *[]Backend `json:"backends,omitempty"` + // LoadBalancingSettings - Load balancing settings for a backend pool + LoadBalancingSettings *SubResource `json:"loadBalancingSettings,omitempty"` + // HealthProbeSettings - L7 health probe settings for a backend pool + HealthProbeSettings *SubResource `json:"healthProbeSettings,omitempty"` +} + +// CacheConfiguration caching settings for a caching-type route. To disable caching, do not provide a +// cacheConfiguration object. +type CacheConfiguration struct { + // QueryParameterStripDirective - Treatment of URL query terms when forming the cache key. Possible values include: 'StripNone', 'StripAll' + QueryParameterStripDirective Query `json:"queryParameterStripDirective,omitempty"` + // DynamicCompression - Whether to use dynamic compression for cached content. Possible values include: 'DynamicCompressionEnabledEnabled', 'DynamicCompressionEnabledDisabled' + DynamicCompression DynamicCompressionEnabled `json:"dynamicCompression,omitempty"` +} + +// CertificateSourceParameters parameters required for enabling SSL with Front Door-managed certificates +type CertificateSourceParameters struct { + // CertificateType - Defines the type of the certificate used for secure connections to a frontendEndpoint. Possible values include: 'Dedicated' + CertificateType CertificateType `json:"certificateType,omitempty"` +} + +// CheckNameAvailabilityInput input of CheckNameAvailability API. +type CheckNameAvailabilityInput struct { + // Name - The resource name to validate. + Name *string `json:"name,omitempty"` + // Type - The type of the resource whose name is to be validated. Possible values include: 'MicrosoftNetworkfrontDoors', 'MicrosoftNetworkfrontDoorsfrontendEndpoints' + Type ResourceType `json:"type,omitempty"` +} + +// CheckNameAvailabilityOutput output of check name availability API. +type CheckNameAvailabilityOutput struct { + autorest.Response `json:"-"` + // NameAvailability - READ-ONLY; Indicates whether the name is available. Possible values include: 'Available', 'Unavailable' + NameAvailability Availability `json:"nameAvailability,omitempty"` + // Reason - READ-ONLY; The reason why the name is not available. + Reason *string `json:"reason,omitempty"` + // Message - READ-ONLY; The detailed error message describing why the name is not available. + Message *string `json:"message,omitempty"` +} + +// CustomHTTPSConfiguration https settings for a domain +type CustomHTTPSConfiguration struct { + // CertificateSource - Defines the source of the SSL certificate. Possible values include: 'CertificateSourceAzureKeyVault', 'CertificateSourceFrontDoor' + CertificateSource CertificateSource `json:"certificateSource,omitempty"` + // ProtocolType - Defines the TLS extension protocol that is used for secure delivery + ProtocolType *string `json:"protocolType,omitempty"` + // MinimumTLSVersion - The minimum TLS version required from the clients to establish an SSL handshake with Front Door. Possible values include: 'OneFullStopZero', 'OneFullStopTwo' + MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` + // KeyVaultCertificateSourceParameters - KeyVault certificate source parameters (if certificateSource=AzureKeyVault) + *KeyVaultCertificateSourceParameters `json:"keyVaultCertificateSourceParameters,omitempty"` + // CertificateSourceParameters - Parameters required for enabling SSL with Front Door-managed certificates (if certificateSource=FrontDoor) + *CertificateSourceParameters `json:"frontDoorCertificateSourceParameters,omitempty"` +} + +// MarshalJSON is the custom marshaler for CustomHTTPSConfiguration. +func (chc CustomHTTPSConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if chc.CertificateSource != "" { + objectMap["certificateSource"] = chc.CertificateSource + } + if chc.ProtocolType != nil { + objectMap["protocolType"] = chc.ProtocolType + } + if chc.MinimumTLSVersion != "" { + objectMap["minimumTlsVersion"] = chc.MinimumTLSVersion + } + if chc.KeyVaultCertificateSourceParameters != nil { + objectMap["keyVaultCertificateSourceParameters"] = chc.KeyVaultCertificateSourceParameters + } + if chc.CertificateSourceParameters != nil { + objectMap["frontDoorCertificateSourceParameters"] = chc.CertificateSourceParameters + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CustomHTTPSConfiguration struct. +func (chc *CustomHTTPSConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "certificateSource": + if v != nil { + var certificateSource CertificateSource + err = json.Unmarshal(*v, &certificateSource) + if err != nil { + return err + } + chc.CertificateSource = certificateSource + } + case "protocolType": + if v != nil { + var protocolType string + err = json.Unmarshal(*v, &protocolType) + if err != nil { + return err + } + chc.ProtocolType = &protocolType + } + case "minimumTlsVersion": + if v != nil { + var minimumTLSVersion MinimumTLSVersion + err = json.Unmarshal(*v, &minimumTLSVersion) + if err != nil { + return err + } + chc.MinimumTLSVersion = minimumTLSVersion + } + case "keyVaultCertificateSourceParameters": + if v != nil { + var keyVaultCertificateSourceParameters KeyVaultCertificateSourceParameters + err = json.Unmarshal(*v, &keyVaultCertificateSourceParameters) + if err != nil { + return err + } + chc.KeyVaultCertificateSourceParameters = &keyVaultCertificateSourceParameters + } + case "frontDoorCertificateSourceParameters": + if v != nil { + var certificateSourceParameters CertificateSourceParameters + err = json.Unmarshal(*v, &certificateSourceParameters) + if err != nil { + return err + } + chc.CertificateSourceParameters = &certificateSourceParameters + } + } + } + + return nil +} + +// CustomRule defines contents of a web application rule +type CustomRule struct { + // Name - Describes the name of the rule. + Name *string `json:"name,omitempty"` + // Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. + Priority *int32 `json:"priority,omitempty"` + // EnabledState - Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'CustomRuleEnabledStateDisabled', 'CustomRuleEnabledStateEnabled' + EnabledState CustomRuleEnabledState `json:"enabledState,omitempty"` + // RuleType - Describes type of rule. Possible values include: 'MatchRule', 'RateLimitRule' + RuleType RuleType `json:"ruleType,omitempty"` + // RateLimitDurationInMinutes - Time window for resetting the rate limit count. Default is 1 minute. + RateLimitDurationInMinutes *int32 `json:"rateLimitDurationInMinutes,omitempty"` + // RateLimitThreshold - Number of allowed requests per client within the time window. + RateLimitThreshold *int32 `json:"rateLimitThreshold,omitempty"` + // MatchConditions - List of match conditions. + MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"` + // Action - Describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + Action ActionType `json:"action,omitempty"` +} + +// CustomRuleList defines contents of custom rules +type CustomRuleList struct { + // Rules - List of rules + Rules *[]CustomRule `json:"rules,omitempty"` +} + +// Endpoint defines the endpoint properties +type Endpoint struct { + // Name - The name of the endpoint + Name *string `json:"name,omitempty"` + // Endpoint - The endpoint URL + Endpoint *string `json:"endpoint,omitempty"` +} + +// EndpointsPurgeContentFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type EndpointsPurgeContentFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.EndpointsPurgeContentFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.EndpointsPurgeContentFuture") + return + } + ar.Response = future.Response() + return +} + +// Error ... +type Error struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` + Details *[]ErrorDetails `json:"details,omitempty"` + InnerError *string `json:"innerError,omitempty"` +} + +// ErrorDetails ... +type ErrorDetails struct { + Code *string `json:"code,omitempty"` + Target *string `json:"target,omitempty"` + Message *string `json:"message,omitempty"` +} + +// ErrorResponse error response indicates Front Door service is not able to process the incoming request. +// The reason is provided in the error message. +type ErrorResponse struct { + // Code - READ-ONLY; Error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; Error message indicating why the operation failed. + Message *string `json:"message,omitempty"` +} + +// Experiment defines the properties of an Experiment +type Experiment struct { + autorest.Response `json:"-"` + // ExperimentProperties - The properties of an Experiment + *ExperimentProperties `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 Experiment. +func (e Experiment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if e.ExperimentProperties != nil { + objectMap["properties"] = e.ExperimentProperties + } + if e.Location != nil { + objectMap["location"] = e.Location + } + if e.Tags != nil { + objectMap["tags"] = e.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Experiment struct. +func (e *Experiment) UnmarshalJSON(body []byte) error { + var m map[string]*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 experimentProperties ExperimentProperties + err = json.Unmarshal(*v, &experimentProperties) + if err != nil { + return err + } + e.ExperimentProperties = &experimentProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + e.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + e.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + e.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + e.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + e.Tags = tags + } + } + } + + return nil +} + +// ExperimentList defines a list of Experiments. It contains a list of Experiment objects and a URL link to +// get the next set of results. +type ExperimentList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Experiments within a resource group. + Value *[]Experiment `json:"value,omitempty"` + // NextLink - URL to get the next set of Experiment objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExperimentListIterator provides access to a complete listing of Experiment values. +type ExperimentListIterator struct { + i int + page ExperimentListPage +} + +// 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 *ExperimentListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExperimentListIterator.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 *ExperimentListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExperimentListIterator) 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 ExperimentListIterator) Response() ExperimentList { + 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 ExperimentListIterator) Value() Experiment { + if !iter.page.NotDone() { + return Experiment{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExperimentListIterator type. +func NewExperimentListIterator(page ExperimentListPage) ExperimentListIterator { + return ExperimentListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (el ExperimentList) IsEmpty() bool { + return el.Value == nil || len(*el.Value) == 0 +} + +// experimentListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (el ExperimentList) experimentListPreparer(ctx context.Context) (*http.Request, error) { + if el.NextLink == nil || len(to.String(el.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(el.NextLink))) +} + +// ExperimentListPage contains a page of Experiment values. +type ExperimentListPage struct { + fn func(context.Context, ExperimentList) (ExperimentList, error) + el ExperimentList +} + +// 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 *ExperimentListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExperimentListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.el) + if err != nil { + return err + } + page.el = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExperimentListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExperimentListPage) NotDone() bool { + return !page.el.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExperimentListPage) Response() ExperimentList { + return page.el +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExperimentListPage) Values() []Experiment { + if page.el.IsEmpty() { + return nil + } + return *page.el.Value +} + +// Creates a new instance of the ExperimentListPage type. +func NewExperimentListPage(getNextPage func(context.Context, ExperimentList) (ExperimentList, error)) ExperimentListPage { + return ExperimentListPage{fn: getNextPage} +} + +// ExperimentProperties defines the properties of an experiment +type ExperimentProperties struct { + // Description - The description of the details or intents of the Experiment + Description *string `json:"description,omitempty"` + // EndpointA - The endpoint A of an experiment + EndpointA *Endpoint `json:"endpointA,omitempty"` + // EndpointB - The endpoint B of an experiment + EndpointB *Endpoint `json:"endpointB,omitempty"` + // EnabledState - The state of the Experiment. Possible values include: 'StateEnabled', 'StateDisabled' + EnabledState State `json:"enabledState,omitempty"` + // ResourceState - Resource status. Possible values include: 'NetworkExperimentResourceStateCreating', 'NetworkExperimentResourceStateEnabling', 'NetworkExperimentResourceStateEnabled', 'NetworkExperimentResourceStateDisabling', 'NetworkExperimentResourceStateDisabled', 'NetworkExperimentResourceStateDeleting' + ResourceState NetworkExperimentResourceState `json:"resourceState,omitempty"` + // Status - READ-ONLY; The description of Experiment status from the server side + Status *string `json:"status,omitempty"` + // ScriptFileURI - READ-ONLY; The uri to the Script used in the Experiment + ScriptFileURI *string `json:"scriptFileUri,omitempty"` +} + +// ExperimentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExperimentsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExperimentsCreateOrUpdateFuture) Result(client ExperimentsClient) (e Experiment, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.ExperimentsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent { + e, err = client.CreateOrUpdateResponder(e.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsCreateOrUpdateFuture", "Result", e.Response.Response, "Failure responding to request") + } + } + return +} + +// ExperimentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ExperimentsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExperimentsDeleteFuture) Result(client ExperimentsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.ExperimentsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExperimentsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ExperimentsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExperimentsUpdateFuture) Result(client ExperimentsClient) (e Experiment, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.ExperimentsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if e.Response.Response, err = future.GetResult(sender); err == nil && e.Response.Response.StatusCode != http.StatusNoContent { + e, err = client.UpdateResponder(e.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ExperimentsUpdateFuture", "Result", e.Response.Response, "Failure responding to request") + } + } + return +} + +// ExperimentUpdateModel defines modifiable attributes of an Experiment +type ExperimentUpdateModel struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ExperimentUpdateProperties - The properties of a Profile + *ExperimentUpdateProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExperimentUpdateModel. +func (eum ExperimentUpdateModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if eum.Tags != nil { + objectMap["tags"] = eum.Tags + } + if eum.ExperimentUpdateProperties != nil { + objectMap["properties"] = eum.ExperimentUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExperimentUpdateModel struct. +func (eum *ExperimentUpdateModel) UnmarshalJSON(body []byte) error { + 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 + } + eum.Tags = tags + } + case "properties": + if v != nil { + var experimentUpdateProperties ExperimentUpdateProperties + err = json.Unmarshal(*v, &experimentUpdateProperties) + if err != nil { + return err + } + eum.ExperimentUpdateProperties = &experimentUpdateProperties + } + } + } + + return nil +} + +// ExperimentUpdateProperties defines the properties of an experiment +type ExperimentUpdateProperties struct { + // Description - The description of the intent or details of the Experiment + Description *string `json:"description,omitempty"` + // EnabledState - The state of the Experiment. Possible values include: 'StateEnabled', 'StateDisabled' + EnabledState State `json:"enabledState,omitempty"` +} + +// ForwardingConfiguration describes Forwarding Route. +type ForwardingConfiguration struct { + // CustomForwardingPath - A custom path used to rewrite resource paths matched by this rule. Leave empty to use incoming path. + CustomForwardingPath *string `json:"customForwardingPath,omitempty"` + // ForwardingProtocol - Protocol this rule will use when forwarding traffic to backends. Possible values include: 'HTTPOnly', 'HTTPSOnly', 'MatchRequest' + ForwardingProtocol ForwardingProtocol `json:"forwardingProtocol,omitempty"` + // CacheConfiguration - The caching configuration associated with this rule. + CacheConfiguration *CacheConfiguration `json:"cacheConfiguration,omitempty"` + // BackendPool - A reference to the BackendPool which this rule routes to. + BackendPool *SubResource `json:"backendPool,omitempty"` + // OdataType - Possible values include: 'OdataTypeRouteConfiguration', 'OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration', 'OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration' + OdataType OdataType `json:"@odata.type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ForwardingConfiguration. +func (fc ForwardingConfiguration) MarshalJSON() ([]byte, error) { + fc.OdataType = OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration + objectMap := make(map[string]interface{}) + if fc.CustomForwardingPath != nil { + objectMap["customForwardingPath"] = fc.CustomForwardingPath + } + if fc.ForwardingProtocol != "" { + objectMap["forwardingProtocol"] = fc.ForwardingProtocol + } + if fc.CacheConfiguration != nil { + objectMap["cacheConfiguration"] = fc.CacheConfiguration + } + if fc.BackendPool != nil { + objectMap["backendPool"] = fc.BackendPool + } + if fc.OdataType != "" { + objectMap["@odata.type"] = fc.OdataType + } + return json.Marshal(objectMap) +} + +// AsForwardingConfiguration is the BasicRouteConfiguration implementation for ForwardingConfiguration. +func (fc ForwardingConfiguration) AsForwardingConfiguration() (*ForwardingConfiguration, bool) { + return &fc, true +} + +// AsRedirectConfiguration is the BasicRouteConfiguration implementation for ForwardingConfiguration. +func (fc ForwardingConfiguration) AsRedirectConfiguration() (*RedirectConfiguration, bool) { + return nil, false +} + +// AsRouteConfiguration is the BasicRouteConfiguration implementation for ForwardingConfiguration. +func (fc ForwardingConfiguration) AsRouteConfiguration() (*RouteConfiguration, bool) { + return nil, false +} + +// AsBasicRouteConfiguration is the BasicRouteConfiguration implementation for ForwardingConfiguration. +func (fc ForwardingConfiguration) AsBasicRouteConfiguration() (BasicRouteConfiguration, bool) { + return &fc, true +} + +// FrontDoor front Door represents a collection of backend endpoints to route traffic to along with rules +// that specify how traffic is sent there. +type FrontDoor struct { + autorest.Response `json:"-"` + // Properties - Properties of the Front Door Load Balancer + *Properties `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 FrontDoor. +func (fd FrontDoor) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fd.Properties != nil { + objectMap["properties"] = fd.Properties + } + if fd.Location != nil { + objectMap["location"] = fd.Location + } + if fd.Tags != nil { + objectMap["tags"] = fd.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FrontDoor struct. +func (fd *FrontDoor) UnmarshalJSON(body []byte) error { + var m map[string]*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 properties Properties + err = json.Unmarshal(*v, &properties) + if err != nil { + return err + } + fd.Properties = &properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fd.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + fd.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + fd.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + fd.Tags = tags + } + } + } + + return nil +} + +// FrontDoorsCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a +// long-running operation. +type FrontDoorsCreateOrUpdateFutureType struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *FrontDoorsCreateOrUpdateFutureType) Result(client FrontDoorsClient) (fd FrontDoor, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.FrontDoorsCreateOrUpdateFutureType") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if fd.Response.Response, err = future.GetResult(sender); err == nil && fd.Response.Response.StatusCode != http.StatusNoContent { + fd, err = client.CreateOrUpdateResponder(fd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsCreateOrUpdateFutureType", "Result", fd.Response.Response, "Failure responding to request") + } + } + return +} + +// FrontDoorsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running +// operation. +type FrontDoorsDeleteFutureType struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *FrontDoorsDeleteFutureType) Result(client FrontDoorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontDoorsDeleteFutureType", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.FrontDoorsDeleteFutureType") + return + } + ar.Response = future.Response() + return +} + +// FrontendEndpoint a frontend endpoint used for routing. +type FrontendEndpoint struct { + autorest.Response `json:"-"` + // FrontendEndpointProperties - Properties of the Frontend endpoint + *FrontendEndpointProperties `json:"properties,omitempty"` + // Name - Resource name. + 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 FrontendEndpoint. +func (fe FrontendEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fe.FrontendEndpointProperties != nil { + objectMap["properties"] = fe.FrontendEndpointProperties + } + if fe.Name != nil { + objectMap["name"] = fe.Name + } + if fe.ID != nil { + objectMap["id"] = fe.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FrontendEndpoint struct. +func (fe *FrontendEndpoint) UnmarshalJSON(body []byte) error { + var m map[string]*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 frontendEndpointProperties FrontendEndpointProperties + err = json.Unmarshal(*v, &frontendEndpointProperties) + if err != nil { + return err + } + fe.FrontendEndpointProperties = &frontendEndpointProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fe.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + fe.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fe.ID = &ID + } + } + } + + return nil +} + +// FrontendEndpointLink defines the Resource ID for a Frontend Endpoint. +type FrontendEndpointLink struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// FrontendEndpointProperties the JSON object that contains the properties required to create a frontend +// endpoint. +type FrontendEndpointProperties struct { + // ResourceState - Resource status. Possible values include: 'ResourceStateCreating', 'ResourceStateEnabling', 'ResourceStateEnabled', 'ResourceStateDisabling', 'ResourceStateDisabled', 'ResourceStateDeleting' + ResourceState ResourceState `json:"resourceState,omitempty"` + // CustomHTTPSProvisioningState - READ-ONLY; Provisioning status of Custom Https of the frontendEndpoint. Possible values include: 'CustomHTTPSProvisioningStateEnabling', 'CustomHTTPSProvisioningStateEnabled', 'CustomHTTPSProvisioningStateDisabling', 'CustomHTTPSProvisioningStateDisabled', 'CustomHTTPSProvisioningStateFailed' + CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"` + // CustomHTTPSProvisioningSubstate - READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. Possible values include: 'SubmittingDomainControlValidationRequest', 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', 'CertificateDeleted' + CustomHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate `json:"customHttpsProvisioningSubstate,omitempty"` + // CustomHTTPSConfiguration - READ-ONLY; The configuration specifying how to enable HTTPS + CustomHTTPSConfiguration *CustomHTTPSConfiguration `json:"customHttpsConfiguration,omitempty"` + // HostName - The host name of the frontendEndpoint. Must be a domain name. + HostName *string `json:"hostName,omitempty"` + // SessionAffinityEnabledState - Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Possible values include: 'SessionAffinityEnabledStateEnabled', 'SessionAffinityEnabledStateDisabled' + SessionAffinityEnabledState SessionAffinityEnabledState `json:"sessionAffinityEnabledState,omitempty"` + // SessionAffinityTTLSeconds - UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if applicable. + SessionAffinityTTLSeconds *int32 `json:"sessionAffinityTtlSeconds,omitempty"` + // WebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for each host (if applicable) + WebApplicationFirewallPolicyLink *FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink `json:"webApplicationFirewallPolicyLink,omitempty"` +} + +// FrontendEndpointsDisableHTTPSFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type FrontendEndpointsDisableHTTPSFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *FrontendEndpointsDisableHTTPSFuture) Result(client FrontendEndpointsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsDisableHTTPSFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.FrontendEndpointsDisableHTTPSFuture") + return + } + ar.Response = future.Response() + return +} + +// FrontendEndpointsEnableHTTPSFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type FrontendEndpointsEnableHTTPSFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *FrontendEndpointsEnableHTTPSFuture) Result(client FrontendEndpointsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.FrontendEndpointsEnableHTTPSFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.FrontendEndpointsEnableHTTPSFuture") + return + } + ar.Response = future.Response() + return +} + +// FrontendEndpointsListResult result of the request to list frontend endpoints. It contains a list of +// Frontend endpoint objects and a URL link to get the next set of results. +type FrontendEndpointsListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Frontend endpoints within a Front Door. + Value *[]FrontendEndpoint `json:"value,omitempty"` + // NextLink - URL to get the next set of frontend endpoints if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// FrontendEndpointsListResultIterator provides access to a complete listing of FrontendEndpoint values. +type FrontendEndpointsListResultIterator struct { + i int + page FrontendEndpointsListResultPage +} + +// 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 *FrontendEndpointsListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontendEndpointsListResultIterator.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 *FrontendEndpointsListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter FrontendEndpointsListResultIterator) 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 FrontendEndpointsListResultIterator) Response() FrontendEndpointsListResult { + 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 FrontendEndpointsListResultIterator) Value() FrontendEndpoint { + if !iter.page.NotDone() { + return FrontendEndpoint{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the FrontendEndpointsListResultIterator type. +func NewFrontendEndpointsListResultIterator(page FrontendEndpointsListResultPage) FrontendEndpointsListResultIterator { + return FrontendEndpointsListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (felr FrontendEndpointsListResult) IsEmpty() bool { + return felr.Value == nil || len(*felr.Value) == 0 +} + +// frontendEndpointsListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (felr FrontendEndpointsListResult) frontendEndpointsListResultPreparer(ctx context.Context) (*http.Request, error) { + if felr.NextLink == nil || len(to.String(felr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(felr.NextLink))) +} + +// FrontendEndpointsListResultPage contains a page of FrontendEndpoint values. +type FrontendEndpointsListResultPage struct { + fn func(context.Context, FrontendEndpointsListResult) (FrontendEndpointsListResult, error) + felr FrontendEndpointsListResult +} + +// 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 *FrontendEndpointsListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FrontendEndpointsListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.felr) + if err != nil { + return err + } + page.felr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *FrontendEndpointsListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page FrontendEndpointsListResultPage) NotDone() bool { + return !page.felr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page FrontendEndpointsListResultPage) Response() FrontendEndpointsListResult { + return page.felr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page FrontendEndpointsListResultPage) Values() []FrontendEndpoint { + if page.felr.IsEmpty() { + return nil + } + return *page.felr.Value +} + +// Creates a new instance of the FrontendEndpointsListResultPage type. +func NewFrontendEndpointsListResultPage(getNextPage func(context.Context, FrontendEndpointsListResult) (FrontendEndpointsListResult, error)) FrontendEndpointsListResultPage { + return FrontendEndpointsListResultPage{fn: getNextPage} +} + +// FrontendEndpointUpdateParameters frontend endpoint used in routing rule +type FrontendEndpointUpdateParameters struct { + // HostName - The host name of the frontendEndpoint. Must be a domain name. + HostName *string `json:"hostName,omitempty"` + // SessionAffinityEnabledState - Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. Possible values include: 'SessionAffinityEnabledStateEnabled', 'SessionAffinityEnabledStateDisabled' + SessionAffinityEnabledState SessionAffinityEnabledState `json:"sessionAffinityEnabledState,omitempty"` + // SessionAffinityTTLSeconds - UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if applicable. + SessionAffinityTTLSeconds *int32 `json:"sessionAffinityTtlSeconds,omitempty"` + // WebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for each host (if applicable) + WebApplicationFirewallPolicyLink *FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink `json:"webApplicationFirewallPolicyLink,omitempty"` +} + +// FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink defines the Web Application Firewall +// policy for each host (if applicable) +type FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// HeaderAction an action that can manipulate an http header. +type HeaderAction struct { + // HeaderActionType - Which type of manipulation to apply to the header. Possible values include: 'Append', 'Delete', 'Overwrite' + HeaderActionType HeaderActionType `json:"headerActionType,omitempty"` + // HeaderName - The name of the header this action will apply to. + HeaderName *string `json:"headerName,omitempty"` + // Value - The value to update the given header name with. This value is not used if the actionType is Delete. + Value *string `json:"value,omitempty"` +} + +// HealthProbeSettingsListResult result of the request to list HealthProbeSettings. It contains a list of +// HealthProbeSettings objects and a URL link to get the next set of results. +type HealthProbeSettingsListResult struct { + // Value - READ-ONLY; List of HealthProbeSettings within a Front Door. + Value *[]HealthProbeSettingsModel `json:"value,omitempty"` + // NextLink - URL to get the next set of HealthProbeSettings objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// HealthProbeSettingsModel load balancing settings for a backend pool +type HealthProbeSettingsModel struct { + // HealthProbeSettingsProperties - Properties of the health probe settings + *HealthProbeSettingsProperties `json:"properties,omitempty"` + // Name - Resource name. + 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 HealthProbeSettingsModel. +func (hpsm HealthProbeSettingsModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hpsm.HealthProbeSettingsProperties != nil { + objectMap["properties"] = hpsm.HealthProbeSettingsProperties + } + if hpsm.Name != nil { + objectMap["name"] = hpsm.Name + } + if hpsm.ID != nil { + objectMap["id"] = hpsm.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for HealthProbeSettingsModel struct. +func (hpsm *HealthProbeSettingsModel) UnmarshalJSON(body []byte) error { + var m map[string]*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 healthProbeSettingsProperties HealthProbeSettingsProperties + err = json.Unmarshal(*v, &healthProbeSettingsProperties) + if err != nil { + return err + } + hpsm.HealthProbeSettingsProperties = &healthProbeSettingsProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + hpsm.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + hpsm.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + hpsm.ID = &ID + } + } + } + + return nil +} + +// HealthProbeSettingsProperties the JSON object that contains the properties required to create a health +// probe settings. +type HealthProbeSettingsProperties struct { + // ResourceState - Resource status. Possible values include: 'ResourceStateCreating', 'ResourceStateEnabling', 'ResourceStateEnabled', 'ResourceStateDisabling', 'ResourceStateDisabled', 'ResourceStateDeleting' + ResourceState ResourceState `json:"resourceState,omitempty"` + // Path - The path to use for the health probe. Default is / + Path *string `json:"path,omitempty"` + // Protocol - Protocol scheme to use for this probe. Possible values include: 'HTTP', 'HTTPS' + Protocol Protocol `json:"protocol,omitempty"` + // IntervalInSeconds - The number of seconds between health probes. + IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` + // HealthProbeMethod - Configures which HTTP method to use to probe the backends defined under backendPools. Possible values include: 'GET', 'HEAD' + HealthProbeMethod HealthProbeMethod `json:"healthProbeMethod,omitempty"` + // EnabledState - Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. Possible values include: 'HealthProbeEnabledEnabled', 'HealthProbeEnabledDisabled' + EnabledState HealthProbeEnabled `json:"enabledState,omitempty"` +} + +// HealthProbeSettingsUpdateParameters l7 health probe settings for a backend pool +type HealthProbeSettingsUpdateParameters struct { + // Path - The path to use for the health probe. Default is / + Path *string `json:"path,omitempty"` + // Protocol - Protocol scheme to use for this probe. Possible values include: 'HTTP', 'HTTPS' + Protocol Protocol `json:"protocol,omitempty"` + // IntervalInSeconds - The number of seconds between health probes. + IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` + // HealthProbeMethod - Configures which HTTP method to use to probe the backends defined under backendPools. Possible values include: 'GET', 'HEAD' + HealthProbeMethod HealthProbeMethod `json:"healthProbeMethod,omitempty"` + // EnabledState - Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. Possible values include: 'HealthProbeEnabledEnabled', 'HealthProbeEnabledDisabled' + EnabledState HealthProbeEnabled `json:"enabledState,omitempty"` +} + +// KeyVaultCertificateSourceParameters parameters required for bring-your-own-certification via Key Vault +type KeyVaultCertificateSourceParameters struct { + // Vault - The Key Vault containing the SSL certificate + Vault *KeyVaultCertificateSourceParametersVault `json:"vault,omitempty"` + // SecretName - The name of the Key Vault secret representing the full certificate PFX + SecretName *string `json:"secretName,omitempty"` + // SecretVersion - The version of the Key Vault secret representing the full certificate PFX + SecretVersion *string `json:"secretVersion,omitempty"` +} + +// KeyVaultCertificateSourceParametersVault the Key Vault containing the SSL certificate +type KeyVaultCertificateSourceParametersVault struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// LatencyMetric defines the properties of a latency metric used in the latency scorecard +type LatencyMetric struct { + // Name - READ-ONLY; The name of the Latency Metric + Name *string `json:"name,omitempty"` + // EndDateTimeUTC - READ-ONLY; The end time of the Latency Scorecard in UTC + EndDateTimeUTC *string `json:"endDateTimeUTC,omitempty"` + // AValue - READ-ONLY; The metric value of the A endpoint + AValue *float64 `json:"aValue,omitempty"` + // BValue - READ-ONLY; The metric value of the B endpoint + BValue *float64 `json:"bValue,omitempty"` + // Delta - READ-ONLY; The difference in value between endpoint A and B + Delta *float64 `json:"delta,omitempty"` + // DeltaPercent - READ-ONLY; The percent difference between endpoint A and B + DeltaPercent *float64 `json:"deltaPercent,omitempty"` + // ACLower95CI - READ-ONLY; The lower end of the 95% confidence interval for endpoint A + ACLower95CI *float64 `json:"aCLower95CI,omitempty"` + // AHUpper95CI - READ-ONLY; The upper end of the 95% confidence interval for endpoint A + AHUpper95CI *float64 `json:"aHUpper95CI,omitempty"` + // BCLower95CI - READ-ONLY; The lower end of the 95% confidence interval for endpoint B + BCLower95CI *float64 `json:"bCLower95CI,omitempty"` + // BUpper95CI - READ-ONLY; The upper end of the 95% confidence interval for endpoint B + BUpper95CI *float64 `json:"bUpper95CI,omitempty"` +} + +// LatencyScorecard defines the LatencyScorecard +type LatencyScorecard struct { + autorest.Response `json:"-"` + // LatencyScorecardProperties - The properties of a latency scorecard + *LatencyScorecardProperties `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 LatencyScorecard. +func (ls LatencyScorecard) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ls.LatencyScorecardProperties != nil { + objectMap["properties"] = ls.LatencyScorecardProperties + } + if ls.Location != nil { + objectMap["location"] = ls.Location + } + if ls.Tags != nil { + objectMap["tags"] = ls.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LatencyScorecard struct. +func (ls *LatencyScorecard) UnmarshalJSON(body []byte) error { + var m map[string]*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 latencyScorecardProperties LatencyScorecardProperties + err = json.Unmarshal(*v, &latencyScorecardProperties) + if err != nil { + return err + } + ls.LatencyScorecardProperties = &latencyScorecardProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ls.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ls.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ls.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ls.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ls.Tags = tags + } + } + } + + return nil +} + +// LatencyScorecardProperties defines a the properties of a Latency Scorecard +type LatencyScorecardProperties struct { + // ID - READ-ONLY; The unique identifier of the Latency Scorecard + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the Latency Scorecard + Name *string `json:"name,omitempty"` + // Description - READ-ONLY; The description of the Latency Scorecard + Description *string `json:"description,omitempty"` + // EndpointA - READ-ONLY; The A endpoint in the scorecard + EndpointA *string `json:"endpointA,omitempty"` + // EndpointB - READ-ONLY; The B endpoint in the scorecard + EndpointB *string `json:"endpointB,omitempty"` + // StartDateTimeUTC - READ-ONLY; The start time of the Latency Scorecard in UTC + StartDateTimeUTC *date.Time `json:"startDateTimeUTC,omitempty"` + // EndDateTimeUTC - READ-ONLY; The end time of the Latency Scorecard in UTC + EndDateTimeUTC *date.Time `json:"endDateTimeUTC,omitempty"` + // Country - READ-ONLY; The country associated with the Latency Scorecard. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html + Country *string `json:"country,omitempty"` + // LatencyMetrics - The latency metrics of the Latency Scorecard + LatencyMetrics *[]LatencyMetric `json:"latencyMetrics,omitempty"` +} + +// ListResult result of the request to list Front Doors. It contains a list of Front Door objects and a URL +// link to get the next set of results. +type ListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Front Doors within a resource group. + Value *[]FrontDoor `json:"value,omitempty"` + // NextLink - URL to get the next set of Front Door objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListResultIterator provides access to a complete listing of FrontDoor values. +type ListResultIterator struct { + i int + page ListResultPage +} + +// 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 *ListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.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 *ListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListResultIterator) 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 ListResultIterator) Response() ListResult { + 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 ListResultIterator) Value() FrontDoor { + if !iter.page.NotDone() { + return FrontDoor{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListResultIterator type. +func NewListResultIterator(page ListResultPage) ListResultIterator { + return ListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lr ListResult) IsEmpty() bool { + return lr.Value == nil || len(*lr.Value) == 0 +} + +// listResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) { + if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lr.NextLink))) +} + +// ListResultPage contains a page of FrontDoor values. +type ListResultPage struct { + fn func(context.Context, ListResult) (ListResult, error) + lr ListResult +} + +// 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 *ListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lr) + if err != nil { + return err + } + page.lr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListResultPage) NotDone() bool { + return !page.lr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListResultPage) Response() ListResult { + return page.lr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListResultPage) Values() []FrontDoor { + if page.lr.IsEmpty() { + return nil + } + return *page.lr.Value +} + +// Creates a new instance of the ListResultPage type. +func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return ListResultPage{fn: getNextPage} +} + +// LoadBalancingSettingsListResult result of the request to list load balancing settings. It contains a +// list of load balancing settings objects and a URL link to get the next set of results. +type LoadBalancingSettingsListResult struct { + // Value - READ-ONLY; List of Backend Pools within a Front Door. + Value *[]LoadBalancingSettingsModel `json:"value,omitempty"` + // NextLink - URL to get the next set of LoadBalancingSettings objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// LoadBalancingSettingsModel load balancing settings for a backend pool +type LoadBalancingSettingsModel struct { + // LoadBalancingSettingsProperties - Properties of the load balancing settings + *LoadBalancingSettingsProperties `json:"properties,omitempty"` + // Name - Resource name. + 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 LoadBalancingSettingsModel. +func (lbsm LoadBalancingSettingsModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbsm.LoadBalancingSettingsProperties != nil { + objectMap["properties"] = lbsm.LoadBalancingSettingsProperties + } + if lbsm.Name != nil { + objectMap["name"] = lbsm.Name + } + if lbsm.ID != nil { + objectMap["id"] = lbsm.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LoadBalancingSettingsModel struct. +func (lbsm *LoadBalancingSettingsModel) UnmarshalJSON(body []byte) error { + var m map[string]*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 loadBalancingSettingsProperties LoadBalancingSettingsProperties + err = json.Unmarshal(*v, &loadBalancingSettingsProperties) + if err != nil { + return err + } + lbsm.LoadBalancingSettingsProperties = &loadBalancingSettingsProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lbsm.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lbsm.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lbsm.ID = &ID + } + } + } + + return nil +} + +// LoadBalancingSettingsProperties the JSON object that contains the properties required to create load +// balancing settings +type LoadBalancingSettingsProperties struct { + // ResourceState - Resource status. Possible values include: 'ResourceStateCreating', 'ResourceStateEnabling', 'ResourceStateEnabled', 'ResourceStateDisabling', 'ResourceStateDisabled', 'ResourceStateDeleting' + ResourceState ResourceState `json:"resourceState,omitempty"` + // SampleSize - The number of samples to consider for load balancing decisions + SampleSize *int32 `json:"sampleSize,omitempty"` + // SuccessfulSamplesRequired - The number of samples within the sample period that must succeed + SuccessfulSamplesRequired *int32 `json:"successfulSamplesRequired,omitempty"` + // AdditionalLatencyMilliseconds - The additional latency in milliseconds for probes to fall into the lowest latency bucket + AdditionalLatencyMilliseconds *int32 `json:"additionalLatencyMilliseconds,omitempty"` +} + +// LoadBalancingSettingsUpdateParameters round-Robin load balancing settings for a backend pool +type LoadBalancingSettingsUpdateParameters struct { + // SampleSize - The number of samples to consider for load balancing decisions + SampleSize *int32 `json:"sampleSize,omitempty"` + // SuccessfulSamplesRequired - The number of samples within the sample period that must succeed + SuccessfulSamplesRequired *int32 `json:"successfulSamplesRequired,omitempty"` + // AdditionalLatencyMilliseconds - The additional latency in milliseconds for probes to fall into the lowest latency bucket + AdditionalLatencyMilliseconds *int32 `json:"additionalLatencyMilliseconds,omitempty"` +} + +// ManagedRuleDefinition describes a managed rule definition. +type ManagedRuleDefinition struct { + // RuleID - READ-ONLY; Identifier for the managed rule. + RuleID *string `json:"ruleId,omitempty"` + // DefaultState - READ-ONLY; Describes the default state for the managed rule. Possible values include: 'ManagedRuleEnabledStateDisabled', 'ManagedRuleEnabledStateEnabled' + DefaultState ManagedRuleEnabledState `json:"defaultState,omitempty"` + // DefaultAction - READ-ONLY; Describes the default action to be applied when the managed rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + DefaultAction ActionType `json:"defaultAction,omitempty"` + // Description - READ-ONLY; Describes the functionality of the managed rule. + Description *string `json:"description,omitempty"` +} + +// ManagedRuleExclusion exclude variables from managed rule evaluation. +type ManagedRuleExclusion struct { + // MatchVariable - The variable type to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'QueryStringArgNames', 'RequestBodyPostArgNames' + MatchVariable ManagedRuleExclusionMatchVariable `json:"matchVariable,omitempty"` + // SelectorMatchOperator - Comparison operator to apply to the selector when specifying which elements in the collection this exclusion applies to. Possible values include: 'Equals', 'Contains', 'StartsWith', 'EndsWith', 'EqualsAny' + SelectorMatchOperator ManagedRuleExclusionSelectorMatchOperator `json:"selectorMatchOperator,omitempty"` + // Selector - Selector value for which elements in the collection this exclusion applies to. + Selector *string `json:"selector,omitempty"` +} + +// ManagedRuleGroupDefinition describes a managed rule group. +type ManagedRuleGroupDefinition struct { + // RuleGroupName - READ-ONLY; Name of the managed rule group. + RuleGroupName *string `json:"ruleGroupName,omitempty"` + // Description - READ-ONLY; Description of the managed rule group. + Description *string `json:"description,omitempty"` + // Rules - READ-ONLY; List of rules within the managed rule group. + Rules *[]ManagedRuleDefinition `json:"rules,omitempty"` +} + +// ManagedRuleGroupOverride defines a managed rule group override setting. +type ManagedRuleGroupOverride struct { + // RuleGroupName - Describes the managed rule group to override. + RuleGroupName *string `json:"ruleGroupName,omitempty"` + // Exclusions - Describes the exclusions that are applied to all rules in the group. + Exclusions *[]ManagedRuleExclusion `json:"exclusions,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"` + // EnabledState - Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled', 'ManagedRuleEnabledStateEnabled' + EnabledState ManagedRuleEnabledState `json:"enabledState,omitempty"` + // Action - Describes the override action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + Action ActionType `json:"action,omitempty"` + // Exclusions - Describes the exclusions that are applied to this specific rule. + Exclusions *[]ManagedRuleExclusion `json:"exclusions,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"` + // Exclusions - Describes the exclusions that are applied to all rules in the set. + Exclusions *[]ManagedRuleExclusion `json:"exclusions,omitempty"` + // RuleGroupOverrides - Defines the rule group overrides to apply to the rule set. + RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"` +} + +// ManagedRuleSetDefinition describes the a managed rule set definition. +type ManagedRuleSetDefinition struct { + // ManagedRuleSetDefinitionProperties - Properties for a managed rule set definition. + *ManagedRuleSetDefinitionProperties `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 ManagedRuleSetDefinition. +func (mrsd ManagedRuleSetDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mrsd.ManagedRuleSetDefinitionProperties != nil { + objectMap["properties"] = mrsd.ManagedRuleSetDefinitionProperties + } + if mrsd.Location != nil { + objectMap["location"] = mrsd.Location + } + if mrsd.Tags != nil { + objectMap["tags"] = mrsd.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedRuleSetDefinition struct. +func (mrsd *ManagedRuleSetDefinition) UnmarshalJSON(body []byte) error { + var m map[string]*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 managedRuleSetDefinitionProperties ManagedRuleSetDefinitionProperties + err = json.Unmarshal(*v, &managedRuleSetDefinitionProperties) + if err != nil { + return err + } + mrsd.ManagedRuleSetDefinitionProperties = &managedRuleSetDefinitionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mrsd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mrsd.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mrsd.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mrsd.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mrsd.Tags = tags + } + } + } + + return nil +} + +// ManagedRuleSetDefinitionList list of managed rule set definitions available for use in a policy. +type ManagedRuleSetDefinitionList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of managed rule set definitions. + Value *[]ManagedRuleSetDefinition `json:"value,omitempty"` + // NextLink - URL to retrieve next set of managed rule set definitions. + NextLink *string `json:"nextLink,omitempty"` +} + +// ManagedRuleSetDefinitionListIterator provides access to a complete listing of ManagedRuleSetDefinition +// values. +type ManagedRuleSetDefinitionListIterator struct { + i int + page ManagedRuleSetDefinitionListPage +} + +// 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 *ManagedRuleSetDefinitionListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedRuleSetDefinitionListIterator.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 *ManagedRuleSetDefinitionListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ManagedRuleSetDefinitionListIterator) 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 ManagedRuleSetDefinitionListIterator) Response() ManagedRuleSetDefinitionList { + 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 ManagedRuleSetDefinitionListIterator) Value() ManagedRuleSetDefinition { + if !iter.page.NotDone() { + return ManagedRuleSetDefinition{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ManagedRuleSetDefinitionListIterator type. +func NewManagedRuleSetDefinitionListIterator(page ManagedRuleSetDefinitionListPage) ManagedRuleSetDefinitionListIterator { + return ManagedRuleSetDefinitionListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (mrsdl ManagedRuleSetDefinitionList) IsEmpty() bool { + return mrsdl.Value == nil || len(*mrsdl.Value) == 0 +} + +// managedRuleSetDefinitionListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (mrsdl ManagedRuleSetDefinitionList) managedRuleSetDefinitionListPreparer(ctx context.Context) (*http.Request, error) { + if mrsdl.NextLink == nil || len(to.String(mrsdl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(mrsdl.NextLink))) +} + +// ManagedRuleSetDefinitionListPage contains a page of ManagedRuleSetDefinition values. +type ManagedRuleSetDefinitionListPage struct { + fn func(context.Context, ManagedRuleSetDefinitionList) (ManagedRuleSetDefinitionList, error) + mrsdl ManagedRuleSetDefinitionList +} + +// 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 *ManagedRuleSetDefinitionListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedRuleSetDefinitionListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.mrsdl) + if err != nil { + return err + } + page.mrsdl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ManagedRuleSetDefinitionListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ManagedRuleSetDefinitionListPage) NotDone() bool { + return !page.mrsdl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ManagedRuleSetDefinitionListPage) Response() ManagedRuleSetDefinitionList { + return page.mrsdl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ManagedRuleSetDefinitionListPage) Values() []ManagedRuleSetDefinition { + if page.mrsdl.IsEmpty() { + return nil + } + return *page.mrsdl.Value +} + +// Creates a new instance of the ManagedRuleSetDefinitionListPage type. +func NewManagedRuleSetDefinitionListPage(getNextPage func(context.Context, ManagedRuleSetDefinitionList) (ManagedRuleSetDefinitionList, error)) ManagedRuleSetDefinitionListPage { + return ManagedRuleSetDefinitionListPage{fn: getNextPage} +} + +// ManagedRuleSetDefinitionProperties properties for a managed rule set definition. +type ManagedRuleSetDefinitionProperties struct { + // ProvisioningState - READ-ONLY; Provisioning state of the managed rule set. + ProvisioningState *string `json:"provisioningState,omitempty"` + // RuleSetType - READ-ONLY; Type of the managed rule set. + RuleSetType *string `json:"ruleSetType,omitempty"` + // RuleSetVersion - READ-ONLY; Version of the managed rule set type. + RuleSetVersion *string `json:"ruleSetVersion,omitempty"` + // RuleGroups - READ-ONLY; Rule groups of the managed rule set. + RuleGroups *[]ManagedRuleGroupDefinition `json:"ruleGroups,omitempty"` +} + +// ManagedRuleSetList defines the list of managed rule sets for the policy. +type ManagedRuleSetList struct { + // ManagedRuleSets - List of rule sets. + ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"` +} + +// MatchCondition define a match condition. +type MatchCondition struct { + // MatchVariable - Request variable to compare with. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeader', 'RequestBody', 'Cookies', 'SocketAddr' + MatchVariable MatchVariable `json:"matchVariable,omitempty"` + // Selector - Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies variables. Default is null. + Selector *string `json:"selector,omitempty"` + // Operator - Comparison type to use for matching with the variable value. Possible values include: 'OperatorAny', 'OperatorIPMatch', 'OperatorGeoMatch', 'OperatorEqual', 'OperatorContains', 'OperatorLessThan', 'OperatorGreaterThan', 'OperatorLessThanOrEqual', 'OperatorGreaterThanOrEqual', 'OperatorBeginsWith', 'OperatorEndsWith', 'OperatorRegEx' + Operator Operator `json:"operator,omitempty"` + // NegateCondition - Describes if the result of this condition should be negated. + NegateCondition *bool `json:"negateCondition,omitempty"` + // MatchValue - List of possible match values. + MatchValue *[]string `json:"matchValue,omitempty"` + // Transforms - List of transforms. + Transforms *[]TransformType `json:"transforms,omitempty"` +} + +// NetworkExperimentProfilesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type NetworkExperimentProfilesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *NetworkExperimentProfilesCreateOrUpdateFuture) Result(client NetworkExperimentProfilesClient) (p Profile, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.NetworkExperimentProfilesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent { + p, err = client.CreateOrUpdateResponder(p.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesCreateOrUpdateFuture", "Result", p.Response.Response, "Failure responding to request") + } + } + return +} + +// NetworkExperimentProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type NetworkExperimentProfilesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *NetworkExperimentProfilesDeleteFuture) Result(client NetworkExperimentProfilesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.NetworkExperimentProfilesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// NetworkExperimentProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type NetworkExperimentProfilesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *NetworkExperimentProfilesUpdateFuture) Result(client NetworkExperimentProfilesClient) (p Profile, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.NetworkExperimentProfilesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent { + p, err = client.UpdateResponder(p.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesUpdateFuture", "Result", p.Response.Response, "Failure responding to request") + } + } + return +} + +// PoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PoliciesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PoliciesCreateOrUpdateFuture) Result(client PoliciesClient) (wafp WebApplicationFirewallPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.PoliciesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if wafp.Response.Response, err = future.GetResult(sender); err == nil && wafp.Response.Response.StatusCode != http.StatusNoContent { + wafp, err = client.CreateOrUpdateResponder(wafp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesCreateOrUpdateFuture", "Result", wafp.Response.Response, "Failure responding to request") + } + } + return +} + +// PoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PoliciesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PoliciesDeleteFuture) Result(client PoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.PoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PolicySettings defines top-level WebApplicationFirewallPolicy configuration settings. +type PolicySettings struct { + // EnabledState - Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'PolicyEnabledStateDisabled', 'PolicyEnabledStateEnabled' + EnabledState PolicyEnabledState `json:"enabledState,omitempty"` + // Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection' + Mode PolicyMode `json:"mode,omitempty"` + // RedirectURL - If action type is redirect, this field represents redirect URL for the client. + RedirectURL *string `json:"redirectUrl,omitempty"` + // CustomBlockResponseStatusCode - If the action type is block, customer can override the response status code. + CustomBlockResponseStatusCode *int32 `json:"customBlockResponseStatusCode,omitempty"` + // CustomBlockResponseBody - If the action type is block, customer can override the response body. The body must be specified in base64 encoding. + CustomBlockResponseBody *string `json:"customBlockResponseBody,omitempty"` +} + +// PreconfiguredEndpoint defines the properties of a preconfigured endpoint +type PreconfiguredEndpoint struct { + // PreconfiguredEndpointProperties - The properties of a preconfiguredEndpoint + *PreconfiguredEndpointProperties `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 PreconfiguredEndpoint. +func (peVar PreconfiguredEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if peVar.PreconfiguredEndpointProperties != nil { + objectMap["properties"] = peVar.PreconfiguredEndpointProperties + } + 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 PreconfiguredEndpoint struct. +func (peVar *PreconfiguredEndpoint) UnmarshalJSON(body []byte) error { + var m map[string]*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 preconfiguredEndpointProperties PreconfiguredEndpointProperties + err = json.Unmarshal(*v, &preconfiguredEndpointProperties) + if err != nil { + return err + } + peVar.PreconfiguredEndpointProperties = &preconfiguredEndpointProperties + } + 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 +} + +// PreconfiguredEndpointList defines a list of preconfigured endpoints. +type PreconfiguredEndpointList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of PreconfiguredEndpoints supported by NetworkExperiment. + Value *[]PreconfiguredEndpoint `json:"value,omitempty"` + // NextLink - URL to get the next set of PreconfiguredEndpoints if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// PreconfiguredEndpointListIterator provides access to a complete listing of PreconfiguredEndpoint values. +type PreconfiguredEndpointListIterator struct { + i int + page PreconfiguredEndpointListPage +} + +// 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 *PreconfiguredEndpointListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PreconfiguredEndpointListIterator.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 *PreconfiguredEndpointListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PreconfiguredEndpointListIterator) 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 PreconfiguredEndpointListIterator) Response() PreconfiguredEndpointList { + 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 PreconfiguredEndpointListIterator) Value() PreconfiguredEndpoint { + if !iter.page.NotDone() { + return PreconfiguredEndpoint{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PreconfiguredEndpointListIterator type. +func NewPreconfiguredEndpointListIterator(page PreconfiguredEndpointListPage) PreconfiguredEndpointListIterator { + return PreconfiguredEndpointListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pel PreconfiguredEndpointList) IsEmpty() bool { + return pel.Value == nil || len(*pel.Value) == 0 +} + +// preconfiguredEndpointListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pel PreconfiguredEndpointList) preconfiguredEndpointListPreparer(ctx context.Context) (*http.Request, error) { + if pel.NextLink == nil || len(to.String(pel.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pel.NextLink))) +} + +// PreconfiguredEndpointListPage contains a page of PreconfiguredEndpoint values. +type PreconfiguredEndpointListPage struct { + fn func(context.Context, PreconfiguredEndpointList) (PreconfiguredEndpointList, error) + pel PreconfiguredEndpointList +} + +// 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 *PreconfiguredEndpointListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PreconfiguredEndpointListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pel) + if err != nil { + return err + } + page.pel = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *PreconfiguredEndpointListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PreconfiguredEndpointListPage) NotDone() bool { + return !page.pel.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PreconfiguredEndpointListPage) Response() PreconfiguredEndpointList { + return page.pel +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PreconfiguredEndpointListPage) Values() []PreconfiguredEndpoint { + if page.pel.IsEmpty() { + return nil + } + return *page.pel.Value +} + +// Creates a new instance of the PreconfiguredEndpointListPage type. +func NewPreconfiguredEndpointListPage(getNextPage func(context.Context, PreconfiguredEndpointList) (PreconfiguredEndpointList, error)) PreconfiguredEndpointListPage { + return PreconfiguredEndpointListPage{fn: getNextPage} +} + +// PreconfiguredEndpointProperties defines the properties of a preconfigured endpoint +type PreconfiguredEndpointProperties struct { + // Description - The description of the endpoint + Description *string `json:"description,omitempty"` + // Endpoint - The endpoint that is preconfigured + Endpoint *string `json:"endpoint,omitempty"` + // EndpointType - The type of endpoint. Possible values include: 'AFD', 'AzureRegion', 'CDN', 'ATM' + EndpointType EndpointType `json:"endpointType,omitempty"` + // Backend - The preconfigured endpoint backend + Backend *string `json:"backend,omitempty"` +} + +// Profile defines an Network Experiment Profile and lists of Experiments +type Profile struct { + autorest.Response `json:"-"` + // ProfileProperties - The properties of a Profile + *ProfileProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,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 Profile. +func (p Profile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if p.ProfileProperties != nil { + objectMap["properties"] = p.ProfileProperties + } + if p.Etag != nil { + objectMap["etag"] = p.Etag + } + 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 profileProperties ProfileProperties + err = json.Unmarshal(*v, &profileProperties) + if err != nil { + return err + } + p.ProfileProperties = &profileProperties + } + 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 +} + +// ProfileList defines a list of Profiles. It contains a list of Profile objects and a URL link to get the +// next set of results. +type ProfileList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Profiles within a resource group. + Value *[]Profile `json:"value,omitempty"` + // NextLink - URL to get the next set of Profile objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProfileListIterator provides access to a complete listing of Profile values. +type ProfileListIterator struct { + i int + page ProfileListPage +} + +// 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 *ProfileListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListIterator.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 *ProfileListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProfileListIterator) 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 ProfileListIterator) Response() ProfileList { + 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 ProfileListIterator) Value() Profile { + if !iter.page.NotDone() { + return Profile{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProfileListIterator type. +func NewProfileListIterator(page ProfileListPage) ProfileListIterator { + return ProfileListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pl ProfileList) IsEmpty() bool { + return pl.Value == nil || len(*pl.Value) == 0 +} + +// profileListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pl ProfileList) profileListPreparer(ctx context.Context) (*http.Request, error) { + if pl.NextLink == nil || len(to.String(pl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pl.NextLink))) +} + +// ProfileListPage contains a page of Profile values. +type ProfileListPage struct { + fn func(context.Context, ProfileList) (ProfileList, error) + pl ProfileList +} + +// 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 *ProfileListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pl) + if err != nil { + return err + } + page.pl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProfileListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProfileListPage) NotDone() bool { + return !page.pl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProfileListPage) Response() ProfileList { + return page.pl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProfileListPage) Values() []Profile { + if page.pl.IsEmpty() { + return nil + } + return *page.pl.Value +} + +// Creates a new instance of the ProfileListPage type. +func NewProfileListPage(getNextPage func(context.Context, ProfileList) (ProfileList, error)) ProfileListPage { + return ProfileListPage{fn: getNextPage} +} + +// ProfileProperties defines the properties of an experiment +type ProfileProperties struct { + // ResourceState - Resource status. Possible values include: 'NetworkExperimentResourceStateCreating', 'NetworkExperimentResourceStateEnabling', 'NetworkExperimentResourceStateEnabled', 'NetworkExperimentResourceStateDisabling', 'NetworkExperimentResourceStateDisabled', 'NetworkExperimentResourceStateDeleting' + ResourceState NetworkExperimentResourceState `json:"resourceState,omitempty"` + // EnabledState - The state of the Experiment. Possible values include: 'StateEnabled', 'StateDisabled' + EnabledState State `json:"enabledState,omitempty"` +} + +// ProfileUpdateModel defines modifiable attributes of a Profile +type ProfileUpdateModel struct { + // ProfileUpdateProperties - The properties of a Profile + *ProfileUpdateProperties `json:"properties,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ProfileUpdateModel. +func (pum ProfileUpdateModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pum.ProfileUpdateProperties != nil { + objectMap["properties"] = pum.ProfileUpdateProperties + } + if pum.Tags != nil { + objectMap["tags"] = pum.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProfileUpdateModel struct. +func (pum *ProfileUpdateModel) UnmarshalJSON(body []byte) error { + var m map[string]*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 profileUpdateProperties ProfileUpdateProperties + err = json.Unmarshal(*v, &profileUpdateProperties) + if err != nil { + return err + } + pum.ProfileUpdateProperties = &profileUpdateProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pum.Tags = tags + } + } + } + + return nil +} + +// ProfileUpdateProperties defines the properties of an experiment +type ProfileUpdateProperties struct { + // EnabledState - The enabled state of the Profile. Possible values include: 'StateEnabled', 'StateDisabled' + EnabledState State `json:"enabledState,omitempty"` +} + +// Properties the JSON object that contains the properties required to create an endpoint. +type Properties struct { + // ResourceState - Resource status of the Front Door. Possible values include: 'ResourceStateCreating', 'ResourceStateEnabling', 'ResourceStateEnabled', 'ResourceStateDisabling', 'ResourceStateDisabled', 'ResourceStateDeleting' + ResourceState ResourceState `json:"resourceState,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the Front Door. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Cname - READ-ONLY; The host that each frontendEndpoint must CNAME to. + Cname *string `json:"cname,omitempty"` + // FrontdoorID - READ-ONLY; The Id of the frontdoor. + FrontdoorID *string `json:"frontdoorId,omitempty"` + // RulesEngines - READ-ONLY; Rules Engine Configurations available to routing rules. + RulesEngines *[]RulesEngine `json:"rulesEngines,omitempty"` + // FriendlyName - A friendly name for the frontDoor + FriendlyName *string `json:"friendlyName,omitempty"` + // RoutingRules - Routing rules associated with this Front Door. + RoutingRules *[]RoutingRule `json:"routingRules,omitempty"` + // LoadBalancingSettings - Load balancing settings associated with this Front Door instance. + LoadBalancingSettings *[]LoadBalancingSettingsModel `json:"loadBalancingSettings,omitempty"` + // HealthProbeSettings - Health probe settings associated with this Front Door instance. + HealthProbeSettings *[]HealthProbeSettingsModel `json:"healthProbeSettings,omitempty"` + // BackendPools - Backend pools available to routing rules. + BackendPools *[]BackendPool `json:"backendPools,omitempty"` + // FrontendEndpoints - Frontend endpoints available to routing rules. + FrontendEndpoints *[]FrontendEndpoint `json:"frontendEndpoints,omitempty"` + // BackendPoolsSettings - Settings for all backendPools + BackendPoolsSettings *BackendPoolsSettings `json:"backendPoolsSettings,omitempty"` + // EnabledState - Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'EnabledStateEnabled', 'EnabledStateDisabled' + EnabledState EnabledState `json:"enabledState,omitempty"` +} + +// PurgeParameters parameters required for content purge. +type PurgeParameters struct { + // ContentPaths - The path to the content to be purged. Can describe a file path or a wild card directory. + ContentPaths *[]string `json:"contentPaths,omitempty"` +} + +// RedirectConfiguration describes Redirect Route. +type RedirectConfiguration struct { + // RedirectType - The redirect type the rule will use when redirecting traffic. Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' + RedirectType RedirectType `json:"redirectType,omitempty"` + // RedirectProtocol - The protocol of the destination to where the traffic is redirected. Possible values include: 'RedirectProtocolHTTPOnly', 'RedirectProtocolHTTPSOnly', 'RedirectProtocolMatchRequest' + RedirectProtocol RedirectProtocol `json:"redirectProtocol,omitempty"` + // CustomHost - Host to redirect. Leave empty to use the incoming host as the destination host. + CustomHost *string `json:"customHost,omitempty"` + // CustomPath - The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path. + CustomPath *string `json:"customPath,omitempty"` + // CustomFragment - Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + CustomFragment *string `json:"customFragment,omitempty"` + // CustomQueryString - The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. The first ? and & will be added automatically so do not include them in the front, but do separate multiple query strings with &. + CustomQueryString *string `json:"customQueryString,omitempty"` + // OdataType - Possible values include: 'OdataTypeRouteConfiguration', 'OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration', 'OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration' + OdataType OdataType `json:"@odata.type,omitempty"` +} + +// MarshalJSON is the custom marshaler for RedirectConfiguration. +func (rc RedirectConfiguration) MarshalJSON() ([]byte, error) { + rc.OdataType = OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration + objectMap := make(map[string]interface{}) + if rc.RedirectType != "" { + objectMap["redirectType"] = rc.RedirectType + } + if rc.RedirectProtocol != "" { + objectMap["redirectProtocol"] = rc.RedirectProtocol + } + if rc.CustomHost != nil { + objectMap["customHost"] = rc.CustomHost + } + if rc.CustomPath != nil { + objectMap["customPath"] = rc.CustomPath + } + if rc.CustomFragment != nil { + objectMap["customFragment"] = rc.CustomFragment + } + if rc.CustomQueryString != nil { + objectMap["customQueryString"] = rc.CustomQueryString + } + if rc.OdataType != "" { + objectMap["@odata.type"] = rc.OdataType + } + return json.Marshal(objectMap) +} + +// AsForwardingConfiguration is the BasicRouteConfiguration implementation for RedirectConfiguration. +func (rc RedirectConfiguration) AsForwardingConfiguration() (*ForwardingConfiguration, bool) { + return nil, false +} + +// AsRedirectConfiguration is the BasicRouteConfiguration implementation for RedirectConfiguration. +func (rc RedirectConfiguration) AsRedirectConfiguration() (*RedirectConfiguration, bool) { + return &rc, true +} + +// AsRouteConfiguration is the BasicRouteConfiguration implementation for RedirectConfiguration. +func (rc RedirectConfiguration) AsRouteConfiguration() (*RouteConfiguration, bool) { + return nil, false +} + +// AsBasicRouteConfiguration is the BasicRouteConfiguration implementation for RedirectConfiguration. +func (rc RedirectConfiguration) AsBasicRouteConfiguration() (BasicRouteConfiguration, bool) { + return &rc, true +} + +// Resource common resource representation. +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) +} + +// BasicRouteConfiguration base class for all types of Route. +type BasicRouteConfiguration interface { + AsForwardingConfiguration() (*ForwardingConfiguration, bool) + AsRedirectConfiguration() (*RedirectConfiguration, bool) + AsRouteConfiguration() (*RouteConfiguration, bool) +} + +// RouteConfiguration base class for all types of Route. +type RouteConfiguration struct { + // OdataType - Possible values include: 'OdataTypeRouteConfiguration', 'OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration', 'OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration' + OdataType OdataType `json:"@odata.type,omitempty"` +} + +func unmarshalBasicRouteConfiguration(body []byte) (BasicRouteConfiguration, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["@odata.type"] { + case string(OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration): + var fc ForwardingConfiguration + err := json.Unmarshal(body, &fc) + return fc, err + case string(OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration): + var rc RedirectConfiguration + err := json.Unmarshal(body, &rc) + return rc, err + default: + var rc RouteConfiguration + err := json.Unmarshal(body, &rc) + return rc, err + } +} +func unmarshalBasicRouteConfigurationArray(body []byte) ([]BasicRouteConfiguration, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rcArray := make([]BasicRouteConfiguration, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rc, err := unmarshalBasicRouteConfiguration(*rawMessage) + if err != nil { + return nil, err + } + rcArray[index] = rc + } + return rcArray, nil +} + +// MarshalJSON is the custom marshaler for RouteConfiguration. +func (rc RouteConfiguration) MarshalJSON() ([]byte, error) { + rc.OdataType = OdataTypeRouteConfiguration + objectMap := make(map[string]interface{}) + if rc.OdataType != "" { + objectMap["@odata.type"] = rc.OdataType + } + return json.Marshal(objectMap) +} + +// AsForwardingConfiguration is the BasicRouteConfiguration implementation for RouteConfiguration. +func (rc RouteConfiguration) AsForwardingConfiguration() (*ForwardingConfiguration, bool) { + return nil, false +} + +// AsRedirectConfiguration is the BasicRouteConfiguration implementation for RouteConfiguration. +func (rc RouteConfiguration) AsRedirectConfiguration() (*RedirectConfiguration, bool) { + return nil, false +} + +// AsRouteConfiguration is the BasicRouteConfiguration implementation for RouteConfiguration. +func (rc RouteConfiguration) AsRouteConfiguration() (*RouteConfiguration, bool) { + return &rc, true +} + +// AsBasicRouteConfiguration is the BasicRouteConfiguration implementation for RouteConfiguration. +func (rc RouteConfiguration) AsBasicRouteConfiguration() (BasicRouteConfiguration, bool) { + return &rc, true +} + +// RoutingRule a routing rule represents a specification for traffic to treat and where to send it, along +// with health probe information. +type RoutingRule struct { + // RoutingRuleProperties - Properties of the Front Door Routing Rule + *RoutingRuleProperties `json:"properties,omitempty"` + // Name - Resource name. + 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 RoutingRule. +func (rr RoutingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rr.RoutingRuleProperties != nil { + objectMap["properties"] = rr.RoutingRuleProperties + } + if rr.Name != nil { + objectMap["name"] = rr.Name + } + if rr.ID != nil { + objectMap["id"] = rr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RoutingRule struct. +func (rr *RoutingRule) UnmarshalJSON(body []byte) error { + var m map[string]*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 routingRuleProperties RoutingRuleProperties + err = json.Unmarshal(*v, &routingRuleProperties) + if err != nil { + return err + } + rr.RoutingRuleProperties = &routingRuleProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rr.ID = &ID + } + } + } + + return nil +} + +// RoutingRuleListResult result of the request to list Routing Rules. It contains a list of Routing Rule +// objects and a URL link to get the next set of results. +type RoutingRuleListResult struct { + // Value - READ-ONLY; List of Routing Rules within a Front Door. + Value *[]RoutingRule `json:"value,omitempty"` + // NextLink - URL to get the next set of RoutingRule objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// RoutingRuleProperties the JSON object that contains the properties required to create a routing rule. +type RoutingRuleProperties struct { + // ResourceState - Resource status. Possible values include: 'ResourceStateCreating', 'ResourceStateEnabling', 'ResourceStateEnabled', 'ResourceStateDisabling', 'ResourceStateDisabled', 'ResourceStateDeleting' + ResourceState ResourceState `json:"resourceState,omitempty"` + // FrontendEndpoints - Frontend endpoints associated with this rule + FrontendEndpoints *[]SubResource `json:"frontendEndpoints,omitempty"` + // AcceptedProtocols - Protocol schemes to match for this rule + AcceptedProtocols *[]Protocol `json:"acceptedProtocols,omitempty"` + // PatternsToMatch - The route patterns of the rule. + PatternsToMatch *[]string `json:"patternsToMatch,omitempty"` + // EnabledState - Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'RoutingRuleEnabledStateEnabled', 'RoutingRuleEnabledStateDisabled' + EnabledState RoutingRuleEnabledState `json:"enabledState,omitempty"` + // RouteConfiguration - A reference to the routing configuration. + RouteConfiguration BasicRouteConfiguration `json:"routeConfiguration,omitempty"` + // RulesEngine - A reference to a specific Rules Engine Configuration to apply to this route. + RulesEngine *SubResource `json:"rulesEngine,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RoutingRuleProperties struct. +func (rrp *RoutingRuleProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "resourceState": + if v != nil { + var resourceState ResourceState + err = json.Unmarshal(*v, &resourceState) + if err != nil { + return err + } + rrp.ResourceState = resourceState + } + case "frontendEndpoints": + if v != nil { + var frontendEndpoints []SubResource + err = json.Unmarshal(*v, &frontendEndpoints) + if err != nil { + return err + } + rrp.FrontendEndpoints = &frontendEndpoints + } + case "acceptedProtocols": + if v != nil { + var acceptedProtocols []Protocol + err = json.Unmarshal(*v, &acceptedProtocols) + if err != nil { + return err + } + rrp.AcceptedProtocols = &acceptedProtocols + } + case "patternsToMatch": + if v != nil { + var patternsToMatch []string + err = json.Unmarshal(*v, &patternsToMatch) + if err != nil { + return err + } + rrp.PatternsToMatch = &patternsToMatch + } + case "enabledState": + if v != nil { + var enabledState RoutingRuleEnabledState + err = json.Unmarshal(*v, &enabledState) + if err != nil { + return err + } + rrp.EnabledState = enabledState + } + case "routeConfiguration": + if v != nil { + routeConfiguration, err := unmarshalBasicRouteConfiguration(*v) + if err != nil { + return err + } + rrp.RouteConfiguration = routeConfiguration + } + case "rulesEngine": + if v != nil { + var rulesEngine SubResource + err = json.Unmarshal(*v, &rulesEngine) + if err != nil { + return err + } + rrp.RulesEngine = &rulesEngine + } + } + } + + return nil +} + +// RoutingRuleUpdateParameters routing rules to apply to an endpoint +type RoutingRuleUpdateParameters struct { + // FrontendEndpoints - Frontend endpoints associated with this rule + FrontendEndpoints *[]SubResource `json:"frontendEndpoints,omitempty"` + // AcceptedProtocols - Protocol schemes to match for this rule + AcceptedProtocols *[]Protocol `json:"acceptedProtocols,omitempty"` + // PatternsToMatch - The route patterns of the rule. + PatternsToMatch *[]string `json:"patternsToMatch,omitempty"` + // EnabledState - Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'RoutingRuleEnabledStateEnabled', 'RoutingRuleEnabledStateDisabled' + EnabledState RoutingRuleEnabledState `json:"enabledState,omitempty"` + // RouteConfiguration - A reference to the routing configuration. + RouteConfiguration BasicRouteConfiguration `json:"routeConfiguration,omitempty"` + // RulesEngine - A reference to a specific Rules Engine Configuration to apply to this route. + RulesEngine *SubResource `json:"rulesEngine,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RoutingRuleUpdateParameters struct. +func (rrup *RoutingRuleUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "frontendEndpoints": + if v != nil { + var frontendEndpoints []SubResource + err = json.Unmarshal(*v, &frontendEndpoints) + if err != nil { + return err + } + rrup.FrontendEndpoints = &frontendEndpoints + } + case "acceptedProtocols": + if v != nil { + var acceptedProtocols []Protocol + err = json.Unmarshal(*v, &acceptedProtocols) + if err != nil { + return err + } + rrup.AcceptedProtocols = &acceptedProtocols + } + case "patternsToMatch": + if v != nil { + var patternsToMatch []string + err = json.Unmarshal(*v, &patternsToMatch) + if err != nil { + return err + } + rrup.PatternsToMatch = &patternsToMatch + } + case "enabledState": + if v != nil { + var enabledState RoutingRuleEnabledState + err = json.Unmarshal(*v, &enabledState) + if err != nil { + return err + } + rrup.EnabledState = enabledState + } + case "routeConfiguration": + if v != nil { + routeConfiguration, err := unmarshalBasicRouteConfiguration(*v) + if err != nil { + return err + } + rrup.RouteConfiguration = routeConfiguration + } + case "rulesEngine": + if v != nil { + var rulesEngine SubResource + err = json.Unmarshal(*v, &rulesEngine) + if err != nil { + return err + } + rrup.RulesEngine = &rulesEngine + } + } + } + + return nil +} + +// RulesEngine a rules engine configuration containing a list of rules that will run to modify the runtime +// behavior of the request and response. +type RulesEngine struct { + autorest.Response `json:"-"` + // RulesEngineProperties - Properties of the Rules Engine Configuration. + *RulesEngineProperties `json:"properties,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for RulesEngine. +func (re RulesEngine) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if re.RulesEngineProperties != nil { + objectMap["properties"] = re.RulesEngineProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RulesEngine struct. +func (re *RulesEngine) UnmarshalJSON(body []byte) error { + var m map[string]*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 rulesEngineProperties RulesEngineProperties + err = json.Unmarshal(*v, &rulesEngineProperties) + if err != nil { + return err + } + re.RulesEngineProperties = &rulesEngineProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + re.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + re.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + re.ID = &ID + } + } + } + + return nil +} + +// RulesEngineAction one or more actions that will execute, modifying the request and/or response. +type RulesEngineAction struct { + // RequestHeaderActions - A list of header actions to apply from the request from AFD to the origin. + RequestHeaderActions *[]HeaderAction `json:"requestHeaderActions,omitempty"` + // ResponseHeaderActions - A list of header actions to apply from the response from AFD to the client. + ResponseHeaderActions *[]HeaderAction `json:"responseHeaderActions,omitempty"` + // RouteConfigurationOverride - Override the route configuration. + RouteConfigurationOverride BasicRouteConfiguration `json:"routeConfigurationOverride,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RulesEngineAction struct. +func (rea *RulesEngineAction) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "requestHeaderActions": + if v != nil { + var requestHeaderActions []HeaderAction + err = json.Unmarshal(*v, &requestHeaderActions) + if err != nil { + return err + } + rea.RequestHeaderActions = &requestHeaderActions + } + case "responseHeaderActions": + if v != nil { + var responseHeaderActions []HeaderAction + err = json.Unmarshal(*v, &responseHeaderActions) + if err != nil { + return err + } + rea.ResponseHeaderActions = &responseHeaderActions + } + case "routeConfigurationOverride": + if v != nil { + routeConfigurationOverride, err := unmarshalBasicRouteConfiguration(*v) + if err != nil { + return err + } + rea.RouteConfigurationOverride = routeConfigurationOverride + } + } + } + + return nil +} + +// RulesEngineListResult result of the request to list Rules Engine Configurations. It contains a list of +// RulesEngine objects and a URL link to get the next set of results. +type RulesEngineListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of rulesEngines within a Front Door. + Value *[]RulesEngine `json:"value,omitempty"` + // NextLink - URL to get the next set of RulesEngine objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// RulesEngineListResultIterator provides access to a complete listing of RulesEngine values. +type RulesEngineListResultIterator struct { + i int + page RulesEngineListResultPage +} + +// 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 *RulesEngineListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RulesEngineListResultIterator.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 *RulesEngineListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RulesEngineListResultIterator) 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 RulesEngineListResultIterator) Response() RulesEngineListResult { + 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 RulesEngineListResultIterator) Value() RulesEngine { + if !iter.page.NotDone() { + return RulesEngine{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RulesEngineListResultIterator type. +func NewRulesEngineListResultIterator(page RulesEngineListResultPage) RulesEngineListResultIterator { + return RulesEngineListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (relr RulesEngineListResult) IsEmpty() bool { + return relr.Value == nil || len(*relr.Value) == 0 +} + +// rulesEngineListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (relr RulesEngineListResult) rulesEngineListResultPreparer(ctx context.Context) (*http.Request, error) { + if relr.NextLink == nil || len(to.String(relr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(relr.NextLink))) +} + +// RulesEngineListResultPage contains a page of RulesEngine values. +type RulesEngineListResultPage struct { + fn func(context.Context, RulesEngineListResult) (RulesEngineListResult, error) + relr RulesEngineListResult +} + +// 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 *RulesEngineListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RulesEngineListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.relr) + if err != nil { + return err + } + page.relr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RulesEngineListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RulesEngineListResultPage) NotDone() bool { + return !page.relr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RulesEngineListResultPage) Response() RulesEngineListResult { + return page.relr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RulesEngineListResultPage) Values() []RulesEngine { + if page.relr.IsEmpty() { + return nil + } + return *page.relr.Value +} + +// Creates a new instance of the RulesEngineListResultPage type. +func NewRulesEngineListResultPage(getNextPage func(context.Context, RulesEngineListResult) (RulesEngineListResult, error)) RulesEngineListResultPage { + return RulesEngineListResultPage{fn: getNextPage} +} + +// RulesEngineMatchCondition define a match condition +type RulesEngineMatchCondition struct { + // RulesEngineMatchVariable - Match Variable. Possible values include: 'RulesEngineMatchVariableIsMobile', 'RulesEngineMatchVariableRemoteAddr', 'RulesEngineMatchVariableRequestMethod', 'RulesEngineMatchVariableQueryString', 'RulesEngineMatchVariablePostArgs', 'RulesEngineMatchVariableRequestURI', 'RulesEngineMatchVariableRequestPath', 'RulesEngineMatchVariableRequestFilename', 'RulesEngineMatchVariableRequestFilenameExtension', 'RulesEngineMatchVariableRequestHeader', 'RulesEngineMatchVariableRequestBody', 'RulesEngineMatchVariableRequestScheme' + RulesEngineMatchVariable RulesEngineMatchVariable `json:"rulesEngineMatchVariable,omitempty"` + // Selector - Name of selector in RequestHeader or RequestBody to be matched + Selector *string `json:"selector,omitempty"` + // RulesEngineOperator - Describes operator to apply to the match condition. Possible values include: 'RulesEngineOperatorAny', 'RulesEngineOperatorIPMatch', 'RulesEngineOperatorGeoMatch', 'RulesEngineOperatorEqual', 'RulesEngineOperatorContains', 'RulesEngineOperatorLessThan', 'RulesEngineOperatorGreaterThan', 'RulesEngineOperatorLessThanOrEqual', 'RulesEngineOperatorGreaterThanOrEqual', 'RulesEngineOperatorBeginsWith', 'RulesEngineOperatorEndsWith' + RulesEngineOperator RulesEngineOperator `json:"rulesEngineOperator,omitempty"` + // NegateCondition - Describes if this is negate condition or not + NegateCondition *bool `json:"negateCondition,omitempty"` + // RulesEngineMatchValue - Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match. + RulesEngineMatchValue *[]string `json:"rulesEngineMatchValue,omitempty"` + // Transforms - List of transforms + Transforms *[]Transform `json:"transforms,omitempty"` +} + +// RulesEngineProperties the JSON object that contains the properties required to create a Rules Engine +// Configuration. +type RulesEngineProperties struct { + // ResourceState - Resource status. Possible values include: 'ResourceStateCreating', 'ResourceStateEnabling', 'ResourceStateEnabled', 'ResourceStateDisabling', 'ResourceStateDisabled', 'ResourceStateDeleting' + ResourceState ResourceState `json:"resourceState,omitempty"` + // Rules - A list of rules that define a particular Rules Engine Configuration. + Rules *[]RulesEngineRule `json:"rules,omitempty"` +} + +// RulesEngineRule contains a list of match conditions, and an action on how to modify the +// request/response. If multiple rules match, the actions from one rule that conflict with a previous rule +// overwrite for a singular action, or append in the case of headers manipulation. +type RulesEngineRule struct { + // Name - A name to refer to this specific rule. + Name *string `json:"name,omitempty"` + // Priority - A priority assigned to this rule. + Priority *int32 `json:"priority,omitempty"` + // Action - Actions to perform on the request and response if all of the match conditions are met. + Action *RulesEngineAction `json:"action,omitempty"` + // MatchConditions - A list of match conditions that must meet in order for the actions of this rule to run. Having no match conditions means the actions will always run. + MatchConditions *[]RulesEngineMatchCondition `json:"matchConditions,omitempty"` + // MatchProcessingBehavior - If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. Possible values include: 'Continue', 'Stop' + MatchProcessingBehavior MatchProcessingBehavior `json:"matchProcessingBehavior,omitempty"` +} + +// RulesEnginesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type RulesEnginesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RulesEnginesCreateOrUpdateFuture) Result(client RulesEnginesClient) (re RulesEngine, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.RulesEnginesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if re.Response.Response, err = future.GetResult(sender); err == nil && re.Response.Response.StatusCode != http.StatusNoContent { + re, err = client.CreateOrUpdateResponder(re.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesCreateOrUpdateFuture", "Result", re.Response.Response, "Failure responding to request") + } + } + return +} + +// RulesEnginesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RulesEnginesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *RulesEnginesDeleteFuture) Result(client RulesEnginesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("frontdoor.RulesEnginesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RulesEngineUpdateParameters rules Engine Configuration to apply to a Routing Rule. +type RulesEngineUpdateParameters struct { + // Rules - A list of rules that define a particular Rules Engine Configuration. + Rules *[]RulesEngineRule `json:"rules,omitempty"` +} + +// 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) +} + +// Timeseries defines the Timeseries +type Timeseries struct { + autorest.Response `json:"-"` + // TimeseriesProperties - The properties of a Timeseries + *TimeseriesProperties `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 Timeseries. +func (t Timeseries) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if t.TimeseriesProperties != nil { + objectMap["properties"] = t.TimeseriesProperties + } + if t.Location != nil { + objectMap["location"] = t.Location + } + if t.Tags != nil { + objectMap["tags"] = t.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Timeseries struct. +func (t *Timeseries) UnmarshalJSON(body []byte) error { + var m map[string]*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 timeseriesProperties TimeseriesProperties + err = json.Unmarshal(*v, ×eriesProperties) + if err != nil { + return err + } + t.TimeseriesProperties = ×eriesProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + t.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + t.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + t.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + t.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + t.Tags = tags + } + } + } + + return nil +} + +// TimeseriesDataPoint defines a timeseries datapoint used in a timeseries +type TimeseriesDataPoint struct { + // DateTimeUTC - The DateTime of the Timeseries data point in UTC + DateTimeUTC *string `json:"dateTimeUTC,omitempty"` + // Value - The Value of the Timeseries data point + Value *float64 `json:"value,omitempty"` +} + +// TimeseriesProperties defines the properties of a timeseries +type TimeseriesProperties struct { + // Endpoint - The endpoint associated with the Timeseries data point + Endpoint *string `json:"endpoint,omitempty"` + // StartDateTimeUTC - The start DateTime of the Timeseries in UTC + StartDateTimeUTC *string `json:"startDateTimeUTC,omitempty"` + // EndDateTimeUTC - The end DateTime of the Timeseries in UTC + EndDateTimeUTC *string `json:"endDateTimeUTC,omitempty"` + // AggregationInterval - The aggregation interval of the Timeseries. Possible values include: 'Hourly', 'Daily' + AggregationInterval AggregationInterval `json:"aggregationInterval,omitempty"` + // TimeseriesType - The type of Timeseries. Possible values include: 'MeasurementCounts', 'LatencyP50', 'LatencyP75', 'LatencyP95' + TimeseriesType TimeseriesType `json:"timeseriesType,omitempty"` + // Country - The country associated with the Timeseries. Values are country ISO codes as specified here- https://www.iso.org/iso-3166-country-codes.html + Country *string `json:"country,omitempty"` + // TimeseriesData - The set of data points for the timeseries + TimeseriesData *[]TimeseriesDataPoint `json:"timeseriesData,omitempty"` +} + +// UpdateParameters the properties needed to update a Front Door +type UpdateParameters struct { + // FriendlyName - A friendly name for the frontDoor + FriendlyName *string `json:"friendlyName,omitempty"` + // RoutingRules - Routing rules associated with this Front Door. + RoutingRules *[]RoutingRule `json:"routingRules,omitempty"` + // LoadBalancingSettings - Load balancing settings associated with this Front Door instance. + LoadBalancingSettings *[]LoadBalancingSettingsModel `json:"loadBalancingSettings,omitempty"` + // HealthProbeSettings - Health probe settings associated with this Front Door instance. + HealthProbeSettings *[]HealthProbeSettingsModel `json:"healthProbeSettings,omitempty"` + // BackendPools - Backend pools available to routing rules. + BackendPools *[]BackendPool `json:"backendPools,omitempty"` + // FrontendEndpoints - Frontend endpoints available to routing rules. + FrontendEndpoints *[]FrontendEndpoint `json:"frontendEndpoints,omitempty"` + // BackendPoolsSettings - Settings for all backendPools + BackendPoolsSettings *BackendPoolsSettings `json:"backendPoolsSettings,omitempty"` + // EnabledState - Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'EnabledStateEnabled', 'EnabledStateDisabled' + EnabledState EnabledState `json:"enabledState,omitempty"` +} + +// ValidateCustomDomainInput input of the custom domain to be validated for DNS mapping. +type ValidateCustomDomainInput struct { + // HostName - The host name of the custom domain. Must be a domain name. + HostName *string `json:"hostName,omitempty"` +} + +// ValidateCustomDomainOutput output of custom domain validation. +type ValidateCustomDomainOutput struct { + autorest.Response `json:"-"` + // CustomDomainValidated - READ-ONLY; Indicates whether the custom domain is valid or not. + CustomDomainValidated *bool `json:"customDomainValidated,omitempty"` + // Reason - READ-ONLY; The reason why the custom domain is not valid. + Reason *string `json:"reason,omitempty"` + // Message - READ-ONLY; Error message describing why the custom domain is not valid. + Message *string `json:"message,omitempty"` +} + +// WebApplicationFirewallPolicy defines web application firewall policy. +type WebApplicationFirewallPolicy struct { + autorest.Response `json:"-"` + // WebApplicationFirewallPolicyProperties - Properties of the web application firewall policy. + *WebApplicationFirewallPolicyProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,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 WebApplicationFirewallPolicy. +func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wafp.WebApplicationFirewallPolicyProperties != nil { + objectMap["properties"] = wafp.WebApplicationFirewallPolicyProperties + } + if wafp.Etag != nil { + objectMap["etag"] = wafp.Etag + } + 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 webApplicationFirewallPolicyProperties WebApplicationFirewallPolicyProperties + err = json.Unmarshal(*v, &webApplicationFirewallPolicyProperties) + if err != nil { + return err + } + wafp.WebApplicationFirewallPolicyProperties = &webApplicationFirewallPolicyProperties + } + 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 +} + +// WebApplicationFirewallPolicyList defines a list of WebApplicationFirewallPolicies. It contains a list of +// WebApplicationFirewallPolicy objects and a URL link to get the next set of results. +type WebApplicationFirewallPolicyList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group. + Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"` + // NextLink - URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// WebApplicationFirewallPolicyListIterator provides access to a complete listing of +// WebApplicationFirewallPolicy values. +type WebApplicationFirewallPolicyListIterator struct { + i int + page WebApplicationFirewallPolicyListPage +} + +// 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 *WebApplicationFirewallPolicyListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListIterator.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 *WebApplicationFirewallPolicyListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WebApplicationFirewallPolicyListIterator) 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 WebApplicationFirewallPolicyListIterator) Response() WebApplicationFirewallPolicyList { + 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 WebApplicationFirewallPolicyListIterator) Value() WebApplicationFirewallPolicy { + if !iter.page.NotDone() { + return WebApplicationFirewallPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WebApplicationFirewallPolicyListIterator type. +func NewWebApplicationFirewallPolicyListIterator(page WebApplicationFirewallPolicyListPage) WebApplicationFirewallPolicyListIterator { + return WebApplicationFirewallPolicyListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wafpl WebApplicationFirewallPolicyList) IsEmpty() bool { + return wafpl.Value == nil || len(*wafpl.Value) == 0 +} + +// webApplicationFirewallPolicyListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wafpl WebApplicationFirewallPolicyList) webApplicationFirewallPolicyListPreparer(ctx context.Context) (*http.Request, error) { + if wafpl.NextLink == nil || len(to.String(wafpl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wafpl.NextLink))) +} + +// WebApplicationFirewallPolicyListPage contains a page of WebApplicationFirewallPolicy values. +type WebApplicationFirewallPolicyListPage struct { + fn func(context.Context, WebApplicationFirewallPolicyList) (WebApplicationFirewallPolicyList, error) + wafpl WebApplicationFirewallPolicyList +} + +// 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 *WebApplicationFirewallPolicyListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wafpl) + if err != nil { + return err + } + page.wafpl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WebApplicationFirewallPolicyListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WebApplicationFirewallPolicyListPage) NotDone() bool { + return !page.wafpl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WebApplicationFirewallPolicyListPage) Response() WebApplicationFirewallPolicyList { + return page.wafpl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WebApplicationFirewallPolicyListPage) Values() []WebApplicationFirewallPolicy { + if page.wafpl.IsEmpty() { + return nil + } + return *page.wafpl.Value +} + +// Creates a new instance of the WebApplicationFirewallPolicyListPage type. +func NewWebApplicationFirewallPolicyListPage(getNextPage func(context.Context, WebApplicationFirewallPolicyList) (WebApplicationFirewallPolicyList, error)) WebApplicationFirewallPolicyListPage { + return WebApplicationFirewallPolicyListPage{fn: getNextPage} +} + +// WebApplicationFirewallPolicyProperties defines web application firewall policy properties. +type WebApplicationFirewallPolicyProperties struct { + // PolicySettings - Describes settings for the policy. + PolicySettings *PolicySettings `json:"policySettings,omitempty"` + // CustomRules - Describes custom rules inside the policy. + CustomRules *CustomRuleList `json:"customRules,omitempty"` + // ManagedRules - Describes managed rules inside the policy. + ManagedRules *ManagedRuleSetList `json:"managedRules,omitempty"` + // FrontendEndpointLinks - READ-ONLY; Describes Frontend Endpoints associated with this Web Application Firewall policy. + FrontendEndpointLinks *[]FrontendEndpointLink `json:"frontendEndpointLinks,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the policy. + ProvisioningState *string `json:"provisioningState,omitempty"` + // ResourceState - READ-ONLY; Possible values include: 'PolicyResourceStateCreating', 'PolicyResourceStateEnabling', 'PolicyResourceStateEnabled', 'PolicyResourceStateDisabling', 'PolicyResourceStateDisabled', 'PolicyResourceStateDeleting' + ResourceState PolicyResourceState `json:"resourceState,omitempty"` +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/networkexperimentprofiles.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/networkexperimentprofiles.go new file mode 100644 index 000000000000..a99a02c005a6 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/networkexperimentprofiles.go @@ -0,0 +1,628 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// NetworkExperimentProfilesClient is the frontDoor Client +type NetworkExperimentProfilesClient struct { + BaseClient +} + +// NewNetworkExperimentProfilesClient creates an instance of the NetworkExperimentProfilesClient client. +func NewNetworkExperimentProfilesClient(subscriptionID string) NetworkExperimentProfilesClient { + return NewNetworkExperimentProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewNetworkExperimentProfilesClientWithBaseURI creates an instance of the NetworkExperimentProfilesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewNetworkExperimentProfilesClientWithBaseURI(baseURI string, subscriptionID string) NetworkExperimentProfilesClient { + return NetworkExperimentProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate sends the create or update request. +// Parameters: +// profileName - the Profile identifier associated with the Tenant and Partner +// resourceGroupName - name of the Resource group within the Azure subscription. +// parameters - an Network Experiment Profile +func (client NetworkExperimentProfilesClient) CreateOrUpdate(ctx context.Context, profileName string, resourceGroupName string, parameters Profile) (result NetworkExperimentProfilesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkExperimentProfilesClient.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: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.NetworkExperimentProfilesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, profileName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client NetworkExperimentProfilesClient) CreateOrUpdatePreparer(ctx context.Context, profileName string, resourceGroupName string, parameters Profile) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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/NetworkExperimentProfiles/{profileName}", 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 NetworkExperimentProfilesClient) CreateOrUpdateSender(req *http.Request) (future NetworkExperimentProfilesCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client NetworkExperimentProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result Profile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete sends the delete request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +func (client NetworkExperimentProfilesClient) Delete(ctx context.Context, resourceGroupName string, profileName string) (result NetworkExperimentProfilesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkExperimentProfilesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.NetworkExperimentProfilesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, profileName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client NetworkExperimentProfilesClient) DeletePreparer(ctx context.Context, resourceGroupName string, profileName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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/NetworkExperimentProfiles/{profileName}", 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 NetworkExperimentProfilesClient) DeleteSender(req *http.Request) (future NetworkExperimentProfilesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client NetworkExperimentProfilesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get sends the get request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +func (client NetworkExperimentProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string) (result Profile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkExperimentProfilesClient.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.NetworkExperimentProfilesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, profileName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client NetworkExperimentProfilesClient) GetPreparer(ctx context.Context, resourceGroupName string, profileName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + 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/NetworkExperimentProfiles/{profileName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client NetworkExperimentProfilesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client NetworkExperimentProfilesClient) GetResponder(resp *http.Response) (result Profile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List sends the list request. +func (client NetworkExperimentProfilesClient) List(ctx context.Context) (result ProfileListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkExperimentProfilesClient.List") + defer func() { + sc := -1 + if result.pl.Response.Response != nil { + sc = result.pl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "List", resp, "Failure sending request") + return + } + + result.pl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client NetworkExperimentProfilesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/NetworkExperimentProfiles", 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 NetworkExperimentProfilesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client NetworkExperimentProfilesClient) ListResponder(resp *http.Response) (result ProfileList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client NetworkExperimentProfilesClient) listNextResults(ctx context.Context, lastResults ProfileList) (result ProfileList, err error) { + req, err := lastResults.profileListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "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, "frontdoor.NetworkExperimentProfilesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client NetworkExperimentProfilesClient) ListComplete(ctx context.Context) (result ProfileListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkExperimentProfilesClient.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 sends the list by resource group request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +func (client NetworkExperimentProfilesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ProfileListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkExperimentProfilesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.pl.Response.Response != nil { + sc = result.pl.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.NetworkExperimentProfilesClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.pl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.pl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client NetworkExperimentProfilesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + 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/NetworkExperimentProfiles", 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 NetworkExperimentProfilesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client NetworkExperimentProfilesClient) ListByResourceGroupResponder(resp *http.Response) (result ProfileList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client NetworkExperimentProfilesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ProfileList) (result ProfileList, err error) { + req, err := lastResults.profileListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "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, "frontdoor.NetworkExperimentProfilesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client NetworkExperimentProfilesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ProfileListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkExperimentProfilesClient.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 an NetworkExperimentProfiles +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +// parameters - the Profile Update Model +func (client NetworkExperimentProfilesClient) Update(ctx context.Context, resourceGroupName string, profileName string, parameters ProfileUpdateModel) (result NetworkExperimentProfilesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkExperimentProfilesClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.NetworkExperimentProfilesClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, profileName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.NetworkExperimentProfilesClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client NetworkExperimentProfilesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, profileName string, parameters ProfileUpdateModel) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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/NetworkExperimentProfiles/{profileName}", 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 NetworkExperimentProfilesClient) UpdateSender(req *http.Request) (future NetworkExperimentProfilesUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client NetworkExperimentProfilesClient) UpdateResponder(resp *http.Response) (result Profile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/policies.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/policies.go new file mode 100644 index 000000000000..30bc6ceaf79e --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/policies.go @@ -0,0 +1,434 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PoliciesClient is the frontDoor Client +type PoliciesClient struct { + BaseClient +} + +// NewPoliciesClient creates an instance of the PoliciesClient client. +func NewPoliciesClient(subscriptionID string) PoliciesClient { + return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient { + return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update policy with specified rule set name within a resource group. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// policyName - the name of the Web Application Firewall Policy. +// parameters - policy to be created. +func (client PoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (result PoliciesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyProperties.PolicySettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyProperties.PolicySettings.CustomBlockResponseBody", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyProperties.PolicySettings.CustomBlockResponseBody", Name: validation.Pattern, Rule: `^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$`, Chain: nil}}}, + }}, + }}}}}); err != nil { + return result, validation.NewError("frontdoor.PoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, policyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PoliciesClient) 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 = "2019-10-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/FrontDoorWebApplicationFirewallPolicies/{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 PoliciesClient) CreateOrUpdateSender(req *http.Request) (future PoliciesCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result WebApplicationFirewallPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes Policy +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// policyName - the name of the Web Application Firewall Policy. +func (client PoliciesClient) Delete(ctx context.Context, resourceGroupName string, policyName string) (result PoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.PoliciesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PoliciesClient) 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 = "2019-10-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/FrontDoorWebApplicationFirewallPolicies/{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 PoliciesClient) DeleteSender(req *http.Request) (future PoliciesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieve protection policy with specified name within a resource group. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// policyName - the name of the Web Application Firewall Policy. +func (client PoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.PoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PoliciesClient) 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 = "2019-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.Network/FrontDoorWebApplicationFirewallPolicies/{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 PoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PoliciesClient) GetResponder(resp *http.Response) (result WebApplicationFirewallPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all of the protection policies within a resource group. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +func (client PoliciesClient) List(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.List") + defer func() { + sc := -1 + if result.wafpl.Response.Response != nil { + sc = result.wafpl.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.PoliciesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wafpl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "List", resp, "Failure sending request") + return + } + + result.wafpl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PoliciesClient) 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 = "2019-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.Network/FrontDoorWebApplicationFirewallPolicies", 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 PoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PoliciesClient) ListResponder(resp *http.Response) (result WebApplicationFirewallPolicyList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client PoliciesClient) listNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyList) (result WebApplicationFirewallPolicyList, err error) { + req, err := lastResults.webApplicationFirewallPolicyListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "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, "frontdoor.PoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PoliciesClient) ListComplete(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.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 +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/preconfiguredendpoints.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/preconfiguredendpoints.go new file mode 100644 index 000000000000..4d1779ec21c1 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/preconfiguredendpoints.go @@ -0,0 +1,169 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PreconfiguredEndpointsClient is the frontDoor Client +type PreconfiguredEndpointsClient struct { + BaseClient +} + +// NewPreconfiguredEndpointsClient creates an instance of the PreconfiguredEndpointsClient client. +func NewPreconfiguredEndpointsClient(subscriptionID string) PreconfiguredEndpointsClient { + return NewPreconfiguredEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPreconfiguredEndpointsClientWithBaseURI creates an instance of the PreconfiguredEndpointsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewPreconfiguredEndpointsClientWithBaseURI(baseURI string, subscriptionID string) PreconfiguredEndpointsClient { + return PreconfiguredEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List sends the list request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +func (client PreconfiguredEndpointsClient) List(ctx context.Context, resourceGroupName string, profileName string) (result PreconfiguredEndpointListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PreconfiguredEndpointsClient.List") + defer func() { + sc := -1 + if result.pel.Response.Response != nil { + sc = result.pel.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.PreconfiguredEndpointsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, profileName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PreconfiguredEndpointsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pel.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.PreconfiguredEndpointsClient", "List", resp, "Failure sending request") + return + } + + result.pel, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PreconfiguredEndpointsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PreconfiguredEndpointsClient) ListPreparer(ctx context.Context, resourceGroupName string, profileName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + 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/NetworkExperimentProfiles/{profileName}/PreconfiguredEndpoints", 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 PreconfiguredEndpointsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PreconfiguredEndpointsClient) ListResponder(resp *http.Response) (result PreconfiguredEndpointList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client PreconfiguredEndpointsClient) listNextResults(ctx context.Context, lastResults PreconfiguredEndpointList) (result PreconfiguredEndpointList, err error) { + req, err := lastResults.preconfiguredEndpointListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.PreconfiguredEndpointsClient", "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, "frontdoor.PreconfiguredEndpointsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.PreconfiguredEndpointsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PreconfiguredEndpointsClient) ListComplete(ctx context.Context, resourceGroupName string, profileName string) (result PreconfiguredEndpointListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PreconfiguredEndpointsClient.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, profileName) + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/reports.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/reports.go new file mode 100644 index 000000000000..96081ac5c0b1 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/reports.go @@ -0,0 +1,254 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReportsClient is the frontDoor Client +type ReportsClient struct { + BaseClient +} + +// NewReportsClient creates an instance of the ReportsClient client. +func NewReportsClient(subscriptionID string) ReportsClient { + return NewReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { + return ReportsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetLatencyScorecards sends the get latency scorecards request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +// experimentName - the Experiment identifier associated with the Experiment +// aggregationInterval - the aggregation interval of the Latency Scorecard +// endDateTimeUTC - the end DateTime of the Latency Scorecard in UTC +// country - the country associated with the Latency Scorecard. Values are country ISO codes as specified here- +// https://www.iso.org/iso-3166-country-codes.html +func (client ReportsClient) GetLatencyScorecards(ctx context.Context, resourceGroupName string, profileName string, experimentName string, aggregationInterval LatencyScorecardAggregationInterval, endDateTimeUTC string, country string) (result LatencyScorecard, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.GetLatencyScorecards") + defer func() { + 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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: experimentName, + Constraints: []validation.Constraint{{Target: "experimentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.ReportsClient", "GetLatencyScorecards", err.Error()) + } + + req, err := client.GetLatencyScorecardsPreparer(ctx, resourceGroupName, profileName, experimentName, aggregationInterval, endDateTimeUTC, country) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ReportsClient", "GetLatencyScorecards", nil, "Failure preparing request") + return + } + + resp, err := client.GetLatencyScorecardsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.ReportsClient", "GetLatencyScorecards", resp, "Failure sending request") + return + } + + result, err = client.GetLatencyScorecardsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ReportsClient", "GetLatencyScorecards", resp, "Failure responding to request") + } + + return +} + +// GetLatencyScorecardsPreparer prepares the GetLatencyScorecards request. +func (client ReportsClient) GetLatencyScorecardsPreparer(ctx context.Context, resourceGroupName string, profileName string, experimentName string, aggregationInterval LatencyScorecardAggregationInterval, endDateTimeUTC string, country string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "experimentName": autorest.Encode("path", experimentName), + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + queryParameters := map[string]interface{}{ + "aggregationInterval": autorest.Encode("query", aggregationInterval), + "api-version": APIVersion, + } + if len(endDateTimeUTC) > 0 { + queryParameters["endDateTimeUTC"] = autorest.Encode("query", endDateTimeUTC) + } + if len(country) > 0 { + queryParameters["country"] = autorest.Encode("query", country) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/LatencyScorecard", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetLatencyScorecardsSender sends the GetLatencyScorecards request. The method will close the +// http.Response Body if it receives an error. +func (client ReportsClient) GetLatencyScorecardsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetLatencyScorecardsResponder handles the response to the GetLatencyScorecards request. The method always +// closes the http.Response Body. +func (client ReportsClient) GetLatencyScorecardsResponder(resp *http.Response) (result LatencyScorecard, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTimeseries sends the get timeseries request. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// profileName - the Profile identifier associated with the Tenant and Partner +// experimentName - the Experiment identifier associated with the Experiment +// startDateTimeUTC - the start DateTime of the Timeseries in UTC +// endDateTimeUTC - the end DateTime of the Timeseries in UTC +// aggregationInterval - the aggregation interval of the Timeseries +// timeseriesType - the type of Timeseries +// endpoint - the specific endpoint +// country - the country associated with the Timeseries. Values are country ISO codes as specified here- +// https://www.iso.org/iso-3166-country-codes.html +func (client ReportsClient) GetTimeseries(ctx context.Context, resourceGroupName string, profileName string, experimentName string, startDateTimeUTC date.Time, endDateTimeUTC date.Time, aggregationInterval TimeseriesAggregationInterval, timeseriesType TimeseriesType, endpoint string, country string) (result Timeseries, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.GetTimeseries") + defer func() { + 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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: profileName, + Constraints: []validation.Constraint{{Target: "profileName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: experimentName, + Constraints: []validation.Constraint{{Target: "experimentName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.ReportsClient", "GetTimeseries", err.Error()) + } + + req, err := client.GetTimeseriesPreparer(ctx, resourceGroupName, profileName, experimentName, startDateTimeUTC, endDateTimeUTC, aggregationInterval, timeseriesType, endpoint, country) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ReportsClient", "GetTimeseries", nil, "Failure preparing request") + return + } + + resp, err := client.GetTimeseriesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.ReportsClient", "GetTimeseries", resp, "Failure sending request") + return + } + + result, err = client.GetTimeseriesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.ReportsClient", "GetTimeseries", resp, "Failure responding to request") + } + + return +} + +// GetTimeseriesPreparer prepares the GetTimeseries request. +func (client ReportsClient) GetTimeseriesPreparer(ctx context.Context, resourceGroupName string, profileName string, experimentName string, startDateTimeUTC date.Time, endDateTimeUTC date.Time, aggregationInterval TimeseriesAggregationInterval, timeseriesType TimeseriesType, endpoint string, country string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "experimentName": autorest.Encode("path", experimentName), + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + queryParameters := map[string]interface{}{ + "aggregationInterval": autorest.Encode("query", aggregationInterval), + "api-version": APIVersion, + "endDateTimeUTC": autorest.Encode("query", endDateTimeUTC), + "startDateTimeUTC": autorest.Encode("query", startDateTimeUTC), + "timeseriesType": autorest.Encode("query", timeseriesType), + } + if len(endpoint) > 0 { + queryParameters["endpoint"] = autorest.Encode("query", endpoint) + } + if len(country) > 0 { + queryParameters["country"] = autorest.Encode("query", country) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}/Experiments/{experimentName}/Timeseries", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetTimeseriesSender sends the GetTimeseries request. The method will close the +// http.Response Body if it receives an error. +func (client ReportsClient) GetTimeseriesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetTimeseriesResponder handles the response to the GetTimeseries request. The method always +// closes the http.Response Body. +func (client ReportsClient) GetTimeseriesResponder(resp *http.Response) (result Timeseries, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/rulesengines.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/rulesengines.go new file mode 100644 index 000000000000..11f80224e299 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/rulesengines.go @@ -0,0 +1,461 @@ +package frontdoor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RulesEnginesClient is the frontDoor Client +type RulesEnginesClient struct { + BaseClient +} + +// NewRulesEnginesClient creates an instance of the RulesEnginesClient client. +func NewRulesEnginesClient(subscriptionID string) RulesEnginesClient { + return NewRulesEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRulesEnginesClientWithBaseURI creates an instance of the RulesEnginesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewRulesEnginesClientWithBaseURI(baseURI string, subscriptionID string) RulesEnginesClient { + return RulesEnginesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a new Rules Engine Configuration with the specified name within the specified Front Door. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// rulesEngineName - name of the Rules Engine which is unique within the Front Door. +// rulesEngineParameters - rules Engine Configuration properties needed to create a new Rules Engine +// Configuration. +func (client RulesEnginesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, rulesEngineParameters RulesEngine) (result RulesEnginesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RulesEnginesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: rulesEngineName, + Constraints: []validation.Constraint{{Target: "rulesEngineName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "rulesEngineName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "rulesEngineName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.RulesEnginesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, frontDoorName, rulesEngineName, rulesEngineParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client RulesEnginesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string, rulesEngineParameters RulesEngine) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "rulesEngineName": autorest.Encode("path", rulesEngineName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + rulesEngineParameters.Name = nil + rulesEngineParameters.Type = nil + rulesEngineParameters.ID = 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/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}", pathParameters), + autorest.WithJSON(rulesEngineParameters), + 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 RulesEnginesClient) CreateOrUpdateSender(req *http.Request) (future RulesEnginesCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RulesEnginesClient) CreateOrUpdateResponder(resp *http.Response) (result RulesEngine, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an existing Rules Engine Configuration with the specified parameters. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// rulesEngineName - name of the Rules Engine which is unique within the Front Door. +func (client RulesEnginesClient) Delete(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string) (result RulesEnginesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RulesEnginesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: rulesEngineName, + Constraints: []validation.Constraint{{Target: "rulesEngineName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "rulesEngineName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "rulesEngineName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.RulesEnginesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, frontDoorName, rulesEngineName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RulesEnginesClient) DeletePreparer(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "rulesEngineName": autorest.Encode("path", rulesEngineName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}", 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 RulesEnginesClient) DeleteSender(req *http.Request) (future RulesEnginesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RulesEnginesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a Rules Engine Configuration with the specified name within the specified Front Door. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +// rulesEngineName - name of the Rules Engine which is unique within the Front Door. +func (client RulesEnginesClient) Get(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string) (result RulesEngine, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RulesEnginesClient.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}, + {TargetValue: rulesEngineName, + Constraints: []validation.Constraint{{Target: "rulesEngineName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "rulesEngineName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "rulesEngineName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.RulesEnginesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, frontDoorName, rulesEngineName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client RulesEnginesClient) GetPreparer(ctx context.Context, resourceGroupName string, frontDoorName string, rulesEngineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "rulesEngineName": autorest.Encode("path", rulesEngineName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.Network/frontDoors/{frontDoorName}/rulesEngines/{rulesEngineName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client RulesEnginesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RulesEnginesClient) GetResponder(resp *http.Response) (result RulesEngine, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByFrontDoor lists all of the Rules Engine Configurations within a Front Door. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// frontDoorName - name of the Front Door which is globally unique. +func (client RulesEnginesClient) ListByFrontDoor(ctx context.Context, resourceGroupName string, frontDoorName string) (result RulesEngineListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RulesEnginesClient.ListByFrontDoor") + defer func() { + sc := -1 + if result.relr.Response.Response != nil { + sc = result.relr.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: 80, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_\-\(\)\.]*[^\.]$`, Chain: nil}}}, + {TargetValue: frontDoorName, + Constraints: []validation.Constraint{{Target: "frontDoorName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "frontDoorName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "frontDoorName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("frontdoor.RulesEnginesClient", "ListByFrontDoor", err.Error()) + } + + result.fn = client.listByFrontDoorNextResults + req, err := client.ListByFrontDoorPreparer(ctx, resourceGroupName, frontDoorName) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "ListByFrontDoor", nil, "Failure preparing request") + return + } + + resp, err := client.ListByFrontDoorSender(req) + if err != nil { + result.relr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "ListByFrontDoor", resp, "Failure sending request") + return + } + + result.relr, err = client.ListByFrontDoorResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "ListByFrontDoor", resp, "Failure responding to request") + } + + return +} + +// ListByFrontDoorPreparer prepares the ListByFrontDoor request. +func (client RulesEnginesClient) ListByFrontDoorPreparer(ctx context.Context, resourceGroupName string, frontDoorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontDoorName": autorest.Encode("path", frontDoorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + 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.Network/frontDoors/{frontDoorName}/rulesEngines", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByFrontDoorSender sends the ListByFrontDoor request. The method will close the +// http.Response Body if it receives an error. +func (client RulesEnginesClient) ListByFrontDoorSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByFrontDoorResponder handles the response to the ListByFrontDoor request. The method always +// closes the http.Response Body. +func (client RulesEnginesClient) ListByFrontDoorResponder(resp *http.Response) (result RulesEngineListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByFrontDoorNextResults retrieves the next set of results, if any. +func (client RulesEnginesClient) listByFrontDoorNextResults(ctx context.Context, lastResults RulesEngineListResult) (result RulesEngineListResult, err error) { + req, err := lastResults.rulesEngineListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "listByFrontDoorNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByFrontDoorSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "listByFrontDoorNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByFrontDoorResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "frontdoor.RulesEnginesClient", "listByFrontDoorNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByFrontDoorComplete enumerates all values, automatically crossing page boundaries as required. +func (client RulesEnginesClient) ListByFrontDoorComplete(ctx context.Context, resourceGroupName string, frontDoorName string) (result RulesEngineListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RulesEnginesClient.ListByFrontDoor") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByFrontDoor(ctx, resourceGroupName, frontDoorName) + return +} diff --git a/services/frontdoor/mgmt/2020-01-01/frontdoor/version.go b/services/frontdoor/mgmt/2020-01-01/frontdoor/version.go new file mode 100644 index 000000000000..a72a187573d3 --- /dev/null +++ b/services/frontdoor/mgmt/2020-01-01/frontdoor/version.go @@ -0,0 +1,30 @@ +package frontdoor + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " frontdoor/2020-01-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/graphrbac/1.6/graphrbac/applications.go b/services/graphrbac/1.6/graphrbac/applications.go index fab7676fa8e3..17becd8be761 100644 --- a/services/graphrbac/1.6/graphrbac/applications.go +++ b/services/graphrbac/1.6/graphrbac/applications.go @@ -37,7 +37,8 @@ func NewApplicationsClient(tenantID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, tenantID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/graphrbac/1.6/graphrbac/client.go b/services/graphrbac/1.6/graphrbac/client.go index 6f46fe18bf90..e22971a0fc5d 100644 --- a/services/graphrbac/1.6/graphrbac/client.go +++ b/services/graphrbac/1.6/graphrbac/client.go @@ -41,7 +41,8 @@ func New(tenantID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, tenantID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, tenantID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/graphrbac/1.6/graphrbac/deletedapplications.go b/services/graphrbac/1.6/graphrbac/deletedapplications.go index fe3b2da5dbc3..6bda5ecb9c91 100644 --- a/services/graphrbac/1.6/graphrbac/deletedapplications.go +++ b/services/graphrbac/1.6/graphrbac/deletedapplications.go @@ -36,7 +36,9 @@ func NewDeletedApplicationsClient(tenantID string) DeletedApplicationsClient { return NewDeletedApplicationsClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewDeletedApplicationsClientWithBaseURI creates an instance of the DeletedApplicationsClient client. +// NewDeletedApplicationsClientWithBaseURI creates an instance of the DeletedApplicationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeletedApplicationsClientWithBaseURI(baseURI string, tenantID string) DeletedApplicationsClient { return DeletedApplicationsClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/graphrbac/1.6/graphrbac/domains.go b/services/graphrbac/1.6/graphrbac/domains.go index 93c6cac1e063..02765147c3d6 100644 --- a/services/graphrbac/1.6/graphrbac/domains.go +++ b/services/graphrbac/1.6/graphrbac/domains.go @@ -35,7 +35,8 @@ func NewDomainsClient(tenantID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, tenantID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/graphrbac/1.6/graphrbac/graphrbacapi/interfaces.go b/services/graphrbac/1.6/graphrbac/graphrbacapi/interfaces.go index 6b16b91d0c94..526e3d64019d 100644 --- a/services/graphrbac/1.6/graphrbac/graphrbacapi/interfaces.go +++ b/services/graphrbac/1.6/graphrbac/graphrbacapi/interfaces.go @@ -27,6 +27,7 @@ import ( type SignedInUserClientAPI interface { Get(ctx context.Context) (result graphrbac.User, err error) ListOwnedObjects(ctx context.Context) (result graphrbac.DirectoryObjectListResultPage, err error) + ListOwnedObjectsComplete(ctx context.Context) (result graphrbac.DirectoryObjectListResultIterator, err error) ListOwnedObjectsNext(ctx context.Context, nextLink string) (result graphrbac.DirectoryObjectListResult, err error) } @@ -40,9 +41,11 @@ type ApplicationsClientAPI interface { Get(ctx context.Context, applicationObjectID string) (result graphrbac.Application, err error) GetServicePrincipalsIDByAppID(ctx context.Context, applicationID string) (result graphrbac.ServicePrincipalObjectResult, err error) List(ctx context.Context, filter string) (result graphrbac.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result graphrbac.ApplicationListResultIterator, err error) ListKeyCredentials(ctx context.Context, applicationObjectID string) (result graphrbac.KeyCredentialListResult, err error) ListNext(ctx context.Context, nextLink string) (result graphrbac.ApplicationListResult, err error) ListOwners(ctx context.Context, applicationObjectID string) (result graphrbac.DirectoryObjectListResultPage, err error) + ListOwnersComplete(ctx context.Context, applicationObjectID string) (result graphrbac.DirectoryObjectListResultIterator, err error) ListPasswordCredentials(ctx context.Context, applicationObjectID string) (result graphrbac.PasswordCredentialListResult, err error) Patch(ctx context.Context, applicationObjectID string, parameters graphrbac.ApplicationUpdateParameters) (result autorest.Response, err error) RemoveOwner(ctx context.Context, applicationObjectID string, ownerObjectID string) (result autorest.Response, err error) @@ -56,6 +59,7 @@ var _ ApplicationsClientAPI = (*graphrbac.ApplicationsClient)(nil) type DeletedApplicationsClientAPI interface { HardDelete(ctx context.Context, applicationObjectID string) (result autorest.Response, err error) List(ctx context.Context, filter string) (result graphrbac.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result graphrbac.ApplicationListResultIterator, err error) ListNext(ctx context.Context, nextLink string) (result graphrbac.ApplicationListResult, err error) Restore(ctx context.Context, objectID string) (result graphrbac.Application, err error) } @@ -70,12 +74,15 @@ type GroupsClientAPI interface { Delete(ctx context.Context, objectID string) (result autorest.Response, err error) Get(ctx context.Context, objectID string) (result graphrbac.ADGroup, err error) GetGroupMembers(ctx context.Context, objectID string) (result graphrbac.DirectoryObjectListResultPage, err error) + GetGroupMembersComplete(ctx context.Context, objectID string) (result graphrbac.DirectoryObjectListResultIterator, err error) GetGroupMembersNext(ctx context.Context, nextLink string) (result graphrbac.DirectoryObjectListResult, err error) GetMemberGroups(ctx context.Context, objectID string, parameters graphrbac.GroupGetMemberGroupsParameters) (result graphrbac.GroupGetMemberGroupsResult, err error) IsMemberOf(ctx context.Context, parameters graphrbac.CheckGroupMembershipParameters) (result graphrbac.CheckGroupMembershipResult, err error) List(ctx context.Context, filter string) (result graphrbac.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result graphrbac.GroupListResultIterator, err error) ListNext(ctx context.Context, nextLink string) (result graphrbac.GroupListResult, err error) ListOwners(ctx context.Context, objectID string) (result graphrbac.DirectoryObjectListResultPage, err error) + ListOwnersComplete(ctx context.Context, objectID string) (result graphrbac.DirectoryObjectListResultIterator, err error) RemoveMember(ctx context.Context, groupObjectID string, memberObjectID string) (result autorest.Response, err error) RemoveOwner(ctx context.Context, objectID string, ownerObjectID string) (result autorest.Response, err error) } @@ -88,9 +95,11 @@ type ServicePrincipalsClientAPI interface { Delete(ctx context.Context, objectID string) (result autorest.Response, err error) Get(ctx context.Context, objectID string) (result graphrbac.ServicePrincipal, err error) List(ctx context.Context, filter string) (result graphrbac.ServicePrincipalListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result graphrbac.ServicePrincipalListResultIterator, err error) ListKeyCredentials(ctx context.Context, objectID string) (result graphrbac.KeyCredentialListResult, err error) ListNext(ctx context.Context, nextLink string) (result graphrbac.ServicePrincipalListResult, err error) ListOwners(ctx context.Context, objectID string) (result graphrbac.DirectoryObjectListResultPage, err error) + ListOwnersComplete(ctx context.Context, objectID string) (result graphrbac.DirectoryObjectListResultIterator, err error) ListPasswordCredentials(ctx context.Context, objectID string) (result graphrbac.PasswordCredentialListResult, err error) Update(ctx context.Context, objectID string, parameters graphrbac.ServicePrincipalUpdateParameters) (result autorest.Response, err error) UpdateKeyCredentials(ctx context.Context, objectID string, parameters graphrbac.KeyCredentialsUpdateParameters) (result autorest.Response, err error) @@ -106,6 +115,7 @@ type UsersClientAPI interface { Get(ctx context.Context, upnOrObjectID string) (result graphrbac.User, err error) GetMemberGroups(ctx context.Context, objectID string, parameters graphrbac.UserGetMemberGroupsParameters) (result graphrbac.UserGetMemberGroupsResult, err error) List(ctx context.Context, filter string) (result graphrbac.UserListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result graphrbac.UserListResultIterator, err error) ListNext(ctx context.Context, nextLink string) (result graphrbac.UserListResult, err error) Update(ctx context.Context, upnOrObjectID string, parameters graphrbac.UserUpdateParameters) (result autorest.Response, err error) } @@ -115,6 +125,7 @@ var _ UsersClientAPI = (*graphrbac.UsersClient)(nil) // ObjectsClientAPI contains the set of methods on the ObjectsClient type. type ObjectsClientAPI interface { GetObjectsByObjectIds(ctx context.Context, parameters graphrbac.GetObjectsParameters) (result graphrbac.DirectoryObjectListResultPage, err error) + GetObjectsByObjectIdsComplete(ctx context.Context, parameters graphrbac.GetObjectsParameters) (result graphrbac.DirectoryObjectListResultIterator, err error) GetObjectsByObjectIdsNext(ctx context.Context, nextLink string) (result graphrbac.DirectoryObjectListResult, err error) } @@ -133,6 +144,7 @@ type OAuth2PermissionGrantClientAPI interface { Create(ctx context.Context, body *graphrbac.OAuth2PermissionGrant) (result graphrbac.OAuth2PermissionGrant, err error) Delete(ctx context.Context, objectID string) (result autorest.Response, err error) List(ctx context.Context, filter string) (result graphrbac.OAuth2PermissionGrantListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result graphrbac.OAuth2PermissionGrantListResultIterator, err error) ListNext(ctx context.Context, nextLink string) (result graphrbac.OAuth2PermissionGrantListResult, err error) } diff --git a/services/graphrbac/1.6/graphrbac/groups.go b/services/graphrbac/1.6/graphrbac/groups.go index 4ed37e94f0a8..19c13e6efdb0 100644 --- a/services/graphrbac/1.6/graphrbac/groups.go +++ b/services/graphrbac/1.6/graphrbac/groups.go @@ -37,7 +37,8 @@ func NewGroupsClient(tenantID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, tenantID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go b/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go index 04ddbb3e89c4..a1a28dd4a632 100644 --- a/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go +++ b/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go @@ -36,7 +36,9 @@ func NewOAuth2PermissionGrantClient(tenantID string) OAuth2PermissionGrantClient return NewOAuth2PermissionGrantClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewOAuth2PermissionGrantClientWithBaseURI creates an instance of the OAuth2PermissionGrantClient client. +// NewOAuth2PermissionGrantClientWithBaseURI creates an instance of the OAuth2PermissionGrantClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewOAuth2PermissionGrantClientWithBaseURI(baseURI string, tenantID string) OAuth2PermissionGrantClient { return OAuth2PermissionGrantClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/graphrbac/1.6/graphrbac/objects.go b/services/graphrbac/1.6/graphrbac/objects.go index 3f6ca5c4bfc1..a6c1bb845718 100644 --- a/services/graphrbac/1.6/graphrbac/objects.go +++ b/services/graphrbac/1.6/graphrbac/objects.go @@ -36,7 +36,8 @@ func NewObjectsClient(tenantID string) ObjectsClient { return NewObjectsClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewObjectsClientWithBaseURI creates an instance of the ObjectsClient client. +// NewObjectsClientWithBaseURI creates an instance of the ObjectsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewObjectsClientWithBaseURI(baseURI string, tenantID string) ObjectsClient { return ObjectsClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/graphrbac/1.6/graphrbac/serviceprincipals.go b/services/graphrbac/1.6/graphrbac/serviceprincipals.go index 45099830b53b..4b862ce93ffc 100644 --- a/services/graphrbac/1.6/graphrbac/serviceprincipals.go +++ b/services/graphrbac/1.6/graphrbac/serviceprincipals.go @@ -37,7 +37,9 @@ func NewServicePrincipalsClient(tenantID string) ServicePrincipalsClient { return NewServicePrincipalsClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewServicePrincipalsClientWithBaseURI creates an instance of the ServicePrincipalsClient client. +// NewServicePrincipalsClientWithBaseURI creates an instance of the ServicePrincipalsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServicePrincipalsClientWithBaseURI(baseURI string, tenantID string) ServicePrincipalsClient { return ServicePrincipalsClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/graphrbac/1.6/graphrbac/signedinuser.go b/services/graphrbac/1.6/graphrbac/signedinuser.go index 057658eefd6b..2fb8e30e3402 100644 --- a/services/graphrbac/1.6/graphrbac/signedinuser.go +++ b/services/graphrbac/1.6/graphrbac/signedinuser.go @@ -36,7 +36,8 @@ func NewSignedInUserClient(tenantID string) SignedInUserClient { return NewSignedInUserClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewSignedInUserClientWithBaseURI creates an instance of the SignedInUserClient client. +// NewSignedInUserClientWithBaseURI creates an instance of the SignedInUserClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignedInUserClientWithBaseURI(baseURI string, tenantID string) SignedInUserClient { return SignedInUserClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/graphrbac/1.6/graphrbac/users.go b/services/graphrbac/1.6/graphrbac/users.go index 3c688fe7ba07..bb2913c31125 100644 --- a/services/graphrbac/1.6/graphrbac/users.go +++ b/services/graphrbac/1.6/graphrbac/users.go @@ -37,7 +37,8 @@ func NewUsersClient(tenantID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, tenantID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, tenantID)} } diff --git a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/client.go b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/client.go index c2bd63627422..2f8fa6b64fda 100644 --- a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/client.go +++ b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/healthcareapisapi/interfaces.go b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/healthcareapisapi/interfaces.go index 1d06a54548b2..90c05f4b0edc 100644 --- a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/healthcareapisapi/interfaces.go +++ b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/healthcareapisapi/interfaces.go @@ -29,7 +29,9 @@ type ServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result healthcareapis.ServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result healthcareapis.ServicesDescription, err error) List(ctx context.Context) (result healthcareapis.ServicesDescriptionListResultPage, err error) + ListComplete(ctx context.Context) (result healthcareapis.ServicesDescriptionListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result healthcareapis.ServicesDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result healthcareapis.ServicesDescriptionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, servicePatchDescription healthcareapis.ServicesPatchDescription) (result healthcareapis.ServicesUpdateFuture, err error) } @@ -38,6 +40,7 @@ var _ ServicesClientAPI = (*healthcareapis.ServicesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result healthcareapis.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result healthcareapis.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*healthcareapis.OperationsClient)(nil) diff --git a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/models.go b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/models.go index 23c268b77377..38d2939b915d 100644 --- a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/models.go +++ b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/models.go @@ -47,6 +47,21 @@ func PossibleKindValues() []Kind { return []Kind{Fhir, FhirR4, FhirStu3} } +// ManagedServiceIdentityType enumerates the values for managed service identity type. +type ManagedServiceIdentityType string + +const ( + // None ... + None ManagedServiceIdentityType = "None" + // SystemAssigned ... + SystemAssigned ManagedServiceIdentityType = "SystemAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns an array of possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{None, SystemAssigned} +} + // OperationResultStatus enumerates the values for operation result status. type OperationResultStatus string @@ -335,6 +350,8 @@ type Resource struct { Tags map[string]*string `json:"tags"` // Etag - An etag associated with the resource, used for optimistic concurrency when editing it. Etag *string `json:"etag,omitempty"` + // Identity - Setting indicating whether the service has a managed identity associated with it. + Identity *ResourceIdentity `json:"identity,omitempty"` } // MarshalJSON is the custom marshaler for Resource. @@ -352,9 +369,18 @@ func (r Resource) MarshalJSON() ([]byte, error) { if r.Etag != nil { objectMap["etag"] = r.Etag } + if r.Identity != nil { + objectMap["identity"] = r.Identity + } return json.Marshal(objectMap) } +// ResourceIdentity setting indicating whether the service has a managed identity associated with it. +type ResourceIdentity struct { + // Type - Type of identity being specified, currently SystemAssigned and None are allowed. Possible values include: 'SystemAssigned', 'None' + Type ManagedServiceIdentityType `json:"type,omitempty"` +} + // ServiceAccessPolicyEntry an access policy entry. type ServiceAccessPolicyEntry struct { // ObjectID - An Azure AD object ID (User or Apps) that is allowed access to the FHIR service. @@ -462,6 +488,8 @@ type ServicesDescription struct { Tags map[string]*string `json:"tags"` // Etag - An etag associated with the resource, used for optimistic concurrency when editing it. Etag *string `json:"etag,omitempty"` + // Identity - Setting indicating whether the service has a managed identity associated with it. + Identity *ResourceIdentity `json:"identity,omitempty"` } // MarshalJSON is the custom marshaler for ServicesDescription. @@ -482,6 +510,9 @@ func (sd ServicesDescription) MarshalJSON() ([]byte, error) { if sd.Etag != nil { objectMap["etag"] = sd.Etag } + if sd.Identity != nil { + objectMap["identity"] = sd.Identity + } return json.Marshal(objectMap) } diff --git a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/operationresults.go b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/operationresults.go index 10f2174c33df..772cd7fd3b6f 100644 --- a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/operationresults.go +++ b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/operationresults.go @@ -35,7 +35,9 @@ func NewOperationResultsClient(subscriptionID string) OperationResultsClient { return NewOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client. +// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) OperationResultsClient { return OperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/operations.go b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/operations.go index 5acb766ce32c..c8512e997aca 100644 --- a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/operations.go +++ b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/services.go b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/services.go index 347775a60469..15db962f7f97 100644 --- a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/services.go +++ b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/client.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/client.go index 4a246f8fb3d7..d64d6f530d5b 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/client.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datamanagers.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datamanagers.go index 02f72e604488..c0dcdfc8b8f6 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datamanagers.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datamanagers.go @@ -36,7 +36,8 @@ func NewDataManagersClient(subscriptionID string) DataManagersClient { return NewDataManagersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataManagersClientWithBaseURI creates an instance of the DataManagersClient client. +// NewDataManagersClientWithBaseURI creates an instance of the DataManagersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataManagersClientWithBaseURI(baseURI string, subscriptionID string) DataManagersClient { return DataManagersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/dataservices.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/dataservices.go index 7c6a2978bf0a..78ed1d15b63c 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/dataservices.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/dataservices.go @@ -36,7 +36,8 @@ func NewDataServicesClient(subscriptionID string) DataServicesClient { return NewDataServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataServicesClientWithBaseURI creates an instance of the DataServicesClient client. +// NewDataServicesClientWithBaseURI creates an instance of the DataServicesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataServicesClientWithBaseURI(baseURI string, subscriptionID string) DataServicesClient { return DataServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datastores.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datastores.go index 72be33ec0740..b5298f801af7 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datastores.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datastores.go @@ -36,7 +36,8 @@ func NewDataStoresClient(subscriptionID string) DataStoresClient { return NewDataStoresClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataStoresClientWithBaseURI creates an instance of the DataStoresClient client. +// NewDataStoresClientWithBaseURI creates an instance of the DataStoresClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataStoresClientWithBaseURI(baseURI string, subscriptionID string) DataStoresClient { return DataStoresClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datastoretypes.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datastoretypes.go index a3c31c88e23e..3e757882c3dd 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datastoretypes.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/datastoretypes.go @@ -36,7 +36,8 @@ func NewDataStoreTypesClient(subscriptionID string) DataStoreTypesClient { return NewDataStoreTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataStoreTypesClientWithBaseURI creates an instance of the DataStoreTypesClient client. +// NewDataStoreTypesClientWithBaseURI creates an instance of the DataStoreTypesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataStoreTypesClientWithBaseURI(baseURI string, subscriptionID string) DataStoreTypesClient { return DataStoreTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/hybriddataapi/interfaces.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/hybriddataapi/interfaces.go index 7e2d9274a251..c6f1372e651d 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/hybriddataapi/interfaces.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/hybriddataapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result hybriddata.AvailableProviderOperationsPage, err error) + ListComplete(ctx context.Context) (result hybriddata.AvailableProviderOperationsIterator, err error) } var _ OperationsClientAPI = (*hybriddata.OperationsClient)(nil) @@ -45,6 +46,7 @@ var _ DataManagersClientAPI = (*hybriddata.DataManagersClient)(nil) type DataServicesClientAPI interface { Get(ctx context.Context, dataServiceName string, resourceGroupName string, dataManagerName string) (result hybriddata.DataService, err error) ListByDataManager(ctx context.Context, resourceGroupName string, dataManagerName string) (result hybriddata.DataServiceListPage, err error) + ListByDataManagerComplete(ctx context.Context, resourceGroupName string, dataManagerName string) (result hybriddata.DataServiceListIterator, err error) } var _ DataServicesClientAPI = (*hybriddata.DataServicesClient)(nil) @@ -55,7 +57,9 @@ type JobDefinitionsClientAPI interface { Delete(ctx context.Context, dataServiceName string, jobDefinitionName string, resourceGroupName string, dataManagerName string) (result hybriddata.JobDefinitionsDeleteFuture, err error) Get(ctx context.Context, dataServiceName string, jobDefinitionName string, resourceGroupName string, dataManagerName string) (result hybriddata.JobDefinition, err error) ListByDataManager(ctx context.Context, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobDefinitionListPage, err error) + ListByDataManagerComplete(ctx context.Context, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobDefinitionListIterator, err error) ListByDataService(ctx context.Context, dataServiceName string, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobDefinitionListPage, err error) + ListByDataServiceComplete(ctx context.Context, dataServiceName string, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobDefinitionListIterator, err error) Run(ctx context.Context, dataServiceName string, jobDefinitionName string, runParameters hybriddata.RunParameters, resourceGroupName string, dataManagerName string) (result hybriddata.JobDefinitionsRunFuture, err error) } @@ -66,8 +70,11 @@ type JobsClientAPI interface { Cancel(ctx context.Context, dataServiceName string, jobDefinitionName string, jobID string, resourceGroupName string, dataManagerName string) (result hybriddata.JobsCancelFuture, err error) Get(ctx context.Context, dataServiceName string, jobDefinitionName string, jobID string, resourceGroupName string, dataManagerName string, expand string) (result hybriddata.Job, err error) ListByDataManager(ctx context.Context, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobListPage, err error) + ListByDataManagerComplete(ctx context.Context, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobListIterator, err error) ListByDataService(ctx context.Context, dataServiceName string, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobListPage, err error) + ListByDataServiceComplete(ctx context.Context, dataServiceName string, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobListIterator, err error) ListByJobDefinition(ctx context.Context, dataServiceName string, jobDefinitionName string, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobListPage, err error) + ListByJobDefinitionComplete(ctx context.Context, dataServiceName string, jobDefinitionName string, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.JobListIterator, err error) Resume(ctx context.Context, dataServiceName string, jobDefinitionName string, jobID string, resourceGroupName string, dataManagerName string) (result hybriddata.JobsResumeFuture, err error) } @@ -79,6 +86,7 @@ type DataStoresClientAPI interface { Delete(ctx context.Context, dataStoreName string, resourceGroupName string, dataManagerName string) (result hybriddata.DataStoresDeleteFuture, err error) Get(ctx context.Context, dataStoreName string, resourceGroupName string, dataManagerName string) (result hybriddata.DataStore, err error) ListByDataManager(ctx context.Context, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.DataStoreListPage, err error) + ListByDataManagerComplete(ctx context.Context, resourceGroupName string, dataManagerName string, filter string) (result hybriddata.DataStoreListIterator, err error) } var _ DataStoresClientAPI = (*hybriddata.DataStoresClient)(nil) @@ -87,6 +95,7 @@ var _ DataStoresClientAPI = (*hybriddata.DataStoresClient)(nil) type DataStoreTypesClientAPI interface { Get(ctx context.Context, dataStoreTypeName string, resourceGroupName string, dataManagerName string) (result hybriddata.DataStoreType, err error) ListByDataManager(ctx context.Context, resourceGroupName string, dataManagerName string) (result hybriddata.DataStoreTypeListPage, err error) + ListByDataManagerComplete(ctx context.Context, resourceGroupName string, dataManagerName string) (result hybriddata.DataStoreTypeListIterator, err error) } var _ DataStoreTypesClientAPI = (*hybriddata.DataStoreTypesClient)(nil) @@ -95,6 +104,7 @@ var _ DataStoreTypesClientAPI = (*hybriddata.DataStoreTypesClient)(nil) type PublicKeysClientAPI interface { Get(ctx context.Context, publicKeyName string, resourceGroupName string, dataManagerName string) (result hybriddata.PublicKey, err error) ListByDataManager(ctx context.Context, resourceGroupName string, dataManagerName string) (result hybriddata.PublicKeyListPage, err error) + ListByDataManagerComplete(ctx context.Context, resourceGroupName string, dataManagerName string) (result hybriddata.PublicKeyListIterator, err error) } var _ PublicKeysClientAPI = (*hybriddata.PublicKeysClient)(nil) diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/jobdefinitions.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/jobdefinitions.go index ababe44da543..bc99179805bc 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/jobdefinitions.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/jobdefinitions.go @@ -36,7 +36,8 @@ func NewJobDefinitionsClient(subscriptionID string) JobDefinitionsClient { return NewJobDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobDefinitionsClientWithBaseURI creates an instance of the JobDefinitionsClient client. +// NewJobDefinitionsClientWithBaseURI creates an instance of the JobDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) JobDefinitionsClient { return JobDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/jobs.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/jobs.go index 2b9393a9be4b..2869369accba 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/jobs.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/operations.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/operations.go index 73a862828a9c..9a832cb0edec 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/operations.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/publickeys.go b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/publickeys.go index 69ea1878d69e..055a1937c803 100644 --- a/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/publickeys.go +++ b/services/hybriddatamanager/mgmt/2016-06-01/hybriddata/publickeys.go @@ -36,7 +36,8 @@ func NewPublicKeysClient(subscriptionID string) PublicKeysClient { return NewPublicKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicKeysClientWithBaseURI creates an instance of the PublicKeysClient client. +// NewPublicKeysClientWithBaseURI creates an instance of the PublicKeysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPublicKeysClientWithBaseURI(baseURI string, subscriptionID string) PublicKeysClient { return PublicKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iotcentral/mgmt/2018-09-01/iotcentral/apps.go b/services/iotcentral/mgmt/2018-09-01/iotcentral/apps.go index 42989117a7be..77b555161f33 100644 --- a/services/iotcentral/mgmt/2018-09-01/iotcentral/apps.go +++ b/services/iotcentral/mgmt/2018-09-01/iotcentral/apps.go @@ -36,7 +36,8 @@ func NewAppsClient(subscriptionID string) AppsClient { return NewAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppsClientWithBaseURI creates an instance of the AppsClient client. +// NewAppsClientWithBaseURI creates an instance of the AppsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient { return AppsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iotcentral/mgmt/2018-09-01/iotcentral/client.go b/services/iotcentral/mgmt/2018-09-01/iotcentral/client.go index 2f1d8942ff70..0d93824606bf 100644 --- a/services/iotcentral/mgmt/2018-09-01/iotcentral/client.go +++ b/services/iotcentral/mgmt/2018-09-01/iotcentral/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/iotcentral/mgmt/2018-09-01/iotcentral/iotcentralapi/interfaces.go b/services/iotcentral/mgmt/2018-09-01/iotcentral/iotcentralapi/interfaces.go index e29f9e512546..930e5cbc0b9c 100644 --- a/services/iotcentral/mgmt/2018-09-01/iotcentral/iotcentralapi/interfaces.go +++ b/services/iotcentral/mgmt/2018-09-01/iotcentral/iotcentralapi/interfaces.go @@ -30,8 +30,11 @@ type AppsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result iotcentral.AppsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result iotcentral.App, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result iotcentral.AppListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result iotcentral.AppListResultIterator, err error) ListBySubscription(ctx context.Context) (result iotcentral.AppListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result iotcentral.AppListResultIterator, err error) ListTemplates(ctx context.Context) (result iotcentral.AppTemplatesResultPage, err error) + ListTemplatesComplete(ctx context.Context) (result iotcentral.AppTemplatesResultIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, appPatch iotcentral.AppPatch) (result iotcentral.AppsUpdateFuture, err error) } @@ -40,6 +43,7 @@ var _ AppsClientAPI = (*iotcentral.AppsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result iotcentral.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result iotcentral.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*iotcentral.OperationsClient)(nil) diff --git a/services/iotcentral/mgmt/2018-09-01/iotcentral/operations.go b/services/iotcentral/mgmt/2018-09-01/iotcentral/operations.go index 04c51574f2b4..38ddb40f435e 100644 --- a/services/iotcentral/mgmt/2018-09-01/iotcentral/operations.go +++ b/services/iotcentral/mgmt/2018-09-01/iotcentral/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/iothub/mgmt/2016-02-03/devices/client.go b/services/iothub/mgmt/2016-02-03/devices/client.go index 0409c3c2b5ad..f4e24f45018d 100644 --- a/services/iothub/mgmt/2016-02-03/devices/client.go +++ b/services/iothub/mgmt/2016-02-03/devices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/iothub/mgmt/2016-02-03/devices/devicesapi/interfaces.go b/services/iothub/mgmt/2016-02-03/devices/devicesapi/interfaces.go index e9984cf441b1..c83e76438b50 100644 --- a/services/iothub/mgmt/2016-02-03/devices/devicesapi/interfaces.go +++ b/services/iothub/mgmt/2016-02-03/devices/devicesapi/interfaces.go @@ -36,14 +36,21 @@ type IotHubResourceClientAPI interface { GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string) (result devices.JobResponse, err error) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string) (result devices.SharedAccessSignatureAuthorizationRule, err error) GetQuotaMetrics(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultPage, err error) + GetQuotaMetricsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultIterator, err error) GetStats(ctx context.Context, resourceGroupName string, resourceName string) (result devices.RegistryStatistics, err error) GetValidSkus(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultPage, err error) + GetValidSkusComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultIterator, err error) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters devices.ImportDevicesRequest) (result devices.JobResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result devices.IotHubDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result devices.IotHubDescriptionListResultIterator, err error) ListEventHubConsumerGroups(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultPage, err error) + ListEventHubConsumerGroupsComplete(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultIterator, err error) ListJobs(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultPage, err error) + ListJobsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) } var _ IotHubResourceClientAPI = (*devices.IotHubResourceClient)(nil) diff --git a/services/iothub/mgmt/2016-02-03/devices/iothubresource.go b/services/iothub/mgmt/2016-02-03/devices/iothubresource.go index d50095867cd5..c20efc69406b 100644 --- a/services/iothub/mgmt/2016-02-03/devices/iothubresource.go +++ b/services/iothub/mgmt/2016-02-03/devices/iothubresource.go @@ -36,7 +36,8 @@ func NewIotHubResourceClient(subscriptionID string) IotHubResourceClient { return NewIotHubResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client. +// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotHubResourceClientWithBaseURI(baseURI string, subscriptionID string) IotHubResourceClient { return IotHubResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iothub/mgmt/2017-01-19/devices/client.go b/services/iothub/mgmt/2017-01-19/devices/client.go index 9cd4af9c8128..2a72fcabf4cd 100644 --- a/services/iothub/mgmt/2017-01-19/devices/client.go +++ b/services/iothub/mgmt/2017-01-19/devices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/iothub/mgmt/2017-01-19/devices/devicesapi/interfaces.go b/services/iothub/mgmt/2017-01-19/devices/devicesapi/interfaces.go index d0e95d471d15..c2ac77b596f4 100644 --- a/services/iothub/mgmt/2017-01-19/devices/devicesapi/interfaces.go +++ b/services/iothub/mgmt/2017-01-19/devices/devicesapi/interfaces.go @@ -36,14 +36,21 @@ type IotHubResourceClientAPI interface { GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string) (result devices.JobResponse, err error) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string) (result devices.SharedAccessSignatureAuthorizationRule, err error) GetQuotaMetrics(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultPage, err error) + GetQuotaMetricsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultIterator, err error) GetStats(ctx context.Context, resourceGroupName string, resourceName string) (result devices.RegistryStatistics, err error) GetValidSkus(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultPage, err error) + GetValidSkusComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultIterator, err error) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters devices.ImportDevicesRequest) (result devices.JobResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result devices.IotHubDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result devices.IotHubDescriptionListResultIterator, err error) ListEventHubConsumerGroups(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultPage, err error) + ListEventHubConsumerGroupsComplete(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultIterator, err error) ListJobs(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultPage, err error) + ListJobsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) } var _ IotHubResourceClientAPI = (*devices.IotHubResourceClient)(nil) diff --git a/services/iothub/mgmt/2017-01-19/devices/iothubresource.go b/services/iothub/mgmt/2017-01-19/devices/iothubresource.go index 2ff13587801d..a0649298b0a4 100644 --- a/services/iothub/mgmt/2017-01-19/devices/iothubresource.go +++ b/services/iothub/mgmt/2017-01-19/devices/iothubresource.go @@ -36,7 +36,8 @@ func NewIotHubResourceClient(subscriptionID string) IotHubResourceClient { return NewIotHubResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client. +// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotHubResourceClientWithBaseURI(baseURI string, subscriptionID string) IotHubResourceClient { return IotHubResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iothub/mgmt/2017-07-01/devices/certificates.go b/services/iothub/mgmt/2017-07-01/devices/certificates.go index 2d10ae34eb7f..a7b5b0f15621 100644 --- a/services/iothub/mgmt/2017-07-01/devices/certificates.go +++ b/services/iothub/mgmt/2017-07-01/devices/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iothub/mgmt/2017-07-01/devices/client.go b/services/iothub/mgmt/2017-07-01/devices/client.go index e57aac2e56b1..c1e0e6470bf3 100644 --- a/services/iothub/mgmt/2017-07-01/devices/client.go +++ b/services/iothub/mgmt/2017-07-01/devices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/iothub/mgmt/2017-07-01/devices/devicesapi/interfaces.go b/services/iothub/mgmt/2017-07-01/devices/devicesapi/interfaces.go index c1278b93d136..f7ecaa2115dd 100644 --- a/services/iothub/mgmt/2017-07-01/devices/devicesapi/interfaces.go +++ b/services/iothub/mgmt/2017-07-01/devices/devicesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result devices.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result devices.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*devices.OperationsClient)(nil) @@ -43,14 +44,21 @@ type IotHubResourceClientAPI interface { GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string) (result devices.JobResponse, err error) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string) (result devices.SharedAccessSignatureAuthorizationRule, err error) GetQuotaMetrics(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultPage, err error) + GetQuotaMetricsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultIterator, err error) GetStats(ctx context.Context, resourceGroupName string, resourceName string) (result devices.RegistryStatistics, err error) GetValidSkus(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultPage, err error) + GetValidSkusComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultIterator, err error) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters devices.ImportDevicesRequest) (result devices.JobResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result devices.IotHubDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result devices.IotHubDescriptionListResultIterator, err error) ListEventHubConsumerGroups(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultPage, err error) + ListEventHubConsumerGroupsComplete(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultIterator, err error) ListJobs(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultPage, err error) + ListJobsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) } var _ IotHubResourceClientAPI = (*devices.IotHubResourceClient)(nil) diff --git a/services/iothub/mgmt/2017-07-01/devices/iothubresource.go b/services/iothub/mgmt/2017-07-01/devices/iothubresource.go index 02784fa4e61f..7fc489d7bcb6 100644 --- a/services/iothub/mgmt/2017-07-01/devices/iothubresource.go +++ b/services/iothub/mgmt/2017-07-01/devices/iothubresource.go @@ -36,7 +36,8 @@ func NewIotHubResourceClient(subscriptionID string) IotHubResourceClient { return NewIotHubResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client. +// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotHubResourceClientWithBaseURI(baseURI string, subscriptionID string) IotHubResourceClient { return IotHubResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iothub/mgmt/2017-07-01/devices/operations.go b/services/iothub/mgmt/2017-07-01/devices/operations.go index d52355713062..59da5aa3ca57 100644 --- a/services/iothub/mgmt/2017-07-01/devices/operations.go +++ b/services/iothub/mgmt/2017-07-01/devices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/iothub/mgmt/2018-01-22/devices/certificates.go b/services/iothub/mgmt/2018-01-22/devices/certificates.go index c89f67e1b12c..b3ed7d558bce 100644 --- a/services/iothub/mgmt/2018-01-22/devices/certificates.go +++ b/services/iothub/mgmt/2018-01-22/devices/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iothub/mgmt/2018-01-22/devices/client.go b/services/iothub/mgmt/2018-01-22/devices/client.go index 241ea457df2f..3a0b4d695adb 100644 --- a/services/iothub/mgmt/2018-01-22/devices/client.go +++ b/services/iothub/mgmt/2018-01-22/devices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/iothub/mgmt/2018-01-22/devices/devicesapi/interfaces.go b/services/iothub/mgmt/2018-01-22/devices/devicesapi/interfaces.go index 3406b9c2c68a..8c140c0c0fe4 100644 --- a/services/iothub/mgmt/2018-01-22/devices/devicesapi/interfaces.go +++ b/services/iothub/mgmt/2018-01-22/devices/devicesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result devices.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result devices.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*devices.OperationsClient)(nil) @@ -43,14 +44,21 @@ type IotHubResourceClientAPI interface { GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string) (result devices.JobResponse, err error) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string) (result devices.SharedAccessSignatureAuthorizationRule, err error) GetQuotaMetrics(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultPage, err error) + GetQuotaMetricsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultIterator, err error) GetStats(ctx context.Context, resourceGroupName string, resourceName string) (result devices.RegistryStatistics, err error) GetValidSkus(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultPage, err error) + GetValidSkusComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultIterator, err error) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters devices.ImportDevicesRequest) (result devices.JobResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result devices.IotHubDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result devices.IotHubDescriptionListResultIterator, err error) ListEventHubConsumerGroups(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultPage, err error) + ListEventHubConsumerGroupsComplete(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultIterator, err error) ListJobs(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultPage, err error) + ListJobsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, iotHubTags devices.TagsResource) (result devices.IotHubResourceUpdateFuture, err error) } diff --git a/services/iothub/mgmt/2018-01-22/devices/iothubresource.go b/services/iothub/mgmt/2018-01-22/devices/iothubresource.go index 0965fde4bec9..96f17618755a 100644 --- a/services/iothub/mgmt/2018-01-22/devices/iothubresource.go +++ b/services/iothub/mgmt/2018-01-22/devices/iothubresource.go @@ -36,7 +36,8 @@ func NewIotHubResourceClient(subscriptionID string) IotHubResourceClient { return NewIotHubResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client. +// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotHubResourceClientWithBaseURI(baseURI string, subscriptionID string) IotHubResourceClient { return IotHubResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iothub/mgmt/2018-01-22/devices/operations.go b/services/iothub/mgmt/2018-01-22/devices/operations.go index 953d0d62ff13..c4f0df6c8e32 100644 --- a/services/iothub/mgmt/2018-01-22/devices/operations.go +++ b/services/iothub/mgmt/2018-01-22/devices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/iothub/mgmt/2018-04-01/devices/certificates.go b/services/iothub/mgmt/2018-04-01/devices/certificates.go index 638441d38cc6..91b9ee06914b 100644 --- a/services/iothub/mgmt/2018-04-01/devices/certificates.go +++ b/services/iothub/mgmt/2018-04-01/devices/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iothub/mgmt/2018-04-01/devices/client.go b/services/iothub/mgmt/2018-04-01/devices/client.go index cbe7e7e40a2f..98f9d945aba9 100644 --- a/services/iothub/mgmt/2018-04-01/devices/client.go +++ b/services/iothub/mgmt/2018-04-01/devices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/iothub/mgmt/2018-04-01/devices/devicesapi/interfaces.go b/services/iothub/mgmt/2018-04-01/devices/devicesapi/interfaces.go index c6a020ca1d45..162e437023b0 100644 --- a/services/iothub/mgmt/2018-04-01/devices/devicesapi/interfaces.go +++ b/services/iothub/mgmt/2018-04-01/devices/devicesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result devices.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result devices.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*devices.OperationsClient)(nil) @@ -40,18 +41,26 @@ type IotHubResourceClientAPI interface { ExportDevices(ctx context.Context, resourceGroupName string, resourceName string, exportDevicesParameters devices.ExportDevicesRequest) (result devices.JobResponse, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubDescription, err error) GetEndpointHealth(ctx context.Context, resourceGroupName string, iotHubName string) (result devices.EndpointHealthDataListResultPage, err error) + GetEndpointHealthComplete(ctx context.Context, resourceGroupName string, iotHubName string) (result devices.EndpointHealthDataListResultIterator, err error) GetEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result devices.EventHubConsumerGroupInfo, err error) GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string) (result devices.JobResponse, err error) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string) (result devices.SharedAccessSignatureAuthorizationRule, err error) GetQuotaMetrics(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultPage, err error) + GetQuotaMetricsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultIterator, err error) GetStats(ctx context.Context, resourceGroupName string, resourceName string) (result devices.RegistryStatistics, err error) GetValidSkus(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultPage, err error) + GetValidSkusComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultIterator, err error) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters devices.ImportDevicesRequest) (result devices.JobResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result devices.IotHubDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result devices.IotHubDescriptionListResultIterator, err error) ListEventHubConsumerGroups(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultPage, err error) + ListEventHubConsumerGroupsComplete(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultIterator, err error) ListJobs(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultPage, err error) + ListJobsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) TestAllRoutes(ctx context.Context, input devices.TestAllRoutesInput, iotHubName string, resourceGroupName string) (result devices.TestAllRoutesResult, err error) TestRoute(ctx context.Context, input devices.TestRouteInput, iotHubName string, resourceGroupName string) (result devices.TestRouteResult, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, iotHubTags devices.TagsResource) (result devices.IotHubResourceUpdateFuture, err error) diff --git a/services/iothub/mgmt/2018-04-01/devices/iothubresource.go b/services/iothub/mgmt/2018-04-01/devices/iothubresource.go index f43bf66e6698..bfa383a69f90 100644 --- a/services/iothub/mgmt/2018-04-01/devices/iothubresource.go +++ b/services/iothub/mgmt/2018-04-01/devices/iothubresource.go @@ -36,7 +36,8 @@ func NewIotHubResourceClient(subscriptionID string) IotHubResourceClient { return NewIotHubResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client. +// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotHubResourceClientWithBaseURI(baseURI string, subscriptionID string) IotHubResourceClient { return IotHubResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/iothub/mgmt/2018-04-01/devices/operations.go b/services/iothub/mgmt/2018-04-01/devices/operations.go index a266ed68bf6c..f86dc75c31d2 100644 --- a/services/iothub/mgmt/2018-04-01/devices/operations.go +++ b/services/iothub/mgmt/2018-04-01/devices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go b/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go index b65e468d64e8..4ffa151cdfd2 100644 --- a/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go +++ b/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go @@ -35,7 +35,9 @@ func NewResourceProviderCommonClient(subscriptionID string) ResourceProviderComm return NewResourceProviderCommonClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceProviderCommonClientWithBaseURI creates an instance of the ResourceProviderCommonClient client. +// NewResourceProviderCommonClientWithBaseURI creates an instance of the ResourceProviderCommonClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceProviderCommonClientWithBaseURI(baseURI string, subscriptionID string) ResourceProviderCommonClient { return ResourceProviderCommonClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/keyvault/2015-06-01/keyvault/keyvaultapi/interfaces.go b/services/keyvault/2015-06-01/keyvault/keyvaultapi/interfaces.go index 60298a80541b..61f314038768 100644 --- a/services/keyvault/2015-06-01/keyvault/keyvaultapi/interfaces.go +++ b/services/keyvault/2015-06-01/keyvault/keyvaultapi/interfaces.go @@ -39,16 +39,23 @@ type BaseClientAPI interface { GetCertificateContacts(ctx context.Context, vaultBaseURL string) (result keyvault.Contacts, err error) GetCertificateIssuer(ctx context.Context, vaultBaseURL string, issuerName string) (result keyvault.IssuerBundle, err error) GetCertificateIssuers(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateIssuerListResultPage, err error) + GetCertificateIssuersComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateIssuerListResultIterator, err error) GetCertificateOperation(ctx context.Context, vaultBaseURL string, certificateName string) (result keyvault.CertificateOperation, err error) GetCertificatePolicy(ctx context.Context, vaultBaseURL string, certificateName string) (result keyvault.CertificatePolicy, err error) GetCertificates(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateListResultPage, err error) + GetCertificatesComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateListResultIterator, err error) GetCertificateVersions(ctx context.Context, vaultBaseURL string, certificateName string, maxresults *int32) (result keyvault.CertificateListResultPage, err error) + GetCertificateVersionsComplete(ctx context.Context, vaultBaseURL string, certificateName string, maxresults *int32) (result keyvault.CertificateListResultIterator, err error) GetKey(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string) (result keyvault.KeyBundle, err error) GetKeys(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.KeyListResultPage, err error) + GetKeysComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.KeyListResultIterator, err error) GetKeyVersions(ctx context.Context, vaultBaseURL string, keyName string, maxresults *int32) (result keyvault.KeyListResultPage, err error) + GetKeyVersionsComplete(ctx context.Context, vaultBaseURL string, keyName string, maxresults *int32) (result keyvault.KeyListResultIterator, err error) GetSecret(ctx context.Context, vaultBaseURL string, secretName string, secretVersion string) (result keyvault.SecretBundle, err error) GetSecrets(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.SecretListResultPage, err error) + GetSecretsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.SecretListResultIterator, err error) GetSecretVersions(ctx context.Context, vaultBaseURL string, secretName string, maxresults *int32) (result keyvault.SecretListResultPage, err error) + GetSecretVersionsComplete(ctx context.Context, vaultBaseURL string, secretName string, maxresults *int32) (result keyvault.SecretListResultIterator, err error) ImportCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters keyvault.CertificateImportParameters) (result keyvault.CertificateBundle, err error) ImportKey(ctx context.Context, vaultBaseURL string, keyName string, parameters keyvault.KeyImportParameters) (result keyvault.KeyBundle, err error) MergeCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters keyvault.CertificateMergeParameters) (result keyvault.CertificateBundle, err error) diff --git a/services/keyvault/2016-10-01/keyvault/keyvaultapi/interfaces.go b/services/keyvault/2016-10-01/keyvault/keyvaultapi/interfaces.go index 8df87472a8f4..edf21ccdcc07 100644 --- a/services/keyvault/2016-10-01/keyvault/keyvaultapi/interfaces.go +++ b/services/keyvault/2016-10-01/keyvault/keyvaultapi/interfaces.go @@ -43,26 +43,38 @@ type BaseClientAPI interface { GetCertificateContacts(ctx context.Context, vaultBaseURL string) (result keyvault.Contacts, err error) GetCertificateIssuer(ctx context.Context, vaultBaseURL string, issuerName string) (result keyvault.IssuerBundle, err error) GetCertificateIssuers(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateIssuerListResultPage, err error) + GetCertificateIssuersComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateIssuerListResultIterator, err error) GetCertificateOperation(ctx context.Context, vaultBaseURL string, certificateName string) (result keyvault.CertificateOperation, err error) GetCertificatePolicy(ctx context.Context, vaultBaseURL string, certificateName string) (result keyvault.CertificatePolicy, err error) GetCertificates(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateListResultPage, err error) + GetCertificatesComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateListResultIterator, err error) GetCertificateVersions(ctx context.Context, vaultBaseURL string, certificateName string, maxresults *int32) (result keyvault.CertificateListResultPage, err error) + GetCertificateVersionsComplete(ctx context.Context, vaultBaseURL string, certificateName string, maxresults *int32) (result keyvault.CertificateListResultIterator, err error) GetDeletedCertificate(ctx context.Context, vaultBaseURL string, certificateName string) (result keyvault.DeletedCertificateBundle, err error) GetDeletedCertificates(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedCertificateListResultPage, err error) + GetDeletedCertificatesComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedCertificateListResultIterator, err error) GetDeletedKey(ctx context.Context, vaultBaseURL string, keyName string) (result keyvault.DeletedKeyBundle, err error) GetDeletedKeys(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedKeyListResultPage, err error) + GetDeletedKeysComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedKeyListResultIterator, err error) GetDeletedSecret(ctx context.Context, vaultBaseURL string, secretName string) (result keyvault.DeletedSecretBundle, err error) GetDeletedSecrets(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedSecretListResultPage, err error) + GetDeletedSecretsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedSecretListResultIterator, err error) GetKey(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string) (result keyvault.KeyBundle, err error) GetKeys(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.KeyListResultPage, err error) + GetKeysComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.KeyListResultIterator, err error) GetKeyVersions(ctx context.Context, vaultBaseURL string, keyName string, maxresults *int32) (result keyvault.KeyListResultPage, err error) + GetKeyVersionsComplete(ctx context.Context, vaultBaseURL string, keyName string, maxresults *int32) (result keyvault.KeyListResultIterator, err error) GetSasDefinition(ctx context.Context, vaultBaseURL string, storageAccountName string, sasDefinitionName string) (result keyvault.SasDefinitionBundle, err error) GetSasDefinitions(ctx context.Context, vaultBaseURL string, storageAccountName string, maxresults *int32) (result keyvault.SasDefinitionListResultPage, err error) + GetSasDefinitionsComplete(ctx context.Context, vaultBaseURL string, storageAccountName string, maxresults *int32) (result keyvault.SasDefinitionListResultIterator, err error) GetSecret(ctx context.Context, vaultBaseURL string, secretName string, secretVersion string) (result keyvault.SecretBundle, err error) GetSecrets(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.SecretListResultPage, err error) + GetSecretsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.SecretListResultIterator, err error) GetSecretVersions(ctx context.Context, vaultBaseURL string, secretName string, maxresults *int32) (result keyvault.SecretListResultPage, err error) + GetSecretVersionsComplete(ctx context.Context, vaultBaseURL string, secretName string, maxresults *int32) (result keyvault.SecretListResultIterator, err error) GetStorageAccount(ctx context.Context, vaultBaseURL string, storageAccountName string) (result keyvault.StorageBundle, err error) GetStorageAccounts(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.StorageListResultPage, err error) + GetStorageAccountsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.StorageListResultIterator, err error) ImportCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters keyvault.CertificateImportParameters) (result keyvault.CertificateBundle, err error) ImportKey(ctx context.Context, vaultBaseURL string, keyName string, parameters keyvault.KeyImportParameters) (result keyvault.KeyBundle, err error) MergeCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters keyvault.CertificateMergeParameters) (result keyvault.CertificateBundle, err error) diff --git a/services/keyvault/mgmt/2015-06-01/keyvault/client.go b/services/keyvault/mgmt/2015-06-01/keyvault/client.go index 5f09192cbf2e..e89dee00ad23 100644 --- a/services/keyvault/mgmt/2015-06-01/keyvault/client.go +++ b/services/keyvault/mgmt/2015-06-01/keyvault/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/keyvault/mgmt/2015-06-01/keyvault/keyvaultapi/interfaces.go b/services/keyvault/mgmt/2015-06-01/keyvault/keyvaultapi/interfaces.go index b58dff6a86bf..e6c39587cde9 100644 --- a/services/keyvault/mgmt/2015-06-01/keyvault/keyvaultapi/interfaces.go +++ b/services/keyvault/mgmt/2015-06-01/keyvault/keyvaultapi/interfaces.go @@ -29,7 +29,9 @@ type VaultsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, vaultName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, vaultName string) (result keyvault.Vault, err error) List(ctx context.Context, top *int32) (result keyvault.ResourceListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result keyvault.ResourceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result keyvault.VaultListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result keyvault.VaultListResultIterator, err error) } var _ VaultsClientAPI = (*keyvault.VaultsClient)(nil) diff --git a/services/keyvault/mgmt/2015-06-01/keyvault/vaults.go b/services/keyvault/mgmt/2015-06-01/keyvault/vaults.go index 24f24c5525a7..98cbdfa2d654 100644 --- a/services/keyvault/mgmt/2015-06-01/keyvault/vaults.go +++ b/services/keyvault/mgmt/2015-06-01/keyvault/vaults.go @@ -37,7 +37,8 @@ func NewVaultsClient(subscriptionID string) VaultsClient { return NewVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVaultsClientWithBaseURI creates an instance of the VaultsClient client. +// 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)} } diff --git a/services/keyvault/mgmt/2016-10-01/keyvault/client.go b/services/keyvault/mgmt/2016-10-01/keyvault/client.go index 3d2740e41370..16dd84463b16 100644 --- a/services/keyvault/mgmt/2016-10-01/keyvault/client.go +++ b/services/keyvault/mgmt/2016-10-01/keyvault/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/keyvault/mgmt/2016-10-01/keyvault/keyvaultapi/interfaces.go b/services/keyvault/mgmt/2016-10-01/keyvault/keyvaultapi/interfaces.go index 733da47eebba..78d414039870 100644 --- a/services/keyvault/mgmt/2016-10-01/keyvault/keyvaultapi/interfaces.go +++ b/services/keyvault/mgmt/2016-10-01/keyvault/keyvaultapi/interfaces.go @@ -31,9 +31,13 @@ type VaultsClientAPI interface { Get(ctx context.Context, resourceGroupName string, vaultName string) (result keyvault.Vault, err error) GetDeleted(ctx context.Context, vaultName string, location string) (result keyvault.DeletedVault, err error) List(ctx context.Context, top *int32) (result keyvault.ResourceListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result keyvault.ResourceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result keyvault.VaultListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result keyvault.VaultListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32) (result keyvault.VaultListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32) (result keyvault.VaultListResultIterator, err error) ListDeleted(ctx context.Context) (result keyvault.DeletedVaultListResultPage, err error) + ListDeletedComplete(ctx context.Context) (result keyvault.DeletedVaultListResultIterator, err error) PurgeDeleted(ctx context.Context, vaultName string, location string) (result keyvault.VaultsPurgeDeletedFuture, err error) Update(ctx context.Context, resourceGroupName string, vaultName string, parameters keyvault.VaultPatchParameters) (result keyvault.Vault, err error) UpdateAccessPolicy(ctx context.Context, resourceGroupName string, vaultName string, operationKind keyvault.AccessPolicyUpdateKind, parameters keyvault.VaultAccessPolicyParameters) (result keyvault.VaultAccessPolicyParameters, err error) @@ -44,6 +48,7 @@ var _ VaultsClientAPI = (*keyvault.VaultsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result keyvault.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result keyvault.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*keyvault.OperationsClient)(nil) diff --git a/services/keyvault/mgmt/2016-10-01/keyvault/operations.go b/services/keyvault/mgmt/2016-10-01/keyvault/operations.go index 3b41aa3d5e32..024673d95913 100644 --- a/services/keyvault/mgmt/2016-10-01/keyvault/operations.go +++ b/services/keyvault/mgmt/2016-10-01/keyvault/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/keyvault/mgmt/2016-10-01/keyvault/vaults.go b/services/keyvault/mgmt/2016-10-01/keyvault/vaults.go index 1f5c9a8a0661..114661c9c8fa 100644 --- a/services/keyvault/mgmt/2016-10-01/keyvault/vaults.go +++ b/services/keyvault/mgmt/2016-10-01/keyvault/vaults.go @@ -37,7 +37,8 @@ func NewVaultsClient(subscriptionID string) VaultsClient { return NewVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVaultsClientWithBaseURI creates an instance of the VaultsClient client. +// 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)} } diff --git a/services/keyvault/mgmt/2018-02-14/keyvault/client.go b/services/keyvault/mgmt/2018-02-14/keyvault/client.go index 4491a94067c5..e8666730b759 100644 --- a/services/keyvault/mgmt/2018-02-14/keyvault/client.go +++ b/services/keyvault/mgmt/2018-02-14/keyvault/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/keyvault/mgmt/2018-02-14/keyvault/keyvaultapi/interfaces.go b/services/keyvault/mgmt/2018-02-14/keyvault/keyvaultapi/interfaces.go index 3269b82e87a7..0c0e26715917 100644 --- a/services/keyvault/mgmt/2018-02-14/keyvault/keyvaultapi/interfaces.go +++ b/services/keyvault/mgmt/2018-02-14/keyvault/keyvaultapi/interfaces.go @@ -31,9 +31,13 @@ type VaultsClientAPI interface { Get(ctx context.Context, resourceGroupName string, vaultName string) (result keyvault.Vault, err error) GetDeleted(ctx context.Context, vaultName string, location string) (result keyvault.DeletedVault, err error) List(ctx context.Context, top *int32) (result keyvault.ResourceListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result keyvault.ResourceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result keyvault.VaultListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result keyvault.VaultListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32) (result keyvault.VaultListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32) (result keyvault.VaultListResultIterator, err error) ListDeleted(ctx context.Context) (result keyvault.DeletedVaultListResultPage, err error) + ListDeletedComplete(ctx context.Context) (result keyvault.DeletedVaultListResultIterator, err error) PurgeDeleted(ctx context.Context, vaultName string, location string) (result keyvault.VaultsPurgeDeletedFuture, err error) Update(ctx context.Context, resourceGroupName string, vaultName string, parameters keyvault.VaultPatchParameters) (result keyvault.Vault, err error) UpdateAccessPolicy(ctx context.Context, resourceGroupName string, vaultName string, operationKind keyvault.AccessPolicyUpdateKind, parameters keyvault.VaultAccessPolicyParameters) (result keyvault.VaultAccessPolicyParameters, err error) @@ -41,9 +45,26 @@ type VaultsClientAPI interface { var _ VaultsClientAPI = (*keyvault.VaultsClient)(nil) +// PrivateEndpointConnectionsClientAPI contains the set of methods on the PrivateEndpointConnectionsClient type. +type PrivateEndpointConnectionsClientAPI interface { + Delete(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string) (result keyvault.PrivateEndpointConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string) (result keyvault.PrivateEndpointConnection, err error) + Put(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties keyvault.PrivateEndpointConnection) (result keyvault.PrivateEndpointConnection, err error) +} + +var _ PrivateEndpointConnectionsClientAPI = (*keyvault.PrivateEndpointConnectionsClient)(nil) + +// PrivateLinkResourcesClientAPI contains the set of methods on the PrivateLinkResourcesClient type. +type PrivateLinkResourcesClientAPI interface { + ListByVault(ctx context.Context, resourceGroupName string, vaultName string) (result keyvault.PrivateLinkResourceListResult, err error) +} + +var _ PrivateLinkResourcesClientAPI = (*keyvault.PrivateLinkResourcesClient)(nil) + // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result keyvault.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result keyvault.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*keyvault.OperationsClient)(nil) diff --git a/services/keyvault/mgmt/2018-02-14/keyvault/models.go b/services/keyvault/mgmt/2018-02-14/keyvault/models.go index 62a3df4c9094..ceb1da4305c1 100644 --- a/services/keyvault/mgmt/2018-02-14/keyvault/models.go +++ b/services/keyvault/mgmt/2018-02-14/keyvault/models.go @@ -180,6 +180,49 @@ func PossibleNetworkRuleBypassOptionsValues() []NetworkRuleBypassOptions { return []NetworkRuleBypassOptions{AzureServices, None} } +// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection +// provisioning state. +type PrivateEndpointConnectionProvisioningState string + +const ( + // Creating ... + Creating PrivateEndpointConnectionProvisioningState = "Creating" + // Deleting ... + Deleting PrivateEndpointConnectionProvisioningState = "Deleting" + // Disconnected ... + Disconnected PrivateEndpointConnectionProvisioningState = "Disconnected" + // Failed ... + Failed PrivateEndpointConnectionProvisioningState = "Failed" + // Succeeded ... + Succeeded PrivateEndpointConnectionProvisioningState = "Succeeded" + // Updating ... + Updating PrivateEndpointConnectionProvisioningState = "Updating" +) + +// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type. +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return []PrivateEndpointConnectionProvisioningState{Creating, Deleting, Disconnected, Failed, Succeeded, Updating} +} + +// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. +type PrivateEndpointServiceConnectionStatus string + +const ( + // PrivateEndpointServiceConnectionStatusApproved ... + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + // PrivateEndpointServiceConnectionStatusDisconnected ... + PrivateEndpointServiceConnectionStatusDisconnected PrivateEndpointServiceConnectionStatus = "Disconnected" + // 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, PrivateEndpointServiceConnectionStatusDisconnected, PrivateEndpointServiceConnectionStatusPending, PrivateEndpointServiceConnectionStatusRejected} +} + // Reason enumerates the values for reason. type Reason string @@ -300,6 +343,19 @@ type CheckNameAvailabilityResult struct { Message *string `json:"message,omitempty"` } +// CloudError an error response from Key Vault resource provider +type CloudError struct { + Error *CloudErrorBody `json:"error,omitempty"` +} + +// CloudErrorBody an error response from Key Vault resource provider +type CloudErrorBody struct { + // Code - Error code. This is a mnemonic that can be consumed programmatically. + Code *string `json:"code,omitempty"` + // Message - User friendly error message. The message is typically localized and may vary with service version. + Message *string `json:"message,omitempty"` +} + // DeletedVault deleted vault information with extended details. type DeletedVault struct { autorest.Response `json:"-"` @@ -765,29 +821,324 @@ type Permissions struct { Storage *[]StoragePermissions `json:"storage,omitempty"` } +// PrivateEndpoint private endpoint object properties. +type PrivateEndpoint struct { + // ID - READ-ONLY; Full identifier of the private endpoint resource. + ID *string `json:"id,omitempty"` +} + +// PrivateEndpointConnection private endpoint connection resource. +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Resource properties. + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified identifier of the key vault resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the key vault resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type of the key vault resource. + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; Azure location of the key vault resource. + Location *string `json:"location,omitempty"` + // Tags - READ-ONLY; Tags assigned to the key vault resource. + Tags map[string]*string `json:"tags"` +} + +// 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 + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pec.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pec.Tags = tags + } + } + } + + return nil +} + +// PrivateEndpointConnectionItem private endpoint connection item. +type PrivateEndpointConnectionItem struct { + // PrivateEndpointConnectionProperties - Private endpoint connection properties. + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnectionItem. +func (peci PrivateEndpointConnectionItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if peci.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = peci.PrivateEndpointConnectionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnectionItem struct. +func (peci *PrivateEndpointConnectionItem) UnmarshalJSON(body []byte) error { + var m map[string]*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 + } + peci.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + } + } + + return nil +} + +// PrivateEndpointConnectionProperties properties of the private endpoint connection resource. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - Properties of the private endpoint object. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - Approval state of the private link connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - Provisioning state of the private endpoint connection. Possible values include: 'Succeeded', 'Creating', 'Updating', 'Deleting', 'Failed', 'Disconnected' + ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} + +// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateEndpointConnectionsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsDeleteFuture) Result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("keyvault.PrivateEndpointConnectionsDeleteFuture") + 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.DeleteResponder(pec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateEndpointConnectionsDeleteFuture", "Result", pec.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateLinkResource a private link resource +type PrivateLinkResource struct { + // PrivateLinkResourceProperties - Resource properties. + *PrivateLinkResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified identifier of the key vault resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the key vault resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type of the key vault resource. + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; Azure location of the key vault resource. + Location *string `json:"location,omitempty"` + // Tags - READ-ONLY; Tags assigned to the key vault resource. + Tags map[string]*string `json:"tags"` +} + +// 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 + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + plr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + plr.Tags = tags + } + } + } + + 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; 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"` +} + +// PrivateLinkServiceConnectionState an object that represents the approval state of the private link +// connection. +type PrivateLinkServiceConnectionState struct { + // Status - Indicates whether the connection has been approved, rejected or removed by the key vault owner. Possible values include: 'PrivateEndpointServiceConnectionStatusPending', 'PrivateEndpointServiceConnectionStatusApproved', 'PrivateEndpointServiceConnectionStatusRejected', 'PrivateEndpointServiceConnectionStatusDisconnected' + Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` + // Description - The reason for approval or rejection. + Description *string `json:"description,omitempty"` + // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer. + ActionRequired *string `json:"actionRequired,omitempty"` +} + // Resource key Vault resource type Resource struct { - // ID - READ-ONLY; The Azure Resource Manager resource ID for the key vault. + // ID - READ-ONLY; Fully qualified identifier of the key vault resource. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the key vault. + // Name - READ-ONLY; Name of the key vault resource. Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The resource type of the key vault. + // Type - READ-ONLY; Resource type of the key vault resource. Type *string `json:"type,omitempty"` - // Location - The supported Azure location where the key vault should be created. + // Location - READ-ONLY; Azure location of the key vault resource. Location *string `json:"location,omitempty"` - // Tags - The tags that will be assigned to the key vault. + // Tags - READ-ONLY; Tags assigned to the key vault resource. 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) } @@ -954,32 +1305,32 @@ type Sku struct { // Vault resource information with extended details. type Vault struct { autorest.Response `json:"-"` - // Properties - Properties of the vault - Properties *VaultProperties `json:"properties,omitempty"` - // ID - READ-ONLY; The Azure Resource Manager resource ID for the key vault. + // ID - READ-ONLY; Fully qualified identifier of the key vault resource. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the key vault. + // Name - READ-ONLY; Name of the key vault resource. Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The resource type of the key vault. + // Type - READ-ONLY; Resource type of the key vault resource. Type *string `json:"type,omitempty"` - // Location - The supported Azure location where the key vault should be created. + // Location - Azure location of the key vault resource. Location *string `json:"location,omitempty"` - // Tags - The tags that will be assigned to the key vault. + // Tags - Tags assigned to the key vault resource. Tags map[string]*string `json:"tags"` + // Properties - Properties of the 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.Properties != nil { - objectMap["properties"] = vVar.Properties - } if vVar.Location != nil { objectMap["location"] = vVar.Location } if vVar.Tags != nil { objectMap["tags"] = vVar.Tags } + if vVar.Properties != nil { + objectMap["properties"] = vVar.Properties + } return json.Marshal(objectMap) } @@ -1249,8 +1600,10 @@ type VaultProperties struct { CreateMode CreateMode `json:"createMode,omitempty"` // EnablePurgeProtection - Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value. EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` - // NetworkAcls - A collection of rules governing the accessibility of the vault from specific network locations. + // NetworkAcls - Rules governing the accessibility of the key vault from specific network locations. NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"` + // PrivateEndpointConnections - READ-ONLY; List of private endpoint connections associated with the key vault. + PrivateEndpointConnections *[]PrivateEndpointConnectionItem `json:"privateEndpointConnections,omitempty"` } // VaultsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running diff --git a/services/keyvault/mgmt/2018-02-14/keyvault/operations.go b/services/keyvault/mgmt/2018-02-14/keyvault/operations.go index 1564b79c88f3..a876d14afe55 100644 --- a/services/keyvault/mgmt/2018-02-14/keyvault/operations.go +++ b/services/keyvault/mgmt/2018-02-14/keyvault/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/keyvault/mgmt/2018-02-14/keyvault/privateendpointconnections.go b/services/keyvault/mgmt/2018-02-14/keyvault/privateendpointconnections.go new file mode 100644 index 000000000000..610be72a2c5e --- /dev/null +++ b/services/keyvault/mgmt/2018-02-14/keyvault/privateendpointconnections.go @@ -0,0 +1,303 @@ +package keyvault + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateEndpointConnectionsClient is the the Azure management API provides a RESTful set of web services that +// interact with Azure Key Vault. +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)} +} + +// Delete deletes the specified private endpoint connection associated with the key vault. +// Parameters: +// resourceGroupName - name of the resource group that contains the key vault. +// vaultName - the name of the key vault. +// privateEndpointConnectionName - name of the private endpoint connection associated with the key vault. +func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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: vaultName, + Constraints: []validation.Constraint{{Target: "vaultName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("keyvault.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, vaultName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, vaultName 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), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2018-02-14" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the specified private endpoint connection associated with the key vault. +// Parameters: +// resourceGroupName - name of the resource group that contains the key vault. +// vaultName - the name of the key vault. +// privateEndpointConnectionName - name of the private endpoint connection associated with the key vault. +func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, vaultName 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: vaultName, + Constraints: []validation.Constraint{{Target: "vaultName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("keyvault.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, vaultName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.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, "keyvault.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, vaultName 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), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2018-02-14" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Put updates the specified private endpoint connection associated with the key vault. +// Parameters: +// resourceGroupName - name of the resource group that contains the key vault. +// vaultName - the name of the key vault. +// privateEndpointConnectionName - name of the private endpoint connection associated with the key vault. +// properties - the intended state of private endpoint connection. +func (client PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Put") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: vaultName, + Constraints: []validation.Constraint{{Target: "vaultName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("keyvault.PrivateEndpointConnectionsClient", "Put", err.Error()) + } + + req, err := client.PutPreparer(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, properties) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateEndpointConnectionsClient", "Put", nil, "Failure preparing request") + return + } + + resp, err := client.PutSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.PrivateEndpointConnectionsClient", "Put", resp, "Failure sending request") + return + } + + result, err = client.PutResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateEndpointConnectionsClient", "Put", resp, "Failure responding to request") + } + + return +} + +// PutPreparer prepares the Put request. +func (client PrivateEndpointConnectionsClient) PutPreparer(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2018-02-14" + 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.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithJSON(properties), + 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 PrivateEndpointConnectionsClient) PutSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// PutResponder handles the response to the Put request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) PutResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/keyvault/mgmt/2018-02-14/keyvault/privatelinkresources.go b/services/keyvault/mgmt/2018-02-14/keyvault/privatelinkresources.go new file mode 100644 index 000000000000..85ca8910f810 --- /dev/null +++ b/services/keyvault/mgmt/2018-02-14/keyvault/privatelinkresources.go @@ -0,0 +1,128 @@ +package keyvault + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateLinkResourcesClient is the the Azure management API provides a RESTful set of web services that interact with +// Azure Key Vault. +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)} +} + +// ListByVault gets the private link resources supported for the key vault. +// Parameters: +// resourceGroupName - name of the resource group that contains the key vault. +// vaultName - the name of the key vault. +func (client PrivateLinkResourcesClient) ListByVault(ctx context.Context, resourceGroupName string, vaultName string) (result PrivateLinkResourceListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByVault") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: vaultName, + Constraints: []validation.Constraint{{Target: "vaultName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("keyvault.PrivateLinkResourcesClient", "ListByVault", err.Error()) + } + + req, err := client.ListByVaultPreparer(ctx, resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateLinkResourcesClient", "ListByVault", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVaultSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.PrivateLinkResourcesClient", "ListByVault", resp, "Failure sending request") + return + } + + result, err = client.ListByVaultResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.PrivateLinkResourcesClient", "ListByVault", resp, "Failure responding to request") + } + + return +} + +// ListByVaultPreparer prepares the ListByVault request. +func (client PrivateLinkResourcesClient) ListByVaultPreparer(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 = "2018-02-14" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateLinkResources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVaultSender sends the ListByVault request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkResourcesClient) ListByVaultSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByVaultResponder handles the response to the ListByVault request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) ListByVaultResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/keyvault/mgmt/2018-02-14/keyvault/vaults.go b/services/keyvault/mgmt/2018-02-14/keyvault/vaults.go index 28c6c63862d7..803cdbdc105c 100644 --- a/services/keyvault/mgmt/2018-02-14/keyvault/vaults.go +++ b/services/keyvault/mgmt/2018-02-14/keyvault/vaults.go @@ -37,7 +37,8 @@ func NewVaultsClient(subscriptionID string) VaultsClient { return NewVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVaultsClientWithBaseURI creates an instance of the VaultsClient client. +// 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)} } diff --git a/services/keyvault/v7.0/keyvault/keyvaultapi/interfaces.go b/services/keyvault/v7.0/keyvault/keyvaultapi/interfaces.go index 681d00640327..a9868c1d4e8e 100644 --- a/services/keyvault/v7.0/keyvault/keyvaultapi/interfaces.go +++ b/services/keyvault/v7.0/keyvault/keyvaultapi/interfaces.go @@ -45,30 +45,44 @@ type BaseClientAPI interface { GetCertificateContacts(ctx context.Context, vaultBaseURL string) (result keyvault.Contacts, err error) GetCertificateIssuer(ctx context.Context, vaultBaseURL string, issuerName string) (result keyvault.IssuerBundle, err error) GetCertificateIssuers(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateIssuerListResultPage, err error) + GetCertificateIssuersComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.CertificateIssuerListResultIterator, err error) GetCertificateOperation(ctx context.Context, vaultBaseURL string, certificateName string) (result keyvault.CertificateOperation, err error) GetCertificatePolicy(ctx context.Context, vaultBaseURL string, certificateName string) (result keyvault.CertificatePolicy, err error) GetCertificates(ctx context.Context, vaultBaseURL string, maxresults *int32, includePending *bool) (result keyvault.CertificateListResultPage, err error) + GetCertificatesComplete(ctx context.Context, vaultBaseURL string, maxresults *int32, includePending *bool) (result keyvault.CertificateListResultIterator, err error) GetCertificateVersions(ctx context.Context, vaultBaseURL string, certificateName string, maxresults *int32) (result keyvault.CertificateListResultPage, err error) + GetCertificateVersionsComplete(ctx context.Context, vaultBaseURL string, certificateName string, maxresults *int32) (result keyvault.CertificateListResultIterator, err error) GetDeletedCertificate(ctx context.Context, vaultBaseURL string, certificateName string) (result keyvault.DeletedCertificateBundle, err error) GetDeletedCertificates(ctx context.Context, vaultBaseURL string, maxresults *int32, includePending *bool) (result keyvault.DeletedCertificateListResultPage, err error) + GetDeletedCertificatesComplete(ctx context.Context, vaultBaseURL string, maxresults *int32, includePending *bool) (result keyvault.DeletedCertificateListResultIterator, err error) GetDeletedKey(ctx context.Context, vaultBaseURL string, keyName string) (result keyvault.DeletedKeyBundle, err error) GetDeletedKeys(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedKeyListResultPage, err error) + GetDeletedKeysComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedKeyListResultIterator, err error) GetDeletedSasDefinition(ctx context.Context, vaultBaseURL string, storageAccountName string, sasDefinitionName string) (result keyvault.DeletedSasDefinitionBundle, err error) GetDeletedSasDefinitions(ctx context.Context, vaultBaseURL string, storageAccountName string, maxresults *int32) (result keyvault.DeletedSasDefinitionListResultPage, err error) + GetDeletedSasDefinitionsComplete(ctx context.Context, vaultBaseURL string, storageAccountName string, maxresults *int32) (result keyvault.DeletedSasDefinitionListResultIterator, err error) GetDeletedSecret(ctx context.Context, vaultBaseURL string, secretName string) (result keyvault.DeletedSecretBundle, err error) GetDeletedSecrets(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedSecretListResultPage, err error) + GetDeletedSecretsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedSecretListResultIterator, err error) GetDeletedStorageAccount(ctx context.Context, vaultBaseURL string, storageAccountName string) (result keyvault.DeletedStorageBundle, err error) GetDeletedStorageAccounts(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedStorageListResultPage, err error) + GetDeletedStorageAccountsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.DeletedStorageListResultIterator, err error) GetKey(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string) (result keyvault.KeyBundle, err error) GetKeys(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.KeyListResultPage, err error) + GetKeysComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.KeyListResultIterator, err error) GetKeyVersions(ctx context.Context, vaultBaseURL string, keyName string, maxresults *int32) (result keyvault.KeyListResultPage, err error) + GetKeyVersionsComplete(ctx context.Context, vaultBaseURL string, keyName string, maxresults *int32) (result keyvault.KeyListResultIterator, err error) GetSasDefinition(ctx context.Context, vaultBaseURL string, storageAccountName string, sasDefinitionName string) (result keyvault.SasDefinitionBundle, err error) GetSasDefinitions(ctx context.Context, vaultBaseURL string, storageAccountName string, maxresults *int32) (result keyvault.SasDefinitionListResultPage, err error) + GetSasDefinitionsComplete(ctx context.Context, vaultBaseURL string, storageAccountName string, maxresults *int32) (result keyvault.SasDefinitionListResultIterator, err error) GetSecret(ctx context.Context, vaultBaseURL string, secretName string, secretVersion string) (result keyvault.SecretBundle, err error) GetSecrets(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.SecretListResultPage, err error) + GetSecretsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.SecretListResultIterator, err error) GetSecretVersions(ctx context.Context, vaultBaseURL string, secretName string, maxresults *int32) (result keyvault.SecretListResultPage, err error) + GetSecretVersionsComplete(ctx context.Context, vaultBaseURL string, secretName string, maxresults *int32) (result keyvault.SecretListResultIterator, err error) GetStorageAccount(ctx context.Context, vaultBaseURL string, storageAccountName string) (result keyvault.StorageBundle, err error) GetStorageAccounts(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.StorageListResultPage, err error) + GetStorageAccountsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result keyvault.StorageListResultIterator, err error) ImportCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters keyvault.CertificateImportParameters) (result keyvault.CertificateBundle, err error) ImportKey(ctx context.Context, vaultBaseURL string, keyName string, parameters keyvault.KeyImportParameters) (result keyvault.KeyBundle, err error) MergeCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters keyvault.CertificateMergeParameters) (result keyvault.CertificateBundle, err error) diff --git a/services/kusto/mgmt/2019-01-21/kusto/client.go b/services/kusto/mgmt/2019-01-21/kusto/client.go index 87f3f39a9465..d5c41de61c27 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/client.go +++ b/services/kusto/mgmt/2019-01-21/kusto/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/kusto/mgmt/2019-01-21/kusto/clusters.go b/services/kusto/mgmt/2019-01-21/kusto/clusters.go index 143194151d97..febedf952480 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/clusters.go +++ b/services/kusto/mgmt/2019-01-21/kusto/clusters.go @@ -38,7 +38,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-01-21/kusto/databases.go b/services/kusto/mgmt/2019-01-21/kusto/databases.go index c8e3fd081ef9..783e0aabbc9b 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/databases.go +++ b/services/kusto/mgmt/2019-01-21/kusto/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go b/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go index effd44134df0..9e1776712ade 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go +++ b/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go @@ -38,7 +38,8 @@ func NewDataConnectionsClient(subscriptionID string) DataConnectionsClient { return NewDataConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataConnectionsClientWithBaseURI creates an instance of the DataConnectionsClient client. +// NewDataConnectionsClientWithBaseURI creates an instance of the DataConnectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataConnectionsClientWithBaseURI(baseURI string, subscriptionID string) DataConnectionsClient { return DataConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-01-21/kusto/kustoapi/interfaces.go b/services/kusto/mgmt/2019-01-21/kusto/kustoapi/interfaces.go index 80a11951ddb8..f4dd78a09b3d 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/kustoapi/interfaces.go +++ b/services/kusto/mgmt/2019-01-21/kusto/kustoapi/interfaces.go @@ -70,6 +70,7 @@ var _ DataConnectionsClientAPI = (*kusto.DataConnectionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result kusto.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result kusto.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*kusto.OperationsClient)(nil) diff --git a/services/kusto/mgmt/2019-01-21/kusto/operations.go b/services/kusto/mgmt/2019-01-21/kusto/operations.go index 23cf4c0296be..09a0831566df 100644 --- a/services/kusto/mgmt/2019-01-21/kusto/operations.go +++ b/services/kusto/mgmt/2019-01-21/kusto/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/kusto/mgmt/2019-05-15/kusto/client.go b/services/kusto/mgmt/2019-05-15/kusto/client.go index 33a7c71a46b9..38114f352541 100644 --- a/services/kusto/mgmt/2019-05-15/kusto/client.go +++ b/services/kusto/mgmt/2019-05-15/kusto/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/kusto/mgmt/2019-05-15/kusto/clusters.go b/services/kusto/mgmt/2019-05-15/kusto/clusters.go index 622255fc9491..c60046a539a9 100644 --- a/services/kusto/mgmt/2019-05-15/kusto/clusters.go +++ b/services/kusto/mgmt/2019-05-15/kusto/clusters.go @@ -38,7 +38,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-05-15/kusto/databases.go b/services/kusto/mgmt/2019-05-15/kusto/databases.go index 9d1b3c96909a..46e97892640e 100644 --- a/services/kusto/mgmt/2019-05-15/kusto/databases.go +++ b/services/kusto/mgmt/2019-05-15/kusto/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-05-15/kusto/dataconnections.go b/services/kusto/mgmt/2019-05-15/kusto/dataconnections.go index d026779854ed..96f9cff726a2 100644 --- a/services/kusto/mgmt/2019-05-15/kusto/dataconnections.go +++ b/services/kusto/mgmt/2019-05-15/kusto/dataconnections.go @@ -38,7 +38,8 @@ func NewDataConnectionsClient(subscriptionID string) DataConnectionsClient { return NewDataConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataConnectionsClientWithBaseURI creates an instance of the DataConnectionsClient client. +// NewDataConnectionsClientWithBaseURI creates an instance of the DataConnectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataConnectionsClientWithBaseURI(baseURI string, subscriptionID string) DataConnectionsClient { return DataConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-05-15/kusto/kustoapi/interfaces.go b/services/kusto/mgmt/2019-05-15/kusto/kustoapi/interfaces.go index f5661f19060c..3502a75ba0e0 100644 --- a/services/kusto/mgmt/2019-05-15/kusto/kustoapi/interfaces.go +++ b/services/kusto/mgmt/2019-05-15/kusto/kustoapi/interfaces.go @@ -70,6 +70,7 @@ var _ DataConnectionsClientAPI = (*kusto.DataConnectionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result kusto.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result kusto.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*kusto.OperationsClient)(nil) diff --git a/services/kusto/mgmt/2019-05-15/kusto/operations.go b/services/kusto/mgmt/2019-05-15/kusto/operations.go index 3a47798bc40c..b499a25afcc9 100644 --- a/services/kusto/mgmt/2019-05-15/kusto/operations.go +++ b/services/kusto/mgmt/2019-05-15/kusto/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/kusto/mgmt/2019-09-07/kusto/attacheddatabaseconfigurations.go b/services/kusto/mgmt/2019-09-07/kusto/attacheddatabaseconfigurations.go index c2d6c459235b..8178a3513697 100644 --- a/services/kusto/mgmt/2019-09-07/kusto/attacheddatabaseconfigurations.go +++ b/services/kusto/mgmt/2019-09-07/kusto/attacheddatabaseconfigurations.go @@ -39,7 +39,8 @@ func NewAttachedDatabaseConfigurationsClient(subscriptionID string) AttachedData } // NewAttachedDatabaseConfigurationsClientWithBaseURI creates an instance of the AttachedDatabaseConfigurationsClient -// 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 NewAttachedDatabaseConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) AttachedDatabaseConfigurationsClient { return AttachedDatabaseConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-09-07/kusto/client.go b/services/kusto/mgmt/2019-09-07/kusto/client.go index de3e2cda6fb4..445ef9069802 100644 --- a/services/kusto/mgmt/2019-09-07/kusto/client.go +++ b/services/kusto/mgmt/2019-09-07/kusto/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/kusto/mgmt/2019-09-07/kusto/clusters.go b/services/kusto/mgmt/2019-09-07/kusto/clusters.go index 3d5a6c656874..e515feb04ce9 100644 --- a/services/kusto/mgmt/2019-09-07/kusto/clusters.go +++ b/services/kusto/mgmt/2019-09-07/kusto/clusters.go @@ -38,7 +38,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-09-07/kusto/databases.go b/services/kusto/mgmt/2019-09-07/kusto/databases.go index f9f67be0601a..2c795c6de349 100644 --- a/services/kusto/mgmt/2019-09-07/kusto/databases.go +++ b/services/kusto/mgmt/2019-09-07/kusto/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-09-07/kusto/dataconnections.go b/services/kusto/mgmt/2019-09-07/kusto/dataconnections.go index 8e3f1ff254a7..0b0b697fb517 100644 --- a/services/kusto/mgmt/2019-09-07/kusto/dataconnections.go +++ b/services/kusto/mgmt/2019-09-07/kusto/dataconnections.go @@ -38,7 +38,8 @@ func NewDataConnectionsClient(subscriptionID string) DataConnectionsClient { return NewDataConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataConnectionsClientWithBaseURI creates an instance of the DataConnectionsClient client. +// NewDataConnectionsClientWithBaseURI creates an instance of the DataConnectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataConnectionsClientWithBaseURI(baseURI string, subscriptionID string) DataConnectionsClient { return DataConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/kusto/mgmt/2019-09-07/kusto/kustoapi/interfaces.go b/services/kusto/mgmt/2019-09-07/kusto/kustoapi/interfaces.go index 32763ab216ba..103768103f7a 100644 --- a/services/kusto/mgmt/2019-09-07/kusto/kustoapi/interfaces.go +++ b/services/kusto/mgmt/2019-09-07/kusto/kustoapi/interfaces.go @@ -82,6 +82,7 @@ var _ DataConnectionsClientAPI = (*kusto.DataConnectionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result kusto.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result kusto.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*kusto.OperationsClient)(nil) diff --git a/services/kusto/mgmt/2019-09-07/kusto/operations.go b/services/kusto/mgmt/2019-09-07/kusto/operations.go index 3fe756252f6f..b984a98244a1 100644 --- a/services/kusto/mgmt/2019-09-07/kusto/operations.go +++ b/services/kusto/mgmt/2019-09-07/kusto/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/kusto/mgmt/2019-11-09/kusto/attacheddatabaseconfigurations.go b/services/kusto/mgmt/2019-11-09/kusto/attacheddatabaseconfigurations.go new file mode 100644 index 000000000000..81bc6742f39b --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/attacheddatabaseconfigurations.go @@ -0,0 +1,371 @@ +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AttachedDatabaseConfigurationsClient is the the Azure Kusto management API provides a RESTful set of web services +// that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, +// update, and delete clusters and databases. +type AttachedDatabaseConfigurationsClient struct { + BaseClient +} + +// NewAttachedDatabaseConfigurationsClient creates an instance of the AttachedDatabaseConfigurationsClient client. +func NewAttachedDatabaseConfigurationsClient(subscriptionID string) AttachedDatabaseConfigurationsClient { + return NewAttachedDatabaseConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAttachedDatabaseConfigurationsClientWithBaseURI creates an instance of the AttachedDatabaseConfigurationsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewAttachedDatabaseConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) AttachedDatabaseConfigurationsClient { + return AttachedDatabaseConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an attached database configuration. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// attachedDatabaseConfigurationName - the name of the attached database configuration. +// parameters - the database parameters supplied to the CreateOrUpdate operation. +func (client AttachedDatabaseConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, parameters AttachedDatabaseConfiguration) (result AttachedDatabaseConfigurationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AttachedDatabaseConfigurationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.AttachedDatabaseConfigurationProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AttachedDatabaseConfigurationProperties.DatabaseName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AttachedDatabaseConfigurationProperties.ClusterResourceID", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("kusto.AttachedDatabaseConfigurationsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AttachedDatabaseConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, parameters AttachedDatabaseConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "attachedDatabaseConfigurationName": autorest.Encode("path", attachedDatabaseConfigurationName), + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}", 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 AttachedDatabaseConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future AttachedDatabaseConfigurationsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AttachedDatabaseConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result AttachedDatabaseConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the attached database configuration with the given name. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// attachedDatabaseConfigurationName - the name of the attached database configuration. +func (client AttachedDatabaseConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string) (result AttachedDatabaseConfigurationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AttachedDatabaseConfigurationsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, attachedDatabaseConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AttachedDatabaseConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "attachedDatabaseConfigurationName": autorest.Encode("path", attachedDatabaseConfigurationName), + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}", 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 AttachedDatabaseConfigurationsClient) DeleteSender(req *http.Request) (future AttachedDatabaseConfigurationsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AttachedDatabaseConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get returns an attached database configuration. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// attachedDatabaseConfigurationName - the name of the attached database configuration. +func (client AttachedDatabaseConfigurationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string) (result AttachedDatabaseConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AttachedDatabaseConfigurationsClient.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, clusterName, attachedDatabaseConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AttachedDatabaseConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "attachedDatabaseConfigurationName": autorest.Encode("path", attachedDatabaseConfigurationName), + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client AttachedDatabaseConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AttachedDatabaseConfigurationsClient) GetResponder(resp *http.Response) (result AttachedDatabaseConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByCluster returns the list of attached database configurations of the given Kusto cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client AttachedDatabaseConfigurationsClient) ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result AttachedDatabaseConfigurationListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AttachedDatabaseConfigurationsClient.ListByCluster") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListByClusterPreparer(ctx, resourceGroupName, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "ListByCluster", nil, "Failure preparing request") + return + } + + resp, err := client.ListByClusterSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "ListByCluster", resp, "Failure sending request") + return + } + + result, err = client.ListByClusterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsClient", "ListByCluster", resp, "Failure responding to request") + } + + return +} + +// ListByClusterPreparer prepares the ListByCluster request. +func (client AttachedDatabaseConfigurationsClient) ListByClusterPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByClusterSender sends the ListByCluster request. The method will close the +// http.Response Body if it receives an error. +func (client AttachedDatabaseConfigurationsClient) ListByClusterSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByClusterResponder handles the response to the ListByCluster request. The method always +// closes the http.Response Body. +func (client AttachedDatabaseConfigurationsClient) ListByClusterResponder(resp *http.Response) (result AttachedDatabaseConfigurationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/kusto/mgmt/2019-11-09/kusto/client.go b/services/kusto/mgmt/2019-11-09/kusto/client.go new file mode 100644 index 000000000000..39efe44303f6 --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/client.go @@ -0,0 +1,53 @@ +// Package kusto implements the Azure ARM Kusto service API version 2019-11-09. +// +// The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to +// manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Kusto + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Kusto. +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/kusto/mgmt/2019-11-09/kusto/clusterprincipalassignments.go b/services/kusto/mgmt/2019-11-09/kusto/clusterprincipalassignments.go new file mode 100644 index 000000000000..6e262dae5754 --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/clusterprincipalassignments.go @@ -0,0 +1,456 @@ +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ClusterPrincipalAssignmentsClient is the the Azure Kusto management API provides a RESTful set of web services that +// interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and +// delete clusters and databases. +type ClusterPrincipalAssignmentsClient struct { + BaseClient +} + +// NewClusterPrincipalAssignmentsClient creates an instance of the ClusterPrincipalAssignmentsClient client. +func NewClusterPrincipalAssignmentsClient(subscriptionID string) ClusterPrincipalAssignmentsClient { + return NewClusterPrincipalAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewClusterPrincipalAssignmentsClientWithBaseURI creates an instance of the ClusterPrincipalAssignmentsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewClusterPrincipalAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) ClusterPrincipalAssignmentsClient { + return ClusterPrincipalAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability checks that the principal assignment name is valid and is not already in use. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// principalAssignmentName - the name of the principal assignment. +func (client ClusterPrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName ClusterPrincipalAssignmentCheckNameRequest) (result CheckNameResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClusterPrincipalAssignmentsClient.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: principalAssignmentName, + Constraints: []validation.Constraint{{Target: "principalAssignmentName.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "principalAssignmentName.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("kusto.ClusterPrincipalAssignmentsClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, resourceGroupName, clusterName, principalAssignmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client ClusterPrincipalAssignmentsClient) CheckNameAvailabilityPreparer(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName ClusterPrincipalAssignmentCheckNameRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/checkPrincipalAssignmentNameAvailability", pathParameters), + autorest.WithJSON(principalAssignmentName), + 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 ClusterPrincipalAssignmentsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client ClusterPrincipalAssignmentsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate create a Kusto cluster principalAssignment. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// principalAssignmentName - the name of the Kusto principalAssignment. +// parameters - the Kusto cluster principalAssignment's parameters supplied for the operation. +func (client ClusterPrincipalAssignmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string, parameters ClusterPrincipalAssignment) (result ClusterPrincipalAssignmentsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClusterPrincipalAssignmentsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ClusterPrincipalProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ClusterPrincipalProperties.PrincipalID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("kusto.ClusterPrincipalAssignmentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, clusterName, principalAssignmentName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ClusterPrincipalAssignmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string, parameters ClusterPrincipalAssignment) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "principalAssignmentName": autorest.Encode("path", principalAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}", 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 ClusterPrincipalAssignmentsClient) CreateOrUpdateSender(req *http.Request) (future ClusterPrincipalAssignmentsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ClusterPrincipalAssignmentsClient) CreateOrUpdateResponder(resp *http.Response) (result ClusterPrincipalAssignment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a Kusto cluster principalAssignment. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// principalAssignmentName - the name of the Kusto principalAssignment. +func (client ClusterPrincipalAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string) (result ClusterPrincipalAssignmentsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClusterPrincipalAssignmentsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, principalAssignmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ClusterPrincipalAssignmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "principalAssignmentName": autorest.Encode("path", principalAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}", 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 ClusterPrincipalAssignmentsClient) DeleteSender(req *http.Request) (future ClusterPrincipalAssignmentsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ClusterPrincipalAssignmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a Kusto cluster principalAssignment. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// principalAssignmentName - the name of the Kusto principalAssignment. +func (client ClusterPrincipalAssignmentsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string) (result ClusterPrincipalAssignment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClusterPrincipalAssignmentsClient.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, clusterName, principalAssignmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ClusterPrincipalAssignmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "principalAssignmentName": autorest.Encode("path", principalAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ClusterPrincipalAssignmentsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ClusterPrincipalAssignmentsClient) GetResponder(resp *http.Response) (result ClusterPrincipalAssignment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Kusto cluster principalAssignments. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client ClusterPrincipalAssignmentsClient) List(ctx context.Context, resourceGroupName string, clusterName string) (result ClusterPrincipalAssignmentListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClusterPrincipalAssignmentsClient.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, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ClusterPrincipalAssignmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments", 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 ClusterPrincipalAssignmentsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ClusterPrincipalAssignmentsClient) ListResponder(resp *http.Response) (result ClusterPrincipalAssignmentListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/kusto/mgmt/2019-11-09/kusto/clusters.go b/services/kusto/mgmt/2019-11-09/kusto/clusters.go new file mode 100644 index 000000000000..3558619217b4 --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/clusters.go @@ -0,0 +1,1158 @@ +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ClustersClient is the the Azure Kusto management API provides a RESTful set of web services that interact with Azure +// Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and +// databases. +type ClustersClient struct { + BaseClient +} + +// NewClustersClient creates an instance of the ClustersClient client. +func NewClustersClient(subscriptionID string) ClustersClient { + return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { + return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability checks that the cluster name is valid and is not already in use. +// Parameters: +// location - azure location. +// clusterName - the name of the cluster. +func (client ClustersClient) CheckNameAvailability(ctx context.Context, location string, clusterName ClusterCheckNameRequest) (result CheckNameResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.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: clusterName, + Constraints: []validation.Constraint{{Target: "clusterName.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "clusterName.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("kusto.ClustersClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, location, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client ClustersClient) CheckNameAvailabilityPreparer(ctx context.Context, location string, clusterName ClusterCheckNameRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/locations/{location}/checkNameAvailability", pathParameters), + autorest.WithJSON(clusterName), + 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 ClustersClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client ClustersClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate create or update a Kusto cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// parameters - the Kusto cluster parameters supplied to the CreateOrUpdate operation. +func (client ClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster) (result ClustersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ClusterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.OptimizedAutoscale", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.OptimizedAutoscale.Version", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ClusterProperties.OptimizedAutoscale.IsEnabled", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ClusterProperties.OptimizedAutoscale.Minimum", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ClusterProperties.OptimizedAutoscale.Maximum", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.ClusterProperties.VirtualNetworkConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.VirtualNetworkConfiguration.SubnetID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ClusterProperties.VirtualNetworkConfiguration.EnginePublicIPID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ClusterProperties.VirtualNetworkConfiguration.DataManagementPublicIPID", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.ClusterProperties.KeyVaultProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.KeyVaultProperties.KeyName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ClusterProperties.KeyVaultProperties.KeyVersion", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ClusterProperties.KeyVaultProperties.KeyVaultURI", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("kusto.ClustersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, clusterName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}", 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 ClustersClient) CreateOrUpdateSender(req *http.Request) (future ClustersCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ClustersClient) CreateOrUpdateResponder(resp *http.Response) (result Cluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a Kusto cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client ClustersClient) Delete(ctx context.Context, resourceGroupName string, clusterName string) (result ClustersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}", 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 ClustersClient) DeleteSender(req *http.Request) (future ClustersDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DetachFollowerDatabases detaches all followers of a database owned by this cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// followerDatabaseToRemove - the follower databases properties to remove. +func (client ClustersClient) DetachFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition) (result ClustersDetachFollowerDatabasesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.DetachFollowerDatabases") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: followerDatabaseToRemove, + Constraints: []validation.Constraint{{Target: "followerDatabaseToRemove.ClusterResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "followerDatabaseToRemove.AttachedDatabaseConfigurationName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("kusto.ClustersClient", "DetachFollowerDatabases", err.Error()) + } + + req, err := client.DetachFollowerDatabasesPreparer(ctx, resourceGroupName, clusterName, followerDatabaseToRemove) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "DetachFollowerDatabases", nil, "Failure preparing request") + return + } + + result, err = client.DetachFollowerDatabasesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "DetachFollowerDatabases", result.Response(), "Failure sending request") + return + } + + return +} + +// DetachFollowerDatabasesPreparer prepares the DetachFollowerDatabases request. +func (client ClustersClient) DetachFollowerDatabasesPreparer(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + followerDatabaseToRemove.DatabaseName = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases", pathParameters), + autorest.WithJSON(followerDatabaseToRemove), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DetachFollowerDatabasesSender sends the DetachFollowerDatabases request. The method will close the +// http.Response Body if it receives an error. +func (client ClustersClient) DetachFollowerDatabasesSender(req *http.Request) (future ClustersDetachFollowerDatabasesFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DetachFollowerDatabasesResponder handles the response to the DetachFollowerDatabases request. The method always +// closes the http.Response Body. +func (client ClustersClient) DetachFollowerDatabasesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// DiagnoseVirtualNetwork diagnoses network connectivity status for external resources on which the service is +// dependent on. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client ClustersClient) DiagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string) (result ClustersDiagnoseVirtualNetworkFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.DiagnoseVirtualNetwork") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DiagnoseVirtualNetworkPreparer(ctx, resourceGroupName, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "DiagnoseVirtualNetwork", nil, "Failure preparing request") + return + } + + result, err = client.DiagnoseVirtualNetworkSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "DiagnoseVirtualNetwork", result.Response(), "Failure sending request") + return + } + + return +} + +// DiagnoseVirtualNetworkPreparer prepares the DiagnoseVirtualNetwork request. +func (client ClustersClient) DiagnoseVirtualNetworkPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/diagnoseVirtualNetwork", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DiagnoseVirtualNetworkSender sends the DiagnoseVirtualNetwork request. The method will close the +// http.Response Body if it receives an error. +func (client ClustersClient) DiagnoseVirtualNetworkSender(req *http.Request) (future ClustersDiagnoseVirtualNetworkFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DiagnoseVirtualNetworkResponder handles the response to the DiagnoseVirtualNetwork request. The method always +// closes the http.Response Body. +func (client ClustersClient) DiagnoseVirtualNetworkResponder(resp *http.Response) (result DiagnoseVirtualNetworkResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a Kusto cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string) (result Cluster, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.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, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ClustersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ClustersClient) GetResponder(resp *http.Response) (result Cluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Kusto clusters within a subscription. +func (client ClustersClient) List(ctx context.Context) (result ClusterListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.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, "kusto.ClustersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters", 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 ClustersClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ClustersClient) ListResponder(resp *http.Response) (result ClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all Kusto clusters within a resource group. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +func (client ClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ClusterListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.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, "kusto.ClustersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters", 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 ClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ClustersClient) ListByResourceGroupResponder(resp *http.Response) (result ClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListFollowerDatabases returns a list of databases that are owned by this cluster and were followed by another +// cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client ClustersClient) ListFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string) (result FollowerDatabaseListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.ListFollowerDatabases") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListFollowerDatabasesPreparer(ctx, resourceGroupName, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListFollowerDatabases", nil, "Failure preparing request") + return + } + + resp, err := client.ListFollowerDatabasesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListFollowerDatabases", resp, "Failure sending request") + return + } + + result, err = client.ListFollowerDatabasesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListFollowerDatabases", resp, "Failure responding to request") + } + + return +} + +// ListFollowerDatabasesPreparer prepares the ListFollowerDatabases request. +func (client ClustersClient) ListFollowerDatabasesPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListFollowerDatabasesSender sends the ListFollowerDatabases request. The method will close the +// http.Response Body if it receives an error. +func (client ClustersClient) ListFollowerDatabasesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListFollowerDatabasesResponder handles the response to the ListFollowerDatabases request. The method always +// closes the http.Response Body. +func (client ClustersClient) ListFollowerDatabasesResponder(resp *http.Response) (result FollowerDatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSkus lists eligible SKUs for Kusto resource provider. +func (client ClustersClient) ListSkus(ctx context.Context) (result SkuDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.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) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkus", nil, "Failure preparing request") + return + } + + resp, err := client.ListSkusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkus", resp, "Failure sending request") + return + } + + result, err = client.ListSkusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkus", resp, "Failure responding to request") + } + + return +} + +// ListSkusPreparer prepares the ListSkus request. +func (client ClustersClient) ListSkusPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/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 ClustersClient) ListSkusSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSkusResponder handles the response to the ListSkus request. The method always +// closes the http.Response Body. +func (client ClustersClient) ListSkusResponder(resp *http.Response) (result SkuDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSkusByResource returns the SKUs available for the provided resource. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client ClustersClient) ListSkusByResource(ctx context.Context, resourceGroupName string, clusterName string) (result ListResourceSkusResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.ListSkusByResource") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListSkusByResourcePreparer(ctx, resourceGroupName, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkusByResource", nil, "Failure preparing request") + return + } + + resp, err := client.ListSkusByResourceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkusByResource", resp, "Failure sending request") + return + } + + result, err = client.ListSkusByResourceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "ListSkusByResource", resp, "Failure responding to request") + } + + return +} + +// ListSkusByResourcePreparer prepares the ListSkusByResource request. +func (client ClustersClient) ListSkusByResourcePreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSkusByResourceSender sends the ListSkusByResource request. The method will close the +// http.Response Body if it receives an error. +func (client ClustersClient) ListSkusByResourceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSkusByResourceResponder handles the response to the ListSkusByResource request. The method always +// closes the http.Response Body. +func (client ClustersClient) ListSkusByResourceResponder(resp *http.Response) (result ListResourceSkusResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Start starts a Kusto cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client ClustersClient) Start(ctx context.Context, resourceGroupName string, clusterName string) (result ClustersStartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.Start") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartPreparer(ctx, resourceGroupName, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Start", nil, "Failure preparing request") + return + } + + result, err = client.StartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Start", result.Response(), "Failure sending request") + return + } + + return +} + +// StartPreparer prepares the Start request. +func (client ClustersClient) StartPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/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 ClustersClient) StartSender(req *http.Request) (future ClustersStartFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// StartResponder handles the response to the Start request. The method always +// closes the http.Response Body. +func (client ClustersClient) StartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Stop stops a Kusto cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client ClustersClient) Stop(ctx context.Context, resourceGroupName string, clusterName string) (result ClustersStopFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.Stop") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StopPreparer(ctx, resourceGroupName, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Stop", nil, "Failure preparing request") + return + } + + result, err = client.StopSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Stop", result.Response(), "Failure sending request") + return + } + + return +} + +// StopPreparer prepares the Stop request. +func (client ClustersClient) StopPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/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 ClustersClient) StopSender(req *http.Request) (future ClustersStopFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// StopResponder handles the response to the Stop request. The method always +// closes the http.Response Body. +func (client ClustersClient) StopResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update update a Kusto cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// parameters - the Kusto cluster parameters supplied to the Update operation. +func (client ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate) (result ClustersUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, clusterName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}", 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 ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ClustersClient) UpdateResponder(resp *http.Response) (result Cluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/kusto/mgmt/2019-11-09/kusto/databaseprincipalassignments.go b/services/kusto/mgmt/2019-11-09/kusto/databaseprincipalassignments.go new file mode 100644 index 000000000000..88e11e0d490e --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/databaseprincipalassignments.go @@ -0,0 +1,466 @@ +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DatabasePrincipalAssignmentsClient is the the Azure Kusto management API provides a RESTful set of web services that +// interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and +// delete clusters and databases. +type DatabasePrincipalAssignmentsClient struct { + BaseClient +} + +// NewDatabasePrincipalAssignmentsClient creates an instance of the DatabasePrincipalAssignmentsClient client. +func NewDatabasePrincipalAssignmentsClient(subscriptionID string) DatabasePrincipalAssignmentsClient { + return NewDatabasePrincipalAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDatabasePrincipalAssignmentsClientWithBaseURI creates an instance of the DatabasePrincipalAssignmentsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewDatabasePrincipalAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) DatabasePrincipalAssignmentsClient { + return DatabasePrincipalAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability checks that the database principal assignment is valid and is not already in use. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// principalAssignmentName - the name of the resource. +func (client DatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName DatabasePrincipalAssignmentCheckNameRequest) (result CheckNameResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasePrincipalAssignmentsClient.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: principalAssignmentName, + Constraints: []validation.Constraint{{Target: "principalAssignmentName.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "principalAssignmentName.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("kusto.DatabasePrincipalAssignmentsClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client DatabasePrincipalAssignmentsClient) CheckNameAvailabilityPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName DatabasePrincipalAssignmentCheckNameRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}/checkPrincipalAssignmentNameAvailability", pathParameters), + autorest.WithJSON(principalAssignmentName), + 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 DatabasePrincipalAssignmentsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client DatabasePrincipalAssignmentsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates a Kusto cluster database principalAssignment. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// principalAssignmentName - the name of the Kusto principalAssignment. +// parameters - the Kusto principalAssignments parameters supplied for the operation. +func (client DatabasePrincipalAssignmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, parameters DatabasePrincipalAssignment) (result DatabasePrincipalAssignmentsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasePrincipalAssignmentsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.DatabasePrincipalProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DatabasePrincipalProperties.PrincipalID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("kusto.DatabasePrincipalAssignmentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DatabasePrincipalAssignmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, parameters DatabasePrincipalAssignment) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "principalAssignmentName": autorest.Encode("path", principalAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}", 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 DatabasePrincipalAssignmentsClient) CreateOrUpdateSender(req *http.Request) (future DatabasePrincipalAssignmentsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DatabasePrincipalAssignmentsClient) CreateOrUpdateResponder(resp *http.Response) (result DatabasePrincipalAssignment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a Kusto principalAssignment. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// principalAssignmentName - the name of the Kusto principalAssignment. +func (client DatabasePrincipalAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string) (result DatabasePrincipalAssignmentsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasePrincipalAssignmentsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DatabasePrincipalAssignmentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "principalAssignmentName": autorest.Encode("path", principalAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}", 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 DatabasePrincipalAssignmentsClient) DeleteSender(req *http.Request) (future DatabasePrincipalAssignmentsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DatabasePrincipalAssignmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a Kusto cluster database principalAssignment. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// principalAssignmentName - the name of the Kusto principalAssignment. +func (client DatabasePrincipalAssignmentsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string) (result DatabasePrincipalAssignment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasePrincipalAssignmentsClient.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, clusterName, databaseName, principalAssignmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DatabasePrincipalAssignmentsClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "principalAssignmentName": autorest.Encode("path", principalAssignmentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasePrincipalAssignmentsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DatabasePrincipalAssignmentsClient) GetResponder(resp *http.Response) (result DatabasePrincipalAssignment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all Kusto cluster database principalAssignments. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +func (client DatabasePrincipalAssignmentsClient) List(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result DatabasePrincipalAssignmentListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasePrincipalAssignmentsClient.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, clusterName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client DatabasePrincipalAssignmentsClient) ListPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments", 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 DatabasePrincipalAssignmentsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DatabasePrincipalAssignmentsClient) ListResponder(resp *http.Response) (result DatabasePrincipalAssignmentListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/kusto/mgmt/2019-11-09/kusto/databases.go b/services/kusto/mgmt/2019-11-09/kusto/databases.go new file mode 100644 index 000000000000..37d9457eabfc --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/databases.go @@ -0,0 +1,772 @@ +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DatabasesClient is the the Azure Kusto management API provides a RESTful set of web services that interact with +// Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete +// clusters and databases. +type DatabasesClient struct { + BaseClient +} + +// NewDatabasesClient creates an instance of the DatabasesClient client. +func NewDatabasesClient(subscriptionID string) DatabasesClient { + return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { + return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// AddPrincipals add Database principals permissions. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// databasePrincipalsToAdd - list of database principals to add. +func (client DatabasesClient) AddPrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToAdd DatabasePrincipalListRequest) (result DatabasePrincipalListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.AddPrincipals") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.AddPrincipalsPreparer(ctx, resourceGroupName, clusterName, databaseName, databasePrincipalsToAdd) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "AddPrincipals", nil, "Failure preparing request") + return + } + + resp, err := client.AddPrincipalsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "AddPrincipals", resp, "Failure sending request") + return + } + + result, err = client.AddPrincipalsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "AddPrincipals", resp, "Failure responding to request") + } + + return +} + +// AddPrincipalsPreparer prepares the AddPrincipals request. +func (client DatabasesClient) AddPrincipalsPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToAdd DatabasePrincipalListRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}/addPrincipals", pathParameters), + autorest.WithJSON(databasePrincipalsToAdd), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AddPrincipalsSender sends the AddPrincipals request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasesClient) AddPrincipalsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// AddPrincipalsResponder handles the response to the AddPrincipals request. The method always +// closes the http.Response Body. +func (client DatabasesClient) AddPrincipalsResponder(resp *http.Response) (result DatabasePrincipalListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CheckNameAvailability checks that the database name is valid and is not already in use. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// resourceName - the name of the resource. +func (client DatabasesClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, resourceName CheckNameRequest) (result CheckNameResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.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: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("kusto.DatabasesClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, resourceGroupName, clusterName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client DatabasesClient) CheckNameAvailabilityPreparer(ctx context.Context, resourceGroupName string, clusterName string, resourceName CheckNameRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/checkNameAvailability", pathParameters), + autorest.WithJSON(resourceName), + 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 DatabasesClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client DatabasesClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates a database. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// parameters - the database parameters supplied to the CreateOrUpdate operation. +func (client DatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters BasicDatabase) (result DatabasesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, clusterName, databaseName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters BasicDatabase) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}", 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 DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the database with the given name. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result DatabasesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DatabasesClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}", 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 DatabasesClient) DeleteSender(req *http.Request) (future DatabasesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get returns a database. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result DatabaseModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.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, clusterName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DatabasesClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DatabasesClient) GetResponder(resp *http.Response) (result DatabaseModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByCluster returns the list of databases of the given Kusto cluster. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +func (client DatabasesClient) ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result DatabaseListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByCluster") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListByClusterPreparer(ctx, resourceGroupName, clusterName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "ListByCluster", nil, "Failure preparing request") + return + } + + resp, err := client.ListByClusterSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "ListByCluster", resp, "Failure sending request") + return + } + + result, err = client.ListByClusterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "ListByCluster", resp, "Failure responding to request") + } + + return +} + +// ListByClusterPreparer prepares the ListByCluster request. +func (client DatabasesClient) ListByClusterPreparer(ctx context.Context, resourceGroupName string, clusterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByClusterSender sends the ListByCluster request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasesClient) ListByClusterSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByClusterResponder handles the response to the ListByCluster request. The method always +// closes the http.Response Body. +func (client DatabasesClient) ListByClusterResponder(resp *http.Response) (result DatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListPrincipals returns a list of database principals of the given Kusto cluster and database. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +func (client DatabasesClient) ListPrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result DatabasePrincipalListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListPrincipals") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPrincipalsPreparer(ctx, resourceGroupName, clusterName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "ListPrincipals", nil, "Failure preparing request") + return + } + + resp, err := client.ListPrincipalsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "ListPrincipals", resp, "Failure sending request") + return + } + + result, err = client.ListPrincipalsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "ListPrincipals", resp, "Failure responding to request") + } + + return +} + +// ListPrincipalsPreparer prepares the ListPrincipals request. +func (client DatabasesClient) ListPrincipalsPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/listPrincipals", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListPrincipalsSender sends the ListPrincipals request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasesClient) ListPrincipalsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListPrincipalsResponder handles the response to the ListPrincipals request. The method always +// closes the http.Response Body. +func (client DatabasesClient) ListPrincipalsResponder(resp *http.Response) (result DatabasePrincipalListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RemovePrincipals remove Database principals permissions. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// databasePrincipalsToRemove - list of database principals to remove. +func (client DatabasesClient) RemovePrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToRemove DatabasePrincipalListRequest) (result DatabasePrincipalListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.RemovePrincipals") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RemovePrincipalsPreparer(ctx, resourceGroupName, clusterName, databaseName, databasePrincipalsToRemove) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "RemovePrincipals", nil, "Failure preparing request") + return + } + + resp, err := client.RemovePrincipalsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "RemovePrincipals", resp, "Failure sending request") + return + } + + result, err = client.RemovePrincipalsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "RemovePrincipals", resp, "Failure responding to request") + } + + return +} + +// RemovePrincipalsPreparer prepares the RemovePrincipals request. +func (client DatabasesClient) RemovePrincipalsPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToRemove DatabasePrincipalListRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}/removePrincipals", pathParameters), + autorest.WithJSON(databasePrincipalsToRemove), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RemovePrincipalsSender sends the RemovePrincipals request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasesClient) RemovePrincipalsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// RemovePrincipalsResponder handles the response to the RemovePrincipals request. The method always +// closes the http.Response Body. +func (client DatabasesClient) RemovePrincipalsResponder(resp *http.Response) (result DatabasePrincipalListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates a database. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// parameters - the database parameters supplied to the Update operation. +func (client DatabasesClient) Update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters BasicDatabase) (result DatabasesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, clusterName, databaseName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client DatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters BasicDatabase) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}", 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 DatabasesClient) UpdateSender(req *http.Request) (future DatabasesUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DatabasesClient) UpdateResponder(resp *http.Response) (result DatabaseModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/kusto/mgmt/2019-11-09/kusto/dataconnections.go b/services/kusto/mgmt/2019-11-09/kusto/dataconnections.go new file mode 100644 index 000000000000..89c7d45b2e3d --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/dataconnections.go @@ -0,0 +1,624 @@ +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DataConnectionsClient is the the Azure Kusto management API provides a RESTful set of web services that interact +// with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete +// clusters and databases. +type DataConnectionsClient struct { + BaseClient +} + +// NewDataConnectionsClient creates an instance of the DataConnectionsClient client. +func NewDataConnectionsClient(subscriptionID string) DataConnectionsClient { + return NewDataConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDataConnectionsClientWithBaseURI creates an instance of the DataConnectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDataConnectionsClientWithBaseURI(baseURI string, subscriptionID string) DataConnectionsClient { + return DataConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability checks that the data connection name is valid and is not already in use. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// dataConnectionName - the name of the data connection. +func (client DataConnectionsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName DataConnectionCheckNameRequest) (result CheckNameResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectionsClient.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: dataConnectionName, + Constraints: []validation.Constraint{{Target: "dataConnectionName.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "dataConnectionName.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("kusto.DataConnectionsClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client DataConnectionsClient) CheckNameAvailabilityPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName DataConnectionCheckNameRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}/checkNameAvailability", pathParameters), + autorest.WithJSON(dataConnectionName), + 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 DataConnectionsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client DataConnectionsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates a data connection. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// dataConnectionName - the name of the data connection. +// parameters - the data connection parameters supplied to the CreateOrUpdate operation. +func (client DataConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters BasicDataConnection) (result DataConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DataConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters BasicDataConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "dataConnectionName": autorest.Encode("path", dataConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", 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 DataConnectionsClient) CreateOrUpdateSender(req *http.Request) (future DataConnectionsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DataConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result DataConnectionModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DataConnectionValidationMethod checks that the data connection parameters are valid. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// parameters - the data connection parameters supplied to the CreateOrUpdate operation. +func (client DataConnectionsClient) DataConnectionValidationMethod(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DataConnectionValidation) (result DataConnectionValidationListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectionsClient.DataConnectionValidationMethod") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DataConnectionValidationMethodPreparer(ctx, resourceGroupName, clusterName, databaseName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "DataConnectionValidationMethod", nil, "Failure preparing request") + return + } + + resp, err := client.DataConnectionValidationMethodSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "DataConnectionValidationMethod", resp, "Failure sending request") + return + } + + result, err = client.DataConnectionValidationMethodResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "DataConnectionValidationMethod", resp, "Failure responding to request") + } + + return +} + +// DataConnectionValidationMethodPreparer prepares the DataConnectionValidationMethod request. +func (client DataConnectionsClient) DataConnectionValidationMethodPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DataConnectionValidation) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnectionValidation", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DataConnectionValidationMethodSender sends the DataConnectionValidationMethod request. The method will close the +// http.Response Body if it receives an error. +func (client DataConnectionsClient) DataConnectionValidationMethodSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DataConnectionValidationMethodResponder handles the response to the DataConnectionValidationMethod request. The method always +// closes the http.Response Body. +func (client DataConnectionsClient) DataConnectionValidationMethodResponder(resp *http.Response) (result DataConnectionValidationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the data connection with the given name. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// dataConnectionName - the name of the data connection. +func (client DataConnectionsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string) (result DataConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectionsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DataConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "dataConnectionName": autorest.Encode("path", dataConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", 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 DataConnectionsClient) DeleteSender(req *http.Request) (future DataConnectionsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DataConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get returns a data connection. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// dataConnectionName - the name of the data connection. +func (client DataConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string) (result DataConnectionModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectionsClient.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, clusterName, databaseName, dataConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DataConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "dataConnectionName": autorest.Encode("path", dataConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DataConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DataConnectionsClient) GetResponder(resp *http.Response) (result DataConnectionModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabase returns the list of data connections of the given Kusto database. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +func (client DataConnectionsClient) ListByDatabase(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result DataConnectionListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectionsClient.ListByDatabase") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, clusterName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client DataConnectionsClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client DataConnectionsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client DataConnectionsClient) ListByDatabaseResponder(resp *http.Response) (result DataConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates a data connection. +// Parameters: +// resourceGroupName - the name of the resource group containing the Kusto cluster. +// clusterName - the name of the Kusto cluster. +// databaseName - the name of the database in the Kusto cluster. +// dataConnectionName - the name of the data connection. +// parameters - the data connection parameters supplied to the Update operation. +func (client DataConnectionsClient) Update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters BasicDataConnection) (result DataConnectionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DataConnectionsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client DataConnectionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters BasicDataConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "databaseName": autorest.Encode("path", databaseName), + "dataConnectionName": autorest.Encode("path", dataConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-09" + 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.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", 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 DataConnectionsClient) UpdateSender(req *http.Request) (future DataConnectionsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DataConnectionsClient) UpdateResponder(resp *http.Response) (result DataConnectionModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/kusto/mgmt/2019-11-09/kusto/kustoapi/interfaces.go b/services/kusto/mgmt/2019-11-09/kusto/kustoapi/interfaces.go new file mode 100644 index 000000000000..36d28b4d3aae --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/kustoapi/interfaces.go @@ -0,0 +1,111 @@ +package kustoapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-11-09/kusto" +) + +// ClustersClientAPI contains the set of methods on the ClustersClient type. +type ClustersClientAPI interface { + CheckNameAvailability(ctx context.Context, location string, clusterName kusto.ClusterCheckNameRequest) (result kusto.CheckNameResult, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters kusto.Cluster) (result kusto.ClustersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.ClustersDeleteFuture, err error) + DetachFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove kusto.FollowerDatabaseDefinition) (result kusto.ClustersDetachFollowerDatabasesFuture, err error) + DiagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.ClustersDiagnoseVirtualNetworkFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.Cluster, err error) + List(ctx context.Context) (result kusto.ClusterListResult, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result kusto.ClusterListResult, err error) + ListFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.FollowerDatabaseListResult, err error) + ListSkus(ctx context.Context) (result kusto.SkuDescriptionList, err error) + ListSkusByResource(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.ListResourceSkusResult, err error) + Start(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.ClustersStartFuture, err error) + Stop(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.ClustersStopFuture, err error) + Update(ctx context.Context, resourceGroupName string, clusterName string, parameters kusto.ClusterUpdate) (result kusto.ClustersUpdateFuture, err error) +} + +var _ ClustersClientAPI = (*kusto.ClustersClient)(nil) + +// ClusterPrincipalAssignmentsClientAPI contains the set of methods on the ClusterPrincipalAssignmentsClient type. +type ClusterPrincipalAssignmentsClientAPI interface { + CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName kusto.ClusterPrincipalAssignmentCheckNameRequest) (result kusto.CheckNameResult, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string, parameters kusto.ClusterPrincipalAssignment) (result kusto.ClusterPrincipalAssignmentsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string) (result kusto.ClusterPrincipalAssignmentsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string) (result kusto.ClusterPrincipalAssignment, err error) + List(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.ClusterPrincipalAssignmentListResult, err error) +} + +var _ ClusterPrincipalAssignmentsClientAPI = (*kusto.ClusterPrincipalAssignmentsClient)(nil) + +// DatabasesClientAPI contains the set of methods on the DatabasesClient type. +type DatabasesClientAPI interface { + AddPrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToAdd kusto.DatabasePrincipalListRequest) (result kusto.DatabasePrincipalListResult, err error) + CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, resourceName kusto.CheckNameRequest) (result kusto.CheckNameResult, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters kusto.BasicDatabase) (result kusto.DatabasesCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result kusto.DatabasesDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result kusto.DatabaseModel, err error) + ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.DatabaseListResult, err error) + ListPrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result kusto.DatabasePrincipalListResult, err error) + RemovePrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToRemove kusto.DatabasePrincipalListRequest) (result kusto.DatabasePrincipalListResult, err error) + Update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters kusto.BasicDatabase) (result kusto.DatabasesUpdateFuture, err error) +} + +var _ DatabasesClientAPI = (*kusto.DatabasesClient)(nil) + +// DatabasePrincipalAssignmentsClientAPI contains the set of methods on the DatabasePrincipalAssignmentsClient type. +type DatabasePrincipalAssignmentsClientAPI interface { + CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName kusto.DatabasePrincipalAssignmentCheckNameRequest) (result kusto.CheckNameResult, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, parameters kusto.DatabasePrincipalAssignment) (result kusto.DatabasePrincipalAssignmentsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string) (result kusto.DatabasePrincipalAssignmentsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string) (result kusto.DatabasePrincipalAssignment, err error) + List(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result kusto.DatabasePrincipalAssignmentListResult, err error) +} + +var _ DatabasePrincipalAssignmentsClientAPI = (*kusto.DatabasePrincipalAssignmentsClient)(nil) + +// AttachedDatabaseConfigurationsClientAPI contains the set of methods on the AttachedDatabaseConfigurationsClient type. +type AttachedDatabaseConfigurationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, parameters kusto.AttachedDatabaseConfiguration) (result kusto.AttachedDatabaseConfigurationsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string) (result kusto.AttachedDatabaseConfigurationsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string) (result kusto.AttachedDatabaseConfiguration, err error) + ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result kusto.AttachedDatabaseConfigurationListResult, err error) +} + +var _ AttachedDatabaseConfigurationsClientAPI = (*kusto.AttachedDatabaseConfigurationsClient)(nil) + +// DataConnectionsClientAPI contains the set of methods on the DataConnectionsClient type. +type DataConnectionsClientAPI interface { + CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName kusto.DataConnectionCheckNameRequest) (result kusto.CheckNameResult, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters kusto.BasicDataConnection) (result kusto.DataConnectionsCreateOrUpdateFuture, err error) + DataConnectionValidationMethod(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters kusto.DataConnectionValidation) (result kusto.DataConnectionValidationListResult, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string) (result kusto.DataConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string) (result kusto.DataConnectionModel, err error) + ListByDatabase(ctx context.Context, resourceGroupName string, clusterName string, databaseName string) (result kusto.DataConnectionListResult, err error) + Update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters kusto.BasicDataConnection) (result kusto.DataConnectionsUpdateFuture, err error) +} + +var _ DataConnectionsClientAPI = (*kusto.DataConnectionsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result kusto.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result kusto.OperationListResultIterator, err error) +} + +var _ OperationsClientAPI = (*kusto.OperationsClient)(nil) diff --git a/services/kusto/mgmt/2019-11-09/kusto/models.go b/services/kusto/mgmt/2019-11-09/kusto/models.go new file mode 100644 index 000000000000..b302fb5dd9b2 --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/models.go @@ -0,0 +1,3120 @@ +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/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/kusto/mgmt/2019-11-09/kusto" + +// AzureScaleType enumerates the values for azure scale type. +type AzureScaleType string + +const ( + // Automatic ... + Automatic AzureScaleType = "automatic" + // Manual ... + Manual AzureScaleType = "manual" + // None ... + None AzureScaleType = "none" +) + +// PossibleAzureScaleTypeValues returns an array of possible values for the AzureScaleType const type. +func PossibleAzureScaleTypeValues() []AzureScaleType { + return []AzureScaleType{Automatic, Manual, None} +} + +// AzureSkuName enumerates the values for azure sku name. +type AzureSkuName string + +const ( + // DevNoSLAStandardD11V2 ... + DevNoSLAStandardD11V2 AzureSkuName = "Dev(No SLA)_Standard_D11_v2" + // StandardD11V2 ... + StandardD11V2 AzureSkuName = "Standard_D11_v2" + // StandardD12V2 ... + StandardD12V2 AzureSkuName = "Standard_D12_v2" + // StandardD13V2 ... + StandardD13V2 AzureSkuName = "Standard_D13_v2" + // StandardD14V2 ... + StandardD14V2 AzureSkuName = "Standard_D14_v2" + // StandardDS13V21TBPS ... + StandardDS13V21TBPS AzureSkuName = "Standard_DS13_v2+1TB_PS" + // StandardDS13V22TBPS ... + StandardDS13V22TBPS AzureSkuName = "Standard_DS13_v2+2TB_PS" + // StandardDS14V23TBPS ... + StandardDS14V23TBPS AzureSkuName = "Standard_DS14_v2+3TB_PS" + // StandardDS14V24TBPS ... + StandardDS14V24TBPS AzureSkuName = "Standard_DS14_v2+4TB_PS" + // StandardL16s ... + StandardL16s AzureSkuName = "Standard_L16s" + // StandardL4s ... + StandardL4s AzureSkuName = "Standard_L4s" + // StandardL8s ... + StandardL8s AzureSkuName = "Standard_L8s" +) + +// PossibleAzureSkuNameValues returns an array of possible values for the AzureSkuName const type. +func PossibleAzureSkuNameValues() []AzureSkuName { + return []AzureSkuName{DevNoSLAStandardD11V2, StandardD11V2, StandardD12V2, StandardD13V2, StandardD14V2, StandardDS13V21TBPS, StandardDS13V22TBPS, StandardDS14V23TBPS, StandardDS14V24TBPS, StandardL16s, StandardL4s, StandardL8s} +} + +// AzureSkuTier enumerates the values for azure sku tier. +type AzureSkuTier string + +const ( + // Basic ... + Basic AzureSkuTier = "Basic" + // Standard ... + Standard AzureSkuTier = "Standard" +) + +// PossibleAzureSkuTierValues returns an array of possible values for the AzureSkuTier const type. +func PossibleAzureSkuTierValues() []AzureSkuTier { + return []AzureSkuTier{Basic, Standard} +} + +// ClusterPrincipalRole enumerates the values for cluster principal role. +type ClusterPrincipalRole string + +const ( + // AllDatabasesAdmin ... + AllDatabasesAdmin ClusterPrincipalRole = "AllDatabasesAdmin" + // AllDatabasesViewer ... + AllDatabasesViewer ClusterPrincipalRole = "AllDatabasesViewer" +) + +// PossibleClusterPrincipalRoleValues returns an array of possible values for the ClusterPrincipalRole const type. +func PossibleClusterPrincipalRoleValues() []ClusterPrincipalRole { + return []ClusterPrincipalRole{AllDatabasesAdmin, AllDatabasesViewer} +} + +// Compression enumerates the values for compression. +type Compression string + +const ( + // CompressionGZip ... + CompressionGZip Compression = "GZip" + // CompressionNone ... + CompressionNone Compression = "None" +) + +// PossibleCompressionValues returns an array of possible values for the Compression const type. +func PossibleCompressionValues() []Compression { + return []Compression{CompressionGZip, CompressionNone} +} + +// DatabasePrincipalRole enumerates the values for database principal role. +type DatabasePrincipalRole string + +const ( + // Admin ... + Admin DatabasePrincipalRole = "Admin" + // Ingestor ... + Ingestor DatabasePrincipalRole = "Ingestor" + // Monitor ... + Monitor DatabasePrincipalRole = "Monitor" + // UnrestrictedViewers ... + UnrestrictedViewers DatabasePrincipalRole = "UnrestrictedViewers" + // User ... + User DatabasePrincipalRole = "User" + // Viewer ... + Viewer DatabasePrincipalRole = "Viewer" +) + +// PossibleDatabasePrincipalRoleValues returns an array of possible values for the DatabasePrincipalRole const type. +func PossibleDatabasePrincipalRoleValues() []DatabasePrincipalRole { + return []DatabasePrincipalRole{Admin, Ingestor, Monitor, UnrestrictedViewers, User, Viewer} +} + +// DatabasePrincipalType enumerates the values for database principal type. +type DatabasePrincipalType string + +const ( + // DatabasePrincipalTypeApp ... + DatabasePrincipalTypeApp DatabasePrincipalType = "App" + // DatabasePrincipalTypeGroup ... + DatabasePrincipalTypeGroup DatabasePrincipalType = "Group" + // DatabasePrincipalTypeUser ... + DatabasePrincipalTypeUser DatabasePrincipalType = "User" +) + +// PossibleDatabasePrincipalTypeValues returns an array of possible values for the DatabasePrincipalType const type. +func PossibleDatabasePrincipalTypeValues() []DatabasePrincipalType { + return []DatabasePrincipalType{DatabasePrincipalTypeApp, DatabasePrincipalTypeGroup, DatabasePrincipalTypeUser} +} + +// DefaultPrincipalsModificationKind enumerates the values for default principals modification kind. +type DefaultPrincipalsModificationKind string + +const ( + // DefaultPrincipalsModificationKindNone ... + DefaultPrincipalsModificationKindNone DefaultPrincipalsModificationKind = "None" + // DefaultPrincipalsModificationKindReplace ... + DefaultPrincipalsModificationKindReplace DefaultPrincipalsModificationKind = "Replace" + // DefaultPrincipalsModificationKindUnion ... + DefaultPrincipalsModificationKindUnion DefaultPrincipalsModificationKind = "Union" +) + +// PossibleDefaultPrincipalsModificationKindValues returns an array of possible values for the DefaultPrincipalsModificationKind const type. +func PossibleDefaultPrincipalsModificationKindValues() []DefaultPrincipalsModificationKind { + return []DefaultPrincipalsModificationKind{DefaultPrincipalsModificationKindNone, DefaultPrincipalsModificationKindReplace, DefaultPrincipalsModificationKindUnion} +} + +// EventGridDataFormat enumerates the values for event grid data format. +type EventGridDataFormat string + +const ( + // AVRO ... + AVRO EventGridDataFormat = "AVRO" + // CSV ... + CSV EventGridDataFormat = "CSV" + // JSON ... + JSON EventGridDataFormat = "JSON" + // MULTIJSON ... + MULTIJSON EventGridDataFormat = "MULTIJSON" + // ORC ... + ORC EventGridDataFormat = "ORC" + // PARQUET ... + PARQUET EventGridDataFormat = "PARQUET" + // PSV ... + PSV EventGridDataFormat = "PSV" + // RAW ... + RAW EventGridDataFormat = "RAW" + // SCSV ... + SCSV EventGridDataFormat = "SCSV" + // SINGLEJSON ... + SINGLEJSON EventGridDataFormat = "SINGLEJSON" + // SOHSV ... + SOHSV EventGridDataFormat = "SOHSV" + // TSV ... + TSV EventGridDataFormat = "TSV" + // TSVE ... + TSVE EventGridDataFormat = "TSVE" + // TXT ... + TXT EventGridDataFormat = "TXT" +) + +// PossibleEventGridDataFormatValues returns an array of possible values for the EventGridDataFormat const type. +func PossibleEventGridDataFormatValues() []EventGridDataFormat { + return []EventGridDataFormat{AVRO, CSV, JSON, MULTIJSON, ORC, PARQUET, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV, TSVE, TXT} +} + +// EventHubDataFormat enumerates the values for event hub data format. +type EventHubDataFormat string + +const ( + // EventHubDataFormatAVRO ... + EventHubDataFormatAVRO EventHubDataFormat = "AVRO" + // EventHubDataFormatCSV ... + EventHubDataFormatCSV EventHubDataFormat = "CSV" + // EventHubDataFormatJSON ... + EventHubDataFormatJSON EventHubDataFormat = "JSON" + // EventHubDataFormatMULTIJSON ... + EventHubDataFormatMULTIJSON EventHubDataFormat = "MULTIJSON" + // EventHubDataFormatORC ... + EventHubDataFormatORC EventHubDataFormat = "ORC" + // EventHubDataFormatPARQUET ... + EventHubDataFormatPARQUET EventHubDataFormat = "PARQUET" + // EventHubDataFormatPSV ... + EventHubDataFormatPSV EventHubDataFormat = "PSV" + // EventHubDataFormatRAW ... + EventHubDataFormatRAW EventHubDataFormat = "RAW" + // EventHubDataFormatSCSV ... + EventHubDataFormatSCSV EventHubDataFormat = "SCSV" + // EventHubDataFormatSINGLEJSON ... + EventHubDataFormatSINGLEJSON EventHubDataFormat = "SINGLEJSON" + // EventHubDataFormatSOHSV ... + EventHubDataFormatSOHSV EventHubDataFormat = "SOHSV" + // EventHubDataFormatTSV ... + EventHubDataFormatTSV EventHubDataFormat = "TSV" + // EventHubDataFormatTSVE ... + EventHubDataFormatTSVE EventHubDataFormat = "TSVE" + // EventHubDataFormatTXT ... + EventHubDataFormatTXT EventHubDataFormat = "TXT" +) + +// PossibleEventHubDataFormatValues returns an array of possible values for the EventHubDataFormat const type. +func PossibleEventHubDataFormatValues() []EventHubDataFormat { + return []EventHubDataFormat{EventHubDataFormatAVRO, EventHubDataFormatCSV, EventHubDataFormatJSON, EventHubDataFormatMULTIJSON, EventHubDataFormatORC, EventHubDataFormatPARQUET, EventHubDataFormatPSV, EventHubDataFormatRAW, EventHubDataFormatSCSV, EventHubDataFormatSINGLEJSON, EventHubDataFormatSOHSV, EventHubDataFormatTSV, EventHubDataFormatTSVE, EventHubDataFormatTXT} +} + +// IdentityType enumerates the values for identity type. +type IdentityType string + +const ( + // IdentityTypeNone ... + IdentityTypeNone IdentityType = "None" + // IdentityTypeSystemAssigned ... + IdentityTypeSystemAssigned IdentityType = "SystemAssigned" +) + +// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{IdentityTypeNone, IdentityTypeSystemAssigned} +} + +// IotHubDataFormat enumerates the values for iot hub data format. +type IotHubDataFormat string + +const ( + // IotHubDataFormatAVRO ... + IotHubDataFormatAVRO IotHubDataFormat = "AVRO" + // IotHubDataFormatCSV ... + IotHubDataFormatCSV IotHubDataFormat = "CSV" + // IotHubDataFormatJSON ... + IotHubDataFormatJSON IotHubDataFormat = "JSON" + // IotHubDataFormatMULTIJSON ... + IotHubDataFormatMULTIJSON IotHubDataFormat = "MULTIJSON" + // IotHubDataFormatORC ... + IotHubDataFormatORC IotHubDataFormat = "ORC" + // IotHubDataFormatPARQUET ... + IotHubDataFormatPARQUET IotHubDataFormat = "PARQUET" + // IotHubDataFormatPSV ... + IotHubDataFormatPSV IotHubDataFormat = "PSV" + // IotHubDataFormatRAW ... + IotHubDataFormatRAW IotHubDataFormat = "RAW" + // IotHubDataFormatSCSV ... + IotHubDataFormatSCSV IotHubDataFormat = "SCSV" + // IotHubDataFormatSINGLEJSON ... + IotHubDataFormatSINGLEJSON IotHubDataFormat = "SINGLEJSON" + // IotHubDataFormatSOHSV ... + IotHubDataFormatSOHSV IotHubDataFormat = "SOHSV" + // IotHubDataFormatTSV ... + IotHubDataFormatTSV IotHubDataFormat = "TSV" + // IotHubDataFormatTSVE ... + IotHubDataFormatTSVE IotHubDataFormat = "TSVE" + // IotHubDataFormatTXT ... + IotHubDataFormatTXT IotHubDataFormat = "TXT" +) + +// PossibleIotHubDataFormatValues returns an array of possible values for the IotHubDataFormat const type. +func PossibleIotHubDataFormatValues() []IotHubDataFormat { + return []IotHubDataFormat{IotHubDataFormatAVRO, IotHubDataFormatCSV, IotHubDataFormatJSON, IotHubDataFormatMULTIJSON, IotHubDataFormatORC, IotHubDataFormatPARQUET, IotHubDataFormatPSV, IotHubDataFormatRAW, IotHubDataFormatSCSV, IotHubDataFormatSINGLEJSON, IotHubDataFormatSOHSV, IotHubDataFormatTSV, IotHubDataFormatTSVE, IotHubDataFormatTXT} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindDatabase ... + KindDatabase Kind = "Database" + // KindReadOnlyFollowing ... + KindReadOnlyFollowing Kind = "ReadOnlyFollowing" + // KindReadWrite ... + KindReadWrite Kind = "ReadWrite" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{KindDatabase, KindReadOnlyFollowing, KindReadWrite} +} + +// KindBasicDataConnection enumerates the values for kind basic data connection. +type KindBasicDataConnection string + +const ( + // KindDataConnection ... + KindDataConnection KindBasicDataConnection = "DataConnection" + // KindEventGrid ... + KindEventGrid KindBasicDataConnection = "EventGrid" + // KindEventHub ... + KindEventHub KindBasicDataConnection = "EventHub" + // KindIotHub ... + KindIotHub KindBasicDataConnection = "IotHub" +) + +// PossibleKindBasicDataConnectionValues returns an array of possible values for the KindBasicDataConnection const type. +func PossibleKindBasicDataConnectionValues() []KindBasicDataConnection { + return []KindBasicDataConnection{KindDataConnection, KindEventGrid, KindEventHub, KindIotHub} +} + +// PrincipalsModificationKind enumerates the values for principals modification kind. +type PrincipalsModificationKind string + +const ( + // PrincipalsModificationKindNone ... + PrincipalsModificationKindNone PrincipalsModificationKind = "None" + // PrincipalsModificationKindReplace ... + PrincipalsModificationKindReplace PrincipalsModificationKind = "Replace" + // PrincipalsModificationKindUnion ... + PrincipalsModificationKindUnion PrincipalsModificationKind = "Union" +) + +// PossiblePrincipalsModificationKindValues returns an array of possible values for the PrincipalsModificationKind const type. +func PossiblePrincipalsModificationKindValues() []PrincipalsModificationKind { + return []PrincipalsModificationKind{PrincipalsModificationKindNone, PrincipalsModificationKindReplace, PrincipalsModificationKindUnion} +} + +// PrincipalType enumerates the values for principal type. +type PrincipalType string + +const ( + // PrincipalTypeApp ... + PrincipalTypeApp PrincipalType = "App" + // PrincipalTypeGroup ... + PrincipalTypeGroup PrincipalType = "Group" + // PrincipalTypeUser ... + PrincipalTypeUser PrincipalType = "User" +) + +// PossiblePrincipalTypeValues returns an array of possible values for the PrincipalType const type. +func PossiblePrincipalTypeValues() []PrincipalType { + return []PrincipalType{PrincipalTypeApp, PrincipalTypeGroup, PrincipalTypeUser} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // Creating ... + Creating ProvisioningState = "Creating" + // Deleting ... + Deleting ProvisioningState = "Deleting" + // Failed ... + Failed ProvisioningState = "Failed" + // Moving ... + Moving ProvisioningState = "Moving" + // Running ... + Running ProvisioningState = "Running" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{Creating, Deleting, Failed, Moving, Running, Succeeded} +} + +// Reason enumerates the values for reason. +type Reason string + +const ( + // AlreadyExists ... + AlreadyExists Reason = "AlreadyExists" + // Invalid ... + Invalid Reason = "Invalid" +) + +// PossibleReasonValues returns an array of possible values for the Reason const type. +func PossibleReasonValues() []Reason { + return []Reason{AlreadyExists, Invalid} +} + +// State enumerates the values for state. +type State string + +const ( + // StateCreating ... + StateCreating State = "Creating" + // StateDeleted ... + StateDeleted State = "Deleted" + // StateDeleting ... + StateDeleting State = "Deleting" + // StateRunning ... + StateRunning State = "Running" + // StateStarting ... + StateStarting State = "Starting" + // StateStopped ... + StateStopped State = "Stopped" + // StateStopping ... + StateStopping State = "Stopping" + // StateUnavailable ... + StateUnavailable State = "Unavailable" + // StateUpdating ... + StateUpdating State = "Updating" +) + +// PossibleStateValues returns an array of possible values for the State const type. +func PossibleStateValues() []State { + return []State{StateCreating, StateDeleted, StateDeleting, StateRunning, StateStarting, StateStopped, StateStopping, StateUnavailable, StateUpdating} +} + +// Type enumerates the values for type. +type Type string + +const ( + // MicrosoftKustoclustersattachedDatabaseConfigurations ... + MicrosoftKustoclustersattachedDatabaseConfigurations Type = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" + // MicrosoftKustoclustersdatabases ... + MicrosoftKustoclustersdatabases Type = "Microsoft.Kusto/clusters/databases" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{MicrosoftKustoclustersattachedDatabaseConfigurations, MicrosoftKustoclustersdatabases} +} + +// AttachedDatabaseConfiguration class representing an attached database configuration. +type AttachedDatabaseConfiguration struct { + autorest.Response `json:"-"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // AttachedDatabaseConfigurationProperties - The properties of the attached database configuration. + *AttachedDatabaseConfigurationProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AttachedDatabaseConfiguration. +func (adc AttachedDatabaseConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if adc.Location != nil { + objectMap["location"] = adc.Location + } + if adc.AttachedDatabaseConfigurationProperties != nil { + objectMap["properties"] = adc.AttachedDatabaseConfigurationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AttachedDatabaseConfiguration struct. +func (adc *AttachedDatabaseConfiguration) UnmarshalJSON(body []byte) error { + 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 + } + adc.Location = &location + } + case "properties": + if v != nil { + var attachedDatabaseConfigurationProperties AttachedDatabaseConfigurationProperties + err = json.Unmarshal(*v, &attachedDatabaseConfigurationProperties) + if err != nil { + return err + } + adc.AttachedDatabaseConfigurationProperties = &attachedDatabaseConfigurationProperties + } + 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 + } + } + } + + return nil +} + +// AttachedDatabaseConfigurationListResult the list attached database configurations operation response. +type AttachedDatabaseConfigurationListResult struct { + autorest.Response `json:"-"` + // Value - The list of attached database configurations. + Value *[]AttachedDatabaseConfiguration `json:"value,omitempty"` +} + +// AttachedDatabaseConfigurationProperties class representing the an attached database configuration +// properties of kind specific. +type AttachedDatabaseConfigurationProperties struct { + // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // DatabaseName - The name of the database which you would like to attach, use * if you want to follow all current and future databases. + DatabaseName *string `json:"databaseName,omitempty"` + // ClusterResourceID - The resource id of the cluster where the databases you would like to attach reside. + ClusterResourceID *string `json:"clusterResourceId,omitempty"` + // AttachedDatabaseNames - READ-ONLY; The list of databases from the clusterResourceId which are currently attached to the cluster. + AttachedDatabaseNames *[]string `json:"attachedDatabaseNames,omitempty"` + // DefaultPrincipalsModificationKind - The default principals modification kind. Possible values include: 'DefaultPrincipalsModificationKindUnion', 'DefaultPrincipalsModificationKindReplace', 'DefaultPrincipalsModificationKindNone' + DefaultPrincipalsModificationKind DefaultPrincipalsModificationKind `json:"defaultPrincipalsModificationKind,omitempty"` +} + +// AttachedDatabaseConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type AttachedDatabaseConfigurationsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AttachedDatabaseConfigurationsCreateOrUpdateFuture) Result(client AttachedDatabaseConfigurationsClient) (adc AttachedDatabaseConfiguration, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.AttachedDatabaseConfigurationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if adc.Response.Response, err = future.GetResult(sender); err == nil && adc.Response.Response.StatusCode != http.StatusNoContent { + adc, err = client.CreateOrUpdateResponder(adc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsCreateOrUpdateFuture", "Result", adc.Response.Response, "Failure responding to request") + } + } + return +} + +// AttachedDatabaseConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AttachedDatabaseConfigurationsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AttachedDatabaseConfigurationsDeleteFuture) Result(client AttachedDatabaseConfigurationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.AttachedDatabaseConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.AttachedDatabaseConfigurationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// AzureCapacity azure capacity definition. +type AzureCapacity struct { + // ScaleType - Scale type. Possible values include: 'Automatic', 'Manual', 'None' + ScaleType AzureScaleType `json:"scaleType,omitempty"` + // Minimum - Minimum allowed capacity. + Minimum *int32 `json:"minimum,omitempty"` + // Maximum - Maximum allowed capacity. + Maximum *int32 `json:"maximum,omitempty"` + // Default - The default capacity that would be used. + Default *int32 `json:"default,omitempty"` +} + +// AzureEntityResource the resource model definition for a 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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// AzureResourceSku azure resource SKU definition. +type AzureResourceSku struct { + // ResourceType - Resource Namespace and Type. + ResourceType *string `json:"resourceType,omitempty"` + // Sku - The SKU details. + Sku *AzureSku `json:"sku,omitempty"` + // Capacity - The number of instances of the cluster. + Capacity *AzureCapacity `json:"capacity,omitempty"` +} + +// AzureSku azure SKU definition. +type AzureSku struct { + // Name - SKU name. Possible values include: 'StandardDS13V21TBPS', 'StandardDS13V22TBPS', 'StandardDS14V23TBPS', 'StandardDS14V24TBPS', 'StandardD13V2', 'StandardD14V2', 'StandardL8s', 'StandardL16s', 'StandardD11V2', 'StandardD12V2', 'StandardL4s', 'DevNoSLAStandardD11V2' + Name AzureSkuName `json:"name,omitempty"` + // Capacity - The number of instances of the cluster. + Capacity *int32 `json:"capacity,omitempty"` + // Tier - SKU tier. Possible values include: 'Basic', 'Standard' + Tier AzureSkuTier `json:"tier,omitempty"` +} + +// CheckNameRequest the result returned from a database check name availability request. +type CheckNameRequest struct { + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - The type of resource, for instance Microsoft.Kusto/clusters/databases. Possible values include: 'MicrosoftKustoclustersdatabases', 'MicrosoftKustoclustersattachedDatabaseConfigurations' + Type Type `json:"type,omitempty"` +} + +// CheckNameResult the result returned from a check name availability request. +type CheckNameResult struct { + autorest.Response `json:"-"` + // NameAvailable - Specifies a Boolean value that indicates if the name is available. + NameAvailable *bool `json:"nameAvailable,omitempty"` + // Name - The name that was checked. + Name *string `json:"name,omitempty"` + // Message - Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. + Message *string `json:"message,omitempty"` + // Reason - Message providing the reason why the given name is invalid. Possible values include: 'Invalid', 'AlreadyExists' + Reason Reason `json:"reason,omitempty"` +} + +// CloudError an error response from Kusto. +type CloudError struct { + // Error - An error response from Kusto. + Error *CloudErrorBody `json:"error,omitempty"` +} + +// CloudErrorBody an error response from Kusto. +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 displaying 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"` +} + +// Cluster class representing a Kusto cluster. +type Cluster struct { + autorest.Response `json:"-"` + // Sku - The SKU of the cluster. + Sku *AzureSku `json:"sku,omitempty"` + // Zones - The availability zones of the cluster. + Zones *[]string `json:"zones,omitempty"` + // Identity - The identity of the cluster, if configured. + Identity *Identity `json:"identity,omitempty"` + // ClusterProperties - The cluster properties. + *ClusterProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Cluster. +func (c Cluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if c.Sku != nil { + objectMap["sku"] = c.Sku + } + if c.Zones != nil { + objectMap["zones"] = c.Zones + } + if c.Identity != nil { + objectMap["identity"] = c.Identity + } + if c.ClusterProperties != nil { + objectMap["properties"] = c.ClusterProperties + } + if c.Tags != nil { + objectMap["tags"] = c.Tags + } + if c.Location != nil { + objectMap["location"] = c.Location + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Cluster struct. +func (c *Cluster) UnmarshalJSON(body []byte) error { + 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 AzureSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + c.Sku = &sku + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + c.Zones = &zones + } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + c.Identity = &identity + } + case "properties": + if v != nil { + var clusterProperties ClusterProperties + err = json.Unmarshal(*v, &clusterProperties) + if err != nil { + return err + } + c.ClusterProperties = &clusterProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + c.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + c.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + c.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + c.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + c.Type = &typeVar + } + } + } + + return nil +} + +// ClusterCheckNameRequest the result returned from a cluster check name availability request. +type ClusterCheckNameRequest struct { + // Name - Cluster name. + Name *string `json:"name,omitempty"` + // Type - The type of resource, Microsoft.Kusto/clusters. + Type *string `json:"type,omitempty"` +} + +// ClusterListResult the list Kusto clusters operation response. +type ClusterListResult struct { + autorest.Response `json:"-"` + // Value - The list of Kusto clusters. + Value *[]Cluster `json:"value,omitempty"` +} + +// ClusterPrincipalAssignment class representing a cluster principal assignment. +type ClusterPrincipalAssignment struct { + autorest.Response `json:"-"` + // ClusterPrincipalProperties - The cluster principal. + *ClusterPrincipalProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterPrincipalAssignment. +func (cpa ClusterPrincipalAssignment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cpa.ClusterPrincipalProperties != nil { + objectMap["properties"] = cpa.ClusterPrincipalProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ClusterPrincipalAssignment struct. +func (cpa *ClusterPrincipalAssignment) UnmarshalJSON(body []byte) error { + var m map[string]*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 clusterPrincipalProperties ClusterPrincipalProperties + err = json.Unmarshal(*v, &clusterPrincipalProperties) + if err != nil { + return err + } + cpa.ClusterPrincipalProperties = &clusterPrincipalProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cpa.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cpa.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cpa.Type = &typeVar + } + } + } + + return nil +} + +// ClusterPrincipalAssignmentCheckNameRequest a principal assignment check name availability request. +type ClusterPrincipalAssignmentCheckNameRequest struct { + // Name - Principal Assignment resource name. + Name *string `json:"name,omitempty"` + // Type - The type of resource, Microsoft.Kusto/clusters/principalAssignments. + Type *string `json:"type,omitempty"` +} + +// ClusterPrincipalAssignmentListResult the list Kusto cluster principal assignments operation response. +type ClusterPrincipalAssignmentListResult struct { + autorest.Response `json:"-"` + // Value - The list of Kusto cluster principal assignments. + Value *[]ClusterPrincipalAssignment `json:"value,omitempty"` +} + +// ClusterPrincipalAssignmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ClusterPrincipalAssignmentsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClusterPrincipalAssignmentsCreateOrUpdateFuture) Result(client ClusterPrincipalAssignmentsClient) (cpa ClusterPrincipalAssignment, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClusterPrincipalAssignmentsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cpa.Response.Response, err = future.GetResult(sender); err == nil && cpa.Response.Response.StatusCode != http.StatusNoContent { + cpa, err = client.CreateOrUpdateResponder(cpa.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsCreateOrUpdateFuture", "Result", cpa.Response.Response, "Failure responding to request") + } + } + return +} + +// ClusterPrincipalAssignmentsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ClusterPrincipalAssignmentsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClusterPrincipalAssignmentsDeleteFuture) Result(client ClusterPrincipalAssignmentsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClusterPrincipalAssignmentsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClusterPrincipalAssignmentsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ClusterPrincipalProperties a class representing cluster principal property. +type ClusterPrincipalProperties struct { + // PrincipalID - The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group name. + PrincipalID *string `json:"principalId,omitempty"` + // Role - Cluster principal role. Possible values include: 'AllDatabasesAdmin', 'AllDatabasesViewer' + Role ClusterPrincipalRole `json:"role,omitempty"` + // TenantID - The tenant id of the principal + TenantID *string `json:"tenantId,omitempty"` + // PrincipalType - Principal type. Possible values include: 'PrincipalTypeApp', 'PrincipalTypeGroup', 'PrincipalTypeUser' + PrincipalType PrincipalType `json:"principalType,omitempty"` + // TenantName - READ-ONLY; The tenant name of the principal + TenantName *string `json:"tenantName,omitempty"` + // PrincipalName - READ-ONLY; The principal name + PrincipalName *string `json:"principalName,omitempty"` + // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ClusterProperties class representing the Kusto cluster properties. +type ClusterProperties struct { + // State - READ-ONLY; The state of the resource. Possible values include: 'StateCreating', 'StateUnavailable', 'StateRunning', 'StateDeleting', 'StateDeleted', 'StateStopping', 'StateStopped', 'StateStarting', 'StateUpdating' + State State `json:"state,omitempty"` + // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // URI - READ-ONLY; The cluster URI. + URI *string `json:"uri,omitempty"` + // DataIngestionURI - READ-ONLY; The cluster data ingestion URI. + DataIngestionURI *string `json:"dataIngestionUri,omitempty"` + // StateReason - READ-ONLY; The reason for the cluster's current state. + StateReason *string `json:"stateReason,omitempty"` + // TrustedExternalTenants - The cluster's external tenants. + TrustedExternalTenants *[]TrustedExternalTenant `json:"trustedExternalTenants,omitempty"` + // OptimizedAutoscale - Optimized auto scale definition. + OptimizedAutoscale *OptimizedAutoscale `json:"optimizedAutoscale,omitempty"` + // EnableDiskEncryption - A boolean value that indicates if the cluster's disks are encrypted. + EnableDiskEncryption *bool `json:"enableDiskEncryption,omitempty"` + // EnableStreamingIngest - A boolean value that indicates if the streaming ingest is enabled. + EnableStreamingIngest *bool `json:"enableStreamingIngest,omitempty"` + // VirtualNetworkConfiguration - Virtual network definition. + VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"` + // KeyVaultProperties - KeyVault properties for the cluster encryption. + KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"` +} + +// ClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ClustersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersCreateOrUpdateFuture) Result(client ClustersClient) (c Cluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClustersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent { + c, err = client.CreateOrUpdateResponder(c.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersCreateOrUpdateFuture", "Result", c.Response.Response, "Failure responding to request") + } + } + return +} + +// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ClustersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClustersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ClustersDetachFollowerDatabasesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ClustersDetachFollowerDatabasesFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersDetachFollowerDatabasesFuture) Result(client ClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersDetachFollowerDatabasesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClustersDetachFollowerDatabasesFuture") + return + } + ar.Response = future.Response() + return +} + +// ClustersDiagnoseVirtualNetworkFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ClustersDiagnoseVirtualNetworkFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersDiagnoseVirtualNetworkFuture) Result(client ClustersClient) (dvnr DiagnoseVirtualNetworkResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersDiagnoseVirtualNetworkFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClustersDiagnoseVirtualNetworkFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dvnr.Response.Response, err = future.GetResult(sender); err == nil && dvnr.Response.Response.StatusCode != http.StatusNoContent { + dvnr, err = client.DiagnoseVirtualNetworkResponder(dvnr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersDiagnoseVirtualNetworkFuture", "Result", dvnr.Response.Response, "Failure responding to request") + } + } + return +} + +// ClustersStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ClustersStartFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersStartFuture) Result(client ClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersStartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClustersStartFuture") + return + } + ar.Response = future.Response() + return +} + +// ClustersStopFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type ClustersStopFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersStopFuture) Result(client ClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersStopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClustersStopFuture") + return + } + ar.Response = future.Response() + return +} + +// ClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ClustersUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersUpdateFuture) Result(client ClustersClient) (c Cluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.ClustersUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if c.Response.Response, err = future.GetResult(sender); err == nil && c.Response.Response.StatusCode != http.StatusNoContent { + c, err = client.UpdateResponder(c.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.ClustersUpdateFuture", "Result", c.Response.Response, "Failure responding to request") + } + } + return +} + +// ClusterUpdate class representing an update to a Kusto cluster. +type ClusterUpdate struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Sku - The SKU of the cluster. + Sku *AzureSku `json:"sku,omitempty"` + // Identity - The identity of the cluster, if configured. + Identity *Identity `json:"identity,omitempty"` + // ClusterProperties - The cluster properties. + *ClusterProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterUpdate. +func (cu ClusterUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cu.Tags != nil { + objectMap["tags"] = cu.Tags + } + if cu.Location != nil { + objectMap["location"] = cu.Location + } + if cu.Sku != nil { + objectMap["sku"] = cu.Sku + } + if cu.Identity != nil { + objectMap["identity"] = cu.Identity + } + if cu.ClusterProperties != nil { + objectMap["properties"] = cu.ClusterProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ClusterUpdate struct. +func (cu *ClusterUpdate) UnmarshalJSON(body []byte) error { + 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 + } + cu.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cu.Location = &location + } + case "sku": + if v != nil { + var sku AzureSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + cu.Sku = &sku + } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + cu.Identity = &identity + } + case "properties": + if v != nil { + var clusterProperties ClusterProperties + err = json.Unmarshal(*v, &clusterProperties) + if err != nil { + return err + } + cu.ClusterProperties = &clusterProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cu.Type = &typeVar + } + } + } + + return nil +} + +// BasicDatabase class representing a Kusto database. +type BasicDatabase interface { + AsReadWriteDatabase() (*ReadWriteDatabase, bool) + AsReadOnlyFollowingDatabase() (*ReadOnlyFollowingDatabase, bool) + AsDatabase() (*Database, bool) +} + +// Database class representing a Kusto database. +type Database struct { + autorest.Response `json:"-"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Kind - Possible values include: 'KindDatabase', 'KindReadWrite', 'KindReadOnlyFollowing' + Kind Kind `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +func unmarshalBasicDatabase(body []byte) (BasicDatabase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindReadWrite): + var rwd ReadWriteDatabase + err := json.Unmarshal(body, &rwd) + return rwd, err + case string(KindReadOnlyFollowing): + var rofd ReadOnlyFollowingDatabase + err := json.Unmarshal(body, &rofd) + return rofd, err + default: + var d Database + err := json.Unmarshal(body, &d) + return d, err + } +} +func unmarshalBasicDatabaseArray(body []byte) ([]BasicDatabase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dArray := make([]BasicDatabase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + d, err := unmarshalBasicDatabase(*rawMessage) + if err != nil { + return nil, err + } + dArray[index] = d + } + return dArray, nil +} + +// MarshalJSON is the custom marshaler for Database. +func (d Database) MarshalJSON() ([]byte, error) { + d.Kind = KindDatabase + objectMap := make(map[string]interface{}) + if d.Location != nil { + objectMap["location"] = d.Location + } + if d.Kind != "" { + objectMap["kind"] = d.Kind + } + return json.Marshal(objectMap) +} + +// AsReadWriteDatabase is the BasicDatabase implementation for Database. +func (d Database) AsReadWriteDatabase() (*ReadWriteDatabase, bool) { + return nil, false +} + +// AsReadOnlyFollowingDatabase is the BasicDatabase implementation for Database. +func (d Database) AsReadOnlyFollowingDatabase() (*ReadOnlyFollowingDatabase, bool) { + return nil, false +} + +// AsDatabase is the BasicDatabase implementation for Database. +func (d Database) AsDatabase() (*Database, bool) { + return &d, true +} + +// AsBasicDatabase is the BasicDatabase implementation for Database. +func (d Database) AsBasicDatabase() (BasicDatabase, bool) { + return &d, true +} + +// DatabaseListResult the list Kusto databases operation response. +type DatabaseListResult struct { + autorest.Response `json:"-"` + // Value - The list of Kusto databases. + Value *[]BasicDatabase `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DatabaseListResult struct. +func (dlr *DatabaseListResult) UnmarshalJSON(body []byte) error { + 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 := unmarshalBasicDatabaseArray(*v) + if err != nil { + return err + } + dlr.Value = &value + } + } + } + + return nil +} + +// DatabaseModel ... +type DatabaseModel struct { + autorest.Response `json:"-"` + Value BasicDatabase `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DatabaseModel struct. +func (dm *DatabaseModel) UnmarshalJSON(body []byte) error { + d, err := unmarshalBasicDatabase(body) + if err != nil { + return err + } + dm.Value = d + + return nil +} + +// DatabasePrincipal a class representing database principal entity. +type DatabasePrincipal struct { + // Role - Database principal role. Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer' + Role DatabasePrincipalRole `json:"role,omitempty"` + // Name - Database principal name. + Name *string `json:"name,omitempty"` + // Type - Database principal type. Possible values include: 'DatabasePrincipalTypeApp', 'DatabasePrincipalTypeGroup', 'DatabasePrincipalTypeUser' + Type DatabasePrincipalType `json:"type,omitempty"` + // Fqn - Database principal fully qualified name. + Fqn *string `json:"fqn,omitempty"` + // Email - Database principal email if exists. + Email *string `json:"email,omitempty"` + // AppID - Application id - relevant only for application principal type. + AppID *string `json:"appId,omitempty"` + // TenantName - READ-ONLY; The tenant name of the principal + TenantName *string `json:"tenantName,omitempty"` +} + +// DatabasePrincipalAssignment class representing a database principal assignment. +type DatabasePrincipalAssignment struct { + autorest.Response `json:"-"` + // DatabasePrincipalProperties - The database principal. + *DatabasePrincipalProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for DatabasePrincipalAssignment. +func (dpa DatabasePrincipalAssignment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpa.DatabasePrincipalProperties != nil { + objectMap["properties"] = dpa.DatabasePrincipalProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DatabasePrincipalAssignment struct. +func (dpa *DatabasePrincipalAssignment) UnmarshalJSON(body []byte) error { + var m map[string]*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 databasePrincipalProperties DatabasePrincipalProperties + err = json.Unmarshal(*v, &databasePrincipalProperties) + if err != nil { + return err + } + dpa.DatabasePrincipalProperties = &databasePrincipalProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dpa.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dpa.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dpa.Type = &typeVar + } + } + } + + return nil +} + +// DatabasePrincipalAssignmentCheckNameRequest a principal assignment check name availability request. +type DatabasePrincipalAssignmentCheckNameRequest struct { + // Name - Principal Assignment resource name. + Name *string `json:"name,omitempty"` + // Type - The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. + Type *string `json:"type,omitempty"` +} + +// DatabasePrincipalAssignmentListResult the list Kusto database principal assignments operation response. +type DatabasePrincipalAssignmentListResult struct { + autorest.Response `json:"-"` + // Value - The list of Kusto database principal assignments. + Value *[]DatabasePrincipalAssignment `json:"value,omitempty"` +} + +// DatabasePrincipalAssignmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type DatabasePrincipalAssignmentsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabasePrincipalAssignmentsCreateOrUpdateFuture) Result(client DatabasePrincipalAssignmentsClient) (dpa DatabasePrincipalAssignment, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.DatabasePrincipalAssignmentsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dpa.Response.Response, err = future.GetResult(sender); err == nil && dpa.Response.Response.StatusCode != http.StatusNoContent { + dpa, err = client.CreateOrUpdateResponder(dpa.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsCreateOrUpdateFuture", "Result", dpa.Response.Response, "Failure responding to request") + } + } + return +} + +// DatabasePrincipalAssignmentsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DatabasePrincipalAssignmentsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabasePrincipalAssignmentsDeleteFuture) Result(client DatabasePrincipalAssignmentsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasePrincipalAssignmentsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.DatabasePrincipalAssignmentsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DatabasePrincipalListRequest the list Kusto database principals operation request. +type DatabasePrincipalListRequest struct { + // Value - The list of Kusto database principals. + Value *[]DatabasePrincipal `json:"value,omitempty"` +} + +// DatabasePrincipalListResult the list Kusto database principals operation response. +type DatabasePrincipalListResult struct { + autorest.Response `json:"-"` + // Value - The list of Kusto database principals. + Value *[]DatabasePrincipal `json:"value,omitempty"` +} + +// DatabasePrincipalProperties a class representing database principal property. +type DatabasePrincipalProperties struct { + // PrincipalID - The principal ID assigned to the database principal. It can be a user email, application ID, or security group name. + PrincipalID *string `json:"principalId,omitempty"` + // Role - Database principal role. Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer' + Role DatabasePrincipalRole `json:"role,omitempty"` + // TenantID - The tenant id of the principal + TenantID *string `json:"tenantId,omitempty"` + // PrincipalType - Principal type. Possible values include: 'PrincipalTypeApp', 'PrincipalTypeGroup', 'PrincipalTypeUser' + PrincipalType PrincipalType `json:"principalType,omitempty"` + // TenantName - READ-ONLY; The tenant name of the principal + TenantName *string `json:"tenantName,omitempty"` + // PrincipalName - READ-ONLY; The principal name + PrincipalName *string `json:"principalName,omitempty"` + // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// DatabasesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DatabasesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (dm DatabaseModel, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.DatabasesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dm.Response.Response, err = future.GetResult(sender); err == nil && dm.Response.Response.StatusCode != http.StatusNoContent { + dm, err = client.CreateOrUpdateResponder(dm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesCreateOrUpdateFuture", "Result", dm.Response.Response, "Failure responding to request") + } + } + return +} + +// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DatabasesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.DatabasesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DatabaseStatistics a class that contains database statistics information. +type DatabaseStatistics struct { + // Size - The database size - the total size of compressed data and index in bytes. + Size *float64 `json:"size,omitempty"` +} + +// DatabasesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DatabasesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DatabasesUpdateFuture) Result(client DatabasesClient) (dm DatabaseModel, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.DatabasesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dm.Response.Response, err = future.GetResult(sender); err == nil && dm.Response.Response.StatusCode != http.StatusNoContent { + dm, err = client.UpdateResponder(dm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DatabasesUpdateFuture", "Result", dm.Response.Response, "Failure responding to request") + } + } + return +} + +// BasicDataConnection class representing an data connection. +type BasicDataConnection interface { + AsEventHubDataConnection() (*EventHubDataConnection, bool) + AsIotHubDataConnection() (*IotHubDataConnection, bool) + AsEventGridDataConnection() (*EventGridDataConnection, bool) + AsDataConnection() (*DataConnection, bool) +} + +// DataConnection class representing an data connection. +type DataConnection struct { + autorest.Response `json:"-"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindIotHub', 'KindEventGrid' + Kind KindBasicDataConnection `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +func unmarshalBasicDataConnection(body []byte) (BasicDataConnection, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindEventHub): + var ehdc EventHubDataConnection + err := json.Unmarshal(body, &ehdc) + return ehdc, err + case string(KindIotHub): + var ihdc IotHubDataConnection + err := json.Unmarshal(body, &ihdc) + return ihdc, err + case string(KindEventGrid): + var egdc EventGridDataConnection + err := json.Unmarshal(body, &egdc) + return egdc, err + default: + var dc DataConnection + err := json.Unmarshal(body, &dc) + return dc, err + } +} +func unmarshalBasicDataConnectionArray(body []byte) ([]BasicDataConnection, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dcArray := make([]BasicDataConnection, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dc, err := unmarshalBasicDataConnection(*rawMessage) + if err != nil { + return nil, err + } + dcArray[index] = dc + } + return dcArray, nil +} + +// MarshalJSON is the custom marshaler for DataConnection. +func (dc DataConnection) MarshalJSON() ([]byte, error) { + dc.Kind = KindDataConnection + objectMap := make(map[string]interface{}) + if dc.Location != nil { + objectMap["location"] = dc.Location + } + if dc.Kind != "" { + objectMap["kind"] = dc.Kind + } + return json.Marshal(objectMap) +} + +// AsEventHubDataConnection is the BasicDataConnection implementation for DataConnection. +func (dc DataConnection) AsEventHubDataConnection() (*EventHubDataConnection, bool) { + return nil, false +} + +// AsIotHubDataConnection is the BasicDataConnection implementation for DataConnection. +func (dc DataConnection) AsIotHubDataConnection() (*IotHubDataConnection, bool) { + return nil, false +} + +// AsEventGridDataConnection is the BasicDataConnection implementation for DataConnection. +func (dc DataConnection) AsEventGridDataConnection() (*EventGridDataConnection, bool) { + return nil, false +} + +// AsDataConnection is the BasicDataConnection implementation for DataConnection. +func (dc DataConnection) AsDataConnection() (*DataConnection, bool) { + return &dc, true +} + +// AsBasicDataConnection is the BasicDataConnection implementation for DataConnection. +func (dc DataConnection) AsBasicDataConnection() (BasicDataConnection, bool) { + return &dc, true +} + +// DataConnectionCheckNameRequest a data connection check name availability request. +type DataConnectionCheckNameRequest struct { + // Name - Data Connection name. + Name *string `json:"name,omitempty"` + // Type - The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. + Type *string `json:"type,omitempty"` +} + +// DataConnectionListResult the list Kusto data connections operation response. +type DataConnectionListResult struct { + autorest.Response `json:"-"` + // Value - The list of Kusto data connections. + Value *[]BasicDataConnection `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DataConnectionListResult struct. +func (dclr *DataConnectionListResult) UnmarshalJSON(body []byte) error { + 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 := unmarshalBasicDataConnectionArray(*v) + if err != nil { + return err + } + dclr.Value = &value + } + } + } + + return nil +} + +// DataConnectionModel ... +type DataConnectionModel struct { + autorest.Response `json:"-"` + Value BasicDataConnection `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DataConnectionModel struct. +func (dcm *DataConnectionModel) UnmarshalJSON(body []byte) error { + dc, err := unmarshalBasicDataConnection(body) + if err != nil { + return err + } + dcm.Value = dc + + return nil +} + +// DataConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DataConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DataConnectionsCreateOrUpdateFuture) Result(client DataConnectionsClient) (dcm DataConnectionModel, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.DataConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dcm.Response.Response, err = future.GetResult(sender); err == nil && dcm.Response.Response.StatusCode != http.StatusNoContent { + dcm, err = client.CreateOrUpdateResponder(dcm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsCreateOrUpdateFuture", "Result", dcm.Response.Response, "Failure responding to request") + } + } + return +} + +// DataConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DataConnectionsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DataConnectionsDeleteFuture) Result(client DataConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.DataConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DataConnectionsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DataConnectionsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DataConnectionsUpdateFuture) Result(client DataConnectionsClient) (dcm DataConnectionModel, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("kusto.DataConnectionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dcm.Response.Response, err = future.GetResult(sender); err == nil && dcm.Response.Response.StatusCode != http.StatusNoContent { + dcm, err = client.UpdateResponder(dcm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.DataConnectionsUpdateFuture", "Result", dcm.Response.Response, "Failure responding to request") + } + } + return +} + +// DataConnectionValidation class representing an data connection validation. +type DataConnectionValidation struct { + // DataConnectionName - The name of the data connection. + DataConnectionName *string `json:"dataConnectionName,omitempty"` + // Properties - The data connection properties to validate. + Properties BasicDataConnection `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DataConnectionValidation struct. +func (dcv *DataConnectionValidation) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "dataConnectionName": + if v != nil { + var dataConnectionName string + err = json.Unmarshal(*v, &dataConnectionName) + if err != nil { + return err + } + dcv.DataConnectionName = &dataConnectionName + } + case "properties": + if v != nil { + properties, err := unmarshalBasicDataConnection(*v) + if err != nil { + return err + } + dcv.Properties = properties + } + } + } + + return nil +} + +// DataConnectionValidationListResult the list Kusto data connection validation result. +type DataConnectionValidationListResult struct { + autorest.Response `json:"-"` + // Value - The list of Kusto data connection validation errors. + Value *[]DataConnectionValidationResult `json:"value,omitempty"` +} + +// DataConnectionValidationResult the result returned from a data connection validation request. +type DataConnectionValidationResult struct { + // ErrorMessage - A message which indicates a problem in data connection validation. + ErrorMessage *string `json:"errorMessage,omitempty"` +} + +// DiagnoseVirtualNetworkResult ... +type DiagnoseVirtualNetworkResult struct { + autorest.Response `json:"-"` + // Findings - The list of network connectivity diagnostic finding + Findings *[]string `json:"findings,omitempty"` +} + +// EventGridConnectionProperties class representing the Kusto event grid connection properties. +type EventGridConnectionProperties struct { + // StorageAccountResourceID - The resource ID of the storage account where the data resides. + StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` + // EventHubResourceID - The resource ID where the event grid is configured to send events. + EventHubResourceID *string `json:"eventHubResourceId,omitempty"` + // ConsumerGroup - The event hub consumer group. + ConsumerGroup *string `json:"consumerGroup,omitempty"` + // TableName - The table where the data should be ingested. Optionally the table information can be added to each message. + TableName *string `json:"tableName,omitempty"` + // MappingRuleName - The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + MappingRuleName *string `json:"mappingRuleName,omitempty"` + // DataFormat - The data format of the message. Optionally the data format can be added to each message. Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC' + DataFormat EventGridDataFormat `json:"dataFormat,omitempty"` +} + +// EventGridDataConnection class representing an Event Grid data connection. +type EventGridDataConnection struct { + // EventGridConnectionProperties - The properties of the Event Grid data connection. + *EventGridConnectionProperties `json:"properties,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindIotHub', 'KindEventGrid' + Kind KindBasicDataConnection `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for EventGridDataConnection. +func (egdc EventGridDataConnection) MarshalJSON() ([]byte, error) { + egdc.Kind = KindEventGrid + objectMap := make(map[string]interface{}) + if egdc.EventGridConnectionProperties != nil { + objectMap["properties"] = egdc.EventGridConnectionProperties + } + if egdc.Location != nil { + objectMap["location"] = egdc.Location + } + if egdc.Kind != "" { + objectMap["kind"] = egdc.Kind + } + return json.Marshal(objectMap) +} + +// AsEventHubDataConnection is the BasicDataConnection implementation for EventGridDataConnection. +func (egdc EventGridDataConnection) AsEventHubDataConnection() (*EventHubDataConnection, bool) { + return nil, false +} + +// AsIotHubDataConnection is the BasicDataConnection implementation for EventGridDataConnection. +func (egdc EventGridDataConnection) AsIotHubDataConnection() (*IotHubDataConnection, bool) { + return nil, false +} + +// AsEventGridDataConnection is the BasicDataConnection implementation for EventGridDataConnection. +func (egdc EventGridDataConnection) AsEventGridDataConnection() (*EventGridDataConnection, bool) { + return &egdc, true +} + +// AsDataConnection is the BasicDataConnection implementation for EventGridDataConnection. +func (egdc EventGridDataConnection) AsDataConnection() (*DataConnection, bool) { + return nil, false +} + +// AsBasicDataConnection is the BasicDataConnection implementation for EventGridDataConnection. +func (egdc EventGridDataConnection) AsBasicDataConnection() (BasicDataConnection, bool) { + return &egdc, true +} + +// UnmarshalJSON is the custom unmarshaler for EventGridDataConnection struct. +func (egdc *EventGridDataConnection) UnmarshalJSON(body []byte) error { + var m map[string]*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 eventGridConnectionProperties EventGridConnectionProperties + err = json.Unmarshal(*v, &eventGridConnectionProperties) + if err != nil { + return err + } + egdc.EventGridConnectionProperties = &eventGridConnectionProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + egdc.Location = &location + } + case "kind": + if v != nil { + var kind KindBasicDataConnection + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + egdc.Kind = kind + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + egdc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + egdc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + egdc.Type = &typeVar + } + } + } + + return nil +} + +// EventHubConnectionProperties class representing the Kusto event hub connection properties. +type EventHubConnectionProperties struct { + // EventHubResourceID - The resource ID of the event hub to be used to create a data connection. + EventHubResourceID *string `json:"eventHubResourceId,omitempty"` + // ConsumerGroup - The event hub consumer group. + ConsumerGroup *string `json:"consumerGroup,omitempty"` + // TableName - The table where the data should be ingested. Optionally the table information can be added to each message. + TableName *string `json:"tableName,omitempty"` + // MappingRuleName - The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + MappingRuleName *string `json:"mappingRuleName,omitempty"` + // DataFormat - The data format of the message. Optionally the data format can be added to each message. Possible values include: 'EventHubDataFormatMULTIJSON', 'EventHubDataFormatJSON', 'EventHubDataFormatCSV', 'EventHubDataFormatTSV', 'EventHubDataFormatSCSV', 'EventHubDataFormatSOHSV', 'EventHubDataFormatPSV', 'EventHubDataFormatTXT', 'EventHubDataFormatRAW', 'EventHubDataFormatSINGLEJSON', 'EventHubDataFormatAVRO', 'EventHubDataFormatTSVE', 'EventHubDataFormatPARQUET', 'EventHubDataFormatORC' + DataFormat EventHubDataFormat `json:"dataFormat,omitempty"` + // EventSystemProperties - System properties of the event hub + EventSystemProperties *[]string `json:"eventSystemProperties,omitempty"` + // Compression - The event hub messages compression type. Possible values include: 'CompressionNone', 'CompressionGZip' + Compression Compression `json:"compression,omitempty"` +} + +// EventHubDataConnection class representing an event hub data connection. +type EventHubDataConnection struct { + // EventHubConnectionProperties - The Event Hub data connection properties to validate. + *EventHubConnectionProperties `json:"properties,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindIotHub', 'KindEventGrid' + Kind KindBasicDataConnection `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for EventHubDataConnection. +func (ehdc EventHubDataConnection) MarshalJSON() ([]byte, error) { + ehdc.Kind = KindEventHub + objectMap := make(map[string]interface{}) + if ehdc.EventHubConnectionProperties != nil { + objectMap["properties"] = ehdc.EventHubConnectionProperties + } + if ehdc.Location != nil { + objectMap["location"] = ehdc.Location + } + if ehdc.Kind != "" { + objectMap["kind"] = ehdc.Kind + } + return json.Marshal(objectMap) +} + +// AsEventHubDataConnection is the BasicDataConnection implementation for EventHubDataConnection. +func (ehdc EventHubDataConnection) AsEventHubDataConnection() (*EventHubDataConnection, bool) { + return &ehdc, true +} + +// AsIotHubDataConnection is the BasicDataConnection implementation for EventHubDataConnection. +func (ehdc EventHubDataConnection) AsIotHubDataConnection() (*IotHubDataConnection, bool) { + return nil, false +} + +// AsEventGridDataConnection is the BasicDataConnection implementation for EventHubDataConnection. +func (ehdc EventHubDataConnection) AsEventGridDataConnection() (*EventGridDataConnection, bool) { + return nil, false +} + +// AsDataConnection is the BasicDataConnection implementation for EventHubDataConnection. +func (ehdc EventHubDataConnection) AsDataConnection() (*DataConnection, bool) { + return nil, false +} + +// AsBasicDataConnection is the BasicDataConnection implementation for EventHubDataConnection. +func (ehdc EventHubDataConnection) AsBasicDataConnection() (BasicDataConnection, bool) { + return &ehdc, true +} + +// UnmarshalJSON is the custom unmarshaler for EventHubDataConnection struct. +func (ehdc *EventHubDataConnection) UnmarshalJSON(body []byte) error { + var m map[string]*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 eventHubConnectionProperties EventHubConnectionProperties + err = json.Unmarshal(*v, &eventHubConnectionProperties) + if err != nil { + return err + } + ehdc.EventHubConnectionProperties = &eventHubConnectionProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ehdc.Location = &location + } + case "kind": + if v != nil { + var kind KindBasicDataConnection + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ehdc.Kind = kind + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ehdc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ehdc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ehdc.Type = &typeVar + } + } + } + + return nil +} + +// FollowerDatabaseDefinition a class representing follower database request. +type FollowerDatabaseDefinition struct { + // ClusterResourceID - Resource id of the cluster that follows a database owned by this cluster. + ClusterResourceID *string `json:"clusterResourceId,omitempty"` + // AttachedDatabaseConfigurationName - Resource name of the attached database configuration in the follower cluster. + AttachedDatabaseConfigurationName *string `json:"attachedDatabaseConfigurationName,omitempty"` + // DatabaseName - READ-ONLY; The database name owned by this cluster that was followed. * in case following all databases. + DatabaseName *string `json:"databaseName,omitempty"` +} + +// FollowerDatabaseListResult the list Kusto database principals operation response. +type FollowerDatabaseListResult struct { + autorest.Response `json:"-"` + // Value - The list of follower database result. + Value *[]FollowerDatabaseDefinition `json:"value,omitempty"` +} + +// Identity identity for the resource. +type Identity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'IdentityTypeNone', 'IdentityTypeSystemAssigned' + Type IdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user identities associated with the Kusto cluster. 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]*IdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for Identity. +func (i Identity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i.Type != "" { + objectMap["type"] = i.Type + } + if i.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = i.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// IdentityUserAssignedIdentitiesValue ... +type IdentityUserAssignedIdentitiesValue 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"` +} + +// IotHubConnectionProperties class representing the Kusto Iot hub connection properties. +type IotHubConnectionProperties struct { + // IotHubResourceID - The resource ID of the Iot hub to be used to create a data connection. + IotHubResourceID *string `json:"iotHubResourceId,omitempty"` + // ConsumerGroup - The iot hub consumer group. + ConsumerGroup *string `json:"consumerGroup,omitempty"` + // TableName - The table where the data should be ingested. Optionally the table information can be added to each message. + TableName *string `json:"tableName,omitempty"` + // MappingRuleName - The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + MappingRuleName *string `json:"mappingRuleName,omitempty"` + // DataFormat - The data format of the message. Optionally the data format can be added to each message. Possible values include: 'IotHubDataFormatMULTIJSON', 'IotHubDataFormatJSON', 'IotHubDataFormatCSV', 'IotHubDataFormatTSV', 'IotHubDataFormatSCSV', 'IotHubDataFormatSOHSV', 'IotHubDataFormatPSV', 'IotHubDataFormatTXT', 'IotHubDataFormatRAW', 'IotHubDataFormatSINGLEJSON', 'IotHubDataFormatAVRO', 'IotHubDataFormatTSVE', 'IotHubDataFormatPARQUET', 'IotHubDataFormatORC' + DataFormat IotHubDataFormat `json:"dataFormat,omitempty"` + // EventSystemProperties - System properties of the iot hub + EventSystemProperties *[]string `json:"eventSystemProperties,omitempty"` + // SharedAccessPolicyName - The name of the share access policy + SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` +} + +// IotHubDataConnection class representing an iot hub data connection. +type IotHubDataConnection struct { + // IotHubConnectionProperties - The Iot Hub data connection properties. + *IotHubConnectionProperties `json:"properties,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Kind - Possible values include: 'KindDataConnection', 'KindEventHub', 'KindIotHub', 'KindEventGrid' + Kind KindBasicDataConnection `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for IotHubDataConnection. +func (ihdc IotHubDataConnection) MarshalJSON() ([]byte, error) { + ihdc.Kind = KindIotHub + objectMap := make(map[string]interface{}) + if ihdc.IotHubConnectionProperties != nil { + objectMap["properties"] = ihdc.IotHubConnectionProperties + } + if ihdc.Location != nil { + objectMap["location"] = ihdc.Location + } + if ihdc.Kind != "" { + objectMap["kind"] = ihdc.Kind + } + return json.Marshal(objectMap) +} + +// AsEventHubDataConnection is the BasicDataConnection implementation for IotHubDataConnection. +func (ihdc IotHubDataConnection) AsEventHubDataConnection() (*EventHubDataConnection, bool) { + return nil, false +} + +// AsIotHubDataConnection is the BasicDataConnection implementation for IotHubDataConnection. +func (ihdc IotHubDataConnection) AsIotHubDataConnection() (*IotHubDataConnection, bool) { + return &ihdc, true +} + +// AsEventGridDataConnection is the BasicDataConnection implementation for IotHubDataConnection. +func (ihdc IotHubDataConnection) AsEventGridDataConnection() (*EventGridDataConnection, bool) { + return nil, false +} + +// AsDataConnection is the BasicDataConnection implementation for IotHubDataConnection. +func (ihdc IotHubDataConnection) AsDataConnection() (*DataConnection, bool) { + return nil, false +} + +// AsBasicDataConnection is the BasicDataConnection implementation for IotHubDataConnection. +func (ihdc IotHubDataConnection) AsBasicDataConnection() (BasicDataConnection, bool) { + return &ihdc, true +} + +// UnmarshalJSON is the custom unmarshaler for IotHubDataConnection struct. +func (ihdc *IotHubDataConnection) UnmarshalJSON(body []byte) error { + var m map[string]*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 iotHubConnectionProperties IotHubConnectionProperties + err = json.Unmarshal(*v, &iotHubConnectionProperties) + if err != nil { + return err + } + ihdc.IotHubConnectionProperties = &iotHubConnectionProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ihdc.Location = &location + } + case "kind": + if v != nil { + var kind KindBasicDataConnection + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ihdc.Kind = kind + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ihdc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ihdc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ihdc.Type = &typeVar + } + } + } + + return nil +} + +// KeyVaultProperties properties of the key vault. +type KeyVaultProperties struct { + // KeyName - The name of the key vault key. + KeyName *string `json:"keyName,omitempty"` + // KeyVersion - The version of the key vault key. + KeyVersion *string `json:"keyVersion,omitempty"` + // KeyVaultURI - The Uri of the key vault. + KeyVaultURI *string `json:"keyVaultUri,omitempty"` +} + +// ListResourceSkusResult list of available SKUs for a Kusto Cluster. +type ListResourceSkusResult struct { + autorest.Response `json:"-"` + // Value - The collection of available SKUs for an existing resource. + Value *[]AzureResourceSku `json:"value,omitempty"` +} + +// Operation ... +type Operation struct { + // Name - This is of the format {provider}/{resource}/{operation}. + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` + Origin *string `json:"origin,omitempty"` + Properties interface{} `json:"properties,omitempty"` +} + +// OperationDisplay ... +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + // Operation - For example: read, write, delete. + Operation *string `json:"operation,omitempty"` + Resource *string `json:"resource,omitempty"` + Description *string `json:"description,omitempty"` +} + +// OperationListResult ... +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultIterator provides access to a complete listing of Operation values. +type OperationListResultIterator struct { + i int + page OperationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *OperationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OperationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter OperationListResultIterator) Response() OperationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter OperationListResultIterator) Value() Operation { + if !iter.page.NotDone() { + return Operation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (olr OperationListResult) IsEmpty() bool { + return olr.Value == nil || len(*olr.Value) == 0 +} + +// operationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(olr.NextLink))) +} + +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(context.Context, OperationListResult) (OperationListResult, error) + olr OperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationListResultPage) Response() OperationListResult { + return page.olr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { + return nil + } + return *page.olr.Value +} + +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + +// OptimizedAutoscale a class that contains the optimized auto scale definition. +type OptimizedAutoscale struct { + // Version - The version of the template defined, for instance 1. + Version *int32 `json:"version,omitempty"` + // IsEnabled - A boolean value that indicate if the optimized autoscale feature is enabled or not. + IsEnabled *bool `json:"isEnabled,omitempty"` + // Minimum - Minimum allowed instances count. + Minimum *int32 `json:"minimum,omitempty"` + // Maximum - Maximum allowed instances count. + Maximum *int32 `json:"maximum,omitempty"` +} + +// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than +// required location and tags +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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// ReadOnlyFollowingDatabase class representing a read only following database. +type ReadOnlyFollowingDatabase struct { + // ReadOnlyFollowingDatabaseProperties - The database properties. + *ReadOnlyFollowingDatabaseProperties `json:"properties,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Kind - Possible values include: 'KindDatabase', 'KindReadWrite', 'KindReadOnlyFollowing' + Kind Kind `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReadOnlyFollowingDatabase. +func (rofd ReadOnlyFollowingDatabase) MarshalJSON() ([]byte, error) { + rofd.Kind = KindReadOnlyFollowing + objectMap := make(map[string]interface{}) + if rofd.ReadOnlyFollowingDatabaseProperties != nil { + objectMap["properties"] = rofd.ReadOnlyFollowingDatabaseProperties + } + if rofd.Location != nil { + objectMap["location"] = rofd.Location + } + if rofd.Kind != "" { + objectMap["kind"] = rofd.Kind + } + return json.Marshal(objectMap) +} + +// AsReadWriteDatabase is the BasicDatabase implementation for ReadOnlyFollowingDatabase. +func (rofd ReadOnlyFollowingDatabase) AsReadWriteDatabase() (*ReadWriteDatabase, bool) { + return nil, false +} + +// AsReadOnlyFollowingDatabase is the BasicDatabase implementation for ReadOnlyFollowingDatabase. +func (rofd ReadOnlyFollowingDatabase) AsReadOnlyFollowingDatabase() (*ReadOnlyFollowingDatabase, bool) { + return &rofd, true +} + +// AsDatabase is the BasicDatabase implementation for ReadOnlyFollowingDatabase. +func (rofd ReadOnlyFollowingDatabase) AsDatabase() (*Database, bool) { + return nil, false +} + +// AsBasicDatabase is the BasicDatabase implementation for ReadOnlyFollowingDatabase. +func (rofd ReadOnlyFollowingDatabase) AsBasicDatabase() (BasicDatabase, bool) { + return &rofd, true +} + +// UnmarshalJSON is the custom unmarshaler for ReadOnlyFollowingDatabase struct. +func (rofd *ReadOnlyFollowingDatabase) UnmarshalJSON(body []byte) error { + var m map[string]*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 readOnlyFollowingDatabaseProperties ReadOnlyFollowingDatabaseProperties + err = json.Unmarshal(*v, &readOnlyFollowingDatabaseProperties) + if err != nil { + return err + } + rofd.ReadOnlyFollowingDatabaseProperties = &readOnlyFollowingDatabaseProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rofd.Location = &location + } + case "kind": + if v != nil { + var kind Kind + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + rofd.Kind = kind + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rofd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rofd.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rofd.Type = &typeVar + } + } + } + + return nil +} + +// ReadOnlyFollowingDatabaseProperties class representing the Kusto database properties. +type ReadOnlyFollowingDatabaseProperties struct { + // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // SoftDeletePeriod - READ-ONLY; The time the data should be kept before it stops being accessible to queries in TimeSpan. + SoftDeletePeriod *string `json:"softDeletePeriod,omitempty"` + // HotCachePeriod - The time the data should be kept in cache for fast queries in TimeSpan. + HotCachePeriod *string `json:"hotCachePeriod,omitempty"` + // Statistics - The statistics of the database. + Statistics *DatabaseStatistics `json:"statistics,omitempty"` + // LeaderClusterResourceID - READ-ONLY; The name of the leader cluster + LeaderClusterResourceID *string `json:"leaderClusterResourceId,omitempty"` + // AttachedDatabaseConfigurationName - READ-ONLY; The name of the attached database configuration cluster + AttachedDatabaseConfigurationName *string `json:"attachedDatabaseConfigurationName,omitempty"` + // PrincipalsModificationKind - READ-ONLY; The principals modification kind of the database. Possible values include: 'PrincipalsModificationKindUnion', 'PrincipalsModificationKindReplace', 'PrincipalsModificationKindNone' + PrincipalsModificationKind PrincipalsModificationKind `json:"principalsModificationKind,omitempty"` +} + +// ReadWriteDatabase class representing a read write database. +type ReadWriteDatabase struct { + // ReadWriteDatabaseProperties - The database properties. + *ReadWriteDatabaseProperties `json:"properties,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Kind - Possible values include: 'KindDatabase', 'KindReadWrite', 'KindReadOnlyFollowing' + Kind Kind `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReadWriteDatabase. +func (rwd ReadWriteDatabase) MarshalJSON() ([]byte, error) { + rwd.Kind = KindReadWrite + objectMap := make(map[string]interface{}) + if rwd.ReadWriteDatabaseProperties != nil { + objectMap["properties"] = rwd.ReadWriteDatabaseProperties + } + if rwd.Location != nil { + objectMap["location"] = rwd.Location + } + if rwd.Kind != "" { + objectMap["kind"] = rwd.Kind + } + return json.Marshal(objectMap) +} + +// AsReadWriteDatabase is the BasicDatabase implementation for ReadWriteDatabase. +func (rwd ReadWriteDatabase) AsReadWriteDatabase() (*ReadWriteDatabase, bool) { + return &rwd, true +} + +// AsReadOnlyFollowingDatabase is the BasicDatabase implementation for ReadWriteDatabase. +func (rwd ReadWriteDatabase) AsReadOnlyFollowingDatabase() (*ReadOnlyFollowingDatabase, bool) { + return nil, false +} + +// AsDatabase is the BasicDatabase implementation for ReadWriteDatabase. +func (rwd ReadWriteDatabase) AsDatabase() (*Database, bool) { + return nil, false +} + +// AsBasicDatabase is the BasicDatabase implementation for ReadWriteDatabase. +func (rwd ReadWriteDatabase) AsBasicDatabase() (BasicDatabase, bool) { + return &rwd, true +} + +// UnmarshalJSON is the custom unmarshaler for ReadWriteDatabase struct. +func (rwd *ReadWriteDatabase) UnmarshalJSON(body []byte) error { + var m map[string]*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 readWriteDatabaseProperties ReadWriteDatabaseProperties + err = json.Unmarshal(*v, &readWriteDatabaseProperties) + if err != nil { + return err + } + rwd.ReadWriteDatabaseProperties = &readWriteDatabaseProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rwd.Location = &location + } + case "kind": + if v != nil { + var kind Kind + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + rwd.Kind = kind + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rwd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rwd.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rwd.Type = &typeVar + } + } + } + + return nil +} + +// ReadWriteDatabaseProperties class representing the Kusto database properties. +type ReadWriteDatabaseProperties struct { + // ProvisioningState - READ-ONLY; The provisioned state of the resource. Possible values include: 'Running', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Moving' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // SoftDeletePeriod - The time the data should be kept before it stops being accessible to queries in TimeSpan. + SoftDeletePeriod *string `json:"softDeletePeriod,omitempty"` + // HotCachePeriod - The time the data should be kept in cache for fast queries in TimeSpan. + HotCachePeriod *string `json:"hotCachePeriod,omitempty"` + // Statistics - The statistics of the database. + Statistics *DatabaseStatistics `json:"statistics,omitempty"` + // IsFollowed - READ-ONLY; Indicates whether the database is followed. + IsFollowed *string `json:"isFollowed,omitempty"` +} + +// Resource ... +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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// SkuDescription the Kusto SKU description of given resource type +type SkuDescription struct { + // ResourceType - READ-ONLY; The resource type + ResourceType *string `json:"resourceType,omitempty"` + // Name - READ-ONLY; The name of the SKU + Name *string `json:"name,omitempty"` + // Tier - READ-ONLY; The tier of the SKU + Tier *string `json:"tier,omitempty"` + // Locations - READ-ONLY; The set of locations that the SKU is available + Locations *[]string `json:"locations,omitempty"` + // LocationInfo - READ-ONLY; Locations and zones + LocationInfo *[]SkuLocationInfoItem `json:"locationInfo,omitempty"` + // Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used + Restrictions *[]interface{} `json:"restrictions,omitempty"` +} + +// SkuDescriptionList the list of the EngagementFabric SKU descriptions +type SkuDescriptionList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; SKU descriptions + Value *[]SkuDescription `json:"value,omitempty"` +} + +// SkuLocationInfoItem the locations and zones info for SKU. +type SkuLocationInfoItem struct { + // Location - The available location of the SKU. + Location *string `json:"location,omitempty"` + // Zones - The available zone of the SKU. + Zones *[]string `json:"zones,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"` + // 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. Ex- 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) +} + +// TrustedExternalTenant represents a tenant ID that is trusted by the cluster. +type TrustedExternalTenant struct { + // Value - GUID representing an external tenant. + Value *string `json:"value,omitempty"` +} + +// VirtualNetworkConfiguration a class that contains virtual network definition. +type VirtualNetworkConfiguration struct { + // SubnetID - The subnet resource id. + SubnetID *string `json:"subnetId,omitempty"` + // EnginePublicIPID - Engine service's public IP address resource id. + EnginePublicIPID *string `json:"enginePublicIpId,omitempty"` + // DataManagementPublicIPID - Data management's service public IP address resource id. + DataManagementPublicIPID *string `json:"dataManagementPublicIpId,omitempty"` +} diff --git a/services/kusto/mgmt/2019-11-09/kusto/operations.go b/services/kusto/mgmt/2019-11-09/kusto/operations.go new file mode 100644 index 000000000000..e98bf8c28787 --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/operations.go @@ -0,0 +1,150 @@ +package kusto + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the the Azure Kusto management API provides a RESTful set of web services that interact with +// Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete +// clusters and databases. +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 available operations for the Microsoft.Kusto provider. +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, "kusto.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, "kusto.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.olr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2019-11-09" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Kusto/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.operationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "kusto.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, "kusto.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "kusto.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/kusto/mgmt/2019-11-09/kusto/version.go b/services/kusto/mgmt/2019-11-09/kusto/version.go new file mode 100644 index 000000000000..31e46ead514a --- /dev/null +++ b/services/kusto/mgmt/2019-11-09/kusto/version.go @@ -0,0 +1,30 @@ +package kusto + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " kusto/2019-11-09" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/labservices/mgmt/2018-10-15/labservices/client.go b/services/labservices/mgmt/2018-10-15/labservices/client.go index c687b1ad0e63..7101ae691e84 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/client.go +++ b/services/labservices/mgmt/2018-10-15/labservices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/labservices/mgmt/2018-10-15/labservices/environments.go b/services/labservices/mgmt/2018-10-15/labservices/environments.go index 16745e3206ac..692f70eeea74 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/environments.go +++ b/services/labservices/mgmt/2018-10-15/labservices/environments.go @@ -36,7 +36,8 @@ func NewEnvironmentsClient(subscriptionID string) EnvironmentsClient { return NewEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client. +// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) EnvironmentsClient { return EnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/labservices/mgmt/2018-10-15/labservices/environmentsettings.go b/services/labservices/mgmt/2018-10-15/labservices/environmentsettings.go index a31de4e86127..c9b2041d2bae 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/environmentsettings.go +++ b/services/labservices/mgmt/2018-10-15/labservices/environmentsettings.go @@ -36,7 +36,9 @@ func NewEnvironmentSettingsClient(subscriptionID string) EnvironmentSettingsClie return NewEnvironmentSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnvironmentSettingsClientWithBaseURI creates an instance of the EnvironmentSettingsClient client. +// NewEnvironmentSettingsClientWithBaseURI creates an instance of the EnvironmentSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEnvironmentSettingsClientWithBaseURI(baseURI string, subscriptionID string) EnvironmentSettingsClient { return EnvironmentSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/labservices/mgmt/2018-10-15/labservices/galleryimages.go b/services/labservices/mgmt/2018-10-15/labservices/galleryimages.go index a7a0ddb6c600..deaea128ee0d 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/galleryimages.go +++ b/services/labservices/mgmt/2018-10-15/labservices/galleryimages.go @@ -35,7 +35,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. +// 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)} } diff --git a/services/labservices/mgmt/2018-10-15/labservices/globalusers.go b/services/labservices/mgmt/2018-10-15/labservices/globalusers.go index 211e00a4def5..b09e0ff93f2b 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/globalusers.go +++ b/services/labservices/mgmt/2018-10-15/labservices/globalusers.go @@ -36,7 +36,8 @@ func NewGlobalUsersClient(subscriptionID string) GlobalUsersClient { return NewGlobalUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalUsersClientWithBaseURI creates an instance of the GlobalUsersClient client. +// NewGlobalUsersClientWithBaseURI creates an instance of the GlobalUsersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGlobalUsersClientWithBaseURI(baseURI string, subscriptionID string) GlobalUsersClient { return GlobalUsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/labservices/mgmt/2018-10-15/labservices/labaccounts.go b/services/labservices/mgmt/2018-10-15/labservices/labaccounts.go index 8f9f8bf9dd78..241f700f9521 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/labaccounts.go +++ b/services/labservices/mgmt/2018-10-15/labservices/labaccounts.go @@ -36,7 +36,8 @@ func NewLabAccountsClient(subscriptionID string) LabAccountsClient { return NewLabAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLabAccountsClientWithBaseURI creates an instance of the LabAccountsClient client. +// NewLabAccountsClientWithBaseURI creates an instance of the LabAccountsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLabAccountsClientWithBaseURI(baseURI string, subscriptionID string) LabAccountsClient { return LabAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/labservices/mgmt/2018-10-15/labservices/labs.go b/services/labservices/mgmt/2018-10-15/labservices/labs.go index 5f13f24c9415..c9e16441d54f 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/labs.go +++ b/services/labservices/mgmt/2018-10-15/labservices/labs.go @@ -36,7 +36,8 @@ func NewLabsClient(subscriptionID string) LabsClient { return NewLabsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLabsClientWithBaseURI creates an instance of the LabsClient client. +// NewLabsClientWithBaseURI creates an instance of the LabsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLabsClientWithBaseURI(baseURI string, subscriptionID string) LabsClient { return LabsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/labservices/mgmt/2018-10-15/labservices/labservicesapi/interfaces.go b/services/labservices/mgmt/2018-10-15/labservices/labservicesapi/interfaces.go index eb4cbe66df7d..482a90f657b8 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/labservicesapi/interfaces.go +++ b/services/labservices/mgmt/2018-10-15/labservices/labservicesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ProviderOperationsClientAPI contains the set of methods on the ProviderOperationsClient type. type ProviderOperationsClientAPI interface { List(ctx context.Context) (result labservices.ProviderOperationResultPage, err error) + ListComplete(ctx context.Context) (result labservices.ProviderOperationResultIterator, err error) } var _ ProviderOperationsClientAPI = (*labservices.ProviderOperationsClient)(nil) @@ -54,7 +55,9 @@ type LabAccountsClientAPI interface { Get(ctx context.Context, resourceGroupName string, labAccountName string, expand string) (result labservices.LabAccount, err error) GetRegionalAvailability(ctx context.Context, resourceGroupName string, labAccountName string) (result labservices.GetRegionalAvailabilityResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationLabAccountPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationLabAccountIterator, err error) ListBySubscription(ctx context.Context, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationLabAccountPage, err error) + ListBySubscriptionComplete(ctx context.Context, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationLabAccountIterator, err error) Update(ctx context.Context, resourceGroupName string, labAccountName string, labAccount labservices.LabAccountFragment) (result labservices.LabAccount, err error) } @@ -73,6 +76,7 @@ type GalleryImagesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labAccountName string, galleryImageName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, labAccountName string, galleryImageName string, expand string) (result labservices.GalleryImage, err error) List(ctx context.Context, resourceGroupName string, labAccountName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationGalleryImagePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labAccountName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationGalleryImageIterator, err error) Update(ctx context.Context, resourceGroupName string, labAccountName string, galleryImageName string, galleryImage labservices.GalleryImageFragment) (result labservices.GalleryImage, err error) } @@ -85,6 +89,7 @@ type LabsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labAccountName string, labName string) (result labservices.LabsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labAccountName string, labName string, expand string) (result labservices.Lab, err error) List(ctx context.Context, resourceGroupName string, labAccountName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationLabPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labAccountName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationLabIterator, err error) Register(ctx context.Context, resourceGroupName string, labAccountName string, labName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, labAccountName string, labName string, lab labservices.LabFragment) (result labservices.Lab, err error) } @@ -98,6 +103,7 @@ type EnvironmentSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string) (result labservices.EnvironmentSettingsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, expand string) (result labservices.EnvironmentSetting, err error) List(ctx context.Context, resourceGroupName string, labAccountName string, labName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationEnvironmentSettingPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labAccountName string, labName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationEnvironmentSettingIterator, err error) Publish(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, publishPayload labservices.PublishPayload) (result autorest.Response, err error) Start(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string) (result labservices.EnvironmentSettingsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string) (result labservices.EnvironmentSettingsStopFuture, err error) @@ -113,6 +119,7 @@ type EnvironmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, environmentName string) (result labservices.EnvironmentsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, environmentName string, expand string) (result labservices.Environment, err error) List(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationEnvironmentPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationEnvironmentIterator, err error) ResetPassword(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, environmentName string, resetPasswordPayload labservices.ResetPasswordPayload) (result labservices.EnvironmentsResetPasswordFuture, err error) Start(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, environmentName string) (result labservices.EnvironmentsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, labAccountName string, labName string, environmentSettingName string, environmentName string) (result labservices.EnvironmentsStopFuture, err error) @@ -127,6 +134,7 @@ type UsersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, labAccountName string, labName string, userName string) (result labservices.UsersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, labAccountName string, labName string, userName string, expand string) (result labservices.User, err error) List(ctx context.Context, resourceGroupName string, labAccountName string, labName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationUserPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labAccountName string, labName string, expand string, filter string, top *int32, orderby string) (result labservices.ResponseWithContinuationUserIterator, err error) Update(ctx context.Context, resourceGroupName string, labAccountName string, labName string, userName string, userParameter labservices.UserFragment) (result labservices.User, err error) } diff --git a/services/labservices/mgmt/2018-10-15/labservices/operations.go b/services/labservices/mgmt/2018-10-15/labservices/operations.go index 1f0c832baf04..e943f054c46a 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/operations.go +++ b/services/labservices/mgmt/2018-10-15/labservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/labservices/mgmt/2018-10-15/labservices/provideroperations.go b/services/labservices/mgmt/2018-10-15/labservices/provideroperations.go index 4d9562f62fa6..7876e631bdde 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/provideroperations.go +++ b/services/labservices/mgmt/2018-10-15/labservices/provideroperations.go @@ -35,7 +35,9 @@ func NewProviderOperationsClient(subscriptionID string) ProviderOperationsClient return NewProviderOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsClientWithBaseURI creates an instance of the ProviderOperationsClient client. +// NewProviderOperationsClientWithBaseURI creates an instance of the ProviderOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProviderOperationsClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsClient { return ProviderOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/labservices/mgmt/2018-10-15/labservices/users.go b/services/labservices/mgmt/2018-10-15/labservices/users.go index 18b353abc5d2..02e297fcca3d 100644 --- a/services/labservices/mgmt/2018-10-15/labservices/users.go +++ b/services/labservices/mgmt/2018-10-15/labservices/users.go @@ -35,7 +35,8 @@ func NewUsersClient(subscriptionID string) UsersClient { return NewUsersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsersClientWithBaseURI creates an instance of the UsersClient client. +// NewUsersClientWithBaseURI creates an instance of the UsersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClient { return UsersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/agreements.go b/services/logic/mgmt/2016-06-01/logic/agreements.go index 5b3fef13df69..bf6f4341f361 100644 --- a/services/logic/mgmt/2016-06-01/logic/agreements.go +++ b/services/logic/mgmt/2016-06-01/logic/agreements.go @@ -36,7 +36,8 @@ func NewAgreementsClient(subscriptionID string) AgreementsClient { return NewAgreementsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgreementsClientWithBaseURI creates an instance of the AgreementsClient client. +// NewAgreementsClientWithBaseURI creates an instance of the AgreementsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgreementsClientWithBaseURI(baseURI string, subscriptionID string) AgreementsClient { return AgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/certificates.go b/services/logic/mgmt/2016-06-01/logic/certificates.go index 4676ae15a442..1f6025e24102 100644 --- a/services/logic/mgmt/2016-06-01/logic/certificates.go +++ b/services/logic/mgmt/2016-06-01/logic/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/client.go b/services/logic/mgmt/2016-06-01/logic/client.go index 662f7e6dee66..f428c067a47c 100644 --- a/services/logic/mgmt/2016-06-01/logic/client.go +++ b/services/logic/mgmt/2016-06-01/logic/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go b/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go index 7b44fd9aaf39..a49a35ceb067 100644 --- a/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go +++ b/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go @@ -37,7 +37,8 @@ func NewIntegrationAccountAssembliesClient(subscriptionID string) IntegrationAcc } // NewIntegrationAccountAssembliesClientWithBaseURI creates an instance of the IntegrationAccountAssembliesClient -// 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 NewIntegrationAccountAssembliesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAssembliesClient { return IntegrationAccountAssembliesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go b/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go index f870f34330e4..b3978b6c8db1 100644 --- a/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go +++ b/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go @@ -38,7 +38,8 @@ func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string) Integ } // NewIntegrationAccountBatchConfigurationsClientWithBaseURI creates an instance of the -// IntegrationAccountBatchConfigurationsClient client. +// IntegrationAccountBatchConfigurationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountBatchConfigurationsClient { return IntegrationAccountBatchConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go b/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go index 221ba913bc91..49983b7c8f60 100644 --- a/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go +++ b/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go @@ -36,7 +36,9 @@ func NewIntegrationAccountsClient(subscriptionID string) IntegrationAccountsClie return NewIntegrationAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client. +// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIntegrationAccountsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountsClient { return IntegrationAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/logicapi/interfaces.go b/services/logic/mgmt/2016-06-01/logic/logicapi/interfaces.go index 868667281e2e..fb14b255c2e8 100644 --- a/services/logic/mgmt/2016-06-01/logic/logicapi/interfaces.go +++ b/services/logic/mgmt/2016-06-01/logic/logicapi/interfaces.go @@ -26,6 +26,7 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { ListOperations(ctx context.Context) (result logic.OperationListResultPage, err error) + ListOperationsComplete(ctx context.Context) (result logic.OperationListResultIterator, err error) } var _ BaseClientAPI = (*logic.BaseClient)(nil) @@ -39,7 +40,9 @@ type WorkflowsClientAPI interface { GenerateUpgradedDefinition(ctx context.Context, resourceGroupName string, workflowName string, parameters logic.GenerateUpgradedDefinitionParameters) (result logic.SetObject, err error) Get(ctx context.Context, resourceGroupName string, workflowName string) (result logic.Workflow, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) ListSwagger(ctx context.Context, resourceGroupName string, workflowName string) (result logic.SetObject, err error) Move(ctx context.Context, resourceGroupName string, workflowName string, move logic.Workflow) (result autorest.Response, err error) @@ -55,6 +58,7 @@ var _ WorkflowsClientAPI = (*logic.WorkflowsClient)(nil) type WorkflowVersionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, versionID string) (result logic.WorkflowVersion, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowVersionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowVersionListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, versionID string, triggerName string, parameters *logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -65,6 +69,7 @@ type WorkflowTriggersClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTrigger, err error) GetSchemaJSON(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.JSONSchema, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTriggerCallbackURL, err error) Reset(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error) Run(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.SetObject, err error) @@ -77,6 +82,7 @@ var _ WorkflowTriggersClientAPI = (*logic.WorkflowTriggersClient)(nil) type WorkflowTriggerHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result logic.WorkflowTriggerHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultIterator, err error) Resubmit(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result autorest.Response, err error) } @@ -88,6 +94,7 @@ type WorkflowRunsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result logic.WorkflowRun, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultIterator, err error) } var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil) @@ -96,6 +103,7 @@ var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil) type WorkflowRunActionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.WorkflowRunAction, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultIterator, err error) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.ExpressionTraces, err error) } @@ -114,6 +122,7 @@ var _ WorkflowRunActionRepetitionsClientAPI = (*logic.WorkflowRunActionRepetitio type WorkflowRunActionRepetitionsRequestHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (result logic.RequestHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.RequestHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.RequestHistoryListResultIterator, err error) } var _ WorkflowRunActionRepetitionsRequestHistoriesClientAPI = (*logic.WorkflowRunActionRepetitionsRequestHistoriesClient)(nil) @@ -122,6 +131,7 @@ var _ WorkflowRunActionRepetitionsRequestHistoriesClientAPI = (*logic.WorkflowRu type WorkflowRunActionRequestHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) (result logic.RequestHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.RequestHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.RequestHistoryListResultIterator, err error) } var _ WorkflowRunActionRequestHistoriesClientAPI = (*logic.WorkflowRunActionRequestHistoriesClient)(nil) @@ -148,7 +158,9 @@ type IntegrationAccountsClientAPI interface { Get(ctx context.Context, resourceGroupName string, integrationAccountName string) (result logic.IntegrationAccount, err error) GetCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters logic.GetCallbackURLParameters) (result logic.CallbackURL, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultIterator, err error) ListKeyVaultKeys(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys logic.ListKeyVaultKeysDefinition) (result logic.KeyVaultKeyCollection, err error) LogTrackingEvents(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents logic.TrackingEventsDefinition) (result autorest.Response, err error) RegenerateAccessKey(ctx context.Context, resourceGroupName string, integrationAccountName string, regenerateAccessKey logic.RegenerateActionParameter) (result logic.IntegrationAccount, err error) @@ -184,6 +196,7 @@ type SchemasClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result logic.IntegrationAccountSchema, err error) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultPage, err error) + ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -195,6 +208,7 @@ type MapsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result logic.IntegrationAccountMap, err error) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultPage, err error) + ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -206,6 +220,7 @@ type PartnersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result logic.IntegrationAccountPartner, err error) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultPage, err error) + ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -217,6 +232,7 @@ type AgreementsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result logic.IntegrationAccountAgreement, err error) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultPage, err error) + ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -228,6 +244,7 @@ type CertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result logic.IntegrationAccountCertificate, err error) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultPage, err error) + ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultIterator, err error) } var _ CertificatesClientAPI = (*logic.CertificatesClient)(nil) @@ -238,6 +255,7 @@ type SessionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result logic.IntegrationAccountSession, err error) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSessionListResultPage, err error) + ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSessionListResultIterator, err error) } var _ SessionsClientAPI = (*logic.SessionsClient)(nil) @@ -248,6 +266,7 @@ type RosettaNetProcessConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, rosettaNetProcessConfigurationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, rosettaNetProcessConfigurationName string) (result logic.IntegrationAccountRosettaNetProcessConfiguration, err error) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountRosettaNetProcessConfigurationListResultPage, err error) + ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountRosettaNetProcessConfigurationListResultIterator, err error) } var _ RosettaNetProcessConfigurationsClientAPI = (*logic.RosettaNetProcessConfigurationsClient)(nil) diff --git a/services/logic/mgmt/2016-06-01/logic/maps.go b/services/logic/mgmt/2016-06-01/logic/maps.go index 0fdfda042213..2f6fd4bd7493 100644 --- a/services/logic/mgmt/2016-06-01/logic/maps.go +++ b/services/logic/mgmt/2016-06-01/logic/maps.go @@ -36,7 +36,8 @@ func NewMapsClient(subscriptionID string) MapsClient { return NewMapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMapsClientWithBaseURI creates an instance of the MapsClient client. +// NewMapsClientWithBaseURI creates an instance of the MapsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMapsClientWithBaseURI(baseURI string, subscriptionID string) MapsClient { return MapsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/partners.go b/services/logic/mgmt/2016-06-01/logic/partners.go index 75eff2ec2937..c87194aa020a 100644 --- a/services/logic/mgmt/2016-06-01/logic/partners.go +++ b/services/logic/mgmt/2016-06-01/logic/partners.go @@ -36,7 +36,8 @@ func NewPartnersClient(subscriptionID string) PartnersClient { return NewPartnersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPartnersClientWithBaseURI creates an instance of the PartnersClient client. +// NewPartnersClientWithBaseURI creates an instance of the PartnersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPartnersClientWithBaseURI(baseURI string, subscriptionID string) PartnersClient { return PartnersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/rosettanetprocessconfigurations.go b/services/logic/mgmt/2016-06-01/logic/rosettanetprocessconfigurations.go index c249ea55c4bb..daec7e770e93 100644 --- a/services/logic/mgmt/2016-06-01/logic/rosettanetprocessconfigurations.go +++ b/services/logic/mgmt/2016-06-01/logic/rosettanetprocessconfigurations.go @@ -37,7 +37,8 @@ func NewRosettaNetProcessConfigurationsClient(subscriptionID string) RosettaNetP } // NewRosettaNetProcessConfigurationsClientWithBaseURI creates an instance of the RosettaNetProcessConfigurationsClient -// 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 NewRosettaNetProcessConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) RosettaNetProcessConfigurationsClient { return RosettaNetProcessConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/schemas.go b/services/logic/mgmt/2016-06-01/logic/schemas.go index 21642577f840..9828d43d2174 100644 --- a/services/logic/mgmt/2016-06-01/logic/schemas.go +++ b/services/logic/mgmt/2016-06-01/logic/schemas.go @@ -36,7 +36,8 @@ func NewSchemasClient(subscriptionID string) SchemasClient { return NewSchemasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSchemasClientWithBaseURI creates an instance of the SchemasClient client. +// NewSchemasClientWithBaseURI creates an instance of the SchemasClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSchemasClientWithBaseURI(baseURI string, subscriptionID string) SchemasClient { return SchemasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/sessions.go b/services/logic/mgmt/2016-06-01/logic/sessions.go index ebf7bccb148c..ae222a625934 100644 --- a/services/logic/mgmt/2016-06-01/logic/sessions.go +++ b/services/logic/mgmt/2016-06-01/logic/sessions.go @@ -36,7 +36,8 @@ func NewSessionsClient(subscriptionID string) SessionsClient { return NewSessionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSessionsClientWithBaseURI creates an instance of the SessionsClient client. +// NewSessionsClientWithBaseURI creates an instance of the SessionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSessionsClientWithBaseURI(baseURI string, subscriptionID string) SessionsClient { return SessionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go b/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go index 43b61a068ce6..d25a9a0ccf15 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go @@ -36,7 +36,8 @@ func NewWorkflowRunActionRepetitionsClient(subscriptionID string) WorkflowRunAct } // NewWorkflowRunActionRepetitionsClientWithBaseURI creates an instance of the WorkflowRunActionRepetitionsClient -// 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 NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsClient { return WorkflowRunActionRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitionsrequesthistories.go b/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitionsrequesthistories.go index 3d0259599c10..df59308d69f1 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitionsrequesthistories.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitionsrequesthistories.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string } // NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI creates an instance of the -// WorkflowRunActionRepetitionsRequestHistoriesClient client. +// WorkflowRunActionRepetitionsRequestHistoriesClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient { return WorkflowRunActionRepetitionsRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowrunactionrequesthistories.go b/services/logic/mgmt/2016-06-01/logic/workflowrunactionrequesthistories.go index f5dfcfddcf98..46c480b32ddb 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowrunactionrequesthistories.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowrunactionrequesthistories.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionRequestHistoriesClient(subscriptionID string) WorkflowR } // NewWorkflowRunActionRequestHistoriesClientWithBaseURI creates an instance of the -// WorkflowRunActionRequestHistoriesClient client. +// WorkflowRunActionRequestHistoriesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRequestHistoriesClient { return WorkflowRunActionRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go b/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go index 7177c81af7c0..f4899f3694c6 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go @@ -35,7 +35,9 @@ func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient return NewWorkflowRunActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client. +// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient { return WorkflowRunActionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go b/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go index 8bdd74edbe47..d19704e12fc4 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionScopedRepetitionsClient(subscriptionID string) Workflow } // NewWorkflowRunActionScopedRepetitionsClientWithBaseURI creates an instance of the -// WorkflowRunActionScopedRepetitionsClient client. +// WorkflowRunActionScopedRepetitionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionScopedRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionScopedRepetitionsClient { return WorkflowRunActionScopedRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go b/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go index 25e359c26941..6e6f4fdd2cfb 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go @@ -35,7 +35,9 @@ func NewWorkflowRunOperationsClient(subscriptionID string) WorkflowRunOperations return NewWorkflowRunOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunOperationsClientWithBaseURI creates an instance of the WorkflowRunOperationsClient client. +// NewWorkflowRunOperationsClientWithBaseURI creates an instance of the WorkflowRunOperationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewWorkflowRunOperationsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunOperationsClient { return WorkflowRunOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowruns.go b/services/logic/mgmt/2016-06-01/logic/workflowruns.go index 5049bb1e43e2..9c7ebf1ec6e9 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowruns.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowruns.go @@ -35,7 +35,8 @@ func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient { return NewWorkflowRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client. +// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunsClient { return WorkflowRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflows.go b/services/logic/mgmt/2016-06-01/logic/workflows.go index 54e43c9eea8e..cb2e535c75fc 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflows.go +++ b/services/logic/mgmt/2016-06-01/logic/workflows.go @@ -35,7 +35,8 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowtriggerhistories.go b/services/logic/mgmt/2016-06-01/logic/workflowtriggerhistories.go index de8e99553753..d00bc714e609 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowtriggerhistories.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowtriggerhistories.go @@ -35,7 +35,9 @@ func NewWorkflowTriggerHistoriesClient(subscriptionID string) WorkflowTriggerHis return NewWorkflowTriggerHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client. +// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewWorkflowTriggerHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggerHistoriesClient { return WorkflowTriggerHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go b/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go index 627c6736cad5..c050d12852dd 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go @@ -36,7 +36,9 @@ func NewWorkflowTriggersClient(subscriptionID string) WorkflowTriggersClient { return NewWorkflowTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client. +// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggersClient { return WorkflowTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/logic/mgmt/2016-06-01/logic/workflowversions.go b/services/logic/mgmt/2016-06-01/logic/workflowversions.go index d50b0e49a63d..4e37f27d0f15 100644 --- a/services/logic/mgmt/2016-06-01/logic/workflowversions.go +++ b/services/logic/mgmt/2016-06-01/logic/workflowversions.go @@ -35,7 +35,9 @@ func NewWorkflowVersionsClient(subscriptionID string) WorkflowVersionsClient { return NewWorkflowVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client. +// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowVersionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionsClient { return WorkflowVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearning/mgmt/2016-04-01/workspaces/client.go b/services/machinelearning/mgmt/2016-04-01/workspaces/client.go index 48869d97469d..2cdab27e9102 100644 --- a/services/machinelearning/mgmt/2016-04-01/workspaces/client.go +++ b/services/machinelearning/mgmt/2016-04-01/workspaces/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/machinelearning/mgmt/2016-04-01/workspaces/operations.go b/services/machinelearning/mgmt/2016-04-01/workspaces/operations.go index a08c06520f2e..4b6649424d88 100644 --- a/services/machinelearning/mgmt/2016-04-01/workspaces/operations.go +++ b/services/machinelearning/mgmt/2016-04-01/workspaces/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/machinelearning/mgmt/2016-04-01/workspaces/workspaces.go b/services/machinelearning/mgmt/2016-04-01/workspaces/workspaces.go index a641c9b769d3..8cb9363747d2 100644 --- a/services/machinelearning/mgmt/2016-04-01/workspaces/workspaces.go +++ b/services/machinelearning/mgmt/2016-04-01/workspaces/workspaces.go @@ -37,7 +37,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/machinelearning/mgmt/2016-04-01/workspaces/workspacesapi/interfaces.go b/services/machinelearning/mgmt/2016-04-01/workspaces/workspacesapi/interfaces.go index 7c6547e557c4..d4d5d9e4ed77 100644 --- a/services/machinelearning/mgmt/2016-04-01/workspaces/workspacesapi/interfaces.go +++ b/services/machinelearning/mgmt/2016-04-01/workspaces/workspacesapi/interfaces.go @@ -36,7 +36,9 @@ type ClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result workspaces.Workspace, err error) List(ctx context.Context) (result workspaces.ListResultPage, err error) + ListComplete(ctx context.Context) (result workspaces.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result workspaces.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result workspaces.ListResultIterator, err error) ListWorkspaceKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result workspaces.KeysResponse, err error) ResyncStorageKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters workspaces.UpdateParameters) (result workspaces.Workspace, err error) diff --git a/services/machinelearning/mgmt/2017-01-01/webservices/client.go b/services/machinelearning/mgmt/2017-01-01/webservices/client.go index ae9a36bfd0dc..51427d411fd3 100644 --- a/services/machinelearning/mgmt/2017-01-01/webservices/client.go +++ b/services/machinelearning/mgmt/2017-01-01/webservices/client.go @@ -44,7 +44,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/machinelearning/mgmt/2017-01-01/webservices/operations.go b/services/machinelearning/mgmt/2017-01-01/webservices/operations.go index a3493ee8be47..f03d28ebbc06 100644 --- a/services/machinelearning/mgmt/2017-01-01/webservices/operations.go +++ b/services/machinelearning/mgmt/2017-01-01/webservices/operations.go @@ -38,7 +38,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go b/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go index 77db4da07423..be151a371911 100644 --- a/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go +++ b/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go @@ -39,7 +39,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/machinelearning/mgmt/2017-01-01/webservices/webservicesapi/interfaces.go b/services/machinelearning/mgmt/2017-01-01/webservices/webservicesapi/interfaces.go index b6f293e9733f..2eee6985e59a 100644 --- a/services/machinelearning/mgmt/2017-01-01/webservices/webservicesapi/interfaces.go +++ b/services/machinelearning/mgmt/2017-01-01/webservices/webservicesapi/interfaces.go @@ -35,7 +35,9 @@ type ClientAPI interface { CreateRegionalProperties(ctx context.Context, resourceGroupName string, webServiceName string, region string) (result webservices.CreateRegionalPropertiesFuture, err error) Get(ctx context.Context, resourceGroupName string, webServiceName string, region string) (result webservices.WebService, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result webservices.PaginatedWebServicesListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result webservices.PaginatedWebServicesListIterator, err error) ListBySubscriptionID(ctx context.Context, skiptoken string) (result webservices.PaginatedWebServicesListPage, err error) + ListBySubscriptionIDComplete(ctx context.Context, skiptoken string) (result webservices.PaginatedWebServicesListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, webServiceName string) (result webservices.Keys, err error) Patch(ctx context.Context, resourceGroupName string, webServiceName string, patchPayload webservices.PatchedWebService) (result webservices.PatchFuture, err error) Remove(ctx context.Context, resourceGroupName string, webServiceName string) (result webservices.RemoveFuture, err error) diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/client.go b/services/machinelearning/mgmt/2019-10-01/workspaces/client.go index 6cb66b287a0c..cf33db418677 100644 --- a/services/machinelearning/mgmt/2019-10-01/workspaces/client.go +++ b/services/machinelearning/mgmt/2019-10-01/workspaces/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/operations.go b/services/machinelearning/mgmt/2019-10-01/workspaces/operations.go index 9eb5a17f1918..d0815b88cdda 100644 --- a/services/machinelearning/mgmt/2019-10-01/workspaces/operations.go +++ b/services/machinelearning/mgmt/2019-10-01/workspaces/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/workspaces.go b/services/machinelearning/mgmt/2019-10-01/workspaces/workspaces.go index dedb2b397540..bf9de3e704c4 100644 --- a/services/machinelearning/mgmt/2019-10-01/workspaces/workspaces.go +++ b/services/machinelearning/mgmt/2019-10-01/workspaces/workspaces.go @@ -37,7 +37,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi/interfaces.go b/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi/interfaces.go index 3c0e58630f26..a47bc44767d6 100644 --- a/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi/interfaces.go +++ b/services/machinelearning/mgmt/2019-10-01/workspaces/workspacesapi/interfaces.go @@ -36,7 +36,9 @@ type ClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result workspaces.Workspace, err error) List(ctx context.Context) (result workspaces.ListResultPage, err error) + ListComplete(ctx context.Context) (result workspaces.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result workspaces.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result workspaces.ListResultIterator, err error) ListWorkspaceKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result workspaces.KeysResponse, err error) ResyncStorageKeys(ctx context.Context, workspaceName string, resourceGroupName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters workspaces.UpdateParameters) (result workspaces.Workspace, err error) diff --git a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/client.go b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/client.go index b14d145a501f..87f303b1f708 100644 --- a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/client.go +++ b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/machinelearningcompute.go b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/machinelearningcompute.go index cc2e3cba5915..e80cf2e0df64 100644 --- a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/machinelearningcompute.go +++ b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/machinelearningcompute.go @@ -36,7 +36,9 @@ func NewMachineLearningComputeClient(subscriptionID string) MachineLearningCompu return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client. +// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient { return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/machinelearningservicesapi/interfaces.go b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/machinelearningservicesapi/interfaces.go index 11e6c6b53436..ee3685590b22 100644 --- a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/machinelearningservicesapi/interfaces.go +++ b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/machinelearningservicesapi/interfaces.go @@ -32,11 +32,13 @@ var _ OperationsClientAPI = (*machinelearningservices.OperationsClient)(nil) // WorkspacesClientAPI contains the set of methods on the WorkspacesClient type. type WorkspacesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.Workspace, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.WorkspacesCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.Workspace, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListBySubscription(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListWorkspaceKeysResult, err error) ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.WorkspaceUpdateParameters) (result machinelearningservices.Workspace, err error) @@ -47,6 +49,7 @@ var _ WorkspacesClientAPI = (*machinelearningservices.WorkspacesClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result machinelearningservices.ListUsagesResultPage, err error) + ListComplete(ctx context.Context, location string) (result machinelearningservices.ListUsagesResultIterator, err error) } var _ UsagesClientAPI = (*machinelearningservices.UsagesClient)(nil) @@ -64,8 +67,10 @@ type MachineLearningComputeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction machinelearningservices.UnderlyingResourceAction) (result machinelearningservices.MachineLearningComputeDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeResource, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeSecretsModel, err error) ListNodes(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.AmlComputeNodesInformationPage, err error) + ListNodesComplete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.AmlComputeNodesInformationIterator, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters machinelearningservices.ClusterUpdateParameters) (result machinelearningservices.MachineLearningComputeUpdateFuture, err error) } diff --git a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/models.go b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/models.go index 92cc1efcdb67..600166b72801 100644 --- a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/models.go +++ b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/models.go @@ -2695,6 +2695,35 @@ type WorkspacePropertiesUpdateParameters struct { FriendlyName *string `json:"friendlyName,omitempty"` } +// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspacesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("machinelearningservices.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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request") + } + } + return +} + // WorkspaceUpdateParameters the parameters for updating a machine learning workspace. type WorkspaceUpdateParameters struct { // Tags - The resource tags for the machine learning workspace. diff --git a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/operations.go b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/operations.go index b439b5a38738..c6423e0acf72 100644 --- a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/operations.go +++ b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/usages.go b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/usages.go index 3cff0dd476e6..3d729f9f6844 100644 --- a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/usages.go +++ b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/virtualmachinesizes.go b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/virtualmachinesizes.go index c14d42de5c08..4ae1129aab23 100644 --- a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/virtualmachinesizes.go +++ b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/virtualmachinesizes.go @@ -37,7 +37,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/workspaces.go b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/workspaces.go index c9793e44e239..bd0ebd38d2ef 100644 --- a/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/workspaces.go +++ b/services/machinelearningservices/mgmt/2018-11-19/machinelearningservices/workspaces.go @@ -35,7 +35,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } @@ -45,13 +46,13 @@ func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) Works // resourceGroupName - name of the resource group in which workspace is located. // workspaceName - name of Azure Machine Learning workspace. // parameters - the parameters for creating or updating a machine learning workspace. -func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) { +func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result WorkspacesCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -62,18 +63,12 @@ func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroup return } - resp, err := client.CreateOrUpdateSender(req) + result, err = client.CreateOrUpdateSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure responding to request") - } - return } @@ -102,9 +97,15 @@ func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // 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) (*http.Response, error) { +func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future WorkspacesCreateOrUpdateFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -113,7 +114,7 @@ func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (res err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/client.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/client.go index 185e4bb05a16..981cf38a2ca4 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/client.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningcompute.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningcompute.go index 5d4c342e7e6e..f75809542c03 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningcompute.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningcompute.go @@ -36,7 +36,9 @@ func NewMachineLearningComputeClient(subscriptionID string) MachineLearningCompu return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client. +// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient { return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningservicesapi/interfaces.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningservicesapi/interfaces.go index 4512c69f7c38..46aee280810e 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningservicesapi/interfaces.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/machinelearningservicesapi/interfaces.go @@ -32,11 +32,13 @@ var _ OperationsClientAPI = (*machinelearningservices.OperationsClient)(nil) // WorkspacesClientAPI contains the set of methods on the WorkspacesClient type. type WorkspacesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.Workspace, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.WorkspacesCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.Workspace, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListBySubscription(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListWorkspaceKeysResult, err error) ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.WorkspaceUpdateParameters) (result machinelearningservices.Workspace, err error) @@ -47,6 +49,7 @@ var _ WorkspacesClientAPI = (*machinelearningservices.WorkspacesClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string, expandChildren string) (result machinelearningservices.ListUsagesResultPage, err error) + ListComplete(ctx context.Context, location string, expandChildren string) (result machinelearningservices.ListUsagesResultIterator, err error) } var _ UsagesClientAPI = (*machinelearningservices.UsagesClient)(nil) @@ -64,6 +67,7 @@ type MachineLearningComputeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction machinelearningservices.UnderlyingResourceAction) (result machinelearningservices.MachineLearningComputeDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeResource, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeSecretsModel, err error) ListNodes(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.AmlComputeNodesInformation, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters machinelearningservices.ClusterUpdateParameters) (result machinelearningservices.MachineLearningComputeUpdateFuture, err error) diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/models.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/models.go index cbc895843cb5..69fb397ab105 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/models.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/models.go @@ -2561,6 +2561,35 @@ type WorkspacePropertiesUpdateParameters struct { FriendlyName *string `json:"friendlyName,omitempty"` } +// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspacesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("machinelearningservices.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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request") + } + } + return +} + // WorkspaceUpdateParameters the parameters for updating a machine learning workspace. type WorkspaceUpdateParameters struct { // Tags - The resource tags for the machine learning workspace. diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/operations.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/operations.go index 8a6f94750a28..cf49a6dcf4a6 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/operations.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/usages.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/usages.go index e1c426c6a935..8643035b793e 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/usages.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/virtualmachinesizes.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/virtualmachinesizes.go index f5afe81c3a17..17f41481665c 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/virtualmachinesizes.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/virtualmachinesizes.go @@ -37,7 +37,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/workspaces.go b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/workspaces.go index 17b9f90a3490..7dd29d472ae3 100644 --- a/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/workspaces.go +++ b/services/machinelearningservices/mgmt/2019-05-01/machinelearningservices/workspaces.go @@ -35,7 +35,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } @@ -45,13 +46,13 @@ func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) Works // resourceGroupName - name of the resource group in which workspace is located. // workspaceName - name of Azure Machine Learning workspace. // parameters - the parameters for creating or updating a machine learning workspace. -func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) { +func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result WorkspacesCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -62,18 +63,12 @@ func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroup return } - resp, err := client.CreateOrUpdateSender(req) + result, err = client.CreateOrUpdateSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure responding to request") - } - return } @@ -102,9 +97,15 @@ func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // 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) (*http.Response, error) { +func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future WorkspacesCreateOrUpdateFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -113,7 +114,7 @@ func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (res err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/client.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/client.go index ad8ad4f10004..4589354d2a09 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/client.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningcompute.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningcompute.go index 4964a1c41d68..c7ecfd5c2cda 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningcompute.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningcompute.go @@ -36,7 +36,9 @@ func NewMachineLearningComputeClient(subscriptionID string) MachineLearningCompu return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client. +// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient { return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningservicesapi/interfaces.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningservicesapi/interfaces.go index 7c99803ab17f..d8cb065094c4 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningservicesapi/interfaces.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/machinelearningservicesapi/interfaces.go @@ -32,11 +32,13 @@ var _ OperationsClientAPI = (*machinelearningservices.OperationsClient)(nil) // WorkspacesClientAPI contains the set of methods on the WorkspacesClient type. type WorkspacesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.Workspace, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.WorkspacesCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.Workspace, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListBySubscription(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListWorkspaceKeysResult, err error) ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.WorkspaceUpdateParameters) (result machinelearningservices.Workspace, err error) @@ -47,6 +49,7 @@ var _ WorkspacesClientAPI = (*machinelearningservices.WorkspacesClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string, expandChildren string) (result machinelearningservices.ListUsagesResultPage, err error) + ListComplete(ctx context.Context, location string, expandChildren string) (result machinelearningservices.ListUsagesResultIterator, err error) } var _ UsagesClientAPI = (*machinelearningservices.UsagesClient)(nil) @@ -61,6 +64,7 @@ var _ VirtualMachineSizesClientAPI = (*machinelearningservices.VirtualMachineSiz // QuotasClientAPI contains the set of methods on the QuotasClient type. type QuotasClientAPI interface { List(ctx context.Context, location string) (result machinelearningservices.ListWorkspaceQuotasPage, err error) + ListComplete(ctx context.Context, location string) (result machinelearningservices.ListWorkspaceQuotasIterator, err error) Update(ctx context.Context, location string, parameters machinelearningservices.QuotaUpdateParameters) (result machinelearningservices.UpdateWorkspaceQuotasResult, err error) } @@ -72,6 +76,7 @@ type MachineLearningComputeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction machinelearningservices.UnderlyingResourceAction) (result machinelearningservices.MachineLearningComputeDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeResource, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeSecretsModel, err error) ListNodes(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.AmlComputeNodesInformation, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters machinelearningservices.ClusterUpdateParameters) (result machinelearningservices.MachineLearningComputeUpdateFuture, err error) diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/models.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/models.go index 7086dd2e9dad..0390548c03bf 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/models.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/models.go @@ -2856,6 +2856,35 @@ type WorkspacePropertiesUpdateParameters struct { FriendlyName *string `json:"friendlyName,omitempty"` } +// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspacesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("machinelearningservices.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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request") + } + } + return +} + // WorkspaceUpdateParameters the parameters for updating a machine learning workspace. type WorkspaceUpdateParameters struct { // Tags - The resource tags for the machine learning workspace. diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/operations.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/operations.go index e897b167eadb..46a96f2f2fab 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/operations.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/quotas.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/quotas.go index 72621c6e6c11..e87a4842aef5 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/quotas.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/quotas.go @@ -36,7 +36,8 @@ func NewQuotasClient(subscriptionID string) QuotasClient { return NewQuotasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotasClientWithBaseURI creates an instance of the QuotasClient client. +// NewQuotasClientWithBaseURI creates an instance of the QuotasClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQuotasClientWithBaseURI(baseURI string, subscriptionID string) QuotasClient { return QuotasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/usages.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/usages.go index 95538f0275d7..93d15d7a8b93 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/usages.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/virtualmachinesizes.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/virtualmachinesizes.go index e1bab4877e29..f34c7251b7ca 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/virtualmachinesizes.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/virtualmachinesizes.go @@ -37,7 +37,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/workspaces.go b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/workspaces.go index 6b4a947da202..006a361499a8 100644 --- a/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/workspaces.go +++ b/services/machinelearningservices/mgmt/2019-06-01/machinelearningservices/workspaces.go @@ -35,7 +35,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } @@ -45,13 +46,13 @@ func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) Works // resourceGroupName - name of the resource group in which workspace is located. // workspaceName - name of Azure Machine Learning workspace. // parameters - the parameters for creating or updating a machine learning workspace. -func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) { +func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result WorkspacesCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -62,18 +63,12 @@ func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroup return } - resp, err := client.CreateOrUpdateSender(req) + result, err = client.CreateOrUpdateSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure responding to request") - } - return } @@ -102,9 +97,15 @@ func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // 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) (*http.Response, error) { +func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future WorkspacesCreateOrUpdateFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -113,7 +114,7 @@ func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (res err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/client.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/client.go index c45bf7ac1a4d..50ffe2e754d7 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/client.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningcompute.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningcompute.go index a1f4adeb26e2..ac0e79478237 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningcompute.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningcompute.go @@ -36,7 +36,9 @@ func NewMachineLearningComputeClient(subscriptionID string) MachineLearningCompu return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client. +// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient { return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi/interfaces.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi/interfaces.go index 7b616501cac5..ebf4fe6ced3e 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi/interfaces.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/machinelearningservicesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { ListSkus(ctx context.Context) (result machinelearningservices.SkuListResultPage, err error) + ListSkusComplete(ctx context.Context) (result machinelearningservices.SkuListResultIterator, err error) } var _ BaseClientAPI = (*machinelearningservices.BaseClient)(nil) @@ -39,11 +40,13 @@ var _ OperationsClientAPI = (*machinelearningservices.OperationsClient)(nil) // WorkspacesClientAPI contains the set of methods on the WorkspacesClient type. type WorkspacesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.Workspace, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.WorkspacesCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.Workspace, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListBySubscription(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListWorkspaceKeysResult, err error) ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.WorkspaceUpdateParameters) (result machinelearningservices.Workspace, err error) @@ -54,6 +57,7 @@ var _ WorkspacesClientAPI = (*machinelearningservices.WorkspacesClient)(nil) // WorkspaceFeaturesClientAPI contains the set of methods on the WorkspaceFeaturesClient type. type WorkspaceFeaturesClientAPI interface { List(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListAmlUserFeatureResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListAmlUserFeatureResultIterator, err error) } var _ WorkspaceFeaturesClientAPI = (*machinelearningservices.WorkspaceFeaturesClient)(nil) @@ -61,6 +65,7 @@ var _ WorkspaceFeaturesClientAPI = (*machinelearningservices.WorkspaceFeaturesCl // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result machinelearningservices.ListUsagesResultPage, err error) + ListComplete(ctx context.Context, location string) (result machinelearningservices.ListUsagesResultIterator, err error) } var _ UsagesClientAPI = (*machinelearningservices.UsagesClient)(nil) @@ -75,6 +80,7 @@ var _ VirtualMachineSizesClientAPI = (*machinelearningservices.VirtualMachineSiz // QuotasClientAPI contains the set of methods on the QuotasClient type. type QuotasClientAPI interface { List(ctx context.Context, location string) (result machinelearningservices.ListWorkspaceQuotasPage, err error) + ListComplete(ctx context.Context, location string) (result machinelearningservices.ListWorkspaceQuotasIterator, err error) Update(ctx context.Context, location string, parameters machinelearningservices.QuotaUpdateParameters) (result machinelearningservices.UpdateWorkspaceQuotasResult, err error) } @@ -86,6 +92,7 @@ type MachineLearningComputeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction machinelearningservices.UnderlyingResourceAction) (result machinelearningservices.MachineLearningComputeDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeResource, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeSecretsModel, err error) ListNodes(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.AmlComputeNodesInformation, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters machinelearningservices.ClusterUpdateParameters) (result machinelearningservices.MachineLearningComputeUpdateFuture, err error) diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/models.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/models.go index c272336c8d39..8c7b987c9756 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/models.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/models.go @@ -3264,6 +3264,35 @@ type WorkspacePropertiesUpdateParameters struct { FriendlyName *string `json:"friendlyName,omitempty"` } +// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspacesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("machinelearningservices.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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request") + } + } + return +} + // WorkspaceSku describes Workspace Sku details and features type WorkspaceSku struct { // Locations - READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/operations.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/operations.go index ac0b4618539a..2161fbaad23a 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/operations.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/quotas.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/quotas.go index 37294ebc7a90..78ce2232bbdb 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/quotas.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/quotas.go @@ -36,7 +36,8 @@ func NewQuotasClient(subscriptionID string) QuotasClient { return NewQuotasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotasClientWithBaseURI creates an instance of the QuotasClient client. +// NewQuotasClientWithBaseURI creates an instance of the QuotasClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQuotasClientWithBaseURI(baseURI string, subscriptionID string) QuotasClient { return QuotasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/usages.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/usages.go index 24e129428c59..1a8258ccd370 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/usages.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/virtualmachinesizes.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/virtualmachinesizes.go index 676292e87790..d5cdfaa391c1 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/virtualmachinesizes.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/virtualmachinesizes.go @@ -37,7 +37,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspacefeatures.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspacefeatures.go index 63fd28903762..65c70eaea2b0 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspacefeatures.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspacefeatures.go @@ -35,7 +35,9 @@ func NewWorkspaceFeaturesClient(subscriptionID string) WorkspaceFeaturesClient { return NewWorkspaceFeaturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspaceFeaturesClientWithBaseURI creates an instance of the WorkspaceFeaturesClient client. +// NewWorkspaceFeaturesClientWithBaseURI creates an instance of the WorkspaceFeaturesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkspaceFeaturesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceFeaturesClient { return WorkspaceFeaturesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspaces.go b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspaces.go index c46070841a5a..59deddcdfe7a 100644 --- a/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspaces.go +++ b/services/machinelearningservices/mgmt/2019-11-01/machinelearningservices/workspaces.go @@ -35,7 +35,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } @@ -45,13 +46,13 @@ func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) Works // resourceGroupName - name of the resource group in which workspace is located. // workspaceName - name of Azure Machine Learning workspace. // parameters - the parameters for creating or updating a machine learning workspace. -func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) { +func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result WorkspacesCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -62,18 +63,12 @@ func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroup return } - resp, err := client.CreateOrUpdateSender(req) + result, err = client.CreateOrUpdateSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure responding to request") - } - return } @@ -102,9 +97,15 @@ func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // 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) (*http.Response, error) { +func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future WorkspacesCreateOrUpdateFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -113,7 +114,7 @@ func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (res err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/client.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/client.go index 1f3866e9d4d5..9b553e4f9ad5 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/client.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/machinelearningcompute.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/machinelearningcompute.go index 5b51e4a95d06..7be9834fb89e 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/machinelearningcompute.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/machinelearningcompute.go @@ -36,7 +36,9 @@ func NewMachineLearningComputeClient(subscriptionID string) MachineLearningCompu return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client. +// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient { return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/machinelearningservicesapi/interfaces.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/machinelearningservicesapi/interfaces.go index 327f2243588a..590204f7b946 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/machinelearningservicesapi/interfaces.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/machinelearningservicesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { ListSkus(ctx context.Context) (result machinelearningservices.SkuListResultPage, err error) + ListSkusComplete(ctx context.Context) (result machinelearningservices.SkuListResultIterator, err error) } var _ BaseClientAPI = (*machinelearningservices.BaseClient)(nil) @@ -39,11 +40,13 @@ var _ OperationsClientAPI = (*machinelearningservices.OperationsClient)(nil) // WorkspacesClientAPI contains the set of methods on the WorkspacesClient type. type WorkspacesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.Workspace, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.Workspace) (result machinelearningservices.WorkspacesCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.Workspace, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListBySubscription(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListWorkspaceKeysResult, err error) ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.WorkspaceUpdateParameters) (result machinelearningservices.Workspace, err error) @@ -54,6 +57,7 @@ var _ WorkspacesClientAPI = (*machinelearningservices.WorkspacesClient)(nil) // WorkspaceFeaturesClientAPI contains the set of methods on the WorkspaceFeaturesClient type. type WorkspaceFeaturesClientAPI interface { List(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListAmlUserFeatureResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListAmlUserFeatureResultIterator, err error) } var _ WorkspaceFeaturesClientAPI = (*machinelearningservices.WorkspaceFeaturesClient)(nil) @@ -61,6 +65,7 @@ var _ WorkspaceFeaturesClientAPI = (*machinelearningservices.WorkspaceFeaturesCl // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result machinelearningservices.ListUsagesResultPage, err error) + ListComplete(ctx context.Context, location string) (result machinelearningservices.ListUsagesResultIterator, err error) } var _ UsagesClientAPI = (*machinelearningservices.UsagesClient)(nil) @@ -75,6 +80,7 @@ var _ VirtualMachineSizesClientAPI = (*machinelearningservices.VirtualMachineSiz // QuotasClientAPI contains the set of methods on the QuotasClient type. type QuotasClientAPI interface { List(ctx context.Context, location string) (result machinelearningservices.ListWorkspaceQuotasPage, err error) + ListComplete(ctx context.Context, location string) (result machinelearningservices.ListWorkspaceQuotasIterator, err error) Update(ctx context.Context, location string, parameters machinelearningservices.QuotaUpdateParameters) (result machinelearningservices.UpdateWorkspaceQuotasResult, err error) } @@ -86,6 +92,7 @@ type MachineLearningComputeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction machinelearningservices.UnderlyingResourceAction) (result machinelearningservices.MachineLearningComputeDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeResource, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeSecretsModel, err error) ListNodes(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.AmlComputeNodesInformation, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters machinelearningservices.ClusterUpdateParameters) (result machinelearningservices.MachineLearningComputeUpdateFuture, err error) diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/models.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/models.go index c9b46151d64a..9df23ca6cc13 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/models.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/models.go @@ -133,6 +133,21 @@ func PossibleComputeTypeBasicComputeSecretsValues() []ComputeTypeBasicComputeSec return []ComputeTypeBasicComputeSecrets{ComputeTypeBasicComputeSecretsComputeTypeAKS, ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets, ComputeTypeBasicComputeSecretsComputeTypeDatabricks, ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine} } +// EncryptionStatus enumerates the values for encryption status. +type EncryptionStatus string + +const ( + // Disabled ... + Disabled EncryptionStatus = "Disabled" + // Enabled ... + Enabled EncryptionStatus = "Enabled" +) + +// PossibleEncryptionStatusValues returns an array of possible values for the EncryptionStatus const type. +func PossibleEncryptionStatusValues() []EncryptionStatus { + return []EncryptionStatus{Disabled, Enabled} +} + // NodeState enumerates the values for node state. type NodeState string @@ -309,15 +324,15 @@ func PossibleStatusValues() []Status { type Status1 string const ( - // Disabled ... - Disabled Status1 = "Disabled" - // Enabled ... - Enabled Status1 = "Enabled" + // Status1Disabled ... + Status1Disabled Status1 = "Disabled" + // Status1Enabled ... + Status1Enabled Status1 = "Enabled" ) // PossibleStatus1Values returns an array of possible values for the Status1 const type. func PossibleStatus1Values() []Status1 { - return []Status1{Disabled, Enabled} + return []Status1{Status1Disabled, Status1Enabled} } // UnderlyingResourceAction enumerates the values for underlying resource action. @@ -1560,6 +1575,14 @@ type DataLakeAnalyticsProperties struct { DataLakeStoreAccountName *string `json:"dataLakeStoreAccountName,omitempty"` } +// EncryptionProperty ... +type EncryptionProperty struct { + // Status - Indicates whether or not the encryption is enabled for the workspace. Possible values include: 'Enabled', 'Disabled' + Status EncryptionStatus `json:"status,omitempty"` + // KeyVaultProperties - Customer Key vault properties. + KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"` +} + // Error wrapper for error response to follow ARM guidelines. type Error struct { // Error - READ-ONLY; The error response. @@ -1694,6 +1717,16 @@ type Identity struct { Type ResourceIdentityType `json:"type,omitempty"` } +// KeyVaultProperties ... +type KeyVaultProperties struct { + // KeyVaultArmID - The ArmId of the keyVault where the customer owned encryption key is present. + KeyVaultArmID *string `json:"keyVaultArmId,omitempty"` + // KeyIdentifier - Key vault uri to access the encryption key. + KeyIdentifier *string `json:"keyIdentifier,omitempty"` + // IdentityClientID - For future use - The client id of the identity which will be used to access key vault. + IdentityClientID *string `json:"identityClientId,omitempty"` +} + // ListAmlUserFeatureResult the List Aml user feature operation response. type ListAmlUserFeatureResult struct { autorest.Response `json:"-"` @@ -3016,7 +3049,7 @@ func NewSkuListResultPage(getNextPage func(context.Context, SkuListResult) (SkuL // SslConfiguration the ssl configuration for scoring type SslConfiguration struct { - // Status - Enable or disable ssl for scoring. Possible values include: 'Disabled', 'Enabled' + // Status - Enable or disable ssl for scoring. Possible values include: 'Status1Disabled', 'Status1Enabled' Status Status1 `json:"status,omitempty"` // Cert - Cert data Cert *string `json:"cert,omitempty"` @@ -3576,6 +3609,10 @@ type WorkspaceProperties struct { DiscoveryURL *string `json:"discoveryUrl,omitempty"` // ProvisioningState - READ-ONLY; The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Encryption - The encryption settings of Azure ML workspace. + Encryption *EncryptionProperty `json:"encryption,omitempty"` + // HbiWorkspace - The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service + HbiWorkspace *bool `json:"hbiWorkspace,omitempty"` } // WorkspacePropertiesUpdateParameters the parameters for updating the properties of a machine learning @@ -3587,6 +3624,35 @@ type WorkspacePropertiesUpdateParameters struct { FriendlyName *string `json:"friendlyName,omitempty"` } +// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkspacesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("machinelearningservices.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, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request") + } + } + return +} + // WorkspaceSku describes Workspace Sku details and features type WorkspaceSku struct { // Locations - READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/operations.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/operations.go index 66174c5d2807..a83673feebf9 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/operations.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/privateendpointconnections.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/privateendpointconnections.go index 42fc321c024c..7e574b830c86 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/privateendpointconnections.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/privateendpointconnections.go @@ -37,7 +37,9 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointC return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/privatelinkresources.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/privatelinkresources.go index 80f13fe8fd1a..354c46568e71 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/privatelinkresources.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/privatelinkresources.go @@ -36,7 +36,9 @@ func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesCl return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/quotas.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/quotas.go index 6b9d8c0962e0..6449d34609c5 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/quotas.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/quotas.go @@ -36,7 +36,8 @@ func NewQuotasClient(subscriptionID string) QuotasClient { return NewQuotasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotasClientWithBaseURI creates an instance of the QuotasClient client. +// NewQuotasClientWithBaseURI creates an instance of the QuotasClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQuotasClientWithBaseURI(baseURI string, subscriptionID string) QuotasClient { return QuotasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/usages.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/usages.go index 8c65ee6423d0..bef272cbc0ba 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/usages.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/virtualmachinesizes.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/virtualmachinesizes.go index 989ff8b4fe2c..00cafd5c5eaa 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/virtualmachinesizes.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/virtualmachinesizes.go @@ -37,7 +37,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/workspacefeatures.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/workspacefeatures.go index 4d5f8b3a71f6..d5db251b8bbb 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/workspacefeatures.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/workspacefeatures.go @@ -35,7 +35,9 @@ func NewWorkspaceFeaturesClient(subscriptionID string) WorkspaceFeaturesClient { return NewWorkspaceFeaturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspaceFeaturesClientWithBaseURI creates an instance of the WorkspaceFeaturesClient client. +// NewWorkspaceFeaturesClientWithBaseURI creates an instance of the WorkspaceFeaturesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkspaceFeaturesClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceFeaturesClient { return WorkspaceFeaturesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/workspaces.go b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/workspaces.go index 65e8f21ba830..fa14f6f319bb 100644 --- a/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/workspaces.go +++ b/services/machinelearningservices/mgmt/2020-01-01/machinelearningservices/workspaces.go @@ -21,6 +21,7 @@ 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" ) @@ -35,7 +36,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } @@ -45,35 +47,42 @@ func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) Works // resourceGroupName - name of the resource group in which workspace is located. // workspaceName - name of Azure Machine Learning workspace. // parameters - the parameters for creating or updating a machine learning workspace. -func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) { +func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result WorkspacesCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.WorkspaceProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WorkspaceProperties.Encryption", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WorkspaceProperties.Encryption.KeyVaultProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.WorkspaceProperties.Encryption.KeyVaultProperties.KeyVaultArmID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.WorkspaceProperties.Encryption.KeyVaultProperties.KeyIdentifier", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("machinelearningservices.WorkspacesClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateSender(req) + result, err = client.CreateOrUpdateSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesClient", "CreateOrUpdate", resp, "Failure responding to request") - } - return } @@ -102,9 +111,15 @@ func (client WorkspacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // 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) (*http.Response, error) { +func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future WorkspacesCreateOrUpdateFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -113,7 +128,7 @@ func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (res err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/services/managedservices/mgmt/2019-06-01/managedservices/client.go b/services/managedservices/mgmt/2019-06-01/managedservices/client.go index 551e1caf5666..3a1816f9f123 100644 --- a/services/managedservices/mgmt/2019-06-01/managedservices/client.go +++ b/services/managedservices/mgmt/2019-06-01/managedservices/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/managedservices/mgmt/2019-06-01/managedservices/managedservicesapi/interfaces.go b/services/managedservices/mgmt/2019-06-01/managedservices/managedservicesapi/interfaces.go index 978a7464833b..a299ca73a409 100644 --- a/services/managedservices/mgmt/2019-06-01/managedservices/managedservicesapi/interfaces.go +++ b/services/managedservices/mgmt/2019-06-01/managedservices/managedservicesapi/interfaces.go @@ -29,6 +29,7 @@ type RegistrationDefinitionsClientAPI interface { Delete(ctx context.Context, registrationDefinitionID string, scope string) (result autorest.Response, err error) Get(ctx context.Context, scope string, registrationDefinitionID string) (result managedservices.RegistrationDefinition, err error) List(ctx context.Context, scope string) (result managedservices.RegistrationDefinitionListPage, err error) + ListComplete(ctx context.Context, scope string) (result managedservices.RegistrationDefinitionListIterator, err error) } var _ RegistrationDefinitionsClientAPI = (*managedservices.RegistrationDefinitionsClient)(nil) @@ -39,6 +40,7 @@ type RegistrationAssignmentsClientAPI interface { Delete(ctx context.Context, scope string, registrationAssignmentID string) (result managedservices.RegistrationAssignmentsDeleteFuture, err error) Get(ctx context.Context, scope string, registrationAssignmentID string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignment, err error) List(ctx context.Context, scope string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignmentListPage, err error) + ListComplete(ctx context.Context, scope string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignmentListIterator, err error) } var _ RegistrationAssignmentsClientAPI = (*managedservices.RegistrationAssignmentsClient)(nil) diff --git a/services/managedservices/mgmt/2019-06-01/managedservices/operations.go b/services/managedservices/mgmt/2019-06-01/managedservices/operations.go index ad367a31b621..793c90735871 100644 --- a/services/managedservices/mgmt/2019-06-01/managedservices/operations.go +++ b/services/managedservices/mgmt/2019-06-01/managedservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/managedservices/mgmt/2019-06-01/managedservices/registrationassignments.go b/services/managedservices/mgmt/2019-06-01/managedservices/registrationassignments.go index ed191205eb36..4cd7f652a56f 100644 --- a/services/managedservices/mgmt/2019-06-01/managedservices/registrationassignments.go +++ b/services/managedservices/mgmt/2019-06-01/managedservices/registrationassignments.go @@ -36,7 +36,9 @@ func NewRegistrationAssignmentsClient() RegistrationAssignmentsClient { return NewRegistrationAssignmentsClientWithBaseURI(DefaultBaseURI) } -// NewRegistrationAssignmentsClientWithBaseURI creates an instance of the RegistrationAssignmentsClient client. +// NewRegistrationAssignmentsClientWithBaseURI creates an instance of the RegistrationAssignmentsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRegistrationAssignmentsClientWithBaseURI(baseURI string) RegistrationAssignmentsClient { return RegistrationAssignmentsClient{NewWithBaseURI(baseURI)} } diff --git a/services/managedservices/mgmt/2019-06-01/managedservices/registrationdefinitions.go b/services/managedservices/mgmt/2019-06-01/managedservices/registrationdefinitions.go index 6d12236efdbc..a6c50e4e5f70 100644 --- a/services/managedservices/mgmt/2019-06-01/managedservices/registrationdefinitions.go +++ b/services/managedservices/mgmt/2019-06-01/managedservices/registrationdefinitions.go @@ -36,7 +36,9 @@ func NewRegistrationDefinitionsClient() RegistrationDefinitionsClient { return NewRegistrationDefinitionsClientWithBaseURI(DefaultBaseURI) } -// NewRegistrationDefinitionsClientWithBaseURI creates an instance of the RegistrationDefinitionsClient client. +// NewRegistrationDefinitionsClientWithBaseURI creates an instance of the RegistrationDefinitionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRegistrationDefinitionsClientWithBaseURI(baseURI string) RegistrationDefinitionsClient { return RegistrationDefinitionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/maps/mgmt/2017-01-01-preview/maps/accounts.go b/services/maps/mgmt/2017-01-01-preview/maps/accounts.go index 3248d9b8b9e3..15582c57fc1c 100644 --- a/services/maps/mgmt/2017-01-01-preview/maps/accounts.go +++ b/services/maps/mgmt/2017-01-01-preview/maps/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/maps/mgmt/2017-01-01-preview/maps/client.go b/services/maps/mgmt/2017-01-01-preview/maps/client.go index fb8fbf27efac..4bc676c167e8 100644 --- a/services/maps/mgmt/2017-01-01-preview/maps/client.go +++ b/services/maps/mgmt/2017-01-01-preview/maps/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/maps/mgmt/2018-05-01/maps/accounts.go b/services/maps/mgmt/2018-05-01/maps/accounts.go index cef985677e7a..c46c076eeadc 100644 --- a/services/maps/mgmt/2018-05-01/maps/accounts.go +++ b/services/maps/mgmt/2018-05-01/maps/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/maps/mgmt/2018-05-01/maps/client.go b/services/maps/mgmt/2018-05-01/maps/client.go index 55340f47fe2e..74455ea6cd36 100644 --- a/services/maps/mgmt/2018-05-01/maps/client.go +++ b/services/maps/mgmt/2018-05-01/maps/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/advisors.go b/services/mariadb/mgmt/2018-06-01/mariadb/advisors.go new file mode 100644 index 000000000000..a95897c45a3d --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/advisors.go @@ -0,0 +1,257 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AdvisorsClient is the mariaDB Client +type AdvisorsClient struct { + BaseClient +} + +// NewAdvisorsClient creates an instance of the AdvisorsClient client. +func NewAdvisorsClient(subscriptionID string) AdvisorsClient { + return NewAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAdvisorsClientWithBaseURI creates an instance of the AdvisorsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) AdvisorsClient { + return AdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a recommendation action advisor. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// advisorName - the advisor name for recommendation action. +func (client AdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advisorName string) (result Advisor, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsClient.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.AdvisorsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, advisorName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AdvisorsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, advisorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "advisorName": autorest.Encode("path", advisorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/advisors/{advisorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client AdvisorsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AdvisorsClient) GetResponder(resp *http.Response) (result Advisor, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer list recommendation action advisors. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +func (client AdvisorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result AdvisorsResultListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsClient.ListByServer") + 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.MinLength, Rule: 1, Chain: 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("mariadb.AdvisorsClient", "ListByServer", err.Error()) + } + + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.arl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "ListByServer", resp, "Failure sending request") + return + } + + result.arl, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client AdvisorsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client AdvisorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client AdvisorsClient) ListByServerResponder(resp *http.Response) (result AdvisorsResultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client AdvisorsClient) listByServerNextResults(ctx context.Context, lastResults AdvisorsResultList) (result AdvisorsResultList, err error) { + req, err := lastResults.advisorsResultListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.AdvisorsClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client AdvisorsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result AdvisorsResultListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/checknameavailability.go b/services/mariadb/mgmt/2018-06-01/mariadb/checknameavailability.go index d77bef57a380..9d3e278527e7 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/checknameavailability.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/checknameavailability.go @@ -36,7 +36,9 @@ func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailability return NewCheckNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client. +// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckNameAvailabilityClient { return CheckNameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -56,6 +58,8 @@ func (client CheckNameAvailabilityClient) Execute(ctx context.Context, nameAvail }() } if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: nameAvailabilityRequest, Constraints: []validation.Constraint{{Target: "nameAvailabilityRequest.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("mariadb.CheckNameAvailabilityClient", "Execute", err.Error()) diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/client.go b/services/mariadb/mgmt/2018-06-01/mariadb/client.go index f478c10e5835..525cfff0fa4c 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/client.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/client.go @@ -21,7 +21,12 @@ package mariadb // Changes may cause incorrect behavior and will be lost if 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 ( @@ -41,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), @@ -49,3 +55,93 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { SubscriptionID: subscriptionID, } } + +// CreateRecommendedActionSession create recommendation action session for the advisor. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// advisorName - the advisor name for recommendation action. +// databaseName - the name of the database. +func (client BaseClient) CreateRecommendedActionSession(ctx context.Context, resourceGroupName string, serverName string, advisorName string, databaseName string) (result CreateRecommendedActionSessionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateRecommendedActionSession") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.BaseClient", "CreateRecommendedActionSession", err.Error()) + } + + req, err := client.CreateRecommendedActionSessionPreparer(ctx, resourceGroupName, serverName, advisorName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.BaseClient", "CreateRecommendedActionSession", nil, "Failure preparing request") + return + } + + result, err = client.CreateRecommendedActionSessionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.BaseClient", "CreateRecommendedActionSession", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateRecommendedActionSessionPreparer prepares the CreateRecommendedActionSession request. +func (client BaseClient) CreateRecommendedActionSessionPreparer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "advisorName": autorest.Encode("path", advisorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "databaseName": autorest.Encode("query", databaseName), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateRecommendedActionSessionSender sends the CreateRecommendedActionSession request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CreateRecommendedActionSessionSender(req *http.Request) (future CreateRecommendedActionSessionFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateRecommendedActionSessionResponder handles the response to the CreateRecommendedActionSession request. The method always +// closes the http.Response Body. +func (client BaseClient) CreateRecommendedActionSessionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/configurations.go b/services/mariadb/mgmt/2018-06-01/mariadb/configurations.go index c35ccad8c0c3..c4b66402a060 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/configurations.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/configurations.go @@ -21,6 +21,7 @@ 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" ) @@ -35,15 +36,15 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate updates a configuration of a server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // configurationName - the name of the server configuration. // parameters - the required parameters for updating a server configuration. @@ -58,6 +59,16 @@ func (client ConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceG 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ConfigurationsClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, configurationName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -125,8 +136,7 @@ func (client ConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) // Get gets information about a configuration of server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // configurationName - the name of the server configuration. func (client ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, configurationName string) (result Configuration, err error) { @@ -140,6 +150,16 @@ func (client ConfigurationsClient) Get(ctx context.Context, resourceGroupName st 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ConfigurationsClient", "Get", err.Error()) + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, configurationName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "Get", nil, "Failure preparing request") @@ -205,8 +225,7 @@ func (client ConfigurationsClient) GetResponder(resp *http.Response) (result Con // ListByServer list all the configurations in a given server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client ConfigurationsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ConfigurationListResult, err error) { if tracing.IsEnabled() { @@ -219,6 +238,16 @@ func (client ConfigurationsClient) ListByServer(ctx context.Context, resourceGro 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ConfigurationsClient", "ListByServer", err.Error()) + } + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "ListByServer", nil, "Failure preparing request") diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/databases.go b/services/mariadb/mgmt/2018-06-01/mariadb/databases.go index 0d5e4a6d8add..d4e4f16820e5 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/databases.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/databases.go @@ -21,6 +21,7 @@ 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" ) @@ -35,15 +36,15 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates a new database or updates an existing database. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // databaseName - the name of the database. // parameters - the required parameters for creating or updating a database. @@ -58,6 +59,16 @@ func (client DatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupN 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.DatabasesClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -125,8 +136,7 @@ func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (resu // Delete deletes a database. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // databaseName - the name of the database. func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesDeleteFuture, err error) { @@ -140,6 +150,16 @@ func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName stri 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.DatabasesClient", "Delete", err.Error()) + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Delete", nil, "Failure preparing request") @@ -204,8 +224,7 @@ func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autor // Get gets information about a database. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // databaseName - the name of the database. func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result Database, err error) { @@ -219,6 +238,16 @@ func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.DatabasesClient", "Get", err.Error()) + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Get", nil, "Failure preparing request") @@ -284,8 +313,7 @@ func (client DatabasesClient) GetResponder(resp *http.Response) (result Database // ListByServer list all the databases in a given server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client DatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result DatabaseListResult, err error) { if tracing.IsEnabled() { @@ -298,6 +326,16 @@ func (client DatabasesClient) ListByServer(ctx context.Context, resourceGroupNam 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.DatabasesClient", "ListByServer", err.Error()) + } + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "ListByServer", nil, "Failure preparing request") diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/firewallrules.go b/services/mariadb/mgmt/2018-06-01/mariadb/firewallrules.go index 1c91048d17c6..4ef360fd5547 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/firewallrules.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/firewallrules.go @@ -36,15 +36,15 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates a new firewall rule or updates an existing firewall rule. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // firewallRuleName - the name of the server firewall rule. // parameters - the required parameters for creating or updating a firewall rule. @@ -60,6 +60,12 @@ func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGr }() } 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.FirewallRuleProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.FirewallRuleProperties.StartIPAddress", Name: validation.Null, Rule: true, @@ -137,8 +143,7 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) ( // Delete deletes a server firewall rule. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // firewallRuleName - the name of the server firewall rule. func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRulesDeleteFuture, err error) { @@ -152,6 +157,16 @@ func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.FirewallRulesClient", "Delete", err.Error()) + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, firewallRuleName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Delete", nil, "Failure preparing request") @@ -216,8 +231,7 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a // Get gets information about a server firewall rule. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // firewallRuleName - the name of the server firewall rule. func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRule, err error) { @@ -231,6 +245,16 @@ func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName str 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.FirewallRulesClient", "Get", err.Error()) + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, firewallRuleName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Get", nil, "Failure preparing request") @@ -296,8 +320,7 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire // ListByServer list all the firewall rules in a given server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client FirewallRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FirewallRuleListResult, err error) { if tracing.IsEnabled() { @@ -310,6 +333,16 @@ func (client FirewallRulesClient) ListByServer(ctx context.Context, resourceGrou 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.FirewallRulesClient", "ListByServer", err.Error()) + } + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "ListByServer", nil, "Failure preparing request") diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedperformancetier.go b/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedperformancetier.go index 040cf81b88ca..03e627a8d81e 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedperformancetier.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedperformancetier.go @@ -21,6 +21,7 @@ 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" ) @@ -36,7 +37,8 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string) LocationBasedP } // NewLocationBasedPerformanceTierClientWithBaseURI creates an instance of the LocationBasedPerformanceTierClient -// 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 NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedPerformanceTierClient { return LocationBasedPerformanceTierClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -55,6 +57,12 @@ func (client LocationBasedPerformanceTierClient) List(ctx context.Context, locat 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("mariadb.LocationBasedPerformanceTierClient", "List", err.Error()) + } + req, err := client.ListPreparer(ctx, locationName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.LocationBasedPerformanceTierClient", "List", nil, "Failure preparing request") diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsoperationstatus.go b/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsoperationstatus.go new file mode 100644 index 000000000000..78dcb8f6f603 --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsoperationstatus.go @@ -0,0 +1,128 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// LocationBasedRecommendedActionSessionsOperationStatusClient is the mariaDB Client +type LocationBasedRecommendedActionSessionsOperationStatusClient struct { + BaseClient +} + +// NewLocationBasedRecommendedActionSessionsOperationStatusClient creates an instance of the +// LocationBasedRecommendedActionSessionsOperationStatusClient client. +func NewLocationBasedRecommendedActionSessionsOperationStatusClient(subscriptionID string) LocationBasedRecommendedActionSessionsOperationStatusClient { + return NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI creates an instance of the +// LocationBasedRecommendedActionSessionsOperationStatusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLocationBasedRecommendedActionSessionsOperationStatusClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedRecommendedActionSessionsOperationStatusClient { + return LocationBasedRecommendedActionSessionsOperationStatusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get recommendation action session operation status. +// Parameters: +// locationName - the name of the location. +// operationID - the operation identifier. +func (client LocationBasedRecommendedActionSessionsOperationStatusClient) Get(ctx context.Context, locationName string, operationID string) (result RecommendedActionSessionsOperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedRecommendedActionSessionsOperationStatusClient.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}}}}); err != nil { + return result, validation.NewError("mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, locationName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client LocationBasedRecommendedActionSessionsOperationStatusClient) GetPreparer(ctx context.Context, locationName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "locationName": autorest.Encode("path", locationName), + "operationId": autorest.Encode("path", operationID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/recommendedActionSessionsAzureAsyncOperation/{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 LocationBasedRecommendedActionSessionsOperationStatusClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LocationBasedRecommendedActionSessionsOperationStatusClient) GetResponder(resp *http.Response) (result RecommendedActionSessionsOperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsresult.go b/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsresult.go new file mode 100644 index 000000000000..bc085b425d66 --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/locationbasedrecommendedactionsessionsresult.go @@ -0,0 +1,166 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// LocationBasedRecommendedActionSessionsResultClient is the mariaDB Client +type LocationBasedRecommendedActionSessionsResultClient struct { + BaseClient +} + +// NewLocationBasedRecommendedActionSessionsResultClient creates an instance of the +// LocationBasedRecommendedActionSessionsResultClient client. +func NewLocationBasedRecommendedActionSessionsResultClient(subscriptionID string) LocationBasedRecommendedActionSessionsResultClient { + return NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI creates an instance of the +// LocationBasedRecommendedActionSessionsResultClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewLocationBasedRecommendedActionSessionsResultClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedRecommendedActionSessionsResultClient { + return LocationBasedRecommendedActionSessionsResultClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List recommendation action session operation result. +// Parameters: +// locationName - the name of the location. +// operationID - the operation identifier. +func (client LocationBasedRecommendedActionSessionsResultClient) List(ctx context.Context, locationName string, operationID string) (result RecommendationActionsResultListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedRecommendedActionSessionsResultClient.List") + defer func() { + sc := -1 + if result.rarl.Response.Response != nil { + sc = result.rarl.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("mariadb.LocationBasedRecommendedActionSessionsResultClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, locationName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rarl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "List", resp, "Failure sending request") + return + } + + result.rarl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client LocationBasedRecommendedActionSessionsResultClient) ListPreparer(ctx context.Context, locationName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "locationName": autorest.Encode("path", locationName), + "operationId": autorest.Encode("path", operationID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}/recommendedActionSessionsOperationResults/{operationId}", 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 LocationBasedRecommendedActionSessionsResultClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LocationBasedRecommendedActionSessionsResultClient) ListResponder(resp *http.Response) (result RecommendationActionsResultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client LocationBasedRecommendedActionSessionsResultClient) listNextResults(ctx context.Context, lastResults RecommendationActionsResultList) (result RecommendationActionsResultList, err error) { + req, err := lastResults.recommendationActionsResultListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "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, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.LocationBasedRecommendedActionSessionsResultClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client LocationBasedRecommendedActionSessionsResultClient) ListComplete(ctx context.Context, locationName string, operationID string) (result RecommendationActionsResultListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedRecommendedActionSessionsResultClient.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, locationName, operationID) + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/logfiles.go b/services/mariadb/mgmt/2018-06-01/mariadb/logfiles.go index 447fad31ef37..119d70bd363b 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/logfiles.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/logfiles.go @@ -21,6 +21,7 @@ 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" ) @@ -35,15 +36,15 @@ func NewLogFilesClient(subscriptionID string) LogFilesClient { return NewLogFilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client. +// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFilesClient { return LogFilesClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByServer list all the log files in a given server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client LogFilesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result LogFileListResult, err error) { if tracing.IsEnabled() { @@ -56,6 +57,16 @@ func (client LogFilesClient) ListByServer(ctx context.Context, resourceGroupName 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.LogFilesClient", "ListByServer", err.Error()) + } + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.LogFilesClient", "ListByServer", nil, "Failure preparing request") diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/mariadbapi/interfaces.go b/services/mariadb/mgmt/2018-06-01/mariadb/mariadbapi/interfaces.go index 6677e0399803..c663e1101e18 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/mariadbapi/interfaces.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/mariadbapi/interfaces.go @@ -22,6 +22,13 @@ import ( "github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb" ) +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + CreateRecommendedActionSession(ctx context.Context, resourceGroupName string, serverName string, advisorName string, databaseName string) (result mariadb.CreateRecommendedActionSessionFuture, err error) +} + +var _ BaseClientAPI = (*mariadb.BaseClient)(nil) + // ServersClientAPI contains the set of methods on the ServersClient type. type ServersClientAPI interface { Create(ctx context.Context, resourceGroupName string, serverName string, parameters mariadb.ServerForCreate) (result mariadb.ServersCreateFuture, err error) @@ -58,6 +65,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result mariadb.VirtualNetworkRulesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result mariadb.VirtualNetworkRule, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result mariadb.VirtualNetworkRuleListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result mariadb.VirtualNetworkRuleListResultIterator, err error) } var _ VirtualNetworkRulesClientAPI = (*mariadb.VirtualNetworkRulesClient)(nil) @@ -116,3 +124,84 @@ type OperationsClientAPI interface { } var _ OperationsClientAPI = (*mariadb.OperationsClient)(nil) + +// QueryTextsClientAPI contains the set of methods on the QueryTextsClient type. +type QueryTextsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, serverName string, queryID string) (result mariadb.QueryText, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string, queryIds []string) (result mariadb.QueryTextsResultListPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, queryIds []string) (result mariadb.QueryTextsResultListIterator, err error) +} + +var _ QueryTextsClientAPI = (*mariadb.QueryTextsClient)(nil) + +// TopQueryStatisticsClientAPI contains the set of methods on the TopQueryStatisticsClient type. +type TopQueryStatisticsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, serverName string, queryStatisticID string) (result mariadb.QueryStatistic, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string, parameters mariadb.TopQueryStatisticsInput) (result mariadb.TopQueryStatisticsResultListPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, parameters mariadb.TopQueryStatisticsInput) (result mariadb.TopQueryStatisticsResultListIterator, err error) +} + +var _ TopQueryStatisticsClientAPI = (*mariadb.TopQueryStatisticsClient)(nil) + +// WaitStatisticsClientAPI contains the set of methods on the WaitStatisticsClient type. +type WaitStatisticsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, serverName string, waitStatisticsID string) (result mariadb.WaitStatistic, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string, parameters mariadb.WaitStatisticsInput) (result mariadb.WaitStatisticsResultListPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, parameters mariadb.WaitStatisticsInput) (result mariadb.WaitStatisticsResultListIterator, err error) +} + +var _ WaitStatisticsClientAPI = (*mariadb.WaitStatisticsClient)(nil) + +// AdvisorsClientAPI contains the set of methods on the AdvisorsClient type. +type AdvisorsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, serverName string, advisorName string) (result mariadb.Advisor, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result mariadb.AdvisorsResultListPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result mariadb.AdvisorsResultListIterator, err error) +} + +var _ AdvisorsClientAPI = (*mariadb.AdvisorsClient)(nil) + +// RecommendedActionsClientAPI contains the set of methods on the RecommendedActionsClient type. +type RecommendedActionsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, serverName string, advisorName string, recommendedActionName string) (result mariadb.RecommendationAction, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, sessionID string) (result mariadb.RecommendationActionsResultListPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, advisorName string, sessionID string) (result mariadb.RecommendationActionsResultListIterator, err error) +} + +var _ RecommendedActionsClientAPI = (*mariadb.RecommendedActionsClient)(nil) + +// LocationBasedRecommendedActionSessionsOperationStatusClientAPI contains the set of methods on the LocationBasedRecommendedActionSessionsOperationStatusClient type. +type LocationBasedRecommendedActionSessionsOperationStatusClientAPI interface { + Get(ctx context.Context, locationName string, operationID string) (result mariadb.RecommendedActionSessionsOperationStatus, err error) +} + +var _ LocationBasedRecommendedActionSessionsOperationStatusClientAPI = (*mariadb.LocationBasedRecommendedActionSessionsOperationStatusClient)(nil) + +// LocationBasedRecommendedActionSessionsResultClientAPI contains the set of methods on the LocationBasedRecommendedActionSessionsResultClient type. +type LocationBasedRecommendedActionSessionsResultClientAPI interface { + List(ctx context.Context, locationName string, operationID string) (result mariadb.RecommendationActionsResultListPage, err error) + ListComplete(ctx context.Context, locationName string, operationID string) (result mariadb.RecommendationActionsResultListIterator, err error) +} + +var _ LocationBasedRecommendedActionSessionsResultClientAPI = (*mariadb.LocationBasedRecommendedActionSessionsResultClient)(nil) + +// PrivateEndpointConnectionsClientAPI contains the set of methods on the PrivateEndpointConnectionsClient type. +type PrivateEndpointConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters mariadb.PrivateEndpointConnection) (result mariadb.PrivateEndpointConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result mariadb.PrivateEndpointConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result mariadb.PrivateEndpointConnection, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result mariadb.PrivateEndpointConnectionListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result mariadb.PrivateEndpointConnectionListResultIterator, err error) + UpdateTags(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters mariadb.TagsObject) (result mariadb.PrivateEndpointConnectionsUpdateTagsFuture, err error) +} + +var _ PrivateEndpointConnectionsClientAPI = (*mariadb.PrivateEndpointConnectionsClient)(nil) + +// PrivateLinkResourcesClientAPI contains the set of methods on the PrivateLinkResourcesClient type. +type PrivateLinkResourcesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, serverName string, groupName string) (result mariadb.PrivateLinkResource, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result mariadb.PrivateLinkResourceListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result mariadb.PrivateLinkResourceListResultIterator, err error) +} + +var _ PrivateLinkResourcesClientAPI = (*mariadb.PrivateLinkResourcesClient)(nil) diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/models.go b/services/mariadb/mgmt/2018-06-01/mariadb/models.go index 24274d04bac3..d059d0fa3a9c 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/models.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/models.go @@ -199,21 +199,180 @@ func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState { return []VirtualNetworkRuleState{Deleting, Initializing, InProgress, Ready, Unknown} } -// CloudError an error response from the Batch service. -type CloudError struct { - Error *CloudErrorBody `json:"error,omitempty"` +// Advisor represents a recommendation action advisor. +type Advisor struct { + autorest.Response `json:"-"` + // Properties - The properties of a recommendation action advisor. + Properties interface{} `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` } -// CloudErrorBody an error response from the Batch 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"` +// AdvisorsResultList a list of query statistics. +type AdvisorsResultList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of recommendation action advisors. + Value *[]Advisor `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AdvisorsResultListIterator provides access to a complete listing of Advisor values. +type AdvisorsResultListIterator struct { + i int + page AdvisorsResultListPage +} + +// 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 *AdvisorsResultListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsResultListIterator.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 *AdvisorsResultListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AdvisorsResultListIterator) 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 AdvisorsResultListIterator) Response() AdvisorsResultList { + 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 AdvisorsResultListIterator) Value() Advisor { + if !iter.page.NotDone() { + return Advisor{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AdvisorsResultListIterator type. +func NewAdvisorsResultListIterator(page AdvisorsResultListPage) AdvisorsResultListIterator { + return AdvisorsResultListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (arl AdvisorsResultList) IsEmpty() bool { + return arl.Value == nil || len(*arl.Value) == 0 +} + +// advisorsResultListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (arl AdvisorsResultList) advisorsResultListPreparer(ctx context.Context) (*http.Request, error) { + if arl.NextLink == nil || len(to.String(arl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(arl.NextLink))) +} + +// AdvisorsResultListPage contains a page of Advisor values. +type AdvisorsResultListPage struct { + fn func(context.Context, AdvisorsResultList) (AdvisorsResultList, error) + arl AdvisorsResultList +} + +// 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 *AdvisorsResultListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdvisorsResultListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.arl) + if err != nil { + return err + } + page.arl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AdvisorsResultListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AdvisorsResultListPage) NotDone() bool { + return !page.arl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AdvisorsResultListPage) Response() AdvisorsResultList { + return page.arl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AdvisorsResultListPage) Values() []Advisor { + if page.arl.IsEmpty() { + return nil + } + return *page.arl.Value +} + +// Creates a new instance of the AdvisorsResultListPage type. +func NewAdvisorsResultListPage(getNextPage func(context.Context, AdvisorsResultList) (AdvisorsResultList, error)) AdvisorsResultListPage { + return AdvisorsResultListPage{fn: getNextPage} +} + +// AzureEntityResource the resource model definition for a 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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// CloudError an error response from the Batch service. +type CloudError struct { + Error *ErrorResponse `json:"error,omitempty"` } // Configuration represents a Configuration. @@ -221,11 +380,11 @@ type Configuration struct { autorest.Response `json:"-"` // ConfigurationProperties - The properties of a configuration. *ConfigurationProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID + // 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; Resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -341,16 +500,39 @@ func (future *ConfigurationsCreateOrUpdateFuture) Result(client ConfigurationsCl return } +// CreateRecommendedActionSessionFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CreateRecommendedActionSessionFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CreateRecommendedActionSessionFuture) 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, "mariadb.CreateRecommendedActionSessionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("mariadb.CreateRecommendedActionSessionFuture") + return + } + ar.Response = future.Response() + return +} + // Database represents a Database. type Database struct { autorest.Response `json:"-"` // DatabaseProperties - The properties of a database. *DatabaseProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID + // 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; Resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -481,16 +663,38 @@ func (future *DatabasesDeleteFuture) Result(client DatabasesClient) (ar autorest return } +// 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"` +} + +// ErrorResponse the resource management error response. +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"` +} + // FirewallRule represents a server firewall rule. type FirewallRule struct { autorest.Response `json:"-"` // FirewallRuleProperties - The properties of a firewall rule. *FirewallRuleProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID + // 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; Resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -625,11 +829,11 @@ func (future *FirewallRulesDeleteFuture) Result(client FirewallRulesClient) (ar type LogFile struct { // LogFileProperties - The properties of the log file. *LogFileProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID + // 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; Resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -805,73 +1009,30 @@ type PerformanceTierServiceLevelObjectives struct { MinStorageMB *int32 `json:"minStorageMB,omitempty"` } -// ProxyResource resource properties. -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"` -} - -// SecurityAlertPolicyProperties properties of a security alert policy. -type SecurityAlertPolicyProperties struct { - // State - Specifies the state of the policy, whether it is enabled or disabled. Possible values include: 'ServerSecurityAlertPolicyStateEnabled', 'ServerSecurityAlertPolicyStateDisabled' - State ServerSecurityAlertPolicyState `json:"state,omitempty"` - // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly - 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"` -} - -// Server represents a server. -type Server struct { +// PrivateEndpointConnection a private endpoint connection +type PrivateEndpointConnection struct { autorest.Response `json:"-"` - // Sku - The SKU (pricing tier) of the server. - Sku *Sku `json:"sku,omitempty"` - // ServerProperties - Properties of the server. - *ServerProperties `json:"properties,omitempty"` - // Location - The location the resource resides in. - Location *string `json:"location,omitempty"` - // Tags - Application-specific metadata in the form of key-value pairs. - Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID + // PrivateEndpointConnectionProperties - Resource 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; Resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for Server. -func (s Server) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if s.Sku != nil { - objectMap["sku"] = s.Sku - } - if s.ServerProperties != nil { - objectMap["properties"] = s.ServerProperties - } - if s.Location != nil { - objectMap["location"] = s.Location - } - if s.Tags != nil { - objectMap["tags"] = s.Tags + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for Server struct. -func (s *Server) UnmarshalJSON(body []byte) error { +// 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 { @@ -879,41 +1040,14 @@ func (s *Server) UnmarshalJSON(body []byte) error { } 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 - } - s.Sku = &sku - } case "properties": if v != nil { - var serverProperties ServerProperties - err = json.Unmarshal(*v, &serverProperties) - if err != nil { - return err - } - s.ServerProperties = &serverProperties - } - 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) + var privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) if err != nil { return err } - s.Tags = tags + pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties } case "id": if v != nil { @@ -922,7 +1056,7 @@ func (s *Server) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.ID = &ID + pec.ID = &ID } case "name": if v != nil { @@ -931,7 +1065,7 @@ func (s *Server) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Name = &name + pec.Name = &name } case "type": if v != nil { @@ -940,7 +1074,7 @@ func (s *Server) UnmarshalJSON(body []byte) error { if err != nil { return err } - s.Type = &typeVar + pec.Type = &typeVar } } } @@ -948,32 +1082,1213 @@ func (s *Server) UnmarshalJSON(body []byte) error { return nil } -// ServerForCreate represents a server to be created. -type ServerForCreate struct { - // Sku - The SKU (pricing tier) of the server. - Sku *Sku `json:"sku,omitempty"` - // Properties - Properties of the server. - Properties BasicServerPropertiesForCreate `json:"properties,omitempty"` - // Location - The location the resource resides in. - Location *string `json:"location,omitempty"` - // Tags - Application-specific metadata in the form of key-value pairs. - Tags map[string]*string `json:"tags"` +// PrivateEndpointConnectionListResult a list of private endpoint connections. +type PrivateEndpointConnectionListResult 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 ServerForCreate. -func (sfc ServerForCreate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if sfc.Sku != nil { - objectMap["sku"] = sfc.Sku - } - objectMap["properties"] = sfc.Properties - if sfc.Location != nil { - objectMap["location"] = sfc.Location - } - if sfc.Tags != nil { - objectMap["tags"] = sfc.Tags - } - 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 +} + +// 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.NextLink == nil || len(to.String(peclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.peclr) + if err != nil { + return err + } + page.peclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{fn: getNextPage} +} + +// PrivateEndpointConnectionProperties properties of a private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - Private endpoint which the connection belongs to. + PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - Connection state of the private endpoint connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - READ-ONLY; State of the private endpoint connection. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type PrivateEndpointConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) Result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("mariadb.PrivateEndpointConnectionsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(pec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsCreateOrUpdateFuture", "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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsDeleteFuture) Result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("mariadb.PrivateEndpointConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateEndpointConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateEndpointConnectionsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsUpdateTagsFuture) Result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("mariadb.PrivateEndpointConnectionsUpdateTagsFuture") + 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.UpdateTagsResponder(pec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsUpdateTagsFuture", "Result", pec.Response.Response, "Failure responding to request") + } + } + return +} + +// PrivateEndpointProperty ... +type PrivateEndpointProperty struct { + // ID - Resource id of the private endpoint. + ID *string `json:"id,omitempty"` +} + +// PrivateLinkResource a private link resource +type PrivateLinkResource struct { + autorest.Response `json:"-"` + // Properties - READ-ONLY; The private link resource group id. + 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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(plrlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.plrlr) + if err != nil { + return err + } + page.plrlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return PrivateLinkResourceListResultPage{fn: getNextPage} +} + +// 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"` +} + +// PrivateLinkServiceConnectionStateProperty ... +type PrivateLinkServiceConnectionStateProperty 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"` +} + +// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than +// required location and tags +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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// QueryStatistic represents a Query Statistic. +type QueryStatistic struct { + autorest.Response `json:"-"` + // QueryStatisticProperties - The properties of a query statistic. + *QueryStatisticProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for QueryStatistic. +func (qs QueryStatistic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if qs.QueryStatisticProperties != nil { + objectMap["properties"] = qs.QueryStatisticProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for QueryStatistic struct. +func (qs *QueryStatistic) UnmarshalJSON(body []byte) error { + var m map[string]*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 queryStatisticProperties QueryStatisticProperties + err = json.Unmarshal(*v, &queryStatisticProperties) + if err != nil { + return err + } + qs.QueryStatisticProperties = &queryStatisticProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + qs.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + qs.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + qs.Type = &typeVar + } + } + } + + return nil +} + +// QueryStatisticProperties the properties of a query statistic. +type QueryStatisticProperties struct { + // QueryID - Database query identifier. + QueryID *string `json:"queryId,omitempty"` + // StartTime - Observation start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Observation end time. + EndTime *date.Time `json:"endTime,omitempty"` + // AggregationFunction - Aggregation function name. + AggregationFunction *string `json:"aggregationFunction,omitempty"` + // DatabaseNames - The list of database names. + DatabaseNames *[]string `json:"databaseNames,omitempty"` + // QueryExecutionCount - Number of query executions in this time interval. + QueryExecutionCount *int64 `json:"queryExecutionCount,omitempty"` + // MetricName - Metric name. + MetricName *string `json:"metricName,omitempty"` + // MetricDisplayName - Metric display name. + MetricDisplayName *string `json:"metricDisplayName,omitempty"` + // MetricValue - Metric value. + MetricValue *float64 `json:"metricValue,omitempty"` + // MetricValueUnit - Metric value unit. + MetricValueUnit *string `json:"metricValueUnit,omitempty"` +} + +// QueryText represents a Query Text. +type QueryText struct { + autorest.Response `json:"-"` + // QueryTextProperties - The properties of a query text. + *QueryTextProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for QueryText. +func (qt QueryText) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if qt.QueryTextProperties != nil { + objectMap["properties"] = qt.QueryTextProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for QueryText struct. +func (qt *QueryText) UnmarshalJSON(body []byte) error { + var m map[string]*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 queryTextProperties QueryTextProperties + err = json.Unmarshal(*v, &queryTextProperties) + if err != nil { + return err + } + qt.QueryTextProperties = &queryTextProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + qt.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + qt.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + qt.Type = &typeVar + } + } + } + + return nil +} + +// QueryTextProperties the properties of a query text. +type QueryTextProperties struct { + // QueryID - Query identifier unique to the server. + QueryID *string `json:"queryId,omitempty"` + // QueryText - Query text. + QueryText *string `json:"queryText,omitempty"` +} + +// QueryTextsResultList a list of query texts. +type QueryTextsResultList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of query texts. + Value *[]QueryText `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// QueryTextsResultListIterator provides access to a complete listing of QueryText values. +type QueryTextsResultListIterator struct { + i int + page QueryTextsResultListPage +} + +// 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 *QueryTextsResultListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsResultListIterator.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 *QueryTextsResultListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter QueryTextsResultListIterator) 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 QueryTextsResultListIterator) Response() QueryTextsResultList { + 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 QueryTextsResultListIterator) Value() QueryText { + if !iter.page.NotDone() { + return QueryText{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the QueryTextsResultListIterator type. +func NewQueryTextsResultListIterator(page QueryTextsResultListPage) QueryTextsResultListIterator { + return QueryTextsResultListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (qtrl QueryTextsResultList) IsEmpty() bool { + return qtrl.Value == nil || len(*qtrl.Value) == 0 +} + +// queryTextsResultListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (qtrl QueryTextsResultList) queryTextsResultListPreparer(ctx context.Context) (*http.Request, error) { + if qtrl.NextLink == nil || len(to.String(qtrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(qtrl.NextLink))) +} + +// QueryTextsResultListPage contains a page of QueryText values. +type QueryTextsResultListPage struct { + fn func(context.Context, QueryTextsResultList) (QueryTextsResultList, error) + qtrl QueryTextsResultList +} + +// 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 *QueryTextsResultListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsResultListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.qtrl) + if err != nil { + return err + } + page.qtrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *QueryTextsResultListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page QueryTextsResultListPage) NotDone() bool { + return !page.qtrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page QueryTextsResultListPage) Response() QueryTextsResultList { + return page.qtrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page QueryTextsResultListPage) Values() []QueryText { + if page.qtrl.IsEmpty() { + return nil + } + return *page.qtrl.Value +} + +// Creates a new instance of the QueryTextsResultListPage type. +func NewQueryTextsResultListPage(getNextPage func(context.Context, QueryTextsResultList) (QueryTextsResultList, error)) QueryTextsResultListPage { + return QueryTextsResultListPage{fn: getNextPage} +} + +// RecommendationAction represents a Recommendation Action. +type RecommendationAction struct { + autorest.Response `json:"-"` + // RecommendationActionProperties - The properties of a recommendation action. + *RecommendationActionProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecommendationAction. +func (ra RecommendationAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ra.RecommendationActionProperties != nil { + objectMap["properties"] = ra.RecommendationActionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RecommendationAction struct. +func (ra *RecommendationAction) UnmarshalJSON(body []byte) error { + var m map[string]*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 recommendationActionProperties RecommendationActionProperties + err = json.Unmarshal(*v, &recommendationActionProperties) + if err != nil { + return err + } + ra.RecommendationActionProperties = &recommendationActionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ra.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ra.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ra.Type = &typeVar + } + } + } + + return nil +} + +// RecommendationActionProperties the properties of a recommendation action. +type RecommendationActionProperties struct { + // AdvisorName - Advisor name. + AdvisorName *string `json:"advisorName,omitempty"` + // SessionID - Recommendation action session identifier. + SessionID *string `json:"sessionId,omitempty"` + // ActionID - Recommendation action identifier. + ActionID *int32 `json:"actionId,omitempty"` + // CreatedTime - Recommendation action creation time. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // ExpirationTime - Recommendation action expiration time. + ExpirationTime *date.Time `json:"expirationTime,omitempty"` + // Reason - Recommendation action reason. + Reason *string `json:"reason,omitempty"` + // RecommendationType - Recommendation action type. + RecommendationType *string `json:"recommendationType,omitempty"` + // Details - Recommendation action details. + Details map[string]*string `json:"details"` +} + +// MarshalJSON is the custom marshaler for RecommendationActionProperties. +func (rap RecommendationActionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rap.AdvisorName != nil { + objectMap["advisorName"] = rap.AdvisorName + } + if rap.SessionID != nil { + objectMap["sessionId"] = rap.SessionID + } + if rap.ActionID != nil { + objectMap["actionId"] = rap.ActionID + } + if rap.CreatedTime != nil { + objectMap["createdTime"] = rap.CreatedTime + } + if rap.ExpirationTime != nil { + objectMap["expirationTime"] = rap.ExpirationTime + } + if rap.Reason != nil { + objectMap["reason"] = rap.Reason + } + if rap.RecommendationType != nil { + objectMap["recommendationType"] = rap.RecommendationType + } + if rap.Details != nil { + objectMap["details"] = rap.Details + } + return json.Marshal(objectMap) +} + +// RecommendationActionsResultList a list of recommendation actions. +type RecommendationActionsResultList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of recommendation action advisors. + Value *[]RecommendationAction `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// RecommendationActionsResultListIterator provides access to a complete listing of RecommendationAction +// values. +type RecommendationActionsResultListIterator struct { + i int + page RecommendationActionsResultListPage +} + +// 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 *RecommendationActionsResultListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationActionsResultListIterator.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 *RecommendationActionsResultListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RecommendationActionsResultListIterator) 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 RecommendationActionsResultListIterator) Response() RecommendationActionsResultList { + 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 RecommendationActionsResultListIterator) Value() RecommendationAction { + if !iter.page.NotDone() { + return RecommendationAction{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RecommendationActionsResultListIterator type. +func NewRecommendationActionsResultListIterator(page RecommendationActionsResultListPage) RecommendationActionsResultListIterator { + return RecommendationActionsResultListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rarl RecommendationActionsResultList) IsEmpty() bool { + return rarl.Value == nil || len(*rarl.Value) == 0 +} + +// recommendationActionsResultListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rarl RecommendationActionsResultList) recommendationActionsResultListPreparer(ctx context.Context) (*http.Request, error) { + if rarl.NextLink == nil || len(to.String(rarl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rarl.NextLink))) +} + +// RecommendationActionsResultListPage contains a page of RecommendationAction values. +type RecommendationActionsResultListPage struct { + fn func(context.Context, RecommendationActionsResultList) (RecommendationActionsResultList, error) + rarl RecommendationActionsResultList +} + +// 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 *RecommendationActionsResultListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationActionsResultListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rarl) + if err != nil { + return err + } + page.rarl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RecommendationActionsResultListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RecommendationActionsResultListPage) NotDone() bool { + return !page.rarl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RecommendationActionsResultListPage) Response() RecommendationActionsResultList { + return page.rarl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RecommendationActionsResultListPage) Values() []RecommendationAction { + if page.rarl.IsEmpty() { + return nil + } + return *page.rarl.Value +} + +// Creates a new instance of the RecommendationActionsResultListPage type. +func NewRecommendationActionsResultListPage(getNextPage func(context.Context, RecommendationActionsResultList) (RecommendationActionsResultList, error)) RecommendationActionsResultListPage { + return RecommendationActionsResultListPage{fn: getNextPage} +} + +// RecommendedActionSessionsOperationStatus recommendation action session operation status. +type RecommendedActionSessionsOperationStatus struct { + autorest.Response `json:"-"` + // Name - Operation identifier. + Name *string `json:"name,omitempty"` + // StartTime - Operation start time. + StartTime *date.Time `json:"startTime,omitempty"` + // Status - Operation status. + Status *string `json:"status,omitempty"` +} + +// Resource ... +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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// SecurityAlertPolicyProperties properties of a security alert policy. +type SecurityAlertPolicyProperties struct { + // State - Specifies the state of the policy, whether it is enabled or disabled. Possible values include: 'ServerSecurityAlertPolicyStateEnabled', 'ServerSecurityAlertPolicyStateDisabled' + State ServerSecurityAlertPolicyState `json:"state,omitempty"` + // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly + 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"` +} + +// Server represents a server. +type Server struct { + autorest.Response `json:"-"` + // Sku - The SKU (pricing tier) of the server. + Sku *Sku `json:"sku,omitempty"` + // ServerProperties - Properties of the server. + *ServerProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Server. +func (s Server) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.Sku != nil { + objectMap["sku"] = s.Sku + } + if s.ServerProperties != nil { + objectMap["properties"] = s.ServerProperties + } + if s.Tags != nil { + objectMap["tags"] = s.Tags + } + if s.Location != nil { + objectMap["location"] = s.Location + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Server struct. +func (s *Server) UnmarshalJSON(body []byte) error { + 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 + } + s.Sku = &sku + } + case "properties": + if v != nil { + var serverProperties ServerProperties + err = json.Unmarshal(*v, &serverProperties) + if err != nil { + return err + } + s.ServerProperties = &serverProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + s.Tags = tags + } + 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 + } + } + } + + return nil +} + +// ServerForCreate represents a server to be created. +type ServerForCreate struct { + // Sku - The SKU (pricing tier) of the server. + Sku *Sku `json:"sku,omitempty"` + // Properties - Properties of the server. + Properties BasicServerPropertiesForCreate `json:"properties,omitempty"` + // Location - The location the resource resides in. + Location *string `json:"location,omitempty"` + // Tags - Application-specific metadata in the form of key-value pairs. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ServerForCreate. +func (sfc ServerForCreate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sfc.Sku != nil { + objectMap["sku"] = sfc.Sku + } + objectMap["properties"] = sfc.Properties + if sfc.Location != nil { + objectMap["location"] = sfc.Location + } + if sfc.Tags != nil { + objectMap["tags"] = sfc.Tags + } + return json.Marshal(objectMap) } // UnmarshalJSON is the custom unmarshaler for ServerForCreate struct. @@ -1537,11 +2852,11 @@ type ServerSecurityAlertPolicy struct { autorest.Response `json:"-"` // SecurityAlertPolicyProperties - Resource properties. *SecurityAlertPolicyProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID + // 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; Resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1718,75 +3033,291 @@ func (sup *ServerUpdateParameters) UnmarshalJSON(body []byte) error { } sup.Tags = tags } - } + } + } + + return nil +} + +// ServerUpdateParametersProperties the properties that can be updated for a server. +type ServerUpdateParametersProperties struct { + // StorageProfile - Storage profile of a server. + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + // AdministratorLoginPassword - The password of the administrator login. + AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` + // Version - The version of a server. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + Version ServerVersion `json:"version,omitempty"` + // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' + SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + // ReplicationRole - The replication role of the server. + ReplicationRole *string `json:"replicationRole,omitempty"` +} + +// Sku billing information related properties of a server. +type Sku struct { + // Name - The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8. + Name *string `json:"name,omitempty"` + // Tier - The tier of the particular SKU, e.g. Basic. Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + Tier SkuTier `json:"tier,omitempty"` + // Capacity - The scale up/out capacity, representing server's compute units. + Capacity *int32 `json:"capacity,omitempty"` + // Size - The size code, to be interpreted by resource as appropriate. + Size *string `json:"size,omitempty"` + // Family - The family of hardware. + Family *string `json:"family,omitempty"` +} + +// StorageProfile storage Profile properties of a server +type StorageProfile struct { + // BackupRetentionDays - Backup retention days for the server. + BackupRetentionDays *int32 `json:"backupRetentionDays,omitempty"` + // GeoRedundantBackup - Enable Geo-redundant or not for server backup. Possible values include: 'Enabled', 'Disabled' + GeoRedundantBackup GeoRedundantBackup `json:"geoRedundantBackup,omitempty"` + // StorageMB - Max storage allowed for a server. + StorageMB *int32 `json:"storageMB,omitempty"` + // StorageAutogrow - Enable Storage Auto Grow. Possible values include: 'StorageAutogrowEnabled', 'StorageAutogrowDisabled' + StorageAutogrow StorageAutogrow `json:"storageAutogrow,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) +} + +// TopQueryStatisticsInput input to get top query statistics +type TopQueryStatisticsInput struct { + // TopQueryStatisticsInputProperties - The properties of a wait statistics input. + *TopQueryStatisticsInputProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for TopQueryStatisticsInput. +func (tqsi TopQueryStatisticsInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tqsi.TopQueryStatisticsInputProperties != nil { + objectMap["properties"] = tqsi.TopQueryStatisticsInputProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TopQueryStatisticsInput struct. +func (tqsi *TopQueryStatisticsInput) UnmarshalJSON(body []byte) error { + var m map[string]*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 topQueryStatisticsInputProperties TopQueryStatisticsInputProperties + err = json.Unmarshal(*v, &topQueryStatisticsInputProperties) + if err != nil { + return err + } + tqsi.TopQueryStatisticsInputProperties = &topQueryStatisticsInputProperties + } + } + } + + return nil +} + +// TopQueryStatisticsInputProperties the properties for input to get top query statistics +type TopQueryStatisticsInputProperties struct { + // NumberOfTopQueries - Max number of top queries to return. + NumberOfTopQueries *int32 `json:"numberOfTopQueries,omitempty"` + // AggregationFunction - Aggregation function name. + AggregationFunction *string `json:"aggregationFunction,omitempty"` + // ObservedMetric - Observed metric name. + ObservedMetric *string `json:"observedMetric,omitempty"` + // ObservationStartTime - Observation start time. + ObservationStartTime *date.Time `json:"observationStartTime,omitempty"` + // ObservationEndTime - Observation end time. + ObservationEndTime *date.Time `json:"observationEndTime,omitempty"` + // AggregationWindow - Aggregation interval type in ISO 8601 format. + AggregationWindow *string `json:"aggregationWindow,omitempty"` +} + +// TopQueryStatisticsResultList a list of query statistics. +type TopQueryStatisticsResultList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of top query statistics. + Value *[]QueryStatistic `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// TopQueryStatisticsResultListIterator provides access to a complete listing of QueryStatistic values. +type TopQueryStatisticsResultListIterator struct { + i int + page TopQueryStatisticsResultListPage +} + +// 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 *TopQueryStatisticsResultListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsResultListIterator.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 *TopQueryStatisticsResultListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TopQueryStatisticsResultListIterator) 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 TopQueryStatisticsResultListIterator) Response() TopQueryStatisticsResultList { + 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 TopQueryStatisticsResultListIterator) Value() QueryStatistic { + if !iter.page.NotDone() { + return QueryStatistic{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TopQueryStatisticsResultListIterator type. +func NewTopQueryStatisticsResultListIterator(page TopQueryStatisticsResultListPage) TopQueryStatisticsResultListIterator { + return TopQueryStatisticsResultListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (tqsrl TopQueryStatisticsResultList) IsEmpty() bool { + return tqsrl.Value == nil || len(*tqsrl.Value) == 0 +} + +// topQueryStatisticsResultListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (tqsrl TopQueryStatisticsResultList) topQueryStatisticsResultListPreparer(ctx context.Context) (*http.Request, error) { + if tqsrl.NextLink == nil || len(to.String(tqsrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(tqsrl.NextLink))) +} + +// TopQueryStatisticsResultListPage contains a page of QueryStatistic values. +type TopQueryStatisticsResultListPage struct { + fn func(context.Context, TopQueryStatisticsResultList) (TopQueryStatisticsResultList, error) + tqsrl TopQueryStatisticsResultList +} + +// 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 *TopQueryStatisticsResultListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsResultListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - + next, err := page.fn(ctx, page.tqsrl) + if err != nil { + return err + } + page.tqsrl = next return nil } -// ServerUpdateParametersProperties the properties that can be updated for a server. -type ServerUpdateParametersProperties struct { - // StorageProfile - Storage profile of a server. - StorageProfile *StorageProfile `json:"storageProfile,omitempty"` - // AdministratorLoginPassword - The password of the administrator login. - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // Version - The version of a server. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' - Version ServerVersion `json:"version,omitempty"` - // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' - SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // ReplicationRole - The replication role of the server. - ReplicationRole *string `json:"replicationRole,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *TopQueryStatisticsResultListPage) Next() error { + return page.NextWithContext(context.Background()) } -// Sku billing information related properties of a server. -type Sku struct { - // Name - The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8. - Name *string `json:"name,omitempty"` - // Tier - The tier of the particular SKU, e.g. Basic. Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - Tier SkuTier `json:"tier,omitempty"` - // Capacity - The scale up/out capacity, representing server's compute units. - Capacity *int32 `json:"capacity,omitempty"` - // Size - The size code, to be interpreted by resource as appropriate. - Size *string `json:"size,omitempty"` - // Family - The family of hardware. - Family *string `json:"family,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TopQueryStatisticsResultListPage) NotDone() bool { + return !page.tqsrl.IsEmpty() } -// StorageProfile storage Profile properties of a server -type StorageProfile struct { - // BackupRetentionDays - Backup retention days for the server. - BackupRetentionDays *int32 `json:"backupRetentionDays,omitempty"` - // GeoRedundantBackup - Enable Geo-redundant or not for server backup. Possible values include: 'Enabled', 'Disabled' - GeoRedundantBackup GeoRedundantBackup `json:"geoRedundantBackup,omitempty"` - // StorageMB - Max storage allowed for a server. - StorageMB *int32 `json:"storageMB,omitempty"` - // StorageAutogrow - Enable Storage Auto Grow. Possible values include: 'StorageAutogrowEnabled', 'StorageAutogrowDisabled' - StorageAutogrow StorageAutogrow `json:"storageAutogrow,omitempty"` +// Response returns the raw server response from the last page request. +func (page TopQueryStatisticsResultListPage) Response() TopQueryStatisticsResultList { + return page.tqsrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TopQueryStatisticsResultListPage) Values() []QueryStatistic { + if page.tqsrl.IsEmpty() { + return nil + } + return *page.tqsrl.Value } -// TrackedResource resource properties including location and tags for track resources. +// Creates a new instance of the TopQueryStatisticsResultListPage type. +func NewTopQueryStatisticsResultListPage(getNextPage func(context.Context, TopQueryStatisticsResultList) (TopQueryStatisticsResultList, error)) TopQueryStatisticsResultListPage { + return TopQueryStatisticsResultListPage{fn: getNextPage} +} + +// TrackedResource the resource model definition for a ARM tracked top level resource type TrackedResource struct { - // Location - The location the resource resides in. - Location *string `json:"location,omitempty"` - // Tags - Application-specific metadata in the form of key-value pairs. + // Tags - Resource tags. Tags map[string]*string `json:"tags"` - // ID - READ-ONLY; Resource ID + // 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; Resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; The type of the resource. Ex- 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.Location != nil { - objectMap["location"] = tr.Location - } if tr.Tags != nil { objectMap["tags"] = tr.Tags } + if tr.Location != nil { + objectMap["location"] = tr.Location + } return json.Marshal(objectMap) } @@ -1795,11 +3326,11 @@ type VirtualNetworkRule struct { autorest.Response `json:"-"` // VirtualNetworkRuleProperties - Resource properties. *VirtualNetworkRuleProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID + // 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; Resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -2070,3 +3601,293 @@ func (future *VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRules ar.Response = future.Response() return } + +// WaitStatistic represents a Wait Statistic. +type WaitStatistic struct { + autorest.Response `json:"-"` + // WaitStatisticProperties - The properties of a wait statistic. + *WaitStatisticProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for WaitStatistic. +func (ws WaitStatistic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ws.WaitStatisticProperties != nil { + objectMap["properties"] = ws.WaitStatisticProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WaitStatistic struct. +func (ws *WaitStatistic) UnmarshalJSON(body []byte) error { + var m map[string]*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 waitStatisticProperties WaitStatisticProperties + err = json.Unmarshal(*v, &waitStatisticProperties) + if err != nil { + return err + } + ws.WaitStatisticProperties = &waitStatisticProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ws.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ws.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ws.Type = &typeVar + } + } + } + + return nil +} + +// WaitStatisticProperties the properties of a wait statistic. +type WaitStatisticProperties struct { + // StartTime - Observation start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Observation end time. + EndTime *date.Time `json:"endTime,omitempty"` + // EventName - Wait event name. + EventName *string `json:"eventName,omitempty"` + // EventTypeName - Wait event type name. + EventTypeName *string `json:"eventTypeName,omitempty"` + // QueryID - Database query identifier. + QueryID *int64 `json:"queryId,omitempty"` + // DatabaseName - Database Name. + DatabaseName *string `json:"databaseName,omitempty"` + // UserID - Database user identifier. + UserID *int64 `json:"userId,omitempty"` + // Count - Wait event count observed in this time interval. + Count *int64 `json:"count,omitempty"` + // TotalTimeInMs - Total time of wait in milliseconds in this time interval. + TotalTimeInMs *float64 `json:"totalTimeInMs,omitempty"` +} + +// WaitStatisticsInput input to get wait statistics +type WaitStatisticsInput struct { + // WaitStatisticsInputProperties - The properties of a wait statistics input. + *WaitStatisticsInputProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for WaitStatisticsInput. +func (wsi WaitStatisticsInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wsi.WaitStatisticsInputProperties != nil { + objectMap["properties"] = wsi.WaitStatisticsInputProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WaitStatisticsInput struct. +func (wsi *WaitStatisticsInput) UnmarshalJSON(body []byte) error { + var m map[string]*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 waitStatisticsInputProperties WaitStatisticsInputProperties + err = json.Unmarshal(*v, &waitStatisticsInputProperties) + if err != nil { + return err + } + wsi.WaitStatisticsInputProperties = &waitStatisticsInputProperties + } + } + } + + return nil +} + +// WaitStatisticsInputProperties the properties for input to get wait statistics +type WaitStatisticsInputProperties struct { + // ObservationStartTime - Observation start time. + ObservationStartTime *date.Time `json:"observationStartTime,omitempty"` + // ObservationEndTime - Observation end time. + ObservationEndTime *date.Time `json:"observationEndTime,omitempty"` + // AggregationWindow - Aggregation interval type in ISO 8601 format. + AggregationWindow *string `json:"aggregationWindow,omitempty"` +} + +// WaitStatisticsResultList a list of wait statistics. +type WaitStatisticsResultList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of wait statistics. + Value *[]WaitStatistic `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// WaitStatisticsResultListIterator provides access to a complete listing of WaitStatistic values. +type WaitStatisticsResultListIterator struct { + i int + page WaitStatisticsResultListPage +} + +// 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 *WaitStatisticsResultListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsResultListIterator.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 *WaitStatisticsResultListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WaitStatisticsResultListIterator) 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 WaitStatisticsResultListIterator) Response() WaitStatisticsResultList { + 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 WaitStatisticsResultListIterator) Value() WaitStatistic { + if !iter.page.NotDone() { + return WaitStatistic{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WaitStatisticsResultListIterator type. +func NewWaitStatisticsResultListIterator(page WaitStatisticsResultListPage) WaitStatisticsResultListIterator { + return WaitStatisticsResultListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wsrl WaitStatisticsResultList) IsEmpty() bool { + return wsrl.Value == nil || len(*wsrl.Value) == 0 +} + +// waitStatisticsResultListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wsrl WaitStatisticsResultList) waitStatisticsResultListPreparer(ctx context.Context) (*http.Request, error) { + if wsrl.NextLink == nil || len(to.String(wsrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wsrl.NextLink))) +} + +// WaitStatisticsResultListPage contains a page of WaitStatistic values. +type WaitStatisticsResultListPage struct { + fn func(context.Context, WaitStatisticsResultList) (WaitStatisticsResultList, error) + wsrl WaitStatisticsResultList +} + +// 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 *WaitStatisticsResultListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsResultListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wsrl) + if err != nil { + return err + } + page.wsrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WaitStatisticsResultListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WaitStatisticsResultListPage) NotDone() bool { + return !page.wsrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WaitStatisticsResultListPage) Response() WaitStatisticsResultList { + return page.wsrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WaitStatisticsResultListPage) Values() []WaitStatistic { + if page.wsrl.IsEmpty() { + return nil + } + return *page.wsrl.Value +} + +// Creates a new instance of the WaitStatisticsResultListPage type. +func NewWaitStatisticsResultListPage(getNextPage func(context.Context, WaitStatisticsResultList) (WaitStatisticsResultList, error)) WaitStatisticsResultListPage { + return WaitStatisticsResultListPage{fn: getNextPage} +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/operations.go b/services/mariadb/mgmt/2018-06-01/mariadb/operations.go index 4e9ad80e72c2..cc4bc217481e 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/operations.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/privateendpointconnections.go b/services/mariadb/mgmt/2018-06-01/mariadb/privateendpointconnections.go new file mode 100644 index 000000000000..2324aa4d454f --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/privateendpointconnections.go @@ -0,0 +1,533 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateEndpointConnectionsClient is the mariaDB 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)} +} + +// CreateOrUpdate approve or reject a private endpoint connection with a given name. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState.Status", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState.Description", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateEndpointConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-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.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a private endpoint connection with a given name. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a private endpoint connection. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// privateEndpointConnectionName - the name of the private endpoint connection. +func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName 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: 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.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, "mariadb.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets all private endpoint connections on a server. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +func (client PrivateEndpointConnectionsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result PrivateEndpointConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByServer") + defer func() { + sc := -1 + if result.peclr.Response.Response != nil { + sc = result.peclr.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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "ListByServer", err.Error()) + } + + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.peclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "ListByServer", resp, "Failure sending request") + return + } + + result.peclr, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client PrivateEndpointConnectionsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) ListByServerResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client PrivateEndpointConnectionsClient) listByServerNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { + req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateEndpointConnectionsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result PrivateEndpointConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) + return +} + +// UpdateTags updates private endpoint connection with the specified tags. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// parameters - parameters supplied to the Update private endpoint connection Tags operation. +func (client PrivateEndpointConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters TagsObject) (result PrivateEndpointConnectionsUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.UpdateTags") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.PrivateEndpointConnectionsClient", "UpdateTags", err.Error()) + } + + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateEndpointConnectionsClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client PrivateEndpointConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) UpdateTagsSender(req *http.Request) (future PrivateEndpointConnectionsUpdateTagsFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) UpdateTagsResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/privatelinkresources.go b/services/mariadb/mgmt/2018-06-01/mariadb/privatelinkresources.go new file mode 100644 index 000000000000..82fa5fb755c0 --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/privatelinkresources.go @@ -0,0 +1,258 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateLinkResourcesClient is the mariaDB 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 gets a private link resource for MariaDB server. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// groupName - the name of the private link resource. +func (client PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, serverName string, groupName 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: 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.PrivateLinkResourcesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, groupName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.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, "mariadb.PrivateLinkResourcesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkResourcesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, groupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "groupName": autorest.Encode("path", groupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/privateLinkResources/{groupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets the private link resources for MariaDB server. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +func (client PrivateLinkResourcesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result PrivateLinkResourceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByServer") + 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: 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.PrivateLinkResourcesClient", "ListByServer", err.Error()) + } + + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.plrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "ListByServer", resp, "Failure sending request") + return + } + + result.plrlr, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client PrivateLinkResourcesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/privateLinkResources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkResourcesClient) ListByServerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) ListByServerResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client PrivateLinkResourcesClient) listByServerNextResults(ctx context.Context, lastResults PrivateLinkResourceListResult) (result PrivateLinkResourceListResult, err error) { + req, err := lastResults.privateLinkResourceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.PrivateLinkResourcesClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkResourcesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result PrivateLinkResourceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/querytexts.go b/services/mariadb/mgmt/2018-06-01/mariadb/querytexts.go new file mode 100644 index 000000000000..9e7613eb38a0 --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/querytexts.go @@ -0,0 +1,261 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// QueryTextsClient is the mariaDB Client +type QueryTextsClient struct { + BaseClient +} + +// NewQueryTextsClient creates an instance of the QueryTextsClient client. +func NewQueryTextsClient(subscriptionID string) QueryTextsClient { + return NewQueryTextsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewQueryTextsClientWithBaseURI creates an instance of the QueryTextsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewQueryTextsClientWithBaseURI(baseURI string, subscriptionID string) QueryTextsClient { + return QueryTextsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieve the Query-Store query texts for the queryId. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// queryID - the Query-Store query identifier. +func (client QueryTextsClient) Get(ctx context.Context, resourceGroupName string, serverName string, queryID string) (result QueryText, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsClient.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.QueryTextsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, queryID) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client QueryTextsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, queryID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "queryId": autorest.Encode("path", queryID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/queryTexts/{queryId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client QueryTextsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client QueryTextsClient) GetResponder(resp *http.Response) (result QueryText, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer retrieve the Query-Store query texts for specified queryIds. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// queryIds - the query identifiers +func (client QueryTextsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, queryIds []string) (result QueryTextsResultListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsClient.ListByServer") + defer func() { + sc := -1 + if result.qtrl.Response.Response != nil { + sc = result.qtrl.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: queryIds, + Constraints: []validation.Constraint{{Target: "queryIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.QueryTextsClient", "ListByServer", err.Error()) + } + + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, queryIds) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.qtrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "ListByServer", resp, "Failure sending request") + return + } + + result.qtrl, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client QueryTextsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, queryIds []string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "queryIds": queryIds, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/queryTexts", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client QueryTextsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client QueryTextsClient) ListByServerResponder(resp *http.Response) (result QueryTextsResultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client QueryTextsClient) listByServerNextResults(ctx context.Context, lastResults QueryTextsResultList) (result QueryTextsResultList, err error) { + req, err := lastResults.queryTextsResultListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.QueryTextsClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client QueryTextsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, queryIds []string) (result QueryTextsResultListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueryTextsClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName, queryIds) + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/recommendedactions.go b/services/mariadb/mgmt/2018-06-01/mariadb/recommendedactions.go new file mode 100644 index 000000000000..70a2b78bdbc5 --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/recommendedactions.go @@ -0,0 +1,266 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RecommendedActionsClient is the mariaDB Client +type RecommendedActionsClient struct { + BaseClient +} + +// NewRecommendedActionsClient creates an instance of the RecommendedActionsClient client. +func NewRecommendedActionsClient(subscriptionID string) RecommendedActionsClient { + return NewRecommendedActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRecommendedActionsClientWithBaseURI creates an instance of the RecommendedActionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewRecommendedActionsClientWithBaseURI(baseURI string, subscriptionID string) RecommendedActionsClient { + return RecommendedActionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieve recommended actions from the advisor. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// advisorName - the advisor name for recommendation action. +// recommendedActionName - the recommended action name. +func (client RecommendedActionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advisorName string, recommendedActionName string) (result RecommendationAction, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecommendedActionsClient.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.RecommendedActionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, advisorName, recommendedActionName) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client RecommendedActionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, recommendedActionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "advisorName": autorest.Encode("path", advisorName), + "recommendedActionName": autorest.Encode("path", recommendedActionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client RecommendedActionsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RecommendedActionsClient) GetResponder(resp *http.Response) (result RecommendationAction, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer retrieve recommended actions from the advisor. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// advisorName - the advisor name for recommendation action. +// sessionID - the recommendation action session identifier. +func (client RecommendedActionsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, sessionID string) (result RecommendationActionsResultListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecommendedActionsClient.ListByServer") + defer func() { + sc := -1 + if result.rarl.Response.Response != nil { + sc = result.rarl.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.RecommendedActionsClient", "ListByServer", err.Error()) + } + + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, advisorName, sessionID) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.rarl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "ListByServer", resp, "Failure sending request") + return + } + + result.rarl, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client RecommendedActionsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, advisorName string, sessionID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "advisorName": autorest.Encode("path", advisorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(sessionID) > 0 { + queryParameters["sessionId"] = autorest.Encode("query", sessionID) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/recommendedActions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client RecommendedActionsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client RecommendedActionsClient) ListByServerResponder(resp *http.Response) (result RecommendationActionsResultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client RecommendedActionsClient) listByServerNextResults(ctx context.Context, lastResults RecommendationActionsResultList) (result RecommendationActionsResultList, err error) { + req, err := lastResults.recommendationActionsResultListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.RecommendedActionsClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client RecommendedActionsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, advisorName string, sessionID string) (result RecommendationActionsResultListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecommendedActionsClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName, advisorName, sessionID) + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/replicas.go b/services/mariadb/mgmt/2018-06-01/mariadb/replicas.go index 93211c855d88..d8dcc5e8ef12 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/replicas.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/replicas.go @@ -21,6 +21,7 @@ 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" ) @@ -35,15 +36,15 @@ func NewReplicasClient(subscriptionID string) ReplicasClient { return NewReplicasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client. +// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicasClientWithBaseURI(baseURI string, subscriptionID string) ReplicasClient { return ReplicasClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByServer list all the replicas for a given server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client ReplicasClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerListResult, err error) { if tracing.IsEnabled() { @@ -56,6 +57,16 @@ func (client ReplicasClient) ListByServer(ctx context.Context, resourceGroupName 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ReplicasClient", "ListByServer", err.Error()) + } + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ReplicasClient", "ListByServer", nil, "Failure preparing request") diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/servers.go b/services/mariadb/mgmt/2018-06-01/mariadb/servers.go index c01879a7e452..a23c4e92379e 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/servers.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/servers.go @@ -36,15 +36,15 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates a new server or updates an existing server. The update action will overwrite the existing server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // parameters - the required parameters for creating or updating a server. func (client ServersClient) Create(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate) (result ServersCreateFuture, err error) { @@ -59,6 +59,12 @@ func (client ServersClient) Create(ctx context.Context, resourceGroupName string }() } 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, @@ -135,8 +141,7 @@ func (client ServersClient) CreateResponder(resp *http.Response) (result Server, // Delete deletes a server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client ServersClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServersDeleteFuture, err error) { if tracing.IsEnabled() { @@ -149,6 +154,16 @@ func (client ServersClient) Delete(ctx context.Context, resourceGroupName string 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ServersClient", "Delete", err.Error()) + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Delete", nil, "Failure preparing request") @@ -212,8 +227,7 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores // Get gets information about a server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result Server, err error) { if tracing.IsEnabled() { @@ -226,6 +240,16 @@ func (client ServersClient) Get(ctx context.Context, resourceGroupName string, s 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ServersClient", "Get", err.Error()) + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Get", nil, "Failure preparing request") @@ -300,6 +324,12 @@ func (client ServersClient) List(ctx context.Context) (result ServerListResult, 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("mariadb.ServersClient", "List", err.Error()) + } + req, err := client.ListPreparer(ctx) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "List", nil, "Failure preparing request") @@ -362,8 +392,7 @@ func (client ServersClient) ListResponder(resp *http.Response) (result ServerLis // ListByResourceGroup list all the servers in a given resource group. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. func (client ServersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServerListResult, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.ListByResourceGroup") @@ -375,6 +404,16 @@ func (client ServersClient) ListByResourceGroup(ctx context.Context, resourceGro 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ServersClient", "ListByResourceGroup", err.Error()) + } + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "ListByResourceGroup", nil, "Failure preparing request") @@ -438,8 +477,7 @@ func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (r // Restart restarts a server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client ServersClient) Restart(ctx context.Context, resourceGroupName string, serverName string) (result ServersRestartFuture, err error) { if tracing.IsEnabled() { @@ -452,6 +490,16 @@ func (client ServersClient) Restart(ctx context.Context, resourceGroupName strin 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ServersClient", "Restart", err.Error()) + } + req, err := client.RestartPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Restart", nil, "Failure preparing request") @@ -516,8 +564,7 @@ func (client ServersClient) RestartResponder(resp *http.Response) (result autore // Update updates an existing server. The request body can contain one to many of the properties present in the normal // server definition. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // parameters - the required parameters for updating a server. func (client ServersClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters) (result ServersUpdateFuture, err error) { @@ -531,6 +578,16 @@ func (client ServersClient) Update(ctx context.Context, resourceGroupName string 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ServersClient", "Update", err.Error()) + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Update", nil, "Failure preparing request") diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/serversecurityalertpolicies.go b/services/mariadb/mgmt/2018-06-01/mariadb/serversecurityalertpolicies.go index 8f8bdfdcd7e9..08de6b43dc09 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/serversecurityalertpolicies.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/serversecurityalertpolicies.go @@ -21,6 +21,7 @@ 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" ) @@ -35,15 +36,16 @@ func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityA return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client. +// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a threat detection policy. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // parameters - the server security alert policy. func (client ServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (result ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) { @@ -57,6 +59,16 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Conte 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -124,8 +136,7 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *ht // Get get a server's security alert policy. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerSecurityAlertPolicy, err error) { if tracing.IsEnabled() { @@ -138,6 +149,16 @@ func (client ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourc 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.ServerSecurityAlertPoliciesClient", "Get", err.Error()) + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request") diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/topquerystatistics.go b/services/mariadb/mgmt/2018-06-01/mariadb/topquerystatistics.go new file mode 100644 index 000000000000..ef2bdc146791 --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/topquerystatistics.go @@ -0,0 +1,270 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TopQueryStatisticsClient is the mariaDB Client +type TopQueryStatisticsClient struct { + BaseClient +} + +// NewTopQueryStatisticsClient creates an instance of the TopQueryStatisticsClient client. +func NewTopQueryStatisticsClient(subscriptionID string) TopQueryStatisticsClient { + return NewTopQueryStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTopQueryStatisticsClientWithBaseURI creates an instance of the TopQueryStatisticsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewTopQueryStatisticsClientWithBaseURI(baseURI string, subscriptionID string) TopQueryStatisticsClient { + return TopQueryStatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieve the query statistic for specified identifier. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// queryStatisticID - the Query Statistic identifier. +func (client TopQueryStatisticsClient) Get(ctx context.Context, resourceGroupName string, serverName string, queryStatisticID string) (result QueryStatistic, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsClient.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.TopQueryStatisticsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, queryStatisticID) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client TopQueryStatisticsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, queryStatisticID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "queryStatisticId": autorest.Encode("path", queryStatisticID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/topQueryStatistics/{queryStatisticId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client TopQueryStatisticsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client TopQueryStatisticsClient) GetResponder(resp *http.Response) (result QueryStatistic, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer retrieve the Query-Store top queries for specified metric and aggregation. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// parameters - the required parameters for retrieving top query statistics. +func (client TopQueryStatisticsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, parameters TopQueryStatisticsInput) (result TopQueryStatisticsResultListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsClient.ListByServer") + defer func() { + sc := -1 + if result.tqsrl.Response.Response != nil { + sc = result.tqsrl.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TopQueryStatisticsInputProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.TopQueryStatisticsInputProperties.NumberOfTopQueries", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.TopQueryStatisticsInputProperties.AggregationFunction", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.TopQueryStatisticsInputProperties.ObservedMetric", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.TopQueryStatisticsInputProperties.ObservationStartTime", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.TopQueryStatisticsInputProperties.ObservationEndTime", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.TopQueryStatisticsInputProperties.AggregationWindow", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("mariadb.TopQueryStatisticsClient", "ListByServer", err.Error()) + } + + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.tqsrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "ListByServer", resp, "Failure sending request") + return + } + + result.tqsrl, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client TopQueryStatisticsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, parameters TopQueryStatisticsInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/topQueryStatistics", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client TopQueryStatisticsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client TopQueryStatisticsClient) ListByServerResponder(resp *http.Response) (result TopQueryStatisticsResultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client TopQueryStatisticsClient) listByServerNextResults(ctx context.Context, lastResults TopQueryStatisticsResultList) (result TopQueryStatisticsResultList, err error) { + req, err := lastResults.topQueryStatisticsResultListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.TopQueryStatisticsClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client TopQueryStatisticsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, parameters TopQueryStatisticsInput) (result TopQueryStatisticsResultListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TopQueryStatisticsClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName, parameters) + return +} diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/virtualnetworkrules.go b/services/mariadb/mgmt/2018-06-01/mariadb/virtualnetworkrules.go index 87f72fc1c971..dbfbcca6e190 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/virtualnetworkrules.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/virtualnetworkrules.go @@ -36,15 +36,16 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates an existing virtual network rule. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // virtualNetworkRuleName - the name of the virtual network rule. // parameters - the requested virtual Network Rule Resource state. @@ -60,6 +61,12 @@ func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, reso }() } 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties.VirtualNetworkSubnetID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { @@ -133,8 +140,7 @@ func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Respo // Delete deletes the virtual network rule with the given name. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // virtualNetworkRuleName - the name of the virtual network rule. func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRulesDeleteFuture, err error) { @@ -148,6 +154,16 @@ func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGrou 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.VirtualNetworkRulesClient", "Delete", err.Error()) + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request") @@ -212,8 +228,7 @@ func (client VirtualNetworkRulesClient) DeleteResponder(resp *http.Response) (re // Get gets a virtual network rule. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. // virtualNetworkRuleName - the name of the virtual network rule. func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) { @@ -227,6 +242,16 @@ func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupNa 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.VirtualNetworkRulesClient", "Get", err.Error()) + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName) if err != nil { err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request") @@ -292,8 +317,7 @@ func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (resul // ListByServer gets a list of virtual network rules in a server. // Parameters: -// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. +// resourceGroupName - the name of the resource group. The name is case insensitive. // serverName - the name of the server. func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultPage, err error) { if tracing.IsEnabled() { @@ -306,6 +330,16 @@ func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resour 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: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.VirtualNetworkRulesClient", "ListByServer", err.Error()) + } + result.fn = client.listByServerNextResults req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) if err != nil { diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/waitstatistics.go b/services/mariadb/mgmt/2018-06-01/mariadb/waitstatistics.go new file mode 100644 index 000000000000..3bb132a31089 --- /dev/null +++ b/services/mariadb/mgmt/2018-06-01/mariadb/waitstatistics.go @@ -0,0 +1,266 @@ +package mariadb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// WaitStatisticsClient is the mariaDB Client +type WaitStatisticsClient struct { + BaseClient +} + +// NewWaitStatisticsClient creates an instance of the WaitStatisticsClient client. +func NewWaitStatisticsClient(subscriptionID string) WaitStatisticsClient { + return NewWaitStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWaitStatisticsClientWithBaseURI creates an instance of the WaitStatisticsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWaitStatisticsClientWithBaseURI(baseURI string, subscriptionID string) WaitStatisticsClient { + return WaitStatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieve wait statistics for specified identifier. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// waitStatisticsID - the Wait Statistic identifier. +func (client WaitStatisticsClient) Get(ctx context.Context, resourceGroupName string, serverName string, waitStatisticsID string) (result WaitStatistic, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsClient.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("mariadb.WaitStatisticsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, waitStatisticsID) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client WaitStatisticsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, waitStatisticsID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "waitStatisticsId": autorest.Encode("path", waitStatisticsID), + } + + const APIVersion = "2018-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.DBforMariaDB/servers/{serverName}/waitStatistics/{waitStatisticsId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WaitStatisticsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WaitStatisticsClient) GetResponder(resp *http.Response) (result WaitStatistic, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer retrieve wait statistics for specified aggregation window. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// serverName - the name of the server. +// parameters - the required parameters for retrieving wait statistics. +func (client WaitStatisticsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, parameters WaitStatisticsInput) (result WaitStatisticsResultListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsClient.ListByServer") + defer func() { + sc := -1 + if result.wsrl.Response.Response != nil { + sc = result.wsrl.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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.WaitStatisticsInputProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.WaitStatisticsInputProperties.ObservationStartTime", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.WaitStatisticsInputProperties.ObservationEndTime", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.WaitStatisticsInputProperties.AggregationWindow", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("mariadb.WaitStatisticsClient", "ListByServer", err.Error()) + } + + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.wsrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "ListByServer", resp, "Failure sending request") + return + } + + result.wsrl, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client WaitStatisticsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string, parameters WaitStatisticsInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/waitStatistics", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client WaitStatisticsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client WaitStatisticsClient) ListByServerResponder(resp *http.Response) (result WaitStatisticsResultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client WaitStatisticsClient) listByServerNextResults(ctx context.Context, lastResults WaitStatisticsResultList) (result WaitStatisticsResultList, err error) { + req, err := lastResults.waitStatisticsResultListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mariadb.WaitStatisticsClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client WaitStatisticsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, parameters WaitStatisticsInput) (result WaitStatisticsResultListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WaitStatisticsClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName, parameters) + return +} diff --git a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/client.go b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/client.go index 66c71e64778c..cb81a1a9c6ec 100644 --- a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/client.go +++ b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceagreements.go b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceagreements.go index 5ddb9a8af24b..31a48ad125b1 100644 --- a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceagreements.go +++ b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceagreements.go @@ -35,7 +35,9 @@ func NewMarketplaceAgreementsClient(subscriptionID string) MarketplaceAgreements return NewMarketplaceAgreementsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMarketplaceAgreementsClientWithBaseURI creates an instance of the MarketplaceAgreementsClient client. +// NewMarketplaceAgreementsClientWithBaseURI creates an instance of the MarketplaceAgreementsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMarketplaceAgreementsClientWithBaseURI(baseURI string, subscriptionID string) MarketplaceAgreementsClient { return MarketplaceAgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceorderingapi/interfaces.go b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceorderingapi/interfaces.go index 76f74d654787..d9cecb1da8d8 100644 --- a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceorderingapi/interfaces.go +++ b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/marketplaceorderingapi/interfaces.go @@ -37,6 +37,7 @@ var _ MarketplaceAgreementsClientAPI = (*marketplaceordering.MarketplaceAgreemen // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result marketplaceordering.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result marketplaceordering.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*marketplaceordering.OperationsClient)(nil) diff --git a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/operations.go b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/operations.go index ca633cca5c4a..1298a3d7db13 100644 --- a/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/operations.go +++ b/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/mediaservices/mgmt/2015-10-01/media/client.go b/services/mediaservices/mgmt/2015-10-01/media/client.go index 457c0fb1bafc..443b78cb8f42 100644 --- a/services/mediaservices/mgmt/2015-10-01/media/client.go +++ b/services/mediaservices/mgmt/2015-10-01/media/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/mediaservices/mgmt/2015-10-01/media/operations.go b/services/mediaservices/mgmt/2015-10-01/media/operations.go index 471e0085f530..8c2581b95e2f 100644 --- a/services/mediaservices/mgmt/2015-10-01/media/operations.go +++ b/services/mediaservices/mgmt/2015-10-01/media/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/mediaservices/mgmt/2015-10-01/media/service.go b/services/mediaservices/mgmt/2015-10-01/media/service.go index fa830291802f..c73598ec7cb0 100644 --- a/services/mediaservices/mgmt/2015-10-01/media/service.go +++ b/services/mediaservices/mgmt/2015-10-01/media/service.go @@ -36,7 +36,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/accountfilters.go b/services/mediaservices/mgmt/2018-07-01/media/accountfilters.go index a2a9b0832c6d..c3a3262d59e5 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/accountfilters.go +++ b/services/mediaservices/mgmt/2018-07-01/media/accountfilters.go @@ -36,7 +36,8 @@ func NewAccountFiltersClient(subscriptionID string) AccountFiltersClient { return NewAccountFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountFiltersClientWithBaseURI creates an instance of the AccountFiltersClient client. +// NewAccountFiltersClientWithBaseURI creates an instance of the AccountFiltersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountFiltersClientWithBaseURI(baseURI string, subscriptionID string) AccountFiltersClient { return AccountFiltersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/assetfilters.go b/services/mediaservices/mgmt/2018-07-01/media/assetfilters.go index 3c2870223b21..4f540bab7d4e 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/assetfilters.go +++ b/services/mediaservices/mgmt/2018-07-01/media/assetfilters.go @@ -36,7 +36,8 @@ func NewAssetFiltersClient(subscriptionID string) AssetFiltersClient { return NewAssetFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssetFiltersClientWithBaseURI creates an instance of the AssetFiltersClient client. +// NewAssetFiltersClientWithBaseURI creates an instance of the AssetFiltersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAssetFiltersClientWithBaseURI(baseURI string, subscriptionID string) AssetFiltersClient { return AssetFiltersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/assets.go b/services/mediaservices/mgmt/2018-07-01/media/assets.go index 1b068b188656..ac8fc5c999e0 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/assets.go +++ b/services/mediaservices/mgmt/2018-07-01/media/assets.go @@ -35,7 +35,8 @@ func NewAssetsClient(subscriptionID string) AssetsClient { return NewAssetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssetsClientWithBaseURI creates an instance of the AssetsClient client. +// NewAssetsClientWithBaseURI creates an instance of the AssetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAssetsClientWithBaseURI(baseURI string, subscriptionID string) AssetsClient { return AssetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/client.go b/services/mediaservices/mgmt/2018-07-01/media/client.go index 500616759e15..4cea9088c3d5 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/client.go +++ b/services/mediaservices/mgmt/2018-07-01/media/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/mediaservices/mgmt/2018-07-01/media/contentkeypolicies.go b/services/mediaservices/mgmt/2018-07-01/media/contentkeypolicies.go index 5b171643b242..5d7de97a85e9 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/contentkeypolicies.go +++ b/services/mediaservices/mgmt/2018-07-01/media/contentkeypolicies.go @@ -36,7 +36,9 @@ func NewContentKeyPoliciesClient(subscriptionID string) ContentKeyPoliciesClient return NewContentKeyPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContentKeyPoliciesClientWithBaseURI creates an instance of the ContentKeyPoliciesClient client. +// NewContentKeyPoliciesClientWithBaseURI creates an instance of the ContentKeyPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContentKeyPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ContentKeyPoliciesClient { return ContentKeyPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/jobs.go b/services/mediaservices/mgmt/2018-07-01/media/jobs.go index 04b440107baa..1aecf5d401e1 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/jobs.go +++ b/services/mediaservices/mgmt/2018-07-01/media/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/liveevents.go b/services/mediaservices/mgmt/2018-07-01/media/liveevents.go index 96db023057d4..cd602c18f577 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/liveevents.go +++ b/services/mediaservices/mgmt/2018-07-01/media/liveevents.go @@ -36,7 +36,8 @@ func NewLiveEventsClient(subscriptionID string) LiveEventsClient { return NewLiveEventsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLiveEventsClientWithBaseURI creates an instance of the LiveEventsClient client. +// NewLiveEventsClientWithBaseURI creates an instance of the LiveEventsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLiveEventsClientWithBaseURI(baseURI string, subscriptionID string) LiveEventsClient { return LiveEventsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/liveoutputs.go b/services/mediaservices/mgmt/2018-07-01/media/liveoutputs.go index 93eeb2f6ba17..95d0459b9ed6 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/liveoutputs.go +++ b/services/mediaservices/mgmt/2018-07-01/media/liveoutputs.go @@ -36,7 +36,8 @@ func NewLiveOutputsClient(subscriptionID string) LiveOutputsClient { return NewLiveOutputsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLiveOutputsClientWithBaseURI creates an instance of the LiveOutputsClient client. +// NewLiveOutputsClientWithBaseURI creates an instance of the LiveOutputsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLiveOutputsClientWithBaseURI(baseURI string, subscriptionID string) LiveOutputsClient { return LiveOutputsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/locations.go b/services/mediaservices/mgmt/2018-07-01/media/locations.go index 275566dab374..d3f199c3032c 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/locations.go +++ b/services/mediaservices/mgmt/2018-07-01/media/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/mediaapi/interfaces.go b/services/mediaservices/mgmt/2018-07-01/media/mediaapi/interfaces.go index b693ec999289..736f2218bb42 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/mediaapi/interfaces.go +++ b/services/mediaservices/mgmt/2018-07-01/media/mediaapi/interfaces.go @@ -29,6 +29,7 @@ type AccountFiltersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, filterName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, filterName string) (result media.AccountFilter, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.AccountFilterCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.AccountFilterCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, filterName string, parameters media.AccountFilter) (result media.AccountFilter, err error) } @@ -37,6 +38,7 @@ var _ AccountFiltersClientAPI = (*media.AccountFiltersClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result media.OperationCollectionPage, err error) + ListComplete(ctx context.Context) (result media.OperationCollectionIterator, err error) } var _ OperationsClientAPI = (*media.OperationsClient)(nil) @@ -48,7 +50,9 @@ type MediaservicesClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result media.Service, err error) GetBySubscription(ctx context.Context, accountName string) (result media.SubscriptionMediaService, err error) List(ctx context.Context, resourceGroupName string) (result media.ServiceCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result media.ServiceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result media.SubscriptionMediaServiceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result media.SubscriptionMediaServiceCollectionIterator, err error) SyncStorageKeys(ctx context.Context, resourceGroupName string, accountName string, parameters media.SyncStorageKeysInput) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters media.Service) (result media.Service, err error) } @@ -69,6 +73,7 @@ type AssetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.Asset, err error) GetEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.StorageEncryptedAssetDecryptionData, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.AssetCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.AssetCollectionIterator, err error) ListContainerSas(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters media.ListContainerSasInput) (result media.AssetContainerSas, err error) ListStreamingLocators(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.ListStreamingLocatorsResponse, err error) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters media.Asset) (result media.Asset, err error) @@ -82,6 +87,7 @@ type AssetFiltersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string) (result media.AssetFilter, err error) List(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.AssetFilterCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.AssetFilterCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, parameters media.AssetFilter) (result media.AssetFilter, err error) } @@ -94,6 +100,7 @@ type ContentKeyPoliciesClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string) (result media.ContentKeyPolicy, err error) GetPolicyPropertiesWithSecrets(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string) (result media.ContentKeyPolicyProperties, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.ContentKeyPolicyCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.ContentKeyPolicyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, parameters media.ContentKeyPolicy) (result media.ContentKeyPolicy, err error) } @@ -105,6 +112,7 @@ type TransformsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string) (result media.Transform, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, orderby string) (result media.TransformCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, orderby string) (result media.TransformCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, parameters media.Transform) (result media.Transform, err error) } @@ -117,6 +125,7 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string) (result media.Job, err error) List(ctx context.Context, resourceGroupName string, accountName string, transformName string, filter string, orderby string) (result media.JobCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, transformName string, filter string, orderby string) (result media.JobCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, parameters media.Job) (result media.Job, err error) } @@ -128,6 +137,7 @@ type StreamingPoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result media.StreamingPolicy, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingPolicyCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingPolicyCollectionIterator, err error) } var _ StreamingPoliciesClientAPI = (*media.StreamingPoliciesClient)(nil) @@ -138,6 +148,7 @@ type StreamingLocatorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.StreamingLocator, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingLocatorCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingLocatorCollectionIterator, err error) ListContentKeys(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.ListContentKeysResponse, err error) ListPaths(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.ListPathsResponse, err error) } @@ -150,6 +161,7 @@ type LiveEventsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEvent, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.LiveEventListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.LiveEventListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsResetFuture, err error) Start(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters media.LiveEventActionInput) (result media.LiveEventsStopFuture, err error) @@ -164,6 +176,7 @@ type LiveOutputsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string) (result media.LiveOutputsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string) (result media.LiveOutput, err error) List(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveOutputListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveOutputListResultIterator, err error) } var _ LiveOutputsClientAPI = (*media.LiveOutputsClient)(nil) @@ -174,6 +187,7 @@ type StreamingEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpoint, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.StreamingEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.StreamingEndpointListResultIterator, err error) Scale(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters media.StreamingEntityScaleUnit) (result media.StreamingEndpointsScaleFuture, err error) Start(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsStopFuture, err error) diff --git a/services/mediaservices/mgmt/2018-07-01/media/mediaservices.go b/services/mediaservices/mgmt/2018-07-01/media/mediaservices.go index 32db5e143b91..abdcb4f0c53e 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/mediaservices.go +++ b/services/mediaservices/mgmt/2018-07-01/media/mediaservices.go @@ -35,7 +35,8 @@ func NewMediaservicesClient(subscriptionID string) MediaservicesClient { return NewMediaservicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMediaservicesClientWithBaseURI creates an instance of the MediaservicesClient client. +// NewMediaservicesClientWithBaseURI creates an instance of the MediaservicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMediaservicesClientWithBaseURI(baseURI string, subscriptionID string) MediaservicesClient { return MediaservicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/operations.go b/services/mediaservices/mgmt/2018-07-01/media/operations.go index 3aedf3117a32..bacb50e6cf12 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/operations.go +++ b/services/mediaservices/mgmt/2018-07-01/media/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/streamingendpoints.go b/services/mediaservices/mgmt/2018-07-01/media/streamingendpoints.go index b26f1fecb67d..96a2bd949929 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/streamingendpoints.go +++ b/services/mediaservices/mgmt/2018-07-01/media/streamingendpoints.go @@ -36,7 +36,9 @@ func NewStreamingEndpointsClient(subscriptionID string) StreamingEndpointsClient return NewStreamingEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingEndpointsClientWithBaseURI creates an instance of the StreamingEndpointsClient client. +// NewStreamingEndpointsClientWithBaseURI creates an instance of the StreamingEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingEndpointsClientWithBaseURI(baseURI string, subscriptionID string) StreamingEndpointsClient { return StreamingEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/streaminglocators.go b/services/mediaservices/mgmt/2018-07-01/media/streaminglocators.go index 8939d9586bf1..7b8503ade806 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/streaminglocators.go +++ b/services/mediaservices/mgmt/2018-07-01/media/streaminglocators.go @@ -36,7 +36,9 @@ func NewStreamingLocatorsClient(subscriptionID string) StreamingLocatorsClient { return NewStreamingLocatorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingLocatorsClientWithBaseURI creates an instance of the StreamingLocatorsClient client. +// NewStreamingLocatorsClientWithBaseURI creates an instance of the StreamingLocatorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingLocatorsClientWithBaseURI(baseURI string, subscriptionID string) StreamingLocatorsClient { return StreamingLocatorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/streamingpolicies.go b/services/mediaservices/mgmt/2018-07-01/media/streamingpolicies.go index 16d98d4f97af..05aa6596b40a 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/streamingpolicies.go +++ b/services/mediaservices/mgmt/2018-07-01/media/streamingpolicies.go @@ -36,7 +36,9 @@ func NewStreamingPoliciesClient(subscriptionID string) StreamingPoliciesClient { return NewStreamingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client. +// NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) StreamingPoliciesClient { return StreamingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mediaservices/mgmt/2018-07-01/media/transforms.go b/services/mediaservices/mgmt/2018-07-01/media/transforms.go index 961271a3a637..e37ac9e465e9 100644 --- a/services/mediaservices/mgmt/2018-07-01/media/transforms.go +++ b/services/mediaservices/mgmt/2018-07-01/media/transforms.go @@ -36,7 +36,8 @@ func NewTransformsClient(subscriptionID string) TransformsClient { return NewTransformsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransformsClientWithBaseURI creates an instance of the TransformsClient client. +// NewTransformsClientWithBaseURI creates an instance of the TransformsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransformsClientWithBaseURI(baseURI string, subscriptionID string) TransformsClient { return TransformsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/migrate/mgmt/2018-02-02/migrate/assessedmachines.go b/services/migrate/mgmt/2018-02-02/migrate/assessedmachines.go index aeca0e493c8a..3a5b32df4aa5 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/assessedmachines.go +++ b/services/migrate/mgmt/2018-02-02/migrate/assessedmachines.go @@ -35,7 +35,9 @@ func NewAssessedMachinesClient(subscriptionID string, acceptLanguage string) Ass return NewAssessedMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewAssessedMachinesClientWithBaseURI creates an instance of the AssessedMachinesClient client. +// NewAssessedMachinesClientWithBaseURI creates an instance of the AssessedMachinesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAssessedMachinesClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) AssessedMachinesClient { return AssessedMachinesClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/migrate/mgmt/2018-02-02/migrate/assessmentoptions.go b/services/migrate/mgmt/2018-02-02/migrate/assessmentoptions.go index 2650a1cf743a..94a364bfc9ac 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/assessmentoptions.go +++ b/services/migrate/mgmt/2018-02-02/migrate/assessmentoptions.go @@ -35,7 +35,9 @@ func NewAssessmentOptionsClient(subscriptionID string, acceptLanguage string) As return NewAssessmentOptionsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewAssessmentOptionsClientWithBaseURI creates an instance of the AssessmentOptionsClient client. +// NewAssessmentOptionsClientWithBaseURI creates an instance of the AssessmentOptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAssessmentOptionsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) AssessmentOptionsClient { return AssessmentOptionsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/migrate/mgmt/2018-02-02/migrate/assessments.go b/services/migrate/mgmt/2018-02-02/migrate/assessments.go index cd91fa036e07..4e2dac736880 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/assessments.go +++ b/services/migrate/mgmt/2018-02-02/migrate/assessments.go @@ -36,7 +36,8 @@ func NewAssessmentsClient(subscriptionID string, acceptLanguage string) Assessme return NewAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewAssessmentsClientWithBaseURI creates an instance of the AssessmentsClient client. +// NewAssessmentsClientWithBaseURI creates an instance of the AssessmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) AssessmentsClient { return AssessmentsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/migrate/mgmt/2018-02-02/migrate/client.go b/services/migrate/mgmt/2018-02-02/migrate/client.go index a18523c72129..b751495b9f6c 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/client.go +++ b/services/migrate/mgmt/2018-02-02/migrate/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, acceptLanguage string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, acceptLanguage string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/migrate/mgmt/2018-02-02/migrate/groups.go b/services/migrate/mgmt/2018-02-02/migrate/groups.go index ab35c39a53f5..2deced754fa3 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/groups.go +++ b/services/migrate/mgmt/2018-02-02/migrate/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string, acceptLanguage string) GroupsClient return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/migrate/mgmt/2018-02-02/migrate/location.go b/services/migrate/mgmt/2018-02-02/migrate/location.go index 0b153027aaf9..71a4daa6a9de 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/location.go +++ b/services/migrate/mgmt/2018-02-02/migrate/location.go @@ -36,7 +36,8 @@ func NewLocationClient(subscriptionID string, acceptLanguage string) LocationCli return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/migrate/mgmt/2018-02-02/migrate/machines.go b/services/migrate/mgmt/2018-02-02/migrate/machines.go index 67bd2e54bc85..4d972f0ec6b9 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/machines.go +++ b/services/migrate/mgmt/2018-02-02/migrate/machines.go @@ -35,7 +35,8 @@ func NewMachinesClient(subscriptionID string, acceptLanguage string) MachinesCli return NewMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client. +// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMachinesClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) MachinesClient { return MachinesClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/migrate/mgmt/2018-02-02/migrate/operations.go b/services/migrate/mgmt/2018-02-02/migrate/operations.go index 6c5c2c45f98a..635bea4f2334 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/operations.go +++ b/services/migrate/mgmt/2018-02-02/migrate/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, acceptLanguage string) Operation return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, acceptLanguage string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/migrate/mgmt/2018-02-02/migrate/projects.go b/services/migrate/mgmt/2018-02-02/migrate/projects.go index 340a7fbb81e2..4b8c2fa52fdf 100644 --- a/services/migrate/mgmt/2018-02-02/migrate/projects.go +++ b/services/migrate/mgmt/2018-02-02/migrate/projects.go @@ -35,7 +35,8 @@ func NewProjectsClient(subscriptionID string, acceptLanguage string) ProjectsCli return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) ProjectsClient { return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/msi/mgmt/2018-11-30/msi/client.go b/services/msi/mgmt/2018-11-30/msi/client.go index 8405d15fc46f..172b8fa3eb81 100644 --- a/services/msi/mgmt/2018-11-30/msi/client.go +++ b/services/msi/mgmt/2018-11-30/msi/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/msi/mgmt/2018-11-30/msi/msiapi/interfaces.go b/services/msi/mgmt/2018-11-30/msi/msiapi/interfaces.go index b3d3c734c13c..5d6051d6bb02 100644 --- a/services/msi/mgmt/2018-11-30/msi/msiapi/interfaces.go +++ b/services/msi/mgmt/2018-11-30/msi/msiapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result msi.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result msi.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*msi.OperationsClient)(nil) @@ -36,7 +37,9 @@ type UserAssignedIdentitiesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result msi.Identity, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result msi.UserAssignedIdentitiesListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result msi.UserAssignedIdentitiesListResultIterator, err error) ListBySubscription(ctx context.Context) (result msi.UserAssignedIdentitiesListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result msi.UserAssignedIdentitiesListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters msi.Identity) (result msi.Identity, err error) } diff --git a/services/msi/mgmt/2018-11-30/msi/operations.go b/services/msi/mgmt/2018-11-30/msi/operations.go index f777d9388499..d126589c210e 100644 --- a/services/msi/mgmt/2018-11-30/msi/operations.go +++ b/services/msi/mgmt/2018-11-30/msi/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/msi/mgmt/2018-11-30/msi/userassignedidentities.go b/services/msi/mgmt/2018-11-30/msi/userassignedidentities.go index 8a860ce45506..997e67790fb6 100644 --- a/services/msi/mgmt/2018-11-30/msi/userassignedidentities.go +++ b/services/msi/mgmt/2018-11-30/msi/userassignedidentities.go @@ -35,7 +35,9 @@ func NewUserAssignedIdentitiesClient(subscriptionID string) UserAssignedIdentiti return NewUserAssignedIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserAssignedIdentitiesClientWithBaseURI creates an instance of the UserAssignedIdentitiesClient client. +// NewUserAssignedIdentitiesClientWithBaseURI creates an instance of the UserAssignedIdentitiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewUserAssignedIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) UserAssignedIdentitiesClient { return UserAssignedIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go b/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go index 15704fea1f6b..a52cda7b6f37 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go +++ b/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go @@ -38,7 +38,9 @@ func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailability return NewCheckNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client. +// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckNameAvailabilityClient { return CheckNameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/client.go b/services/mysql/mgmt/2017-12-01/mysql/client.go index 97fc51c4a198..6b3b5bffdf0f 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/client.go +++ b/services/mysql/mgmt/2017-12-01/mysql/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/mysql/mgmt/2017-12-01/mysql/configurations.go b/services/mysql/mgmt/2017-12-01/mysql/configurations.go index cd840d274ed7..304ca082a580 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/configurations.go +++ b/services/mysql/mgmt/2017-12-01/mysql/configurations.go @@ -37,7 +37,8 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/databases.go b/services/mysql/mgmt/2017-12-01/mysql/databases.go index 06db68fe01c4..d22ab67af4d3 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/databases.go +++ b/services/mysql/mgmt/2017-12-01/mysql/databases.go @@ -37,7 +37,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go b/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go index 72ae7d721cff..4c1db77f6771 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go +++ b/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go @@ -38,7 +38,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go b/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go index ef799431cecc..48db220c8031 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go +++ b/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go @@ -38,7 +38,8 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string) LocationBasedP } // NewLocationBasedPerformanceTierClientWithBaseURI creates an instance of the LocationBasedPerformanceTierClient -// 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 NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedPerformanceTierClient { return LocationBasedPerformanceTierClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/logfiles.go b/services/mysql/mgmt/2017-12-01/mysql/logfiles.go index cd4b6e3811ed..e659838ac102 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/logfiles.go +++ b/services/mysql/mgmt/2017-12-01/mysql/logfiles.go @@ -37,7 +37,8 @@ func NewLogFilesClient(subscriptionID string) LogFilesClient { return NewLogFilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client. +// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFilesClient { return LogFilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/mysqlapi/interfaces.go b/services/mysql/mgmt/2017-12-01/mysql/mysqlapi/interfaces.go index 3b3892437114..e8e44bccb758 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/mysqlapi/interfaces.go +++ b/services/mysql/mgmt/2017-12-01/mysql/mysqlapi/interfaces.go @@ -58,6 +58,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result mysql.VirtualNetworkRulesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result mysql.VirtualNetworkRule, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result mysql.VirtualNetworkRuleListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result mysql.VirtualNetworkRuleListResultIterator, err error) } var _ VirtualNetworkRulesClientAPI = (*mysql.VirtualNetworkRulesClient)(nil) diff --git a/services/mysql/mgmt/2017-12-01/mysql/operations.go b/services/mysql/mgmt/2017-12-01/mysql/operations.go index 6eda9e48d222..f311a32e5da4 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/operations.go +++ b/services/mysql/mgmt/2017-12-01/mysql/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/replicas.go b/services/mysql/mgmt/2017-12-01/mysql/replicas.go index dab96b065667..eb3f9ec41a43 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/replicas.go +++ b/services/mysql/mgmt/2017-12-01/mysql/replicas.go @@ -37,7 +37,8 @@ func NewReplicasClient(subscriptionID string) ReplicasClient { return NewReplicasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client. +// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicasClientWithBaseURI(baseURI string, subscriptionID string) ReplicasClient { return ReplicasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/servers.go b/services/mysql/mgmt/2017-12-01/mysql/servers.go index 7aafb12950d0..0a49f5ce270a 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/servers.go +++ b/services/mysql/mgmt/2017-12-01/mysql/servers.go @@ -38,7 +38,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/serversecurityalertpolicies.go b/services/mysql/mgmt/2017-12-01/mysql/serversecurityalertpolicies.go index 31655da75ae7..bf9d1564fc47 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/serversecurityalertpolicies.go +++ b/services/mysql/mgmt/2017-12-01/mysql/serversecurityalertpolicies.go @@ -37,7 +37,9 @@ func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityA return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client. +// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go b/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go index 6f792d3adf5e..87cd9837d67e 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go +++ b/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go @@ -38,7 +38,9 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/netapp/mgmt/2019-05-01/netapp/accounts.go b/services/netapp/mgmt/2019-05-01/netapp/accounts.go index 89e09effbd36..715de62d8f8c 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/accounts.go +++ b/services/netapp/mgmt/2019-05-01/netapp/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-05-01/netapp/client.go b/services/netapp/mgmt/2019-05-01/netapp/client.go index 131f14279d23..009091a53cad 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/client.go +++ b/services/netapp/mgmt/2019-05-01/netapp/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/netapp/mgmt/2019-05-01/netapp/models.go b/services/netapp/mgmt/2019-05-01/netapp/models.go index dae31f24490a..37aac550d821 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/models.go +++ b/services/netapp/mgmt/2019-05-01/netapp/models.go @@ -1374,7 +1374,7 @@ type VolumeProperties struct { // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes SubnetID *string `json:"subnetId,omitempty"` // MountTargets - List of mount targets - MountTargets interface{} `json:"mountTargets,omitempty"` + MountTargets *[]MountTargetList `json:"mountTargets,omitempty"` } // VolumePropertiesExportPolicy set of export policy rules diff --git a/services/netapp/mgmt/2019-05-01/netapp/mounttargets.go b/services/netapp/mgmt/2019-05-01/netapp/mounttargets.go index 70acdef4f6e7..505fde0d5a41 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/mounttargets.go +++ b/services/netapp/mgmt/2019-05-01/netapp/mounttargets.go @@ -36,7 +36,8 @@ func NewMountTargetsClient(subscriptionID string) MountTargetsClient { return NewMountTargetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client. +// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMountTargetsClientWithBaseURI(baseURI string, subscriptionID string) MountTargetsClient { return MountTargetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/netapp/mgmt/2019-05-01/netapp/operations.go b/services/netapp/mgmt/2019-05-01/netapp/operations.go index 2be7de2d4bdb..6032b8e5ee8d 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/operations.go +++ b/services/netapp/mgmt/2019-05-01/netapp/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-05-01/netapp/pools.go b/services/netapp/mgmt/2019-05-01/netapp/pools.go index 77e1d2468581..4885616c67df 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-05-01/netapp/pools.go @@ -36,7 +36,8 @@ func NewPoolsClient(subscriptionID string) PoolsClient { return NewPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolsClientWithBaseURI creates an instance of the PoolsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-05-01/netapp/snapshots.go b/services/netapp/mgmt/2019-05-01/netapp/snapshots.go index e96df4deb6a8..3e91f9faba8c 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/snapshots.go +++ b/services/netapp/mgmt/2019-05-01/netapp/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-05-01/netapp/volumes.go b/services/netapp/mgmt/2019-05-01/netapp/volumes.go index 1fcf2562c763..3546b6e737d2 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-05-01/netapp/volumes.go @@ -36,7 +36,8 @@ func NewVolumesClient(subscriptionID string) VolumesClient { return NewVolumesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumesClientWithBaseURI creates an instance of the VolumesClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-06-01/netapp/accounts.go b/services/netapp/mgmt/2019-06-01/netapp/accounts.go index 982b13e95a8f..00b604e79f28 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/accounts.go +++ b/services/netapp/mgmt/2019-06-01/netapp/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-06-01/netapp/client.go b/services/netapp/mgmt/2019-06-01/netapp/client.go index 5e190522889c..aacafa40a7f2 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/client.go +++ b/services/netapp/mgmt/2019-06-01/netapp/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/netapp/mgmt/2019-06-01/netapp/models.go b/services/netapp/mgmt/2019-06-01/netapp/models.go index e9c28731811f..f4625a780954 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/models.go +++ b/services/netapp/mgmt/2019-06-01/netapp/models.go @@ -1374,7 +1374,7 @@ type VolumeProperties struct { // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes SubnetID *string `json:"subnetId,omitempty"` // MountTargets - List of mount targets - MountTargets interface{} `json:"mountTargets,omitempty"` + MountTargets *[]MountTargetList `json:"mountTargets,omitempty"` } // VolumePropertiesExportPolicy set of export policy rules diff --git a/services/netapp/mgmt/2019-06-01/netapp/mounttargets.go b/services/netapp/mgmt/2019-06-01/netapp/mounttargets.go index f78422a4acb5..afddd44647d1 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/mounttargets.go +++ b/services/netapp/mgmt/2019-06-01/netapp/mounttargets.go @@ -36,7 +36,8 @@ func NewMountTargetsClient(subscriptionID string) MountTargetsClient { return NewMountTargetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client. +// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMountTargetsClientWithBaseURI(baseURI string, subscriptionID string) MountTargetsClient { return MountTargetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/netapp/mgmt/2019-06-01/netapp/operations.go b/services/netapp/mgmt/2019-06-01/netapp/operations.go index 8c0765593327..b563d00e5978 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/operations.go +++ b/services/netapp/mgmt/2019-06-01/netapp/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-06-01/netapp/pools.go b/services/netapp/mgmt/2019-06-01/netapp/pools.go index bdd8e5cb14d0..cba065bf22d7 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-06-01/netapp/pools.go @@ -36,7 +36,8 @@ func NewPoolsClient(subscriptionID string) PoolsClient { return NewPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolsClientWithBaseURI creates an instance of the PoolsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-06-01/netapp/snapshots.go b/services/netapp/mgmt/2019-06-01/netapp/snapshots.go index e662e6ada9ac..36ff5a57b517 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/snapshots.go +++ b/services/netapp/mgmt/2019-06-01/netapp/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-06-01/netapp/volumes.go b/services/netapp/mgmt/2019-06-01/netapp/volumes.go index 91efe92d08c2..892ccea4013b 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-06-01/netapp/volumes.go @@ -36,7 +36,8 @@ func NewVolumesClient(subscriptionID string) VolumesClient { return NewVolumesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumesClientWithBaseURI creates an instance of the VolumesClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-07-01/netapp/accounts.go b/services/netapp/mgmt/2019-07-01/netapp/accounts.go index 0153e80d6a37..e7b875093c15 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/accounts.go +++ b/services/netapp/mgmt/2019-07-01/netapp/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-07-01/netapp/client.go b/services/netapp/mgmt/2019-07-01/netapp/client.go index eac55ebbe83c..df28201af867 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/client.go +++ b/services/netapp/mgmt/2019-07-01/netapp/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/netapp/mgmt/2019-07-01/netapp/models.go b/services/netapp/mgmt/2019-07-01/netapp/models.go index 37cc8897ce3c..0f81f327c99a 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/models.go +++ b/services/netapp/mgmt/2019-07-01/netapp/models.go @@ -1374,7 +1374,7 @@ type VolumeProperties struct { // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes SubnetID *string `json:"subnetId,omitempty"` // MountTargets - List of mount targets - MountTargets interface{} `json:"mountTargets,omitempty"` + MountTargets *[]MountTargetList `json:"mountTargets,omitempty"` } // VolumePropertiesExportPolicy set of export policy rules diff --git a/services/netapp/mgmt/2019-07-01/netapp/mounttargets.go b/services/netapp/mgmt/2019-07-01/netapp/mounttargets.go index ce1763ba3a2d..c8a89b6905b6 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/mounttargets.go +++ b/services/netapp/mgmt/2019-07-01/netapp/mounttargets.go @@ -36,7 +36,8 @@ func NewMountTargetsClient(subscriptionID string) MountTargetsClient { return NewMountTargetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client. +// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMountTargetsClientWithBaseURI(baseURI string, subscriptionID string) MountTargetsClient { return MountTargetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/netapp/mgmt/2019-07-01/netapp/operations.go b/services/netapp/mgmt/2019-07-01/netapp/operations.go index c6b1e7923306..7b6623578f29 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/operations.go +++ b/services/netapp/mgmt/2019-07-01/netapp/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-07-01/netapp/pools.go b/services/netapp/mgmt/2019-07-01/netapp/pools.go index acccfc8b7ee5..18c8c2109ed7 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-07-01/netapp/pools.go @@ -36,7 +36,8 @@ func NewPoolsClient(subscriptionID string) PoolsClient { return NewPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolsClientWithBaseURI creates an instance of the PoolsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-07-01/netapp/snapshots.go b/services/netapp/mgmt/2019-07-01/netapp/snapshots.go index 3150984c7d65..fb89470d29e6 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/snapshots.go +++ b/services/netapp/mgmt/2019-07-01/netapp/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-07-01/netapp/volumes.go b/services/netapp/mgmt/2019-07-01/netapp/volumes.go index c9c31adecd4b..28114a770b93 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-07-01/netapp/volumes.go @@ -36,7 +36,8 @@ func NewVolumesClient(subscriptionID string) VolumesClient { return NewVolumesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumesClientWithBaseURI creates an instance of the VolumesClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-08-01/netapp/accounts.go b/services/netapp/mgmt/2019-08-01/netapp/accounts.go index a46253efe2eb..c8d7e0926fc6 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/accounts.go +++ b/services/netapp/mgmt/2019-08-01/netapp/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-08-01/netapp/client.go b/services/netapp/mgmt/2019-08-01/netapp/client.go index 6449c8d73307..33a2279ee69f 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/client.go +++ b/services/netapp/mgmt/2019-08-01/netapp/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/netapp/mgmt/2019-08-01/netapp/models.go b/services/netapp/mgmt/2019-08-01/netapp/models.go index 92bc727b5234..c547a662a72c 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/models.go +++ b/services/netapp/mgmt/2019-08-01/netapp/models.go @@ -1406,7 +1406,7 @@ type VolumeProperties struct { // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes SubnetID *string `json:"subnetId,omitempty"` // MountTargets - List of mount targets - MountTargets interface{} `json:"mountTargets,omitempty"` + MountTargets *[]MountTargetList `json:"mountTargets,omitempty"` // VolumeType - What type of volume is this VolumeType *string `json:"volumeType,omitempty"` // DataProtection - DataProtection volume, can have a replication object diff --git a/services/netapp/mgmt/2019-08-01/netapp/mounttargets.go b/services/netapp/mgmt/2019-08-01/netapp/mounttargets.go index d226e9d97e03..361b359f54a9 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/mounttargets.go +++ b/services/netapp/mgmt/2019-08-01/netapp/mounttargets.go @@ -36,7 +36,8 @@ func NewMountTargetsClient(subscriptionID string) MountTargetsClient { return NewMountTargetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client. +// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMountTargetsClientWithBaseURI(baseURI string, subscriptionID string) MountTargetsClient { return MountTargetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/netapp/mgmt/2019-08-01/netapp/operations.go b/services/netapp/mgmt/2019-08-01/netapp/operations.go index c17bf985aef0..41be244a26ee 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/operations.go +++ b/services/netapp/mgmt/2019-08-01/netapp/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-08-01/netapp/pools.go b/services/netapp/mgmt/2019-08-01/netapp/pools.go index 0d3876e34ed4..302013274a5e 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-08-01/netapp/pools.go @@ -36,7 +36,8 @@ func NewPoolsClient(subscriptionID string) PoolsClient { return NewPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolsClientWithBaseURI creates an instance of the PoolsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-08-01/netapp/resource.go b/services/netapp/mgmt/2019-08-01/netapp/resource.go index 60a415debaf4..87cb519e40a0 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/resource.go +++ b/services/netapp/mgmt/2019-08-01/netapp/resource.go @@ -36,7 +36,8 @@ func NewResourceClient(subscriptionID string) ResourceClient { return NewResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceClientWithBaseURI creates an instance of the ResourceClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-08-01/netapp/snapshots.go b/services/netapp/mgmt/2019-08-01/netapp/snapshots.go index 5acd303e4848..e129016264f2 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/snapshots.go +++ b/services/netapp/mgmt/2019-08-01/netapp/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-08-01/netapp/volumes.go b/services/netapp/mgmt/2019-08-01/netapp/volumes.go index af20eef487f9..6ea60b69d1bf 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-08-01/netapp/volumes.go @@ -36,7 +36,8 @@ func NewVolumesClient(subscriptionID string) VolumesClient { return NewVolumesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumesClientWithBaseURI creates an instance of the VolumesClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-10-01/netapp/accounts.go b/services/netapp/mgmt/2019-10-01/netapp/accounts.go index 00f10b69d6f5..dff6930354b7 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/accounts.go +++ b/services/netapp/mgmt/2019-10-01/netapp/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-10-01/netapp/client.go b/services/netapp/mgmt/2019-10-01/netapp/client.go index 0dfd8925e16e..b1a502897598 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/client.go +++ b/services/netapp/mgmt/2019-10-01/netapp/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/netapp/mgmt/2019-10-01/netapp/models.go b/services/netapp/mgmt/2019-10-01/netapp/models.go index e7f905978a96..1b10ff7f112b 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/models.go +++ b/services/netapp/mgmt/2019-10-01/netapp/models.go @@ -1497,7 +1497,7 @@ type VolumeProperties struct { // SubnetID - The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes SubnetID *string `json:"subnetId,omitempty"` // MountTargets - List of mount targets - MountTargets interface{} `json:"mountTargets,omitempty"` + MountTargets *[]MountTargetList `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 diff --git a/services/netapp/mgmt/2019-10-01/netapp/mounttargets.go b/services/netapp/mgmt/2019-10-01/netapp/mounttargets.go index 13e7dcbd3de9..c430ebbdc833 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/mounttargets.go +++ b/services/netapp/mgmt/2019-10-01/netapp/mounttargets.go @@ -36,7 +36,8 @@ func NewMountTargetsClient(subscriptionID string) MountTargetsClient { return NewMountTargetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client. +// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMountTargetsClientWithBaseURI(baseURI string, subscriptionID string) MountTargetsClient { return MountTargetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/netapp/mgmt/2019-10-01/netapp/operations.go b/services/netapp/mgmt/2019-10-01/netapp/operations.go index cd2ea139ad24..346138d170d1 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/operations.go +++ b/services/netapp/mgmt/2019-10-01/netapp/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-10-01/netapp/pools.go b/services/netapp/mgmt/2019-10-01/netapp/pools.go index e7b76159b131..0f60e17fa525 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-10-01/netapp/pools.go @@ -36,7 +36,8 @@ func NewPoolsClient(subscriptionID string) PoolsClient { return NewPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolsClientWithBaseURI creates an instance of the PoolsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-10-01/netapp/resource.go b/services/netapp/mgmt/2019-10-01/netapp/resource.go index 98e2f1503c95..3feec30322ed 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/resource.go +++ b/services/netapp/mgmt/2019-10-01/netapp/resource.go @@ -36,7 +36,8 @@ func NewResourceClient(subscriptionID string) ResourceClient { return NewResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceClientWithBaseURI creates an instance of the ResourceClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-10-01/netapp/snapshots.go b/services/netapp/mgmt/2019-10-01/netapp/snapshots.go index 19dbca87d9d3..b9722bef1029 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/snapshots.go +++ b/services/netapp/mgmt/2019-10-01/netapp/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-10-01/netapp/volumes.go b/services/netapp/mgmt/2019-10-01/netapp/volumes.go index 718315cc37e2..70d794f24788 100644 --- a/services/netapp/mgmt/2019-10-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-10-01/netapp/volumes.go @@ -36,7 +36,8 @@ func NewVolumesClient(subscriptionID string) VolumesClient { return NewVolumesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumesClientWithBaseURI creates an instance of the VolumesClient client. +// 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)} } diff --git a/services/netapp/mgmt/2019-11-01/netapp/accounts.go b/services/netapp/mgmt/2019-11-01/netapp/accounts.go new file mode 100644 index 000000000000..272fc936d10d --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/accounts.go @@ -0,0 +1,479 @@ +package netapp + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AccountsClient is the microsoft NetApp 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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}", 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AccountsClient) CreateOrUpdateResponder(resp *http.Response) (result Account, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AccountsClient) GetResponder(resp *http.Response) (result Account, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 AccountList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.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.AccountsClient", "List", err.Error()) + } + + 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.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "List", resp, "Failure responding to request") + } + + 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AccountsClient) ListResponder(resp *http.Response) (result AccountList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update 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 Account, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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 + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.AccountsClient", "Update", resp, "Failure responding to request") + } + + 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 = "2019-11-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) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2019-11-01/netapp/client.go b/services/netapp/mgmt/2019-11-01/netapp/client.go new file mode 100644 index 000000000000..355c41a18b53 --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/client.go @@ -0,0 +1,52 @@ +// Package netapp implements the Azure ARM Netapp service API version 2019-11-01. +// +// Microsoft NetApp Azure Resource Provider specification +package netapp + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service 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/2019-11-01/netapp/models.go b/services/netapp/mgmt/2019-11-01/netapp/models.go new file mode 100644 index 000000000000..42a57959e6b2 --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/models.go @@ -0,0 +1,1739 @@ +package netapp + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-11-01/netapp" + +// CheckNameResourceTypes enumerates the values for check name resource types. +type CheckNameResourceTypes string + +const ( + // MicrosoftNetAppnetAppAccounts ... + MicrosoftNetAppnetAppAccounts CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts" + // MicrosoftNetAppnetAppAccountscapacityPools ... + MicrosoftNetAppnetAppAccountscapacityPools CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools" + // MicrosoftNetAppnetAppAccountscapacityPoolsvolumes ... + MicrosoftNetAppnetAppAccountscapacityPoolsvolumes CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" + // MicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots ... + MicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +) + +// PossibleCheckNameResourceTypesValues returns an array of possible values for the CheckNameResourceTypes const type. +func PossibleCheckNameResourceTypesValues() []CheckNameResourceTypes { + return []CheckNameResourceTypes{MicrosoftNetAppnetAppAccounts, MicrosoftNetAppnetAppAccountscapacityPools, MicrosoftNetAppnetAppAccountscapacityPoolsvolumes, MicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots} +} + +// EndpointType enumerates the values for endpoint type. +type EndpointType string + +const ( + // Dst ... + Dst EndpointType = "dst" + // Src ... + Src EndpointType = "src" +) + +// PossibleEndpointTypeValues returns an array of possible values for the EndpointType const type. +func PossibleEndpointTypeValues() []EndpointType { + return []EndpointType{Dst, Src} +} + +// InAvailabilityReasonType enumerates the values for in availability reason type. +type InAvailabilityReasonType string + +const ( + // AlreadyExists ... + AlreadyExists InAvailabilityReasonType = "AlreadyExists" + // Invalid ... + Invalid InAvailabilityReasonType = "Invalid" +) + +// PossibleInAvailabilityReasonTypeValues returns an array of possible values for the InAvailabilityReasonType const type. +func PossibleInAvailabilityReasonTypeValues() []InAvailabilityReasonType { + return []InAvailabilityReasonType{AlreadyExists, Invalid} +} + +// MirrorState enumerates the values for mirror state. +type MirrorState string + +const ( + // Broken ... + Broken MirrorState = "Broken" + // Mirrored ... + Mirrored MirrorState = "Mirrored" + // Uninitialized ... + Uninitialized MirrorState = "Uninitialized" +) + +// PossibleMirrorStateValues returns an array of possible values for the MirrorState const type. +func PossibleMirrorStateValues() []MirrorState { + return []MirrorState{Broken, Mirrored, Uninitialized} +} + +// RelationshipStatus enumerates the values for relationship status. +type RelationshipStatus string + +const ( + // Idle ... + Idle RelationshipStatus = "Idle" + // Transferring ... + Transferring RelationshipStatus = "Transferring" +) + +// PossibleRelationshipStatusValues returns an array of possible values for the RelationshipStatus const type. +func PossibleRelationshipStatusValues() []RelationshipStatus { + return []RelationshipStatus{Idle, Transferring} +} + +// ReplicationSchedule enumerates the values for replication schedule. +type ReplicationSchedule string + +const ( + // OneZerominutely ... + OneZerominutely ReplicationSchedule = "_10minutely" + // Daily ... + Daily ReplicationSchedule = "daily" + // Hourly ... + Hourly ReplicationSchedule = "hourly" + // Monthly ... + Monthly ReplicationSchedule = "monthly" + // Weekly ... + Weekly ReplicationSchedule = "weekly" +) + +// PossibleReplicationScheduleValues returns an array of possible values for the ReplicationSchedule const type. +func PossibleReplicationScheduleValues() []ReplicationSchedule { + return []ReplicationSchedule{OneZerominutely, Daily, Hourly, Monthly, Weekly} +} + +// ServiceLevel enumerates the values for service level. +type ServiceLevel string + +const ( + // Premium Premium service level + Premium ServiceLevel = "Premium" + // Standard Standard service level + Standard ServiceLevel = "Standard" + // Ultra Ultra service level + Ultra ServiceLevel = "Ultra" +) + +// PossibleServiceLevelValues returns an array of possible values for the ServiceLevel const type. +func PossibleServiceLevelValues() []ServiceLevel { + return []ServiceLevel{Premium, Standard, Ultra} +} + +// 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"` + // 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 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 "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 + } + } + } + + return nil +} + +// AccountList list of NetApp account resources +type AccountList struct { + autorest.Response `json:"-"` + // Value - Multiple NetApp accounts + Value *[]Account `json:"value,omitempty"` +} + +// 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"` +} + +// AccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AccountsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("netapp.AccountsDeleteFuture") + return + } + ar.Response = future.Response() + 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 + 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 - Status of the Active Directory + Status *string `json:"status,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"` +} + +// AuthorizeRequest authorize request +type AuthorizeRequest struct { + // RemoteVolumeResourceID - Resource id of the remote volume + RemoteVolumeResourceID *string `json:"remoteVolumeResourceId,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"` + // 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 "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"` +} + +// 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 +} + +// 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"` + // Cifs - Allows CIFS protocol + Cifs *bool `json:"cifs,omitempty"` + // Nfsv3 - Allows NFSv3 protocol + Nfsv3 *bool `json:"nfsv3,omitempty"` + // Nfsv41 - Allows NFSv4.1 protocol + 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"` +} + +// 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"` + // 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"` +} + +// 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 +} + +// MountTargetList list of Mount Targets +type MountTargetList struct { + // Value - A list of Mount targets + Value *[]MountTarget `json:"value,omitempty"` +} + +// 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"` +} + +// 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"` +} + +// 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"` + // ServiceLevel - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' + ServiceLevel ServiceLevel `json:"serviceLevel,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 - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' + ServiceLevel ServiceLevel `json:"serviceLevel,omitempty"` + // ProvisioningState - READ-ONLY; Azure lifecycle management + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// PoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PoolsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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: 'Src', 'Dst' + EndpointType EndpointType `json:"endpointType,omitempty"` + // ReplicationSchedule - Schedule. Possible values include: '10minutely', 'Hourly', 'Daily', 'Weekly', 'Monthly' + 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: 'Idle', 'Transferring' + RelationshipStatus RelationshipStatus `json:"relationshipStatus,omitempty"` + // MirrorState - The status of the replication. Possible values include: 'Uninitialized', 'Mirrored', 'Broken' + 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"` +} + +// ResourceNameAvailability information regarding availability of a resource name. +type ResourceNameAvailability 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: 'Invalid', 'AlreadyExists' + 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"` +} + +// 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: 'MicrosoftNetAppnetAppAccounts', 'MicrosoftNetAppnetAppAccountscapacityPools', 'MicrosoftNetAppnetAppAccountscapacityPoolsvolumes', 'MicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots' + Type CheckNameResourceTypes `json:"type,omitempty"` + // ResourceGroup - Resource group name. + ResourceGroup *string `json:"resourceGroup,omitempty"` +} + +// 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 +} + +// SnapshotProperties snapshot properties +type SnapshotProperties struct { + // SnapshotID - READ-ONLY; UUID v4 used to identify the Snapshot + SnapshotID *string `json:"snapshotId,omitempty"` + // FileSystemID - UUID v4 used to identify the FileSystem + FileSystemID *string `json:"fileSystemId,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"` +} + +// SnapshotsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SnapshotsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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"` + // 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 "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 +} + +// VolumeList list of volume resources +type VolumeList struct { + autorest.Response `json:"-"` + // Value - List of volumes + Value *[]Volume `json:"value,omitempty"` +} + +// 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 - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' + 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"` +} + +// 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 - The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' + 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 + 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"` + // 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 - List of mount targets + MountTargets interface{} `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"` +} + +// VolumePropertiesDataProtection dataProtection type volumes include an object containing details of the +// replication +type VolumePropertiesDataProtection struct { + // Replication - Replication properties + Replication *ReplicationObject `json:"replication,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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("netapp.VolumesDeleteReplicationFuture") + return + } + ar.Response = future.Response() + return +} + +// VolumesResyncReplicationFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VolumesResyncReplicationFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} diff --git a/services/netapp/mgmt/2019-11-01/netapp/netappapi/interfaces.go b/services/netapp/mgmt/2019-11-01/netapp/netappapi/interfaces.go new file mode 100644 index 000000000000..f40c98862292 --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/netappapi/interfaces.go @@ -0,0 +1,88 @@ +package netappapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-11-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.ResourceNameAvailabilityRequest, location string) (result netapp.ResourceNameAvailability, err error) + CheckNameAvailability(ctx context.Context, body netapp.ResourceNameAvailabilityRequest, location string) (result netapp.ResourceNameAvailability, 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.AccountList, err error) + Update(ctx context.Context, body netapp.AccountPatch, resourceGroupName string, accountName string) (result netapp.Account, 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.CapacityPoolList, 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) (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.VolumeList, 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) diff --git a/services/netapp/mgmt/2019-11-01/netapp/operations.go b/services/netapp/mgmt/2019-11-01/netapp/operations.go new file mode 100644 index 000000000000..85e57bb47a88 --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/operations.go @@ -0,0 +1,110 @@ +package netapp + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the microsoft NetApp 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 +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2019-11-01/netapp/pools.go b/services/netapp/mgmt/2019-11-01/netapp/pools.go new file mode 100644 index 000000000000..93e62c463fa6 --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/pools.go @@ -0,0 +1,516 @@ +package netapp + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PoolsClient is the microsoft NetApp 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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}", 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PoolsClient) CreateOrUpdateResponder(resp *http.Response) (result CapacityPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PoolsClient) GetResponder(resp *http.Response) (result CapacityPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 CapacityPoolList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoolsClient.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.PoolsClient", "List", err.Error()) + } + + 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.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.PoolsClient", "List", resp, "Failure responding to request") + } + + 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PoolsClient) ListResponder(resp *http.Response) (result CapacityPoolList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client PoolsClient) UpdateResponder(resp *http.Response) (result CapacityPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2019-11-01/netapp/resource.go b/services/netapp/mgmt/2019-11-01/netapp/resource.go new file mode 100644 index 000000000000..d6b828f8d484 --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/resource.go @@ -0,0 +1,213 @@ +package netapp + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ResourceClient is the microsoft NetApp 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 ResourceNameAvailabilityRequest, location string) (result ResourceNameAvailability, 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.ResourceGroup", 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 +} + +// CheckFilePathAvailabilityPreparer prepares the CheckFilePathAvailability request. +func (client ResourceClient) CheckFilePathAvailabilityPreparer(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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckFilePathAvailabilityResponder handles the response to the CheckFilePathAvailability request. The method always +// closes the http.Response Body. +func (client ResourceClient) CheckFilePathAvailabilityResponder(resp *http.Response) (result ResourceNameAvailability, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 ResourceNameAvailability, 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client ResourceClient) CheckNameAvailabilityResponder(resp *http.Response) (result ResourceNameAvailability, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2019-11-01/netapp/snapshots.go b/services/netapp/mgmt/2019-11-01/netapp/snapshots.go new file mode 100644 index 000000000000..8c78d7ab8d48 --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/snapshots.go @@ -0,0 +1,558 @@ +package netapp + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SnapshotsClient is the microsoft NetApp 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 mount target +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.Response() != nil { + sc = result.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}, + }}, + {Target: "body.SnapshotProperties.FileSystemID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.SnapshotProperties.FileSystemID", Name: validation.MaxLength, Rule: 36, Chain: nil}, + {Target: "body.SnapshotProperties.FileSystemID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.SnapshotProperties.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}, + }}, + }}}}, + {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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) CreateResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete 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 mount target +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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get 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 mount target +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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) ListResponder(resp *http.Response) (result SnapshotsList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update 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 mount target +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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) UpdateResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/netapp/mgmt/2019-11-01/netapp/version.go b/services/netapp/mgmt/2019-11-01/netapp/version.go new file mode 100644 index 000000000000..2dd52af6e6aa --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/version.go @@ -0,0 +1,30 @@ +package netapp + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " netapp/2019-11-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/2019-11-01/netapp/volumes.go b/services/netapp/mgmt/2019-11-01/netapp/volumes.go new file mode 100644 index 000000000000..e65ce5ceeb05 --- /dev/null +++ b/services/netapp/mgmt/2019-11-01/netapp/volumes.go @@ -0,0 +1,1151 @@ +package netapp + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VolumesClient is the microsoft NetApp 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +func (client VolumesClient) BreakReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string) (result VolumesBreakReplicationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.BreakReplication") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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) + 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", result.Response(), "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) (*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 = "2019-11-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}/breakReplication", pathParameters), + autorest.WithQueryParameters(queryParameters)) + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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.BaremetalTenantID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.VolumeProperties.BaremetalTenantID", Name: validation.MaxLength, Rule: 36, Chain: nil}, + {Target: "body.VolumeProperties.BaremetalTenantID", Name: validation.MinLength, Rule: 36, Chain: nil}, + {Target: "body.VolumeProperties.BaremetalTenantID", 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}}}, + }}, + }}}}, + {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", result.Response(), "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 = "2019-11-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}", 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VolumesClient) CreateOrUpdateResponder(resp *http.Response) (result Volume, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VolumesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VolumesClient) GetResponder(resp *http.Response) (result Volume, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 VolumeList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VolumesClient.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}}}}); err != nil { + return result, validation.NewError("netapp.VolumesClient", "List", err.Error()) + } + + 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.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "netapp.VolumesClient", "List", resp, "Failure responding to request") + } + + 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VolumesClient) ListResponder(resp *http.Response) (result VolumeList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 source to destination. +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VolumesClient) UpdateResponder(resp *http.Response) (result Volume, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2015-06-15/network/applicationgateways.go b/services/network/mgmt/2015-06-15/network/applicationgateways.go index f02c887e63d5..5d70fdd9d288 100644 --- a/services/network/mgmt/2015-06-15/network/applicationgateways.go +++ b/services/network/mgmt/2015-06-15/network/applicationgateways.go @@ -35,7 +35,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/client.go b/services/network/mgmt/2015-06-15/network/client.go index 8a41870069f3..4f6d5ca5c232 100644 --- a/services/network/mgmt/2015-06-15/network/client.go +++ b/services/network/mgmt/2015-06-15/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go index 52155a321975..9e683dafa2a2 100644 --- a/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2015-06-15/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go b/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go index 81252fe0cd0c..c8d29eab3a27 100644 --- a/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2015-06-15/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/expressroutecircuits.go b/services/network/mgmt/2015-06-15/network/expressroutecircuits.go index 893e8e468359..b8fcde7f004a 100644 --- a/services/network/mgmt/2015-06-15/network/expressroutecircuits.go +++ b/services/network/mgmt/2015-06-15/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/expressrouteserviceproviders.go b/services/network/mgmt/2015-06-15/network/expressrouteserviceproviders.go index 680b36c9153c..8efbd083446a 100644 --- a/services/network/mgmt/2015-06-15/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2015-06-15/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2015-06-15/network/interfacesgroup.go b/services/network/mgmt/2015-06-15/network/interfacesgroup.go index cef9933f56ba..91899dadc256 100644 --- a/services/network/mgmt/2015-06-15/network/interfacesgroup.go +++ b/services/network/mgmt/2015-06-15/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/loadbalancers.go b/services/network/mgmt/2015-06-15/network/loadbalancers.go index 200eeea9c480..ae7920631eb8 100644 --- a/services/network/mgmt/2015-06-15/network/loadbalancers.go +++ b/services/network/mgmt/2015-06-15/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/localnetworkgateways.go b/services/network/mgmt/2015-06-15/network/localnetworkgateways.go index 7806579d1bce..558282a24967 100644 --- a/services/network/mgmt/2015-06-15/network/localnetworkgateways.go +++ b/services/network/mgmt/2015-06-15/network/localnetworkgateways.go @@ -35,7 +35,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/networkapi/interfaces.go b/services/network/mgmt/2015-06-15/network/networkapi/interfaces.go index 4cbabd9f0c41..b17456253181 100644 --- a/services/network/mgmt/2015-06-15/network/networkapi/interfaces.go +++ b/services/network/mgmt/2015-06-15/network/networkapi/interfaces.go @@ -35,7 +35,9 @@ type ApplicationGatewaysClientAPI interface { 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) 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) 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) } @@ -48,6 +50,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -58,6 +61,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -68,10 +72,15 @@ type ExpressRouteCircuitsClientAPI interface { 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) 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) (result network.ExpressRouteCircuitsArpTableListResultPage, err error) + ListArpTableComplete(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsArpTableListResultIterator, err error) ListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsRoutesTableListResultPage, err error) + ListRoutesTableComplete(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsRoutesTableListResultIterator, err error) ListStats(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsStatsListResultPage, err error) + ListStatsComplete(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsStatsListResultIterator, err error) } var _ ExpressRouteCircuitsClientAPI = (*network.ExpressRouteCircuitsClient)(nil) @@ -79,6 +88,7 @@ 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) @@ -89,7 +99,9 @@ type LoadBalancersClientAPI interface { 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -101,9 +113,13 @@ type InterfacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result network.Interface, 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) 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -114,7 +130,9 @@ type SecurityGroupsClientAPI interface { 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -125,6 +143,7 @@ type SecurityRulesClientAPI interface { 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) @@ -135,7 +154,9 @@ type PublicIPAddressesClientAPI interface { 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) 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -146,7 +167,9 @@ type RouteTablesClientAPI interface { 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -157,6 +180,7 @@ type RoutesClientAPI interface { 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) @@ -164,6 +188,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -174,7 +199,9 @@ type VirtualNetworksClientAPI interface { 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) @@ -185,6 +212,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -196,6 +224,7 @@ type VirtualNetworkGatewaysClientAPI interface { Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VpnClientParameters) (result network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGateway, err error) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VirtualNetworkGateway) (result network.VirtualNetworkGatewaysResetFuture, err error) } @@ -208,6 +237,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, err error) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.ConnectionSharedKeyResult, err error) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayConnectionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayConnectionListResultIterator, 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) } @@ -220,6 +250,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) diff --git a/services/network/mgmt/2015-06-15/network/publicipaddresses.go b/services/network/mgmt/2015-06-15/network/publicipaddresses.go index 2eb805666a0a..d2395ae08855 100644 --- a/services/network/mgmt/2015-06-15/network/publicipaddresses.go +++ b/services/network/mgmt/2015-06-15/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/routes.go b/services/network/mgmt/2015-06-15/network/routes.go index d25923ad0244..f0ffc9ac50db 100644 --- a/services/network/mgmt/2015-06-15/network/routes.go +++ b/services/network/mgmt/2015-06-15/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/routetables.go b/services/network/mgmt/2015-06-15/network/routetables.go index e4dbd6bbe0f7..366188c5af8a 100644 --- a/services/network/mgmt/2015-06-15/network/routetables.go +++ b/services/network/mgmt/2015-06-15/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/securitygroups.go b/services/network/mgmt/2015-06-15/network/securitygroups.go index 3cd8cb5a0fe3..52ae201e8ad8 100644 --- a/services/network/mgmt/2015-06-15/network/securitygroups.go +++ b/services/network/mgmt/2015-06-15/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/securityrules.go b/services/network/mgmt/2015-06-15/network/securityrules.go index a220095940df..2bf171b978e6 100644 --- a/services/network/mgmt/2015-06-15/network/securityrules.go +++ b/services/network/mgmt/2015-06-15/network/securityrules.go @@ -36,7 +36,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/subnets.go b/services/network/mgmt/2015-06-15/network/subnets.go index c389547c9269..cd9c7ec7dc42 100644 --- a/services/network/mgmt/2015-06-15/network/subnets.go +++ b/services/network/mgmt/2015-06-15/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/usages.go b/services/network/mgmt/2015-06-15/network/usages.go index f3de0561d2ce..2d41f221f343 100644 --- a/services/network/mgmt/2015-06-15/network/usages.go +++ b/services/network/mgmt/2015-06-15/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go index 1c7f86a58e3c..ee76cd7d9f93 100644 --- a/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2015-06-15/network/virtualnetworkgatewayconnections.go @@ -36,7 +36,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go b/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go index 5498c9bf8ec8..cec51916c673 100644 --- a/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2015-06-15/network/virtualnetworkgateways.go @@ -35,7 +35,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2015-06-15/network/virtualnetworks.go b/services/network/mgmt/2015-06-15/network/virtualnetworks.go index b5e5b0206cfd..abaa2d5991a0 100644 --- a/services/network/mgmt/2015-06-15/network/virtualnetworks.go +++ b/services/network/mgmt/2015-06-15/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/applicationgateways.go b/services/network/mgmt/2016-03-30/network/applicationgateways.go index 0c8960247e4a..2019d9932038 100644 --- a/services/network/mgmt/2016-03-30/network/applicationgateways.go +++ b/services/network/mgmt/2016-03-30/network/applicationgateways.go @@ -35,7 +35,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/client.go b/services/network/mgmt/2016-03-30/network/client.go index cbeb68bd15e3..3bd5f0109a82 100644 --- a/services/network/mgmt/2016-03-30/network/client.go +++ b/services/network/mgmt/2016-03-30/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2016-03-30/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2016-03-30/network/expressroutecircuitauthorizations.go index 0c00467972a5..247ee8cfe14b 100644 --- a/services/network/mgmt/2016-03-30/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2016-03-30/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/expressroutecircuitpeerings.go b/services/network/mgmt/2016-03-30/network/expressroutecircuitpeerings.go index 23d6532f91c7..915149150b4c 100644 --- a/services/network/mgmt/2016-03-30/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2016-03-30/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/expressroutecircuits.go b/services/network/mgmt/2016-03-30/network/expressroutecircuits.go index 515778936d8e..d24d51e74e31 100644 --- a/services/network/mgmt/2016-03-30/network/expressroutecircuits.go +++ b/services/network/mgmt/2016-03-30/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/expressrouteserviceproviders.go b/services/network/mgmt/2016-03-30/network/expressrouteserviceproviders.go index 9bfd39887fa3..c1dee7ce98af 100644 --- a/services/network/mgmt/2016-03-30/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2016-03-30/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2016-03-30/network/interfacesgroup.go b/services/network/mgmt/2016-03-30/network/interfacesgroup.go index fcc2dcb7f57e..7fe2a44053aa 100644 --- a/services/network/mgmt/2016-03-30/network/interfacesgroup.go +++ b/services/network/mgmt/2016-03-30/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/loadbalancers.go b/services/network/mgmt/2016-03-30/network/loadbalancers.go index bd5d3359f9e5..24e20dce5e03 100644 --- a/services/network/mgmt/2016-03-30/network/loadbalancers.go +++ b/services/network/mgmt/2016-03-30/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/localnetworkgateways.go b/services/network/mgmt/2016-03-30/network/localnetworkgateways.go index ecbf1b94d035..1a5ac8f4ab02 100644 --- a/services/network/mgmt/2016-03-30/network/localnetworkgateways.go +++ b/services/network/mgmt/2016-03-30/network/localnetworkgateways.go @@ -35,7 +35,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/networkapi/interfaces.go b/services/network/mgmt/2016-03-30/network/networkapi/interfaces.go index 96deea32ff2a..7b04dbece523 100644 --- a/services/network/mgmt/2016-03-30/network/networkapi/interfaces.go +++ b/services/network/mgmt/2016-03-30/network/networkapi/interfaces.go @@ -35,7 +35,9 @@ type ApplicationGatewaysClientAPI interface { 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) 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) 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) } @@ -48,6 +50,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -58,6 +61,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -70,7 +74,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -81,6 +87,7 @@ 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) @@ -91,7 +98,9 @@ type LoadBalancersClientAPI interface { 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -102,6 +111,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) @@ -113,9 +123,13 @@ type InterfacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result network.Interface, 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) 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -126,7 +140,9 @@ type SecurityGroupsClientAPI interface { 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -137,7 +153,9 @@ type PublicIPAddressesClientAPI interface { 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) 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -148,7 +166,9 @@ type RouteTablesClientAPI interface { 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -159,6 +179,7 @@ type RoutesClientAPI interface { 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) @@ -169,6 +190,7 @@ type SecurityRulesClientAPI interface { 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) @@ -179,6 +201,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -197,6 +220,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, err error) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.ConnectionSharedKeyResult, err error) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayConnectionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayConnectionListResultIterator, 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) } @@ -210,6 +234,7 @@ type VirtualNetworkGatewaysClientAPI interface { Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VpnClientParameters) (result network.String, err error) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGateway, err error) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VirtualNetworkGateway) (result network.VirtualNetworkGatewaysResetFuture, err error) } @@ -221,7 +246,9 @@ type VirtualNetworksClientAPI interface { 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) diff --git a/services/network/mgmt/2016-03-30/network/publicipaddresses.go b/services/network/mgmt/2016-03-30/network/publicipaddresses.go index 2c997981fc17..0b70f027f5b4 100644 --- a/services/network/mgmt/2016-03-30/network/publicipaddresses.go +++ b/services/network/mgmt/2016-03-30/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/routes.go b/services/network/mgmt/2016-03-30/network/routes.go index 1db4a02131a1..ec395e33a749 100644 --- a/services/network/mgmt/2016-03-30/network/routes.go +++ b/services/network/mgmt/2016-03-30/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/routetables.go b/services/network/mgmt/2016-03-30/network/routetables.go index e6d59fe7d402..5de12e7dcc55 100644 --- a/services/network/mgmt/2016-03-30/network/routetables.go +++ b/services/network/mgmt/2016-03-30/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/securitygroups.go b/services/network/mgmt/2016-03-30/network/securitygroups.go index 335df8c401f7..defe2c50f5c8 100644 --- a/services/network/mgmt/2016-03-30/network/securitygroups.go +++ b/services/network/mgmt/2016-03-30/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/securityrules.go b/services/network/mgmt/2016-03-30/network/securityrules.go index 35252feedd70..1fe559d2eb64 100644 --- a/services/network/mgmt/2016-03-30/network/securityrules.go +++ b/services/network/mgmt/2016-03-30/network/securityrules.go @@ -36,7 +36,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/subnets.go b/services/network/mgmt/2016-03-30/network/subnets.go index 437acd8daf8c..e103bf966a18 100644 --- a/services/network/mgmt/2016-03-30/network/subnets.go +++ b/services/network/mgmt/2016-03-30/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/usages.go b/services/network/mgmt/2016-03-30/network/usages.go index 0d568ac3e2f2..31ac5d895bf0 100644 --- a/services/network/mgmt/2016-03-30/network/usages.go +++ b/services/network/mgmt/2016-03-30/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2016-03-30/network/virtualnetworkgatewayconnections.go index 1a94d019b6bf..1056a542f098 100644 --- a/services/network/mgmt/2016-03-30/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2016-03-30/network/virtualnetworkgatewayconnections.go @@ -36,7 +36,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/virtualnetworkgateways.go b/services/network/mgmt/2016-03-30/network/virtualnetworkgateways.go index 18080de9c8ff..4690d933a7db 100644 --- a/services/network/mgmt/2016-03-30/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2016-03-30/network/virtualnetworkgateways.go @@ -35,7 +35,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-03-30/network/virtualnetworks.go b/services/network/mgmt/2016-03-30/network/virtualnetworks.go index 8ce7c3418f85..b7dbe7929f7f 100644 --- a/services/network/mgmt/2016-03-30/network/virtualnetworks.go +++ b/services/network/mgmt/2016-03-30/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/applicationgateways.go b/services/network/mgmt/2016-06-01/network/applicationgateways.go index 880febe6e5f6..2dc7bfc35afd 100644 --- a/services/network/mgmt/2016-06-01/network/applicationgateways.go +++ b/services/network/mgmt/2016-06-01/network/applicationgateways.go @@ -35,7 +35,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/client.go b/services/network/mgmt/2016-06-01/network/client.go index cd409c6ef766..2682faeddf56 100644 --- a/services/network/mgmt/2016-06-01/network/client.go +++ b/services/network/mgmt/2016-06-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2016-06-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2016-06-01/network/expressroutecircuitauthorizations.go index 54eaf58c3d1a..e38f971bd940 100644 --- a/services/network/mgmt/2016-06-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2016-06-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2016-06-01/network/expressroutecircuitpeerings.go index 1c60737f55f9..da6c455d1075 100644 --- a/services/network/mgmt/2016-06-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2016-06-01/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/expressroutecircuits.go b/services/network/mgmt/2016-06-01/network/expressroutecircuits.go index 8e9c4d427a6a..3d8fca5f699a 100644 --- a/services/network/mgmt/2016-06-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2016-06-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2016-06-01/network/expressrouteserviceproviders.go index 2e9977710477..607584d9c1b0 100644 --- a/services/network/mgmt/2016-06-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2016-06-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2016-06-01/network/interfacesgroup.go b/services/network/mgmt/2016-06-01/network/interfacesgroup.go index f5ac80886957..6adb854fd3cb 100644 --- a/services/network/mgmt/2016-06-01/network/interfacesgroup.go +++ b/services/network/mgmt/2016-06-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/loadbalancers.go b/services/network/mgmt/2016-06-01/network/loadbalancers.go index bec55c6524a2..faf2b17b0e84 100644 --- a/services/network/mgmt/2016-06-01/network/loadbalancers.go +++ b/services/network/mgmt/2016-06-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/localnetworkgateways.go b/services/network/mgmt/2016-06-01/network/localnetworkgateways.go index ff47b7be4672..6320c3ca5804 100644 --- a/services/network/mgmt/2016-06-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2016-06-01/network/localnetworkgateways.go @@ -35,7 +35,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/networkapi/interfaces.go b/services/network/mgmt/2016-06-01/network/networkapi/interfaces.go index 393339b641fc..f38a9ef8ef6e 100644 --- a/services/network/mgmt/2016-06-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2016-06-01/network/networkapi/interfaces.go @@ -35,7 +35,9 @@ type ApplicationGatewaysClientAPI interface { 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) 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) 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) } @@ -48,6 +50,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -58,6 +61,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -70,7 +74,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -81,6 +87,7 @@ 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) @@ -91,7 +98,9 @@ type LoadBalancersClientAPI interface { 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -102,6 +111,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) @@ -114,10 +124,14 @@ type InterfacesClientAPI interface { GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesGetEffectiveRouteTableFuture, 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) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesListEffectiveNetworkSecurityGroupsFuture, 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -128,7 +142,9 @@ type SecurityGroupsClientAPI interface { 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -139,7 +155,9 @@ type PublicIPAddressesClientAPI interface { 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) 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -150,7 +168,9 @@ type RouteTablesClientAPI interface { 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -161,6 +181,7 @@ type RoutesClientAPI interface { 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) @@ -171,6 +192,7 @@ type SecurityRulesClientAPI interface { 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) @@ -181,6 +203,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -191,6 +214,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -198,6 +222,7 @@ var _ VirtualNetworkPeeringsClientAPI = (*network.VirtualNetworkPeeringsClient)( // 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) @@ -209,6 +234,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, err error) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.ConnectionSharedKeyResult, err error) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayConnectionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayConnectionListResultIterator, 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) } @@ -222,6 +248,7 @@ type VirtualNetworkGatewaysClientAPI interface { Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VpnClientParameters) (result network.String, err error) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGateway, err error) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VirtualNetworkGateway) (result network.VirtualNetworkGatewaysResetFuture, err error) } @@ -234,7 +261,9 @@ type VirtualNetworksClientAPI interface { 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) diff --git a/services/network/mgmt/2016-06-01/network/publicipaddresses.go b/services/network/mgmt/2016-06-01/network/publicipaddresses.go index 1a5a469856ba..419a8852e8c9 100644 --- a/services/network/mgmt/2016-06-01/network/publicipaddresses.go +++ b/services/network/mgmt/2016-06-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/routes.go b/services/network/mgmt/2016-06-01/network/routes.go index 77bad02408a9..f50c5841f02b 100644 --- a/services/network/mgmt/2016-06-01/network/routes.go +++ b/services/network/mgmt/2016-06-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/routetables.go b/services/network/mgmt/2016-06-01/network/routetables.go index 32de7f60a425..ef5ed3a4a251 100644 --- a/services/network/mgmt/2016-06-01/network/routetables.go +++ b/services/network/mgmt/2016-06-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/securitygroups.go b/services/network/mgmt/2016-06-01/network/securitygroups.go index 63371feb2b0e..bebcfcacb4e6 100644 --- a/services/network/mgmt/2016-06-01/network/securitygroups.go +++ b/services/network/mgmt/2016-06-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/securityrules.go b/services/network/mgmt/2016-06-01/network/securityrules.go index 328fbfae56b1..61b010b16c58 100644 --- a/services/network/mgmt/2016-06-01/network/securityrules.go +++ b/services/network/mgmt/2016-06-01/network/securityrules.go @@ -36,7 +36,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/subnets.go b/services/network/mgmt/2016-06-01/network/subnets.go index 7212fb6db4f2..c1201539aef0 100644 --- a/services/network/mgmt/2016-06-01/network/subnets.go +++ b/services/network/mgmt/2016-06-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/usages.go b/services/network/mgmt/2016-06-01/network/usages.go index 4ae91c6f5f70..1c0fcf6d262e 100644 --- a/services/network/mgmt/2016-06-01/network/usages.go +++ b/services/network/mgmt/2016-06-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2016-06-01/network/virtualnetworkgatewayconnections.go index 903e2858f00a..eba41bac18e4 100644 --- a/services/network/mgmt/2016-06-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2016-06-01/network/virtualnetworkgatewayconnections.go @@ -36,7 +36,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/virtualnetworkgateways.go b/services/network/mgmt/2016-06-01/network/virtualnetworkgateways.go index 679c1ed1dd76..7b9480a8faac 100644 --- a/services/network/mgmt/2016-06-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2016-06-01/network/virtualnetworkgateways.go @@ -35,7 +35,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2016-06-01/network/virtualnetworkpeerings.go index a6d998698f07..1365a24b34bd 100644 --- a/services/network/mgmt/2016-06-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2016-06-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-06-01/network/virtualnetworks.go b/services/network/mgmt/2016-06-01/network/virtualnetworks.go index 43251c3183c1..6a7fe3a14537 100644 --- a/services/network/mgmt/2016-06-01/network/virtualnetworks.go +++ b/services/network/mgmt/2016-06-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/applicationgateways.go b/services/network/mgmt/2016-09-01/network/applicationgateways.go index 768876c9ebf0..f82a16679360 100644 --- a/services/network/mgmt/2016-09-01/network/applicationgateways.go +++ b/services/network/mgmt/2016-09-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/client.go b/services/network/mgmt/2016-09-01/network/client.go index dddef1626a47..12f777faaa4c 100644 --- a/services/network/mgmt/2016-09-01/network/client.go +++ b/services/network/mgmt/2016-09-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2016-09-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2016-09-01/network/expressroutecircuitauthorizations.go index 74b8cae54d81..6a7e5c2bd671 100644 --- a/services/network/mgmt/2016-09-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2016-09-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2016-09-01/network/expressroutecircuitpeerings.go index abbb8b503aa1..14122d1c527e 100644 --- a/services/network/mgmt/2016-09-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2016-09-01/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/expressroutecircuits.go b/services/network/mgmt/2016-09-01/network/expressroutecircuits.go index 456470ebfce7..5a0a07ec4938 100644 --- a/services/network/mgmt/2016-09-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2016-09-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2016-09-01/network/expressrouteserviceproviders.go index 05e62fa64847..f2f866ad9ab1 100644 --- a/services/network/mgmt/2016-09-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2016-09-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2016-09-01/network/interfacesgroup.go b/services/network/mgmt/2016-09-01/network/interfacesgroup.go index 66c0aabdc59d..8f93605e2c04 100644 --- a/services/network/mgmt/2016-09-01/network/interfacesgroup.go +++ b/services/network/mgmt/2016-09-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/loadbalancers.go b/services/network/mgmt/2016-09-01/network/loadbalancers.go index 4cef506c2e61..f6acad237734 100644 --- a/services/network/mgmt/2016-09-01/network/loadbalancers.go +++ b/services/network/mgmt/2016-09-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/localnetworkgateways.go b/services/network/mgmt/2016-09-01/network/localnetworkgateways.go index 197c62f47791..cfd8bdb0ddef 100644 --- a/services/network/mgmt/2016-09-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2016-09-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/networkapi/interfaces.go b/services/network/mgmt/2016-09-01/network/networkapi/interfaces.go index 9a55f3083938..e99a74aa8e62 100644 --- a/services/network/mgmt/2016-09-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2016-09-01/network/networkapi/interfaces.go @@ -37,10 +37,14 @@ type InterfacesClientAPI interface { GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesGetEffectiveRouteTableFuture, 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) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesListEffectiveNetworkSecurityGroupsFuture, 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -52,7 +56,9 @@ type ApplicationGatewaysClientAPI interface { 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) 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) 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) } @@ -65,6 +71,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -75,6 +82,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -87,7 +95,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -98,6 +108,7 @@ 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) @@ -108,7 +119,9 @@ type LoadBalancersClientAPI interface { 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -119,7 +132,9 @@ type SecurityGroupsClientAPI interface { 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -130,6 +145,7 @@ type SecurityRulesClientAPI interface { 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) @@ -171,7 +187,9 @@ type PublicIPAddressesClientAPI interface { 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) 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -182,7 +200,9 @@ type RouteTablesClientAPI interface { 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -193,6 +213,7 @@ type RoutesClientAPI interface { 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) @@ -200,6 +221,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -211,7 +233,9 @@ type VirtualNetworksClientAPI interface { 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) @@ -222,6 +246,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -232,6 +257,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -246,6 +272,7 @@ type VirtualNetworkGatewaysClientAPI interface { 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) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (result network.VirtualNetworkGatewaysResetFuture, err error) } @@ -258,6 +285,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) } @@ -270,6 +298,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) diff --git a/services/network/mgmt/2016-09-01/network/packetcaptures.go b/services/network/mgmt/2016-09-01/network/packetcaptures.go index 9cda37c96298..0ec7e11b41da 100644 --- a/services/network/mgmt/2016-09-01/network/packetcaptures.go +++ b/services/network/mgmt/2016-09-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/publicipaddresses.go b/services/network/mgmt/2016-09-01/network/publicipaddresses.go index a1c40703b3ff..46d4850d17c0 100644 --- a/services/network/mgmt/2016-09-01/network/publicipaddresses.go +++ b/services/network/mgmt/2016-09-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/routes.go b/services/network/mgmt/2016-09-01/network/routes.go index 779cecaf2cde..4eb32e98e68a 100644 --- a/services/network/mgmt/2016-09-01/network/routes.go +++ b/services/network/mgmt/2016-09-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/routetables.go b/services/network/mgmt/2016-09-01/network/routetables.go index 72d87f47231b..9bd24ab97174 100644 --- a/services/network/mgmt/2016-09-01/network/routetables.go +++ b/services/network/mgmt/2016-09-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/securitygroups.go b/services/network/mgmt/2016-09-01/network/securitygroups.go index 6197b5604cd3..f3fdb978012f 100644 --- a/services/network/mgmt/2016-09-01/network/securitygroups.go +++ b/services/network/mgmt/2016-09-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/securityrules.go b/services/network/mgmt/2016-09-01/network/securityrules.go index 436694e2fadc..7fa30d3b6c94 100644 --- a/services/network/mgmt/2016-09-01/network/securityrules.go +++ b/services/network/mgmt/2016-09-01/network/securityrules.go @@ -36,7 +36,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/subnets.go b/services/network/mgmt/2016-09-01/network/subnets.go index 28b5764544c8..f13fc535369d 100644 --- a/services/network/mgmt/2016-09-01/network/subnets.go +++ b/services/network/mgmt/2016-09-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/usages.go b/services/network/mgmt/2016-09-01/network/usages.go index 401a49cfa800..eb71a0ffaf8f 100644 --- a/services/network/mgmt/2016-09-01/network/usages.go +++ b/services/network/mgmt/2016-09-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go index f8a727d961c2..8d26546a8ff9 100644 --- a/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/virtualnetworkgateways.go b/services/network/mgmt/2016-09-01/network/virtualnetworkgateways.go index c8d80ebbc57c..479d7211739f 100644 --- a/services/network/mgmt/2016-09-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2016-09-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2016-09-01/network/virtualnetworkpeerings.go index 6b0caabfd66e..aeaf30b86715 100644 --- a/services/network/mgmt/2016-09-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2016-09-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/virtualnetworks.go b/services/network/mgmt/2016-09-01/network/virtualnetworks.go index 039782ca6d8e..1fdc6a2a6873 100644 --- a/services/network/mgmt/2016-09-01/network/virtualnetworks.go +++ b/services/network/mgmt/2016-09-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2016-09-01/network/watchers.go b/services/network/mgmt/2016-09-01/network/watchers.go index 41486f0cae91..531d498d1326 100644 --- a/services/network/mgmt/2016-09-01/network/watchers.go +++ b/services/network/mgmt/2016-09-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/applicationgateways.go b/services/network/mgmt/2016-12-01/network/applicationgateways.go index fba678df0dcb..23e488b42d67 100644 --- a/services/network/mgmt/2016-12-01/network/applicationgateways.go +++ b/services/network/mgmt/2016-12-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/bgpservicecommunities.go b/services/network/mgmt/2016-12-01/network/bgpservicecommunities.go index a25681155f80..b7a364864954 100644 --- a/services/network/mgmt/2016-12-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2016-12-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/client.go b/services/network/mgmt/2016-12-01/network/client.go index 861f6fe9a4ac..fff5c4b95c19 100644 --- a/services/network/mgmt/2016-12-01/network/client.go +++ b/services/network/mgmt/2016-12-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2016-12-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2016-12-01/network/expressroutecircuitauthorizations.go index f39bde62ca8f..33a95aaa7801 100644 --- a/services/network/mgmt/2016-12-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2016-12-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2016-12-01/network/expressroutecircuitpeerings.go index fb355fcaa005..32833d15cca7 100644 --- a/services/network/mgmt/2016-12-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2016-12-01/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/expressroutecircuits.go b/services/network/mgmt/2016-12-01/network/expressroutecircuits.go index 08df09abca93..0c8c6a2f1cba 100644 --- a/services/network/mgmt/2016-12-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2016-12-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2016-12-01/network/expressrouteserviceproviders.go index b9325771cd04..d0d3c964c12a 100644 --- a/services/network/mgmt/2016-12-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2016-12-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2016-12-01/network/interfacesgroup.go b/services/network/mgmt/2016-12-01/network/interfacesgroup.go index f6719dc956f4..1e61ed0419b1 100644 --- a/services/network/mgmt/2016-12-01/network/interfacesgroup.go +++ b/services/network/mgmt/2016-12-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/loadbalancers.go b/services/network/mgmt/2016-12-01/network/loadbalancers.go index aaabf489a80f..ddb204779ee5 100644 --- a/services/network/mgmt/2016-12-01/network/loadbalancers.go +++ b/services/network/mgmt/2016-12-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/localnetworkgateways.go b/services/network/mgmt/2016-12-01/network/localnetworkgateways.go index 6aa663024f33..833875bfbdd0 100644 --- a/services/network/mgmt/2016-12-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2016-12-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/networkapi/interfaces.go b/services/network/mgmt/2016-12-01/network/networkapi/interfaces.go index d9434461b08e..8fd4faa7f265 100644 --- a/services/network/mgmt/2016-12-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2016-12-01/network/networkapi/interfaces.go @@ -37,10 +37,14 @@ type InterfacesClientAPI interface { GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesGetEffectiveRouteTableFuture, 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) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesListEffectiveNetworkSecurityGroupsFuture, 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -52,7 +56,9 @@ type ApplicationGatewaysClientAPI interface { 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) 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) 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) } @@ -65,6 +71,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -75,6 +82,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -87,7 +95,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -98,6 +108,7 @@ 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) @@ -108,7 +119,9 @@ type LoadBalancersClientAPI interface { 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -119,7 +132,9 @@ type SecurityGroupsClientAPI interface { 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -130,6 +145,7 @@ type SecurityRulesClientAPI interface { 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) @@ -171,7 +187,9 @@ type PublicIPAddressesClientAPI interface { 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) 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -182,7 +200,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -194,6 +214,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -205,7 +226,9 @@ type RouteTablesClientAPI interface { 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -216,6 +239,7 @@ type RoutesClientAPI interface { 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) @@ -223,6 +247,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -230,6 +255,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -241,7 +267,9 @@ type VirtualNetworksClientAPI interface { 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) @@ -252,6 +280,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -262,6 +291,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -276,6 +306,7 @@ type VirtualNetworkGatewaysClientAPI interface { 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) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (result network.VirtualNetworkGatewaysResetFuture, err error) } @@ -288,6 +319,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) } @@ -300,6 +332,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) diff --git a/services/network/mgmt/2016-12-01/network/packetcaptures.go b/services/network/mgmt/2016-12-01/network/packetcaptures.go index c6fa63b86cf7..4c8f77802ed6 100644 --- a/services/network/mgmt/2016-12-01/network/packetcaptures.go +++ b/services/network/mgmt/2016-12-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/publicipaddresses.go b/services/network/mgmt/2016-12-01/network/publicipaddresses.go index c75a4afc50ae..9025828fc413 100644 --- a/services/network/mgmt/2016-12-01/network/publicipaddresses.go +++ b/services/network/mgmt/2016-12-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/routefilterrules.go b/services/network/mgmt/2016-12-01/network/routefilterrules.go index fd9694202b95..9efcc96ba809 100644 --- a/services/network/mgmt/2016-12-01/network/routefilterrules.go +++ b/services/network/mgmt/2016-12-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/routefilters.go b/services/network/mgmt/2016-12-01/network/routefilters.go index f85a94769bd4..269d164277d9 100644 --- a/services/network/mgmt/2016-12-01/network/routefilters.go +++ b/services/network/mgmt/2016-12-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/routes.go b/services/network/mgmt/2016-12-01/network/routes.go index ca601a7f21f4..171e6e9a731f 100644 --- a/services/network/mgmt/2016-12-01/network/routes.go +++ b/services/network/mgmt/2016-12-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/routetables.go b/services/network/mgmt/2016-12-01/network/routetables.go index 0342d94ad8e4..ce12d60b0b9a 100644 --- a/services/network/mgmt/2016-12-01/network/routetables.go +++ b/services/network/mgmt/2016-12-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/securitygroups.go b/services/network/mgmt/2016-12-01/network/securitygroups.go index fc2a8c285244..4b244f61332c 100644 --- a/services/network/mgmt/2016-12-01/network/securitygroups.go +++ b/services/network/mgmt/2016-12-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/securityrules.go b/services/network/mgmt/2016-12-01/network/securityrules.go index 34c74df1369f..b1389de2f042 100644 --- a/services/network/mgmt/2016-12-01/network/securityrules.go +++ b/services/network/mgmt/2016-12-01/network/securityrules.go @@ -36,7 +36,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/subnets.go b/services/network/mgmt/2016-12-01/network/subnets.go index 0f577c1684f5..d8ced3cadeb6 100644 --- a/services/network/mgmt/2016-12-01/network/subnets.go +++ b/services/network/mgmt/2016-12-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/usages.go b/services/network/mgmt/2016-12-01/network/usages.go index 6241ab7048b1..411472f9430e 100644 --- a/services/network/mgmt/2016-12-01/network/usages.go +++ b/services/network/mgmt/2016-12-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go index 9386c13e440b..79bae5d8bd88 100644 --- a/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/virtualnetworkgateways.go b/services/network/mgmt/2016-12-01/network/virtualnetworkgateways.go index d84a2c831a70..4b8988783707 100644 --- a/services/network/mgmt/2016-12-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2016-12-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2016-12-01/network/virtualnetworkpeerings.go index 6506b279c619..377edf3bb52f 100644 --- a/services/network/mgmt/2016-12-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2016-12-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/virtualnetworks.go b/services/network/mgmt/2016-12-01/network/virtualnetworks.go index c5e0f97ff346..29551d095bba 100644 --- a/services/network/mgmt/2016-12-01/network/virtualnetworks.go +++ b/services/network/mgmt/2016-12-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2016-12-01/network/watchers.go b/services/network/mgmt/2016-12-01/network/watchers.go index db418cc802d7..64d7fb2cd9f7 100644 --- a/services/network/mgmt/2016-12-01/network/watchers.go +++ b/services/network/mgmt/2016-12-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/applicationgateways.go b/services/network/mgmt/2017-03-01/network/applicationgateways.go index 2d2ff801f258..e0a40e599fd7 100644 --- a/services/network/mgmt/2017-03-01/network/applicationgateways.go +++ b/services/network/mgmt/2017-03-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/bgpservicecommunities.go b/services/network/mgmt/2017-03-01/network/bgpservicecommunities.go index 9825336fe52e..a47444ab0442 100644 --- a/services/network/mgmt/2017-03-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2017-03-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/client.go b/services/network/mgmt/2017-03-01/network/client.go index 3eb4349e5384..3bc9ea00811a 100644 --- a/services/network/mgmt/2017-03-01/network/client.go +++ b/services/network/mgmt/2017-03-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2017-03-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2017-03-01/network/expressroutecircuitauthorizations.go index 84f76559ae4e..94cd720bc40a 100644 --- a/services/network/mgmt/2017-03-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2017-03-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2017-03-01/network/expressroutecircuitpeerings.go index 53b0b729cc09..17063263fd77 100644 --- a/services/network/mgmt/2017-03-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2017-03-01/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/expressroutecircuits.go b/services/network/mgmt/2017-03-01/network/expressroutecircuits.go index 9b2afd0aee6b..579e442f6bc2 100644 --- a/services/network/mgmt/2017-03-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2017-03-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2017-03-01/network/expressrouteserviceproviders.go index be12538fab74..a39ada9108dd 100644 --- a/services/network/mgmt/2017-03-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2017-03-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-03-01/network/interfacesgroup.go b/services/network/mgmt/2017-03-01/network/interfacesgroup.go index d874c4a297c4..ca30bd07bd85 100644 --- a/services/network/mgmt/2017-03-01/network/interfacesgroup.go +++ b/services/network/mgmt/2017-03-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/loadbalancers.go b/services/network/mgmt/2017-03-01/network/loadbalancers.go index e5b78fe06c6c..56d5380677a1 100644 --- a/services/network/mgmt/2017-03-01/network/loadbalancers.go +++ b/services/network/mgmt/2017-03-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/localnetworkgateways.go b/services/network/mgmt/2017-03-01/network/localnetworkgateways.go index 99897d4d74b1..8ab149420271 100644 --- a/services/network/mgmt/2017-03-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2017-03-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/networkapi/interfaces.go b/services/network/mgmt/2017-03-01/network/networkapi/interfaces.go index 7c210514952f..2a7d619094b4 100644 --- a/services/network/mgmt/2017-03-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2017-03-01/network/networkapi/interfaces.go @@ -36,7 +36,9 @@ type ApplicationGatewaysClientAPI interface { 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) 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) 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) @@ -50,6 +52,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -60,6 +63,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -72,7 +76,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -83,6 +89,7 @@ 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) @@ -93,7 +100,9 @@ type LoadBalancersClientAPI interface { 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -106,10 +115,14 @@ type InterfacesClientAPI interface { GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesGetEffectiveRouteTableFuture, 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) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesListEffectiveNetworkSecurityGroupsFuture, 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -120,7 +133,9 @@ type SecurityGroupsClientAPI interface { 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -131,6 +146,7 @@ type SecurityRulesClientAPI interface { 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) @@ -174,9 +190,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -187,7 +207,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -199,6 +221,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -210,7 +233,9 @@ type RouteTablesClientAPI interface { 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -221,6 +246,7 @@ type RoutesClientAPI interface { 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) @@ -228,6 +254,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -235,6 +262,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -246,8 +274,11 @@ type VirtualNetworksClientAPI interface { 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) @@ -258,6 +289,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -268,6 +300,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -282,6 +315,7 @@ type VirtualNetworkGatewaysClientAPI interface { 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) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (result network.VirtualNetworkGatewaysResetFuture, err error) } @@ -294,6 +328,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) } @@ -306,6 +341,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) diff --git a/services/network/mgmt/2017-03-01/network/packetcaptures.go b/services/network/mgmt/2017-03-01/network/packetcaptures.go index 8598ba3223fc..e762d2de46fe 100644 --- a/services/network/mgmt/2017-03-01/network/packetcaptures.go +++ b/services/network/mgmt/2017-03-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/publicipaddresses.go b/services/network/mgmt/2017-03-01/network/publicipaddresses.go index 3285c1502666..b6fe38700335 100644 --- a/services/network/mgmt/2017-03-01/network/publicipaddresses.go +++ b/services/network/mgmt/2017-03-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/routefilterrules.go b/services/network/mgmt/2017-03-01/network/routefilterrules.go index 486825e7a57c..62ad0c2c5edb 100644 --- a/services/network/mgmt/2017-03-01/network/routefilterrules.go +++ b/services/network/mgmt/2017-03-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/routefilters.go b/services/network/mgmt/2017-03-01/network/routefilters.go index c2c190e582b0..ccf2d872c63a 100644 --- a/services/network/mgmt/2017-03-01/network/routefilters.go +++ b/services/network/mgmt/2017-03-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/routes.go b/services/network/mgmt/2017-03-01/network/routes.go index 0f97e4da3ebe..d1b73860d5a2 100644 --- a/services/network/mgmt/2017-03-01/network/routes.go +++ b/services/network/mgmt/2017-03-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/routetables.go b/services/network/mgmt/2017-03-01/network/routetables.go index a96e7d0e83bb..0e0c3ac7b336 100644 --- a/services/network/mgmt/2017-03-01/network/routetables.go +++ b/services/network/mgmt/2017-03-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/securitygroups.go b/services/network/mgmt/2017-03-01/network/securitygroups.go index 28c5f6562d69..440380b1d835 100644 --- a/services/network/mgmt/2017-03-01/network/securitygroups.go +++ b/services/network/mgmt/2017-03-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/securityrules.go b/services/network/mgmt/2017-03-01/network/securityrules.go index fcbebdfab1cf..70f4c9eef97b 100644 --- a/services/network/mgmt/2017-03-01/network/securityrules.go +++ b/services/network/mgmt/2017-03-01/network/securityrules.go @@ -36,7 +36,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/subnets.go b/services/network/mgmt/2017-03-01/network/subnets.go index 5120115b6654..3db693e6bd5f 100644 --- a/services/network/mgmt/2017-03-01/network/subnets.go +++ b/services/network/mgmt/2017-03-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/usages.go b/services/network/mgmt/2017-03-01/network/usages.go index d9b0d87154d9..6baaf2feec33 100644 --- a/services/network/mgmt/2017-03-01/network/usages.go +++ b/services/network/mgmt/2017-03-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go index ed1e5b7299af..14954972dc0f 100644 --- a/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/virtualnetworkgateways.go b/services/network/mgmt/2017-03-01/network/virtualnetworkgateways.go index 38f0b4e3581c..575dcd3ec297 100644 --- a/services/network/mgmt/2017-03-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2017-03-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2017-03-01/network/virtualnetworkpeerings.go index 959e2d0b17a9..cbb6def6c48e 100644 --- a/services/network/mgmt/2017-03-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2017-03-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/virtualnetworks.go b/services/network/mgmt/2017-03-01/network/virtualnetworks.go index ea08de02dc5e..45efb60433e0 100644 --- a/services/network/mgmt/2017-03-01/network/virtualnetworks.go +++ b/services/network/mgmt/2017-03-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2017-03-01/network/watchers.go b/services/network/mgmt/2017-03-01/network/watchers.go index 9a1b0dc76ae0..0404919d51c4 100644 --- a/services/network/mgmt/2017-03-01/network/watchers.go +++ b/services/network/mgmt/2017-03-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/applicationgateways.go b/services/network/mgmt/2017-06-01/network/applicationgateways.go index 4424f4dbd323..f030d94aebca 100644 --- a/services/network/mgmt/2017-06-01/network/applicationgateways.go +++ b/services/network/mgmt/2017-06-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/availableendpointservices.go b/services/network/mgmt/2017-06-01/network/availableendpointservices.go index cdec2fe640a7..6e28fd2c6d93 100644 --- a/services/network/mgmt/2017-06-01/network/availableendpointservices.go +++ b/services/network/mgmt/2017-06-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/bgpservicecommunities.go b/services/network/mgmt/2017-06-01/network/bgpservicecommunities.go index 3107facd6578..1504eac490b6 100644 --- a/services/network/mgmt/2017-06-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2017-06-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/client.go b/services/network/mgmt/2017-06-01/network/client.go index 082ae5e12891..3802a098b6c9 100644 --- a/services/network/mgmt/2017-06-01/network/client.go +++ b/services/network/mgmt/2017-06-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2017-06-01/network/defaultsecurityrules.go b/services/network/mgmt/2017-06-01/network/defaultsecurityrules.go index 6489acbd9f98..8e30fc91d4ed 100644 --- a/services/network/mgmt/2017-06-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2017-06-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2017-06-01/network/expressroutecircuitauthorizations.go index d000a55aa739..df943cdb0dd4 100644 --- a/services/network/mgmt/2017-06-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2017-06-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2017-06-01/network/expressroutecircuitpeerings.go index 19ca16bb24b1..6147b1f0f8ff 100644 --- a/services/network/mgmt/2017-06-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2017-06-01/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/expressroutecircuits.go b/services/network/mgmt/2017-06-01/network/expressroutecircuits.go index e501a78808ff..144799ce0040 100644 --- a/services/network/mgmt/2017-06-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2017-06-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2017-06-01/network/expressrouteserviceproviders.go index 7cf6165a6ad1..255145d9aece 100644 --- a/services/network/mgmt/2017-06-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2017-06-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-06-01/network/inboundnatrules.go b/services/network/mgmt/2017-06-01/network/inboundnatrules.go index e49394d8aa3d..6da2a1ede966 100644 --- a/services/network/mgmt/2017-06-01/network/inboundnatrules.go +++ b/services/network/mgmt/2017-06-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/interfaceipconfigurations.go b/services/network/mgmt/2017-06-01/network/interfaceipconfigurations.go index d1909718981d..66acdd6da244 100644 --- a/services/network/mgmt/2017-06-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2017-06-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/interfaceloadbalancers.go b/services/network/mgmt/2017-06-01/network/interfaceloadbalancers.go index 2230c750bcbb..928df6496cd9 100644 --- a/services/network/mgmt/2017-06-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2017-06-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/interfacesgroup.go b/services/network/mgmt/2017-06-01/network/interfacesgroup.go index b67041c3fbbe..42fac5e104de 100644 --- a/services/network/mgmt/2017-06-01/network/interfacesgroup.go +++ b/services/network/mgmt/2017-06-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2017-06-01/network/loadbalancerbackendaddresspools.go index 030a94fc873c..e1ed6bc5161a 100644 --- a/services/network/mgmt/2017-06-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2017-06-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-06-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2017-06-01/network/loadbalancerfrontendipconfigurations.go index 4adb3b96ca13..07302d64be4e 100644 --- a/services/network/mgmt/2017-06-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2017-06-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2017-06-01/network/loadbalancerloadbalancingrules.go index 547014c29239..19f65cb8ae1a 100644 --- a/services/network/mgmt/2017-06-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2017-06-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-06-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2017-06-01/network/loadbalancernetworkinterfaces.go index 7fef622896d7..b8b6802db6fd 100644 --- a/services/network/mgmt/2017-06-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2017-06-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-06-01/network/loadbalancerprobes.go b/services/network/mgmt/2017-06-01/network/loadbalancerprobes.go index 8fa678b2b511..1d134e157117 100644 --- a/services/network/mgmt/2017-06-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2017-06-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/loadbalancers.go b/services/network/mgmt/2017-06-01/network/loadbalancers.go index 7ef63bc29f24..ef16401e01c0 100644 --- a/services/network/mgmt/2017-06-01/network/loadbalancers.go +++ b/services/network/mgmt/2017-06-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/localnetworkgateways.go b/services/network/mgmt/2017-06-01/network/localnetworkgateways.go index 3514e8f554cf..a7ea0a93dc19 100644 --- a/services/network/mgmt/2017-06-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2017-06-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/networkapi/interfaces.go b/services/network/mgmt/2017-06-01/network/networkapi/interfaces.go index 76ce6277b827..27d605436718 100644 --- a/services/network/mgmt/2017-06-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2017-06-01/network/networkapi/interfaces.go @@ -37,9 +37,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -50,6 +53,7 @@ var _ ApplicationGatewaysClientAPI = (*network.ApplicationGatewaysClient)(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) @@ -60,6 +64,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -70,6 +75,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -82,7 +88,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -93,6 +101,7 @@ 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) @@ -103,7 +112,9 @@ type LoadBalancersClientAPI interface { 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -112,6 +123,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -120,6 +132,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -130,6 +143,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -138,6 +152,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -145,6 +160,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -153,6 +169,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -165,10 +182,14 @@ type InterfacesClientAPI interface { GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesGetEffectiveRouteTableFuture, 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) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesListEffectiveNetworkSecurityGroupsFuture, 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -177,6 +198,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -184,6 +206,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -194,7 +217,9 @@ type SecurityGroupsClientAPI interface { 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -205,6 +230,7 @@ type SecurityRulesClientAPI interface { 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) @@ -213,6 +239,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -256,9 +283,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -269,7 +300,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -281,6 +314,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -292,7 +326,9 @@ type RouteTablesClientAPI interface { 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -303,6 +339,7 @@ type RoutesClientAPI interface { 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) @@ -310,6 +347,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -317,6 +355,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -328,8 +367,11 @@ type VirtualNetworksClientAPI interface { 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) @@ -340,6 +382,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -350,6 +393,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -365,7 +409,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) 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) } @@ -378,6 +424,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) } @@ -390,6 +437,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) diff --git a/services/network/mgmt/2017-06-01/network/packetcaptures.go b/services/network/mgmt/2017-06-01/network/packetcaptures.go index 4d582b6c2f33..29babec8016a 100644 --- a/services/network/mgmt/2017-06-01/network/packetcaptures.go +++ b/services/network/mgmt/2017-06-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/publicipaddresses.go b/services/network/mgmt/2017-06-01/network/publicipaddresses.go index a57dfca39a2d..978b63a9c43b 100644 --- a/services/network/mgmt/2017-06-01/network/publicipaddresses.go +++ b/services/network/mgmt/2017-06-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/routefilterrules.go b/services/network/mgmt/2017-06-01/network/routefilterrules.go index f41bfc508ade..d37e2d1d6754 100644 --- a/services/network/mgmt/2017-06-01/network/routefilterrules.go +++ b/services/network/mgmt/2017-06-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/routefilters.go b/services/network/mgmt/2017-06-01/network/routefilters.go index ea31de60fad1..b4bd22329f84 100644 --- a/services/network/mgmt/2017-06-01/network/routefilters.go +++ b/services/network/mgmt/2017-06-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/routes.go b/services/network/mgmt/2017-06-01/network/routes.go index 00d09de5aaba..1c82ac7f6583 100644 --- a/services/network/mgmt/2017-06-01/network/routes.go +++ b/services/network/mgmt/2017-06-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/routetables.go b/services/network/mgmt/2017-06-01/network/routetables.go index c22684f8743c..2ea16dc8dbe3 100644 --- a/services/network/mgmt/2017-06-01/network/routetables.go +++ b/services/network/mgmt/2017-06-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/securitygroups.go b/services/network/mgmt/2017-06-01/network/securitygroups.go index d127ce0dbef5..e6fd5b5ea3e1 100644 --- a/services/network/mgmt/2017-06-01/network/securitygroups.go +++ b/services/network/mgmt/2017-06-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/securityrules.go b/services/network/mgmt/2017-06-01/network/securityrules.go index 4d5d72333fcd..cc2a80cb5169 100644 --- a/services/network/mgmt/2017-06-01/network/securityrules.go +++ b/services/network/mgmt/2017-06-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/subnets.go b/services/network/mgmt/2017-06-01/network/subnets.go index 282563da9b88..0e07bfa5e6ad 100644 --- a/services/network/mgmt/2017-06-01/network/subnets.go +++ b/services/network/mgmt/2017-06-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/usages.go b/services/network/mgmt/2017-06-01/network/usages.go index 7511df963d18..8106f1a100db 100644 --- a/services/network/mgmt/2017-06-01/network/usages.go +++ b/services/network/mgmt/2017-06-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go index d8c1561cf377..3b4892ec37d3 100644 --- a/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/virtualnetworkgateways.go b/services/network/mgmt/2017-06-01/network/virtualnetworkgateways.go index ba7a459fc57d..a12e5f80b03d 100644 --- a/services/network/mgmt/2017-06-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2017-06-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2017-06-01/network/virtualnetworkpeerings.go index 07ce72a9c405..41b1fb6fe880 100644 --- a/services/network/mgmt/2017-06-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2017-06-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/virtualnetworks.go b/services/network/mgmt/2017-06-01/network/virtualnetworks.go index f81ea0d18bbd..9d8dfa88b4b1 100644 --- a/services/network/mgmt/2017-06-01/network/virtualnetworks.go +++ b/services/network/mgmt/2017-06-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2017-06-01/network/watchers.go b/services/network/mgmt/2017-06-01/network/watchers.go index bfcf0a150075..4c3a4e0c1ddb 100644 --- a/services/network/mgmt/2017-06-01/network/watchers.go +++ b/services/network/mgmt/2017-06-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/applicationgateways.go b/services/network/mgmt/2017-08-01/network/applicationgateways.go index 541fd8cd11cf..5aa6c0580337 100644 --- a/services/network/mgmt/2017-08-01/network/applicationgateways.go +++ b/services/network/mgmt/2017-08-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/availableendpointservices.go b/services/network/mgmt/2017-08-01/network/availableendpointservices.go index f9e45eebfa03..7a0be0d5ce25 100644 --- a/services/network/mgmt/2017-08-01/network/availableendpointservices.go +++ b/services/network/mgmt/2017-08-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/bgpservicecommunities.go b/services/network/mgmt/2017-08-01/network/bgpservicecommunities.go index 6db184a0307b..a013a753440b 100644 --- a/services/network/mgmt/2017-08-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2017-08-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/client.go b/services/network/mgmt/2017-08-01/network/client.go index c2bf0892b869..6928f9db1a70 100644 --- a/services/network/mgmt/2017-08-01/network/client.go +++ b/services/network/mgmt/2017-08-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2017-08-01/network/defaultsecurityrules.go b/services/network/mgmt/2017-08-01/network/defaultsecurityrules.go index 4011e842c8ef..13ca54002ca7 100644 --- a/services/network/mgmt/2017-08-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2017-08-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2017-08-01/network/expressroutecircuitauthorizations.go index 209d555eb38b..eca05f96ee0b 100644 --- a/services/network/mgmt/2017-08-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2017-08-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2017-08-01/network/expressroutecircuitpeerings.go index 6e66b53a8ace..27e8b6b7a3e5 100644 --- a/services/network/mgmt/2017-08-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2017-08-01/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/expressroutecircuits.go b/services/network/mgmt/2017-08-01/network/expressroutecircuits.go index 22da30bb14c5..820f0f0c40c3 100644 --- a/services/network/mgmt/2017-08-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2017-08-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2017-08-01/network/expressrouteserviceproviders.go index 09ae175335e2..c3635fba9f7b 100644 --- a/services/network/mgmt/2017-08-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2017-08-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-08-01/network/inboundnatrules.go b/services/network/mgmt/2017-08-01/network/inboundnatrules.go index 81e6844b57ec..2091f5c4dc1c 100644 --- a/services/network/mgmt/2017-08-01/network/inboundnatrules.go +++ b/services/network/mgmt/2017-08-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/interfaceipconfigurations.go b/services/network/mgmt/2017-08-01/network/interfaceipconfigurations.go index 5507f885219c..b6b9a02a22b7 100644 --- a/services/network/mgmt/2017-08-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2017-08-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/interfaceloadbalancers.go b/services/network/mgmt/2017-08-01/network/interfaceloadbalancers.go index 6704d33481b4..ff604e2a5369 100644 --- a/services/network/mgmt/2017-08-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2017-08-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/interfacesgroup.go b/services/network/mgmt/2017-08-01/network/interfacesgroup.go index 9328d7d17c23..302d5a000568 100644 --- a/services/network/mgmt/2017-08-01/network/interfacesgroup.go +++ b/services/network/mgmt/2017-08-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2017-08-01/network/loadbalancerbackendaddresspools.go index d5f6dce99e64..4b47a8f509cb 100644 --- a/services/network/mgmt/2017-08-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2017-08-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-08-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2017-08-01/network/loadbalancerfrontendipconfigurations.go index e2a706aba68e..9a00ea373064 100644 --- a/services/network/mgmt/2017-08-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2017-08-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2017-08-01/network/loadbalancerloadbalancingrules.go index 431073937a41..5cb96b9eece6 100644 --- a/services/network/mgmt/2017-08-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2017-08-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-08-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2017-08-01/network/loadbalancernetworkinterfaces.go index d9c9f3b71663..db818cbc4309 100644 --- a/services/network/mgmt/2017-08-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2017-08-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-08-01/network/loadbalancerprobes.go b/services/network/mgmt/2017-08-01/network/loadbalancerprobes.go index c1a7fd090b68..6b4ea0a46e7e 100644 --- a/services/network/mgmt/2017-08-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2017-08-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/loadbalancers.go b/services/network/mgmt/2017-08-01/network/loadbalancers.go index 5857047f5fc8..41b10f32e30d 100644 --- a/services/network/mgmt/2017-08-01/network/loadbalancers.go +++ b/services/network/mgmt/2017-08-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/localnetworkgateways.go b/services/network/mgmt/2017-08-01/network/localnetworkgateways.go index 6e99ab8aeb83..eb75fb714a25 100644 --- a/services/network/mgmt/2017-08-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2017-08-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/networkapi/interfaces.go b/services/network/mgmt/2017-08-01/network/networkapi/interfaces.go index 3cf3656f5747..0c1ac89361e3 100644 --- a/services/network/mgmt/2017-08-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2017-08-01/network/networkapi/interfaces.go @@ -37,9 +37,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -50,6 +53,7 @@ var _ ApplicationGatewaysClientAPI = (*network.ApplicationGatewaysClient)(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) @@ -60,6 +64,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -70,6 +75,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -82,7 +88,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -93,6 +101,7 @@ 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) @@ -103,7 +112,9 @@ type LoadBalancersClientAPI interface { 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -112,6 +123,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -120,6 +132,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -130,6 +143,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -138,6 +152,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -145,6 +160,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -153,6 +169,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -165,10 +182,14 @@ type InterfacesClientAPI interface { GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesGetEffectiveRouteTableFuture, 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) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.InterfacesListEffectiveNetworkSecurityGroupsFuture, 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -177,6 +198,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -184,6 +206,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -194,7 +217,9 @@ type SecurityGroupsClientAPI interface { 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -205,6 +230,7 @@ type SecurityRulesClientAPI interface { 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) @@ -213,6 +239,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -256,9 +283,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -269,7 +300,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -281,6 +314,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -292,7 +326,9 @@ type RouteTablesClientAPI interface { 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -303,6 +339,7 @@ type RoutesClientAPI interface { 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) @@ -310,6 +347,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -317,6 +355,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -328,8 +367,11 @@ type VirtualNetworksClientAPI interface { 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) @@ -340,6 +382,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -350,6 +393,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -366,7 +410,9 @@ type VirtualNetworkGatewaysClientAPI interface { GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetLearnedRoutesFuture, 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) } @@ -379,6 +425,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) } @@ -391,6 +438,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) diff --git a/services/network/mgmt/2017-08-01/network/packetcaptures.go b/services/network/mgmt/2017-08-01/network/packetcaptures.go index f3cd0dfabc85..42bf36a9991d 100644 --- a/services/network/mgmt/2017-08-01/network/packetcaptures.go +++ b/services/network/mgmt/2017-08-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/publicipaddresses.go b/services/network/mgmt/2017-08-01/network/publicipaddresses.go index ac67a0cf36d3..b9836b2c3a10 100644 --- a/services/network/mgmt/2017-08-01/network/publicipaddresses.go +++ b/services/network/mgmt/2017-08-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/routefilterrules.go b/services/network/mgmt/2017-08-01/network/routefilterrules.go index cefe959a38bf..d572e2d5c425 100644 --- a/services/network/mgmt/2017-08-01/network/routefilterrules.go +++ b/services/network/mgmt/2017-08-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/routefilters.go b/services/network/mgmt/2017-08-01/network/routefilters.go index 3dba4843cbf3..c400830f87ab 100644 --- a/services/network/mgmt/2017-08-01/network/routefilters.go +++ b/services/network/mgmt/2017-08-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/routes.go b/services/network/mgmt/2017-08-01/network/routes.go index be7aeb81b0fa..798866774544 100644 --- a/services/network/mgmt/2017-08-01/network/routes.go +++ b/services/network/mgmt/2017-08-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/routetables.go b/services/network/mgmt/2017-08-01/network/routetables.go index 47b5acc28dea..7331262b4751 100644 --- a/services/network/mgmt/2017-08-01/network/routetables.go +++ b/services/network/mgmt/2017-08-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/securitygroups.go b/services/network/mgmt/2017-08-01/network/securitygroups.go index d519dc4eed8a..338f3f219991 100644 --- a/services/network/mgmt/2017-08-01/network/securitygroups.go +++ b/services/network/mgmt/2017-08-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/securityrules.go b/services/network/mgmt/2017-08-01/network/securityrules.go index 1084981b3195..17ec77e9c3d4 100644 --- a/services/network/mgmt/2017-08-01/network/securityrules.go +++ b/services/network/mgmt/2017-08-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/subnets.go b/services/network/mgmt/2017-08-01/network/subnets.go index 5ac8c0a5b8b8..03900fcde1a4 100644 --- a/services/network/mgmt/2017-08-01/network/subnets.go +++ b/services/network/mgmt/2017-08-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/usages.go b/services/network/mgmt/2017-08-01/network/usages.go index f6e2704f5bba..d19f342862a4 100644 --- a/services/network/mgmt/2017-08-01/network/usages.go +++ b/services/network/mgmt/2017-08-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go index 8e9c91f3d1bd..d05626ec1ff4 100644 --- a/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/virtualnetworkgateways.go b/services/network/mgmt/2017-08-01/network/virtualnetworkgateways.go index 7ee10721768b..3a6574e93472 100644 --- a/services/network/mgmt/2017-08-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2017-08-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2017-08-01/network/virtualnetworkpeerings.go index ce74101760ec..3c86da3c3124 100644 --- a/services/network/mgmt/2017-08-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2017-08-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/virtualnetworks.go b/services/network/mgmt/2017-08-01/network/virtualnetworks.go index 0b51cf88f2f3..25f95f18e787 100644 --- a/services/network/mgmt/2017-08-01/network/virtualnetworks.go +++ b/services/network/mgmt/2017-08-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2017-08-01/network/watchers.go b/services/network/mgmt/2017-08-01/network/watchers.go index 5b9b55f85f43..d9dbd4256cf6 100644 --- a/services/network/mgmt/2017-08-01/network/watchers.go +++ b/services/network/mgmt/2017-08-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/applicationgateways.go b/services/network/mgmt/2017-09-01/network/applicationgateways.go index 7b9e935a7582..a3a7766fbab4 100644 --- a/services/network/mgmt/2017-09-01/network/applicationgateways.go +++ b/services/network/mgmt/2017-09-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/applicationsecuritygroups.go b/services/network/mgmt/2017-09-01/network/applicationsecuritygroups.go index 87589b2c35b5..8337afedfbd6 100644 --- a/services/network/mgmt/2017-09-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2017-09-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/availableendpointservices.go b/services/network/mgmt/2017-09-01/network/availableendpointservices.go index 748a21df63ae..5b8a01af1e75 100644 --- a/services/network/mgmt/2017-09-01/network/availableendpointservices.go +++ b/services/network/mgmt/2017-09-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/bgpservicecommunities.go b/services/network/mgmt/2017-09-01/network/bgpservicecommunities.go index db4cc2e1ab5e..2baeccd94eb3 100644 --- a/services/network/mgmt/2017-09-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2017-09-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/client.go b/services/network/mgmt/2017-09-01/network/client.go index dd1bb9b49887..77172c464165 100644 --- a/services/network/mgmt/2017-09-01/network/client.go +++ b/services/network/mgmt/2017-09-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2017-09-01/network/defaultsecurityrules.go b/services/network/mgmt/2017-09-01/network/defaultsecurityrules.go index 20f08835e1db..2b31b8884947 100644 --- a/services/network/mgmt/2017-09-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2017-09-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2017-09-01/network/expressroutecircuitauthorizations.go index 81d3391fe6b0..f5642b346812 100644 --- a/services/network/mgmt/2017-09-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2017-09-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2017-09-01/network/expressroutecircuitpeerings.go index c9f83fda469b..31c2dc97eb19 100644 --- a/services/network/mgmt/2017-09-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2017-09-01/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/expressroutecircuits.go b/services/network/mgmt/2017-09-01/network/expressroutecircuits.go index acf3b3fb2766..02ce2533e807 100644 --- a/services/network/mgmt/2017-09-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2017-09-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2017-09-01/network/expressrouteserviceproviders.go index d80d5bc79185..37f5f4a64f5e 100644 --- a/services/network/mgmt/2017-09-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2017-09-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-09-01/network/inboundnatrules.go b/services/network/mgmt/2017-09-01/network/inboundnatrules.go index 9fa3d809f43d..ea79f3a1b951 100644 --- a/services/network/mgmt/2017-09-01/network/inboundnatrules.go +++ b/services/network/mgmt/2017-09-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/interfaceipconfigurations.go b/services/network/mgmt/2017-09-01/network/interfaceipconfigurations.go index 9b3b6c388ed6..75b0fe03898f 100644 --- a/services/network/mgmt/2017-09-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2017-09-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/interfaceloadbalancers.go b/services/network/mgmt/2017-09-01/network/interfaceloadbalancers.go index 4b3248aa5615..e5caa906f556 100644 --- a/services/network/mgmt/2017-09-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2017-09-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/interfacesgroup.go b/services/network/mgmt/2017-09-01/network/interfacesgroup.go index d3613bdea64b..9334ff52903d 100644 --- a/services/network/mgmt/2017-09-01/network/interfacesgroup.go +++ b/services/network/mgmt/2017-09-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2017-09-01/network/loadbalancerbackendaddresspools.go index dad99bb9b76c..d622602e8c24 100644 --- a/services/network/mgmt/2017-09-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2017-09-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-09-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2017-09-01/network/loadbalancerfrontendipconfigurations.go index 01093140ca3f..df8a26daffb1 100644 --- a/services/network/mgmt/2017-09-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2017-09-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2017-09-01/network/loadbalancerloadbalancingrules.go index c046fa3450b4..03737f9291e8 100644 --- a/services/network/mgmt/2017-09-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2017-09-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-09-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2017-09-01/network/loadbalancernetworkinterfaces.go index 1ec6e44b2318..844b9881df49 100644 --- a/services/network/mgmt/2017-09-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2017-09-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-09-01/network/loadbalancerprobes.go b/services/network/mgmt/2017-09-01/network/loadbalancerprobes.go index e68426043bc2..8fb55dc92785 100644 --- a/services/network/mgmt/2017-09-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2017-09-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/loadbalancers.go b/services/network/mgmt/2017-09-01/network/loadbalancers.go index 0a1f805f53c2..47b6657b4425 100644 --- a/services/network/mgmt/2017-09-01/network/loadbalancers.go +++ b/services/network/mgmt/2017-09-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/localnetworkgateways.go b/services/network/mgmt/2017-09-01/network/localnetworkgateways.go index 028bf875e046..983c409f9a80 100644 --- a/services/network/mgmt/2017-09-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2017-09-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/networkapi/interfaces.go b/services/network/mgmt/2017-09-01/network/networkapi/interfaces.go index b3d0f474fd43..081581ce9286 100644 --- a/services/network/mgmt/2017-09-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2017-09-01/network/networkapi/interfaces.go @@ -37,9 +37,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -54,7 +57,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -62,6 +67,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -72,6 +78,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -82,6 +89,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -94,7 +102,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -106,6 +116,7 @@ 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) @@ -116,7 +127,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -126,6 +139,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -134,6 +148,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -144,6 +159,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -152,6 +168,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -159,6 +176,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -167,6 +185,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -180,11 +199,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -194,6 +218,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -201,6 +226,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -211,7 +237,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -223,6 +251,7 @@ type SecurityRulesClientAPI interface { 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) @@ -231,6 +260,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -273,6 +303,7 @@ var _ PacketCapturesClientAPI = (*network.PacketCapturesClient)(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) @@ -284,9 +315,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -298,7 +333,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -310,6 +347,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -321,7 +359,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -333,6 +373,7 @@ type RoutesClientAPI interface { 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) @@ -340,6 +381,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -347,6 +389,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -358,8 +401,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -371,6 +417,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -381,6 +428,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -397,7 +445,9 @@ type VirtualNetworkGatewaysClientAPI interface { GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetLearnedRoutesFuture, 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) 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) @@ -413,6 +463,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -426,6 +477,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } diff --git a/services/network/mgmt/2017-09-01/network/operations.go b/services/network/mgmt/2017-09-01/network/operations.go index 5b69a5082607..fc810f8827c7 100644 --- a/services/network/mgmt/2017-09-01/network/operations.go +++ b/services/network/mgmt/2017-09-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/packetcaptures.go b/services/network/mgmt/2017-09-01/network/packetcaptures.go index 6c334af100b3..9932fd0233b5 100644 --- a/services/network/mgmt/2017-09-01/network/packetcaptures.go +++ b/services/network/mgmt/2017-09-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/publicipaddresses.go b/services/network/mgmt/2017-09-01/network/publicipaddresses.go index a9684e69689e..9821079a7d9f 100644 --- a/services/network/mgmt/2017-09-01/network/publicipaddresses.go +++ b/services/network/mgmt/2017-09-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/routefilterrules.go b/services/network/mgmt/2017-09-01/network/routefilterrules.go index e3ee15d0302a..c91a87aad942 100644 --- a/services/network/mgmt/2017-09-01/network/routefilterrules.go +++ b/services/network/mgmt/2017-09-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/routefilters.go b/services/network/mgmt/2017-09-01/network/routefilters.go index 56d3684f3652..995232cc813b 100644 --- a/services/network/mgmt/2017-09-01/network/routefilters.go +++ b/services/network/mgmt/2017-09-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/routes.go b/services/network/mgmt/2017-09-01/network/routes.go index 6c269672cd6a..a7d4dc9681d7 100644 --- a/services/network/mgmt/2017-09-01/network/routes.go +++ b/services/network/mgmt/2017-09-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/routetables.go b/services/network/mgmt/2017-09-01/network/routetables.go index cbf45fbd3b2b..fbf4243cdb1e 100644 --- a/services/network/mgmt/2017-09-01/network/routetables.go +++ b/services/network/mgmt/2017-09-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/securitygroups.go b/services/network/mgmt/2017-09-01/network/securitygroups.go index 9e243986c1c4..2d34fb618576 100644 --- a/services/network/mgmt/2017-09-01/network/securitygroups.go +++ b/services/network/mgmt/2017-09-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/securityrules.go b/services/network/mgmt/2017-09-01/network/securityrules.go index ea1cf54927cf..faf3f9e75bb2 100644 --- a/services/network/mgmt/2017-09-01/network/securityrules.go +++ b/services/network/mgmt/2017-09-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/subnets.go b/services/network/mgmt/2017-09-01/network/subnets.go index cd83c1241961..1fdd85fcc3a8 100644 --- a/services/network/mgmt/2017-09-01/network/subnets.go +++ b/services/network/mgmt/2017-09-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/usages.go b/services/network/mgmt/2017-09-01/network/usages.go index b1862e8fc679..c6e78ba6ba6f 100644 --- a/services/network/mgmt/2017-09-01/network/usages.go +++ b/services/network/mgmt/2017-09-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go index 95f70354b9af..693bebe29010 100644 --- a/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/virtualnetworkgateways.go b/services/network/mgmt/2017-09-01/network/virtualnetworkgateways.go index 0f75fec9e244..feb3cbc328ce 100644 --- a/services/network/mgmt/2017-09-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2017-09-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2017-09-01/network/virtualnetworkpeerings.go index 6f1a45a006c1..5697f07dbf10 100644 --- a/services/network/mgmt/2017-09-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2017-09-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/virtualnetworks.go b/services/network/mgmt/2017-09-01/network/virtualnetworks.go index 384a5f59b329..714f23201eeb 100644 --- a/services/network/mgmt/2017-09-01/network/virtualnetworks.go +++ b/services/network/mgmt/2017-09-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2017-09-01/network/watchers.go b/services/network/mgmt/2017-09-01/network/watchers.go index 7a2ffecde003..23b039a45239 100644 --- a/services/network/mgmt/2017-09-01/network/watchers.go +++ b/services/network/mgmt/2017-09-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/applicationgateways.go b/services/network/mgmt/2017-10-01/network/applicationgateways.go index 4d2f51f000b5..314ce2c0f3b7 100644 --- a/services/network/mgmt/2017-10-01/network/applicationgateways.go +++ b/services/network/mgmt/2017-10-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go b/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go index 0dad204e0fc3..2931dd9bad6a 100644 --- a/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/availableendpointservices.go b/services/network/mgmt/2017-10-01/network/availableendpointservices.go index 39a81bffc866..a3eac80e8125 100644 --- a/services/network/mgmt/2017-10-01/network/availableendpointservices.go +++ b/services/network/mgmt/2017-10-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/bgpservicecommunities.go b/services/network/mgmt/2017-10-01/network/bgpservicecommunities.go index 37a7b7ba5750..add57ee450f1 100644 --- a/services/network/mgmt/2017-10-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2017-10-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/client.go b/services/network/mgmt/2017-10-01/network/client.go index ea006873b7d2..8cfa80e83703 100644 --- a/services/network/mgmt/2017-10-01/network/client.go +++ b/services/network/mgmt/2017-10-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2017-10-01/network/connectionmonitors.go b/services/network/mgmt/2017-10-01/network/connectionmonitors.go index 89366cde5711..3e7bdf7faa1d 100644 --- a/services/network/mgmt/2017-10-01/network/connectionmonitors.go +++ b/services/network/mgmt/2017-10-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/defaultsecurityrules.go b/services/network/mgmt/2017-10-01/network/defaultsecurityrules.go index 9b72cbaa6736..e81f717dad8e 100644 --- a/services/network/mgmt/2017-10-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2017-10-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go index 96623ecc8217..066e32fc6c49 100644 --- a/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go index 21468c98c1b4..2b55ef87460e 100644 --- a/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/expressroutecircuits.go b/services/network/mgmt/2017-10-01/network/expressroutecircuits.go index 986bb0da74d4..f0970930a500 100644 --- a/services/network/mgmt/2017-10-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2017-10-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2017-10-01/network/expressrouteserviceproviders.go index d91b18fe874a..cc0a8fbe512a 100644 --- a/services/network/mgmt/2017-10-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2017-10-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-10-01/network/inboundnatrules.go b/services/network/mgmt/2017-10-01/network/inboundnatrules.go index 41b70a26d73f..62d4866f9bef 100644 --- a/services/network/mgmt/2017-10-01/network/inboundnatrules.go +++ b/services/network/mgmt/2017-10-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/interfaceipconfigurations.go b/services/network/mgmt/2017-10-01/network/interfaceipconfigurations.go index 52ecb524f9d9..37c0f9c879f3 100644 --- a/services/network/mgmt/2017-10-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2017-10-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/interfaceloadbalancers.go b/services/network/mgmt/2017-10-01/network/interfaceloadbalancers.go index 9415b9bb9449..63c107aa2793 100644 --- a/services/network/mgmt/2017-10-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2017-10-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/interfacesgroup.go b/services/network/mgmt/2017-10-01/network/interfacesgroup.go index 12695e899ed6..607dd616550a 100644 --- a/services/network/mgmt/2017-10-01/network/interfacesgroup.go +++ b/services/network/mgmt/2017-10-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2017-10-01/network/loadbalancerbackendaddresspools.go index d5c162ea365b..e29ecd1c1a2d 100644 --- a/services/network/mgmt/2017-10-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2017-10-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-10-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2017-10-01/network/loadbalancerfrontendipconfigurations.go index dd4741f969bc..e3fbcdf03067 100644 --- a/services/network/mgmt/2017-10-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2017-10-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2017-10-01/network/loadbalancerloadbalancingrules.go index dc5cb68c0acb..865fd25b0ffe 100644 --- a/services/network/mgmt/2017-10-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2017-10-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-10-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2017-10-01/network/loadbalancernetworkinterfaces.go index f3c306d9ceae..ff4c8b5e7424 100644 --- a/services/network/mgmt/2017-10-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2017-10-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-10-01/network/loadbalancerprobes.go b/services/network/mgmt/2017-10-01/network/loadbalancerprobes.go index b7cd5552bd0c..dd175d5c2a91 100644 --- a/services/network/mgmt/2017-10-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2017-10-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/loadbalancers.go b/services/network/mgmt/2017-10-01/network/loadbalancers.go index 8256010ee632..7847390ed309 100644 --- a/services/network/mgmt/2017-10-01/network/loadbalancers.go +++ b/services/network/mgmt/2017-10-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/localnetworkgateways.go b/services/network/mgmt/2017-10-01/network/localnetworkgateways.go index 1ca2876bacb1..e8d1f344257f 100644 --- a/services/network/mgmt/2017-10-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2017-10-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/networkapi/interfaces.go b/services/network/mgmt/2017-10-01/network/networkapi/interfaces.go index a3aae9a8e44a..7ef36c132e5a 100644 --- a/services/network/mgmt/2017-10-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2017-10-01/network/networkapi/interfaces.go @@ -37,9 +37,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -54,7 +57,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -62,6 +67,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -72,6 +78,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -82,6 +89,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -94,7 +102,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -106,6 +116,7 @@ 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) @@ -116,7 +127,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -126,6 +139,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -134,6 +148,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -144,6 +159,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -152,6 +168,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -159,6 +176,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -167,6 +185,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -180,11 +199,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -194,6 +218,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -201,6 +226,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -211,7 +237,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -223,6 +251,7 @@ type SecurityRulesClientAPI interface { 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) @@ -231,6 +260,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -286,6 +316,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -297,9 +328,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -311,7 +346,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -323,6 +360,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -334,7 +372,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -346,6 +386,7 @@ type RoutesClientAPI interface { 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) @@ -353,6 +394,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -360,6 +402,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -371,8 +414,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -384,6 +430,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -394,6 +441,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -410,7 +458,9 @@ type VirtualNetworkGatewaysClientAPI interface { GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetLearnedRoutesFuture, 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) 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) @@ -426,6 +476,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -439,6 +490,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } diff --git a/services/network/mgmt/2017-10-01/network/operations.go b/services/network/mgmt/2017-10-01/network/operations.go index 4afa0040be15..d3b4b07e7a18 100644 --- a/services/network/mgmt/2017-10-01/network/operations.go +++ b/services/network/mgmt/2017-10-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/packetcaptures.go b/services/network/mgmt/2017-10-01/network/packetcaptures.go index e6233b654852..f91e2e79a12c 100644 --- a/services/network/mgmt/2017-10-01/network/packetcaptures.go +++ b/services/network/mgmt/2017-10-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/publicipaddresses.go b/services/network/mgmt/2017-10-01/network/publicipaddresses.go index 534fd875bff0..83d5ff0c0fd6 100644 --- a/services/network/mgmt/2017-10-01/network/publicipaddresses.go +++ b/services/network/mgmt/2017-10-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/routefilterrules.go b/services/network/mgmt/2017-10-01/network/routefilterrules.go index 93cc950bcc26..583c9a375e24 100644 --- a/services/network/mgmt/2017-10-01/network/routefilterrules.go +++ b/services/network/mgmt/2017-10-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/routefilters.go b/services/network/mgmt/2017-10-01/network/routefilters.go index 1d7122f99c0c..1b726faf75a8 100644 --- a/services/network/mgmt/2017-10-01/network/routefilters.go +++ b/services/network/mgmt/2017-10-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/routes.go b/services/network/mgmt/2017-10-01/network/routes.go index 87be44288dee..9b4ca9ef6f3f 100644 --- a/services/network/mgmt/2017-10-01/network/routes.go +++ b/services/network/mgmt/2017-10-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/routetables.go b/services/network/mgmt/2017-10-01/network/routetables.go index 15a01db0be4d..7358df50ff51 100644 --- a/services/network/mgmt/2017-10-01/network/routetables.go +++ b/services/network/mgmt/2017-10-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/securitygroups.go b/services/network/mgmt/2017-10-01/network/securitygroups.go index 5d12bba77248..1ab232020ce3 100644 --- a/services/network/mgmt/2017-10-01/network/securitygroups.go +++ b/services/network/mgmt/2017-10-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/securityrules.go b/services/network/mgmt/2017-10-01/network/securityrules.go index 7bf985761e41..1c5186dd5fa2 100644 --- a/services/network/mgmt/2017-10-01/network/securityrules.go +++ b/services/network/mgmt/2017-10-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/subnets.go b/services/network/mgmt/2017-10-01/network/subnets.go index 6212b4f0b499..9a95d23d7420 100644 --- a/services/network/mgmt/2017-10-01/network/subnets.go +++ b/services/network/mgmt/2017-10-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/usages.go b/services/network/mgmt/2017-10-01/network/usages.go index 767ec87ed652..aa776d18a00f 100644 --- a/services/network/mgmt/2017-10-01/network/usages.go +++ b/services/network/mgmt/2017-10-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go index c2dca71876aa..6437be821659 100644 --- a/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go b/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go index a2794971a9ab..46e5b9adce80 100644 --- a/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go index 809c3ea41418..2e8c69a68b20 100644 --- a/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/virtualnetworks.go b/services/network/mgmt/2017-10-01/network/virtualnetworks.go index 325d48e5223b..001bc2c1bd89 100644 --- a/services/network/mgmt/2017-10-01/network/virtualnetworks.go +++ b/services/network/mgmt/2017-10-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2017-10-01/network/watchers.go b/services/network/mgmt/2017-10-01/network/watchers.go index 26bb91f8302c..0018ef22aae3 100644 --- a/services/network/mgmt/2017-10-01/network/watchers.go +++ b/services/network/mgmt/2017-10-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/applicationgateways.go b/services/network/mgmt/2017-11-01/network/applicationgateways.go index cb33df920008..17d73c23922f 100644 --- a/services/network/mgmt/2017-11-01/network/applicationgateways.go +++ b/services/network/mgmt/2017-11-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/applicationsecuritygroups.go b/services/network/mgmt/2017-11-01/network/applicationsecuritygroups.go index d2688be50932..f709a51d5117 100644 --- a/services/network/mgmt/2017-11-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2017-11-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/availableendpointservices.go b/services/network/mgmt/2017-11-01/network/availableendpointservices.go index a5c6d8ab192f..308413336580 100644 --- a/services/network/mgmt/2017-11-01/network/availableendpointservices.go +++ b/services/network/mgmt/2017-11-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/bgpservicecommunities.go b/services/network/mgmt/2017-11-01/network/bgpservicecommunities.go index 0567397ee3b6..19ead5e62775 100644 --- a/services/network/mgmt/2017-11-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2017-11-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/client.go b/services/network/mgmt/2017-11-01/network/client.go index ff793466d96a..3a783a3abbc6 100644 --- a/services/network/mgmt/2017-11-01/network/client.go +++ b/services/network/mgmt/2017-11-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2017-11-01/network/connectionmonitors.go b/services/network/mgmt/2017-11-01/network/connectionmonitors.go index 8f7c12bb744f..b8339395bef9 100644 --- a/services/network/mgmt/2017-11-01/network/connectionmonitors.go +++ b/services/network/mgmt/2017-11-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/defaultsecurityrules.go b/services/network/mgmt/2017-11-01/network/defaultsecurityrules.go index 243e4b38914b..149cf7d8f80a 100644 --- a/services/network/mgmt/2017-11-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2017-11-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2017-11-01/network/expressroutecircuitauthorizations.go index d7d5ab56e2fb..162b54842a8c 100644 --- a/services/network/mgmt/2017-11-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2017-11-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go index 2107b772e0b4..d8febcab6a35 100644 --- a/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/expressroutecircuits.go b/services/network/mgmt/2017-11-01/network/expressroutecircuits.go index d429eecabd3e..008786f91acc 100644 --- a/services/network/mgmt/2017-11-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2017-11-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2017-11-01/network/expressrouteserviceproviders.go index e6004515c534..4e427160e1e3 100644 --- a/services/network/mgmt/2017-11-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2017-11-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-11-01/network/inboundnatrules.go b/services/network/mgmt/2017-11-01/network/inboundnatrules.go index b5916434a1f9..9624bc72cb48 100644 --- a/services/network/mgmt/2017-11-01/network/inboundnatrules.go +++ b/services/network/mgmt/2017-11-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/interfaceipconfigurations.go b/services/network/mgmt/2017-11-01/network/interfaceipconfigurations.go index d24f0ccd09ba..c3ea7bf17551 100644 --- a/services/network/mgmt/2017-11-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2017-11-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/interfaceloadbalancers.go b/services/network/mgmt/2017-11-01/network/interfaceloadbalancers.go index d18780648baa..e2bd2cc51be0 100644 --- a/services/network/mgmt/2017-11-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2017-11-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/interfacesgroup.go b/services/network/mgmt/2017-11-01/network/interfacesgroup.go index 30f6b856b82d..f5c7d74555e0 100644 --- a/services/network/mgmt/2017-11-01/network/interfacesgroup.go +++ b/services/network/mgmt/2017-11-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2017-11-01/network/loadbalancerbackendaddresspools.go index 7613036e23e6..e195f6e73005 100644 --- a/services/network/mgmt/2017-11-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2017-11-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-11-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2017-11-01/network/loadbalancerfrontendipconfigurations.go index 02fd8469b45a..76ba129edff8 100644 --- a/services/network/mgmt/2017-11-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2017-11-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2017-11-01/network/loadbalancerloadbalancingrules.go index c801c0c7b0fc..2f3af12d4791 100644 --- a/services/network/mgmt/2017-11-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2017-11-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-11-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2017-11-01/network/loadbalancernetworkinterfaces.go index 00c501b9240e..fbab6536376a 100644 --- a/services/network/mgmt/2017-11-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2017-11-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2017-11-01/network/loadbalancerprobes.go b/services/network/mgmt/2017-11-01/network/loadbalancerprobes.go index 6053b819bcc3..a1761557ea31 100644 --- a/services/network/mgmt/2017-11-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2017-11-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/loadbalancers.go b/services/network/mgmt/2017-11-01/network/loadbalancers.go index c52671dc5e8e..91f49c61a694 100644 --- a/services/network/mgmt/2017-11-01/network/loadbalancers.go +++ b/services/network/mgmt/2017-11-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/localnetworkgateways.go b/services/network/mgmt/2017-11-01/network/localnetworkgateways.go index 37b8848b2f57..a19b1fee91bc 100644 --- a/services/network/mgmt/2017-11-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2017-11-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/networkapi/interfaces.go b/services/network/mgmt/2017-11-01/network/networkapi/interfaces.go index a00203cd5a34..fe88bd88e4fc 100644 --- a/services/network/mgmt/2017-11-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2017-11-01/network/networkapi/interfaces.go @@ -37,9 +37,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -54,7 +57,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -62,6 +67,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -72,6 +78,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -82,6 +89,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -94,7 +102,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -106,6 +116,7 @@ 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) @@ -116,7 +127,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -126,6 +139,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -134,6 +148,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -144,6 +159,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -152,6 +168,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -159,6 +176,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -167,6 +185,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -180,11 +199,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -194,6 +218,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -201,6 +226,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -211,7 +237,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -223,6 +251,7 @@ type SecurityRulesClientAPI interface { 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) @@ -231,6 +260,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -286,6 +316,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -297,9 +328,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -311,7 +346,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -323,6 +360,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -334,7 +372,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -346,6 +386,7 @@ type RoutesClientAPI interface { 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) @@ -353,6 +394,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -360,6 +402,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -371,8 +414,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -384,6 +430,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -394,6 +441,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -410,7 +458,9 @@ type VirtualNetworkGatewaysClientAPI interface { GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetLearnedRoutesFuture, 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) 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) @@ -426,6 +476,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -439,6 +490,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } diff --git a/services/network/mgmt/2017-11-01/network/operations.go b/services/network/mgmt/2017-11-01/network/operations.go index 22f9a269efd2..1848e140c249 100644 --- a/services/network/mgmt/2017-11-01/network/operations.go +++ b/services/network/mgmt/2017-11-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/packetcaptures.go b/services/network/mgmt/2017-11-01/network/packetcaptures.go index affe3a5b446a..f9ae3385d67d 100644 --- a/services/network/mgmt/2017-11-01/network/packetcaptures.go +++ b/services/network/mgmt/2017-11-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/publicipaddresses.go b/services/network/mgmt/2017-11-01/network/publicipaddresses.go index 46c1ad084155..fe14199c1709 100644 --- a/services/network/mgmt/2017-11-01/network/publicipaddresses.go +++ b/services/network/mgmt/2017-11-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/routefilterrules.go b/services/network/mgmt/2017-11-01/network/routefilterrules.go index 1b9d558e0672..474c284fb94a 100644 --- a/services/network/mgmt/2017-11-01/network/routefilterrules.go +++ b/services/network/mgmt/2017-11-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/routefilters.go b/services/network/mgmt/2017-11-01/network/routefilters.go index b7cfd9dc24ff..094160ac185b 100644 --- a/services/network/mgmt/2017-11-01/network/routefilters.go +++ b/services/network/mgmt/2017-11-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/routes.go b/services/network/mgmt/2017-11-01/network/routes.go index 458f4df76981..265286f34aba 100644 --- a/services/network/mgmt/2017-11-01/network/routes.go +++ b/services/network/mgmt/2017-11-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/routetables.go b/services/network/mgmt/2017-11-01/network/routetables.go index e373eb94a7a3..6653b7b30848 100644 --- a/services/network/mgmt/2017-11-01/network/routetables.go +++ b/services/network/mgmt/2017-11-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/securitygroups.go b/services/network/mgmt/2017-11-01/network/securitygroups.go index cd759b7c7897..89036994f20f 100644 --- a/services/network/mgmt/2017-11-01/network/securitygroups.go +++ b/services/network/mgmt/2017-11-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/securityrules.go b/services/network/mgmt/2017-11-01/network/securityrules.go index ccff10c5fe4d..c32551b6b302 100644 --- a/services/network/mgmt/2017-11-01/network/securityrules.go +++ b/services/network/mgmt/2017-11-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/subnets.go b/services/network/mgmt/2017-11-01/network/subnets.go index 173ae6635d3c..0dc3ce0134af 100644 --- a/services/network/mgmt/2017-11-01/network/subnets.go +++ b/services/network/mgmt/2017-11-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/usages.go b/services/network/mgmt/2017-11-01/network/usages.go index 51ad5134ea94..73a86975ff85 100644 --- a/services/network/mgmt/2017-11-01/network/usages.go +++ b/services/network/mgmt/2017-11-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go index be4edb083753..8c24555d7952 100644 --- a/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/virtualnetworkgateways.go b/services/network/mgmt/2017-11-01/network/virtualnetworkgateways.go index 1d4c86205ea3..8718e8ec5407 100644 --- a/services/network/mgmt/2017-11-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2017-11-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2017-11-01/network/virtualnetworkpeerings.go index 07fac587edad..3e9135f7cebb 100644 --- a/services/network/mgmt/2017-11-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2017-11-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/virtualnetworks.go b/services/network/mgmt/2017-11-01/network/virtualnetworks.go index 280bded3a6a8..6516d1c81454 100644 --- a/services/network/mgmt/2017-11-01/network/virtualnetworks.go +++ b/services/network/mgmt/2017-11-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2017-11-01/network/watchers.go b/services/network/mgmt/2017-11-01/network/watchers.go index 0d57545fb854..283a3f3c556c 100644 --- a/services/network/mgmt/2017-11-01/network/watchers.go +++ b/services/network/mgmt/2017-11-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/applicationgateways.go b/services/network/mgmt/2018-01-01/network/applicationgateways.go index 422ceea7d0de..cf9df288d5c4 100644 --- a/services/network/mgmt/2018-01-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-01-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-01-01/network/applicationsecuritygroups.go index 7c11792555a9..019a105f742a 100644 --- a/services/network/mgmt/2018-01-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-01-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/availableendpointservices.go b/services/network/mgmt/2018-01-01/network/availableendpointservices.go index ad549c364275..1a2d9bd609fe 100644 --- a/services/network/mgmt/2018-01-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-01-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-01-01/network/bgpservicecommunities.go index 65648cf79e08..0d6a8cbb51c9 100644 --- a/services/network/mgmt/2018-01-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-01-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/client.go b/services/network/mgmt/2018-01-01/network/client.go index f7d7582b7648..7cdb3bd6fc52 100644 --- a/services/network/mgmt/2018-01-01/network/client.go +++ b/services/network/mgmt/2018-01-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-01-01/network/connectionmonitors.go b/services/network/mgmt/2018-01-01/network/connectionmonitors.go index a7723d1fb555..f5c93cc6977d 100644 --- a/services/network/mgmt/2018-01-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-01-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-01-01/network/defaultsecurityrules.go index 96b6b1dac2cf..75f138f23f01 100644 --- a/services/network/mgmt/2018-01-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-01-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-01-01/network/expressroutecircuitauthorizations.go index cc29e42b5904..bd2141d98f60 100644 --- a/services/network/mgmt/2018-01-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-01-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go index 714fdefd933c..49f2511053c0 100644 --- a/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/expressroutecircuits.go b/services/network/mgmt/2018-01-01/network/expressroutecircuits.go index 0bbe32c034c7..35dba23f7442 100644 --- a/services/network/mgmt/2018-01-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-01-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-01-01/network/expressrouteserviceproviders.go index 6b45407f7401..e791c431b9cb 100644 --- a/services/network/mgmt/2018-01-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-01-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-01-01/network/inboundnatrules.go b/services/network/mgmt/2018-01-01/network/inboundnatrules.go index 377093f1ed82..d607318358a1 100644 --- a/services/network/mgmt/2018-01-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-01-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-01-01/network/interfaceipconfigurations.go index 26277ed4a8d3..f4b25b050da5 100644 --- a/services/network/mgmt/2018-01-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-01-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-01-01/network/interfaceloadbalancers.go index 253f73dcdb62..d66a449ba65b 100644 --- a/services/network/mgmt/2018-01-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-01-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/interfacesgroup.go b/services/network/mgmt/2018-01-01/network/interfacesgroup.go index 5950562ba21a..b9ca8bf69d12 100644 --- a/services/network/mgmt/2018-01-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-01-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-01-01/network/loadbalancerbackendaddresspools.go index 5c322d4ad2cf..644f785a70b7 100644 --- a/services/network/mgmt/2018-01-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-01-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-01-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-01-01/network/loadbalancerfrontendipconfigurations.go index 5c6899992f4c..6b6762770045 100644 --- a/services/network/mgmt/2018-01-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-01-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-01-01/network/loadbalancerloadbalancingrules.go index 6b27f9cc7eae..2d2e9b8d04d2 100644 --- a/services/network/mgmt/2018-01-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-01-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-01-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-01-01/network/loadbalancernetworkinterfaces.go index 2354f0e9f4b0..0ca966cc4ace 100644 --- a/services/network/mgmt/2018-01-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-01-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-01-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-01-01/network/loadbalancerprobes.go index f5f4deeb0d42..28c3b8b64425 100644 --- a/services/network/mgmt/2018-01-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-01-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/loadbalancers.go b/services/network/mgmt/2018-01-01/network/loadbalancers.go index 2f1aff7dfade..84122eb2814f 100644 --- a/services/network/mgmt/2018-01-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-01-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/localnetworkgateways.go b/services/network/mgmt/2018-01-01/network/localnetworkgateways.go index fcf6ef4186f9..65f77e85fabe 100644 --- a/services/network/mgmt/2018-01-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-01-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-01-01/network/networkapi/interfaces.go index a982c09d3b4b..a108eefa6979 100644 --- a/services/network/mgmt/2018-01-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-01-01/network/networkapi/interfaces.go @@ -37,9 +37,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -54,7 +57,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -62,6 +67,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -72,6 +78,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -82,6 +89,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -94,7 +102,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -106,6 +116,7 @@ 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) @@ -116,7 +127,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -126,6 +139,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -134,6 +148,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -144,6 +159,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -152,6 +168,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -159,6 +176,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -167,6 +185,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -180,11 +199,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -194,6 +218,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -201,6 +226,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -211,7 +237,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -223,6 +251,7 @@ type SecurityRulesClientAPI interface { 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) @@ -231,6 +260,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -286,6 +316,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -297,9 +328,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -311,7 +346,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -323,6 +360,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -334,7 +372,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -346,6 +386,7 @@ type RoutesClientAPI interface { 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) @@ -353,6 +394,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -360,6 +402,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -371,8 +414,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -384,6 +430,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -394,6 +441,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -410,7 +458,9 @@ type VirtualNetworkGatewaysClientAPI interface { GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysGetLearnedRoutesFuture, 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) 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) @@ -426,6 +476,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -439,6 +490,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } diff --git a/services/network/mgmt/2018-01-01/network/operations.go b/services/network/mgmt/2018-01-01/network/operations.go index 7302594cea0f..47332bad5f53 100644 --- a/services/network/mgmt/2018-01-01/network/operations.go +++ b/services/network/mgmt/2018-01-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/packetcaptures.go b/services/network/mgmt/2018-01-01/network/packetcaptures.go index 05b3abbff1c2..baace5f1eff8 100644 --- a/services/network/mgmt/2018-01-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-01-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/publicipaddresses.go b/services/network/mgmt/2018-01-01/network/publicipaddresses.go index 04296c6b74a4..fab9b4d6f6d0 100644 --- a/services/network/mgmt/2018-01-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-01-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/routefilterrules.go b/services/network/mgmt/2018-01-01/network/routefilterrules.go index aa5764a6c55a..01d45b6a973b 100644 --- a/services/network/mgmt/2018-01-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-01-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/routefilters.go b/services/network/mgmt/2018-01-01/network/routefilters.go index 888f5ea3253d..6987ed282a4d 100644 --- a/services/network/mgmt/2018-01-01/network/routefilters.go +++ b/services/network/mgmt/2018-01-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/routes.go b/services/network/mgmt/2018-01-01/network/routes.go index 7cb863a72e05..35886ef992ba 100644 --- a/services/network/mgmt/2018-01-01/network/routes.go +++ b/services/network/mgmt/2018-01-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/routetables.go b/services/network/mgmt/2018-01-01/network/routetables.go index ebf202d9a2c6..34282d649039 100644 --- a/services/network/mgmt/2018-01-01/network/routetables.go +++ b/services/network/mgmt/2018-01-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/securitygroups.go b/services/network/mgmt/2018-01-01/network/securitygroups.go index c8fc788a3eb2..2e6a7f12e47c 100644 --- a/services/network/mgmt/2018-01-01/network/securitygroups.go +++ b/services/network/mgmt/2018-01-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/securityrules.go b/services/network/mgmt/2018-01-01/network/securityrules.go index c734220d34fe..089a1c59858f 100644 --- a/services/network/mgmt/2018-01-01/network/securityrules.go +++ b/services/network/mgmt/2018-01-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/subnets.go b/services/network/mgmt/2018-01-01/network/subnets.go index bfd1c72361e8..72399ff856bd 100644 --- a/services/network/mgmt/2018-01-01/network/subnets.go +++ b/services/network/mgmt/2018-01-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/usages.go b/services/network/mgmt/2018-01-01/network/usages.go index 412e68cd98dc..0775694d029c 100644 --- a/services/network/mgmt/2018-01-01/network/usages.go +++ b/services/network/mgmt/2018-01-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go index 5334eb2ef6ea..be6ddae84e71 100644 --- a/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-01-01/network/virtualnetworkgateways.go index ba4042c2ef71..6fcb47727c35 100644 --- a/services/network/mgmt/2018-01-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-01-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-01-01/network/virtualnetworkpeerings.go index aa94f2dddac9..bea4f5ffdc74 100644 --- a/services/network/mgmt/2018-01-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-01-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/virtualnetworks.go b/services/network/mgmt/2018-01-01/network/virtualnetworks.go index 64771a33612b..5afa0b956fde 100644 --- a/services/network/mgmt/2018-01-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-01-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-01-01/network/watchers.go b/services/network/mgmt/2018-01-01/network/watchers.go index cabe5b1e45f9..7b2860e3546c 100644 --- a/services/network/mgmt/2018-01-01/network/watchers.go +++ b/services/network/mgmt/2018-01-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/applicationgateways.go b/services/network/mgmt/2018-02-01/network/applicationgateways.go index c50993c75f63..bfba1249958d 100644 --- a/services/network/mgmt/2018-02-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-02-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-02-01/network/applicationsecuritygroups.go index e8b4e36ebbcd..613d963130c6 100644 --- a/services/network/mgmt/2018-02-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-02-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/availableendpointservices.go b/services/network/mgmt/2018-02-01/network/availableendpointservices.go index b3092e15bfa1..20dc7f1c9bd8 100644 --- a/services/network/mgmt/2018-02-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-02-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-02-01/network/bgpservicecommunities.go index 63f90f685d18..15987c828fc9 100644 --- a/services/network/mgmt/2018-02-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-02-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/client.go b/services/network/mgmt/2018-02-01/network/client.go index 9c40e6f3a292..b75bf4159e5a 100644 --- a/services/network/mgmt/2018-02-01/network/client.go +++ b/services/network/mgmt/2018-02-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-02-01/network/connectionmonitors.go b/services/network/mgmt/2018-02-01/network/connectionmonitors.go index 23f63ce8f6fa..fe29040c7494 100644 --- a/services/network/mgmt/2018-02-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-02-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/ddosprotectionplans.go b/services/network/mgmt/2018-02-01/network/ddosprotectionplans.go index 447ad55add87..05ace4f8935d 100644 --- a/services/network/mgmt/2018-02-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2018-02-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-02-01/network/defaultsecurityrules.go index 0fa6334ca976..c8ed34c9511b 100644 --- a/services/network/mgmt/2018-02-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-02-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-02-01/network/expressroutecircuitauthorizations.go index 83e698447f14..3c6fdff42505 100644 --- a/services/network/mgmt/2018-02-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-02-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2018-02-01/network/expressroutecircuitconnections.go index 9a712a70fe29..43586d97b8ed 100644 --- a/services/network/mgmt/2018-02-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2018-02-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go index 5cf6c455f676..948e73e608bc 100644 --- a/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/expressroutecircuits.go b/services/network/mgmt/2018-02-01/network/expressroutecircuits.go index 64b784f12858..f66def710546 100644 --- a/services/network/mgmt/2018-02-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-02-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go index f365d5cb6298..224c1500c867 100644 --- a/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/expressroutecrossconnections.go b/services/network/mgmt/2018-02-01/network/expressroutecrossconnections.go index 0a8648c11160..a7fb07b4b263 100644 --- a/services/network/mgmt/2018-02-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2018-02-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-02-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-02-01/network/expressrouteserviceproviders.go index afe191f06f7f..b123a97424da 100644 --- a/services/network/mgmt/2018-02-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-02-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-02-01/network/inboundnatrules.go b/services/network/mgmt/2018-02-01/network/inboundnatrules.go index 0f3998f39e0f..7ffb55a6eded 100644 --- a/services/network/mgmt/2018-02-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-02-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-02-01/network/interfaceipconfigurations.go index 97bc36c4cb33..9cd413ad31c7 100644 --- a/services/network/mgmt/2018-02-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-02-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-02-01/network/interfaceloadbalancers.go index 578bb167bf9d..9e3c442eeb8b 100644 --- a/services/network/mgmt/2018-02-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-02-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/interfacesgroup.go b/services/network/mgmt/2018-02-01/network/interfacesgroup.go index 7238b0b193f1..aa19fee1db98 100644 --- a/services/network/mgmt/2018-02-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-02-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-02-01/network/loadbalancerbackendaddresspools.go index 042c127e1b7f..0e27ad28b455 100644 --- a/services/network/mgmt/2018-02-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-02-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-02-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-02-01/network/loadbalancerfrontendipconfigurations.go index 59ae89990ab8..25fde7b83538 100644 --- a/services/network/mgmt/2018-02-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-02-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-02-01/network/loadbalancerloadbalancingrules.go index 944ce4fab750..0fe818928f8e 100644 --- a/services/network/mgmt/2018-02-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-02-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-02-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-02-01/network/loadbalancernetworkinterfaces.go index fa8fce05b0e7..0df0f308d564 100644 --- a/services/network/mgmt/2018-02-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-02-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-02-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-02-01/network/loadbalancerprobes.go index b743324d2752..797367b6f0b3 100644 --- a/services/network/mgmt/2018-02-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-02-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/loadbalancers.go b/services/network/mgmt/2018-02-01/network/loadbalancers.go index 5d9f1bf788c2..e60bdbd6d32a 100644 --- a/services/network/mgmt/2018-02-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-02-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/localnetworkgateways.go b/services/network/mgmt/2018-02-01/network/localnetworkgateways.go index 5498c045ad3f..9d58cd1b3875 100644 --- a/services/network/mgmt/2018-02-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-02-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-02-01/network/networkapi/interfaces.go index 9d36b05c507b..b1ebd378cfe3 100644 --- a/services/network/mgmt/2018-02-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-02-01/network/networkapi/interfaces.go @@ -37,9 +37,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -54,7 +57,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -65,7 +70,9 @@ type DdosProtectionPlansClientAPI interface { 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) } var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(nil) @@ -73,6 +80,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -83,6 +91,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -93,6 +102,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -114,7 +124,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -126,6 +138,7 @@ 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) @@ -135,8 +148,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -150,6 +165,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -160,7 +176,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -170,6 +188,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -178,6 +197,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -188,6 +208,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -196,6 +217,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -203,6 +225,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -211,6 +234,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -224,11 +248,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -238,6 +267,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -245,6 +275,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -255,7 +286,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -267,6 +300,7 @@ type SecurityRulesClientAPI interface { 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) @@ -275,6 +309,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -330,6 +365,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -341,9 +377,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -355,7 +395,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -367,6 +409,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -378,7 +421,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -390,6 +435,7 @@ type RoutesClientAPI interface { 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) @@ -397,6 +443,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -404,6 +451,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -415,8 +463,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -428,6 +479,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -438,6 +490,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -455,7 +508,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) SetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams network.VpnClientIPsecParameters) (result network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) SupportedVpnDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.String, err error) @@ -472,6 +527,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -485,6 +541,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } diff --git a/services/network/mgmt/2018-02-01/network/operations.go b/services/network/mgmt/2018-02-01/network/operations.go index 2007955f60ac..8991bc8c2cca 100644 --- a/services/network/mgmt/2018-02-01/network/operations.go +++ b/services/network/mgmt/2018-02-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/packetcaptures.go b/services/network/mgmt/2018-02-01/network/packetcaptures.go index 2eb7e81b67e0..162cbf66b7a0 100644 --- a/services/network/mgmt/2018-02-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-02-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/publicipaddresses.go b/services/network/mgmt/2018-02-01/network/publicipaddresses.go index 8c15d690ea31..f46d51903b43 100644 --- a/services/network/mgmt/2018-02-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-02-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/routefilterrules.go b/services/network/mgmt/2018-02-01/network/routefilterrules.go index 50fa5315ca38..c0ab1b814d8a 100644 --- a/services/network/mgmt/2018-02-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-02-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/routefilters.go b/services/network/mgmt/2018-02-01/network/routefilters.go index 209fd4f7336c..6c37aa5e583e 100644 --- a/services/network/mgmt/2018-02-01/network/routefilters.go +++ b/services/network/mgmt/2018-02-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/routes.go b/services/network/mgmt/2018-02-01/network/routes.go index d7b5f8119c18..273f5f7fb3c4 100644 --- a/services/network/mgmt/2018-02-01/network/routes.go +++ b/services/network/mgmt/2018-02-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/routetables.go b/services/network/mgmt/2018-02-01/network/routetables.go index 15786339aac7..c97e7b164d2f 100644 --- a/services/network/mgmt/2018-02-01/network/routetables.go +++ b/services/network/mgmt/2018-02-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/securitygroups.go b/services/network/mgmt/2018-02-01/network/securitygroups.go index a733652b9190..0276f97a59e8 100644 --- a/services/network/mgmt/2018-02-01/network/securitygroups.go +++ b/services/network/mgmt/2018-02-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/securityrules.go b/services/network/mgmt/2018-02-01/network/securityrules.go index a13bf3afcf93..1128fd836d82 100644 --- a/services/network/mgmt/2018-02-01/network/securityrules.go +++ b/services/network/mgmt/2018-02-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/subnets.go b/services/network/mgmt/2018-02-01/network/subnets.go index 99e406c1dff3..259d3a3e8bff 100644 --- a/services/network/mgmt/2018-02-01/network/subnets.go +++ b/services/network/mgmt/2018-02-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/usages.go b/services/network/mgmt/2018-02-01/network/usages.go index bb7c68e0bcf0..a5cc4a726ebd 100644 --- a/services/network/mgmt/2018-02-01/network/usages.go +++ b/services/network/mgmt/2018-02-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go index 29e8c93b680c..0e300bc4c6a0 100644 --- a/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-02-01/network/virtualnetworkgateways.go index 976de82f431c..e46b5497a93f 100644 --- a/services/network/mgmt/2018-02-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-02-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-02-01/network/virtualnetworkpeerings.go index 4327a8eafaa4..ea5b835b5211 100644 --- a/services/network/mgmt/2018-02-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-02-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/virtualnetworks.go b/services/network/mgmt/2018-02-01/network/virtualnetworks.go index 96277cc11bc5..0458008478aa 100644 --- a/services/network/mgmt/2018-02-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-02-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-02-01/network/watchers.go b/services/network/mgmt/2018-02-01/network/watchers.go index 725b4260ac9a..c78cc86b8e74 100644 --- a/services/network/mgmt/2018-02-01/network/watchers.go +++ b/services/network/mgmt/2018-02-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/applicationgateways.go b/services/network/mgmt/2018-04-01/network/applicationgateways.go index 5cbd1635e143..365166938990 100644 --- a/services/network/mgmt/2018-04-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-04-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-04-01/network/applicationsecuritygroups.go index 654cb8962d84..257dc033b722 100644 --- a/services/network/mgmt/2018-04-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-04-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/availableendpointservices.go b/services/network/mgmt/2018-04-01/network/availableendpointservices.go index 348b32be40cf..f9a7eb61b80b 100644 --- a/services/network/mgmt/2018-04-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-04-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/azurefirewalls.go b/services/network/mgmt/2018-04-01/network/azurefirewalls.go index e039ec8e5a44..9006dd2d7a7e 100644 --- a/services/network/mgmt/2018-04-01/network/azurefirewalls.go +++ b/services/network/mgmt/2018-04-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-04-01/network/bgpservicecommunities.go index 70be1906d193..e8e3ca007fd5 100644 --- a/services/network/mgmt/2018-04-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-04-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/client.go b/services/network/mgmt/2018-04-01/network/client.go index 91a587a748e2..254d6f87ce38 100644 --- a/services/network/mgmt/2018-04-01/network/client.go +++ b/services/network/mgmt/2018-04-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-04-01/network/connectionmonitors.go b/services/network/mgmt/2018-04-01/network/connectionmonitors.go index 8c5c04fec12a..c5dbc3632b97 100644 --- a/services/network/mgmt/2018-04-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-04-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/ddosprotectionplans.go b/services/network/mgmt/2018-04-01/network/ddosprotectionplans.go index f19e739a0052..6da53c5ffbac 100644 --- a/services/network/mgmt/2018-04-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2018-04-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-04-01/network/defaultsecurityrules.go index 52601e0d365b..588a3488af86 100644 --- a/services/network/mgmt/2018-04-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-04-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-04-01/network/expressroutecircuitauthorizations.go index 85a5ca671cef..65e282df94f6 100644 --- a/services/network/mgmt/2018-04-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-04-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2018-04-01/network/expressroutecircuitconnections.go index 7c4431b2b539..1870d7330b23 100644 --- a/services/network/mgmt/2018-04-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2018-04-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go index fa8e2db18e6b..a2b20069b311 100644 --- a/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/expressroutecircuits.go b/services/network/mgmt/2018-04-01/network/expressroutecircuits.go index 3cb9514168c8..5f5bd72b7207 100644 --- a/services/network/mgmt/2018-04-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-04-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go index effc23c9ded7..cd86fb8046fe 100644 --- a/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/expressroutecrossconnections.go b/services/network/mgmt/2018-04-01/network/expressroutecrossconnections.go index dff52bf18459..6b9f51f94f87 100644 --- a/services/network/mgmt/2018-04-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2018-04-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-04-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-04-01/network/expressrouteserviceproviders.go index 80a4c2c34da8..0491c459bf47 100644 --- a/services/network/mgmt/2018-04-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-04-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-04-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2018-04-01/network/hubvirtualnetworkconnections.go index e089cf295008..6437c02e52e6 100644 --- a/services/network/mgmt/2018-04-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2018-04-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-04-01/network/inboundnatrules.go b/services/network/mgmt/2018-04-01/network/inboundnatrules.go index 26afb9253d9e..49f634495f03 100644 --- a/services/network/mgmt/2018-04-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-04-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-04-01/network/interfaceipconfigurations.go index cf227aa5ddcf..c63904a7d253 100644 --- a/services/network/mgmt/2018-04-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-04-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-04-01/network/interfaceloadbalancers.go index 614b9ea28ee5..c35125e9b29d 100644 --- a/services/network/mgmt/2018-04-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-04-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/interfacesgroup.go b/services/network/mgmt/2018-04-01/network/interfacesgroup.go index ee17f43968c2..7fdc9b968c6c 100644 --- a/services/network/mgmt/2018-04-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-04-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-04-01/network/loadbalancerbackendaddresspools.go index 67147ba94eaa..70161695a0bf 100644 --- a/services/network/mgmt/2018-04-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-04-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-04-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-04-01/network/loadbalancerfrontendipconfigurations.go index 79352cf276e6..5ae929fdb0ef 100644 --- a/services/network/mgmt/2018-04-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-04-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-04-01/network/loadbalancerloadbalancingrules.go index 28c0da0b1887..af84bd5198d4 100644 --- a/services/network/mgmt/2018-04-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-04-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-04-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-04-01/network/loadbalancernetworkinterfaces.go index dfced463daea..15a874841ce8 100644 --- a/services/network/mgmt/2018-04-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-04-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-04-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-04-01/network/loadbalancerprobes.go index 9aa378d17d8f..a28b63a4815a 100644 --- a/services/network/mgmt/2018-04-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-04-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/loadbalancers.go b/services/network/mgmt/2018-04-01/network/loadbalancers.go index c0573eaf28b2..a624564d4b35 100644 --- a/services/network/mgmt/2018-04-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-04-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/localnetworkgateways.go b/services/network/mgmt/2018-04-01/network/localnetworkgateways.go index 23ff1573e29d..ed4c3ba37984 100644 --- a/services/network/mgmt/2018-04-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-04-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-04-01/network/networkapi/interfaces.go index dff64c6084fd..312ab8b6ddff 100644 --- a/services/network/mgmt/2018-04-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-04-01/network/networkapi/interfaces.go @@ -35,7 +35,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -48,9 +50,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -65,7 +70,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -76,7 +83,9 @@ type DdosProtectionPlansClientAPI interface { 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) } var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(nil) @@ -84,6 +93,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -94,6 +104,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -104,6 +115,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -125,7 +137,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -137,6 +151,7 @@ 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) @@ -146,8 +161,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -161,6 +178,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -171,7 +189,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -181,6 +201,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -189,6 +210,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -199,6 +221,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -207,6 +230,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -214,6 +238,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -222,6 +247,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -235,11 +261,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -249,6 +280,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -256,6 +288,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -266,7 +299,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -278,6 +313,7 @@ type SecurityRulesClientAPI interface { 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) @@ -286,6 +322,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -341,6 +378,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -352,9 +390,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -366,7 +408,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -378,6 +422,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -389,7 +434,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -401,6 +448,7 @@ type RoutesClientAPI interface { 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) @@ -408,6 +456,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -415,6 +464,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -426,8 +476,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -439,6 +492,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -449,6 +503,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -466,7 +521,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) SetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams network.VpnClientIPsecParameters) (result network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) SupportedVpnDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.String, err error) @@ -483,6 +540,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -496,6 +554,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -507,7 +566,9 @@ type VirtualWANsClientAPI interface { 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.VirtualWANsUpdateTagsFuture, err error) } @@ -519,7 +580,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -538,7 +601,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -548,6 +613,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -558,7 +624,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -570,6 +638,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) diff --git a/services/network/mgmt/2018-04-01/network/operations.go b/services/network/mgmt/2018-04-01/network/operations.go index 1d3d35bb8d70..129eea876242 100644 --- a/services/network/mgmt/2018-04-01/network/operations.go +++ b/services/network/mgmt/2018-04-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/packetcaptures.go b/services/network/mgmt/2018-04-01/network/packetcaptures.go index 0ef3bf852bfc..db1545ceb179 100644 --- a/services/network/mgmt/2018-04-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-04-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/publicipaddresses.go b/services/network/mgmt/2018-04-01/network/publicipaddresses.go index bbf3a5df7712..3f6acdb96248 100644 --- a/services/network/mgmt/2018-04-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-04-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/routefilterrules.go b/services/network/mgmt/2018-04-01/network/routefilterrules.go index 795d2e8eff22..e5e2703c3c71 100644 --- a/services/network/mgmt/2018-04-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-04-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/routefilters.go b/services/network/mgmt/2018-04-01/network/routefilters.go index b71b5be14cf7..5264d9465132 100644 --- a/services/network/mgmt/2018-04-01/network/routefilters.go +++ b/services/network/mgmt/2018-04-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/routes.go b/services/network/mgmt/2018-04-01/network/routes.go index 603f82f628f1..9df26e695be2 100644 --- a/services/network/mgmt/2018-04-01/network/routes.go +++ b/services/network/mgmt/2018-04-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/routetables.go b/services/network/mgmt/2018-04-01/network/routetables.go index f6f022f7aafb..de2752825d29 100644 --- a/services/network/mgmt/2018-04-01/network/routetables.go +++ b/services/network/mgmt/2018-04-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/securitygroups.go b/services/network/mgmt/2018-04-01/network/securitygroups.go index f5d1af707baf..9f6e4970cf6a 100644 --- a/services/network/mgmt/2018-04-01/network/securitygroups.go +++ b/services/network/mgmt/2018-04-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/securityrules.go b/services/network/mgmt/2018-04-01/network/securityrules.go index 13e6819406ef..f461289abe58 100644 --- a/services/network/mgmt/2018-04-01/network/securityrules.go +++ b/services/network/mgmt/2018-04-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/subnets.go b/services/network/mgmt/2018-04-01/network/subnets.go index b7aa1731fa19..081da55fc5ef 100644 --- a/services/network/mgmt/2018-04-01/network/subnets.go +++ b/services/network/mgmt/2018-04-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/usages.go b/services/network/mgmt/2018-04-01/network/usages.go index cdf47f32f3f2..ca8f424cb804 100644 --- a/services/network/mgmt/2018-04-01/network/usages.go +++ b/services/network/mgmt/2018-04-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/virtualhubs.go b/services/network/mgmt/2018-04-01/network/virtualhubs.go index e56ef0f5d20c..adf51a899c1d 100644 --- a/services/network/mgmt/2018-04-01/network/virtualhubs.go +++ b/services/network/mgmt/2018-04-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go index 8629c287d094..1f5e41fd2f5b 100644 --- a/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-04-01/network/virtualnetworkgateways.go index cd67f1d9c67e..7ce03b7edcd5 100644 --- a/services/network/mgmt/2018-04-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-04-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-04-01/network/virtualnetworkpeerings.go index 2cdf001a5f41..082aefa2c9b2 100644 --- a/services/network/mgmt/2018-04-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-04-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/virtualnetworks.go b/services/network/mgmt/2018-04-01/network/virtualnetworks.go index 01d4b79f80a6..c5ed9e7b177d 100644 --- a/services/network/mgmt/2018-04-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-04-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/virtualwans.go b/services/network/mgmt/2018-04-01/network/virtualwans.go index 0748abdeca23..3aa492596dd1 100644 --- a/services/network/mgmt/2018-04-01/network/virtualwans.go +++ b/services/network/mgmt/2018-04-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWANsClient(subscriptionID string) VirtualWANsClient { return NewVirtualWANsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWANsClientWithBaseURI creates an instance of the VirtualWANsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/vpnconnections.go b/services/network/mgmt/2018-04-01/network/vpnconnections.go index e5b2f44e4ab8..a0d302477a7f 100644 --- a/services/network/mgmt/2018-04-01/network/vpnconnections.go +++ b/services/network/mgmt/2018-04-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/vpngateways.go b/services/network/mgmt/2018-04-01/network/vpngateways.go index 7b582e2573d1..2e861471ebfd 100644 --- a/services/network/mgmt/2018-04-01/network/vpngateways.go +++ b/services/network/mgmt/2018-04-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/vpnsites.go b/services/network/mgmt/2018-04-01/network/vpnsites.go index 7645fff4ec56..e6e32e17fcf5 100644 --- a/services/network/mgmt/2018-04-01/network/vpnsites.go +++ b/services/network/mgmt/2018-04-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2018-04-01/network/vpnsitesconfiguration.go index e5066e5c3bfb..69ac54bb7e5d 100644 --- a/services/network/mgmt/2018-04-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2018-04-01/network/vpnsitesconfiguration.go @@ -35,7 +35,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2018-04-01/network/watchers.go b/services/network/mgmt/2018-04-01/network/watchers.go index 15fb43d2e6da..b19ce95efd49 100644 --- a/services/network/mgmt/2018-04-01/network/watchers.go +++ b/services/network/mgmt/2018-04-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/applicationgateways.go b/services/network/mgmt/2018-06-01/network/applicationgateways.go index 1ffd5b0a88ac..9418993c6077 100644 --- a/services/network/mgmt/2018-06-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-06-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-06-01/network/applicationsecuritygroups.go index 969da50d43e0..df7f160c4077 100644 --- a/services/network/mgmt/2018-06-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-06-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/availableendpointservices.go b/services/network/mgmt/2018-06-01/network/availableendpointservices.go index be22e1ccf2a9..12d24400604b 100644 --- a/services/network/mgmt/2018-06-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-06-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/azurefirewalls.go b/services/network/mgmt/2018-06-01/network/azurefirewalls.go index 37f0e4632d37..5c027964de6a 100644 --- a/services/network/mgmt/2018-06-01/network/azurefirewalls.go +++ b/services/network/mgmt/2018-06-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-06-01/network/bgpservicecommunities.go index 41f9bb989559..19d877e52305 100644 --- a/services/network/mgmt/2018-06-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-06-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/client.go b/services/network/mgmt/2018-06-01/network/client.go index dade5f2f1b09..8373539b0b25 100644 --- a/services/network/mgmt/2018-06-01/network/client.go +++ b/services/network/mgmt/2018-06-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-06-01/network/connectionmonitors.go b/services/network/mgmt/2018-06-01/network/connectionmonitors.go index f6e70502838d..7c3f2e765b08 100644 --- a/services/network/mgmt/2018-06-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-06-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/ddosprotectionplans.go b/services/network/mgmt/2018-06-01/network/ddosprotectionplans.go index f483396ba527..5bbd35ef7420 100644 --- a/services/network/mgmt/2018-06-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2018-06-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-06-01/network/defaultsecurityrules.go index 2f18c8dfe7e1..84ae74a95c6e 100644 --- a/services/network/mgmt/2018-06-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-06-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-06-01/network/expressroutecircuitauthorizations.go index 58ae5ebbaf8e..de1812a78e35 100644 --- a/services/network/mgmt/2018-06-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-06-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2018-06-01/network/expressroutecircuitconnections.go index 5da7bbb580b1..2b3f30881bae 100644 --- a/services/network/mgmt/2018-06-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2018-06-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-06-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-06-01/network/expressroutecircuitpeerings.go index 80a76576fc0b..f4df1877f9f5 100644 --- a/services/network/mgmt/2018-06-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-06-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/expressroutecircuits.go b/services/network/mgmt/2018-06-01/network/expressroutecircuits.go index 1b3d587a8fda..5097755aba5a 100644 --- a/services/network/mgmt/2018-06-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-06-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-06-01/network/expressroutecrossconnectionpeerings.go index c4904b97dcb8..d98a5bf4415b 100644 --- a/services/network/mgmt/2018-06-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-06-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/expressroutecrossconnections.go b/services/network/mgmt/2018-06-01/network/expressroutecrossconnections.go index b8897e727b09..4c231f289e16 100644 --- a/services/network/mgmt/2018-06-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2018-06-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-06-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-06-01/network/expressrouteserviceproviders.go index 8a4ed14404d5..9ce24a8776b2 100644 --- a/services/network/mgmt/2018-06-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-06-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-06-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2018-06-01/network/hubvirtualnetworkconnections.go index 2742f75d5fb3..2fd8e1f5a85a 100644 --- a/services/network/mgmt/2018-06-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2018-06-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-06-01/network/inboundnatrules.go b/services/network/mgmt/2018-06-01/network/inboundnatrules.go index 87e69bfc5a9e..3527c068709d 100644 --- a/services/network/mgmt/2018-06-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-06-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-06-01/network/interfaceipconfigurations.go index 93e14cdc185a..951fe0a86e04 100644 --- a/services/network/mgmt/2018-06-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-06-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-06-01/network/interfaceloadbalancers.go index cb8e50a99e41..8f85a664f97c 100644 --- a/services/network/mgmt/2018-06-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-06-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/interfacesgroup.go b/services/network/mgmt/2018-06-01/network/interfacesgroup.go index 8be7066afbb0..6457b560abb7 100644 --- a/services/network/mgmt/2018-06-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-06-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-06-01/network/loadbalancerbackendaddresspools.go index 04063277f40a..1ea98ee6cd16 100644 --- a/services/network/mgmt/2018-06-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-06-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-06-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-06-01/network/loadbalancerfrontendipconfigurations.go index c5566da92827..0dd53c753e1b 100644 --- a/services/network/mgmt/2018-06-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-06-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-06-01/network/loadbalancerloadbalancingrules.go index bf73649be47a..743eca9abde9 100644 --- a/services/network/mgmt/2018-06-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-06-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-06-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-06-01/network/loadbalancernetworkinterfaces.go index 57c38241c34c..12df0c45bd23 100644 --- a/services/network/mgmt/2018-06-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-06-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-06-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-06-01/network/loadbalancerprobes.go index 2c9326a797e8..c57838194e66 100644 --- a/services/network/mgmt/2018-06-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-06-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/loadbalancers.go b/services/network/mgmt/2018-06-01/network/loadbalancers.go index 3b2ec64870a1..a4a514781cf6 100644 --- a/services/network/mgmt/2018-06-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-06-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/localnetworkgateways.go b/services/network/mgmt/2018-06-01/network/localnetworkgateways.go index 913756099510..2e1469d1381c 100644 --- a/services/network/mgmt/2018-06-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-06-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-06-01/network/networkapi/interfaces.go index 4a7227048c1a..91aefa8967a3 100644 --- a/services/network/mgmt/2018-06-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-06-01/network/networkapi/interfaces.go @@ -35,7 +35,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -48,9 +50,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -65,7 +70,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -76,7 +83,9 @@ type DdosProtectionPlansClientAPI interface { 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) } var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(nil) @@ -84,6 +93,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -94,6 +104,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -104,6 +115,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -125,7 +137,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -137,6 +151,7 @@ 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) @@ -146,8 +161,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -161,6 +178,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -171,7 +189,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -181,6 +201,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -189,6 +210,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -199,6 +221,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -207,6 +230,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -214,6 +238,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -222,6 +247,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -235,11 +261,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -249,6 +280,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -256,6 +288,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -266,7 +299,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -278,6 +313,7 @@ type SecurityRulesClientAPI interface { 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) @@ -286,6 +322,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -342,6 +379,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -353,9 +391,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -367,7 +409,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -379,6 +423,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -390,7 +435,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -402,6 +449,7 @@ type RoutesClientAPI interface { 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) @@ -409,6 +457,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -416,6 +465,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -427,8 +477,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -440,6 +493,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -450,6 +504,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -467,7 +522,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -485,6 +542,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -498,6 +556,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -509,7 +568,9 @@ type VirtualWANsClientAPI interface { 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.VirtualWANsUpdateTagsFuture, err error) } @@ -521,7 +582,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -540,7 +603,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -550,6 +615,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -560,7 +626,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -572,6 +640,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) diff --git a/services/network/mgmt/2018-06-01/network/operations.go b/services/network/mgmt/2018-06-01/network/operations.go index 7aaf5aa5c8b5..e69d16265791 100644 --- a/services/network/mgmt/2018-06-01/network/operations.go +++ b/services/network/mgmt/2018-06-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/packetcaptures.go b/services/network/mgmt/2018-06-01/network/packetcaptures.go index 13b406ea72c2..16f3afbec732 100644 --- a/services/network/mgmt/2018-06-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-06-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/publicipaddresses.go b/services/network/mgmt/2018-06-01/network/publicipaddresses.go index ca201e6199b9..e562be377876 100644 --- a/services/network/mgmt/2018-06-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-06-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/routefilterrules.go b/services/network/mgmt/2018-06-01/network/routefilterrules.go index ac074fdc692d..af44176859f5 100644 --- a/services/network/mgmt/2018-06-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-06-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/routefilters.go b/services/network/mgmt/2018-06-01/network/routefilters.go index bf5b16d5f8a4..6c4d7ff7d90d 100644 --- a/services/network/mgmt/2018-06-01/network/routefilters.go +++ b/services/network/mgmt/2018-06-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/routes.go b/services/network/mgmt/2018-06-01/network/routes.go index 7ce094134024..a11723d266ae 100644 --- a/services/network/mgmt/2018-06-01/network/routes.go +++ b/services/network/mgmt/2018-06-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/routetables.go b/services/network/mgmt/2018-06-01/network/routetables.go index 02b7c6af1936..9a2129e95bf8 100644 --- a/services/network/mgmt/2018-06-01/network/routetables.go +++ b/services/network/mgmt/2018-06-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/securitygroups.go b/services/network/mgmt/2018-06-01/network/securitygroups.go index bb4176eead10..44c5c1a705fb 100644 --- a/services/network/mgmt/2018-06-01/network/securitygroups.go +++ b/services/network/mgmt/2018-06-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/securityrules.go b/services/network/mgmt/2018-06-01/network/securityrules.go index 380a4936ba85..81276c8d4043 100644 --- a/services/network/mgmt/2018-06-01/network/securityrules.go +++ b/services/network/mgmt/2018-06-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/subnets.go b/services/network/mgmt/2018-06-01/network/subnets.go index 8de3f082dd66..e71af76c69c3 100644 --- a/services/network/mgmt/2018-06-01/network/subnets.go +++ b/services/network/mgmt/2018-06-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/usages.go b/services/network/mgmt/2018-06-01/network/usages.go index 72d75d987920..fdd4d39e2e3e 100644 --- a/services/network/mgmt/2018-06-01/network/usages.go +++ b/services/network/mgmt/2018-06-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/virtualhubs.go b/services/network/mgmt/2018-06-01/network/virtualhubs.go index 846929d6978d..398eca272a2e 100644 --- a/services/network/mgmt/2018-06-01/network/virtualhubs.go +++ b/services/network/mgmt/2018-06-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-06-01/network/virtualnetworkgatewayconnections.go index 2b97e5367e5f..f65a49de3512 100644 --- a/services/network/mgmt/2018-06-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-06-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-06-01/network/virtualnetworkgateways.go index b985605399a9..82eefc250bc8 100644 --- a/services/network/mgmt/2018-06-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-06-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-06-01/network/virtualnetworkpeerings.go index 53afd2369658..325226902345 100644 --- a/services/network/mgmt/2018-06-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-06-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/virtualnetworks.go b/services/network/mgmt/2018-06-01/network/virtualnetworks.go index fab5e4625e1a..afe3f5ff2a6d 100644 --- a/services/network/mgmt/2018-06-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-06-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/virtualwans.go b/services/network/mgmt/2018-06-01/network/virtualwans.go index 05521bd59220..5e3eb35f0932 100644 --- a/services/network/mgmt/2018-06-01/network/virtualwans.go +++ b/services/network/mgmt/2018-06-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWANsClient(subscriptionID string) VirtualWANsClient { return NewVirtualWANsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWANsClientWithBaseURI creates an instance of the VirtualWANsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/vpnconnections.go b/services/network/mgmt/2018-06-01/network/vpnconnections.go index f6ca13618a09..972a06d6161e 100644 --- a/services/network/mgmt/2018-06-01/network/vpnconnections.go +++ b/services/network/mgmt/2018-06-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/vpngateways.go b/services/network/mgmt/2018-06-01/network/vpngateways.go index 34de16232d0b..635e0c1e96bb 100644 --- a/services/network/mgmt/2018-06-01/network/vpngateways.go +++ b/services/network/mgmt/2018-06-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/vpnsites.go b/services/network/mgmt/2018-06-01/network/vpnsites.go index bdfac2447081..05bdb7873d46 100644 --- a/services/network/mgmt/2018-06-01/network/vpnsites.go +++ b/services/network/mgmt/2018-06-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2018-06-01/network/vpnsitesconfiguration.go index 5c4a9d400242..0d7313055126 100644 --- a/services/network/mgmt/2018-06-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2018-06-01/network/vpnsitesconfiguration.go @@ -35,7 +35,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2018-06-01/network/watchers.go b/services/network/mgmt/2018-06-01/network/watchers.go index f19d0259e069..389c52ee591d 100644 --- a/services/network/mgmt/2018-06-01/network/watchers.go +++ b/services/network/mgmt/2018-06-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/applicationgateways.go b/services/network/mgmt/2018-07-01/network/applicationgateways.go index feb1f8d43395..199a82954146 100644 --- a/services/network/mgmt/2018-07-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-07-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-07-01/network/applicationsecuritygroups.go index 6a8a7cb340ca..c873b1ac4ced 100644 --- a/services/network/mgmt/2018-07-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-07-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/availableendpointservices.go b/services/network/mgmt/2018-07-01/network/availableendpointservices.go index 333e6d32dc7e..4994cb9e4b45 100644 --- a/services/network/mgmt/2018-07-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-07-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/azurefirewalls.go b/services/network/mgmt/2018-07-01/network/azurefirewalls.go index 612ffe7c91f9..02ac86569997 100644 --- a/services/network/mgmt/2018-07-01/network/azurefirewalls.go +++ b/services/network/mgmt/2018-07-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-07-01/network/bgpservicecommunities.go index 3ca97bb3ad6d..3bdd891c35d2 100644 --- a/services/network/mgmt/2018-07-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-07-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/client.go b/services/network/mgmt/2018-07-01/network/client.go index f509a02f9118..5f89a26830fe 100644 --- a/services/network/mgmt/2018-07-01/network/client.go +++ b/services/network/mgmt/2018-07-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-07-01/network/connectionmonitors.go b/services/network/mgmt/2018-07-01/network/connectionmonitors.go index b00b00ed82b1..f204d94a7817 100644 --- a/services/network/mgmt/2018-07-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-07-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/ddosprotectionplans.go b/services/network/mgmt/2018-07-01/network/ddosprotectionplans.go index 341a012b8332..5d784251da61 100644 --- a/services/network/mgmt/2018-07-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2018-07-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-07-01/network/defaultsecurityrules.go index 14119fdddb59..f2d212d1f479 100644 --- a/services/network/mgmt/2018-07-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-07-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-07-01/network/expressroutecircuitauthorizations.go index 4fe145c7dd3d..9dc437586c2c 100644 --- a/services/network/mgmt/2018-07-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-07-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2018-07-01/network/expressroutecircuitconnections.go index d84c8c3bf135..c2a2cbc3949b 100644 --- a/services/network/mgmt/2018-07-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2018-07-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-07-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-07-01/network/expressroutecircuitpeerings.go index 9ac73859a217..e8f62f527647 100644 --- a/services/network/mgmt/2018-07-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-07-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/expressroutecircuits.go b/services/network/mgmt/2018-07-01/network/expressroutecircuits.go index b7a0da60fbee..d9dc55b5f2c6 100644 --- a/services/network/mgmt/2018-07-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-07-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-07-01/network/expressroutecrossconnectionpeerings.go index 93867d0f8aaa..0d66ca5645f5 100644 --- a/services/network/mgmt/2018-07-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-07-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/expressroutecrossconnections.go b/services/network/mgmt/2018-07-01/network/expressroutecrossconnections.go index 4347b078e0e1..16705fc664c8 100644 --- a/services/network/mgmt/2018-07-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2018-07-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-07-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-07-01/network/expressrouteserviceproviders.go index d5cf2172cc14..acf92ef53b9b 100644 --- a/services/network/mgmt/2018-07-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-07-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-07-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2018-07-01/network/hubvirtualnetworkconnections.go index 50090e149731..3e4177733b64 100644 --- a/services/network/mgmt/2018-07-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2018-07-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-07-01/network/inboundnatrules.go b/services/network/mgmt/2018-07-01/network/inboundnatrules.go index c6601831a557..9c6278fc4091 100644 --- a/services/network/mgmt/2018-07-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-07-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-07-01/network/interfaceipconfigurations.go index 38faffe29871..3c4c8165a840 100644 --- a/services/network/mgmt/2018-07-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-07-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-07-01/network/interfaceloadbalancers.go index 839832a84d49..11071cbf9c66 100644 --- a/services/network/mgmt/2018-07-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-07-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/interfacesgroup.go b/services/network/mgmt/2018-07-01/network/interfacesgroup.go index cc9a74d73b7d..f250c2721d39 100644 --- a/services/network/mgmt/2018-07-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-07-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-07-01/network/loadbalancerbackendaddresspools.go index d435449bf833..e25ad9261b50 100644 --- a/services/network/mgmt/2018-07-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-07-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-07-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-07-01/network/loadbalancerfrontendipconfigurations.go index e6cc1a8e769c..c796bf1f0c5a 100644 --- a/services/network/mgmt/2018-07-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-07-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-07-01/network/loadbalancerloadbalancingrules.go index 956f61faa07a..557ce1518634 100644 --- a/services/network/mgmt/2018-07-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-07-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-07-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-07-01/network/loadbalancernetworkinterfaces.go index 1186d826ad98..26453e4b6777 100644 --- a/services/network/mgmt/2018-07-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-07-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-07-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-07-01/network/loadbalancerprobes.go index b571f8957bc4..3aaaded7ac14 100644 --- a/services/network/mgmt/2018-07-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-07-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/loadbalancers.go b/services/network/mgmt/2018-07-01/network/loadbalancers.go index 5dac4d4f25fc..3f4d14d6a6bf 100644 --- a/services/network/mgmt/2018-07-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-07-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/localnetworkgateways.go b/services/network/mgmt/2018-07-01/network/localnetworkgateways.go index c4293754ceab..992e1d923289 100644 --- a/services/network/mgmt/2018-07-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-07-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-07-01/network/networkapi/interfaces.go index 0d7eedb84db6..093c39a9b15d 100644 --- a/services/network/mgmt/2018-07-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-07-01/network/networkapi/interfaces.go @@ -35,7 +35,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -48,9 +50,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -65,7 +70,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -76,7 +83,9 @@ type DdosProtectionPlansClientAPI interface { 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) } var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(nil) @@ -84,6 +93,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -94,6 +104,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -104,6 +115,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -125,7 +137,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -137,6 +151,7 @@ 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) @@ -146,8 +161,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -161,6 +178,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -171,7 +189,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -181,6 +201,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -189,6 +210,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -199,6 +221,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -207,6 +230,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -214,6 +238,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc // 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) @@ -222,6 +247,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -235,11 +261,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -249,6 +280,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -256,6 +288,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -266,7 +299,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -278,6 +313,7 @@ type SecurityRulesClientAPI interface { 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) @@ -286,6 +322,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -342,6 +379,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -353,9 +391,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -367,7 +409,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -379,7 +423,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -391,6 +437,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -402,7 +449,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -414,6 +463,7 @@ type RoutesClientAPI interface { 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) @@ -421,6 +471,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -428,6 +479,7 @@ var _ BgpServiceCommunitiesClientAPI = (*network.BgpServiceCommunitiesClient)(ni // 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) @@ -439,8 +491,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -452,6 +507,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -462,6 +518,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -479,7 +536,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) SetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams network.VpnClientIPsecParameters) (result network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) SupportedVpnDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.String, err error) @@ -496,6 +555,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -509,6 +569,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -520,7 +581,9 @@ type VirtualWANsClientAPI interface { 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.VirtualWANsUpdateTagsFuture, err error) } @@ -532,7 +595,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -551,7 +616,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -561,6 +628,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -571,7 +639,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -583,6 +653,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -593,7 +664,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -605,6 +678,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) diff --git a/services/network/mgmt/2018-07-01/network/operations.go b/services/network/mgmt/2018-07-01/network/operations.go index d3f6163f5944..6980d18c5c7f 100644 --- a/services/network/mgmt/2018-07-01/network/operations.go +++ b/services/network/mgmt/2018-07-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/packetcaptures.go b/services/network/mgmt/2018-07-01/network/packetcaptures.go index db02d7adcb33..5bb2909822f2 100644 --- a/services/network/mgmt/2018-07-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-07-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/publicipaddresses.go b/services/network/mgmt/2018-07-01/network/publicipaddresses.go index a6a9057127cf..3dd31e7edbd7 100644 --- a/services/network/mgmt/2018-07-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-07-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/publicipprefixes.go b/services/network/mgmt/2018-07-01/network/publicipprefixes.go index 6d3046e817f4..e040381775d2 100644 --- a/services/network/mgmt/2018-07-01/network/publicipprefixes.go +++ b/services/network/mgmt/2018-07-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/routefilterrules.go b/services/network/mgmt/2018-07-01/network/routefilterrules.go index 8cc6572a71d2..45485fe0a7f1 100644 --- a/services/network/mgmt/2018-07-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-07-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/routefilters.go b/services/network/mgmt/2018-07-01/network/routefilters.go index 9d69a8a332c5..5a236ec20873 100644 --- a/services/network/mgmt/2018-07-01/network/routefilters.go +++ b/services/network/mgmt/2018-07-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/routes.go b/services/network/mgmt/2018-07-01/network/routes.go index c5ffc77efaa7..573844901071 100644 --- a/services/network/mgmt/2018-07-01/network/routes.go +++ b/services/network/mgmt/2018-07-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/routetables.go b/services/network/mgmt/2018-07-01/network/routetables.go index f563d9b92204..65f4e66e4259 100644 --- a/services/network/mgmt/2018-07-01/network/routetables.go +++ b/services/network/mgmt/2018-07-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/securitygroups.go b/services/network/mgmt/2018-07-01/network/securitygroups.go index 62f83c6ddb20..b73d72a09f2f 100644 --- a/services/network/mgmt/2018-07-01/network/securitygroups.go +++ b/services/network/mgmt/2018-07-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/securityrules.go b/services/network/mgmt/2018-07-01/network/securityrules.go index ebb450b023c9..684b8fa28e65 100644 --- a/services/network/mgmt/2018-07-01/network/securityrules.go +++ b/services/network/mgmt/2018-07-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/serviceendpointpolicies.go b/services/network/mgmt/2018-07-01/network/serviceendpointpolicies.go index 0af7a64e71c2..150597ceeb23 100644 --- a/services/network/mgmt/2018-07-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2018-07-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2018-07-01/network/serviceendpointpolicydefinitions.go index b96b58233090..c36a2e6e183c 100644 --- a/services/network/mgmt/2018-07-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2018-07-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/subnets.go b/services/network/mgmt/2018-07-01/network/subnets.go index 17268338ee87..ad4668d91211 100644 --- a/services/network/mgmt/2018-07-01/network/subnets.go +++ b/services/network/mgmt/2018-07-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/usages.go b/services/network/mgmt/2018-07-01/network/usages.go index 42e9e3e0ac14..6fe7c3d83464 100644 --- a/services/network/mgmt/2018-07-01/network/usages.go +++ b/services/network/mgmt/2018-07-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/virtualhubs.go b/services/network/mgmt/2018-07-01/network/virtualhubs.go index a45c3c212bc8..5c61d767706b 100644 --- a/services/network/mgmt/2018-07-01/network/virtualhubs.go +++ b/services/network/mgmt/2018-07-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-07-01/network/virtualnetworkgatewayconnections.go index b888d0cf1ce6..6e555d578544 100644 --- a/services/network/mgmt/2018-07-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-07-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-07-01/network/virtualnetworkgateways.go index 2af6d8be221b..5eaae63c2860 100644 --- a/services/network/mgmt/2018-07-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-07-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-07-01/network/virtualnetworkpeerings.go index 63a01c8ddc91..a9d3692eb9a2 100644 --- a/services/network/mgmt/2018-07-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-07-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/virtualnetworks.go b/services/network/mgmt/2018-07-01/network/virtualnetworks.go index fbbe5f313c0b..e43d18246c42 100644 --- a/services/network/mgmt/2018-07-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-07-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/virtualwans.go b/services/network/mgmt/2018-07-01/network/virtualwans.go index a12a59c68627..477a1250f513 100644 --- a/services/network/mgmt/2018-07-01/network/virtualwans.go +++ b/services/network/mgmt/2018-07-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWANsClient(subscriptionID string) VirtualWANsClient { return NewVirtualWANsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWANsClientWithBaseURI creates an instance of the VirtualWANsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/vpnconnections.go b/services/network/mgmt/2018-07-01/network/vpnconnections.go index 5e024069f404..61856e0859b0 100644 --- a/services/network/mgmt/2018-07-01/network/vpnconnections.go +++ b/services/network/mgmt/2018-07-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/vpngateways.go b/services/network/mgmt/2018-07-01/network/vpngateways.go index 035368cc0ff4..6f82941916e1 100644 --- a/services/network/mgmt/2018-07-01/network/vpngateways.go +++ b/services/network/mgmt/2018-07-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/vpnsites.go b/services/network/mgmt/2018-07-01/network/vpnsites.go index 88b5cd30682b..3fdc35820b7f 100644 --- a/services/network/mgmt/2018-07-01/network/vpnsites.go +++ b/services/network/mgmt/2018-07-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2018-07-01/network/vpnsitesconfiguration.go index ccc2376824c2..e3f6ac0f440b 100644 --- a/services/network/mgmt/2018-07-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2018-07-01/network/vpnsitesconfiguration.go @@ -35,7 +35,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2018-07-01/network/watchers.go b/services/network/mgmt/2018-07-01/network/watchers.go index 50370065dac0..3bcfe9359fd0 100644 --- a/services/network/mgmt/2018-07-01/network/watchers.go +++ b/services/network/mgmt/2018-07-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/applicationgateways.go b/services/network/mgmt/2018-08-01/network/applicationgateways.go index 94fbc884fedc..8770e78f8ca8 100644 --- a/services/network/mgmt/2018-08-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-08-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go index 4fae8ed8456e..188dc03ff8b1 100644 --- a/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/availabledelegations.go b/services/network/mgmt/2018-08-01/network/availabledelegations.go index 8ab8fe4d77f7..9b49070ca686 100644 --- a/services/network/mgmt/2018-08-01/network/availabledelegations.go +++ b/services/network/mgmt/2018-08-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/availableendpointservices.go b/services/network/mgmt/2018-08-01/network/availableendpointservices.go index c8a6642f9e5b..31424eaa5ca6 100644 --- a/services/network/mgmt/2018-08-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-08-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go index 5f14e23f7d67..86207d946389 100644 --- a/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go index c00176514789..9a592a34aa82 100644 --- a/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/azurefirewalls.go b/services/network/mgmt/2018-08-01/network/azurefirewalls.go index e045010aed33..7572a41e48be 100644 --- a/services/network/mgmt/2018-08-01/network/azurefirewalls.go +++ b/services/network/mgmt/2018-08-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go index 5f6f887ee4c8..8f1393e8ab29 100644 --- a/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/client.go b/services/network/mgmt/2018-08-01/network/client.go index 75c294fd3521..5f4794cd4b64 100644 --- a/services/network/mgmt/2018-08-01/network/client.go +++ b/services/network/mgmt/2018-08-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-08-01/network/connectionmonitors.go b/services/network/mgmt/2018-08-01/network/connectionmonitors.go index 39ae46c0bffa..78a0be4c1a10 100644 --- a/services/network/mgmt/2018-08-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-08-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go b/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go index 88d1caf00eae..af6e52a69d26 100644 --- a/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go index ab8785f27394..3fba008bb0fe 100644 --- a/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go index 449af06ab914..4d7e9464b3ec 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go index d63311e97df8..7d372326e88d 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go index d5fd220e0cfe..78ca1819a193 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressroutecircuits.go b/services/network/mgmt/2018-08-01/network/expressroutecircuits.go index eefc9981f3ad..25a1c9b8cdbd 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-08-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressrouteconnections.go b/services/network/mgmt/2018-08-01/network/expressrouteconnections.go index da4fa8e36c51..cd04831a7954 100644 --- a/services/network/mgmt/2018-08-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2018-08-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go index 954773121f28..d4984cb21136 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go b/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go index ad6e6f8af66a..4308e8917753 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/expressroutegateways.go b/services/network/mgmt/2018-08-01/network/expressroutegateways.go index af74a38ff8de..f1f62df9d68f 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutegateways.go +++ b/services/network/mgmt/2018-08-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressroutelinks.go b/services/network/mgmt/2018-08-01/network/expressroutelinks.go index eb6df4e4a577..cfdbdeaaf4c1 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutelinks.go +++ b/services/network/mgmt/2018-08-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressrouteports.go b/services/network/mgmt/2018-08-01/network/expressrouteports.go index 210cdd45548f..d429d850fb83 100644 --- a/services/network/mgmt/2018-08-01/network/expressrouteports.go +++ b/services/network/mgmt/2018-08-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go b/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go index b483106ceb80..f2b6936638e6 100644 --- a/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go index 6d2e1b7b0a4d..fe25d046758b 100644 --- a/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go index d8da91d3e1ad..06e51cbf5d96 100644 --- a/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/inboundnatrules.go b/services/network/mgmt/2018-08-01/network/inboundnatrules.go index 671519865396..6efdc5161fd9 100644 --- a/services/network/mgmt/2018-08-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-08-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/interfaceendpoints.go b/services/network/mgmt/2018-08-01/network/interfaceendpoints.go index a94aaf125432..a6e2eee3f09f 100644 --- a/services/network/mgmt/2018-08-01/network/interfaceendpoints.go +++ b/services/network/mgmt/2018-08-01/network/interfaceendpoints.go @@ -35,7 +35,9 @@ func NewInterfaceEndpointsClient(subscriptionID string) InterfaceEndpointsClient return NewInterfaceEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client. +// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewInterfaceEndpointsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceEndpointsClient { return InterfaceEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go index 52b252caaf30..4bdd0942032d 100644 --- a/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go index f2da3d1c8882..e6c2118c9224 100644 --- a/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/interfacesgroup.go b/services/network/mgmt/2018-08-01/network/interfacesgroup.go index a45dc74bf6c9..c1e0315fe0dd 100644 --- a/services/network/mgmt/2018-08-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-08-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go b/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go index ac142c968ca2..0b00975ae50b 100644 --- a/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go index e1052ba801cb..4ef5447cb702 100644 --- a/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go index b31ef59974ed..5c478d91e174 100644 --- a/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go index 0ce635eb2c65..7c3befaa15c4 100644 --- a/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go index 386e2b9b1d4c..4df53918ff4e 100644 --- a/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go index f5f964b2ea4f..18230c4ed0ce 100644 --- a/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go index 542baea60fff..1be8ea70a6bf 100644 --- a/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/loadbalancers.go b/services/network/mgmt/2018-08-01/network/loadbalancers.go index 5930a4c2e7fb..80e35d0b0e9b 100644 --- a/services/network/mgmt/2018-08-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-08-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/localnetworkgateways.go b/services/network/mgmt/2018-08-01/network/localnetworkgateways.go index 0e3731921f20..87a46dfc4d00 100644 --- a/services/network/mgmt/2018-08-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-08-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-08-01/network/networkapi/interfaces.go index 825c5eceda1d..41a3e1542e83 100644 --- a/services/network/mgmt/2018-08-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-08-01/network/networkapi/interfaces.go @@ -38,9 +38,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -55,7 +58,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -63,6 +68,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -70,6 +76,7 @@ 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) @@ -80,7 +87,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -88,6 +97,7 @@ 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) @@ -98,7 +108,9 @@ type DdosProtectionPlansClientAPI interface { 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) } var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(nil) @@ -106,6 +118,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -116,6 +129,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -126,6 +140,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -147,7 +162,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -159,6 +176,7 @@ 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) @@ -168,8 +186,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -183,6 +203,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -212,6 +233,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -222,7 +244,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -232,6 +256,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -242,7 +267,9 @@ type InterfaceEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (result network.InterfaceEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (result network.InterfaceEndpoint, err error) List(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultIterator, err error) ListBySubscription(ctx context.Context) (result network.InterfaceEndpointListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result network.InterfaceEndpointListResultIterator, err error) } var _ InterfaceEndpointsClientAPI = (*network.InterfaceEndpointsClient)(nil) @@ -253,7 +280,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -263,6 +292,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -271,6 +301,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -281,6 +312,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -289,6 +321,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -297,6 +330,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -304,6 +338,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -312,6 +347,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -325,11 +361,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -339,6 +380,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -346,6 +388,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -356,6 +399,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -366,7 +410,9 @@ type ProfilesClientAPI interface { 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) } @@ -378,7 +424,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -390,6 +438,7 @@ type SecurityRulesClientAPI interface { 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) @@ -398,6 +447,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -454,6 +504,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -465,9 +516,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -479,7 +534,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -491,7 +548,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -503,6 +562,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -514,7 +574,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -526,6 +588,7 @@ type RoutesClientAPI interface { 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) @@ -533,6 +596,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -543,7 +607,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -555,6 +621,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -562,6 +629,7 @@ var _ ServiceEndpointPolicyDefinitionsClientAPI = (*network.ServiceEndpointPolic // 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) @@ -573,8 +641,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -586,6 +657,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -596,6 +668,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -606,7 +679,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -625,7 +700,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -643,6 +720,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -656,6 +734,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -667,7 +746,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -679,7 +760,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -698,7 +781,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -708,6 +793,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -718,7 +804,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -730,6 +818,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -740,6 +829,7 @@ type P2sVpnServerConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2sVpnServerConfigurationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2SVpnServerConfiguration, err error) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultPage, err error) + ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultIterator, err error) } var _ P2sVpnServerConfigurationsClientAPI = (*network.P2sVpnServerConfigurationsClient)(nil) @@ -751,7 +841,9 @@ type P2sVpnGatewaysClientAPI interface { 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } diff --git a/services/network/mgmt/2018-08-01/network/operations.go b/services/network/mgmt/2018-08-01/network/operations.go index 96851bf74565..d432f59d00ca 100644 --- a/services/network/mgmt/2018-08-01/network/operations.go +++ b/services/network/mgmt/2018-08-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/p2svpngateways.go b/services/network/mgmt/2018-08-01/network/p2svpngateways.go index 588b5d8da16c..fe6406a46218 100644 --- a/services/network/mgmt/2018-08-01/network/p2svpngateways.go +++ b/services/network/mgmt/2018-08-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go b/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go index 79368eda5079..44108d991f61 100644 --- a/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go +++ b/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-08-01/network/packetcaptures.go b/services/network/mgmt/2018-08-01/network/packetcaptures.go index 5d13d0d82f5c..5311652e3a88 100644 --- a/services/network/mgmt/2018-08-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-08-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/profiles.go b/services/network/mgmt/2018-08-01/network/profiles.go index b540040c9634..2601355ee75c 100644 --- a/services/network/mgmt/2018-08-01/network/profiles.go +++ b/services/network/mgmt/2018-08-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/publicipaddresses.go b/services/network/mgmt/2018-08-01/network/publicipaddresses.go index b89bf865c079..ccc1d387f3d6 100644 --- a/services/network/mgmt/2018-08-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-08-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/publicipprefixes.go b/services/network/mgmt/2018-08-01/network/publicipprefixes.go index 9f74cd4842d3..e6d7528ff43c 100644 --- a/services/network/mgmt/2018-08-01/network/publicipprefixes.go +++ b/services/network/mgmt/2018-08-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/routefilterrules.go b/services/network/mgmt/2018-08-01/network/routefilterrules.go index 4b44d48d6270..834faa2de287 100644 --- a/services/network/mgmt/2018-08-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-08-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/routefilters.go b/services/network/mgmt/2018-08-01/network/routefilters.go index b470c9de5876..e3c6d64429c0 100644 --- a/services/network/mgmt/2018-08-01/network/routefilters.go +++ b/services/network/mgmt/2018-08-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/routes.go b/services/network/mgmt/2018-08-01/network/routes.go index 79e4844e9ad6..1c566fa42ba4 100644 --- a/services/network/mgmt/2018-08-01/network/routes.go +++ b/services/network/mgmt/2018-08-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/routetables.go b/services/network/mgmt/2018-08-01/network/routetables.go index 0e54ea95115a..fb000fe77dca 100644 --- a/services/network/mgmt/2018-08-01/network/routetables.go +++ b/services/network/mgmt/2018-08-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/securitygroups.go b/services/network/mgmt/2018-08-01/network/securitygroups.go index 7611a7bad316..13dba7af22ff 100644 --- a/services/network/mgmt/2018-08-01/network/securitygroups.go +++ b/services/network/mgmt/2018-08-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/securityrules.go b/services/network/mgmt/2018-08-01/network/securityrules.go index 58adaa358910..09dbfa4f9d53 100644 --- a/services/network/mgmt/2018-08-01/network/securityrules.go +++ b/services/network/mgmt/2018-08-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go b/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go index 344480755e5f..d781f3faff5c 100644 --- a/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go index 76d55adff0b7..79ae7424a6b2 100644 --- a/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/subnets.go b/services/network/mgmt/2018-08-01/network/subnets.go index a4381818b559..deface8be28b 100644 --- a/services/network/mgmt/2018-08-01/network/subnets.go +++ b/services/network/mgmt/2018-08-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/usages.go b/services/network/mgmt/2018-08-01/network/usages.go index b6643eeddf14..2d52f04dd377 100644 --- a/services/network/mgmt/2018-08-01/network/usages.go +++ b/services/network/mgmt/2018-08-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/virtualhubs.go b/services/network/mgmt/2018-08-01/network/virtualhubs.go index 38191211d4d3..ea73907977d1 100644 --- a/services/network/mgmt/2018-08-01/network/virtualhubs.go +++ b/services/network/mgmt/2018-08-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go index 25f01057f291..0af127f55d49 100644 --- a/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go index 9f58e9c19248..4cbbd6d8f250 100644 --- a/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go index 8979dcad3f2e..01fff3982a7c 100644 --- a/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/virtualnetworks.go b/services/network/mgmt/2018-08-01/network/virtualnetworks.go index cc586a16dea5..9b23e824f98f 100644 --- a/services/network/mgmt/2018-08-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-08-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go b/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go index 12d02c76b8ad..40ed2ee0ac2e 100644 --- a/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/virtualwans.go b/services/network/mgmt/2018-08-01/network/virtualwans.go index 295c55a63007..6211cb8913f8 100644 --- a/services/network/mgmt/2018-08-01/network/virtualwans.go +++ b/services/network/mgmt/2018-08-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/vpnconnections.go b/services/network/mgmt/2018-08-01/network/vpnconnections.go index c2997a38af03..2f5282e58d3b 100644 --- a/services/network/mgmt/2018-08-01/network/vpnconnections.go +++ b/services/network/mgmt/2018-08-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/vpngateways.go b/services/network/mgmt/2018-08-01/network/vpngateways.go index 7ec09a11db5b..bfdb88f4f63f 100644 --- a/services/network/mgmt/2018-08-01/network/vpngateways.go +++ b/services/network/mgmt/2018-08-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/vpnsites.go b/services/network/mgmt/2018-08-01/network/vpnsites.go index 3f8f7f02b354..d9968004e797 100644 --- a/services/network/mgmt/2018-08-01/network/vpnsites.go +++ b/services/network/mgmt/2018-08-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go index 4bc1c05a1e3e..4cd70210b4c5 100644 --- a/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go @@ -35,7 +35,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2018-08-01/network/watchers.go b/services/network/mgmt/2018-08-01/network/watchers.go index fd377e9826a9..fbf02721eed1 100644 --- a/services/network/mgmt/2018-08-01/network/watchers.go +++ b/services/network/mgmt/2018-08-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/applicationgateways.go b/services/network/mgmt/2018-10-01/network/applicationgateways.go index baae0dd35f7d..6bce06a046a8 100644 --- a/services/network/mgmt/2018-10-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-10-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-10-01/network/applicationsecuritygroups.go index 067a6c7ba56b..01b992f5abe9 100644 --- a/services/network/mgmt/2018-10-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-10-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/availabledelegations.go b/services/network/mgmt/2018-10-01/network/availabledelegations.go index aa1e01eaf472..bdd8ee889411 100644 --- a/services/network/mgmt/2018-10-01/network/availabledelegations.go +++ b/services/network/mgmt/2018-10-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/availableendpointservices.go b/services/network/mgmt/2018-10-01/network/availableendpointservices.go index 9e7f53f0b5cc..861468af707c 100644 --- a/services/network/mgmt/2018-10-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-10-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2018-10-01/network/availableresourcegroupdelegations.go index 09d3ba2a9850..69050b6b9518 100644 --- a/services/network/mgmt/2018-10-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2018-10-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2018-10-01/network/azurefirewallfqdntags.go index 1c31c0e95289..082b8138908c 100644 --- a/services/network/mgmt/2018-10-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2018-10-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/azurefirewalls.go b/services/network/mgmt/2018-10-01/network/azurefirewalls.go index c5827e286b57..e663123ff294 100644 --- a/services/network/mgmt/2018-10-01/network/azurefirewalls.go +++ b/services/network/mgmt/2018-10-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-10-01/network/bgpservicecommunities.go index 4f34d25347f8..4af006166f8a 100644 --- a/services/network/mgmt/2018-10-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-10-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/client.go b/services/network/mgmt/2018-10-01/network/client.go index 221e41d3a09f..894a94d76fbc 100644 --- a/services/network/mgmt/2018-10-01/network/client.go +++ b/services/network/mgmt/2018-10-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-10-01/network/connectionmonitors.go b/services/network/mgmt/2018-10-01/network/connectionmonitors.go index 1c0840933922..8db1e1185529 100644 --- a/services/network/mgmt/2018-10-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-10-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/ddosprotectionplans.go b/services/network/mgmt/2018-10-01/network/ddosprotectionplans.go index 48ef701bd320..04da1737ec06 100644 --- a/services/network/mgmt/2018-10-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2018-10-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-10-01/network/defaultsecurityrules.go index 37b9c64c6126..3f885021c81b 100644 --- a/services/network/mgmt/2018-10-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-10-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-10-01/network/expressroutecircuitauthorizations.go index 3028d0d240aa..bf6239001344 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-10-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2018-10-01/network/expressroutecircuitconnections.go index beaf7691f294..cb7512613201 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2018-10-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-10-01/network/expressroutecircuitpeerings.go index 2547c8830e55..36aa88b83e00 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-10-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressroutecircuits.go b/services/network/mgmt/2018-10-01/network/expressroutecircuits.go index 080f8b0f2b6d..cee05a408a77 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-10-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressrouteconnections.go b/services/network/mgmt/2018-10-01/network/expressrouteconnections.go index 5ff89f2e1dfa..fe2af2bf861e 100644 --- a/services/network/mgmt/2018-10-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2018-10-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-10-01/network/expressroutecrossconnectionpeerings.go index bf2cc5b7c29b..275a8c3c56bb 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-10-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressroutecrossconnections.go b/services/network/mgmt/2018-10-01/network/expressroutecrossconnections.go index 211c00a7f270..ceed882f3300 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2018-10-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/expressroutegateways.go b/services/network/mgmt/2018-10-01/network/expressroutegateways.go index 4d71329547d7..0b45c56bb6d4 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutegateways.go +++ b/services/network/mgmt/2018-10-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressroutelinks.go b/services/network/mgmt/2018-10-01/network/expressroutelinks.go index b8a228f420da..da693f88a6a4 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutelinks.go +++ b/services/network/mgmt/2018-10-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressrouteports.go b/services/network/mgmt/2018-10-01/network/expressrouteports.go index aa5712d0a76d..940629744ede 100644 --- a/services/network/mgmt/2018-10-01/network/expressrouteports.go +++ b/services/network/mgmt/2018-10-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressrouteportslocations.go b/services/network/mgmt/2018-10-01/network/expressrouteportslocations.go index a81991dd4082..746531082940 100644 --- a/services/network/mgmt/2018-10-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2018-10-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-10-01/network/expressrouteserviceproviders.go index e99520037ca7..9be16d11232b 100644 --- a/services/network/mgmt/2018-10-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-10-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2018-10-01/network/hubvirtualnetworkconnections.go index 082baf188756..3a43f3abec94 100644 --- a/services/network/mgmt/2018-10-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2018-10-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/inboundnatrules.go b/services/network/mgmt/2018-10-01/network/inboundnatrules.go index 0e4d45f01813..43ca4b8d4263 100644 --- a/services/network/mgmt/2018-10-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-10-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/interfaceendpoints.go b/services/network/mgmt/2018-10-01/network/interfaceendpoints.go index 62b083e3b065..2c40dc897d41 100644 --- a/services/network/mgmt/2018-10-01/network/interfaceendpoints.go +++ b/services/network/mgmt/2018-10-01/network/interfaceendpoints.go @@ -35,7 +35,9 @@ func NewInterfaceEndpointsClient(subscriptionID string) InterfaceEndpointsClient return NewInterfaceEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client. +// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewInterfaceEndpointsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceEndpointsClient { return InterfaceEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-10-01/network/interfaceipconfigurations.go index fe7eef5ef6b6..ed51a0107193 100644 --- a/services/network/mgmt/2018-10-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-10-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-10-01/network/interfaceloadbalancers.go index 5d5bc9f0e1da..a9e65416e76f 100644 --- a/services/network/mgmt/2018-10-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-10-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/interfacesgroup.go b/services/network/mgmt/2018-10-01/network/interfacesgroup.go index 9f3b30389280..2e0e5262ba1a 100644 --- a/services/network/mgmt/2018-10-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-10-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/interfacetapconfigurations.go b/services/network/mgmt/2018-10-01/network/interfacetapconfigurations.go index 680958cbe81e..d09980a3ba22 100644 --- a/services/network/mgmt/2018-10-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2018-10-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-10-01/network/loadbalancerbackendaddresspools.go index 09601ca69e8f..526e34534b89 100644 --- a/services/network/mgmt/2018-10-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-10-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-10-01/network/loadbalancerfrontendipconfigurations.go index 7b6724ed272c..41c523045b61 100644 --- a/services/network/mgmt/2018-10-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-10-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-10-01/network/loadbalancerloadbalancingrules.go index 048f25525a54..b3b659e6c0bd 100644 --- a/services/network/mgmt/2018-10-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-10-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-10-01/network/loadbalancernetworkinterfaces.go index 2a2a8febf815..f1e8c4b72268 100644 --- a/services/network/mgmt/2018-10-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-10-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2018-10-01/network/loadbalanceroutboundrules.go index 4005d2bc9427..6d18dfebf4be 100644 --- a/services/network/mgmt/2018-10-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2018-10-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-10-01/network/loadbalancerprobes.go index 1821887ed321..b44fb2bc8838 100644 --- a/services/network/mgmt/2018-10-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-10-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/loadbalancers.go b/services/network/mgmt/2018-10-01/network/loadbalancers.go index 7200e50a3fdc..5edc03e9d2d6 100644 --- a/services/network/mgmt/2018-10-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-10-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/localnetworkgateways.go b/services/network/mgmt/2018-10-01/network/localnetworkgateways.go index bc305c2254fb..4b4e647c93e3 100644 --- a/services/network/mgmt/2018-10-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-10-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-10-01/network/networkapi/interfaces.go index 1fa8da4b603b..053999a5c159 100644 --- a/services/network/mgmt/2018-10-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-10-01/network/networkapi/interfaces.go @@ -38,9 +38,12 @@ type ApplicationGatewaysClientAPI interface { 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) 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) @@ -55,7 +58,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsClient)(nil) @@ -63,6 +68,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -70,6 +76,7 @@ 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) @@ -80,7 +87,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -88,6 +97,7 @@ 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) @@ -98,7 +108,9 @@ type DdosProtectionPlansClientAPI interface { 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) } var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(nil) @@ -106,6 +118,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -116,6 +129,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -126,6 +140,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -136,6 +151,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -148,7 +164,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -160,6 +178,7 @@ 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) @@ -169,8 +188,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -184,6 +205,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -213,6 +235,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -223,7 +246,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -233,6 +258,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -243,7 +269,9 @@ type InterfaceEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (result network.InterfaceEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (result network.InterfaceEndpoint, err error) List(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultIterator, err error) ListBySubscription(ctx context.Context) (result network.InterfaceEndpointListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result network.InterfaceEndpointListResultIterator, err error) } var _ InterfaceEndpointsClientAPI = (*network.InterfaceEndpointsClient)(nil) @@ -254,7 +282,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -264,6 +294,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -272,6 +303,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -282,6 +314,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -290,6 +323,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -298,6 +332,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -305,6 +340,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -313,6 +349,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -326,11 +363,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -340,6 +382,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -347,6 +390,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -357,6 +401,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -367,7 +412,9 @@ type ProfilesClientAPI interface { 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) } @@ -379,7 +426,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -391,6 +440,7 @@ type SecurityRulesClientAPI interface { 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) @@ -399,6 +449,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -455,6 +506,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -466,9 +518,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -480,7 +536,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -492,7 +550,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -504,6 +564,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -515,7 +576,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -527,6 +590,7 @@ type RoutesClientAPI interface { 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) @@ -534,6 +598,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -544,7 +609,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -556,6 +623,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -563,6 +631,7 @@ var _ ServiceEndpointPolicyDefinitionsClientAPI = (*network.ServiceEndpointPolic // 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) @@ -574,8 +643,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -587,6 +659,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -597,6 +670,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -614,7 +688,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -632,6 +708,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -645,6 +722,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -656,7 +734,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -668,7 +748,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -680,7 +762,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -699,7 +783,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -709,6 +795,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -719,7 +806,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -731,6 +820,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -741,6 +831,7 @@ type P2sVpnServerConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2sVpnServerConfigurationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2SVpnServerConfiguration, err error) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultPage, err error) + ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultIterator, err error) } var _ P2sVpnServerConfigurationsClientAPI = (*network.P2sVpnServerConfigurationsClient)(nil) @@ -752,7 +843,9 @@ type P2sVpnGatewaysClientAPI interface { 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } diff --git a/services/network/mgmt/2018-10-01/network/operations.go b/services/network/mgmt/2018-10-01/network/operations.go index ac506d639cb5..fbd7e01dd064 100644 --- a/services/network/mgmt/2018-10-01/network/operations.go +++ b/services/network/mgmt/2018-10-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/p2svpngateways.go b/services/network/mgmt/2018-10-01/network/p2svpngateways.go index be9a66b39f83..fdd7b2538d83 100644 --- a/services/network/mgmt/2018-10-01/network/p2svpngateways.go +++ b/services/network/mgmt/2018-10-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/p2svpnserverconfigurations.go b/services/network/mgmt/2018-10-01/network/p2svpnserverconfigurations.go index 00c813d662d4..03ee6b838f8f 100644 --- a/services/network/mgmt/2018-10-01/network/p2svpnserverconfigurations.go +++ b/services/network/mgmt/2018-10-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-10-01/network/packetcaptures.go b/services/network/mgmt/2018-10-01/network/packetcaptures.go index 416fedbaeadf..0303b09a6880 100644 --- a/services/network/mgmt/2018-10-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-10-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/profiles.go b/services/network/mgmt/2018-10-01/network/profiles.go index f21c6fe5166f..82275bd7bc68 100644 --- a/services/network/mgmt/2018-10-01/network/profiles.go +++ b/services/network/mgmt/2018-10-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/publicipaddresses.go b/services/network/mgmt/2018-10-01/network/publicipaddresses.go index 54cd993d71f4..f800c87ae137 100644 --- a/services/network/mgmt/2018-10-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-10-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/publicipprefixes.go b/services/network/mgmt/2018-10-01/network/publicipprefixes.go index 5b0a2d8af239..15a9d5681b88 100644 --- a/services/network/mgmt/2018-10-01/network/publicipprefixes.go +++ b/services/network/mgmt/2018-10-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/routefilterrules.go b/services/network/mgmt/2018-10-01/network/routefilterrules.go index 6435b4936a32..ea24b5a5ca05 100644 --- a/services/network/mgmt/2018-10-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-10-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/routefilters.go b/services/network/mgmt/2018-10-01/network/routefilters.go index 1dcaaef0e13a..95cd96b6da89 100644 --- a/services/network/mgmt/2018-10-01/network/routefilters.go +++ b/services/network/mgmt/2018-10-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/routes.go b/services/network/mgmt/2018-10-01/network/routes.go index c5506c1deed3..581118a3e51b 100644 --- a/services/network/mgmt/2018-10-01/network/routes.go +++ b/services/network/mgmt/2018-10-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/routetables.go b/services/network/mgmt/2018-10-01/network/routetables.go index 15e06db242c7..22a502006258 100644 --- a/services/network/mgmt/2018-10-01/network/routetables.go +++ b/services/network/mgmt/2018-10-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/securitygroups.go b/services/network/mgmt/2018-10-01/network/securitygroups.go index 75b8d454aeac..56a78d38ab32 100644 --- a/services/network/mgmt/2018-10-01/network/securitygroups.go +++ b/services/network/mgmt/2018-10-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/securityrules.go b/services/network/mgmt/2018-10-01/network/securityrules.go index e185b82f0613..877646f46dba 100644 --- a/services/network/mgmt/2018-10-01/network/securityrules.go +++ b/services/network/mgmt/2018-10-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/serviceendpointpolicies.go b/services/network/mgmt/2018-10-01/network/serviceendpointpolicies.go index 7d45d05192bf..7e202f3a37ca 100644 --- a/services/network/mgmt/2018-10-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2018-10-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2018-10-01/network/serviceendpointpolicydefinitions.go index 0e39f573af7c..16a58d6b1f12 100644 --- a/services/network/mgmt/2018-10-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2018-10-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/subnets.go b/services/network/mgmt/2018-10-01/network/subnets.go index 0867512d4aa7..414a30adc6bb 100644 --- a/services/network/mgmt/2018-10-01/network/subnets.go +++ b/services/network/mgmt/2018-10-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/usages.go b/services/network/mgmt/2018-10-01/network/usages.go index 3c96a4f2c516..e5b2c99530ce 100644 --- a/services/network/mgmt/2018-10-01/network/usages.go +++ b/services/network/mgmt/2018-10-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/virtualhubs.go b/services/network/mgmt/2018-10-01/network/virtualhubs.go index d7d6f54b4cca..2c9b6199a2a1 100644 --- a/services/network/mgmt/2018-10-01/network/virtualhubs.go +++ b/services/network/mgmt/2018-10-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-10-01/network/virtualnetworkgatewayconnections.go index 58deedfadb35..7286676a16a1 100644 --- a/services/network/mgmt/2018-10-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-10-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-10-01/network/virtualnetworkgateways.go index 16610c29b670..39aa05738bfe 100644 --- a/services/network/mgmt/2018-10-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-10-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-10-01/network/virtualnetworkpeerings.go index 707cbbda2040..97c6e047f6e1 100644 --- a/services/network/mgmt/2018-10-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-10-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/virtualnetworks.go b/services/network/mgmt/2018-10-01/network/virtualnetworks.go index a368a97be24a..d8ab2649244a 100644 --- a/services/network/mgmt/2018-10-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-10-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/virtualnetworktaps.go b/services/network/mgmt/2018-10-01/network/virtualnetworktaps.go index 49b46f2bec4b..3cc6fcfe49a0 100644 --- a/services/network/mgmt/2018-10-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2018-10-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/virtualwans.go b/services/network/mgmt/2018-10-01/network/virtualwans.go index 7758156310a6..72bfca977728 100644 --- a/services/network/mgmt/2018-10-01/network/virtualwans.go +++ b/services/network/mgmt/2018-10-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/vpnconnections.go b/services/network/mgmt/2018-10-01/network/vpnconnections.go index e4571993177b..0ce9a0085501 100644 --- a/services/network/mgmt/2018-10-01/network/vpnconnections.go +++ b/services/network/mgmt/2018-10-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/vpngateways.go b/services/network/mgmt/2018-10-01/network/vpngateways.go index 2278c7105413..53fe941b941f 100644 --- a/services/network/mgmt/2018-10-01/network/vpngateways.go +++ b/services/network/mgmt/2018-10-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/vpnsites.go b/services/network/mgmt/2018-10-01/network/vpnsites.go index b6e8ac26e9dd..45e0cab544cf 100644 --- a/services/network/mgmt/2018-10-01/network/vpnsites.go +++ b/services/network/mgmt/2018-10-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2018-10-01/network/vpnsitesconfiguration.go index 888b91a434b7..3811a580d889 100644 --- a/services/network/mgmt/2018-10-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2018-10-01/network/vpnsitesconfiguration.go @@ -35,7 +35,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2018-10-01/network/watchers.go b/services/network/mgmt/2018-10-01/network/watchers.go index 365b2aceec97..f1f678dd6e85 100644 --- a/services/network/mgmt/2018-10-01/network/watchers.go +++ b/services/network/mgmt/2018-10-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/applicationgateways.go b/services/network/mgmt/2018-11-01/network/applicationgateways.go index a37ab8cca99e..017a43c53bbc 100644 --- a/services/network/mgmt/2018-11-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-11-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-11-01/network/applicationsecuritygroups.go index 705925ceba1e..c4934cb4ff5b 100644 --- a/services/network/mgmt/2018-11-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-11-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/availabledelegations.go b/services/network/mgmt/2018-11-01/network/availabledelegations.go index 6b0992cbfbff..b115fefffb8f 100644 --- a/services/network/mgmt/2018-11-01/network/availabledelegations.go +++ b/services/network/mgmt/2018-11-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/availableendpointservices.go b/services/network/mgmt/2018-11-01/network/availableendpointservices.go index e4e835f72b07..e168a2bc72ab 100644 --- a/services/network/mgmt/2018-11-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-11-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2018-11-01/network/availableresourcegroupdelegations.go index c20f86d67e46..ebbe9c06ad0c 100644 --- a/services/network/mgmt/2018-11-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2018-11-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2018-11-01/network/azurefirewallfqdntags.go index 0fb525002419..ceed293b645a 100644 --- a/services/network/mgmt/2018-11-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2018-11-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/azurefirewalls.go b/services/network/mgmt/2018-11-01/network/azurefirewalls.go index 0987b067f273..235f8773406d 100644 --- a/services/network/mgmt/2018-11-01/network/azurefirewalls.go +++ b/services/network/mgmt/2018-11-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-11-01/network/bgpservicecommunities.go index 057f71e46563..67f068f46085 100644 --- a/services/network/mgmt/2018-11-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-11-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/client.go b/services/network/mgmt/2018-11-01/network/client.go index 8fc1637e059f..8b76a6a99a09 100644 --- a/services/network/mgmt/2018-11-01/network/client.go +++ b/services/network/mgmt/2018-11-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-11-01/network/connectionmonitors.go b/services/network/mgmt/2018-11-01/network/connectionmonitors.go index 5dd7d8be4da2..c856721e9980 100644 --- a/services/network/mgmt/2018-11-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-11-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/ddoscustompolicies.go b/services/network/mgmt/2018-11-01/network/ddoscustompolicies.go index 0c9f089b4ede..e77308bcba8f 100644 --- a/services/network/mgmt/2018-11-01/network/ddoscustompolicies.go +++ b/services/network/mgmt/2018-11-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/ddosprotectionplans.go b/services/network/mgmt/2018-11-01/network/ddosprotectionplans.go index 7b03626a5d65..38aba78a7941 100644 --- a/services/network/mgmt/2018-11-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2018-11-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-11-01/network/defaultsecurityrules.go index 848275e97f1d..457543eb875a 100644 --- a/services/network/mgmt/2018-11-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-11-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-11-01/network/expressroutecircuitauthorizations.go index e2de6b284be3..6046454a12af 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-11-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2018-11-01/network/expressroutecircuitconnections.go index 1cb2a0e25b37..7c09598d2905 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2018-11-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-11-01/network/expressroutecircuitpeerings.go index 7d11625dcb9b..de45130901f5 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-11-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressroutecircuits.go b/services/network/mgmt/2018-11-01/network/expressroutecircuits.go index c32aad8a876d..5ca471ba3530 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-11-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressrouteconnections.go b/services/network/mgmt/2018-11-01/network/expressrouteconnections.go index 00e746525492..31246658a89b 100644 --- a/services/network/mgmt/2018-11-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2018-11-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-11-01/network/expressroutecrossconnectionpeerings.go index 69bb033ea767..e80774779831 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-11-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressroutecrossconnections.go b/services/network/mgmt/2018-11-01/network/expressroutecrossconnections.go index c6f612f479e3..9c3c7844941b 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2018-11-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/expressroutegateways.go b/services/network/mgmt/2018-11-01/network/expressroutegateways.go index 2f6739ab058a..a94bde28f6a1 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutegateways.go +++ b/services/network/mgmt/2018-11-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressroutelinks.go b/services/network/mgmt/2018-11-01/network/expressroutelinks.go index dff04e93ba9f..ae58d1cfc784 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutelinks.go +++ b/services/network/mgmt/2018-11-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressrouteports.go b/services/network/mgmt/2018-11-01/network/expressrouteports.go index 7b916502ee46..2e69164d7ef0 100644 --- a/services/network/mgmt/2018-11-01/network/expressrouteports.go +++ b/services/network/mgmt/2018-11-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressrouteportslocations.go b/services/network/mgmt/2018-11-01/network/expressrouteportslocations.go index 783eb8aa2275..71b9171ec531 100644 --- a/services/network/mgmt/2018-11-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2018-11-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-11-01/network/expressrouteserviceproviders.go index 99c534493342..5c37b70029ba 100644 --- a/services/network/mgmt/2018-11-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-11-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2018-11-01/network/hubvirtualnetworkconnections.go index 49e5d9fe218c..2990636cb981 100644 --- a/services/network/mgmt/2018-11-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2018-11-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/inboundnatrules.go b/services/network/mgmt/2018-11-01/network/inboundnatrules.go index cec27071217d..0169dc7a6ed0 100644 --- a/services/network/mgmt/2018-11-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-11-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/interfaceendpoints.go b/services/network/mgmt/2018-11-01/network/interfaceendpoints.go index 01422694a69e..b6fae87bcf86 100644 --- a/services/network/mgmt/2018-11-01/network/interfaceendpoints.go +++ b/services/network/mgmt/2018-11-01/network/interfaceendpoints.go @@ -35,7 +35,9 @@ func NewInterfaceEndpointsClient(subscriptionID string) InterfaceEndpointsClient return NewInterfaceEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client. +// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewInterfaceEndpointsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceEndpointsClient { return InterfaceEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-11-01/network/interfaceipconfigurations.go index 66eb1d64c5be..e656d99bc86a 100644 --- a/services/network/mgmt/2018-11-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-11-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-11-01/network/interfaceloadbalancers.go index 63e8bb1a9ec0..64ed8a91ca66 100644 --- a/services/network/mgmt/2018-11-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-11-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/interfacesgroup.go b/services/network/mgmt/2018-11-01/network/interfacesgroup.go index c5ecaab6c57b..3560616c1fb1 100644 --- a/services/network/mgmt/2018-11-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-11-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/interfacetapconfigurations.go b/services/network/mgmt/2018-11-01/network/interfacetapconfigurations.go index 3b3479f85192..351822409f9f 100644 --- a/services/network/mgmt/2018-11-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2018-11-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-11-01/network/loadbalancerbackendaddresspools.go index 65ca9817e034..63831e3d272b 100644 --- a/services/network/mgmt/2018-11-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-11-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-11-01/network/loadbalancerfrontendipconfigurations.go index 9cdd41d577c3..5713616acc22 100644 --- a/services/network/mgmt/2018-11-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-11-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-11-01/network/loadbalancerloadbalancingrules.go index 9638a9b05630..c5bc13bcd2e2 100644 --- a/services/network/mgmt/2018-11-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-11-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-11-01/network/loadbalancernetworkinterfaces.go index e3efe844e965..70c745d8049d 100644 --- a/services/network/mgmt/2018-11-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-11-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2018-11-01/network/loadbalanceroutboundrules.go index 07444741d8b2..05c54b9060ec 100644 --- a/services/network/mgmt/2018-11-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2018-11-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-11-01/network/loadbalancerprobes.go index 05dd86242161..2197c1df5237 100644 --- a/services/network/mgmt/2018-11-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-11-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/loadbalancers.go b/services/network/mgmt/2018-11-01/network/loadbalancers.go index 9a80c63e0101..cc2d651c59ea 100644 --- a/services/network/mgmt/2018-11-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-11-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/localnetworkgateways.go b/services/network/mgmt/2018-11-01/network/localnetworkgateways.go index 3e9e61d70d67..86db299ca26c 100644 --- a/services/network/mgmt/2018-11-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-11-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-11-01/network/networkapi/interfaces.go index 6eb113b4abe4..a6071d097227 100644 --- a/services/network/mgmt/2018-11-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-11-01/network/networkapi/interfaces.go @@ -38,12 +38,15 @@ type ApplicationGatewaysClientAPI interface { 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) @@ -58,7 +61,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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.ApplicationSecurityGroupsUpdateTagsFuture, err error) } @@ -67,6 +72,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -74,6 +80,7 @@ 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) @@ -84,7 +91,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -92,6 +101,7 @@ 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) @@ -112,7 +122,9 @@ type DdosProtectionPlansClientAPI interface { 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.DdosProtectionPlansUpdateTagsFuture, err error) } @@ -121,6 +133,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -131,6 +144,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -141,6 +155,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -151,6 +166,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -163,7 +179,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -175,6 +193,7 @@ 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) @@ -184,8 +203,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -199,6 +220,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -228,6 +250,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -238,7 +261,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -248,6 +273,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -258,7 +284,9 @@ type InterfaceEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (result network.InterfaceEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (result network.InterfaceEndpoint, err error) List(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultIterator, err error) ListBySubscription(ctx context.Context) (result network.InterfaceEndpointListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result network.InterfaceEndpointListResultIterator, err error) } var _ InterfaceEndpointsClientAPI = (*network.InterfaceEndpointsClient)(nil) @@ -269,7 +297,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -279,6 +309,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -287,6 +318,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -297,6 +329,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -305,6 +338,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -313,6 +347,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -320,6 +355,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -328,6 +364,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -341,11 +378,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -355,6 +397,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -362,6 +405,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -372,6 +416,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -382,7 +427,9 @@ type ProfilesClientAPI interface { 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) } @@ -394,7 +441,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -406,6 +455,7 @@ type SecurityRulesClientAPI interface { 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) @@ -414,6 +464,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -470,6 +521,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -481,9 +533,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -495,7 +551,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -507,7 +565,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -519,6 +579,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -530,7 +591,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -542,6 +605,7 @@ type RoutesClientAPI interface { 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) @@ -549,6 +613,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -559,7 +624,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -571,6 +638,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -578,6 +646,7 @@ var _ ServiceEndpointPolicyDefinitionsClientAPI = (*network.ServiceEndpointPolic // 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) @@ -589,8 +658,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -602,6 +674,7 @@ type SubnetsClientAPI interface { 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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -612,6 +685,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -629,7 +703,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -647,6 +723,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -660,6 +737,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -671,7 +749,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -683,7 +763,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -695,7 +777,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -714,7 +798,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -724,6 +810,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -734,7 +821,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -746,6 +835,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -756,6 +846,7 @@ type P2sVpnServerConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2sVpnServerConfigurationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2SVpnServerConfiguration, err error) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultPage, err error) + ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultIterator, err error) } var _ P2sVpnServerConfigurationsClientAPI = (*network.P2sVpnServerConfigurationsClient)(nil) @@ -767,7 +858,9 @@ type P2sVpnGatewaysClientAPI interface { 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } diff --git a/services/network/mgmt/2018-11-01/network/operations.go b/services/network/mgmt/2018-11-01/network/operations.go index a19bd6cb7605..e4a96d153112 100644 --- a/services/network/mgmt/2018-11-01/network/operations.go +++ b/services/network/mgmt/2018-11-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/p2svpngateways.go b/services/network/mgmt/2018-11-01/network/p2svpngateways.go index 3866f12f0624..0347712eddc0 100644 --- a/services/network/mgmt/2018-11-01/network/p2svpngateways.go +++ b/services/network/mgmt/2018-11-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/p2svpnserverconfigurations.go b/services/network/mgmt/2018-11-01/network/p2svpnserverconfigurations.go index 976ef277d68c..a905334e7d5a 100644 --- a/services/network/mgmt/2018-11-01/network/p2svpnserverconfigurations.go +++ b/services/network/mgmt/2018-11-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-11-01/network/packetcaptures.go b/services/network/mgmt/2018-11-01/network/packetcaptures.go index 2a727ac62bd5..798dea030578 100644 --- a/services/network/mgmt/2018-11-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-11-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/profiles.go b/services/network/mgmt/2018-11-01/network/profiles.go index 214c68b6e31d..7eb8753117bd 100644 --- a/services/network/mgmt/2018-11-01/network/profiles.go +++ b/services/network/mgmt/2018-11-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/publicipaddresses.go b/services/network/mgmt/2018-11-01/network/publicipaddresses.go index 030dcce8cdb9..6f9650cae822 100644 --- a/services/network/mgmt/2018-11-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-11-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/publicipprefixes.go b/services/network/mgmt/2018-11-01/network/publicipprefixes.go index a2a069b41c62..26de68d1dd95 100644 --- a/services/network/mgmt/2018-11-01/network/publicipprefixes.go +++ b/services/network/mgmt/2018-11-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/routefilterrules.go b/services/network/mgmt/2018-11-01/network/routefilterrules.go index 21e832b2c5b9..e3843f6172e8 100644 --- a/services/network/mgmt/2018-11-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-11-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/routefilters.go b/services/network/mgmt/2018-11-01/network/routefilters.go index 5c813ec00ae3..db5701af0bf2 100644 --- a/services/network/mgmt/2018-11-01/network/routefilters.go +++ b/services/network/mgmt/2018-11-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/routes.go b/services/network/mgmt/2018-11-01/network/routes.go index 1dbd32f39650..4e49a0a357e6 100644 --- a/services/network/mgmt/2018-11-01/network/routes.go +++ b/services/network/mgmt/2018-11-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/routetables.go b/services/network/mgmt/2018-11-01/network/routetables.go index 4bfbe2f7795e..1fa4a26150a1 100644 --- a/services/network/mgmt/2018-11-01/network/routetables.go +++ b/services/network/mgmt/2018-11-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/securitygroups.go b/services/network/mgmt/2018-11-01/network/securitygroups.go index 2244027e7c09..136ba34e4e27 100644 --- a/services/network/mgmt/2018-11-01/network/securitygroups.go +++ b/services/network/mgmt/2018-11-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/securityrules.go b/services/network/mgmt/2018-11-01/network/securityrules.go index eb9a740e9573..a1de1ab110d5 100644 --- a/services/network/mgmt/2018-11-01/network/securityrules.go +++ b/services/network/mgmt/2018-11-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/serviceendpointpolicies.go b/services/network/mgmt/2018-11-01/network/serviceendpointpolicies.go index ce4729d58b45..4cd730ccd80d 100644 --- a/services/network/mgmt/2018-11-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2018-11-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2018-11-01/network/serviceendpointpolicydefinitions.go index 587705bcfe48..eb666bb73237 100644 --- a/services/network/mgmt/2018-11-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2018-11-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/subnets.go b/services/network/mgmt/2018-11-01/network/subnets.go index 2161d1230066..9579ebeb65d8 100644 --- a/services/network/mgmt/2018-11-01/network/subnets.go +++ b/services/network/mgmt/2018-11-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/usages.go b/services/network/mgmt/2018-11-01/network/usages.go index 341241adf2f2..959ff7c198c0 100644 --- a/services/network/mgmt/2018-11-01/network/usages.go +++ b/services/network/mgmt/2018-11-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/virtualhubs.go b/services/network/mgmt/2018-11-01/network/virtualhubs.go index e72a37caabfd..9493c6519d18 100644 --- a/services/network/mgmt/2018-11-01/network/virtualhubs.go +++ b/services/network/mgmt/2018-11-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-11-01/network/virtualnetworkgatewayconnections.go index f705bee65c66..b55db01df4df 100644 --- a/services/network/mgmt/2018-11-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-11-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-11-01/network/virtualnetworkgateways.go index f170e82d20bd..e79838ffc47c 100644 --- a/services/network/mgmt/2018-11-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-11-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-11-01/network/virtualnetworkpeerings.go index 7415d407e3db..bf460be3412c 100644 --- a/services/network/mgmt/2018-11-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-11-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/virtualnetworks.go b/services/network/mgmt/2018-11-01/network/virtualnetworks.go index f82be17c246d..cfa1f6b6f50a 100644 --- a/services/network/mgmt/2018-11-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-11-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/virtualnetworktaps.go b/services/network/mgmt/2018-11-01/network/virtualnetworktaps.go index aa736e3e84ea..41b9a2dbece6 100644 --- a/services/network/mgmt/2018-11-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2018-11-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/virtualwans.go b/services/network/mgmt/2018-11-01/network/virtualwans.go index a93847ecaeed..bb1cc9ee2473 100644 --- a/services/network/mgmt/2018-11-01/network/virtualwans.go +++ b/services/network/mgmt/2018-11-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/vpnconnections.go b/services/network/mgmt/2018-11-01/network/vpnconnections.go index 3602bcd3a5b0..fa9ff00d66bc 100644 --- a/services/network/mgmt/2018-11-01/network/vpnconnections.go +++ b/services/network/mgmt/2018-11-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/vpngateways.go b/services/network/mgmt/2018-11-01/network/vpngateways.go index 6c09be3074bd..7384792e0ecc 100644 --- a/services/network/mgmt/2018-11-01/network/vpngateways.go +++ b/services/network/mgmt/2018-11-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/vpnsites.go b/services/network/mgmt/2018-11-01/network/vpnsites.go index 1dba1a5cb618..8022d6f845b3 100644 --- a/services/network/mgmt/2018-11-01/network/vpnsites.go +++ b/services/network/mgmt/2018-11-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2018-11-01/network/vpnsitesconfiguration.go index 4f1c2318e2ac..2369eaa25e89 100644 --- a/services/network/mgmt/2018-11-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2018-11-01/network/vpnsitesconfiguration.go @@ -35,7 +35,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2018-11-01/network/watchers.go b/services/network/mgmt/2018-11-01/network/watchers.go index 26c14759295b..25e41f830edd 100644 --- a/services/network/mgmt/2018-11-01/network/watchers.go +++ b/services/network/mgmt/2018-11-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/applicationgateways.go b/services/network/mgmt/2018-12-01/network/applicationgateways.go index cc48a66c2980..1feff391d89f 100644 --- a/services/network/mgmt/2018-12-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-12-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/applicationsecuritygroups.go b/services/network/mgmt/2018-12-01/network/applicationsecuritygroups.go index 5a29905be5d2..4738701baed1 100644 --- a/services/network/mgmt/2018-12-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2018-12-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/availabledelegations.go b/services/network/mgmt/2018-12-01/network/availabledelegations.go index b56bf1fc6884..2978f020385e 100644 --- a/services/network/mgmt/2018-12-01/network/availabledelegations.go +++ b/services/network/mgmt/2018-12-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/availableendpointservices.go b/services/network/mgmt/2018-12-01/network/availableendpointservices.go index e0be03e5d7da..f553711fb21d 100644 --- a/services/network/mgmt/2018-12-01/network/availableendpointservices.go +++ b/services/network/mgmt/2018-12-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2018-12-01/network/availableresourcegroupdelegations.go index f8f71bc8003c..918908942fef 100644 --- a/services/network/mgmt/2018-12-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2018-12-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2018-12-01/network/azurefirewallfqdntags.go index 5c4322a73334..3f1559beb746 100644 --- a/services/network/mgmt/2018-12-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2018-12-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/azurefirewalls.go b/services/network/mgmt/2018-12-01/network/azurefirewalls.go index f6ef8ed20b6b..b728d465b1bb 100644 --- a/services/network/mgmt/2018-12-01/network/azurefirewalls.go +++ b/services/network/mgmt/2018-12-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/bgpservicecommunities.go b/services/network/mgmt/2018-12-01/network/bgpservicecommunities.go index 4ebec5676a65..4ba08208a3f2 100644 --- a/services/network/mgmt/2018-12-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2018-12-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/client.go b/services/network/mgmt/2018-12-01/network/client.go index d828f9091dd7..a7a1838cd924 100644 --- a/services/network/mgmt/2018-12-01/network/client.go +++ b/services/network/mgmt/2018-12-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2018-12-01/network/connectionmonitors.go b/services/network/mgmt/2018-12-01/network/connectionmonitors.go index 21559ad7ff0e..feaed8c1c0b0 100644 --- a/services/network/mgmt/2018-12-01/network/connectionmonitors.go +++ b/services/network/mgmt/2018-12-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/ddoscustompolicies.go b/services/network/mgmt/2018-12-01/network/ddoscustompolicies.go index abec5cdaaa8f..925de11ca567 100644 --- a/services/network/mgmt/2018-12-01/network/ddoscustompolicies.go +++ b/services/network/mgmt/2018-12-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/ddosprotectionplans.go b/services/network/mgmt/2018-12-01/network/ddosprotectionplans.go index 475cc54622c3..9332a627a893 100644 --- a/services/network/mgmt/2018-12-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2018-12-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/defaultsecurityrules.go b/services/network/mgmt/2018-12-01/network/defaultsecurityrules.go index 13168e9efbab..54004eb4db27 100644 --- a/services/network/mgmt/2018-12-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2018-12-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2018-12-01/network/expressroutecircuitauthorizations.go index 25f4b6f74cb1..ba1c060ddf07 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2018-12-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2018-12-01/network/expressroutecircuitconnections.go index 8aa02346771f..43a1e20448c5 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2018-12-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go index f3d156793ef5..a0e16616b733 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressroutecircuits.go b/services/network/mgmt/2018-12-01/network/expressroutecircuits.go index ffad40c249e3..fe328634cf58 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2018-12-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressrouteconnections.go b/services/network/mgmt/2018-12-01/network/expressrouteconnections.go index f5a9aa561c7e..3e106f7a5c4f 100644 --- a/services/network/mgmt/2018-12-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2018-12-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go index 8b2a926cfd0f..7d6f78b325db 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressroutecrossconnections.go b/services/network/mgmt/2018-12-01/network/expressroutecrossconnections.go index 1d3979532814..9a0c5006a09f 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2018-12-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/expressroutegateways.go b/services/network/mgmt/2018-12-01/network/expressroutegateways.go index dd76946e576a..b95d8c9c1705 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutegateways.go +++ b/services/network/mgmt/2018-12-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressroutelinks.go b/services/network/mgmt/2018-12-01/network/expressroutelinks.go index 43acdc1b19b7..4640758fd2e4 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutelinks.go +++ b/services/network/mgmt/2018-12-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressrouteports.go b/services/network/mgmt/2018-12-01/network/expressrouteports.go index 260d652e8cc7..b1856fa44608 100644 --- a/services/network/mgmt/2018-12-01/network/expressrouteports.go +++ b/services/network/mgmt/2018-12-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressrouteportslocations.go b/services/network/mgmt/2018-12-01/network/expressrouteportslocations.go index ff825bdd3dcd..2c5ef7ba9e6c 100644 --- a/services/network/mgmt/2018-12-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2018-12-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2018-12-01/network/expressrouteserviceproviders.go index c578a1e47bf0..bf7d2480142e 100644 --- a/services/network/mgmt/2018-12-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2018-12-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2018-12-01/network/hubvirtualnetworkconnections.go index 1faf332292b2..1ce9393d308b 100644 --- a/services/network/mgmt/2018-12-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2018-12-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/inboundnatrules.go b/services/network/mgmt/2018-12-01/network/inboundnatrules.go index 4e38ae3fe3a4..fa2c0f6f3bd9 100644 --- a/services/network/mgmt/2018-12-01/network/inboundnatrules.go +++ b/services/network/mgmt/2018-12-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/interfaceendpoints.go b/services/network/mgmt/2018-12-01/network/interfaceendpoints.go index 8693933138b0..d408e99d3aa6 100644 --- a/services/network/mgmt/2018-12-01/network/interfaceendpoints.go +++ b/services/network/mgmt/2018-12-01/network/interfaceendpoints.go @@ -35,7 +35,9 @@ func NewInterfaceEndpointsClient(subscriptionID string) InterfaceEndpointsClient return NewInterfaceEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client. +// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewInterfaceEndpointsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceEndpointsClient { return InterfaceEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/interfaceipconfigurations.go b/services/network/mgmt/2018-12-01/network/interfaceipconfigurations.go index fda9948c8339..8efe5defc9fd 100644 --- a/services/network/mgmt/2018-12-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2018-12-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/interfaceloadbalancers.go b/services/network/mgmt/2018-12-01/network/interfaceloadbalancers.go index 8df5132c983a..8dbc33f6b275 100644 --- a/services/network/mgmt/2018-12-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2018-12-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/interfacesgroup.go b/services/network/mgmt/2018-12-01/network/interfacesgroup.go index 815da9c46792..03df7ec10eb9 100644 --- a/services/network/mgmt/2018-12-01/network/interfacesgroup.go +++ b/services/network/mgmt/2018-12-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/interfacetapconfigurations.go b/services/network/mgmt/2018-12-01/network/interfacetapconfigurations.go index 4a0b7ed0cc0a..da1b6cad890c 100644 --- a/services/network/mgmt/2018-12-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2018-12-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2018-12-01/network/loadbalancerbackendaddresspools.go index e70f0664451a..d0931c96b0f6 100644 --- a/services/network/mgmt/2018-12-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2018-12-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2018-12-01/network/loadbalancerfrontendipconfigurations.go index 3bd423fb2f67..a7ec1cc2e44f 100644 --- a/services/network/mgmt/2018-12-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2018-12-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2018-12-01/network/loadbalancerloadbalancingrules.go index 4b6d6c31d6f6..1e302f2b4def 100644 --- a/services/network/mgmt/2018-12-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2018-12-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2018-12-01/network/loadbalancernetworkinterfaces.go index 65b69588c7cc..938e0d04ac0c 100644 --- a/services/network/mgmt/2018-12-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2018-12-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2018-12-01/network/loadbalanceroutboundrules.go index 38c77fb70a51..e93f0e77194f 100644 --- a/services/network/mgmt/2018-12-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2018-12-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/loadbalancerprobes.go b/services/network/mgmt/2018-12-01/network/loadbalancerprobes.go index cd9e2a2500c9..5b0040a7f798 100644 --- a/services/network/mgmt/2018-12-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2018-12-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/loadbalancers.go b/services/network/mgmt/2018-12-01/network/loadbalancers.go index 0d3b74f77081..f6331ff41b2b 100644 --- a/services/network/mgmt/2018-12-01/network/loadbalancers.go +++ b/services/network/mgmt/2018-12-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/localnetworkgateways.go b/services/network/mgmt/2018-12-01/network/localnetworkgateways.go index 066dbf406d8f..20c0c20259cf 100644 --- a/services/network/mgmt/2018-12-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2018-12-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/networkapi/interfaces.go b/services/network/mgmt/2018-12-01/network/networkapi/interfaces.go index 20fc314b5b35..1b17aecbe149 100644 --- a/services/network/mgmt/2018-12-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2018-12-01/network/networkapi/interfaces.go @@ -38,12 +38,15 @@ type ApplicationGatewaysClientAPI interface { 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) @@ -58,7 +61,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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.ApplicationSecurityGroupsUpdateTagsFuture, err error) } @@ -67,6 +72,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -74,6 +80,7 @@ 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) @@ -84,7 +91,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -92,6 +101,7 @@ 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) @@ -112,7 +122,9 @@ type DdosProtectionPlansClientAPI interface { 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.DdosProtectionPlansUpdateTagsFuture, err error) } @@ -121,6 +133,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -131,6 +144,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -141,6 +155,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -151,6 +166,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -159,6 +175,7 @@ var _ ExpressRouteCircuitConnectionsClientAPI = (*network.ExpressRouteCircuitCon 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) @@ -171,7 +188,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -183,6 +202,7 @@ 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) @@ -192,8 +212,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -207,6 +229,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -236,6 +259,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -246,7 +270,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -256,6 +282,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -266,7 +293,9 @@ type InterfaceEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (result network.InterfaceEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (result network.InterfaceEndpoint, err error) List(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultIterator, err error) ListBySubscription(ctx context.Context) (result network.InterfaceEndpointListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result network.InterfaceEndpointListResultIterator, err error) } var _ InterfaceEndpointsClientAPI = (*network.InterfaceEndpointsClient)(nil) @@ -277,7 +306,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -287,6 +318,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -295,6 +327,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -305,6 +338,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -313,6 +347,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -321,6 +356,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -328,6 +364,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -336,6 +373,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -349,11 +387,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -363,6 +406,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -370,6 +414,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -380,6 +425,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -390,7 +436,9 @@ type ProfilesClientAPI interface { 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) } @@ -402,7 +450,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -414,6 +464,7 @@ type SecurityRulesClientAPI interface { 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) @@ -422,6 +473,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -478,6 +530,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -489,9 +542,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -503,7 +560,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -515,7 +574,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -527,6 +588,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -538,7 +600,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -550,6 +614,7 @@ type RoutesClientAPI interface { 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) @@ -557,6 +622,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -567,7 +633,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -579,6 +647,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -586,6 +655,7 @@ var _ ServiceEndpointPolicyDefinitionsClientAPI = (*network.ServiceEndpointPolic // 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) @@ -597,8 +667,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -610,6 +683,7 @@ type SubnetsClientAPI interface { 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) } @@ -621,6 +695,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -638,7 +713,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -656,6 +733,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -669,6 +747,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -680,7 +759,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -692,7 +773,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -704,7 +787,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -723,7 +808,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -733,6 +820,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -743,7 +831,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -755,6 +845,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -765,6 +856,7 @@ type P2sVpnServerConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2sVpnServerConfigurationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2SVpnServerConfiguration, err error) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultPage, err error) + ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultIterator, err error) } var _ P2sVpnServerConfigurationsClientAPI = (*network.P2sVpnServerConfigurationsClient)(nil) @@ -776,7 +868,9 @@ type P2sVpnGatewaysClientAPI interface { 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } @@ -788,7 +882,9 @@ type WebApplicationFirewallPoliciesClientAPI interface { 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/2018-12-01/network/operations.go b/services/network/mgmt/2018-12-01/network/operations.go index 8ad5923c80bc..dde639b29fa1 100644 --- a/services/network/mgmt/2018-12-01/network/operations.go +++ b/services/network/mgmt/2018-12-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/p2svpngateways.go b/services/network/mgmt/2018-12-01/network/p2svpngateways.go index d1256e399a37..86b314360424 100644 --- a/services/network/mgmt/2018-12-01/network/p2svpngateways.go +++ b/services/network/mgmt/2018-12-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/p2svpnserverconfigurations.go b/services/network/mgmt/2018-12-01/network/p2svpnserverconfigurations.go index aa9638e46110..7f57bb32e2e0 100644 --- a/services/network/mgmt/2018-12-01/network/p2svpnserverconfigurations.go +++ b/services/network/mgmt/2018-12-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2018-12-01/network/packetcaptures.go b/services/network/mgmt/2018-12-01/network/packetcaptures.go index 8c32b8e996ca..1df383071e95 100644 --- a/services/network/mgmt/2018-12-01/network/packetcaptures.go +++ b/services/network/mgmt/2018-12-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2018-12-01/network/peerexpressroutecircuitconnections.go index a7d3a21a0686..390a7c787470 100644 --- a/services/network/mgmt/2018-12-01/network/peerexpressroutecircuitconnections.go +++ b/services/network/mgmt/2018-12-01/network/peerexpressroutecircuitconnections.go @@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr } // NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/profiles.go b/services/network/mgmt/2018-12-01/network/profiles.go index 362193ee7b4f..1a47ccd9f260 100644 --- a/services/network/mgmt/2018-12-01/network/profiles.go +++ b/services/network/mgmt/2018-12-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/publicipaddresses.go b/services/network/mgmt/2018-12-01/network/publicipaddresses.go index 8acaf7f3e922..71488801bf5f 100644 --- a/services/network/mgmt/2018-12-01/network/publicipaddresses.go +++ b/services/network/mgmt/2018-12-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/publicipprefixes.go b/services/network/mgmt/2018-12-01/network/publicipprefixes.go index 6b11bac35b72..2caee3752161 100644 --- a/services/network/mgmt/2018-12-01/network/publicipprefixes.go +++ b/services/network/mgmt/2018-12-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/routefilterrules.go b/services/network/mgmt/2018-12-01/network/routefilterrules.go index 3043eaed2373..0f4c9797e7ac 100644 --- a/services/network/mgmt/2018-12-01/network/routefilterrules.go +++ b/services/network/mgmt/2018-12-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/routefilters.go b/services/network/mgmt/2018-12-01/network/routefilters.go index 6a2e4f380bad..5c442fcfeb6c 100644 --- a/services/network/mgmt/2018-12-01/network/routefilters.go +++ b/services/network/mgmt/2018-12-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/routes.go b/services/network/mgmt/2018-12-01/network/routes.go index ede8a8e4b788..f61703282a34 100644 --- a/services/network/mgmt/2018-12-01/network/routes.go +++ b/services/network/mgmt/2018-12-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/routetables.go b/services/network/mgmt/2018-12-01/network/routetables.go index 5c1ab554a6bd..62b6a566f644 100644 --- a/services/network/mgmt/2018-12-01/network/routetables.go +++ b/services/network/mgmt/2018-12-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/securitygroups.go b/services/network/mgmt/2018-12-01/network/securitygroups.go index 500ac1d16ae2..5d2145297c04 100644 --- a/services/network/mgmt/2018-12-01/network/securitygroups.go +++ b/services/network/mgmt/2018-12-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/securityrules.go b/services/network/mgmt/2018-12-01/network/securityrules.go index 4c7d51e7e2ff..e041ce4ba064 100644 --- a/services/network/mgmt/2018-12-01/network/securityrules.go +++ b/services/network/mgmt/2018-12-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/serviceendpointpolicies.go b/services/network/mgmt/2018-12-01/network/serviceendpointpolicies.go index 5d9cc864f5d1..2495d6f6f99a 100644 --- a/services/network/mgmt/2018-12-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2018-12-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2018-12-01/network/serviceendpointpolicydefinitions.go index 1b0d56242683..6cf6c7a16294 100644 --- a/services/network/mgmt/2018-12-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2018-12-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/subnets.go b/services/network/mgmt/2018-12-01/network/subnets.go index 2091fc9c0ee7..963d26eae4e5 100644 --- a/services/network/mgmt/2018-12-01/network/subnets.go +++ b/services/network/mgmt/2018-12-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/usages.go b/services/network/mgmt/2018-12-01/network/usages.go index 7cd0faa7af50..f26368faa0dc 100644 --- a/services/network/mgmt/2018-12-01/network/usages.go +++ b/services/network/mgmt/2018-12-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/virtualhubs.go b/services/network/mgmt/2018-12-01/network/virtualhubs.go index 9e69acdcdd70..6a33859c77ac 100644 --- a/services/network/mgmt/2018-12-01/network/virtualhubs.go +++ b/services/network/mgmt/2018-12-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go index 1ee9bc8b3453..9bf84bde13f5 100644 --- a/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/virtualnetworkgateways.go b/services/network/mgmt/2018-12-01/network/virtualnetworkgateways.go index 3861be66b987..36dff4724805 100644 --- a/services/network/mgmt/2018-12-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2018-12-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2018-12-01/network/virtualnetworkpeerings.go index 8c502e4629f3..c625105dedb4 100644 --- a/services/network/mgmt/2018-12-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2018-12-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/virtualnetworks.go b/services/network/mgmt/2018-12-01/network/virtualnetworks.go index 2076aebe2f64..fefd314b6659 100644 --- a/services/network/mgmt/2018-12-01/network/virtualnetworks.go +++ b/services/network/mgmt/2018-12-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/virtualnetworktaps.go b/services/network/mgmt/2018-12-01/network/virtualnetworktaps.go index 67c655ebb14b..70417f3dba13 100644 --- a/services/network/mgmt/2018-12-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2018-12-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/virtualwans.go b/services/network/mgmt/2018-12-01/network/virtualwans.go index 9b307390df9c..3a5ea4c2c9ef 100644 --- a/services/network/mgmt/2018-12-01/network/virtualwans.go +++ b/services/network/mgmt/2018-12-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/vpnconnections.go b/services/network/mgmt/2018-12-01/network/vpnconnections.go index 4702748476e2..d1d210cffce2 100644 --- a/services/network/mgmt/2018-12-01/network/vpnconnections.go +++ b/services/network/mgmt/2018-12-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/vpngateways.go b/services/network/mgmt/2018-12-01/network/vpngateways.go index b9ea9f70ed01..fb4d8d6a0d73 100644 --- a/services/network/mgmt/2018-12-01/network/vpngateways.go +++ b/services/network/mgmt/2018-12-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/vpnsites.go b/services/network/mgmt/2018-12-01/network/vpnsites.go index ac82ccc9a1f6..7d10fb37f852 100644 --- a/services/network/mgmt/2018-12-01/network/vpnsites.go +++ b/services/network/mgmt/2018-12-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2018-12-01/network/vpnsitesconfiguration.go index 0222b4f86205..50a577c688ba 100644 --- a/services/network/mgmt/2018-12-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2018-12-01/network/vpnsitesconfiguration.go @@ -35,7 +35,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/watchers.go b/services/network/mgmt/2018-12-01/network/watchers.go index 705af8e0d6f0..484bc51de808 100644 --- a/services/network/mgmt/2018-12-01/network/watchers.go +++ b/services/network/mgmt/2018-12-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2018-12-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2018-12-01/network/webapplicationfirewallpolicies.go index ad9f91391114..3930f1363036 100644 --- a/services/network/mgmt/2018-12-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2018-12-01/network/webapplicationfirewallpolicies.go @@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati } // NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/applicationgateways.go b/services/network/mgmt/2019-02-01/network/applicationgateways.go index 417f87571112..cb71f490b749 100644 --- a/services/network/mgmt/2019-02-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-02-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/applicationsecuritygroups.go b/services/network/mgmt/2019-02-01/network/applicationsecuritygroups.go index 51d0ce19fb83..29dbd60d4e8d 100644 --- a/services/network/mgmt/2019-02-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2019-02-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/availabledelegations.go b/services/network/mgmt/2019-02-01/network/availabledelegations.go index 74b4817bacd2..c831a6ba421d 100644 --- a/services/network/mgmt/2019-02-01/network/availabledelegations.go +++ b/services/network/mgmt/2019-02-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/availableendpointservices.go b/services/network/mgmt/2019-02-01/network/availableendpointservices.go index 18b241ebeab9..35da39b325be 100644 --- a/services/network/mgmt/2019-02-01/network/availableendpointservices.go +++ b/services/network/mgmt/2019-02-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2019-02-01/network/availableresourcegroupdelegations.go index 0a59bf0e2be8..24d80a495f5d 100644 --- a/services/network/mgmt/2019-02-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2019-02-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2019-02-01/network/azurefirewallfqdntags.go index f9415dfe2180..95b7f83fcb19 100644 --- a/services/network/mgmt/2019-02-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2019-02-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/azurefirewalls.go b/services/network/mgmt/2019-02-01/network/azurefirewalls.go index 1f34534c57f9..d684a2427954 100644 --- a/services/network/mgmt/2019-02-01/network/azurefirewalls.go +++ b/services/network/mgmt/2019-02-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/bgpservicecommunities.go b/services/network/mgmt/2019-02-01/network/bgpservicecommunities.go index aa1d38d5308c..3180fa3a243f 100644 --- a/services/network/mgmt/2019-02-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2019-02-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/client.go b/services/network/mgmt/2019-02-01/network/client.go index c91471a455e8..9c27a2575376 100644 --- a/services/network/mgmt/2019-02-01/network/client.go +++ b/services/network/mgmt/2019-02-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2019-02-01/network/connectionmonitors.go b/services/network/mgmt/2019-02-01/network/connectionmonitors.go index d1a316d829c8..75c0d9e8e689 100644 --- a/services/network/mgmt/2019-02-01/network/connectionmonitors.go +++ b/services/network/mgmt/2019-02-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/ddoscustompolicies.go b/services/network/mgmt/2019-02-01/network/ddoscustompolicies.go index 3cf5ed5c0720..10bde707413a 100644 --- a/services/network/mgmt/2019-02-01/network/ddoscustompolicies.go +++ b/services/network/mgmt/2019-02-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/ddosprotectionplans.go b/services/network/mgmt/2019-02-01/network/ddosprotectionplans.go index bb8f57e53631..8d2adac6d138 100644 --- a/services/network/mgmt/2019-02-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2019-02-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/defaultsecurityrules.go b/services/network/mgmt/2019-02-01/network/defaultsecurityrules.go index 6e2856020bda..19dd4560a89c 100644 --- a/services/network/mgmt/2019-02-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2019-02-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2019-02-01/network/expressroutecircuitauthorizations.go index 725db3582cb3..af2a772e9eed 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2019-02-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2019-02-01/network/expressroutecircuitconnections.go index f9e246ba28a1..d3c155b5c267 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2019-02-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-02-01/network/expressroutecircuitpeerings.go index 5f9bf3b57d34..cdac558d398b 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-02-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressroutecircuits.go b/services/network/mgmt/2019-02-01/network/expressroutecircuits.go index 44490510d51a..69ceaed43929 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2019-02-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressrouteconnections.go b/services/network/mgmt/2019-02-01/network/expressrouteconnections.go index 12dad526c3d6..dcb8b6d91f41 100644 --- a/services/network/mgmt/2019-02-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2019-02-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-02-01/network/expressroutecrossconnectionpeerings.go index ec17d6654368..7c2722051888 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-02-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressroutecrossconnections.go b/services/network/mgmt/2019-02-01/network/expressroutecrossconnections.go index 588eff7f109d..9bc519cd7d05 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2019-02-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/expressroutegateways.go b/services/network/mgmt/2019-02-01/network/expressroutegateways.go index 6ff631c3d6c5..07c7a0b713a8 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutegateways.go +++ b/services/network/mgmt/2019-02-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressroutelinks.go b/services/network/mgmt/2019-02-01/network/expressroutelinks.go index cc945ede9635..d093a0569385 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutelinks.go +++ b/services/network/mgmt/2019-02-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressrouteports.go b/services/network/mgmt/2019-02-01/network/expressrouteports.go index 92ab84db7c58..23a68377e7eb 100644 --- a/services/network/mgmt/2019-02-01/network/expressrouteports.go +++ b/services/network/mgmt/2019-02-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressrouteportslocations.go b/services/network/mgmt/2019-02-01/network/expressrouteportslocations.go index ef24e1b31116..d7bc86ec18da 100644 --- a/services/network/mgmt/2019-02-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2019-02-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2019-02-01/network/expressrouteserviceproviders.go index b25e13535072..fdeb49d90523 100644 --- a/services/network/mgmt/2019-02-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2019-02-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2019-02-01/network/hubvirtualnetworkconnections.go index 9e058729b663..a1e632b4f720 100644 --- a/services/network/mgmt/2019-02-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2019-02-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/inboundnatrules.go b/services/network/mgmt/2019-02-01/network/inboundnatrules.go index 64d8bf6bd0b9..d845a09e6b2b 100644 --- a/services/network/mgmt/2019-02-01/network/inboundnatrules.go +++ b/services/network/mgmt/2019-02-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/interfaceendpoints.go b/services/network/mgmt/2019-02-01/network/interfaceendpoints.go index 1da6ada14f0e..d600675cf27a 100644 --- a/services/network/mgmt/2019-02-01/network/interfaceendpoints.go +++ b/services/network/mgmt/2019-02-01/network/interfaceendpoints.go @@ -35,7 +35,9 @@ func NewInterfaceEndpointsClient(subscriptionID string) InterfaceEndpointsClient return NewInterfaceEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client. +// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewInterfaceEndpointsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceEndpointsClient { return InterfaceEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/interfaceipconfigurations.go b/services/network/mgmt/2019-02-01/network/interfaceipconfigurations.go index 5f915ac09c1d..a6e46aa67d33 100644 --- a/services/network/mgmt/2019-02-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2019-02-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/interfaceloadbalancers.go b/services/network/mgmt/2019-02-01/network/interfaceloadbalancers.go index 0abe507d857a..aca4547f5e0f 100644 --- a/services/network/mgmt/2019-02-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2019-02-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/interfacesgroup.go b/services/network/mgmt/2019-02-01/network/interfacesgroup.go index 9691364c8dfe..262cc00a4d96 100644 --- a/services/network/mgmt/2019-02-01/network/interfacesgroup.go +++ b/services/network/mgmt/2019-02-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/interfacetapconfigurations.go b/services/network/mgmt/2019-02-01/network/interfacetapconfigurations.go index abe850515196..31e7f8d68d56 100644 --- a/services/network/mgmt/2019-02-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2019-02-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2019-02-01/network/loadbalancerbackendaddresspools.go index ba147799374b..5b7cca193f73 100644 --- a/services/network/mgmt/2019-02-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2019-02-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2019-02-01/network/loadbalancerfrontendipconfigurations.go index c13fb411744a..f7c430b8e9fa 100644 --- a/services/network/mgmt/2019-02-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2019-02-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2019-02-01/network/loadbalancerloadbalancingrules.go index 6a3ededfa10f..cfaaefd4a28f 100644 --- a/services/network/mgmt/2019-02-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2019-02-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2019-02-01/network/loadbalancernetworkinterfaces.go index ca0d2fc9b811..f37351989fe3 100644 --- a/services/network/mgmt/2019-02-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2019-02-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2019-02-01/network/loadbalanceroutboundrules.go index b25dba7fef67..a59ec6dce17e 100644 --- a/services/network/mgmt/2019-02-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2019-02-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/loadbalancerprobes.go b/services/network/mgmt/2019-02-01/network/loadbalancerprobes.go index a1b0f97ca2c1..d95a520aea7b 100644 --- a/services/network/mgmt/2019-02-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2019-02-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/loadbalancers.go b/services/network/mgmt/2019-02-01/network/loadbalancers.go index c1d1a17fce75..a50260aff7ce 100644 --- a/services/network/mgmt/2019-02-01/network/loadbalancers.go +++ b/services/network/mgmt/2019-02-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/localnetworkgateways.go b/services/network/mgmt/2019-02-01/network/localnetworkgateways.go index d1c31b7a338d..6204c08e21e3 100644 --- a/services/network/mgmt/2019-02-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2019-02-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/natgateways.go b/services/network/mgmt/2019-02-01/network/natgateways.go index 8a0ff9005f73..0adf2ab52dc7 100644 --- a/services/network/mgmt/2019-02-01/network/natgateways.go +++ b/services/network/mgmt/2019-02-01/network/natgateways.go @@ -35,7 +35,8 @@ func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/networkapi/interfaces.go b/services/network/mgmt/2019-02-01/network/networkapi/interfaces.go index 0ac4cd088e4a..46aca35a0de8 100644 --- a/services/network/mgmt/2019-02-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2019-02-01/network/networkapi/interfaces.go @@ -39,12 +39,15 @@ type ApplicationGatewaysClientAPI interface { 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) @@ -59,7 +62,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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.ApplicationSecurityGroupsUpdateTagsFuture, err error) } @@ -68,6 +73,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -75,6 +81,7 @@ 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) @@ -85,7 +92,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -93,6 +102,7 @@ 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) @@ -113,7 +123,9 @@ type DdosProtectionPlansClientAPI interface { 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.DdosProtectionPlansUpdateTagsFuture, err error) } @@ -122,6 +134,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -132,6 +145,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -142,6 +156,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -152,6 +167,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -160,6 +176,7 @@ var _ ExpressRouteCircuitConnectionsClientAPI = (*network.ExpressRouteCircuitCon 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) @@ -172,7 +189,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -184,6 +203,7 @@ 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) @@ -193,8 +213,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -208,6 +230,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -237,6 +260,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -247,7 +271,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -257,6 +283,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -267,7 +294,9 @@ type InterfaceEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (result network.InterfaceEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (result network.InterfaceEndpoint, err error) List(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.InterfaceEndpointListResultIterator, err error) ListBySubscription(ctx context.Context) (result network.InterfaceEndpointListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result network.InterfaceEndpointListResultIterator, err error) } var _ InterfaceEndpointsClientAPI = (*network.InterfaceEndpointsClient)(nil) @@ -278,7 +307,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -288,6 +319,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -296,6 +328,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -306,6 +339,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -314,6 +348,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -322,6 +357,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -329,6 +365,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -337,6 +374,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -347,7 +385,9 @@ type NatGatewaysClientAPI interface { 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) } @@ -362,11 +402,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -376,6 +421,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -383,6 +429,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -393,6 +440,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -403,7 +451,9 @@ type ProfilesClientAPI interface { 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) } @@ -415,7 +465,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -427,6 +479,7 @@ type SecurityRulesClientAPI interface { 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) @@ -435,6 +488,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -491,6 +545,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -502,9 +557,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -516,7 +575,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -528,7 +589,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -540,6 +603,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -551,7 +615,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -563,6 +629,7 @@ type RoutesClientAPI interface { 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) @@ -570,6 +637,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -580,7 +648,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -592,6 +662,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -599,6 +670,7 @@ var _ ServiceEndpointPolicyDefinitionsClientAPI = (*network.ServiceEndpointPolic // 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) @@ -610,8 +682,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -623,6 +698,7 @@ type SubnetsClientAPI interface { 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) } @@ -648,6 +724,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -665,7 +742,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -683,6 +762,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -696,6 +776,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -707,7 +788,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -719,7 +802,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -731,7 +816,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -750,7 +837,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -760,6 +849,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -770,7 +860,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -782,6 +874,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -792,6 +885,7 @@ type P2sVpnServerConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2sVpnServerConfigurationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2SVpnServerConfiguration, err error) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultPage, err error) + ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultIterator, err error) } var _ P2sVpnServerConfigurationsClientAPI = (*network.P2sVpnServerConfigurationsClient)(nil) @@ -803,7 +897,9 @@ type P2sVpnGatewaysClientAPI interface { 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } @@ -815,7 +911,9 @@ type WebApplicationFirewallPoliciesClientAPI interface { 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/2019-02-01/network/operations.go b/services/network/mgmt/2019-02-01/network/operations.go index 4625a104dc83..c89a567a67b0 100644 --- a/services/network/mgmt/2019-02-01/network/operations.go +++ b/services/network/mgmt/2019-02-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/p2svpngateways.go b/services/network/mgmt/2019-02-01/network/p2svpngateways.go index 2854cda2e1aa..2aaf45615beb 100644 --- a/services/network/mgmt/2019-02-01/network/p2svpngateways.go +++ b/services/network/mgmt/2019-02-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/p2svpnserverconfigurations.go b/services/network/mgmt/2019-02-01/network/p2svpnserverconfigurations.go index cf1a7d8e464d..4219ee0f4f2f 100644 --- a/services/network/mgmt/2019-02-01/network/p2svpnserverconfigurations.go +++ b/services/network/mgmt/2019-02-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-02-01/network/packetcaptures.go b/services/network/mgmt/2019-02-01/network/packetcaptures.go index e90817d3bc50..bbcfd3ea433a 100644 --- a/services/network/mgmt/2019-02-01/network/packetcaptures.go +++ b/services/network/mgmt/2019-02-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2019-02-01/network/peerexpressroutecircuitconnections.go index b281779c513d..43993b2d4f84 100644 --- a/services/network/mgmt/2019-02-01/network/peerexpressroutecircuitconnections.go +++ b/services/network/mgmt/2019-02-01/network/peerexpressroutecircuitconnections.go @@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr } // NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/profiles.go b/services/network/mgmt/2019-02-01/network/profiles.go index dbbdbf557138..55a636fa5f09 100644 --- a/services/network/mgmt/2019-02-01/network/profiles.go +++ b/services/network/mgmt/2019-02-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/publicipaddresses.go b/services/network/mgmt/2019-02-01/network/publicipaddresses.go index 48c0631c195e..cc86e27a6d0f 100644 --- a/services/network/mgmt/2019-02-01/network/publicipaddresses.go +++ b/services/network/mgmt/2019-02-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/publicipprefixes.go b/services/network/mgmt/2019-02-01/network/publicipprefixes.go index b2245def49ef..a1854edc10f5 100644 --- a/services/network/mgmt/2019-02-01/network/publicipprefixes.go +++ b/services/network/mgmt/2019-02-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/resourcenavigationlinks.go b/services/network/mgmt/2019-02-01/network/resourcenavigationlinks.go index e98118466da3..743f42d8e337 100644 --- a/services/network/mgmt/2019-02-01/network/resourcenavigationlinks.go +++ b/services/network/mgmt/2019-02-01/network/resourcenavigationlinks.go @@ -35,7 +35,9 @@ func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationL return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/routefilterrules.go b/services/network/mgmt/2019-02-01/network/routefilterrules.go index 1bf4ca80d695..eff38f96420f 100644 --- a/services/network/mgmt/2019-02-01/network/routefilterrules.go +++ b/services/network/mgmt/2019-02-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/routefilters.go b/services/network/mgmt/2019-02-01/network/routefilters.go index 768c209dab4c..caa2f008911a 100644 --- a/services/network/mgmt/2019-02-01/network/routefilters.go +++ b/services/network/mgmt/2019-02-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/routes.go b/services/network/mgmt/2019-02-01/network/routes.go index 09c08c73e7a8..fe5b7b9ee68f 100644 --- a/services/network/mgmt/2019-02-01/network/routes.go +++ b/services/network/mgmt/2019-02-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/routetables.go b/services/network/mgmt/2019-02-01/network/routetables.go index 4beb4cdbfe36..e4440e918bda 100644 --- a/services/network/mgmt/2019-02-01/network/routetables.go +++ b/services/network/mgmt/2019-02-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/securitygroups.go b/services/network/mgmt/2019-02-01/network/securitygroups.go index 4d3d756b4a07..a3750a2d6930 100644 --- a/services/network/mgmt/2019-02-01/network/securitygroups.go +++ b/services/network/mgmt/2019-02-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/securityrules.go b/services/network/mgmt/2019-02-01/network/securityrules.go index b41722c5b5bc..a2c044bd7cf0 100644 --- a/services/network/mgmt/2019-02-01/network/securityrules.go +++ b/services/network/mgmt/2019-02-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/serviceassociationlinks.go b/services/network/mgmt/2019-02-01/network/serviceassociationlinks.go index dd5758f5f74f..db861a6edbb8 100644 --- a/services/network/mgmt/2019-02-01/network/serviceassociationlinks.go +++ b/services/network/mgmt/2019-02-01/network/serviceassociationlinks.go @@ -35,7 +35,9 @@ func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationL return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/serviceendpointpolicies.go b/services/network/mgmt/2019-02-01/network/serviceendpointpolicies.go index 7d65e22291fe..43a412da0e03 100644 --- a/services/network/mgmt/2019-02-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2019-02-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2019-02-01/network/serviceendpointpolicydefinitions.go index 1dfe1c08a5ff..60c75055c6dc 100644 --- a/services/network/mgmt/2019-02-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2019-02-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/subnets.go b/services/network/mgmt/2019-02-01/network/subnets.go index 1d5485a0e465..8cba74fe5f0d 100644 --- a/services/network/mgmt/2019-02-01/network/subnets.go +++ b/services/network/mgmt/2019-02-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/usages.go b/services/network/mgmt/2019-02-01/network/usages.go index 693ade9672c2..bbbb7f42df99 100644 --- a/services/network/mgmt/2019-02-01/network/usages.go +++ b/services/network/mgmt/2019-02-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/virtualhubs.go b/services/network/mgmt/2019-02-01/network/virtualhubs.go index fe2f2fb10edd..87b8aceac58d 100644 --- a/services/network/mgmt/2019-02-01/network/virtualhubs.go +++ b/services/network/mgmt/2019-02-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-02-01/network/virtualnetworkgatewayconnections.go index 249a7bfbcad3..c41502b144c7 100644 --- a/services/network/mgmt/2019-02-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-02-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/virtualnetworkgateways.go b/services/network/mgmt/2019-02-01/network/virtualnetworkgateways.go index 770ffc302c0a..5b17633d2ca6 100644 --- a/services/network/mgmt/2019-02-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2019-02-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2019-02-01/network/virtualnetworkpeerings.go index f4bf50126a6a..9b1ac1d7d979 100644 --- a/services/network/mgmt/2019-02-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2019-02-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/virtualnetworks.go b/services/network/mgmt/2019-02-01/network/virtualnetworks.go index e3c59959546a..7daa42d3ccf2 100644 --- a/services/network/mgmt/2019-02-01/network/virtualnetworks.go +++ b/services/network/mgmt/2019-02-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/virtualnetworktaps.go b/services/network/mgmt/2019-02-01/network/virtualnetworktaps.go index d9e688cf561d..1b2a5b46fd42 100644 --- a/services/network/mgmt/2019-02-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2019-02-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/virtualwans.go b/services/network/mgmt/2019-02-01/network/virtualwans.go index c7db206e354e..460dbe2e8a6a 100644 --- a/services/network/mgmt/2019-02-01/network/virtualwans.go +++ b/services/network/mgmt/2019-02-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/vpnconnections.go b/services/network/mgmt/2019-02-01/network/vpnconnections.go index 4cfab45036b8..a1cf4b56c9d3 100644 --- a/services/network/mgmt/2019-02-01/network/vpnconnections.go +++ b/services/network/mgmt/2019-02-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/vpngateways.go b/services/network/mgmt/2019-02-01/network/vpngateways.go index 248a15a9f941..fb79c62159b0 100644 --- a/services/network/mgmt/2019-02-01/network/vpngateways.go +++ b/services/network/mgmt/2019-02-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/vpnsites.go b/services/network/mgmt/2019-02-01/network/vpnsites.go index 7aab1d28a7b5..e673531c2d77 100644 --- a/services/network/mgmt/2019-02-01/network/vpnsites.go +++ b/services/network/mgmt/2019-02-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2019-02-01/network/vpnsitesconfiguration.go index a3ed48528ceb..3baaa40bce8c 100644 --- a/services/network/mgmt/2019-02-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2019-02-01/network/vpnsitesconfiguration.go @@ -36,7 +36,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/watchers.go b/services/network/mgmt/2019-02-01/network/watchers.go index db1fb3a9a371..03838144e5bd 100644 --- a/services/network/mgmt/2019-02-01/network/watchers.go +++ b/services/network/mgmt/2019-02-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-02-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-02-01/network/webapplicationfirewallpolicies.go index 1ef39b4b7d32..c101a85115da 100644 --- a/services/network/mgmt/2019-02-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2019-02-01/network/webapplicationfirewallpolicies.go @@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati } // NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/applicationgateways.go b/services/network/mgmt/2019-04-01/network/applicationgateways.go index cdf7eaf18c0f..8e30b22b7041 100644 --- a/services/network/mgmt/2019-04-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-04-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/applicationsecuritygroups.go b/services/network/mgmt/2019-04-01/network/applicationsecuritygroups.go index 858969af3133..9c927e46325d 100644 --- a/services/network/mgmt/2019-04-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2019-04-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/availabledelegations.go b/services/network/mgmt/2019-04-01/network/availabledelegations.go index 2b44fc3c6374..f0b6cb4c1d0e 100644 --- a/services/network/mgmt/2019-04-01/network/availabledelegations.go +++ b/services/network/mgmt/2019-04-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/availableendpointservices.go b/services/network/mgmt/2019-04-01/network/availableendpointservices.go index 618119b4dabe..0720819ce7bd 100644 --- a/services/network/mgmt/2019-04-01/network/availableendpointservices.go +++ b/services/network/mgmt/2019-04-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/availableprivateendpointtypes.go b/services/network/mgmt/2019-04-01/network/availableprivateendpointtypes.go index 61a4f3304239..abac51980ebf 100644 --- a/services/network/mgmt/2019-04-01/network/availableprivateendpointtypes.go +++ b/services/network/mgmt/2019-04-01/network/availableprivateendpointtypes.go @@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv } // NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient -// 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 NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2019-04-01/network/availableresourcegroupdelegations.go index 22085624fc9e..bc632992dfb3 100644 --- a/services/network/mgmt/2019-04-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2019-04-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2019-04-01/network/azurefirewallfqdntags.go index 4664f2847856..76a582f104fe 100644 --- a/services/network/mgmt/2019-04-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2019-04-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/azurefirewalls.go b/services/network/mgmt/2019-04-01/network/azurefirewalls.go index a15c86825c98..a5674e475905 100644 --- a/services/network/mgmt/2019-04-01/network/azurefirewalls.go +++ b/services/network/mgmt/2019-04-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/bastionhosts.go b/services/network/mgmt/2019-04-01/network/bastionhosts.go index ce9d39942a60..0e68f7282b39 100644 --- a/services/network/mgmt/2019-04-01/network/bastionhosts.go +++ b/services/network/mgmt/2019-04-01/network/bastionhosts.go @@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/bgpservicecommunities.go b/services/network/mgmt/2019-04-01/network/bgpservicecommunities.go index 76f35fab1fb2..7b1ac7b9a4c9 100644 --- a/services/network/mgmt/2019-04-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2019-04-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/client.go b/services/network/mgmt/2019-04-01/network/client.go index bfdf27f265fd..cc2cf4a5a7cf 100644 --- a/services/network/mgmt/2019-04-01/network/client.go +++ b/services/network/mgmt/2019-04-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2019-04-01/network/connectionmonitors.go b/services/network/mgmt/2019-04-01/network/connectionmonitors.go index 890825c931db..63090f9c0eca 100644 --- a/services/network/mgmt/2019-04-01/network/connectionmonitors.go +++ b/services/network/mgmt/2019-04-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/ddoscustompolicies.go b/services/network/mgmt/2019-04-01/network/ddoscustompolicies.go index de036894a43c..4df840419dd8 100644 --- a/services/network/mgmt/2019-04-01/network/ddoscustompolicies.go +++ b/services/network/mgmt/2019-04-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/ddosprotectionplans.go b/services/network/mgmt/2019-04-01/network/ddosprotectionplans.go index 08e123eac5cc..f8cd438b7101 100644 --- a/services/network/mgmt/2019-04-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2019-04-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/defaultsecurityrules.go b/services/network/mgmt/2019-04-01/network/defaultsecurityrules.go index de62f2a4143b..f82ec1e3574e 100644 --- a/services/network/mgmt/2019-04-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2019-04-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2019-04-01/network/expressroutecircuitauthorizations.go index 006fd3efcdf1..b030e0a3488f 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2019-04-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2019-04-01/network/expressroutecircuitconnections.go index e4d183920c5d..b77990c245b2 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2019-04-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-04-01/network/expressroutecircuitpeerings.go index e1beb1bd051c..fbee34f0f5e2 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-04-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressroutecircuits.go b/services/network/mgmt/2019-04-01/network/expressroutecircuits.go index 58074d464fb4..7087637e850b 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2019-04-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressrouteconnections.go b/services/network/mgmt/2019-04-01/network/expressrouteconnections.go index 822b4aeaa04f..3d4386f45112 100644 --- a/services/network/mgmt/2019-04-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2019-04-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-04-01/network/expressroutecrossconnectionpeerings.go index ff16998f0fc7..5e12e371460e 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-04-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressroutecrossconnections.go b/services/network/mgmt/2019-04-01/network/expressroutecrossconnections.go index a09c860ddc10..396ee09e3d83 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2019-04-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/expressroutegateways.go b/services/network/mgmt/2019-04-01/network/expressroutegateways.go index b4c49128fec2..d53e64ef8d10 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutegateways.go +++ b/services/network/mgmt/2019-04-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressroutelinks.go b/services/network/mgmt/2019-04-01/network/expressroutelinks.go index af9ddde4845e..282bc413dfed 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutelinks.go +++ b/services/network/mgmt/2019-04-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressrouteports.go b/services/network/mgmt/2019-04-01/network/expressrouteports.go index 92957d779eac..68a00c166ef0 100644 --- a/services/network/mgmt/2019-04-01/network/expressrouteports.go +++ b/services/network/mgmt/2019-04-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressrouteportslocations.go b/services/network/mgmt/2019-04-01/network/expressrouteportslocations.go index 2a5ca66f3d91..c2efa70149b0 100644 --- a/services/network/mgmt/2019-04-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2019-04-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2019-04-01/network/expressrouteserviceproviders.go index bd80eeb8fb60..3650c17767b6 100644 --- a/services/network/mgmt/2019-04-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2019-04-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2019-04-01/network/hubvirtualnetworkconnections.go index 88d2b1d7ef56..ce24d03a7967 100644 --- a/services/network/mgmt/2019-04-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2019-04-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/inboundnatrules.go b/services/network/mgmt/2019-04-01/network/inboundnatrules.go index 95de12e7b71d..f0372fe37d29 100644 --- a/services/network/mgmt/2019-04-01/network/inboundnatrules.go +++ b/services/network/mgmt/2019-04-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/interfaceipconfigurations.go b/services/network/mgmt/2019-04-01/network/interfaceipconfigurations.go index 6d5f01d54d54..37d802cc21f8 100644 --- a/services/network/mgmt/2019-04-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2019-04-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/interfaceloadbalancers.go b/services/network/mgmt/2019-04-01/network/interfaceloadbalancers.go index cc128181e61e..7fbcedd76b22 100644 --- a/services/network/mgmt/2019-04-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2019-04-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/interfacesgroup.go b/services/network/mgmt/2019-04-01/network/interfacesgroup.go index eaf52395369c..c82efc56acc7 100644 --- a/services/network/mgmt/2019-04-01/network/interfacesgroup.go +++ b/services/network/mgmt/2019-04-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/interfacetapconfigurations.go b/services/network/mgmt/2019-04-01/network/interfacetapconfigurations.go index 85e7d0a0bf73..57a7c9533b75 100644 --- a/services/network/mgmt/2019-04-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2019-04-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2019-04-01/network/loadbalancerbackendaddresspools.go index e1f6364122e5..05559b642380 100644 --- a/services/network/mgmt/2019-04-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2019-04-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2019-04-01/network/loadbalancerfrontendipconfigurations.go index 8dca0eeebf03..520649a90ca7 100644 --- a/services/network/mgmt/2019-04-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2019-04-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2019-04-01/network/loadbalancerloadbalancingrules.go index 9fd4b0934e35..67c84d2bd2c8 100644 --- a/services/network/mgmt/2019-04-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2019-04-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2019-04-01/network/loadbalancernetworkinterfaces.go index aa2138e62684..c8e092cbb221 100644 --- a/services/network/mgmt/2019-04-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2019-04-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2019-04-01/network/loadbalanceroutboundrules.go index be00b7ca9467..3facc15ecac5 100644 --- a/services/network/mgmt/2019-04-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2019-04-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/loadbalancerprobes.go b/services/network/mgmt/2019-04-01/network/loadbalancerprobes.go index 5d558fb0cb8f..362ffc725ccf 100644 --- a/services/network/mgmt/2019-04-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2019-04-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/loadbalancers.go b/services/network/mgmt/2019-04-01/network/loadbalancers.go index c80f40a06908..dc354c8b91fc 100644 --- a/services/network/mgmt/2019-04-01/network/loadbalancers.go +++ b/services/network/mgmt/2019-04-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/localnetworkgateways.go b/services/network/mgmt/2019-04-01/network/localnetworkgateways.go index e6ddd44ac589..34b4cf527247 100644 --- a/services/network/mgmt/2019-04-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2019-04-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/natgateways.go b/services/network/mgmt/2019-04-01/network/natgateways.go index 1301f0aa5ad0..e48abd199490 100644 --- a/services/network/mgmt/2019-04-01/network/natgateways.go +++ b/services/network/mgmt/2019-04-01/network/natgateways.go @@ -35,7 +35,8 @@ func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/networkapi/interfaces.go b/services/network/mgmt/2019-04-01/network/networkapi/interfaces.go index cd6efb7f84eb..72309dfbd38e 100644 --- a/services/network/mgmt/2019-04-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2019-04-01/network/networkapi/interfaces.go @@ -39,12 +39,15 @@ type ApplicationGatewaysClientAPI interface { 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) @@ -59,7 +62,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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.ApplicationSecurityGroupsUpdateTagsFuture, err error) } @@ -68,6 +73,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -75,6 +81,7 @@ 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) @@ -85,7 +92,9 @@ type AzureFirewallsClientAPI interface { 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) } var _ AzureFirewallsClientAPI = (*network.AzureFirewallsClient)(nil) @@ -93,6 +102,7 @@ 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) @@ -103,7 +113,9 @@ type BastionHostsClientAPI interface { 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) } var _ BastionHostsClientAPI = (*network.BastionHostsClient)(nil) @@ -124,7 +136,9 @@ type DdosProtectionPlansClientAPI interface { 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.DdosProtectionPlansUpdateTagsFuture, err error) } @@ -133,6 +147,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -143,6 +158,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -153,6 +169,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -163,6 +180,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -171,6 +189,7 @@ var _ ExpressRouteCircuitConnectionsClientAPI = (*network.ExpressRouteCircuitCon 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) @@ -183,7 +202,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -195,6 +216,7 @@ 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) @@ -204,8 +226,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -219,6 +243,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -248,6 +273,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -258,7 +284,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -268,6 +296,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -278,7 +307,9 @@ type PrivateEndpointsClientAPI interface { 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) @@ -286,7 +317,9 @@ 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) @@ -300,9 +333,13 @@ type PrivateLinkServicesClientAPI interface { 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) 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) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters network.PrivateEndpointConnection) (result network.PrivateEndpointConnection, err error) } @@ -314,7 +351,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -324,6 +363,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -332,6 +372,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -342,6 +383,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -350,6 +392,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -358,6 +401,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -365,6 +409,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -373,6 +418,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -383,7 +429,9 @@ type NatGatewaysClientAPI interface { 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) } @@ -398,11 +446,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -412,6 +465,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -419,6 +473,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -429,6 +484,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -439,7 +495,9 @@ type ProfilesClientAPI interface { 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) } @@ -451,7 +509,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -463,6 +523,7 @@ type SecurityRulesClientAPI interface { 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) @@ -471,6 +532,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -527,6 +589,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -538,9 +601,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -552,7 +619,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -564,7 +633,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -576,6 +647,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -587,7 +659,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -599,6 +673,7 @@ type RoutesClientAPI interface { 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) @@ -606,6 +681,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -616,7 +692,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -628,6 +706,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -642,6 +721,7 @@ var _ ServiceTagsClientAPI = (*network.ServiceTagsClient)(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) @@ -653,8 +733,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -666,6 +749,7 @@ type SubnetsClientAPI interface { 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) } @@ -691,6 +775,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -709,7 +794,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -727,6 +814,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -740,6 +828,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -751,7 +840,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -763,7 +854,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -775,7 +868,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -794,7 +889,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -804,6 +901,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -814,7 +912,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -827,6 +927,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -837,6 +938,7 @@ type P2sVpnServerConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2sVpnServerConfigurationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2SVpnServerConfiguration, err error) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultPage, err error) + ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultIterator, err error) } var _ P2sVpnServerConfigurationsClientAPI = (*network.P2sVpnServerConfigurationsClient)(nil) @@ -849,7 +951,9 @@ type P2sVpnGatewaysClientAPI interface { 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } @@ -861,7 +965,9 @@ type WebApplicationFirewallPoliciesClientAPI interface { 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/2019-04-01/network/operations.go b/services/network/mgmt/2019-04-01/network/operations.go index 8a81faa33210..0cc5bc9bd3a7 100644 --- a/services/network/mgmt/2019-04-01/network/operations.go +++ b/services/network/mgmt/2019-04-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/p2svpngateways.go b/services/network/mgmt/2019-04-01/network/p2svpngateways.go index 262199d7c4c0..098e1e31eca0 100644 --- a/services/network/mgmt/2019-04-01/network/p2svpngateways.go +++ b/services/network/mgmt/2019-04-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/p2svpnserverconfigurations.go b/services/network/mgmt/2019-04-01/network/p2svpnserverconfigurations.go index c770d7c1e69f..9675054615eb 100644 --- a/services/network/mgmt/2019-04-01/network/p2svpnserverconfigurations.go +++ b/services/network/mgmt/2019-04-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-04-01/network/packetcaptures.go b/services/network/mgmt/2019-04-01/network/packetcaptures.go index ff9b8a98d105..927da8777af0 100644 --- a/services/network/mgmt/2019-04-01/network/packetcaptures.go +++ b/services/network/mgmt/2019-04-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2019-04-01/network/peerexpressroutecircuitconnections.go index 1068950af8d2..81f66add604f 100644 --- a/services/network/mgmt/2019-04-01/network/peerexpressroutecircuitconnections.go +++ b/services/network/mgmt/2019-04-01/network/peerexpressroutecircuitconnections.go @@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr } // NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/privateendpoints.go b/services/network/mgmt/2019-04-01/network/privateendpoints.go index 6a5d5aed1857..7105a539ecef 100644 --- a/services/network/mgmt/2019-04-01/network/privateendpoints.go +++ b/services/network/mgmt/2019-04-01/network/privateendpoints.go @@ -35,7 +35,9 @@ func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/privatelinkservices.go b/services/network/mgmt/2019-04-01/network/privatelinkservices.go index 22603fa59204..b2491a5c0c16 100644 --- a/services/network/mgmt/2019-04-01/network/privatelinkservices.go +++ b/services/network/mgmt/2019-04-01/network/privatelinkservices.go @@ -35,7 +35,9 @@ func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClie return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/profiles.go b/services/network/mgmt/2019-04-01/network/profiles.go index e8288d208680..566061bed9a4 100644 --- a/services/network/mgmt/2019-04-01/network/profiles.go +++ b/services/network/mgmt/2019-04-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/publicipaddresses.go b/services/network/mgmt/2019-04-01/network/publicipaddresses.go index bddf1daf1871..aa818f4a8187 100644 --- a/services/network/mgmt/2019-04-01/network/publicipaddresses.go +++ b/services/network/mgmt/2019-04-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/publicipprefixes.go b/services/network/mgmt/2019-04-01/network/publicipprefixes.go index cc99fb1bf093..bc335269d0e7 100644 --- a/services/network/mgmt/2019-04-01/network/publicipprefixes.go +++ b/services/network/mgmt/2019-04-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/resourcenavigationlinks.go b/services/network/mgmt/2019-04-01/network/resourcenavigationlinks.go index 2792794e488f..84a91cf6d831 100644 --- a/services/network/mgmt/2019-04-01/network/resourcenavigationlinks.go +++ b/services/network/mgmt/2019-04-01/network/resourcenavigationlinks.go @@ -35,7 +35,9 @@ func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationL return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/routefilterrules.go b/services/network/mgmt/2019-04-01/network/routefilterrules.go index 091f0bcb66d2..484b355eb579 100644 --- a/services/network/mgmt/2019-04-01/network/routefilterrules.go +++ b/services/network/mgmt/2019-04-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/routefilters.go b/services/network/mgmt/2019-04-01/network/routefilters.go index 673acfa97af4..3aed82b53dcb 100644 --- a/services/network/mgmt/2019-04-01/network/routefilters.go +++ b/services/network/mgmt/2019-04-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/routes.go b/services/network/mgmt/2019-04-01/network/routes.go index 56fcfb1b5dfa..7c874da4fa01 100644 --- a/services/network/mgmt/2019-04-01/network/routes.go +++ b/services/network/mgmt/2019-04-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/routetables.go b/services/network/mgmt/2019-04-01/network/routetables.go index a251111a7a3a..67852b37a408 100644 --- a/services/network/mgmt/2019-04-01/network/routetables.go +++ b/services/network/mgmt/2019-04-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/securitygroups.go b/services/network/mgmt/2019-04-01/network/securitygroups.go index 80f2ed053091..ae4fbe7c7520 100644 --- a/services/network/mgmt/2019-04-01/network/securitygroups.go +++ b/services/network/mgmt/2019-04-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/securityrules.go b/services/network/mgmt/2019-04-01/network/securityrules.go index 837898de459c..a78ac7fd39fa 100644 --- a/services/network/mgmt/2019-04-01/network/securityrules.go +++ b/services/network/mgmt/2019-04-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/serviceassociationlinks.go b/services/network/mgmt/2019-04-01/network/serviceassociationlinks.go index 80a7e67defcf..fc8faf22447d 100644 --- a/services/network/mgmt/2019-04-01/network/serviceassociationlinks.go +++ b/services/network/mgmt/2019-04-01/network/serviceassociationlinks.go @@ -35,7 +35,9 @@ func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationL return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/serviceendpointpolicies.go b/services/network/mgmt/2019-04-01/network/serviceendpointpolicies.go index e85867121d5c..f44b70beb843 100644 --- a/services/network/mgmt/2019-04-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2019-04-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2019-04-01/network/serviceendpointpolicydefinitions.go index 9b9c231572ae..9f0969d852db 100644 --- a/services/network/mgmt/2019-04-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2019-04-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/servicetags.go b/services/network/mgmt/2019-04-01/network/servicetags.go index 13f39ba07e90..f5aa8b1f7cb9 100644 --- a/services/network/mgmt/2019-04-01/network/servicetags.go +++ b/services/network/mgmt/2019-04-01/network/servicetags.go @@ -35,7 +35,8 @@ func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/subnets.go b/services/network/mgmt/2019-04-01/network/subnets.go index 8fb3f007ca70..b33b389e25c8 100644 --- a/services/network/mgmt/2019-04-01/network/subnets.go +++ b/services/network/mgmt/2019-04-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/usages.go b/services/network/mgmt/2019-04-01/network/usages.go index ccea6534792c..f52265460e42 100644 --- a/services/network/mgmt/2019-04-01/network/usages.go +++ b/services/network/mgmt/2019-04-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/virtualhubs.go b/services/network/mgmt/2019-04-01/network/virtualhubs.go index 9904af1d1b85..858084c2ccab 100644 --- a/services/network/mgmt/2019-04-01/network/virtualhubs.go +++ b/services/network/mgmt/2019-04-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-04-01/network/virtualnetworkgatewayconnections.go index 609c49d2152d..4dca3cba6d06 100644 --- a/services/network/mgmt/2019-04-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-04-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/virtualnetworkgateways.go b/services/network/mgmt/2019-04-01/network/virtualnetworkgateways.go index 30b823ba1664..f876f2fbd63a 100644 --- a/services/network/mgmt/2019-04-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2019-04-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2019-04-01/network/virtualnetworkpeerings.go index 81f7e3ec07ff..ac995fc0976c 100644 --- a/services/network/mgmt/2019-04-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2019-04-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/virtualnetworks.go b/services/network/mgmt/2019-04-01/network/virtualnetworks.go index df1e9c13af66..40b2d34d88b4 100644 --- a/services/network/mgmt/2019-04-01/network/virtualnetworks.go +++ b/services/network/mgmt/2019-04-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/virtualnetworktaps.go b/services/network/mgmt/2019-04-01/network/virtualnetworktaps.go index a6ee898899b9..061604653c34 100644 --- a/services/network/mgmt/2019-04-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2019-04-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/virtualwans.go b/services/network/mgmt/2019-04-01/network/virtualwans.go index bbf5f80cd92e..4522cb97af1a 100644 --- a/services/network/mgmt/2019-04-01/network/virtualwans.go +++ b/services/network/mgmt/2019-04-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/vpnconnections.go b/services/network/mgmt/2019-04-01/network/vpnconnections.go index f995c6b24c47..d34989219142 100644 --- a/services/network/mgmt/2019-04-01/network/vpnconnections.go +++ b/services/network/mgmt/2019-04-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/vpngateways.go b/services/network/mgmt/2019-04-01/network/vpngateways.go index 3da4ca2eb1e3..6fa22509ddc4 100644 --- a/services/network/mgmt/2019-04-01/network/vpngateways.go +++ b/services/network/mgmt/2019-04-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/vpnsites.go b/services/network/mgmt/2019-04-01/network/vpnsites.go index bc7bd3c74307..781a45aa81a4 100644 --- a/services/network/mgmt/2019-04-01/network/vpnsites.go +++ b/services/network/mgmt/2019-04-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2019-04-01/network/vpnsitesconfiguration.go index e0eefb366bd5..a3a71c2c0255 100644 --- a/services/network/mgmt/2019-04-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2019-04-01/network/vpnsitesconfiguration.go @@ -36,7 +36,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/watchers.go b/services/network/mgmt/2019-04-01/network/watchers.go index 26b29a18bf19..aa1de127aaa3 100644 --- a/services/network/mgmt/2019-04-01/network/watchers.go +++ b/services/network/mgmt/2019-04-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-04-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-04-01/network/webapplicationfirewallpolicies.go index e9ce540d3737..43f3061a5305 100644 --- a/services/network/mgmt/2019-04-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2019-04-01/network/webapplicationfirewallpolicies.go @@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati } // NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/applicationgateways.go b/services/network/mgmt/2019-06-01/network/applicationgateways.go index 6b6c47a88cd6..e72fd3175131 100644 --- a/services/network/mgmt/2019-06-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-06-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go b/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go index 41a47cf0f5fa..960efe1a78d3 100644 --- a/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/availabledelegations.go b/services/network/mgmt/2019-06-01/network/availabledelegations.go index 747fd724a501..a99829be3a76 100644 --- a/services/network/mgmt/2019-06-01/network/availabledelegations.go +++ b/services/network/mgmt/2019-06-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/availableendpointservices.go b/services/network/mgmt/2019-06-01/network/availableendpointservices.go index 79b645fbcb0a..308eb72366e0 100644 --- a/services/network/mgmt/2019-06-01/network/availableendpointservices.go +++ b/services/network/mgmt/2019-06-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go b/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go index b7de98c4a6c5..37367242d6a9 100644 --- a/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go +++ b/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go @@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv } // NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient -// 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 NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go index 32069f2daaf9..7ed1e61befc5 100644 --- a/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go index cf0d2a97dfa6..c67e4ddeffa6 100644 --- a/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/azurefirewalls.go b/services/network/mgmt/2019-06-01/network/azurefirewalls.go index c85a97dd9a58..f8141822a177 100644 --- a/services/network/mgmt/2019-06-01/network/azurefirewalls.go +++ b/services/network/mgmt/2019-06-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/bastionhosts.go b/services/network/mgmt/2019-06-01/network/bastionhosts.go index 7d2f594dfc0a..d74c646ad5cb 100644 --- a/services/network/mgmt/2019-06-01/network/bastionhosts.go +++ b/services/network/mgmt/2019-06-01/network/bastionhosts.go @@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go b/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go index 5d93b851fdf2..7f58e2a56070 100644 --- a/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/client.go b/services/network/mgmt/2019-06-01/network/client.go index 14cd48cfb9e3..28adfed6a474 100644 --- a/services/network/mgmt/2019-06-01/network/client.go +++ b/services/network/mgmt/2019-06-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2019-06-01/network/connectionmonitors.go b/services/network/mgmt/2019-06-01/network/connectionmonitors.go index ca171615eb08..b33487f27c44 100644 --- a/services/network/mgmt/2019-06-01/network/connectionmonitors.go +++ b/services/network/mgmt/2019-06-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go b/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go index f8d645460d61..d9d07e9003db 100644 --- a/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go +++ b/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go b/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go index efd5f7635c38..82416c0a6ad2 100644 --- a/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go b/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go index 0c38bd8fd243..010614013ec0 100644 --- a/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go index 7211b209a481..0579fa462008 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go index a27357867a92..76441c213ef4 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go index cc610324c7b6..f66716886f7f 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressroutecircuits.go b/services/network/mgmt/2019-06-01/network/expressroutecircuits.go index b54c9b0ca39e..dad730ee7a52 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2019-06-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressrouteconnections.go b/services/network/mgmt/2019-06-01/network/expressrouteconnections.go index 6e30029ed5f1..667c8327837d 100644 --- a/services/network/mgmt/2019-06-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2019-06-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go index 91eb42137855..56eda24f55cc 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go b/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go index 71bff3a15123..b1d6f0dad8ba 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/expressroutegateways.go b/services/network/mgmt/2019-06-01/network/expressroutegateways.go index 77c3777c5c05..803da44bd8a1 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutegateways.go +++ b/services/network/mgmt/2019-06-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressroutelinks.go b/services/network/mgmt/2019-06-01/network/expressroutelinks.go index f295fafc24e2..41f83744c522 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutelinks.go +++ b/services/network/mgmt/2019-06-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressrouteports.go b/services/network/mgmt/2019-06-01/network/expressrouteports.go index 1c5547cdee75..f2cae4fe7a18 100644 --- a/services/network/mgmt/2019-06-01/network/expressrouteports.go +++ b/services/network/mgmt/2019-06-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go b/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go index 7e07586b4dbf..096896586f08 100644 --- a/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go index e50a78430069..6adcd107f8e8 100644 --- a/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/firewallpolicies.go b/services/network/mgmt/2019-06-01/network/firewallpolicies.go index a15914a15439..6a0b2ed0e381 100644 --- a/services/network/mgmt/2019-06-01/network/firewallpolicies.go +++ b/services/network/mgmt/2019-06-01/network/firewallpolicies.go @@ -35,7 +35,9 @@ func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient { return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go index 842078d852da..be29266743e8 100644 --- a/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go +++ b/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go @@ -36,7 +36,9 @@ func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRule return NewFirewallPolicyRuleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client. +// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { return FirewallPolicyRuleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go index 4535ac1ebd18..efd8b4b5a001 100644 --- a/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/inboundnatrules.go b/services/network/mgmt/2019-06-01/network/inboundnatrules.go index 0f05a47e3931..f6c519c1c103 100644 --- a/services/network/mgmt/2019-06-01/network/inboundnatrules.go +++ b/services/network/mgmt/2019-06-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go b/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go index 518327342995..2e5abc583a6f 100644 --- a/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go b/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go index 75a6aa9e325c..b14d4c2c58fb 100644 --- a/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/interfacesgroup.go b/services/network/mgmt/2019-06-01/network/interfacesgroup.go index be36ebebf824..fdb4a01af6bf 100644 --- a/services/network/mgmt/2019-06-01/network/interfacesgroup.go +++ b/services/network/mgmt/2019-06-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go b/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go index ca11aecf1662..e66ff094532f 100644 --- a/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go index 0f7c54d714c1..04d83957df66 100644 --- a/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go index eb2e34cf936e..927a06ccb308 100644 --- a/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go index 96d493f8efd2..daf94f5dbc5b 100644 --- a/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go index 7b8a52bdbf45..c3f4c2852e24 100644 --- a/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go index 550f2980c6b9..31bf64dffaff 100644 --- a/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go b/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go index 4f872bde2558..76da81962f57 100644 --- a/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/loadbalancers.go b/services/network/mgmt/2019-06-01/network/loadbalancers.go index 2897a040892e..057cd4743e17 100644 --- a/services/network/mgmt/2019-06-01/network/loadbalancers.go +++ b/services/network/mgmt/2019-06-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/localnetworkgateways.go b/services/network/mgmt/2019-06-01/network/localnetworkgateways.go index 5a08cb4216db..6972058cd074 100644 --- a/services/network/mgmt/2019-06-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2019-06-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/natgateways.go b/services/network/mgmt/2019-06-01/network/natgateways.go index 97e31a4ffc75..cdf9c234e764 100644 --- a/services/network/mgmt/2019-06-01/network/natgateways.go +++ b/services/network/mgmt/2019-06-01/network/natgateways.go @@ -35,7 +35,8 @@ func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/networkapi/interfaces.go b/services/network/mgmt/2019-06-01/network/networkapi/interfaces.go index 0c5d619c9ba2..44cbf35e345d 100644 --- a/services/network/mgmt/2019-06-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2019-06-01/network/networkapi/interfaces.go @@ -39,12 +39,15 @@ type ApplicationGatewaysClientAPI interface { 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) @@ -59,7 +62,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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.ApplicationSecurityGroupsUpdateTagsFuture, err error) } @@ -68,6 +73,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -75,6 +81,7 @@ 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) @@ -85,7 +92,9 @@ type AzureFirewallsClientAPI interface { 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.AzureFirewall) (result network.AzureFirewall, err error) } @@ -94,6 +103,7 @@ 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) @@ -104,7 +114,9 @@ type BastionHostsClientAPI interface { 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, bastionHostParameters network.TagsObject) (result network.BastionHostsUpdateTagsFuture, err error) } @@ -126,7 +138,9 @@ type DdosProtectionPlansClientAPI interface { 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.DdosProtectionPlansUpdateTagsFuture, err error) } @@ -135,6 +149,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -145,6 +160,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -155,6 +171,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -165,6 +182,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -173,6 +191,7 @@ var _ ExpressRouteCircuitConnectionsClientAPI = (*network.ExpressRouteCircuitCon 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) @@ -185,7 +204,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -197,6 +218,7 @@ 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) @@ -206,8 +228,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -221,6 +245,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -250,6 +275,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -260,7 +286,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -270,6 +298,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -280,7 +309,9 @@ type FirewallPoliciesClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, firewallPolicyParameters network.TagsObject) (result network.FirewallPolicy, err error) } @@ -292,6 +323,7 @@ type FirewallPolicyRuleGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroup, err error) List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultIterator, err error) } var _ FirewallPolicyRuleGroupsClientAPI = (*network.FirewallPolicyRuleGroupsClient)(nil) @@ -302,7 +334,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -312,6 +346,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -320,6 +355,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -330,6 +366,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -338,6 +375,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -346,6 +384,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -353,6 +392,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -361,6 +401,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -371,7 +412,9 @@ type NatGatewaysClientAPI interface { 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) } @@ -386,11 +429,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -400,6 +448,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -407,6 +456,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -417,6 +467,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -427,7 +478,9 @@ type ProfilesClientAPI interface { 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) } @@ -439,7 +492,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -451,6 +506,7 @@ type SecurityRulesClientAPI interface { 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) @@ -459,6 +515,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -516,6 +573,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -526,7 +584,9 @@ type PrivateEndpointsClientAPI interface { 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) @@ -534,7 +594,9 @@ 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) @@ -548,9 +610,13 @@ type PrivateLinkServicesClientAPI interface { 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) 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) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters network.PrivateEndpointConnection) (result network.PrivateEndpointConnection, err error) } @@ -563,9 +629,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -577,7 +647,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -589,7 +661,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -601,6 +675,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -612,7 +687,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -624,6 +701,7 @@ type RoutesClientAPI interface { 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) @@ -631,6 +709,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -641,7 +720,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -653,6 +734,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -667,6 +749,7 @@ var _ ServiceTagsClientAPI = (*network.ServiceTagsClient)(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) @@ -678,8 +761,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -691,6 +777,7 @@ type SubnetsClientAPI interface { 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) } @@ -717,6 +804,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -735,7 +823,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -753,6 +843,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters network.TagsObject) (result network.VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) @@ -766,6 +857,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -777,7 +869,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -789,7 +883,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -801,7 +897,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -811,6 +909,7 @@ var _ VpnSitesClientAPI = (*network.VpnSitesClient)(nil) 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) @@ -828,7 +927,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -838,6 +939,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -848,7 +950,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -861,6 +965,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -875,6 +980,7 @@ var _ VpnSiteLinkConnectionsClientAPI = (*network.VpnSiteLinkConnectionsClient)( // VpnLinkConnectionsClientAPI contains the set of methods on the VpnLinkConnectionsClient type. type VpnLinkConnectionsClientAPI interface { 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) } var _ VpnLinkConnectionsClientAPI = (*network.VpnLinkConnectionsClient)(nil) @@ -885,6 +991,7 @@ type P2sVpnServerConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2sVpnServerConfigurationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2SVpnServerConfiguration, err error) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultPage, err error) + ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultIterator, err error) } var _ P2sVpnServerConfigurationsClientAPI = (*network.P2sVpnServerConfigurationsClient)(nil) @@ -897,7 +1004,9 @@ type P2sVpnGatewaysClientAPI interface { 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } @@ -909,7 +1018,9 @@ type WebApplicationFirewallPoliciesClientAPI interface { 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/2019-06-01/network/operations.go b/services/network/mgmt/2019-06-01/network/operations.go index 588855d36b3d..c44cae62b862 100644 --- a/services/network/mgmt/2019-06-01/network/operations.go +++ b/services/network/mgmt/2019-06-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/p2svpngateways.go b/services/network/mgmt/2019-06-01/network/p2svpngateways.go index e7537aad486c..90a8ae094ed7 100644 --- a/services/network/mgmt/2019-06-01/network/p2svpngateways.go +++ b/services/network/mgmt/2019-06-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go b/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go index e1cc2d0abc5b..f3af8adf4d20 100644 --- a/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go +++ b/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-06-01/network/packetcaptures.go b/services/network/mgmt/2019-06-01/network/packetcaptures.go index b6661c05640b..0a7fa8fd118f 100644 --- a/services/network/mgmt/2019-06-01/network/packetcaptures.go +++ b/services/network/mgmt/2019-06-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go index 14a291ff3b2e..e28cb974b85d 100644 --- a/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go +++ b/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go @@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr } // NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/privateendpoints.go b/services/network/mgmt/2019-06-01/network/privateendpoints.go index d2a9b848938e..ad665a74ee53 100644 --- a/services/network/mgmt/2019-06-01/network/privateendpoints.go +++ b/services/network/mgmt/2019-06-01/network/privateendpoints.go @@ -35,7 +35,9 @@ func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/privatelinkservices.go b/services/network/mgmt/2019-06-01/network/privatelinkservices.go index 98ed330c4f6c..f410142afa34 100644 --- a/services/network/mgmt/2019-06-01/network/privatelinkservices.go +++ b/services/network/mgmt/2019-06-01/network/privatelinkservices.go @@ -35,7 +35,9 @@ func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClie return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/profiles.go b/services/network/mgmt/2019-06-01/network/profiles.go index 876800a52f7f..d59b49c859ba 100644 --- a/services/network/mgmt/2019-06-01/network/profiles.go +++ b/services/network/mgmt/2019-06-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/publicipaddresses.go b/services/network/mgmt/2019-06-01/network/publicipaddresses.go index 89e48d9cd563..9f1bf490c0d1 100644 --- a/services/network/mgmt/2019-06-01/network/publicipaddresses.go +++ b/services/network/mgmt/2019-06-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/publicipprefixes.go b/services/network/mgmt/2019-06-01/network/publicipprefixes.go index 307dc426ac01..877338621d80 100644 --- a/services/network/mgmt/2019-06-01/network/publicipprefixes.go +++ b/services/network/mgmt/2019-06-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go b/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go index 489f7abeeae4..f74ce2ea9b20 100644 --- a/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go +++ b/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go @@ -35,7 +35,9 @@ func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationL return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/routefilterrules.go b/services/network/mgmt/2019-06-01/network/routefilterrules.go index e31ba18c89ae..dabe2bd19937 100644 --- a/services/network/mgmt/2019-06-01/network/routefilterrules.go +++ b/services/network/mgmt/2019-06-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/routefilters.go b/services/network/mgmt/2019-06-01/network/routefilters.go index 3dcc02fb418d..84b6ed858e11 100644 --- a/services/network/mgmt/2019-06-01/network/routefilters.go +++ b/services/network/mgmt/2019-06-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/routes.go b/services/network/mgmt/2019-06-01/network/routes.go index 937a076f0db4..8528550c3e53 100644 --- a/services/network/mgmt/2019-06-01/network/routes.go +++ b/services/network/mgmt/2019-06-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/routetables.go b/services/network/mgmt/2019-06-01/network/routetables.go index a66a1e051985..3c4730ec5243 100644 --- a/services/network/mgmt/2019-06-01/network/routetables.go +++ b/services/network/mgmt/2019-06-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/securitygroups.go b/services/network/mgmt/2019-06-01/network/securitygroups.go index 84a24cee4676..964e5bef384c 100644 --- a/services/network/mgmt/2019-06-01/network/securitygroups.go +++ b/services/network/mgmt/2019-06-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/securityrules.go b/services/network/mgmt/2019-06-01/network/securityrules.go index 1dbcf670338b..045f0cd018ec 100644 --- a/services/network/mgmt/2019-06-01/network/securityrules.go +++ b/services/network/mgmt/2019-06-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go b/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go index 2f20bb324edd..68795912d677 100644 --- a/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go +++ b/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go @@ -35,7 +35,9 @@ func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationL return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go b/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go index 09c5054b7e6e..9a8075b3a8d3 100644 --- a/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go index fd7a8bcc27f3..43b13b7b783b 100644 --- a/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/servicetags.go b/services/network/mgmt/2019-06-01/network/servicetags.go index f7d39cf55650..171c4afb39b0 100644 --- a/services/network/mgmt/2019-06-01/network/servicetags.go +++ b/services/network/mgmt/2019-06-01/network/servicetags.go @@ -35,7 +35,8 @@ func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/subnets.go b/services/network/mgmt/2019-06-01/network/subnets.go index a2f917cad06c..1721883fd0de 100644 --- a/services/network/mgmt/2019-06-01/network/subnets.go +++ b/services/network/mgmt/2019-06-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/usages.go b/services/network/mgmt/2019-06-01/network/usages.go index 69e4fba8a00e..d5ca3a3b98c5 100644 --- a/services/network/mgmt/2019-06-01/network/usages.go +++ b/services/network/mgmt/2019-06-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/virtualhubs.go b/services/network/mgmt/2019-06-01/network/virtualhubs.go index 6a86528d1ad4..2519611b98a4 100644 --- a/services/network/mgmt/2019-06-01/network/virtualhubs.go +++ b/services/network/mgmt/2019-06-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go index 3b5e71c3a82d..addedb54ed66 100644 --- a/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go b/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go index cd31f47b6331..8c2847ca7bfb 100644 --- a/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go index fe6d6b5435a7..d15c5acaea08 100644 --- a/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/virtualnetworks.go b/services/network/mgmt/2019-06-01/network/virtualnetworks.go index 023a9e8600b5..50c7ea65be3e 100644 --- a/services/network/mgmt/2019-06-01/network/virtualnetworks.go +++ b/services/network/mgmt/2019-06-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go b/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go index 98756f901dbb..3cf1b32469ef 100644 --- a/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/virtualwans.go b/services/network/mgmt/2019-06-01/network/virtualwans.go index 8f07a0cf22d5..3fec37c7e732 100644 --- a/services/network/mgmt/2019-06-01/network/virtualwans.go +++ b/services/network/mgmt/2019-06-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/vpnconnections.go b/services/network/mgmt/2019-06-01/network/vpnconnections.go index 37ff6797c295..8e09e13a7410 100644 --- a/services/network/mgmt/2019-06-01/network/vpnconnections.go +++ b/services/network/mgmt/2019-06-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/vpngateways.go b/services/network/mgmt/2019-06-01/network/vpngateways.go index ab7bd39c3048..65427e2dd8c4 100644 --- a/services/network/mgmt/2019-06-01/network/vpngateways.go +++ b/services/network/mgmt/2019-06-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go b/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go index 3e8da0eec679..2e87c50e0860 100644 --- a/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go +++ b/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go @@ -35,7 +35,9 @@ func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go b/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go index 5ded318f6224..f64d9d0ef6f2 100644 --- a/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go +++ b/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go @@ -35,7 +35,9 @@ func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectio return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/vpnsitelinks.go b/services/network/mgmt/2019-06-01/network/vpnsitelinks.go index e84e41efb2fd..0b753c50d38d 100644 --- a/services/network/mgmt/2019-06-01/network/vpnsitelinks.go +++ b/services/network/mgmt/2019-06-01/network/vpnsitelinks.go @@ -35,7 +35,8 @@ func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient { return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/vpnsites.go b/services/network/mgmt/2019-06-01/network/vpnsites.go index 99f004ea198e..060984514559 100644 --- a/services/network/mgmt/2019-06-01/network/vpnsites.go +++ b/services/network/mgmt/2019-06-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go index 65d1a24ff3d4..a91064f92c2c 100644 --- a/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go @@ -36,7 +36,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/watchers.go b/services/network/mgmt/2019-06-01/network/watchers.go index e330a1b979bf..bc70fcc9109f 100644 --- a/services/network/mgmt/2019-06-01/network/watchers.go +++ b/services/network/mgmt/2019-06-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go index f250d2239974..df1b1af0b0ab 100644 --- a/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go @@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati } // NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/applicationgateways.go b/services/network/mgmt/2019-07-01/network/applicationgateways.go index 2d5cee49e567..50c743b4b4c7 100644 --- a/services/network/mgmt/2019-07-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-07-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/applicationsecuritygroups.go b/services/network/mgmt/2019-07-01/network/applicationsecuritygroups.go index e697c2e450fd..404b83421138 100644 --- a/services/network/mgmt/2019-07-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2019-07-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/availabledelegations.go b/services/network/mgmt/2019-07-01/network/availabledelegations.go index 590749fae9fb..cfff5160371c 100644 --- a/services/network/mgmt/2019-07-01/network/availabledelegations.go +++ b/services/network/mgmt/2019-07-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/availableendpointservices.go b/services/network/mgmt/2019-07-01/network/availableendpointservices.go index 8be2bc7079b6..7bb7c1159048 100644 --- a/services/network/mgmt/2019-07-01/network/availableendpointservices.go +++ b/services/network/mgmt/2019-07-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/availableprivateendpointtypes.go b/services/network/mgmt/2019-07-01/network/availableprivateendpointtypes.go index bf880c8bc121..ebbcb77b29b0 100644 --- a/services/network/mgmt/2019-07-01/network/availableprivateendpointtypes.go +++ b/services/network/mgmt/2019-07-01/network/availableprivateendpointtypes.go @@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv } // NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient -// 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 NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2019-07-01/network/availableresourcegroupdelegations.go index b729c3eda0ee..866640cf75d2 100644 --- a/services/network/mgmt/2019-07-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2019-07-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2019-07-01/network/azurefirewallfqdntags.go index ef9b5288900d..41c12bb87251 100644 --- a/services/network/mgmt/2019-07-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2019-07-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/azurefirewalls.go b/services/network/mgmt/2019-07-01/network/azurefirewalls.go index eac686f53fb4..c49c3b9baeba 100644 --- a/services/network/mgmt/2019-07-01/network/azurefirewalls.go +++ b/services/network/mgmt/2019-07-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/bastionhosts.go b/services/network/mgmt/2019-07-01/network/bastionhosts.go index cb1d53fa0408..e995c8df7f2b 100644 --- a/services/network/mgmt/2019-07-01/network/bastionhosts.go +++ b/services/network/mgmt/2019-07-01/network/bastionhosts.go @@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/bgpservicecommunities.go b/services/network/mgmt/2019-07-01/network/bgpservicecommunities.go index b6e3d0268459..9317eb2fcc38 100644 --- a/services/network/mgmt/2019-07-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2019-07-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/client.go b/services/network/mgmt/2019-07-01/network/client.go index a3b0b893696c..9da48ac17d64 100644 --- a/services/network/mgmt/2019-07-01/network/client.go +++ b/services/network/mgmt/2019-07-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2019-07-01/network/connectionmonitors.go b/services/network/mgmt/2019-07-01/network/connectionmonitors.go index ca171615eb08..b33487f27c44 100644 --- a/services/network/mgmt/2019-07-01/network/connectionmonitors.go +++ b/services/network/mgmt/2019-07-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/ddoscustompolicies.go b/services/network/mgmt/2019-07-01/network/ddoscustompolicies.go index b3d021a65b2b..2951efdae2d4 100644 --- a/services/network/mgmt/2019-07-01/network/ddoscustompolicies.go +++ b/services/network/mgmt/2019-07-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/ddosprotectionplans.go b/services/network/mgmt/2019-07-01/network/ddosprotectionplans.go index 4278d4000d93..71aab27d252d 100644 --- a/services/network/mgmt/2019-07-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2019-07-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/defaultsecurityrules.go b/services/network/mgmt/2019-07-01/network/defaultsecurityrules.go index 00e112b530f9..6efa859bb178 100644 --- a/services/network/mgmt/2019-07-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2019-07-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2019-07-01/network/expressroutecircuitauthorizations.go index fd5ac2a9832e..67e3f098d91a 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2019-07-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2019-07-01/network/expressroutecircuitconnections.go index d414f09a6653..4f8d3ba235b0 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2019-07-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-07-01/network/expressroutecircuitpeerings.go index 5ccd0e23f006..aeed5605ca07 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-07-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressroutecircuits.go b/services/network/mgmt/2019-07-01/network/expressroutecircuits.go index 06819c16b581..259b6c61560c 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2019-07-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressrouteconnections.go b/services/network/mgmt/2019-07-01/network/expressrouteconnections.go index f7c17bdeff2a..7346ec20ac48 100644 --- a/services/network/mgmt/2019-07-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2019-07-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-07-01/network/expressroutecrossconnectionpeerings.go index e78344a992d5..0f50155e9957 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-07-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressroutecrossconnections.go b/services/network/mgmt/2019-07-01/network/expressroutecrossconnections.go index a00ecb6fab68..54d4a8396250 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2019-07-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/expressroutegateways.go b/services/network/mgmt/2019-07-01/network/expressroutegateways.go index 6d710c708bb7..835dbbd47e5d 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutegateways.go +++ b/services/network/mgmt/2019-07-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressroutelinks.go b/services/network/mgmt/2019-07-01/network/expressroutelinks.go index 950ab8358cb4..b13142ff34f4 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutelinks.go +++ b/services/network/mgmt/2019-07-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressrouteports.go b/services/network/mgmt/2019-07-01/network/expressrouteports.go index 759321690b84..5f75c9a081cd 100644 --- a/services/network/mgmt/2019-07-01/network/expressrouteports.go +++ b/services/network/mgmt/2019-07-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressrouteportslocations.go b/services/network/mgmt/2019-07-01/network/expressrouteportslocations.go index af27ddc97129..482e63ae6d60 100644 --- a/services/network/mgmt/2019-07-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2019-07-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2019-07-01/network/expressrouteserviceproviders.go index 1a785e950ce6..5c3f47ee8630 100644 --- a/services/network/mgmt/2019-07-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2019-07-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/firewallpolicies.go b/services/network/mgmt/2019-07-01/network/firewallpolicies.go index c4603a60dd58..f5ad545bc936 100644 --- a/services/network/mgmt/2019-07-01/network/firewallpolicies.go +++ b/services/network/mgmt/2019-07-01/network/firewallpolicies.go @@ -35,7 +35,9 @@ func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient { return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-07-01/network/firewallpolicyrulegroups.go index 84e8bf1c8659..94d296d3004f 100644 --- a/services/network/mgmt/2019-07-01/network/firewallpolicyrulegroups.go +++ b/services/network/mgmt/2019-07-01/network/firewallpolicyrulegroups.go @@ -36,7 +36,9 @@ func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRule return NewFirewallPolicyRuleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client. +// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { return FirewallPolicyRuleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2019-07-01/network/hubvirtualnetworkconnections.go index 3201d17b7e24..0e2ab1b465fb 100644 --- a/services/network/mgmt/2019-07-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2019-07-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/inboundnatrules.go b/services/network/mgmt/2019-07-01/network/inboundnatrules.go index 7fe4c8a21da7..2b4b66dc8f17 100644 --- a/services/network/mgmt/2019-07-01/network/inboundnatrules.go +++ b/services/network/mgmt/2019-07-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/interfaceipconfigurations.go b/services/network/mgmt/2019-07-01/network/interfaceipconfigurations.go index f0bb40acd4f4..6357f3b45fdc 100644 --- a/services/network/mgmt/2019-07-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2019-07-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/interfaceloadbalancers.go b/services/network/mgmt/2019-07-01/network/interfaceloadbalancers.go index 470f81b85da2..6997e7f4e30d 100644 --- a/services/network/mgmt/2019-07-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2019-07-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/interfacesgroup.go b/services/network/mgmt/2019-07-01/network/interfacesgroup.go index b27f9a39da3a..4cc5d487f7ac 100644 --- a/services/network/mgmt/2019-07-01/network/interfacesgroup.go +++ b/services/network/mgmt/2019-07-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/interfacetapconfigurations.go b/services/network/mgmt/2019-07-01/network/interfacetapconfigurations.go index 7f4e2ee1e3ba..64a81cfa2e8c 100644 --- a/services/network/mgmt/2019-07-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2019-07-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2019-07-01/network/loadbalancerbackendaddresspools.go index 3933ca803600..252bf429e43e 100644 --- a/services/network/mgmt/2019-07-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2019-07-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2019-07-01/network/loadbalancerfrontendipconfigurations.go index f3fe42a2b741..f2d792c54946 100644 --- a/services/network/mgmt/2019-07-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2019-07-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2019-07-01/network/loadbalancerloadbalancingrules.go index 2f1f6ec2c1fb..253973d931c5 100644 --- a/services/network/mgmt/2019-07-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2019-07-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2019-07-01/network/loadbalancernetworkinterfaces.go index 477f3ba9a1bf..58664086824e 100644 --- a/services/network/mgmt/2019-07-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2019-07-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2019-07-01/network/loadbalanceroutboundrules.go index 82eff1e212e4..fd76a61ece85 100644 --- a/services/network/mgmt/2019-07-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2019-07-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/loadbalancerprobes.go b/services/network/mgmt/2019-07-01/network/loadbalancerprobes.go index 46cab6e35822..0bbdfb8975db 100644 --- a/services/network/mgmt/2019-07-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2019-07-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/loadbalancers.go b/services/network/mgmt/2019-07-01/network/loadbalancers.go index dd1934505b96..d42cfe4f53ef 100644 --- a/services/network/mgmt/2019-07-01/network/loadbalancers.go +++ b/services/network/mgmt/2019-07-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/localnetworkgateways.go b/services/network/mgmt/2019-07-01/network/localnetworkgateways.go index be6bced47194..dc83388e7167 100644 --- a/services/network/mgmt/2019-07-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2019-07-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/natgateways.go b/services/network/mgmt/2019-07-01/network/natgateways.go index 834037bf49f4..9b338bf3035c 100644 --- a/services/network/mgmt/2019-07-01/network/natgateways.go +++ b/services/network/mgmt/2019-07-01/network/natgateways.go @@ -35,7 +35,8 @@ func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/networkapi/interfaces.go b/services/network/mgmt/2019-07-01/network/networkapi/interfaces.go index 7cf8795bd87e..0c0967b2cbbd 100644 --- a/services/network/mgmt/2019-07-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2019-07-01/network/networkapi/interfaces.go @@ -39,12 +39,15 @@ type ApplicationGatewaysClientAPI interface { 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) @@ -59,7 +62,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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.ApplicationSecurityGroupsUpdateTagsFuture, err error) } @@ -68,6 +73,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -75,6 +81,7 @@ 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) @@ -85,7 +92,9 @@ type AzureFirewallsClientAPI interface { 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.AzureFirewall) (result network.AzureFirewall, err error) } @@ -94,6 +103,7 @@ 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) @@ -104,7 +114,9 @@ type BastionHostsClientAPI interface { 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) } var _ BastionHostsClientAPI = (*network.BastionHostsClient)(nil) @@ -125,7 +137,9 @@ type DdosProtectionPlansClientAPI interface { 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.DdosProtectionPlansUpdateTagsFuture, err error) } @@ -134,6 +148,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -144,6 +159,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -154,6 +170,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -164,6 +181,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -172,6 +190,7 @@ var _ ExpressRouteCircuitConnectionsClientAPI = (*network.ExpressRouteCircuitCon 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) @@ -184,7 +203,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -196,6 +217,7 @@ 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) @@ -205,8 +227,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -220,6 +244,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -249,6 +274,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -259,7 +285,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -269,6 +297,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -279,7 +308,9 @@ type FirewallPoliciesClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, firewallPolicyParameters network.TagsObject) (result network.FirewallPolicy, err error) } @@ -291,6 +322,7 @@ type FirewallPolicyRuleGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroup, err error) List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultIterator, err error) } var _ FirewallPolicyRuleGroupsClientAPI = (*network.FirewallPolicyRuleGroupsClient)(nil) @@ -301,7 +333,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -311,6 +345,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -319,6 +354,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -329,6 +365,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -337,6 +374,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -345,6 +383,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -352,6 +391,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -360,6 +400,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -370,7 +411,9 @@ type NatGatewaysClientAPI interface { 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) } @@ -385,11 +428,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -399,6 +447,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -406,6 +455,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -416,6 +466,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -426,7 +477,9 @@ type ProfilesClientAPI interface { 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) } @@ -438,7 +491,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -450,6 +505,7 @@ type SecurityRulesClientAPI interface { 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) @@ -458,6 +514,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -515,6 +572,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -525,7 +583,9 @@ type PrivateEndpointsClientAPI interface { 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) @@ -533,7 +593,9 @@ 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) @@ -547,9 +609,13 @@ type PrivateLinkServicesClientAPI interface { 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) 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) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters network.PrivateEndpointConnection) (result network.PrivateEndpointConnection, err error) } @@ -562,9 +628,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -576,7 +646,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -588,7 +660,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -600,6 +674,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -611,7 +686,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -623,6 +700,7 @@ type RoutesClientAPI interface { 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) @@ -630,6 +708,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -640,7 +719,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -652,6 +733,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -666,6 +748,7 @@ var _ ServiceTagsClientAPI = (*network.ServiceTagsClient)(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) @@ -677,8 +760,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -690,6 +776,7 @@ type SubnetsClientAPI interface { 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) } @@ -716,6 +803,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -734,7 +822,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -754,6 +844,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) @@ -769,6 +860,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -780,7 +872,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -792,7 +886,9 @@ type VirtualRoutersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters network.TagsObject) (result network.VirtualRouter, err error) } @@ -804,6 +900,7 @@ type VirtualRouterPeeringsClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters network.VirtualRouterPeering) (result network.VirtualRouterPeering, err error) } @@ -815,7 +912,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -827,7 +926,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -837,6 +938,7 @@ var _ VpnSitesClientAPI = (*network.VpnSitesClient)(nil) 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) @@ -854,7 +956,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -864,6 +968,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -874,7 +979,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -887,6 +994,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -901,6 +1009,7 @@ var _ VpnSiteLinkConnectionsClientAPI = (*network.VpnSiteLinkConnectionsClient)( // VpnLinkConnectionsClientAPI contains the set of methods on the VpnLinkConnectionsClient type. type VpnLinkConnectionsClientAPI interface { 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) } var _ VpnLinkConnectionsClientAPI = (*network.VpnLinkConnectionsClient)(nil) @@ -911,6 +1020,7 @@ type P2sVpnServerConfigurationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2sVpnServerConfigurationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result network.P2SVpnServerConfiguration, err error) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultPage, err error) + ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result network.ListP2SVpnServerConfigurationsResultIterator, err error) } var _ P2sVpnServerConfigurationsClientAPI = (*network.P2sVpnServerConfigurationsClient)(nil) @@ -923,7 +1033,9 @@ type P2sVpnGatewaysClientAPI interface { 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) 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } @@ -935,7 +1047,9 @@ type WebApplicationFirewallPoliciesClientAPI interface { 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/2019-07-01/network/operations.go b/services/network/mgmt/2019-07-01/network/operations.go index 8ab2f808e085..fa1005eaf48e 100644 --- a/services/network/mgmt/2019-07-01/network/operations.go +++ b/services/network/mgmt/2019-07-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/p2svpngateways.go b/services/network/mgmt/2019-07-01/network/p2svpngateways.go index f7eaa1985de8..551f59324ada 100644 --- a/services/network/mgmt/2019-07-01/network/p2svpngateways.go +++ b/services/network/mgmt/2019-07-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/p2svpnserverconfigurations.go b/services/network/mgmt/2019-07-01/network/p2svpnserverconfigurations.go index 086cc6326038..efa3e9bae1b1 100644 --- a/services/network/mgmt/2019-07-01/network/p2svpnserverconfigurations.go +++ b/services/network/mgmt/2019-07-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-07-01/network/packetcaptures.go b/services/network/mgmt/2019-07-01/network/packetcaptures.go index c9a392e95c63..c74976f56273 100644 --- a/services/network/mgmt/2019-07-01/network/packetcaptures.go +++ b/services/network/mgmt/2019-07-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2019-07-01/network/peerexpressroutecircuitconnections.go index 99ba04971a24..4a5fe580c919 100644 --- a/services/network/mgmt/2019-07-01/network/peerexpressroutecircuitconnections.go +++ b/services/network/mgmt/2019-07-01/network/peerexpressroutecircuitconnections.go @@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr } // NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/privateendpoints.go b/services/network/mgmt/2019-07-01/network/privateendpoints.go index ecd68601f8c9..de6cde9bdbd0 100644 --- a/services/network/mgmt/2019-07-01/network/privateendpoints.go +++ b/services/network/mgmt/2019-07-01/network/privateendpoints.go @@ -35,7 +35,9 @@ func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/privatelinkservices.go b/services/network/mgmt/2019-07-01/network/privatelinkservices.go index 6c7e9e90c85a..797bc2fd8baf 100644 --- a/services/network/mgmt/2019-07-01/network/privatelinkservices.go +++ b/services/network/mgmt/2019-07-01/network/privatelinkservices.go @@ -35,7 +35,9 @@ func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClie return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/profiles.go b/services/network/mgmt/2019-07-01/network/profiles.go index 470be1127a5c..1b722e70cf05 100644 --- a/services/network/mgmt/2019-07-01/network/profiles.go +++ b/services/network/mgmt/2019-07-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/publicipaddresses.go b/services/network/mgmt/2019-07-01/network/publicipaddresses.go index 011ceb875cfb..364ac95f06dd 100644 --- a/services/network/mgmt/2019-07-01/network/publicipaddresses.go +++ b/services/network/mgmt/2019-07-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/publicipprefixes.go b/services/network/mgmt/2019-07-01/network/publicipprefixes.go index 0d92dea80fdd..8b1caf007388 100644 --- a/services/network/mgmt/2019-07-01/network/publicipprefixes.go +++ b/services/network/mgmt/2019-07-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/resourcenavigationlinks.go b/services/network/mgmt/2019-07-01/network/resourcenavigationlinks.go index 2740bb8d9899..f4ed579d2b45 100644 --- a/services/network/mgmt/2019-07-01/network/resourcenavigationlinks.go +++ b/services/network/mgmt/2019-07-01/network/resourcenavigationlinks.go @@ -35,7 +35,9 @@ func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationL return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/routefilterrules.go b/services/network/mgmt/2019-07-01/network/routefilterrules.go index 72c1bddaaf8c..7fed51bf65fd 100644 --- a/services/network/mgmt/2019-07-01/network/routefilterrules.go +++ b/services/network/mgmt/2019-07-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/routefilters.go b/services/network/mgmt/2019-07-01/network/routefilters.go index 959c43982388..5d9aa17944c7 100644 --- a/services/network/mgmt/2019-07-01/network/routefilters.go +++ b/services/network/mgmt/2019-07-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/routes.go b/services/network/mgmt/2019-07-01/network/routes.go index 10905c1b06f0..278a304547c7 100644 --- a/services/network/mgmt/2019-07-01/network/routes.go +++ b/services/network/mgmt/2019-07-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/routetables.go b/services/network/mgmt/2019-07-01/network/routetables.go index 98a6b10e4546..d67a58f8902c 100644 --- a/services/network/mgmt/2019-07-01/network/routetables.go +++ b/services/network/mgmt/2019-07-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/securitygroups.go b/services/network/mgmt/2019-07-01/network/securitygroups.go index 3df3e1de9ed0..15969bfd86b0 100644 --- a/services/network/mgmt/2019-07-01/network/securitygroups.go +++ b/services/network/mgmt/2019-07-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/securityrules.go b/services/network/mgmt/2019-07-01/network/securityrules.go index ab7c6a3ff491..fdafd9cca7c6 100644 --- a/services/network/mgmt/2019-07-01/network/securityrules.go +++ b/services/network/mgmt/2019-07-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/serviceassociationlinks.go b/services/network/mgmt/2019-07-01/network/serviceassociationlinks.go index de5889ad3039..a7eea7065c56 100644 --- a/services/network/mgmt/2019-07-01/network/serviceassociationlinks.go +++ b/services/network/mgmt/2019-07-01/network/serviceassociationlinks.go @@ -35,7 +35,9 @@ func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationL return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/serviceendpointpolicies.go b/services/network/mgmt/2019-07-01/network/serviceendpointpolicies.go index 6e6865aed65d..47eee1c6e3e7 100644 --- a/services/network/mgmt/2019-07-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2019-07-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2019-07-01/network/serviceendpointpolicydefinitions.go index daad64b9a503..23f251bb6a0e 100644 --- a/services/network/mgmt/2019-07-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2019-07-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/servicetags.go b/services/network/mgmt/2019-07-01/network/servicetags.go index 1ef9e377ef3c..3edb0366c931 100644 --- a/services/network/mgmt/2019-07-01/network/servicetags.go +++ b/services/network/mgmt/2019-07-01/network/servicetags.go @@ -35,7 +35,8 @@ func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/subnets.go b/services/network/mgmt/2019-07-01/network/subnets.go index 6bec2ff1f18c..d294a51b7c51 100644 --- a/services/network/mgmt/2019-07-01/network/subnets.go +++ b/services/network/mgmt/2019-07-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/usages.go b/services/network/mgmt/2019-07-01/network/usages.go index 0b954738e1eb..e2d8c89f2ff4 100644 --- a/services/network/mgmt/2019-07-01/network/usages.go +++ b/services/network/mgmt/2019-07-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualhubs.go b/services/network/mgmt/2019-07-01/network/virtualhubs.go index b5c34858dd97..d5619857712a 100644 --- a/services/network/mgmt/2019-07-01/network/virtualhubs.go +++ b/services/network/mgmt/2019-07-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go index 8acdd67a472d..22e74c01c61f 100644 --- a/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualnetworkgateways.go b/services/network/mgmt/2019-07-01/network/virtualnetworkgateways.go index 43f9e9507e15..9265f1710311 100644 --- a/services/network/mgmt/2019-07-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2019-07-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2019-07-01/network/virtualnetworkpeerings.go index e0c5c4454288..fd5d10eed83e 100644 --- a/services/network/mgmt/2019-07-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2019-07-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualnetworks.go b/services/network/mgmt/2019-07-01/network/virtualnetworks.go index 6c8c869bf294..e71efb03223e 100644 --- a/services/network/mgmt/2019-07-01/network/virtualnetworks.go +++ b/services/network/mgmt/2019-07-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualnetworktaps.go b/services/network/mgmt/2019-07-01/network/virtualnetworktaps.go index b0928942fbc0..29143f5d80f2 100644 --- a/services/network/mgmt/2019-07-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2019-07-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go b/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go index d03c3794f6e4..fa28b60c6e19 100644 --- a/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go +++ b/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go @@ -36,7 +36,9 @@ func NewVirtualRouterPeeringsClient(subscriptionID string) VirtualRouterPeerings return NewVirtualRouterPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualRouterPeeringsClientWithBaseURI creates an instance of the VirtualRouterPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualrouters.go b/services/network/mgmt/2019-07-01/network/virtualrouters.go index 36118636f752..d82ee105017c 100644 --- a/services/network/mgmt/2019-07-01/network/virtualrouters.go +++ b/services/network/mgmt/2019-07-01/network/virtualrouters.go @@ -36,7 +36,8 @@ func NewVirtualRoutersClient(subscriptionID string) VirtualRoutersClient { return NewVirtualRoutersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualRoutersClientWithBaseURI creates an instance of the VirtualRoutersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/virtualwans.go b/services/network/mgmt/2019-07-01/network/virtualwans.go index 4b79e591e8fc..751f12d1401f 100644 --- a/services/network/mgmt/2019-07-01/network/virtualwans.go +++ b/services/network/mgmt/2019-07-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/vpnconnections.go b/services/network/mgmt/2019-07-01/network/vpnconnections.go index 1e399227d50e..64e155be39cd 100644 --- a/services/network/mgmt/2019-07-01/network/vpnconnections.go +++ b/services/network/mgmt/2019-07-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/vpngateways.go b/services/network/mgmt/2019-07-01/network/vpngateways.go index fb0329af6d91..2c3e46b3aec6 100644 --- a/services/network/mgmt/2019-07-01/network/vpngateways.go +++ b/services/network/mgmt/2019-07-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/vpnlinkconnections.go b/services/network/mgmt/2019-07-01/network/vpnlinkconnections.go index e3eb45fac8ea..348b031b8233 100644 --- a/services/network/mgmt/2019-07-01/network/vpnlinkconnections.go +++ b/services/network/mgmt/2019-07-01/network/vpnlinkconnections.go @@ -35,7 +35,9 @@ func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/vpnsitelinkconnections.go b/services/network/mgmt/2019-07-01/network/vpnsitelinkconnections.go index 1db1031dedbc..44bff9034b9a 100644 --- a/services/network/mgmt/2019-07-01/network/vpnsitelinkconnections.go +++ b/services/network/mgmt/2019-07-01/network/vpnsitelinkconnections.go @@ -35,7 +35,9 @@ func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectio return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/vpnsitelinks.go b/services/network/mgmt/2019-07-01/network/vpnsitelinks.go index ddc90350866a..f0e0873b0822 100644 --- a/services/network/mgmt/2019-07-01/network/vpnsitelinks.go +++ b/services/network/mgmt/2019-07-01/network/vpnsitelinks.go @@ -35,7 +35,8 @@ func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient { return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/vpnsites.go b/services/network/mgmt/2019-07-01/network/vpnsites.go index e414f46bf941..0ffd6c7266ed 100644 --- a/services/network/mgmt/2019-07-01/network/vpnsites.go +++ b/services/network/mgmt/2019-07-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2019-07-01/network/vpnsitesconfiguration.go index 898417fad1e1..a281c81d0a59 100644 --- a/services/network/mgmt/2019-07-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2019-07-01/network/vpnsitesconfiguration.go @@ -36,7 +36,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/watchers.go b/services/network/mgmt/2019-07-01/network/watchers.go index fd1b6d95fc2f..0236f5c5a60c 100644 --- a/services/network/mgmt/2019-07-01/network/watchers.go +++ b/services/network/mgmt/2019-07-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-07-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-07-01/network/webapplicationfirewallpolicies.go index 795632fc59f7..75389f238733 100644 --- a/services/network/mgmt/2019-07-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2019-07-01/network/webapplicationfirewallpolicies.go @@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati } // NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/applicationgateways.go b/services/network/mgmt/2019-08-01/network/applicationgateways.go index 4575e80cc7de..3a495a313da7 100644 --- a/services/network/mgmt/2019-08-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-08-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/applicationsecuritygroups.go b/services/network/mgmt/2019-08-01/network/applicationsecuritygroups.go index b022ee953a08..5a208822e43c 100644 --- a/services/network/mgmt/2019-08-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2019-08-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/availabledelegations.go b/services/network/mgmt/2019-08-01/network/availabledelegations.go index 3eef505dbe66..4987de4048bb 100644 --- a/services/network/mgmt/2019-08-01/network/availabledelegations.go +++ b/services/network/mgmt/2019-08-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/availableendpointservices.go b/services/network/mgmt/2019-08-01/network/availableendpointservices.go index e353972094f7..070692531499 100644 --- a/services/network/mgmt/2019-08-01/network/availableendpointservices.go +++ b/services/network/mgmt/2019-08-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/availableprivateendpointtypes.go b/services/network/mgmt/2019-08-01/network/availableprivateendpointtypes.go index cd9a8c46e33e..bc2020bcf5df 100644 --- a/services/network/mgmt/2019-08-01/network/availableprivateendpointtypes.go +++ b/services/network/mgmt/2019-08-01/network/availableprivateendpointtypes.go @@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv } // NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient -// 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 NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2019-08-01/network/availableresourcegroupdelegations.go index c05c3ed21905..d8b863799df6 100644 --- a/services/network/mgmt/2019-08-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2019-08-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/availableservicealiases.go b/services/network/mgmt/2019-08-01/network/availableservicealiases.go index 6849d35f392e..f17d41980dc1 100644 --- a/services/network/mgmt/2019-08-01/network/availableservicealiases.go +++ b/services/network/mgmt/2019-08-01/network/availableservicealiases.go @@ -35,7 +35,9 @@ func NewAvailableServiceAliasesClient(subscriptionID string) AvailableServiceAli return NewAvailableServiceAliasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableServiceAliasesClientWithBaseURI creates an instance of the AvailableServiceAliasesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2019-08-01/network/azurefirewallfqdntags.go index 0e63939b68d3..ccb0312be300 100644 --- a/services/network/mgmt/2019-08-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2019-08-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/azurefirewalls.go b/services/network/mgmt/2019-08-01/network/azurefirewalls.go index ceea1d5ea7b1..1780196890a9 100644 --- a/services/network/mgmt/2019-08-01/network/azurefirewalls.go +++ b/services/network/mgmt/2019-08-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/bastionhosts.go b/services/network/mgmt/2019-08-01/network/bastionhosts.go index d7ab242eb25b..fb9987ef0278 100644 --- a/services/network/mgmt/2019-08-01/network/bastionhosts.go +++ b/services/network/mgmt/2019-08-01/network/bastionhosts.go @@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/bgpservicecommunities.go b/services/network/mgmt/2019-08-01/network/bgpservicecommunities.go index bfec3e40eeb8..a32fcd522cdd 100644 --- a/services/network/mgmt/2019-08-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2019-08-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/client.go b/services/network/mgmt/2019-08-01/network/client.go index 9315b631ad3e..85a4a8a7edf1 100644 --- a/services/network/mgmt/2019-08-01/network/client.go +++ b/services/network/mgmt/2019-08-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/network/mgmt/2019-08-01/network/connectionmonitors.go b/services/network/mgmt/2019-08-01/network/connectionmonitors.go index ca171615eb08..b33487f27c44 100644 --- a/services/network/mgmt/2019-08-01/network/connectionmonitors.go +++ b/services/network/mgmt/2019-08-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/ddoscustompolicies.go b/services/network/mgmt/2019-08-01/network/ddoscustompolicies.go index 84e2b3860382..8976d2e8ae16 100644 --- a/services/network/mgmt/2019-08-01/network/ddoscustompolicies.go +++ b/services/network/mgmt/2019-08-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/ddosprotectionplans.go b/services/network/mgmt/2019-08-01/network/ddosprotectionplans.go index 7024a259c58a..244e9d4ec420 100644 --- a/services/network/mgmt/2019-08-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2019-08-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/defaultsecurityrules.go b/services/network/mgmt/2019-08-01/network/defaultsecurityrules.go index 9902a57c0dd5..3bb560f726ab 100644 --- a/services/network/mgmt/2019-08-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2019-08-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2019-08-01/network/expressroutecircuitauthorizations.go index c7a09d77429f..b7a201c288d2 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2019-08-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2019-08-01/network/expressroutecircuitconnections.go index 1691869012b8..da34b6035d72 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2019-08-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-08-01/network/expressroutecircuitpeerings.go index f1a6f552835e..690e16fed692 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-08-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressroutecircuits.go b/services/network/mgmt/2019-08-01/network/expressroutecircuits.go index 32f8da4f9d73..6a834dce7b3f 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2019-08-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressrouteconnections.go b/services/network/mgmt/2019-08-01/network/expressrouteconnections.go index ee71b311e266..98ea39aaa19c 100644 --- a/services/network/mgmt/2019-08-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2019-08-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-08-01/network/expressroutecrossconnectionpeerings.go index 4b4dd9ddbe62..c52e245c8d6b 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-08-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressroutecrossconnections.go b/services/network/mgmt/2019-08-01/network/expressroutecrossconnections.go index a3f46523c1bf..943d2f4df08e 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2019-08-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/expressroutegateways.go b/services/network/mgmt/2019-08-01/network/expressroutegateways.go index 9bc05d6e784b..0532fc7fae20 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutegateways.go +++ b/services/network/mgmt/2019-08-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressroutelinks.go b/services/network/mgmt/2019-08-01/network/expressroutelinks.go index 2d1f07f03884..7d4db2f60487 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutelinks.go +++ b/services/network/mgmt/2019-08-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressrouteports.go b/services/network/mgmt/2019-08-01/network/expressrouteports.go index a914fe07b4ab..53223740de05 100644 --- a/services/network/mgmt/2019-08-01/network/expressrouteports.go +++ b/services/network/mgmt/2019-08-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressrouteportslocations.go b/services/network/mgmt/2019-08-01/network/expressrouteportslocations.go index 37aa2cd9958a..c3dc2e5f1a23 100644 --- a/services/network/mgmt/2019-08-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2019-08-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2019-08-01/network/expressrouteserviceproviders.go index 4fff7a13da67..e28885475667 100644 --- a/services/network/mgmt/2019-08-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2019-08-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/firewallpolicies.go b/services/network/mgmt/2019-08-01/network/firewallpolicies.go index b8a512a1d367..0ed99cb15094 100644 --- a/services/network/mgmt/2019-08-01/network/firewallpolicies.go +++ b/services/network/mgmt/2019-08-01/network/firewallpolicies.go @@ -35,7 +35,9 @@ func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient { return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-08-01/network/firewallpolicyrulegroups.go index dcb16a148438..e8e23a2ef643 100644 --- a/services/network/mgmt/2019-08-01/network/firewallpolicyrulegroups.go +++ b/services/network/mgmt/2019-08-01/network/firewallpolicyrulegroups.go @@ -36,7 +36,9 @@ func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRule return NewFirewallPolicyRuleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client. +// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { return FirewallPolicyRuleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2019-08-01/network/hubvirtualnetworkconnections.go index 37b1e6c8320f..baf15d4b4de5 100644 --- a/services/network/mgmt/2019-08-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2019-08-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/inboundnatrules.go b/services/network/mgmt/2019-08-01/network/inboundnatrules.go index ef57dadce93a..fb83129b3939 100644 --- a/services/network/mgmt/2019-08-01/network/inboundnatrules.go +++ b/services/network/mgmt/2019-08-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/interfaceipconfigurations.go b/services/network/mgmt/2019-08-01/network/interfaceipconfigurations.go index 5385db284cbb..59ff215ee4e8 100644 --- a/services/network/mgmt/2019-08-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2019-08-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/interfaceloadbalancers.go b/services/network/mgmt/2019-08-01/network/interfaceloadbalancers.go index 4c42e265c277..723602a5d484 100644 --- a/services/network/mgmt/2019-08-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2019-08-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/interfacesgroup.go b/services/network/mgmt/2019-08-01/network/interfacesgroup.go index c5cfc53d755c..cd3c702f2a6c 100644 --- a/services/network/mgmt/2019-08-01/network/interfacesgroup.go +++ b/services/network/mgmt/2019-08-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/interfacetapconfigurations.go b/services/network/mgmt/2019-08-01/network/interfacetapconfigurations.go index 555d5ad27bf0..893584cad7e1 100644 --- a/services/network/mgmt/2019-08-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2019-08-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2019-08-01/network/loadbalancerbackendaddresspools.go index 40582f9e9a3e..ad99a1a33b01 100644 --- a/services/network/mgmt/2019-08-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2019-08-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2019-08-01/network/loadbalancerfrontendipconfigurations.go index 641b696ea5b2..92c6d0ee391c 100644 --- a/services/network/mgmt/2019-08-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2019-08-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2019-08-01/network/loadbalancerloadbalancingrules.go index e0952ba0ef02..88195a0dcfcf 100644 --- a/services/network/mgmt/2019-08-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2019-08-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2019-08-01/network/loadbalancernetworkinterfaces.go index 65c1e1e1fe58..c9beb7bd3736 100644 --- a/services/network/mgmt/2019-08-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2019-08-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-08-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2019-08-01/network/loadbalanceroutboundrules.go index 0dfcd4b53628..f2348e23139b 100644 --- a/services/network/mgmt/2019-08-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2019-08-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/loadbalancerprobes.go b/services/network/mgmt/2019-08-01/network/loadbalancerprobes.go index 3289952dbe60..aeef7c3413d9 100644 --- a/services/network/mgmt/2019-08-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2019-08-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/loadbalancers.go b/services/network/mgmt/2019-08-01/network/loadbalancers.go index d4aa5c991f4d..bed9d87351c1 100644 --- a/services/network/mgmt/2019-08-01/network/loadbalancers.go +++ b/services/network/mgmt/2019-08-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/localnetworkgateways.go b/services/network/mgmt/2019-08-01/network/localnetworkgateways.go index 47e231a093f5..78ba88676c9b 100644 --- a/services/network/mgmt/2019-08-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2019-08-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/natgateways.go b/services/network/mgmt/2019-08-01/network/natgateways.go index bb6cf51006bc..eddc851a1877 100644 --- a/services/network/mgmt/2019-08-01/network/natgateways.go +++ b/services/network/mgmt/2019-08-01/network/natgateways.go @@ -35,7 +35,8 @@ func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/networkapi/interfaces.go b/services/network/mgmt/2019-08-01/network/networkapi/interfaces.go index e535e375f8a5..c4751aa0c989 100644 --- a/services/network/mgmt/2019-08-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2019-08-01/network/networkapi/interfaces.go @@ -40,12 +40,15 @@ type ApplicationGatewaysClientAPI interface { 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) @@ -60,7 +63,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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.ApplicationSecurityGroupsUpdateTagsFuture, err error) } @@ -69,6 +74,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -76,6 +82,7 @@ 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) @@ -83,7 +90,9 @@ var _ AvailableResourceGroupDelegationsClientAPI = (*network.AvailableResourceGr // 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) @@ -94,7 +103,9 @@ type AzureFirewallsClientAPI interface { 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.AzureFirewall) (result network.AzureFirewall, err error) } @@ -103,6 +114,7 @@ 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) @@ -113,7 +125,9 @@ type BastionHostsClientAPI interface { 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) } var _ BastionHostsClientAPI = (*network.BastionHostsClient)(nil) @@ -134,7 +148,9 @@ type DdosProtectionPlansClientAPI interface { 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.DdosProtectionPlansUpdateTagsFuture, err error) } @@ -143,6 +159,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -153,6 +170,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -163,6 +181,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -173,6 +192,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -181,6 +201,7 @@ var _ ExpressRouteCircuitConnectionsClientAPI = (*network.ExpressRouteCircuitCon 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) @@ -193,7 +214,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -205,6 +228,7 @@ 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) @@ -214,8 +238,10 @@ 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.ExpressRouteCrossConnectionsUpdateTagsFuture, err error) @@ -229,6 +255,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -258,6 +285,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -268,7 +296,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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.ExpressRoutePortsUpdateTagsFuture, err error) } @@ -278,6 +308,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -288,7 +319,9 @@ type FirewallPoliciesClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, firewallPolicyParameters network.TagsObject) (result network.FirewallPolicy, err error) } @@ -300,6 +333,7 @@ type FirewallPolicyRuleGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroup, err error) List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultIterator, err error) } var _ FirewallPolicyRuleGroupsClientAPI = (*network.FirewallPolicyRuleGroupsClient)(nil) @@ -310,7 +344,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancersUpdateTagsFuture, err error) } @@ -320,6 +356,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -328,6 +365,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -338,6 +376,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -346,6 +385,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -354,6 +394,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -361,6 +402,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -369,6 +411,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -379,7 +422,9 @@ type NatGatewaysClientAPI interface { 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) } @@ -394,11 +439,16 @@ type InterfacesClientAPI interface { 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) 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.InterfacesUpdateTagsFuture, err error) } @@ -408,6 +458,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -415,6 +466,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -425,6 +477,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -435,7 +488,9 @@ type ProfilesClientAPI interface { 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) } @@ -447,7 +502,9 @@ type SecurityGroupsClientAPI interface { 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.SecurityGroupsUpdateTagsFuture, err error) } @@ -459,6 +516,7 @@ type SecurityRulesClientAPI interface { 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) @@ -467,6 +525,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -524,6 +583,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -534,7 +594,9 @@ type PrivateEndpointsClientAPI interface { 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) @@ -542,7 +604,9 @@ 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) @@ -556,9 +620,13 @@ type PrivateLinkServicesClientAPI interface { 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) 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) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters network.PrivateEndpointConnection) (result network.PrivateEndpointConnection, err error) } @@ -571,9 +639,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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.PublicIPAddressesUpdateTagsFuture, err error) } @@ -585,7 +657,9 @@ type PublicIPPrefixesClientAPI interface { 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.PublicIPPrefixesUpdateTagsFuture, err error) } @@ -597,7 +671,9 @@ type RouteFiltersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters network.PatchRouteFilter) (result network.RouteFiltersUpdateFuture, err error) } @@ -609,6 +685,7 @@ type RouteFilterRulesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters network.PatchRouteFilterRule) (result network.RouteFilterRulesUpdateFuture, err error) } @@ -620,7 +697,9 @@ type RouteTablesClientAPI interface { 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.RouteTablesUpdateTagsFuture, err error) } @@ -632,6 +711,7 @@ type RoutesClientAPI interface { 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) @@ -639,6 +719,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -649,7 +730,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters network.TagsObject) (result network.ServiceEndpointPoliciesUpdateFuture, err error) } @@ -661,6 +744,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -675,6 +759,7 @@ var _ ServiceTagsClientAPI = (*network.ServiceTagsClient)(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) @@ -686,8 +771,11 @@ type VirtualNetworksClientAPI interface { 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.VirtualNetworksUpdateTagsFuture, err error) } @@ -699,6 +787,7 @@ type SubnetsClientAPI interface { 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) } @@ -725,6 +814,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -743,7 +833,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -763,6 +855,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) @@ -778,6 +871,7 @@ type LocalNetworkGatewaysClientAPI interface { 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.LocalNetworkGatewaysUpdateTagsFuture, err error) } @@ -789,7 +883,9 @@ type VirtualNetworkTapsClientAPI interface { 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.VirtualNetworkTapsUpdateTagsFuture, err error) } @@ -801,7 +897,9 @@ type VirtualRoutersClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters network.TagsObject) (result network.VirtualRouter, err error) } @@ -813,6 +911,7 @@ type VirtualRouterPeeringsClientAPI interface { 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) Update(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters network.VirtualRouterPeering) (result network.VirtualRouterPeering, err error) } @@ -824,7 +923,9 @@ type VirtualWansClientAPI interface { 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.VirtualWansUpdateTagsFuture, err error) } @@ -836,7 +937,9 @@ type VpnSitesClientAPI interface { 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.VpnSitesUpdateTagsFuture, err error) } @@ -846,6 +949,7 @@ var _ VpnSitesClientAPI = (*network.VpnSitesClient)(nil) 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) @@ -863,7 +967,9 @@ type VpnServerConfigurationsClientAPI interface { 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.VpnServerConfigurationsUpdateTagsFuture, err error) } @@ -875,7 +981,9 @@ type VirtualHubsClientAPI interface { 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) 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.VirtualHubsUpdateTagsFuture, err error) } @@ -885,6 +993,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -895,7 +1004,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGatewaysUpdateTagsFuture, err error) } @@ -908,6 +1019,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -922,6 +1034,7 @@ var _ VpnSiteLinkConnectionsClientAPI = (*network.VpnSiteLinkConnectionsClient)( // VpnLinkConnectionsClientAPI contains the set of methods on the VpnLinkConnectionsClient type. type VpnLinkConnectionsClientAPI interface { 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) } var _ VpnLinkConnectionsClientAPI = (*network.VpnLinkConnectionsClient)(nil) @@ -935,7 +1048,9 @@ type P2sVpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2sVpnGatewaysUpdateTagsFuture, err error) } @@ -954,7 +1069,9 @@ type WebApplicationFirewallPoliciesClientAPI interface { 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/2019-08-01/network/operations.go b/services/network/mgmt/2019-08-01/network/operations.go index e5fa731ad485..f9d0cea2bec0 100644 --- a/services/network/mgmt/2019-08-01/network/operations.go +++ b/services/network/mgmt/2019-08-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/p2svpngateways.go b/services/network/mgmt/2019-08-01/network/p2svpngateways.go index c8cb0a52028a..3d68129ee8a7 100644 --- a/services/network/mgmt/2019-08-01/network/p2svpngateways.go +++ b/services/network/mgmt/2019-08-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/packetcaptures.go b/services/network/mgmt/2019-08-01/network/packetcaptures.go index 85920514f2ce..fc11a81136b2 100644 --- a/services/network/mgmt/2019-08-01/network/packetcaptures.go +++ b/services/network/mgmt/2019-08-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2019-08-01/network/peerexpressroutecircuitconnections.go index 983c2e4bb3c0..ffbc3281525f 100644 --- a/services/network/mgmt/2019-08-01/network/peerexpressroutecircuitconnections.go +++ b/services/network/mgmt/2019-08-01/network/peerexpressroutecircuitconnections.go @@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr } // NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/privateendpoints.go b/services/network/mgmt/2019-08-01/network/privateendpoints.go index 25a61faf0e11..ea8bf7ebc016 100644 --- a/services/network/mgmt/2019-08-01/network/privateendpoints.go +++ b/services/network/mgmt/2019-08-01/network/privateendpoints.go @@ -35,7 +35,9 @@ func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/privatelinkservices.go b/services/network/mgmt/2019-08-01/network/privatelinkservices.go index 52aa92fa949e..6717712de709 100644 --- a/services/network/mgmt/2019-08-01/network/privatelinkservices.go +++ b/services/network/mgmt/2019-08-01/network/privatelinkservices.go @@ -35,7 +35,9 @@ func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClie return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/profiles.go b/services/network/mgmt/2019-08-01/network/profiles.go index b679a8aea39e..22a50d1aad72 100644 --- a/services/network/mgmt/2019-08-01/network/profiles.go +++ b/services/network/mgmt/2019-08-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/publicipaddresses.go b/services/network/mgmt/2019-08-01/network/publicipaddresses.go index 129862602577..e53b3e85e526 100644 --- a/services/network/mgmt/2019-08-01/network/publicipaddresses.go +++ b/services/network/mgmt/2019-08-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/publicipprefixes.go b/services/network/mgmt/2019-08-01/network/publicipprefixes.go index 21480e9e53f8..b1b265652da8 100644 --- a/services/network/mgmt/2019-08-01/network/publicipprefixes.go +++ b/services/network/mgmt/2019-08-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/resourcenavigationlinks.go b/services/network/mgmt/2019-08-01/network/resourcenavigationlinks.go index 3960a958af94..753eb525a402 100644 --- a/services/network/mgmt/2019-08-01/network/resourcenavigationlinks.go +++ b/services/network/mgmt/2019-08-01/network/resourcenavigationlinks.go @@ -35,7 +35,9 @@ func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationL return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/routefilterrules.go b/services/network/mgmt/2019-08-01/network/routefilterrules.go index 7c2e478aae83..eddcdf02434a 100644 --- a/services/network/mgmt/2019-08-01/network/routefilterrules.go +++ b/services/network/mgmt/2019-08-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/routefilters.go b/services/network/mgmt/2019-08-01/network/routefilters.go index de386aed3499..7e5dccff05bd 100644 --- a/services/network/mgmt/2019-08-01/network/routefilters.go +++ b/services/network/mgmt/2019-08-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/routes.go b/services/network/mgmt/2019-08-01/network/routes.go index 280dc511e995..0e721653d559 100644 --- a/services/network/mgmt/2019-08-01/network/routes.go +++ b/services/network/mgmt/2019-08-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/routetables.go b/services/network/mgmt/2019-08-01/network/routetables.go index a03803adb64b..de1e3bc002bb 100644 --- a/services/network/mgmt/2019-08-01/network/routetables.go +++ b/services/network/mgmt/2019-08-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/securitygroups.go b/services/network/mgmt/2019-08-01/network/securitygroups.go index f781e821f36f..89a9f7406d02 100644 --- a/services/network/mgmt/2019-08-01/network/securitygroups.go +++ b/services/network/mgmt/2019-08-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/securityrules.go b/services/network/mgmt/2019-08-01/network/securityrules.go index 1accaf145285..8889d561b61f 100644 --- a/services/network/mgmt/2019-08-01/network/securityrules.go +++ b/services/network/mgmt/2019-08-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/serviceassociationlinks.go b/services/network/mgmt/2019-08-01/network/serviceassociationlinks.go index 39b9eb3f838c..067da999c2a1 100644 --- a/services/network/mgmt/2019-08-01/network/serviceassociationlinks.go +++ b/services/network/mgmt/2019-08-01/network/serviceassociationlinks.go @@ -35,7 +35,9 @@ func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationL return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/serviceendpointpolicies.go b/services/network/mgmt/2019-08-01/network/serviceendpointpolicies.go index d04522d1faa7..c88d30bcdcda 100644 --- a/services/network/mgmt/2019-08-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2019-08-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2019-08-01/network/serviceendpointpolicydefinitions.go index 5e457ce64b82..fa363f786898 100644 --- a/services/network/mgmt/2019-08-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2019-08-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/servicetags.go b/services/network/mgmt/2019-08-01/network/servicetags.go index 90652a035cc6..54d763aa2197 100644 --- a/services/network/mgmt/2019-08-01/network/servicetags.go +++ b/services/network/mgmt/2019-08-01/network/servicetags.go @@ -35,7 +35,8 @@ func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/subnets.go b/services/network/mgmt/2019-08-01/network/subnets.go index 7613fb8a77de..20d1b03f8643 100644 --- a/services/network/mgmt/2019-08-01/network/subnets.go +++ b/services/network/mgmt/2019-08-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/usages.go b/services/network/mgmt/2019-08-01/network/usages.go index b74f3b69fd08..f0477fe4d84a 100644 --- a/services/network/mgmt/2019-08-01/network/usages.go +++ b/services/network/mgmt/2019-08-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualhubs.go b/services/network/mgmt/2019-08-01/network/virtualhubs.go index bb84059b2c71..47b8b706f678 100644 --- a/services/network/mgmt/2019-08-01/network/virtualhubs.go +++ b/services/network/mgmt/2019-08-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-08-01/network/virtualnetworkgatewayconnections.go index 7cb492478205..589b548b7869 100644 --- a/services/network/mgmt/2019-08-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-08-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualnetworkgateways.go b/services/network/mgmt/2019-08-01/network/virtualnetworkgateways.go index ba45e31e651b..85cb7e33ad62 100644 --- a/services/network/mgmt/2019-08-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2019-08-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2019-08-01/network/virtualnetworkpeerings.go index 0b5ceb42a552..dda02d0065e3 100644 --- a/services/network/mgmt/2019-08-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2019-08-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualnetworks.go b/services/network/mgmt/2019-08-01/network/virtualnetworks.go index be4433b21b89..9823be09d768 100644 --- a/services/network/mgmt/2019-08-01/network/virtualnetworks.go +++ b/services/network/mgmt/2019-08-01/network/virtualnetworks.go @@ -36,7 +36,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualnetworktaps.go b/services/network/mgmt/2019-08-01/network/virtualnetworktaps.go index a4f25dd38ffa..d756edb0e553 100644 --- a/services/network/mgmt/2019-08-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2019-08-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualrouterpeerings.go b/services/network/mgmt/2019-08-01/network/virtualrouterpeerings.go index ed5cb97aefe8..4705ba49078e 100644 --- a/services/network/mgmt/2019-08-01/network/virtualrouterpeerings.go +++ b/services/network/mgmt/2019-08-01/network/virtualrouterpeerings.go @@ -36,7 +36,9 @@ func NewVirtualRouterPeeringsClient(subscriptionID string) VirtualRouterPeerings return NewVirtualRouterPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualRouterPeeringsClientWithBaseURI creates an instance of the VirtualRouterPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualrouters.go b/services/network/mgmt/2019-08-01/network/virtualrouters.go index 08ef58c4e840..0191082a26fc 100644 --- a/services/network/mgmt/2019-08-01/network/virtualrouters.go +++ b/services/network/mgmt/2019-08-01/network/virtualrouters.go @@ -36,7 +36,8 @@ func NewVirtualRoutersClient(subscriptionID string) VirtualRoutersClient { return NewVirtualRoutersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualRoutersClientWithBaseURI creates an instance of the VirtualRoutersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/virtualwans.go b/services/network/mgmt/2019-08-01/network/virtualwans.go index c35f44ded067..a357e0c6a261 100644 --- a/services/network/mgmt/2019-08-01/network/virtualwans.go +++ b/services/network/mgmt/2019-08-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpnconnections.go b/services/network/mgmt/2019-08-01/network/vpnconnections.go index f8f082690493..978766ea64d8 100644 --- a/services/network/mgmt/2019-08-01/network/vpnconnections.go +++ b/services/network/mgmt/2019-08-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpngateways.go b/services/network/mgmt/2019-08-01/network/vpngateways.go index 95df48106c51..814ebec085d5 100644 --- a/services/network/mgmt/2019-08-01/network/vpngateways.go +++ b/services/network/mgmt/2019-08-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpnlinkconnections.go b/services/network/mgmt/2019-08-01/network/vpnlinkconnections.go index 76b448861fb3..4f0e361b6ad3 100644 --- a/services/network/mgmt/2019-08-01/network/vpnlinkconnections.go +++ b/services/network/mgmt/2019-08-01/network/vpnlinkconnections.go @@ -35,7 +35,9 @@ func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpnserverconfigurations.go b/services/network/mgmt/2019-08-01/network/vpnserverconfigurations.go index 6eb66841fe40..583d0801835f 100644 --- a/services/network/mgmt/2019-08-01/network/vpnserverconfigurations.go +++ b/services/network/mgmt/2019-08-01/network/vpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewVpnServerConfigurationsClient(subscriptionID string) VpnServerConfigurat return NewVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnServerConfigurationsClientWithBaseURI creates an instance of the VpnServerConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go b/services/network/mgmt/2019-08-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go index 3fdb70a04b23..f3fc95626e7d 100644 --- a/services/network/mgmt/2019-08-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go +++ b/services/network/mgmt/2019-08-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go @@ -37,7 +37,8 @@ func NewVpnServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID str } // NewVpnServerConfigurationsAssociatedWithVirtualWanClientWithBaseURI creates an instance of the -// VpnServerConfigurationsAssociatedWithVirtualWanClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpnsitelinkconnections.go b/services/network/mgmt/2019-08-01/network/vpnsitelinkconnections.go index 254db8c50ba1..6f609dfc9a5e 100644 --- a/services/network/mgmt/2019-08-01/network/vpnsitelinkconnections.go +++ b/services/network/mgmt/2019-08-01/network/vpnsitelinkconnections.go @@ -35,7 +35,9 @@ func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectio return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpnsitelinks.go b/services/network/mgmt/2019-08-01/network/vpnsitelinks.go index 119ee3b6fc2f..6ad8affdc93d 100644 --- a/services/network/mgmt/2019-08-01/network/vpnsitelinks.go +++ b/services/network/mgmt/2019-08-01/network/vpnsitelinks.go @@ -35,7 +35,8 @@ func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient { return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpnsites.go b/services/network/mgmt/2019-08-01/network/vpnsites.go index ffdb87321971..139c1c49651d 100644 --- a/services/network/mgmt/2019-08-01/network/vpnsites.go +++ b/services/network/mgmt/2019-08-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2019-08-01/network/vpnsitesconfiguration.go index f6faac70eb49..5a47069bd55a 100644 --- a/services/network/mgmt/2019-08-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2019-08-01/network/vpnsitesconfiguration.go @@ -36,7 +36,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/watchers.go b/services/network/mgmt/2019-08-01/network/watchers.go index c9d2d8cc5b74..904f3deab55b 100644 --- a/services/network/mgmt/2019-08-01/network/watchers.go +++ b/services/network/mgmt/2019-08-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-08-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-08-01/network/webapplicationfirewallpolicies.go index 6d6220a7fa87..ac054044a6c1 100644 --- a/services/network/mgmt/2019-08-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2019-08-01/network/webapplicationfirewallpolicies.go @@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati } // NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/applicationgateways.go b/services/network/mgmt/2019-09-01/network/applicationgateways.go index 8e2e3f25221d..9c41ddf9403f 100644 --- a/services/network/mgmt/2019-09-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-09-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/applicationsecuritygroups.go b/services/network/mgmt/2019-09-01/network/applicationsecuritygroups.go index c968f70c5a3f..77553840c9a9 100644 --- a/services/network/mgmt/2019-09-01/network/applicationsecuritygroups.go +++ b/services/network/mgmt/2019-09-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/availabledelegations.go b/services/network/mgmt/2019-09-01/network/availabledelegations.go index 98ccff35f2e9..76e2eeb64e60 100644 --- a/services/network/mgmt/2019-09-01/network/availabledelegations.go +++ b/services/network/mgmt/2019-09-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/availableendpointservices.go b/services/network/mgmt/2019-09-01/network/availableendpointservices.go index bbd8a7081b72..b7f68f8269e7 100644 --- a/services/network/mgmt/2019-09-01/network/availableendpointservices.go +++ b/services/network/mgmt/2019-09-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/availableprivateendpointtypes.go b/services/network/mgmt/2019-09-01/network/availableprivateendpointtypes.go index 9a095c60f186..a46aa4c1050e 100644 --- a/services/network/mgmt/2019-09-01/network/availableprivateendpointtypes.go +++ b/services/network/mgmt/2019-09-01/network/availableprivateendpointtypes.go @@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv } // NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient -// 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 NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2019-09-01/network/availableresourcegroupdelegations.go index 0e1db117f7ed..323d6a800b55 100644 --- a/services/network/mgmt/2019-09-01/network/availableresourcegroupdelegations.go +++ b/services/network/mgmt/2019-09-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/availableservicealiases.go b/services/network/mgmt/2019-09-01/network/availableservicealiases.go index dc23f413de28..16431a4d172e 100644 --- a/services/network/mgmt/2019-09-01/network/availableservicealiases.go +++ b/services/network/mgmt/2019-09-01/network/availableservicealiases.go @@ -35,7 +35,9 @@ func NewAvailableServiceAliasesClient(subscriptionID string) AvailableServiceAli return NewAvailableServiceAliasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableServiceAliasesClientWithBaseURI creates an instance of the AvailableServiceAliasesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2019-09-01/network/azurefirewallfqdntags.go index 575b91181c28..7243ccaedfb6 100644 --- a/services/network/mgmt/2019-09-01/network/azurefirewallfqdntags.go +++ b/services/network/mgmt/2019-09-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/azurefirewalls.go b/services/network/mgmt/2019-09-01/network/azurefirewalls.go index 02323fe15943..85d00d3e9ad3 100644 --- a/services/network/mgmt/2019-09-01/network/azurefirewalls.go +++ b/services/network/mgmt/2019-09-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// 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)} } @@ -502,13 +503,13 @@ func (client AzureFirewallsClient) ListAllComplete(ctx context.Context) (result // 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 AzureFirewall, err error) { +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.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -519,18 +520,12 @@ func (client AzureFirewallsClient) UpdateTags(ctx context.Context, resourceGroup return } - resp, err := client.UpdateTagsSender(req) + result, err = client.UpdateTagsSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", result.Response(), "Failure sending request") return } - result, err = client.UpdateTagsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", resp, "Failure responding to request") - } - return } @@ -559,9 +554,15 @@ func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resou // 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) (*http.Response, error) { +func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (future AzureFirewallsUpdateTagsFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // UpdateTagsResponder handles the response to the UpdateTags request. The method always @@ -570,7 +571,7 @@ func (client AzureFirewallsClient) UpdateTagsResponder(resp *http.Response) (res err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/services/network/mgmt/2019-09-01/network/bastionhosts.go b/services/network/mgmt/2019-09-01/network/bastionhosts.go index a6d1e4ace024..1c4f184fef82 100644 --- a/services/network/mgmt/2019-09-01/network/bastionhosts.go +++ b/services/network/mgmt/2019-09-01/network/bastionhosts.go @@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/bgpservicecommunities.go b/services/network/mgmt/2019-09-01/network/bgpservicecommunities.go index 232f48887118..24899ecf39fb 100644 --- a/services/network/mgmt/2019-09-01/network/bgpservicecommunities.go +++ b/services/network/mgmt/2019-09-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/client.go b/services/network/mgmt/2019-09-01/network/client.go index 60a1dba12619..b0aaaff915d9 100644 --- a/services/network/mgmt/2019-09-01/network/client.go +++ b/services/network/mgmt/2019-09-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), @@ -132,6 +133,203 @@ func (client BaseClient) CheckDNSNameAvailabilityResponder(resp *http.Response) 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-09-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-09-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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: @@ -213,6 +411,365 @@ func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofileRespo 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-09-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 = autorest.SendWithSender(client, 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.Future = future.Future + 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 +} + +// 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 = "2019-09-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-09-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 = autorest.SendWithSender(client, 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.Future = future.Future + return +} + // SupportedSecurityProviders gives the supported security providers for the virtual wan. // Parameters: // resourceGroupName - the resource group name. diff --git a/services/network/mgmt/2019-09-01/network/connectionmonitors.go b/services/network/mgmt/2019-09-01/network/connectionmonitors.go index ca171615eb08..b33487f27c44 100644 --- a/services/network/mgmt/2019-09-01/network/connectionmonitors.go +++ b/services/network/mgmt/2019-09-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/ddoscustompolicies.go b/services/network/mgmt/2019-09-01/network/ddoscustompolicies.go index 6e661d60fd1b..0da38a0e2a90 100644 --- a/services/network/mgmt/2019-09-01/network/ddoscustompolicies.go +++ b/services/network/mgmt/2019-09-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/ddosprotectionplans.go b/services/network/mgmt/2019-09-01/network/ddosprotectionplans.go index a93595c46b3b..526e984ed639 100644 --- a/services/network/mgmt/2019-09-01/network/ddosprotectionplans.go +++ b/services/network/mgmt/2019-09-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/defaultsecurityrules.go b/services/network/mgmt/2019-09-01/network/defaultsecurityrules.go index 207905c4391e..9c666a12dcb5 100644 --- a/services/network/mgmt/2019-09-01/network/defaultsecurityrules.go +++ b/services/network/mgmt/2019-09-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2019-09-01/network/expressroutecircuitauthorizations.go index 0fdccd576106..e50c6bebdbc1 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutecircuitauthorizations.go +++ b/services/network/mgmt/2019-09-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2019-09-01/network/expressroutecircuitconnections.go index 81162a3ea0e0..4e344eca177c 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutecircuitconnections.go +++ b/services/network/mgmt/2019-09-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go index 5889f2f03458..e8ddb3ccf06d 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressroutecircuits.go b/services/network/mgmt/2019-09-01/network/expressroutecircuits.go index f71a1a4abffa..511c3dce673a 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutecircuits.go +++ b/services/network/mgmt/2019-09-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressrouteconnections.go b/services/network/mgmt/2019-09-01/network/expressrouteconnections.go index 4d83f3e20d57..c9f6280242c7 100644 --- a/services/network/mgmt/2019-09-01/network/expressrouteconnections.go +++ b/services/network/mgmt/2019-09-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go index c18b9029d2f7..31c063d93c56 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressroutecrossconnections.go b/services/network/mgmt/2019-09-01/network/expressroutecrossconnections.go index b0c6882fd72b..539976f9b758 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutecrossconnections.go +++ b/services/network/mgmt/2019-09-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/expressroutegateways.go b/services/network/mgmt/2019-09-01/network/expressroutegateways.go index 999897a85a25..38c9f651e29e 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutegateways.go +++ b/services/network/mgmt/2019-09-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressroutelinks.go b/services/network/mgmt/2019-09-01/network/expressroutelinks.go index 54b2e087c291..d0e442232d46 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutelinks.go +++ b/services/network/mgmt/2019-09-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressrouteports.go b/services/network/mgmt/2019-09-01/network/expressrouteports.go index 5c329a43510b..83499b743ad8 100644 --- a/services/network/mgmt/2019-09-01/network/expressrouteports.go +++ b/services/network/mgmt/2019-09-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressrouteportslocations.go b/services/network/mgmt/2019-09-01/network/expressrouteportslocations.go index 63ea58d2b0c6..5b944d90023f 100644 --- a/services/network/mgmt/2019-09-01/network/expressrouteportslocations.go +++ b/services/network/mgmt/2019-09-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2019-09-01/network/expressrouteserviceproviders.go index 9f18c083e83d..29cc09bb576d 100644 --- a/services/network/mgmt/2019-09-01/network/expressrouteserviceproviders.go +++ b/services/network/mgmt/2019-09-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/firewallpolicies.go b/services/network/mgmt/2019-09-01/network/firewallpolicies.go index e254354c737b..d433976f52a5 100644 --- a/services/network/mgmt/2019-09-01/network/firewallpolicies.go +++ b/services/network/mgmt/2019-09-01/network/firewallpolicies.go @@ -35,7 +35,9 @@ func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient { return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go index 1f9d711f63d8..9f5b5e66829e 100644 --- a/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go +++ b/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go @@ -36,7 +36,9 @@ func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRule return NewFirewallPolicyRuleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client. +// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { return FirewallPolicyRuleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2019-09-01/network/hubvirtualnetworkconnections.go index 538c6bc30321..35f66bddc74f 100644 --- a/services/network/mgmt/2019-09-01/network/hubvirtualnetworkconnections.go +++ b/services/network/mgmt/2019-09-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/inboundnatrules.go b/services/network/mgmt/2019-09-01/network/inboundnatrules.go index 2b6fdfe1a52e..2d5785e7286d 100644 --- a/services/network/mgmt/2019-09-01/network/inboundnatrules.go +++ b/services/network/mgmt/2019-09-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/interfaceipconfigurations.go b/services/network/mgmt/2019-09-01/network/interfaceipconfigurations.go index 81814cc9823d..283015206ee7 100644 --- a/services/network/mgmt/2019-09-01/network/interfaceipconfigurations.go +++ b/services/network/mgmt/2019-09-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/interfaceloadbalancers.go b/services/network/mgmt/2019-09-01/network/interfaceloadbalancers.go index 86df7b5c0e97..8e1c8548a2a4 100644 --- a/services/network/mgmt/2019-09-01/network/interfaceloadbalancers.go +++ b/services/network/mgmt/2019-09-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/interfacesgroup.go b/services/network/mgmt/2019-09-01/network/interfacesgroup.go index 7438dfed813c..64c287fd0e6c 100644 --- a/services/network/mgmt/2019-09-01/network/interfacesgroup.go +++ b/services/network/mgmt/2019-09-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/interfacetapconfigurations.go b/services/network/mgmt/2019-09-01/network/interfacetapconfigurations.go index ca96f6a92593..96c582b23c89 100644 --- a/services/network/mgmt/2019-09-01/network/interfacetapconfigurations.go +++ b/services/network/mgmt/2019-09-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/ipgroups.go b/services/network/mgmt/2019-09-01/network/ipgroups.go index fc9c39e4b049..083f20d0168d 100644 --- a/services/network/mgmt/2019-09-01/network/ipgroups.go +++ b/services/network/mgmt/2019-09-01/network/ipgroups.go @@ -35,7 +35,8 @@ func NewIPGroupsClient(subscriptionID string) IPGroupsClient { return NewIPGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIPGroupsClientWithBaseURI creates an instance of the IPGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go index 3a313c458b60..b770b19440f1 100644 --- a/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go +++ b/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go index 6a4ac7319d2e..f29c3a567a9c 100644 --- a/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go +++ b/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go index 3905fe084dcd..5400ed1f8fd1 100644 --- a/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go +++ b/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go index 0a311ef156df..bb4c2c069097 100644 --- a/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go +++ b/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go index 3fb4c68dec82..33c004e5c081 100644 --- a/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go +++ b/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go b/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go index 0b741a93e012..db52451703e3 100644 --- a/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go +++ b/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/loadbalancers.go b/services/network/mgmt/2019-09-01/network/loadbalancers.go index 471324a5395f..f7629c14e17a 100644 --- a/services/network/mgmt/2019-09-01/network/loadbalancers.go +++ b/services/network/mgmt/2019-09-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/localnetworkgateways.go b/services/network/mgmt/2019-09-01/network/localnetworkgateways.go index ba4d9f315ba2..be5194aec010 100644 --- a/services/network/mgmt/2019-09-01/network/localnetworkgateways.go +++ b/services/network/mgmt/2019-09-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/models.go b/services/network/mgmt/2019-09-01/network/models.go index a75fb13510ee..d803d1f8edba 100644 --- a/services/network/mgmt/2019-09-01/network/models.go +++ b/services/network/mgmt/2019-09-01/network/models.go @@ -500,6 +500,21 @@ func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode return []AzureFirewallThreatIntelMode{AzureFirewallThreatIntelModeAlert, AzureFirewallThreatIntelModeDeny, AzureFirewallThreatIntelModeOff} } +// BastionConnectProtocol enumerates the values for bastion connect protocol. +type BastionConnectProtocol string + +const ( + // RDP ... + RDP BastionConnectProtocol = "RDP" + // SSH ... + SSH BastionConnectProtocol = "SSH" +) + +// PossibleBastionConnectProtocolValues returns an array of possible values for the BastionConnectProtocol const type. +func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { + return []BastionConnectProtocol{RDP, SSH} +} + // BgpPeerState enumerates the values for bgp peer state. type BgpPeerState string @@ -5579,9 +5594,9 @@ func NewAuthorizationListResultPage(getNextPage func(context.Context, Authorizat // AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization. type AuthorizationPropertiesFormat struct { - // AuthorizationKey - READ-ONLY; The authorization key. + // AuthorizationKey - The authorization key. AuthorizationKey *string `json:"authorizationKey,omitempty"` - // AuthorizationUseStatus - READ-ONLY; The authorization use status. Possible values include: 'Available', 'InUse' + // AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse' AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -7404,6 +7419,35 @@ type AzureFirewallSku struct { Tier AzureFirewallSkuTier `json:"tier,omitempty"` } +// AzureFirewallsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AzureFirewallsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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:"-"` @@ -7561,6 +7605,179 @@ type BackendAddressPoolPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// 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: 'SSH', 'RDP' + 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"` +} + +// BastionActiveSessionListResult response for GetActiveSessions. +type BastionActiveSessionListResult struct { + autorest.Response `json:"-"` + // Value - List of active sessions on the bastion. + Value *[]BastionActiveSession `json:"value,omitempty"` + // NextLink - Gets or sets 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 +} + +// 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.NextLink == nil || len(to.String(baslr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.baslr) + if err != nil { + return err + } + page.baslr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage { + return BastionActiveSessionListResultPage{fn: getNextPage} +} + // BastionHost bastion Host resource. type BastionHost struct { autorest.Response `json:"-"` @@ -7985,6 +8202,327 @@ func (future *BastionHostsDeleteFuture) Result(client BastionHostsClient) (ar au 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 - Gets or sets 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 +} + +// 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.NextLink == nil || len(to.String(bsdr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.bsdr) + if err != nil { + return err + } + page.bsdr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage { + return BastionSessionDeleteResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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"` +} + +// 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 - Gets or sets 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 +} + +// 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.NextLink == nil || len(to.String(bsllr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.bsllr) + if err != nil { + return err + } + page.bsllr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage { + return BastionShareableLinkListResultPage{fn: getNextPage} +} + // 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. @@ -9727,6 +10265,29 @@ func (d *Delegation) UnmarshalJSON(body []byte) error { return nil } +// DeleteBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DeleteBastionShareableLinkFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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. @@ -10601,7 +11162,7 @@ type ExpressRouteCircuitConnectionPropertiesFormat struct { AddressPrefix *string `json:"addressPrefix,omitempty"` // AuthorizationKey - The authorization key. AuthorizationKey *string `json:"authorizationKey,omitempty"` - // CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' + // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -11072,7 +11633,7 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { 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 - The Azure ASN. AzureASN *int32 `json:"azureASN,omitempty"` // PeerASN - The peer ASN. PeerASN *int64 `json:"peerASN,omitempty"` @@ -11080,9 +11641,9 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` // SecondaryPeerAddressPrefix - The secondary address prefix. SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // PrimaryAzurePort - READ-ONLY; The primary port. + // PrimaryAzurePort - The primary port. PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - READ-ONLY; The secondary port. + // SecondaryAzurePort - The secondary port. SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` // SharedKey - The shared key. SharedKey *string `json:"sharedKey,omitempty"` @@ -11104,7 +11665,7 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` // ExpressRouteConnection - The ExpressRoute connection. ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"` - // Connections - READ-ONLY; The list of circuit connections associated with Azure Private Peering for this circuit. + // 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"` @@ -11166,15 +11727,15 @@ func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRout type ExpressRouteCircuitPropertiesFormat struct { // AllowClassicOperations - Allow classic operations. AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` - // CircuitProvisioningState - READ-ONLY; The CircuitProvisioningState state of the resource. + // CircuitProvisioningState - The CircuitProvisioningState state of the resource. CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` - // ServiceProviderProvisioningState - READ-ONLY; The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' 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 - READ-ONLY; The ServiceKey. + // ServiceKey - The ServiceKey. ServiceKey *string `json:"serviceKey,omitempty"` // ServiceProviderNotes - The ServiceProviderNotes. ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` @@ -11190,7 +11751,7 @@ type ExpressRouteCircuitPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // GatewayManagerEtag - The GatewayManager Etag. GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // GlobalReachEnabled - READ-ONLY; Flag denoting Global reach status. + // GlobalReachEnabled - Flag denoting Global reach status. GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` } @@ -15077,6 +15638,64 @@ func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) Result(c return } +// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GetActiveSessionsAllFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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. @@ -24895,6 +25514,64 @@ type PublicIPPrefixSku struct { Name PublicIPPrefixSkuName `json:"name,omitempty"` } +// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PutBastionShareableLinkAllFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + // QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result. type QueryTroubleshootingParameters struct { // TargetResourceID - The target resource ID to query the troubleshooting result. @@ -27853,6 +28530,12 @@ type ServiceTagsListResult struct { Values *[]ServiceTagInformation `json:"values,omitempty"` } +// SessionIds list of session ids. +type SessionIds struct { + // SessionIds - List of session ids + SessionIds *[]string `json:"sessionIds,omitempty"` +} + // String ... type String struct { autorest.Response `json:"-"` @@ -32657,6 +33340,35 @@ type VirtualWanVpnProfileParameters struct { 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) +} + // VpnClientConfiguration vpnClientConfiguration for P2S client. type VpnClientConfiguration struct { // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. diff --git a/services/network/mgmt/2019-09-01/network/natgateways.go b/services/network/mgmt/2019-09-01/network/natgateways.go index 6062fe5018a6..c7117ff54faa 100644 --- a/services/network/mgmt/2019-09-01/network/natgateways.go +++ b/services/network/mgmt/2019-09-01/network/natgateways.go @@ -35,7 +35,8 @@ func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/networkapi/interfaces.go b/services/network/mgmt/2019-09-01/network/networkapi/interfaces.go index 82f369329002..5a004001a516 100644 --- a/services/network/mgmt/2019-09-01/network/networkapi/interfaces.go +++ b/services/network/mgmt/2019-09-01/network/networkapi/interfaces.go @@ -25,7 +25,16 @@ import ( // 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) } @@ -40,12 +49,15 @@ type ApplicationGatewaysClientAPI interface { 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) @@ -60,7 +72,9 @@ type ApplicationSecurityGroupsClientAPI interface { 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) } @@ -69,6 +83,7 @@ var _ ApplicationSecurityGroupsClientAPI = (*network.ApplicationSecurityGroupsCl // 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) @@ -76,6 +91,7 @@ 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) @@ -83,7 +99,9 @@ var _ AvailableResourceGroupDelegationsClientAPI = (*network.AvailableResourceGr // 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) @@ -94,8 +112,10 @@ type AzureFirewallsClientAPI interface { 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) - UpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters network.TagsObject) (result network.AzureFirewall, 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) @@ -103,6 +123,7 @@ 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) @@ -113,7 +134,9 @@ type BastionHostsClientAPI interface { 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) } var _ BastionHostsClientAPI = (*network.BastionHostsClient)(nil) @@ -134,7 +157,9 @@ type DdosProtectionPlansClientAPI interface { 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) } @@ -143,6 +168,7 @@ var _ DdosProtectionPlansClientAPI = (*network.DdosProtectionPlansClient)(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) @@ -153,6 +179,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -163,6 +190,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -173,6 +201,7 @@ type ExpressRouteCircuitConnectionsClientAPI interface { 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) @@ -181,6 +210,7 @@ var _ ExpressRouteCircuitConnectionsClientAPI = (*network.ExpressRouteCircuitCon 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) @@ -193,7 +223,9 @@ type ExpressRouteCircuitsClientAPI interface { 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) @@ -205,6 +237,7 @@ 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) @@ -214,8 +247,10 @@ 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) @@ -229,6 +264,7 @@ type ExpressRouteCrossConnectionPeeringsClientAPI interface { 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) @@ -258,6 +294,7 @@ var _ ExpressRouteConnectionsClientAPI = (*network.ExpressRouteConnectionsClient 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) @@ -268,7 +305,9 @@ type ExpressRoutePortsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result network.ExpressRoutePortsDeleteFuture, 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) } @@ -278,6 +317,7 @@ var _ ExpressRoutePortsClientAPI = (*network.ExpressRoutePortsClient)(nil) 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) @@ -288,7 +328,9 @@ type FirewallPoliciesClientAPI interface { 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) @@ -299,6 +341,7 @@ type FirewallPolicyRuleGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroup, err error) List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultIterator, err error) } var _ FirewallPolicyRuleGroupsClientAPI = (*network.FirewallPolicyRuleGroupsClient)(nil) @@ -309,7 +352,9 @@ type IPGroupsClientAPI interface { 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) } @@ -321,7 +366,9 @@ type LoadBalancersClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.TagsObject) (result network.LoadBalancer, err error) } @@ -331,6 +378,7 @@ var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) type LoadBalancerBackendAddressPoolsClientAPI interface { 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) @@ -339,6 +387,7 @@ var _ LoadBalancerBackendAddressPoolsClientAPI = (*network.LoadBalancerBackendAd 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) @@ -349,6 +398,7 @@ type InboundNatRulesClientAPI interface { 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) @@ -357,6 +407,7 @@ var _ InboundNatRulesClientAPI = (*network.InboundNatRulesClient)(nil) 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) @@ -365,6 +416,7 @@ var _ LoadBalancerLoadBalancingRulesClientAPI = (*network.LoadBalancerLoadBalanc 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) @@ -372,6 +424,7 @@ var _ LoadBalancerOutboundRulesClientAPI = (*network.LoadBalancerOutboundRulesCl // 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) @@ -380,6 +433,7 @@ var _ LoadBalancerNetworkInterfacesClientAPI = (*network.LoadBalancerNetworkInte 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) @@ -390,7 +444,9 @@ type NatGatewaysClientAPI interface { 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) } @@ -405,11 +461,16 @@ type InterfacesClientAPI interface { 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) 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) } @@ -419,6 +480,7 @@ var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) 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) @@ -426,6 +488,7 @@ var _ InterfaceIPConfigurationsClientAPI = (*network.InterfaceIPConfigurationsCl // 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) @@ -436,6 +499,7 @@ type InterfaceTapConfigurationsClientAPI interface { 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) @@ -446,7 +510,9 @@ type ProfilesClientAPI interface { 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) } @@ -458,7 +524,9 @@ type SecurityGroupsClientAPI interface { 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) } @@ -470,6 +538,7 @@ type SecurityRulesClientAPI interface { 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) @@ -478,6 +547,7 @@ var _ SecurityRulesClientAPI = (*network.SecurityRulesClient)(nil) 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) @@ -535,6 +605,7 @@ var _ ConnectionMonitorsClientAPI = (*network.ConnectionMonitorsClient)(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) @@ -545,7 +616,9 @@ type PrivateEndpointsClientAPI interface { 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) @@ -553,7 +626,9 @@ 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) @@ -568,10 +643,15 @@ type PrivateLinkServicesClientAPI interface { 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) } @@ -584,9 +664,13 @@ type PublicIPAddressesClientAPI interface { Get(ctx context.Context, resourceGroupName 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) 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) } @@ -598,7 +682,9 @@ type PublicIPPrefixesClientAPI interface { 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) } @@ -610,7 +696,9 @@ type RouteFiltersClientAPI interface { 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) } @@ -622,6 +710,7 @@ type RouteFilterRulesClientAPI interface { 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) @@ -632,7 +721,9 @@ type RouteTablesClientAPI interface { 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) } @@ -644,6 +735,7 @@ type RoutesClientAPI interface { 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) @@ -651,6 +743,7 @@ var _ RoutesClientAPI = (*network.RoutesClient)(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) @@ -661,7 +754,9 @@ type ServiceEndpointPoliciesClientAPI interface { 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) } @@ -673,6 +768,7 @@ type ServiceEndpointPolicyDefinitionsClientAPI interface { 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) @@ -687,6 +783,7 @@ var _ ServiceTagsClientAPI = (*network.ServiceTagsClient)(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) @@ -698,8 +795,11 @@ type VirtualNetworksClientAPI interface { 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) } @@ -711,6 +811,7 @@ type SubnetsClientAPI interface { 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) } @@ -737,6 +838,7 @@ type VirtualNetworkPeeringsClientAPI interface { 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) @@ -755,7 +857,9 @@ type VirtualNetworkGatewaysClientAPI interface { 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) @@ -775,6 +879,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) @@ -790,6 +895,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } @@ -801,7 +907,9 @@ type VirtualNetworkTapsClientAPI interface { 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) } @@ -813,7 +921,9 @@ type VirtualRoutersClientAPI interface { 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) @@ -824,6 +934,7 @@ type VirtualRouterPeeringsClientAPI interface { 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) @@ -834,7 +945,9 @@ type VirtualWansClientAPI interface { 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) } @@ -846,7 +959,9 @@ type VpnSitesClientAPI interface { 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) } @@ -856,6 +971,7 @@ var _ VpnSitesClientAPI = (*network.VpnSitesClient)(nil) 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) @@ -873,7 +989,9 @@ type VpnServerConfigurationsClientAPI interface { 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) } @@ -885,7 +1003,9 @@ type VirtualHubsClientAPI interface { 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) 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) } @@ -895,6 +1015,7 @@ var _ VirtualHubsClientAPI = (*network.VirtualHubsClient)(nil) type HubVirtualNetworkConnectionsClientAPI interface { 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) @@ -905,7 +1026,9 @@ type VpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGateway, err error) } @@ -918,6 +1041,7 @@ type VpnConnectionsClientAPI interface { 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) } var _ VpnConnectionsClientAPI = (*network.VpnConnectionsClient)(nil) @@ -932,6 +1056,7 @@ var _ VpnSiteLinkConnectionsClientAPI = (*network.VpnSiteLinkConnectionsClient)( // VpnLinkConnectionsClientAPI contains the set of methods on the VpnLinkConnectionsClient type. type VpnLinkConnectionsClientAPI interface { 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) } var _ VpnLinkConnectionsClientAPI = (*network.VpnLinkConnectionsClient)(nil) @@ -945,7 +1070,9 @@ type P2sVpnGatewaysClientAPI interface { 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) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2SVpnGateway, err error) } @@ -964,6 +1091,7 @@ type VirtualHubRouteTableV2sClientAPI interface { 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) @@ -974,7 +1102,9 @@ type WebApplicationFirewallPoliciesClientAPI interface { 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/2019-09-01/network/operations.go b/services/network/mgmt/2019-09-01/network/operations.go index 9ff7ba899c26..867e02175375 100644 --- a/services/network/mgmt/2019-09-01/network/operations.go +++ b/services/network/mgmt/2019-09-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/p2svpngateways.go b/services/network/mgmt/2019-09-01/network/p2svpngateways.go index e6ce519a6921..2a740e493f66 100644 --- a/services/network/mgmt/2019-09-01/network/p2svpngateways.go +++ b/services/network/mgmt/2019-09-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/packetcaptures.go b/services/network/mgmt/2019-09-01/network/packetcaptures.go index 66849468a82b..ad7678e86442 100644 --- a/services/network/mgmt/2019-09-01/network/packetcaptures.go +++ b/services/network/mgmt/2019-09-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go index 463a28627bdf..166d6d72eefc 100644 --- a/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go +++ b/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go @@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr } // NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/privateendpoints.go b/services/network/mgmt/2019-09-01/network/privateendpoints.go index 88e6404315eb..41871c839684 100644 --- a/services/network/mgmt/2019-09-01/network/privateendpoints.go +++ b/services/network/mgmt/2019-09-01/network/privateendpoints.go @@ -35,7 +35,9 @@ func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/privatelinkservices.go b/services/network/mgmt/2019-09-01/network/privatelinkservices.go index b720d3016ac4..dff7bdc8acf6 100644 --- a/services/network/mgmt/2019-09-01/network/privatelinkservices.go +++ b/services/network/mgmt/2019-09-01/network/privatelinkservices.go @@ -35,7 +35,9 @@ func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClie return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/profiles.go b/services/network/mgmt/2019-09-01/network/profiles.go index 5ced517fd52b..de2aef1235ab 100644 --- a/services/network/mgmt/2019-09-01/network/profiles.go +++ b/services/network/mgmt/2019-09-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/publicipaddresses.go b/services/network/mgmt/2019-09-01/network/publicipaddresses.go index d6def66f39c4..eb322b36dfd6 100644 --- a/services/network/mgmt/2019-09-01/network/publicipaddresses.go +++ b/services/network/mgmt/2019-09-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/publicipprefixes.go b/services/network/mgmt/2019-09-01/network/publicipprefixes.go index e9c290bda0de..e0e9a5f30e78 100644 --- a/services/network/mgmt/2019-09-01/network/publicipprefixes.go +++ b/services/network/mgmt/2019-09-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go b/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go index 465305198d67..bd3f63cf13e8 100644 --- a/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go +++ b/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go @@ -35,7 +35,9 @@ func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationL return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/routefilterrules.go b/services/network/mgmt/2019-09-01/network/routefilterrules.go index 0a72eab675a9..11670272ff13 100644 --- a/services/network/mgmt/2019-09-01/network/routefilterrules.go +++ b/services/network/mgmt/2019-09-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/routefilters.go b/services/network/mgmt/2019-09-01/network/routefilters.go index 0cf33cff6e54..4c613d9a2d4e 100644 --- a/services/network/mgmt/2019-09-01/network/routefilters.go +++ b/services/network/mgmt/2019-09-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/routes.go b/services/network/mgmt/2019-09-01/network/routes.go index f5ac2576c739..3e23fb0a922d 100644 --- a/services/network/mgmt/2019-09-01/network/routes.go +++ b/services/network/mgmt/2019-09-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/routetables.go b/services/network/mgmt/2019-09-01/network/routetables.go index a7df1c0b6f03..3567cefc37b8 100644 --- a/services/network/mgmt/2019-09-01/network/routetables.go +++ b/services/network/mgmt/2019-09-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/securitygroups.go b/services/network/mgmt/2019-09-01/network/securitygroups.go index 8ec0a4a4158a..72e6fb8b8527 100644 --- a/services/network/mgmt/2019-09-01/network/securitygroups.go +++ b/services/network/mgmt/2019-09-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/securityrules.go b/services/network/mgmt/2019-09-01/network/securityrules.go index b3ce9a155428..f5f962b1b561 100644 --- a/services/network/mgmt/2019-09-01/network/securityrules.go +++ b/services/network/mgmt/2019-09-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go b/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go index afb9d5c59d73..bf5fe3391d33 100644 --- a/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go +++ b/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go @@ -35,7 +35,9 @@ func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationL return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go b/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go index 8f3a89785c42..b18f9b20e01e 100644 --- a/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go +++ b/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go index 222d07dcd4ab..517d2cb6745e 100644 --- a/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go +++ b/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/servicetags.go b/services/network/mgmt/2019-09-01/network/servicetags.go index cbbd7d0fbde3..9b6295d7a9f6 100644 --- a/services/network/mgmt/2019-09-01/network/servicetags.go +++ b/services/network/mgmt/2019-09-01/network/servicetags.go @@ -35,7 +35,8 @@ func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/subnets.go b/services/network/mgmt/2019-09-01/network/subnets.go index 96ab7b847dbe..edcf1d7fcebe 100644 --- a/services/network/mgmt/2019-09-01/network/subnets.go +++ b/services/network/mgmt/2019-09-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/usages.go b/services/network/mgmt/2019-09-01/network/usages.go index c658a631cf95..70d240068a67 100644 --- a/services/network/mgmt/2019-09-01/network/usages.go +++ b/services/network/mgmt/2019-09-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go b/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go index a95c5cb00bfb..10f635a24002 100644 --- a/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go +++ b/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go @@ -35,7 +35,9 @@ func NewVirtualHubRouteTableV2sClient(subscriptionID string) VirtualHubRouteTabl return NewVirtualHubRouteTableV2sClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubRouteTableV2sClientWithBaseURI creates an instance of the VirtualHubRouteTableV2sClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualhubs.go b/services/network/mgmt/2019-09-01/network/virtualhubs.go index 4106182e4972..d78a492559d0 100644 --- a/services/network/mgmt/2019-09-01/network/virtualhubs.go +++ b/services/network/mgmt/2019-09-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go index 28425f557f63..511f6be47992 100644 --- a/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go b/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go index f7780bd49cfd..537dcf124cb3 100644 --- a/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go +++ b/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go index 717551401a73..0a6a281d13b7 100644 --- a/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go +++ b/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualnetworks.go b/services/network/mgmt/2019-09-01/network/virtualnetworks.go index d024e61f0082..ac12325a8500 100644 --- a/services/network/mgmt/2019-09-01/network/virtualnetworks.go +++ b/services/network/mgmt/2019-09-01/network/virtualnetworks.go @@ -36,7 +36,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go b/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go index a4374217dea1..c9a0ac69e7de 100644 --- a/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go +++ b/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go b/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go index edf837845395..31ee9e1c296d 100644 --- a/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go +++ b/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go @@ -36,7 +36,9 @@ func NewVirtualRouterPeeringsClient(subscriptionID string) VirtualRouterPeerings return NewVirtualRouterPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualRouterPeeringsClientWithBaseURI creates an instance of the VirtualRouterPeeringsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualrouters.go b/services/network/mgmt/2019-09-01/network/virtualrouters.go index ed42d5b28ace..9c7955fa9f3b 100644 --- a/services/network/mgmt/2019-09-01/network/virtualrouters.go +++ b/services/network/mgmt/2019-09-01/network/virtualrouters.go @@ -36,7 +36,8 @@ func NewVirtualRoutersClient(subscriptionID string) VirtualRoutersClient { return NewVirtualRoutersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualRoutersClientWithBaseURI creates an instance of the VirtualRoutersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/virtualwans.go b/services/network/mgmt/2019-09-01/network/virtualwans.go index 7361f96c4328..e91c9c90560f 100644 --- a/services/network/mgmt/2019-09-01/network/virtualwans.go +++ b/services/network/mgmt/2019-09-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpnconnections.go b/services/network/mgmt/2019-09-01/network/vpnconnections.go index 993de186d960..5bc2fa7a3916 100644 --- a/services/network/mgmt/2019-09-01/network/vpnconnections.go +++ b/services/network/mgmt/2019-09-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpngateways.go b/services/network/mgmt/2019-09-01/network/vpngateways.go index f08842016690..10d6618f78c7 100644 --- a/services/network/mgmt/2019-09-01/network/vpngateways.go +++ b/services/network/mgmt/2019-09-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go b/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go index 8bc32e604e95..2f64798841de 100644 --- a/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go +++ b/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go @@ -35,7 +35,9 @@ func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go b/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go index cc734dd887f5..137f72225539 100644 --- a/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go +++ b/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewVpnServerConfigurationsClient(subscriptionID string) VpnServerConfigurat return NewVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnServerConfigurationsClientWithBaseURI creates an instance of the VpnServerConfigurationsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go b/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go index 5213d528a99b..9e381288c0c4 100644 --- a/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go +++ b/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go @@ -37,7 +37,8 @@ func NewVpnServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID str } // NewVpnServerConfigurationsAssociatedWithVirtualWanClientWithBaseURI creates an instance of the -// VpnServerConfigurationsAssociatedWithVirtualWanClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go b/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go index 8db1c30b9af2..9a2a631ff73e 100644 --- a/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go +++ b/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go @@ -35,7 +35,9 @@ func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectio return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpnsitelinks.go b/services/network/mgmt/2019-09-01/network/vpnsitelinks.go index b3cc45a2ad05..7f9d039474ee 100644 --- a/services/network/mgmt/2019-09-01/network/vpnsitelinks.go +++ b/services/network/mgmt/2019-09-01/network/vpnsitelinks.go @@ -35,7 +35,8 @@ func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient { return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpnsites.go b/services/network/mgmt/2019-09-01/network/vpnsites.go index 7bba492f7ea5..5d607fc5ca2c 100644 --- a/services/network/mgmt/2019-09-01/network/vpnsites.go +++ b/services/network/mgmt/2019-09-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go index 4baf61776b10..83b76e73888c 100644 --- a/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go +++ b/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go @@ -36,7 +36,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/watchers.go b/services/network/mgmt/2019-09-01/network/watchers.go index 2965b624be69..857e8962c06a 100644 --- a/services/network/mgmt/2019-09-01/network/watchers.go +++ b/services/network/mgmt/2019-09-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// 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)} } diff --git a/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go index 9f0e270160d6..52588e47c2aa 100644 --- a/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go @@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati } // NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/network/mgmt/2019-11-01/network/applicationgateways.go b/services/network/mgmt/2019-11-01/network/applicationgateways.go new file mode 100644 index 000000000000..87cfcab850e5 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/applicationgateways.go @@ -0,0 +1,1472 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) GetResponder(resp *http.Response) (result ApplicationGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListResponder(resp *http.Response) (result ApplicationGatewayListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/applicationsecuritygroups.go b/services/network/mgmt/2019-11-01/network/applicationsecuritygroups.go new file mode 100644 index 000000000000..bd30614bed40 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/applicationsecuritygroups.go @@ -0,0 +1,580 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationSecurityGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) GetResponder(resp *http.Response) (result ApplicationSecurityGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) ListResponder(resp *http.Response) (result ApplicationSecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/availabledelegations.go b/services/network/mgmt/2019-11-01/network/availabledelegations.go new file mode 100644 index 000000000000..21005113aec3 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/availabledelegations.go @@ -0,0 +1,156 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableDelegationsClient) ListResponder(resp *http.Response) (result AvailableDelegationsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/availableendpointservices.go b/services/network/mgmt/2019-11-01/network/availableendpointservices.go new file mode 100644 index 000000000000..8c8ef0b7e14e --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/availableendpointservices.go @@ -0,0 +1,156 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableEndpointServicesClient) ListResponder(resp *http.Response) (result EndpointServicesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/availableprivateendpointtypes.go b/services/network/mgmt/2019-11-01/network/availableprivateendpointtypes.go new file mode 100644 index 000000000000..90342db31c68 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/availableprivateendpointtypes.go @@ -0,0 +1,272 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailablePrivateEndpointTypesClient) ListResponder(resp *http.Response) (result AvailablePrivateEndpointTypesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupResponder(resp *http.Response) (result AvailablePrivateEndpointTypesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/availableresourcegroupdelegations.go b/services/network/mgmt/2019-11-01/network/availableresourcegroupdelegations.go new file mode 100644 index 000000000000..d0dfead85f41 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/availableresourcegroupdelegations.go @@ -0,0 +1,159 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableResourceGroupDelegationsClient) ListResponder(resp *http.Response) (result AvailableDelegationsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/availableservicealiases.go b/services/network/mgmt/2019-11-01/network/availableservicealiases.go new file mode 100644 index 000000000000..f18afd512034 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/availableservicealiases.go @@ -0,0 +1,271 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableServiceAliasesClient) ListResponder(resp *http.Response) (result AvailableServiceAliasesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client AvailableServiceAliasesClient) ListByResourceGroupResponder(resp *http.Response) (result AvailableServiceAliasesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/azurefirewallfqdntags.go b/services/network/mgmt/2019-11-01/network/azurefirewallfqdntags.go new file mode 100644 index 000000000000..f4a6631ecd2e --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/azurefirewallfqdntags.go @@ -0,0 +1,153 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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/2019-11-01/network/azurefirewalls.go b/services/network/mgmt/2019-11-01/network/azurefirewalls.go new file mode 100644 index 000000000000..87b97f7dd8bf --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/azurefirewalls.go @@ -0,0 +1,579 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) CreateOrUpdateResponder(resp *http.Response) (result AzureFirewall, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) GetResponder(resp *http.Response) (result AzureFirewall, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) ListResponder(resp *http.Response) (result AzureFirewallListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 AzureFirewall, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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, azureFirewallName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "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.AzureFirewallsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", resp, "Failure responding to request") + } + + 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 = "2019-11-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) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/bastionhosts.go b/services/network/mgmt/2019-11-01/network/bastionhosts.go new file mode 100644 index 000000000000..1440fd642446 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/bastionhosts.go @@ -0,0 +1,499 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) CreateOrUpdateResponder(resp *http.Response) (result BastionHost, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) GetResponder(resp *http.Response) (result BastionHost, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) ListResponder(resp *http.Response) (result BastionHostListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) ListByResourceGroupResponder(resp *http.Response) (result BastionHostListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} diff --git a/services/network/mgmt/2019-11-01/network/bgpservicecommunities.go b/services/network/mgmt/2019-11-01/network/bgpservicecommunities.go new file mode 100644 index 000000000000..21bbe8023313 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/bgpservicecommunities.go @@ -0,0 +1,153 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BgpServiceCommunitiesClient) ListResponder(resp *http.Response) (result BgpServiceCommunityListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/client.go b/services/network/mgmt/2019-11-01/network/client.go new file mode 100644 index 000000000000..7a95b7264bbf --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/client.go @@ -0,0 +1,848 @@ +// Package network implements the Azure ARM Network service API version . +// +// Network Client +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +const ( + // DefaultBaseURI is the default URI used for the service 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 = autorest.SendWithSender(client, 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.Future = future.Future + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 = autorest.SendWithSender(client, 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.Future = future.Future + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/connectionmonitors.go b/services/network/mgmt/2019-11-01/network/connectionmonitors.go new file mode 100644 index 000000000000..ac4e7a2163be --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/connectionmonitors.go @@ -0,0 +1,686 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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. +func (client ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor) (result ConnectionMonitorsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.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}}}, + }}}}}); err != nil { + return result, validation.NewError("network.ConnectionMonitorsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters) + 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", result.Response(), "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) (*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 = "2019-11-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}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) CreateOrUpdateResponder(resp *http.Response) (result ConnectionMonitorResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) GetResponder(resp *http.Response) (result ConnectionMonitorResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ConnectionMonitorsClient) ListResponder(resp *http.Response) (result ConnectionMonitorListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/ddoscustompolicies.go b/services/network/mgmt/2019-11-01/network/ddoscustompolicies.go new file mode 100644 index 000000000000..024dd5309e35 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/ddoscustompolicies.go @@ -0,0 +1,357 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DdosCustomPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) GetResponder(resp *http.Response) (result DdosCustomPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/ddosprotectionplans.go b/services/network/mgmt/2019-11-01/network/ddosprotectionplans.go new file mode 100644 index 000000000000..507d986d7330 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/ddosprotectionplans.go @@ -0,0 +1,583 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) CreateOrUpdateResponder(resp *http.Response) (result DdosProtectionPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) GetResponder(resp *http.Response) (result DdosProtectionPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) ListResponder(resp *http.Response) (result DdosProtectionPlanListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) ListByResourceGroupResponder(resp *http.Response) (result DdosProtectionPlanListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/defaultsecurityrules.go b/services/network/mgmt/2019-11-01/network/defaultsecurityrules.go new file mode 100644 index 000000000000..7af0411def65 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/defaultsecurityrules.go @@ -0,0 +1,237 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DefaultSecurityRulesClient) GetResponder(resp *http.Response) (result SecurityRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DefaultSecurityRulesClient) ListResponder(resp *http.Response) (result SecurityRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/expressroutecircuitauthorizations.go b/services/network/mgmt/2019-11-01/network/expressroutecircuitauthorizations.go new file mode 100644 index 000000000000..865885f308df --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressroutecircuitauthorizations.go @@ -0,0 +1,401 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitAuthorization, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitAuthorizationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitAuthorizationsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitAuthorization, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitAuthorizationsClient) ListResponder(resp *http.Response) (result AuthorizationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/expressroutecircuitconnections.go b/services/network/mgmt/2019-11-01/network/expressroutecircuitconnections.go new file mode 100644 index 000000000000..90bd18952e31 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressroutecircuitconnections.go @@ -0,0 +1,408 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-11-01/network/expressroutecircuitpeerings.go new file mode 100644 index 000000000000..5b82ca1fc97a --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressroutecircuitpeerings.go @@ -0,0 +1,411 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitPeering, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitPeeringsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitPeering, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitPeeringListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/expressroutecircuits.go b/services/network/mgmt/2019-11-01/network/expressroutecircuits.go new file mode 100644 index 000000000000..81474b4f1e86 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressroutecircuits.go @@ -0,0 +1,981 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuit, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuit, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/expressrouteconnections.go b/services/network/mgmt/2019-11-01/network/expressrouteconnections.go new file mode 100644 index 000000000000..9f5e22d7b613 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressrouteconnections.go @@ -0,0 +1,368 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteConnectionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-11-01/network/expressroutecrossconnectionpeerings.go new file mode 100644 index 000000000000..edf85f59d904 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressroutecrossconnectionpeerings.go @@ -0,0 +1,412 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionPeeringsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeeringList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/expressroutecrossconnections.go b/services/network/mgmt/2019-11-01/network/expressroutecrossconnections.go new file mode 100644 index 000000000000..64619fb3f9d2 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressroutecrossconnections.go @@ -0,0 +1,750 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/expressroutegateways.go b/services/network/mgmt/2019-11-01/network/expressroutegateways.go new file mode 100644 index 000000000000..f19dc1250716 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressroutegateways.go @@ -0,0 +1,433 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) GetResponder(resp *http.Response) (result ExpressRouteGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteGatewayList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscription 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client ExpressRouteGatewaysClient) ListBySubscriptionResponder(resp *http.Response) (result ExpressRouteGatewayList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/expressroutelinks.go b/services/network/mgmt/2019-11-01/network/expressroutelinks.go new file mode 100644 index 000000000000..f191571a2d43 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressroutelinks.go @@ -0,0 +1,237 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRouteLinksClient) GetResponder(resp *http.Response) (result ExpressRouteLink, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteLinksClient) ListResponder(resp *http.Response) (result ExpressRouteLinkListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/expressrouteports.go b/services/network/mgmt/2019-11-01/network/expressrouteports.go new file mode 100644 index 000000000000..f2d69a926449 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressrouteports.go @@ -0,0 +1,580 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRoutePort, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) GetResponder(resp *http.Response) (result ExpressRoutePort, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) ListResponder(resp *http.Response) (result ExpressRoutePortListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRoutePortListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/expressrouteportslocations.go b/services/network/mgmt/2019-11-01/network/expressrouteportslocations.go new file mode 100644 index 000000000000..fc4ec61dbd3c --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressrouteportslocations.go @@ -0,0 +1,230 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsLocationsClient) GetResponder(resp *http.Response) (result ExpressRoutePortsLocation, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortsLocationsClient) ListResponder(resp *http.Response) (result ExpressRoutePortsLocationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/expressrouteserviceproviders.go b/services/network/mgmt/2019-11-01/network/expressrouteserviceproviders.go new file mode 100644 index 000000000000..92939925c0a8 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/expressrouteserviceproviders.go @@ -0,0 +1,153 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteServiceProvidersClient) ListResponder(resp *http.Response) (result ExpressRouteServiceProviderListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/firewallpolicies.go b/services/network/mgmt/2019-11-01/network/firewallpolicies.go new file mode 100644 index 000000000000..68d193b72985 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/firewallpolicies.go @@ -0,0 +1,504 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) GetResponder(resp *http.Response) (result FirewallPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) ListResponder(resp *http.Response) (result FirewallPolicyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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/2019-11-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-11-01/network/firewallpolicyrulegroups.go new file mode 100644 index 000000000000..e6f9bdaa57e9 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/firewallpolicyrulegroups.go @@ -0,0 +1,411 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FirewallPolicyRuleGroupsClient is the network Client +type FirewallPolicyRuleGroupsClient struct { + BaseClient +} + +// NewFirewallPolicyRuleGroupsClient creates an instance of the FirewallPolicyRuleGroupsClient client. +func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRuleGroupsClient { + return NewFirewallPolicyRuleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { + return FirewallPolicyRuleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified FirewallPolicyRuleGroup. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// ruleGroupName - the name of the FirewallPolicyRuleGroup. +// parameters - parameters supplied to the create or update FirewallPolicyRuleGroup operation. +func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string, parameters FirewallPolicyRuleGroup) (result FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil}, + {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, firewallPolicyName, ruleGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client FirewallPolicyRuleGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string, parameters FirewallPolicyRuleGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleGroupName": autorest.Encode("path", ruleGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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}/ruleGroups/{ruleGroupName}", 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 FirewallPolicyRuleGroupsClient) CreateOrUpdateSender(req *http.Request) (future FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FirewallPolicyRuleGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result FirewallPolicyRuleGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified FirewallPolicyRuleGroup. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// ruleGroupName - the name of the FirewallPolicyRuleGroup. +func (client FirewallPolicyRuleGroupsClient) Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result FirewallPolicyRuleGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, firewallPolicyName, ruleGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client FirewallPolicyRuleGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleGroupName": autorest.Encode("path", ruleGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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}/ruleGroups/{ruleGroupName}", 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 FirewallPolicyRuleGroupsClient) DeleteSender(req *http.Request) (future FirewallPolicyRuleGroupsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FirewallPolicyRuleGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified FirewallPolicyRuleGroup. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// ruleGroupName - the name of the FirewallPolicyRuleGroup. +func (client FirewallPolicyRuleGroupsClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result FirewallPolicyRuleGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.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, ruleGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "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.FirewallPolicyRuleGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client FirewallPolicyRuleGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleGroupName": autorest.Encode("path", ruleGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01" + 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}/ruleGroups/{ruleGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPolicyRuleGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FirewallPolicyRuleGroupsClient) GetResponder(resp *http.Response) (result FirewallPolicyRuleGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all FirewallPolicyRuleGroups in a FirewallPolicy resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPolicyRuleGroupsClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPolicyRuleGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.List") + defer func() { + sc := -1 + if result.fprglr.Response.Response != nil { + sc = result.fprglr.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.FirewallPolicyRuleGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.fprglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "List", resp, "Failure sending request") + return + } + + result.fprglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client FirewallPolicyRuleGroupsClient) 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 = "2019-11-01" + 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}/ruleGroups", 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 FirewallPolicyRuleGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FirewallPolicyRuleGroupsClient) ListResponder(resp *http.Response) (result FirewallPolicyRuleGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client FirewallPolicyRuleGroupsClient) listNextResults(ctx context.Context, lastResults FirewallPolicyRuleGroupListResult) (result FirewallPolicyRuleGroupListResult, err error) { + req, err := lastResults.firewallPolicyRuleGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "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.FirewallPolicyRuleGroupsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client FirewallPolicyRuleGroupsClient) ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result FirewallPolicyRuleGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupsClient.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/2019-11-01/network/flowlogs.go b/services/network/mgmt/2019-11-01/network/flowlogs.go new file mode 100644 index 000000000000..fb7d92cea84b --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/flowlogs.go @@ -0,0 +1,407 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) CreateOrUpdateResponder(resp *http.Response) (result FlowLog, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) GetResponder(resp *http.Response) (result FlowLog, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FlowLogsClient) ListResponder(resp *http.Response) (result FlowLogListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} diff --git a/services/network/mgmt/2019-11-01/network/hubvirtualnetworkconnections.go b/services/network/mgmt/2019-11-01/network/hubvirtualnetworkconnections.go new file mode 100644 index 000000000000..f3ba69939e02 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/hubvirtualnetworkconnections.go @@ -0,0 +1,237 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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)} +} + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client HubVirtualNetworkConnectionsClient) GetResponder(resp *http.Response) (result HubVirtualNetworkConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client HubVirtualNetworkConnectionsClient) ListResponder(resp *http.Response) (result ListHubVirtualNetworkConnectionsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/inboundnatrules.go b/services/network/mgmt/2019-11-01/network/inboundnatrules.go new file mode 100644 index 000000000000..52cacaab4df6 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/inboundnatrules.go @@ -0,0 +1,422 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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}}}, + }}, + }}, + }}, + }}, + }}, + }}}}}); 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) CreateOrUpdateResponder(resp *http.Response) (result InboundNatRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) GetResponder(resp *http.Response) (result InboundNatRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) ListResponder(resp *http.Response) (result InboundNatRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/interfaceipconfigurations.go b/services/network/mgmt/2019-11-01/network/interfaceipconfigurations.go new file mode 100644 index 000000000000..fe97f824d940 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/interfaceipconfigurations.go @@ -0,0 +1,237 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InterfaceIPConfigurationsClient) GetResponder(resp *http.Response) (result InterfaceIPConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfaceIPConfigurationsClient) ListResponder(resp *http.Response) (result InterfaceIPConfigurationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/interfaceloadbalancers.go b/services/network/mgmt/2019-11-01/network/interfaceloadbalancers.go new file mode 100644 index 000000000000..15a7e729a460 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/interfaceloadbalancers.go @@ -0,0 +1,158 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfaceLoadBalancersClient) ListResponder(resp *http.Response) (result InterfaceLoadBalancerListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/interfacesgroup.go b/services/network/mgmt/2019-11-01/network/interfacesgroup.go new file mode 100644 index 000000000000..c776406144c1 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/interfacesgroup.go @@ -0,0 +1,1267 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (result Interface, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client InterfacesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InterfacesClient) GetResponder(resp *http.Response) (result Interface, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfacesClient) ListResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/interfacetapconfigurations.go b/services/network/mgmt/2019-11-01/network/interfacetapconfigurations.go new file mode 100644 index 000000000000..49c43eff4b10 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/interfacetapconfigurations.go @@ -0,0 +1,435 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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.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}}}, + }}, + }}, + }}, + }}, + }}, + }}, + }}, + }}}}}); 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client InterfaceTapConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result InterfaceTapConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client InterfaceTapConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InterfaceTapConfigurationsClient) GetResponder(resp *http.Response) (result InterfaceTapConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfaceTapConfigurationsClient) ListResponder(resp *http.Response) (result InterfaceTapConfigurationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/ipgroups.go b/services/network/mgmt/2019-11-01/network/ipgroups.go new file mode 100644 index 000000000000..898d7bc6cf7f --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/ipgroups.go @@ -0,0 +1,584 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result IPGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) GetResponder(resp *http.Response) (result IPGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) ListResponder(resp *http.Response) (result IPGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result IPGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/loadbalancerbackendaddresspools.go b/services/network/mgmt/2019-11-01/network/loadbalancerbackendaddresspools.go new file mode 100644 index 000000000000..3b25ab4da8ca --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/loadbalancerbackendaddresspools.go @@ -0,0 +1,237 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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)} +} + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerBackendAddressPoolsClient) GetResponder(resp *http.Response) (result BackendAddressPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerBackendAddressPoolsClient) ListResponder(resp *http.Response) (result LoadBalancerBackendAddressPoolListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/loadbalancerfrontendipconfigurations.go b/services/network/mgmt/2019-11-01/network/loadbalancerfrontendipconfigurations.go new file mode 100644 index 000000000000..691ed2caeb2c --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/loadbalancerfrontendipconfigurations.go @@ -0,0 +1,238 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerFrontendIPConfigurationsClient) GetResponder(resp *http.Response) (result FrontendIPConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerFrontendIPConfigurationsClient) ListResponder(resp *http.Response) (result LoadBalancerFrontendIPConfigurationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/loadbalancerloadbalancingrules.go b/services/network/mgmt/2019-11-01/network/loadbalancerloadbalancingrules.go new file mode 100644 index 000000000000..4c6296fd9252 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/loadbalancerloadbalancingrules.go @@ -0,0 +1,237 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerLoadBalancingRulesClient) GetResponder(resp *http.Response) (result LoadBalancingRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerLoadBalancingRulesClient) ListResponder(resp *http.Response) (result LoadBalancerLoadBalancingRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/loadbalancernetworkinterfaces.go b/services/network/mgmt/2019-11-01/network/loadbalancernetworkinterfaces.go new file mode 100644 index 000000000000..dc41b988d968 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/loadbalancernetworkinterfaces.go @@ -0,0 +1,158 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerNetworkInterfacesClient) ListResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/loadbalanceroutboundrules.go b/services/network/mgmt/2019-11-01/network/loadbalanceroutboundrules.go new file mode 100644 index 000000000000..1c9549c63003 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/loadbalanceroutboundrules.go @@ -0,0 +1,237 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerOutboundRulesClient) GetResponder(resp *http.Response) (result OutboundRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerOutboundRulesClient) ListResponder(resp *http.Response) (result LoadBalancerOutboundRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/loadbalancerprobes.go b/services/network/mgmt/2019-11-01/network/loadbalancerprobes.go new file mode 100644 index 000000000000..357061c0723f --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/loadbalancerprobes.go @@ -0,0 +1,237 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerProbesClient) GetResponder(resp *http.Response) (result Probe, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerProbesClient) ListResponder(resp *http.Response) (result LoadBalancerProbeListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/loadbalancers.go b/services/network/mgmt/2019-11-01/network/loadbalancers.go new file mode 100644 index 000000000000..5680e48495df --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/loadbalancers.go @@ -0,0 +1,583 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) CreateOrUpdateResponder(resp *http.Response) (result LoadBalancer, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) GetResponder(resp *http.Response) (result LoadBalancer, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) ListResponder(resp *http.Response) (result LoadBalancerListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/localnetworkgateways.go b/services/network/mgmt/2019-11-01/network/localnetworkgateways.go new file mode 100644 index 000000000000..dce67d0c50d2 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/localnetworkgateways.go @@ -0,0 +1,497 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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: 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result LocalNetworkGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) GetResponder(resp *http.Response) (result LocalNetworkGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LocalNetworkGatewaysClient) ListResponder(resp *http.Response) (result LocalNetworkGatewayListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/models.go b/services/network/mgmt/2019-11-01/network/models.go new file mode 100644 index 000000000000..773168eb13b6 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/models.go @@ -0,0 +1,36207 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-11-01/network" + +// Access enumerates the values for access. +type Access string + +const ( + // Allow ... + Allow Access = "Allow" + // Deny ... + Deny Access = "Deny" +) + +// PossibleAccessValues returns an array of possible values for the Access const type. +func PossibleAccessValues() []Access { + return []Access{Allow, Deny} +} + +// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health +// server health. +type ApplicationGatewayBackendHealthServerHealth string + +const ( + // Down ... + Down ApplicationGatewayBackendHealthServerHealth = "Down" + // Draining ... + Draining ApplicationGatewayBackendHealthServerHealth = "Draining" + // Partial ... + Partial ApplicationGatewayBackendHealthServerHealth = "Partial" + // Unknown ... + Unknown ApplicationGatewayBackendHealthServerHealth = "Unknown" + // Up ... + Up ApplicationGatewayBackendHealthServerHealth = "Up" +) + +// PossibleApplicationGatewayBackendHealthServerHealthValues returns an array of possible values for the ApplicationGatewayBackendHealthServerHealth const type. +func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth { + return []ApplicationGatewayBackendHealthServerHealth{Down, Draining, Partial, Unknown, Up} +} + +// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity. +type ApplicationGatewayCookieBasedAffinity string + +const ( + // Disabled ... + Disabled ApplicationGatewayCookieBasedAffinity = "Disabled" + // Enabled ... + Enabled ApplicationGatewayCookieBasedAffinity = "Enabled" +) + +// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type. +func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity { + return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled} +} + +// ApplicationGatewayCustomErrorStatusCode enumerates the values for application gateway custom error status +// code. +type ApplicationGatewayCustomErrorStatusCode string + +const ( + // HTTPStatus403 ... + HTTPStatus403 ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" + // HTTPStatus502 ... + HTTPStatus502 ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" +) + +// PossibleApplicationGatewayCustomErrorStatusCodeValues returns an array of possible values for the ApplicationGatewayCustomErrorStatusCode const type. +func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewayCustomErrorStatusCode { + return []ApplicationGatewayCustomErrorStatusCode{HTTPStatus403, HTTPStatus502} +} + +// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode. +type ApplicationGatewayFirewallMode string + +const ( + // Detection ... + Detection ApplicationGatewayFirewallMode = "Detection" + // Prevention ... + Prevention ApplicationGatewayFirewallMode = "Prevention" +) + +// PossibleApplicationGatewayFirewallModeValues returns an array of possible values for the ApplicationGatewayFirewallMode const type. +func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { + return []ApplicationGatewayFirewallMode{Detection, Prevention} +} + +// ApplicationGatewayOperationalState enumerates the values for application gateway operational state. +type ApplicationGatewayOperationalState string + +const ( + // Running ... + Running ApplicationGatewayOperationalState = "Running" + // Starting ... + Starting ApplicationGatewayOperationalState = "Starting" + // Stopped ... + Stopped ApplicationGatewayOperationalState = "Stopped" + // Stopping ... + Stopping ApplicationGatewayOperationalState = "Stopping" +) + +// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type. +func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { + return []ApplicationGatewayOperationalState{Running, Starting, Stopped, Stopping} +} + +// ApplicationGatewayProtocol enumerates the values for application gateway protocol. +type ApplicationGatewayProtocol string + +const ( + // HTTP ... + HTTP ApplicationGatewayProtocol = "Http" + // HTTPS ... + HTTPS ApplicationGatewayProtocol = "Https" +) + +// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type. +func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { + return []ApplicationGatewayProtocol{HTTP, HTTPS} +} + +// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type. +type ApplicationGatewayRedirectType string + +const ( + // Found ... + Found ApplicationGatewayRedirectType = "Found" + // Permanent ... + Permanent ApplicationGatewayRedirectType = "Permanent" + // SeeOther ... + SeeOther ApplicationGatewayRedirectType = "SeeOther" + // Temporary ... + Temporary ApplicationGatewayRedirectType = "Temporary" +) + +// PossibleApplicationGatewayRedirectTypeValues returns an array of possible values for the ApplicationGatewayRedirectType const type. +func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType { + return []ApplicationGatewayRedirectType{Found, Permanent, SeeOther, Temporary} +} + +// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule +// type. +type ApplicationGatewayRequestRoutingRuleType string + +const ( + // Basic ... + Basic ApplicationGatewayRequestRoutingRuleType = "Basic" + // PathBasedRouting ... + PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" +) + +// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type. +func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType { + return []ApplicationGatewayRequestRoutingRuleType{Basic, PathBasedRouting} +} + +// ApplicationGatewaySkuName enumerates the values for application gateway sku name. +type ApplicationGatewaySkuName string + +const ( + // StandardLarge ... + StandardLarge ApplicationGatewaySkuName = "Standard_Large" + // StandardMedium ... + StandardMedium ApplicationGatewaySkuName = "Standard_Medium" + // StandardSmall ... + StandardSmall ApplicationGatewaySkuName = "Standard_Small" + // StandardV2 ... + StandardV2 ApplicationGatewaySkuName = "Standard_v2" + // WAFLarge ... + WAFLarge ApplicationGatewaySkuName = "WAF_Large" + // WAFMedium ... + WAFMedium ApplicationGatewaySkuName = "WAF_Medium" + // WAFV2 ... + WAFV2 ApplicationGatewaySkuName = "WAF_v2" +) + +// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type. +func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName { + return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, StandardV2, WAFLarge, WAFMedium, WAFV2} +} + +// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite. +type ApplicationGatewaySslCipherSuite string + +const ( + // TLSDHEDSSWITH3DESEDECBCSHA ... + TLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" + // TLSDHEDSSWITHAES128CBCSHA ... + TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" + // TLSDHEDSSWITHAES128CBCSHA256 ... + TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" + // TLSDHEDSSWITHAES256CBCSHA ... + TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" + // TLSDHEDSSWITHAES256CBCSHA256 ... + TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" + // TLSDHERSAWITHAES128CBCSHA ... + TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" + // TLSDHERSAWITHAES128GCMSHA256 ... + TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" + // TLSDHERSAWITHAES256CBCSHA ... + TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" + // TLSDHERSAWITHAES256GCMSHA384 ... + TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" + // TLSECDHEECDSAWITHAES128CBCSHA ... + TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" + // TLSECDHEECDSAWITHAES128CBCSHA256 ... + TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + // TLSECDHEECDSAWITHAES128GCMSHA256 ... + TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + // TLSECDHEECDSAWITHAES256CBCSHA ... + TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" + // TLSECDHEECDSAWITHAES256CBCSHA384 ... + TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + // TLSECDHEECDSAWITHAES256GCMSHA384 ... + TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + // TLSECDHERSAWITHAES128CBCSHA ... + TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + // TLSECDHERSAWITHAES128CBCSHA256 ... + TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + // TLSECDHERSAWITHAES128GCMSHA256 ... + TLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + // TLSECDHERSAWITHAES256CBCSHA ... + TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + // TLSECDHERSAWITHAES256CBCSHA384 ... + TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + // TLSECDHERSAWITHAES256GCMSHA384 ... + TLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + // TLSRSAWITH3DESEDECBCSHA ... + TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" + // TLSRSAWITHAES128CBCSHA ... + TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" + // TLSRSAWITHAES128CBCSHA256 ... + TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" + // TLSRSAWITHAES128GCMSHA256 ... + TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" + // TLSRSAWITHAES256CBCSHA ... + TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" + // TLSRSAWITHAES256CBCSHA256 ... + TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" + // TLSRSAWITHAES256GCMSHA384 ... + TLSRSAWITHAES256GCMSHA384 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{TLSDHEDSSWITH3DESEDECBCSHA, TLSDHEDSSWITHAES128CBCSHA, TLSDHEDSSWITHAES128CBCSHA256, TLSDHEDSSWITHAES256CBCSHA, TLSDHEDSSWITHAES256CBCSHA256, TLSDHERSAWITHAES128CBCSHA, TLSDHERSAWITHAES128GCMSHA256, TLSDHERSAWITHAES256CBCSHA, TLSDHERSAWITHAES256GCMSHA384, TLSECDHEECDSAWITHAES128CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA256, TLSECDHEECDSAWITHAES128GCMSHA256, TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES256CBCSHA384, TLSECDHEECDSAWITHAES256GCMSHA384, TLSECDHERSAWITHAES128CBCSHA, TLSECDHERSAWITHAES128CBCSHA256, TLSECDHERSAWITHAES128GCMSHA256, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES256CBCSHA384, TLSECDHERSAWITHAES256GCMSHA384, TLSRSAWITH3DESEDECBCSHA, TLSRSAWITHAES128CBCSHA, TLSRSAWITHAES128CBCSHA256, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES256GCMSHA384} +} + +// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name. +type ApplicationGatewaySslPolicyName string + +const ( + // AppGwSslPolicy20150501 ... + AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" + // AppGwSslPolicy20170401 ... + AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" + // AppGwSslPolicy20170401S ... + AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" +) + +// PossibleApplicationGatewaySslPolicyNameValues returns an array of possible values for the ApplicationGatewaySslPolicyName const type. +func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName { + return []ApplicationGatewaySslPolicyName{AppGwSslPolicy20150501, AppGwSslPolicy20170401, AppGwSslPolicy20170401S} +} + +// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type. +type ApplicationGatewaySslPolicyType string + +const ( + // Custom ... + Custom ApplicationGatewaySslPolicyType = "Custom" + // Predefined ... + Predefined ApplicationGatewaySslPolicyType = "Predefined" +) + +// PossibleApplicationGatewaySslPolicyTypeValues returns an array of possible values for the ApplicationGatewaySslPolicyType const type. +func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType { + return []ApplicationGatewaySslPolicyType{Custom, Predefined} +} + +// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol. +type ApplicationGatewaySslProtocol string + +const ( + // TLSv10 ... + TLSv10 ApplicationGatewaySslProtocol = "TLSv1_0" + // TLSv11 ... + TLSv11 ApplicationGatewaySslProtocol = "TLSv1_1" + // TLSv12 ... + TLSv12 ApplicationGatewaySslProtocol = "TLSv1_2" +) + +// PossibleApplicationGatewaySslProtocolValues returns an array of possible values for the ApplicationGatewaySslProtocol const type. +func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol { + return []ApplicationGatewaySslProtocol{TLSv10, TLSv11, TLSv12} +} + +// 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 ( + // Associated ... + Associated AssociationType = "Associated" + // Contains ... + Contains AssociationType = "Contains" +) + +// PossibleAssociationTypeValues returns an array of possible values for the AssociationType const type. +func PossibleAssociationTypeValues() []AssociationType { + return []AssociationType{Associated, Contains} +} + +// AuthenticationMethod enumerates the values for authentication method. +type AuthenticationMethod string + +const ( + // EAPMSCHAPv2 ... + EAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" + // EAPTLS ... + EAPTLS AuthenticationMethod = "EAPTLS" +) + +// PossibleAuthenticationMethodValues returns an array of possible values for the AuthenticationMethod const type. +func PossibleAuthenticationMethodValues() []AuthenticationMethod { + return []AuthenticationMethod{EAPMSCHAPv2, EAPTLS} +} + +// AuthorizationUseStatus enumerates the values for authorization use status. +type AuthorizationUseStatus string + +const ( + // Available ... + Available AuthorizationUseStatus = "Available" + // InUse ... + InUse AuthorizationUseStatus = "InUse" +) + +// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type. +func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { + return []AuthorizationUseStatus{Available, InUse} +} + +// 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 ( + // Dnat ... + Dnat AzureFirewallNatRCActionType = "Dnat" + // Snat ... + Snat AzureFirewallNatRCActionType = "Snat" +) + +// PossibleAzureFirewallNatRCActionTypeValues returns an array of possible values for the AzureFirewallNatRCActionType const type. +func PossibleAzureFirewallNatRCActionTypeValues() []AzureFirewallNatRCActionType { + return []AzureFirewallNatRCActionType{Dnat, Snat} +} + +// AzureFirewallNetworkRuleProtocol enumerates the values for azure firewall network rule protocol. +type AzureFirewallNetworkRuleProtocol string + +const ( + // Any ... + Any AzureFirewallNetworkRuleProtocol = "Any" + // ICMP ... + ICMP AzureFirewallNetworkRuleProtocol = "ICMP" + // TCP ... + TCP AzureFirewallNetworkRuleProtocol = "TCP" + // UDP ... + UDP AzureFirewallNetworkRuleProtocol = "UDP" +) + +// PossibleAzureFirewallNetworkRuleProtocolValues returns an array of possible values for the AzureFirewallNetworkRuleProtocol const type. +func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol { + return []AzureFirewallNetworkRuleProtocol{Any, ICMP, TCP, UDP} +} + +// 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 ( + // AZFWHub ... + AZFWHub AzureFirewallSkuName = "AZFW_Hub" + // AZFWVNet ... + AZFWVNet AzureFirewallSkuName = "AZFW_VNet" +) + +// PossibleAzureFirewallSkuNameValues returns an array of possible values for the AzureFirewallSkuName const type. +func PossibleAzureFirewallSkuNameValues() []AzureFirewallSkuName { + return []AzureFirewallSkuName{AZFWHub, AZFWVNet} +} + +// AzureFirewallSkuTier enumerates the values for azure firewall sku tier. +type AzureFirewallSkuTier string + +const ( + // Standard ... + Standard AzureFirewallSkuTier = "Standard" +) + +// PossibleAzureFirewallSkuTierValues returns an array of possible values for the AzureFirewallSkuTier const type. +func PossibleAzureFirewallSkuTierValues() []AzureFirewallSkuTier { + return []AzureFirewallSkuTier{Standard} +} + +// 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 ( + // RDP ... + RDP BastionConnectProtocol = "RDP" + // SSH ... + SSH BastionConnectProtocol = "SSH" +) + +// PossibleBastionConnectProtocolValues returns an array of possible values for the BastionConnectProtocol const type. +func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { + return []BastionConnectProtocol{RDP, SSH} +} + +// 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 ( + // Connected ... + Connected CircuitConnectionStatus = "Connected" + // Connecting ... + Connecting CircuitConnectionStatus = "Connecting" + // Disconnected ... + Disconnected CircuitConnectionStatus = "Disconnected" +) + +// PossibleCircuitConnectionStatusValues returns an array of possible values for the CircuitConnectionStatus const type. +func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { + return []CircuitConnectionStatus{Connected, Connecting, Disconnected} +} + +// ConnectionMonitorEndpointFilterItemType enumerates the values for connection monitor endpoint filter item +// type. +type ConnectionMonitorEndpointFilterItemType string + +const ( + // AgentAddress ... + AgentAddress ConnectionMonitorEndpointFilterItemType = "AgentAddress" +) + +// PossibleConnectionMonitorEndpointFilterItemTypeValues returns an array of possible values for the ConnectionMonitorEndpointFilterItemType const type. +func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitorEndpointFilterItemType { + return []ConnectionMonitorEndpointFilterItemType{AgentAddress} +} + +// ConnectionMonitorEndpointFilterType enumerates the values for connection monitor endpoint filter type. +type ConnectionMonitorEndpointFilterType string + +const ( + // Include ... + Include ConnectionMonitorEndpointFilterType = "Include" +) + +// PossibleConnectionMonitorEndpointFilterTypeValues returns an array of possible values for the ConnectionMonitorEndpointFilterType const type. +func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndpointFilterType { + return []ConnectionMonitorEndpointFilterType{Include} +} + +// 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 ( + // MultiEndpoint ... + MultiEndpoint ConnectionMonitorType = "MultiEndpoint" + // SingleSourceDestination ... + SingleSourceDestination ConnectionMonitorType = "SingleSourceDestination" +) + +// PossibleConnectionMonitorTypeValues returns an array of possible values for the ConnectionMonitorType const type. +func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { + return []ConnectionMonitorType{MultiEndpoint, SingleSourceDestination} +} + +// 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} +} + +// 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 ( + // Default ... + Default DdosCustomPolicyTriggerSensitivityOverride = "Default" + // High ... + High DdosCustomPolicyTriggerSensitivityOverride = "High" + // Low ... + Low DdosCustomPolicyTriggerSensitivityOverride = "Low" + // Relaxed ... + Relaxed DdosCustomPolicyTriggerSensitivityOverride = "Relaxed" +) + +// PossibleDdosCustomPolicyTriggerSensitivityOverrideValues returns an array of possible values for the DdosCustomPolicyTriggerSensitivityOverride const type. +func PossibleDdosCustomPolicyTriggerSensitivityOverrideValues() []DdosCustomPolicyTriggerSensitivityOverride { + return []DdosCustomPolicyTriggerSensitivityOverride{Default, High, Low, Relaxed} +} + +// 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} +} + +// DhGroup enumerates the values for dh group. +type DhGroup string + +const ( + // DHGroup1 ... + DHGroup1 DhGroup = "DHGroup1" + // DHGroup14 ... + DHGroup14 DhGroup = "DHGroup14" + // DHGroup2 ... + DHGroup2 DhGroup = "DHGroup2" + // DHGroup2048 ... + DHGroup2048 DhGroup = "DHGroup2048" + // DHGroup24 ... + DHGroup24 DhGroup = "DHGroup24" + // ECP256 ... + ECP256 DhGroup = "ECP256" + // ECP384 ... + ECP384 DhGroup = "ECP384" + // None ... + None DhGroup = "None" +) + +// PossibleDhGroupValues returns an array of possible values for the DhGroup const type. +func PossibleDhGroupValues() []DhGroup { + return []DhGroup{DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384, None} +} + +// Direction enumerates the values for direction. +type Direction string + +const ( + // Inbound ... + Inbound Direction = "Inbound" + // Outbound ... + Outbound Direction = "Outbound" +) + +// PossibleDirectionValues returns an array of possible values for the Direction const type. +func PossibleDirectionValues() []Direction { + return []Direction{Inbound, Outbound} +} + +// 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 ( + // Active ... + Active EffectiveRouteState = "Active" + // Invalid ... + Invalid EffectiveRouteState = "Invalid" +) + +// PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type. +func PossibleEffectiveRouteStateValues() []EffectiveRouteState { + return []EffectiveRouteState{Active, Invalid} +} + +// 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} +} + +// EvaluationState enumerates the values for evaluation state. +type EvaluationState string + +const ( + // Completed ... + Completed EvaluationState = "Completed" + // InProgress ... + InProgress EvaluationState = "InProgress" + // NotStarted ... + NotStarted EvaluationState = "NotStarted" +) + +// PossibleEvaluationStateValues returns an array of possible values for the EvaluationState const type. +func PossibleEvaluationStateValues() []EvaluationState { + return []EvaluationState{Completed, InProgress, NotStarted} +} + +// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit +// peering advertised public prefix state. +type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string + +const ( + // Configured ... + Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" + // Configuring ... + Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" + // NotConfigured ... + NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" + // ValidationNeeded ... + ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" +) + +// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type. +func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { + return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{Configured, Configuring, NotConfigured, ValidationNeeded} +} + +// 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 ( + // MeteredData ... + MeteredData ExpressRouteCircuitSkuFamily = "MeteredData" + // UnlimitedData ... + UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" +) + +// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type. +func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily { + return []ExpressRouteCircuitSkuFamily{MeteredData, UnlimitedData} +} + +// 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 ( + // LC ... + LC ExpressRouteLinkConnectorType = "LC" + // SC ... + SC ExpressRouteLinkConnectorType = "SC" +) + +// PossibleExpressRouteLinkConnectorTypeValues returns an array of possible values for the ExpressRouteLinkConnectorType const type. +func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorType { + return []ExpressRouteLinkConnectorType{LC, SC} +} + +// ExpressRouteLinkMacSecCipher enumerates the values for express route link mac sec cipher. +type ExpressRouteLinkMacSecCipher string + +const ( + // GcmAes128 ... + GcmAes128 ExpressRouteLinkMacSecCipher = "gcm-aes-128" + // GcmAes256 ... + GcmAes256 ExpressRouteLinkMacSecCipher = "gcm-aes-256" +) + +// PossibleExpressRouteLinkMacSecCipherValues returns an array of possible values for the ExpressRouteLinkMacSecCipher const type. +func PossibleExpressRouteLinkMacSecCipherValues() []ExpressRouteLinkMacSecCipher { + return []ExpressRouteLinkMacSecCipher{GcmAes128, GcmAes256} +} + +// 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 ( + // AzurePrivatePeering ... + AzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" + // AzurePublicPeering ... + AzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" + // MicrosoftPeering ... + MicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" +) + +// PossibleExpressRoutePeeringTypeValues returns an array of possible values for the ExpressRoutePeeringType const type. +func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { + return []ExpressRoutePeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering} +} + +// ExpressRoutePortsEncapsulation enumerates the values for express route ports encapsulation. +type ExpressRoutePortsEncapsulation string + +const ( + // Dot1Q ... + Dot1Q ExpressRoutePortsEncapsulation = "Dot1Q" + // QinQ ... + QinQ ExpressRoutePortsEncapsulation = "QinQ" +) + +// PossibleExpressRoutePortsEncapsulationValues returns an array of possible values for the ExpressRoutePortsEncapsulation const type. +func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsulation { + return []ExpressRoutePortsEncapsulation{Dot1Q, QinQ} +} + +// FirewallPolicyFilterRuleActionType enumerates the values for firewall policy filter rule action type. +type FirewallPolicyFilterRuleActionType string + +const ( + // FirewallPolicyFilterRuleActionTypeAllow ... + FirewallPolicyFilterRuleActionTypeAllow FirewallPolicyFilterRuleActionType = "Allow" + // FirewallPolicyFilterRuleActionTypeDeny ... + FirewallPolicyFilterRuleActionTypeDeny FirewallPolicyFilterRuleActionType = "Deny" +) + +// PossibleFirewallPolicyFilterRuleActionTypeValues returns an array of possible values for the FirewallPolicyFilterRuleActionType const type. +func PossibleFirewallPolicyFilterRuleActionTypeValues() []FirewallPolicyFilterRuleActionType { + return []FirewallPolicyFilterRuleActionType{FirewallPolicyFilterRuleActionTypeAllow, FirewallPolicyFilterRuleActionTypeDeny} +} + +// FirewallPolicyNatRuleActionType enumerates the values for firewall policy nat rule action type. +type FirewallPolicyNatRuleActionType string + +const ( + // DNAT ... + DNAT FirewallPolicyNatRuleActionType = "DNAT" +) + +// PossibleFirewallPolicyNatRuleActionTypeValues returns an array of possible values for the FirewallPolicyNatRuleActionType const type. +func PossibleFirewallPolicyNatRuleActionTypeValues() []FirewallPolicyNatRuleActionType { + return []FirewallPolicyNatRuleActionType{DNAT} +} + +// FirewallPolicyRuleConditionApplicationProtocolType enumerates the values for firewall policy rule condition +// application protocol type. +type FirewallPolicyRuleConditionApplicationProtocolType string + +const ( + // FirewallPolicyRuleConditionApplicationProtocolTypeHTTP ... + FirewallPolicyRuleConditionApplicationProtocolTypeHTTP FirewallPolicyRuleConditionApplicationProtocolType = "Http" + // FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS ... + FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS FirewallPolicyRuleConditionApplicationProtocolType = "Https" +) + +// PossibleFirewallPolicyRuleConditionApplicationProtocolTypeValues returns an array of possible values for the FirewallPolicyRuleConditionApplicationProtocolType const type. +func PossibleFirewallPolicyRuleConditionApplicationProtocolTypeValues() []FirewallPolicyRuleConditionApplicationProtocolType { + return []FirewallPolicyRuleConditionApplicationProtocolType{FirewallPolicyRuleConditionApplicationProtocolTypeHTTP, FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS} +} + +// FirewallPolicyRuleConditionNetworkProtocol enumerates the values for firewall policy rule condition network +// protocol. +type FirewallPolicyRuleConditionNetworkProtocol string + +const ( + // FirewallPolicyRuleConditionNetworkProtocolAny ... + FirewallPolicyRuleConditionNetworkProtocolAny FirewallPolicyRuleConditionNetworkProtocol = "Any" + // FirewallPolicyRuleConditionNetworkProtocolICMP ... + FirewallPolicyRuleConditionNetworkProtocolICMP FirewallPolicyRuleConditionNetworkProtocol = "ICMP" + // FirewallPolicyRuleConditionNetworkProtocolTCP ... + FirewallPolicyRuleConditionNetworkProtocolTCP FirewallPolicyRuleConditionNetworkProtocol = "TCP" + // FirewallPolicyRuleConditionNetworkProtocolUDP ... + FirewallPolicyRuleConditionNetworkProtocolUDP FirewallPolicyRuleConditionNetworkProtocol = "UDP" +) + +// PossibleFirewallPolicyRuleConditionNetworkProtocolValues returns an array of possible values for the FirewallPolicyRuleConditionNetworkProtocol const type. +func PossibleFirewallPolicyRuleConditionNetworkProtocolValues() []FirewallPolicyRuleConditionNetworkProtocol { + return []FirewallPolicyRuleConditionNetworkProtocol{FirewallPolicyRuleConditionNetworkProtocolAny, FirewallPolicyRuleConditionNetworkProtocolICMP, FirewallPolicyRuleConditionNetworkProtocolTCP, FirewallPolicyRuleConditionNetworkProtocolUDP} +} + +// FlowLogFormatType enumerates the values for flow log format type. +type FlowLogFormatType string + +const ( + // JSON ... + JSON FlowLogFormatType = "JSON" +) + +// PossibleFlowLogFormatTypeValues returns an array of possible values for the FlowLogFormatType const type. +func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { + return []FlowLogFormatType{JSON} +} + +// HTTPConfigurationMethod enumerates the values for http configuration method. +type HTTPConfigurationMethod string + +const ( + // Get ... + Get HTTPConfigurationMethod = "Get" + // Post ... + Post HTTPConfigurationMethod = "Post" +) + +// PossibleHTTPConfigurationMethodValues returns an array of possible values for the HTTPConfigurationMethod const type. +func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { + return []HTTPConfigurationMethod{Get, Post} +} + +// 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} +} + +// 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 ( + // AES128 ... + AES128 IkeEncryption = "AES128" + // AES192 ... + AES192 IkeEncryption = "AES192" + // AES256 ... + AES256 IkeEncryption = "AES256" + // DES ... + DES IkeEncryption = "DES" + // DES3 ... + DES3 IkeEncryption = "DES3" + // GCMAES128 ... + GCMAES128 IkeEncryption = "GCMAES128" + // GCMAES256 ... + GCMAES256 IkeEncryption = "GCMAES256" +) + +// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type. +func PossibleIkeEncryptionValues() []IkeEncryption { + return []IkeEncryption{AES128, AES192, AES256, DES, DES3, GCMAES128, GCMAES256} +} + +// 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} +} + +// IPAllocationMethod enumerates the values for ip allocation method. +type IPAllocationMethod string + +const ( + // Dynamic ... + Dynamic IPAllocationMethod = "Dynamic" + // Static ... + Static IPAllocationMethod = "Static" +) + +// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type. +func PossibleIPAllocationMethodValues() []IPAllocationMethod { + return []IPAllocationMethod{Dynamic, Static} +} + +// 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 ( + // IPv4 ... + IPv4 IPVersion = "IPv4" + // IPv6 ... + IPv6 IPVersion = "IPv6" +) + +// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. +func PossibleIPVersionValues() []IPVersion { + return []IPVersion{IPv4, IPv6} +} + +// 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" + // LoadBalancerSkuNameStandard ... + LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" +) + +// PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type. +func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName { + return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameStandard} +} + +// 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 ( + // Workspace ... + Workspace OutputType = "Workspace" +) + +// PossibleOutputTypeValues returns an array of possible values for the OutputType const type. +func PossibleOutputTypeValues() []OutputType { + return []OutputType{Workspace} +} + +// OwaspCrsExclusionEntryMatchVariable enumerates the values for owasp crs exclusion entry match variable. +type OwaspCrsExclusionEntryMatchVariable string + +const ( + // RequestArgNames ... + RequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" + // RequestCookieNames ... + RequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" + // RequestHeaderNames ... + RequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" +) + +// PossibleOwaspCrsExclusionEntryMatchVariableValues returns an array of possible values for the OwaspCrsExclusionEntryMatchVariable const type. +func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { + return []OwaspCrsExclusionEntryMatchVariable{RequestArgNames, RequestCookieNames, RequestHeaderNames} +} + +// 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 ( + // AgentStopped ... + AgentStopped PcError = "AgentStopped" + // CaptureFailed ... + CaptureFailed PcError = "CaptureFailed" + // InternalError ... + InternalError PcError = "InternalError" + // LocalFileFailed ... + LocalFileFailed PcError = "LocalFileFailed" + // StorageFailed ... + StorageFailed PcError = "StorageFailed" +) + +// PossiblePcErrorValues returns an array of possible values for the PcError const type. +func PossiblePcErrorValues() []PcError { + return []PcError{AgentStopped, CaptureFailed, InternalError, LocalFileFailed, StorageFailed} +} + +// 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} +} + +// 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 ( + // Amd64 ... + Amd64 ProcessorArchitecture = "Amd64" + // X86 ... + X86 ProcessorArchitecture = "X86" +) + +// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type. +func PossibleProcessorArchitectureValues() []ProcessorArchitecture { + return []ProcessorArchitecture{Amd64, X86} +} + +// 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} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // Deleting ... + Deleting ProvisioningState = "Deleting" + // Failed ... + Failed ProvisioningState = "Failed" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" + // Updating ... + Updating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{Deleting, Failed, Succeeded, Updating} +} + +// 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} +} + +// 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} +} + +// 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} +} + +// RuleConditionType enumerates the values for rule condition type. +type RuleConditionType string + +const ( + // RuleConditionTypeApplicationRuleCondition ... + RuleConditionTypeApplicationRuleCondition RuleConditionType = "ApplicationRuleCondition" + // RuleConditionTypeFirewallPolicyRuleCondition ... + RuleConditionTypeFirewallPolicyRuleCondition RuleConditionType = "FirewallPolicyRuleCondition" + // RuleConditionTypeNetworkRuleCondition ... + RuleConditionTypeNetworkRuleCondition RuleConditionType = "NetworkRuleCondition" +) + +// PossibleRuleConditionTypeValues returns an array of possible values for the RuleConditionType const type. +func PossibleRuleConditionTypeValues() []RuleConditionType { + return []RuleConditionType{RuleConditionTypeApplicationRuleCondition, RuleConditionTypeFirewallPolicyRuleCondition, RuleConditionTypeNetworkRuleCondition} +} + +// RuleType enumerates the values for rule type. +type RuleType string + +const ( + // RuleTypeFirewallPolicyFilterRule ... + RuleTypeFirewallPolicyFilterRule RuleType = "FirewallPolicyFilterRule" + // RuleTypeFirewallPolicyNatRule ... + RuleTypeFirewallPolicyNatRule RuleType = "FirewallPolicyNatRule" + // RuleTypeFirewallPolicyRule ... + RuleTypeFirewallPolicyRule RuleType = "FirewallPolicyRule" +) + +// PossibleRuleTypeValues returns an array of possible values for the RuleType const type. +func PossibleRuleTypeValues() []RuleType { + return []RuleType{RuleTypeFirewallPolicyFilterRule, RuleTypeFirewallPolicyNatRule, RuleTypeFirewallPolicyRule} +} + +// 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 ( + // Deprovisioning ... + Deprovisioning ServiceProviderProvisioningState = "Deprovisioning" + // NotProvisioned ... + NotProvisioned ServiceProviderProvisioningState = "NotProvisioned" + // Provisioned ... + Provisioned ServiceProviderProvisioningState = "Provisioned" + // Provisioning ... + Provisioning ServiceProviderProvisioningState = "Provisioning" +) + +// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type. +func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState { + return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning} +} + +// 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} +} + +// 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 ( + // Full ... + Full VerbosityLevel = "Full" + // Minimum ... + Minimum VerbosityLevel = "Minimum" + // Normal ... + Normal VerbosityLevel = "Normal" +) + +// PossibleVerbosityLevelValues returns an array of possible values for the VerbosityLevel const type. +func PossibleVerbosityLevelValues() []VerbosityLevel { + return []VerbosityLevel{Full, Minimum, Normal} +} + +// VirtualNetworkGatewayConnectionProtocol enumerates the values for virtual network gateway connection +// protocol. +type VirtualNetworkGatewayConnectionProtocol string + +const ( + // IKEv1 ... + IKEv1 VirtualNetworkGatewayConnectionProtocol = "IKEv1" + // IKEv2 ... + IKEv2 VirtualNetworkGatewayConnectionProtocol = "IKEv2" +) + +// PossibleVirtualNetworkGatewayConnectionProtocolValues returns an array of possible values for the VirtualNetworkGatewayConnectionProtocol const type. +func PossibleVirtualNetworkGatewayConnectionProtocolValues() []VirtualNetworkGatewayConnectionProtocol { + return []VirtualNetworkGatewayConnectionProtocol{IKEv1, IKEv2} +} + +// 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 ( + // ExpressRoute ... + ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" + // IPsec ... + IPsec VirtualNetworkGatewayConnectionType = "IPsec" + // Vnet2Vnet ... + Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" + // VPNClient ... + VPNClient VirtualNetworkGatewayConnectionType = "VPNClient" +) + +// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type. +func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType { + return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient} +} + +// 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" + // VirtualNetworkGatewayTypeVpn ... + VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" +) + +// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type. +func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { + return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn} +} + +// 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} +} + +// VirtualWanSecurityProviderType enumerates the values for virtual wan security provider type. +type VirtualWanSecurityProviderType string + +const ( + // External ... + External VirtualWanSecurityProviderType = "External" + // Native ... + Native VirtualWanSecurityProviderType = "Native" +) + +// PossibleVirtualWanSecurityProviderTypeValues returns an array of possible values for the VirtualWanSecurityProviderType const type. +func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProviderType { + return []VirtualWanSecurityProviderType{External, Native} +} + +// VpnAuthenticationType enumerates the values for vpn authentication type. +type VpnAuthenticationType string + +const ( + // AAD ... + AAD VpnAuthenticationType = "AAD" + // Certificate ... + Certificate VpnAuthenticationType = "Certificate" + // Radius ... + Radius VpnAuthenticationType = "Radius" +) + +// PossibleVpnAuthenticationTypeValues returns an array of possible values for the VpnAuthenticationType const type. +func PossibleVpnAuthenticationTypeValues() []VpnAuthenticationType { + return []VpnAuthenticationType{AAD, Certificate, Radius} +} + +// VpnClientProtocol enumerates the values for vpn client protocol. +type VpnClientProtocol string + +const ( + // IkeV2 ... + IkeV2 VpnClientProtocol = "IkeV2" + // OpenVPN ... + OpenVPN VpnClientProtocol = "OpenVPN" + // SSTP ... + SSTP VpnClientProtocol = "SSTP" +) + +// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type. +func PossibleVpnClientProtocolValues() []VpnClientProtocol { + return []VpnClientProtocol{IkeV2, OpenVPN, SSTP} +} + +// 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} +} + +// VpnType enumerates the values for vpn type. +type VpnType string + +const ( + // PolicyBased ... + PolicyBased VpnType = "PolicyBased" + // RouteBased ... + RouteBased VpnType = "RouteBased" +) + +// PossibleVpnTypeValues returns an array of possible values for the VpnType const type. +func PossibleVpnTypeValues() []VpnType { + return []VpnType{PolicyBased, RouteBased} +} + +// 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 ( + // PostArgs ... + PostArgs WebApplicationFirewallMatchVariable = "PostArgs" + // QueryString ... + QueryString WebApplicationFirewallMatchVariable = "QueryString" + // RemoteAddr ... + RemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" + // RequestBody ... + RequestBody WebApplicationFirewallMatchVariable = "RequestBody" + // RequestCookies ... + RequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" + // RequestHeaders ... + RequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" + // RequestMethod ... + RequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" + // RequestURI ... + RequestURI WebApplicationFirewallMatchVariable = "RequestUri" +) + +// PossibleWebApplicationFirewallMatchVariableValues returns an array of possible values for the WebApplicationFirewallMatchVariable const type. +func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewallMatchVariable { + return []WebApplicationFirewallMatchVariable{PostArgs, QueryString, RemoteAddr, RequestBody, RequestCookies, RequestHeaders, RequestMethod, RequestURI} +} + +// 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 ( + // HTMLEntityDecode ... + HTMLEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" + // Lowercase ... + Lowercase WebApplicationFirewallTransform = "Lowercase" + // RemoveNulls ... + RemoveNulls WebApplicationFirewallTransform = "RemoveNulls" + // Trim ... + Trim WebApplicationFirewallTransform = "Trim" + // URLDecode ... + URLDecode WebApplicationFirewallTransform = "UrlDecode" + // URLEncode ... + URLEncode WebApplicationFirewallTransform = "UrlEncode" +) + +// PossibleWebApplicationFirewallTransformValues returns an array of possible values for the WebApplicationFirewallTransform const type. +func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTransform { + return []WebApplicationFirewallTransform{HTMLEntityDecode, Lowercase, RemoveNulls, Trim, URLDecode, URLEncode} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S' + 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 +} + +// 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.NextLink == nil || len(to.String(agaspp.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.agaspp) + if err != nil { + return err + } + page.agaspp = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage { + return ApplicationGatewayAvailableSslPredefinedPoliciesPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Unknown', 'Up', 'Down', 'Partial', 'Draining' + 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: 'HTTP', 'HTTPS' + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + // CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,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: 'HTTPStatus403', 'HTTPStatus502' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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: 'Static', 'Dynamic' + 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"` + // ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,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: 'HTTP', 'HTTPS' + 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(aglr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.aglr) + if err != nil { + return err + } + page.aglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage { + return ApplicationGatewayListResultPage{fn: getNextPage} +} + +// ApplicationGatewayOnDemandProbe details of on demand test probe request. +type ApplicationGatewayOnDemandProbe struct { + // Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS' + 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"` + // ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // FirewallPolicy - Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` +} + +// 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: 'HTTP', 'HTTPS' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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: 'Stopped', 'Starting', 'Running', 'Stopping' + 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"` + // 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"` + // 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // CustomErrorConfigurations - Custom error configurations of the application gateway resource. + CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` +} + +// 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: 'Permanent', 'Found', 'SeeOther', 'Temporary' + 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: 'Basic', 'PathBasedRouting' + 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"` + // ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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 paramter 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationGatewaysBackendHealthFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Predefined', 'Custom' + PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` + // PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S' + 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: 'TLSv10', 'TLSv11', 'TLSv12' + 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: 'TLSv10', 'TLSv11', 'TLSv12' + MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` +} + +// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationGatewaysStartFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture") + return + } + ar.Response = future.Response() + return +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Detection', 'Prevention' + 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"` +} + +// ApplicationRuleCondition rule condition of type application. +type ApplicationRuleCondition 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 *[]FirewallPolicyRuleConditionApplicationProtocol `json:"protocols,omitempty"` + // TargetFqdns - List of FQDNs for this rule condition. + TargetFqdns *[]string `json:"targetFqdns,omitempty"` + // FqdnTags - List of FQDN Tags for this rule condition. + FqdnTags *[]string `json:"fqdnTags,omitempty"` + // Name - Name of the rule condition. + Name *string `json:"name,omitempty"` + // Description - Description of the rule condition. + Description *string `json:"description,omitempty"` + // RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition' + RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationRuleCondition. +func (arc ApplicationRuleCondition) MarshalJSON() ([]byte, error) { + arc.RuleConditionType = RuleConditionTypeApplicationRuleCondition + objectMap := make(map[string]interface{}) + if arc.SourceAddresses != nil { + objectMap["sourceAddresses"] = arc.SourceAddresses + } + if arc.DestinationAddresses != nil { + objectMap["destinationAddresses"] = arc.DestinationAddresses + } + if arc.Protocols != nil { + objectMap["protocols"] = arc.Protocols + } + if arc.TargetFqdns != nil { + objectMap["targetFqdns"] = arc.TargetFqdns + } + if arc.FqdnTags != nil { + objectMap["fqdnTags"] = arc.FqdnTags + } + if arc.Name != nil { + objectMap["name"] = arc.Name + } + if arc.Description != nil { + objectMap["description"] = arc.Description + } + if arc.RuleConditionType != "" { + objectMap["ruleConditionType"] = arc.RuleConditionType + } + return json.Marshal(objectMap) +} + +// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition. +func (arc ApplicationRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) { + return &arc, true +} + +// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition. +func (arc ApplicationRuleCondition) AsRuleCondition() (*RuleCondition, bool) { + return nil, false +} + +// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition. +func (arc ApplicationRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition. +func (arc ApplicationRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) { + return &arc, 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(asglr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.asglr) + if err != nil { + return err + } + page.asglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage { + return ApplicationSecurityGroupListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ApplicationSecurityGroupsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(alr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(alr.NextLink))) +} + +// 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) + }() + } + next, err := page.fn(ctx, page.alr) + if err != nil { + return err + } + page.alr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage { + return AuthorizationListResultPage{fn: getNextPage} +} + +// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization. +type AuthorizationPropertiesFormat struct { + // AuthorizationKey - The authorization key. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse' + AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(aaplsr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.aaplsr) + if err != nil { + return err + } + page.aaplsr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage { + return AutoApprovedPrivateLinkServicesResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(adr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.adr) + if err != nil { + return err + } + page.adr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage { + return AvailableDelegationsResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(apetr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.apetr) + if err != nil { + return err + } + page.apetr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage { + return AvailablePrivateEndpointTypesResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(asar.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.asar) + if err != nil { + return err + } + page.asar = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage { + return AvailableServiceAliasesResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(afftlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.afftlr) + if err != nil { + return err + } + page.afftlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage { + return AzureFirewallFqdnTagListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // FqdnTagName - READ-ONLY; The name of this FQDN Tag. + FqdnTagName *string `json:"fqdnTagName,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(aflr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.aflr) + if err != nil { + return err + } + page.aflr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage { + return AzureFirewallListResultPage{fn: getNextPage} +} + +// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action. +type AzureFirewallNatRCAction struct { + // Type - The type of action. Possible values include: 'Snat', 'Dnat' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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 - READ-ONLY; 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.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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'AZFWVNet', 'AZFWHub' + Name AzureFirewallSkuName `json:"name,omitempty"` + // Tier - Tier of an Azure Firewall. Possible values include: 'Standard' + Tier AzureFirewallSkuTier `json:"tier,omitempty"` +} + +// 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"` +} + +// 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 { + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'SSH', 'RDP' + 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(baslr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.baslr) + if err != nil { + return err + } + page.baslr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage { + return BastionActiveSessionListResultPage{fn: getNextPage} +} + +// 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"` + // 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.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 "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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(bhlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.bhlr) + if err != nil { + return err + } + page.bhlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage { + return BastionHostListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BastionHostsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture") + return + } + ar.Response = future.Response() + 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 +} + +// 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.NextLink == nil || len(to.String(bsdr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.bsdr) + if err != nil { + return err + } + page.bsdr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage { + return BastionSessionDeleteResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(bsllr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.bsllr) + if err != nil { + return err + } + page.bsllr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage { + return BastionShareableLinkListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 *int32 `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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.bsclr) + if err != nil { + return err + } + page.bsclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage { + return BgpServiceCommunityListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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: 'Normal', 'Minimum', 'Full' + 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: 'Inbound', 'Outbound' + 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"` +} + +// 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"` + // 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"` +} + +// 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: 'Include' + 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: 'AgentAddress' + Type ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"` + // Address - The address of the filter item. + 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: 'Get', 'Post' + 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: 'Workspace' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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: 'MultiEndpoint', 'SingleSourceDestination' + 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"` +} + +// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConnectionMonitorsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 *int32 `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"` +} + +// 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: 'NotStarted', 'InProgress', 'Completed' + EvaluationState EvaluationState `json:"evaluationState,omitempty"` + // AvgLatencyInMs - Average latency in ms. + AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` + // MinLatencyInMs - Minimum latency in ms. + MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` + // MaxLatencyInMs - Maximum latency in ms. + MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` + // ProbesSent - The number of sent probes. + ProbesSent *int32 `json:"probesSent,omitempty"` + // ProbesFailed - The number of failed probes. + ProbesFailed *int32 `json:"probesFailed,omitempty"` + // Hops - READ-ONLY; List of hops between the source and the destination. + Hops *[]ConnectivityHop `json:"hops,omitempty"` +} + +// 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"` + // Issues - READ-ONLY; List of issues. + Issues *[]ConnectivityIssue `json:"issues,omitempty"` +} + +// 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"` +} + +// 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"` +} + +// 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: 'IPv4', 'IPv6' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosCustomPoliciesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.dpplr) + if err != nil { + return err + } + page.dpplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage { + return DdosProtectionPlanListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosProtectionPlansCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` + // 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.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 "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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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 { + // 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"` +} + +// 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: 'Active', 'Invalid' + 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"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(eslr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.eslr) + if err != nil { + return err + } + page.eslr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage { + return EndpointServicesListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.ercclr) + if err != nil { + return err + } + page.ercclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage { + return ExpressRouteCircuitConnectionListResultPage{fn: getNextPage} +} + +// 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"` + // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' + CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.erclr) + if err != nil { + return err + } + page.erclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { + return ExpressRouteCircuitListResultPage{fn: getNextPage} +} + +// 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: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' + 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.ercplr) + if err != nil { + return err + } + page.ercplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { + return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage} +} + +// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering. +type ExpressRouteCircuitPeeringPropertiesFormat struct { + // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'UnlimitedData', 'MeteredData' + Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` +} + +// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsListArpTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ExpressRouteConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.ercclr) + if err != nil { + return err + } + page.ercclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage { + return ExpressRouteCrossConnectionListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.erccpl) + if err != nil { + return err + } + page.erccpl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage { + return ExpressRouteCrossConnectionPeeringListPage{fn: getNextPage} +} + +// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering. +type ExpressRouteCrossConnectionPeeringProperties struct { + // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 - The peering location of the ExpressRoute circuit. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInMbps - 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: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Peerings - The list of peerings. + Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` +} + +// 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed. + VirtualHub *VirtualHubID `json:"virtualHub,omitempty"` +} + +// 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + 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 +} + +// 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.NextLink == nil || len(to.String(erllr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.erllr) + if err != nil { + return err + } + page.erllr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage { + return ExpressRouteLinkListResultPage{fn: getNextPage} +} + +// 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: 'GcmAes128', 'GcmAes256' + Cipher ExpressRouteLinkMacSecCipher `json:"cipher,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: 'LC', 'SC' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // MacSecConfig - MacSec configuration. + MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(erplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.erplr) + if err != nil { + return err + } + page.erplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage { + return ExpressRoutePortListResultPage{fn: getNextPage} +} + +// 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: 'Dot1Q', 'QinQ' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` +} + +// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRoutePortsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(erpllr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.erpllr) + if err != nil { + return err + } + page.erpllr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage { + return ExpressRoutePortsLocationListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.ersplr) + if err != nil { + return err + } + page.ersplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { + return ExpressRouteServiceProviderListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type FirewallPoliciesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` + // 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.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 "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 +} + +// FirewallPolicyFilterRule firewall Policy Filter Rule. +type FirewallPolicyFilterRule struct { + // Action - The action type of a Filter rule. + Action *FirewallPolicyFilterRuleAction `json:"action,omitempty"` + // RuleConditions - Collection of rule conditions used by a rule. + RuleConditions *[]BasicFirewallPolicyRuleCondition `json:"ruleConditions,omitempty"` + // Name - The name of the rule. + Name *string `json:"name,omitempty"` + // Priority - Priority of the Firewall Policy Rule resource. + Priority *int32 `json:"priority,omitempty"` + // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule' + RuleType RuleType `json:"ruleType,omitempty"` +} + +// MarshalJSON is the custom marshaler for FirewallPolicyFilterRule. +func (fpfr FirewallPolicyFilterRule) MarshalJSON() ([]byte, error) { + fpfr.RuleType = RuleTypeFirewallPolicyFilterRule + objectMap := make(map[string]interface{}) + if fpfr.Action != nil { + objectMap["action"] = fpfr.Action + } + if fpfr.RuleConditions != nil { + objectMap["ruleConditions"] = fpfr.RuleConditions + } + if fpfr.Name != nil { + objectMap["name"] = fpfr.Name + } + if fpfr.Priority != nil { + objectMap["priority"] = fpfr.Priority + } + if fpfr.RuleType != "" { + objectMap["ruleType"] = fpfr.RuleType + } + return json.Marshal(objectMap) +} + +// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule. +func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) { + return nil, false +} + +// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule. +func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) { + return &fpfr, true +} + +// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule. +func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule. +func (fpfr FirewallPolicyFilterRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { + return &fpfr, true +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRule struct. +func (fpfr *FirewallPolicyFilterRule) UnmarshalJSON(body []byte) error { + 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 FirewallPolicyFilterRuleAction + err = json.Unmarshal(*v, &action) + if err != nil { + return err + } + fpfr.Action = &action + } + case "ruleConditions": + if v != nil { + ruleConditions, err := unmarshalBasicFirewallPolicyRuleConditionArray(*v) + if err != nil { + return err + } + fpfr.RuleConditions = &ruleConditions + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fpfr.Name = &name + } + case "priority": + if v != nil { + var priority int32 + err = json.Unmarshal(*v, &priority) + if err != nil { + return err + } + fpfr.Priority = &priority + } + case "ruleType": + if v != nil { + var ruleType RuleType + err = json.Unmarshal(*v, &ruleType) + if err != nil { + return err + } + fpfr.RuleType = ruleType + } + } + } + + return nil +} + +// FirewallPolicyFilterRuleAction properties of the FirewallPolicyFilterRuleAction. +type FirewallPolicyFilterRuleAction struct { + // Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny' + Type FirewallPolicyFilterRuleActionType `json:"type,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 +} + +// 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.NextLink == nil || len(to.String(fplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.fplr) + if err != nil { + return err + } + page.fplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage { + return FirewallPolicyListResultPage{fn: getNextPage} +} + +// FirewallPolicyNatRule firewall Policy NAT Rule. +type FirewallPolicyNatRule struct { + // Action - The action type of a Nat rule. + Action *FirewallPolicyNatRuleAction `json:"action,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"` + // RuleCondition - The match conditions for incoming traffic. + RuleCondition BasicFirewallPolicyRuleCondition `json:"ruleCondition,omitempty"` + // Name - The name of the rule. + Name *string `json:"name,omitempty"` + // Priority - Priority of the Firewall Policy Rule resource. + Priority *int32 `json:"priority,omitempty"` + // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule' + RuleType RuleType `json:"ruleType,omitempty"` +} + +// MarshalJSON is the custom marshaler for FirewallPolicyNatRule. +func (fpnr FirewallPolicyNatRule) MarshalJSON() ([]byte, error) { + fpnr.RuleType = RuleTypeFirewallPolicyNatRule + objectMap := make(map[string]interface{}) + if fpnr.Action != nil { + objectMap["action"] = fpnr.Action + } + if fpnr.TranslatedAddress != nil { + objectMap["translatedAddress"] = fpnr.TranslatedAddress + } + if fpnr.TranslatedPort != nil { + objectMap["translatedPort"] = fpnr.TranslatedPort + } + objectMap["ruleCondition"] = fpnr.RuleCondition + if fpnr.Name != nil { + objectMap["name"] = fpnr.Name + } + if fpnr.Priority != nil { + objectMap["priority"] = fpnr.Priority + } + if fpnr.RuleType != "" { + objectMap["ruleType"] = fpnr.RuleType + } + return json.Marshal(objectMap) +} + +// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule. +func (fpnr FirewallPolicyNatRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) { + return &fpnr, true +} + +// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule. +func (fpnr FirewallPolicyNatRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) { + return nil, false +} + +// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule. +func (fpnr FirewallPolicyNatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule. +func (fpnr FirewallPolicyNatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { + return &fpnr, true +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRule struct. +func (fpnr *FirewallPolicyNatRule) UnmarshalJSON(body []byte) error { + 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 FirewallPolicyNatRuleAction + err = json.Unmarshal(*v, &action) + if err != nil { + return err + } + fpnr.Action = &action + } + case "translatedAddress": + if v != nil { + var translatedAddress string + err = json.Unmarshal(*v, &translatedAddress) + if err != nil { + return err + } + fpnr.TranslatedAddress = &translatedAddress + } + case "translatedPort": + if v != nil { + var translatedPort string + err = json.Unmarshal(*v, &translatedPort) + if err != nil { + return err + } + fpnr.TranslatedPort = &translatedPort + } + case "ruleCondition": + if v != nil { + ruleCondition, err := unmarshalBasicFirewallPolicyRuleCondition(*v) + if err != nil { + return err + } + fpnr.RuleCondition = ruleCondition + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fpnr.Name = &name + } + case "priority": + if v != nil { + var priority int32 + err = json.Unmarshal(*v, &priority) + if err != nil { + return err + } + fpnr.Priority = &priority + } + case "ruleType": + if v != nil { + var ruleType RuleType + err = json.Unmarshal(*v, &ruleType) + if err != nil { + return err + } + fpnr.RuleType = ruleType + } + } + } + + return nil +} + +// FirewallPolicyNatRuleAction properties of the FirewallPolicyNatRuleAction. +type FirewallPolicyNatRuleAction struct { + // Type - The type of action. Possible values include: 'DNAT' + Type FirewallPolicyNatRuleActionType `json:"type,omitempty"` +} + +// FirewallPolicyPropertiesFormat firewall Policy definition. +type FirewallPolicyPropertiesFormat struct { + // RuleGroups - READ-ONLY; List of references to FirewallPolicyRuleGroups. + RuleGroups *[]SubResource `json:"ruleGroups,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// BasicFirewallPolicyRule properties of the rule. +type BasicFirewallPolicyRule interface { + AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) + AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) + AsFirewallPolicyRule() (*FirewallPolicyRule, bool) +} + +// FirewallPolicyRule properties of the rule. +type FirewallPolicyRule struct { + // Name - The name of the rule. + Name *string `json:"name,omitempty"` + // Priority - Priority of the Firewall Policy Rule resource. + Priority *int32 `json:"priority,omitempty"` + // RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule' + 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(RuleTypeFirewallPolicyNatRule): + var fpnr FirewallPolicyNatRule + err := json.Unmarshal(body, &fpnr) + return fpnr, err + case string(RuleTypeFirewallPolicyFilterRule): + var fpfr FirewallPolicyFilterRule + err := json.Unmarshal(body, &fpfr) + return fpfr, 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.Priority != nil { + objectMap["priority"] = fpr.Priority + } + if fpr.RuleType != "" { + objectMap["ruleType"] = fpr.RuleType + } + return json.Marshal(objectMap) +} + +// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. +func (fpr FirewallPolicyRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) { + return nil, false +} + +// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule. +func (fpr FirewallPolicyRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, 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 +} + +// BasicFirewallPolicyRuleCondition properties of a rule. +type BasicFirewallPolicyRuleCondition interface { + AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) + AsRuleCondition() (*RuleCondition, bool) + AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) +} + +// FirewallPolicyRuleCondition properties of a rule. +type FirewallPolicyRuleCondition struct { + // Name - Name of the rule condition. + Name *string `json:"name,omitempty"` + // Description - Description of the rule condition. + Description *string `json:"description,omitempty"` + // RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition' + RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"` +} + +func unmarshalBasicFirewallPolicyRuleCondition(body []byte) (BasicFirewallPolicyRuleCondition, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ruleConditionType"] { + case string(RuleConditionTypeApplicationRuleCondition): + var arc ApplicationRuleCondition + err := json.Unmarshal(body, &arc) + return arc, err + case string(RuleConditionTypeNetworkRuleCondition): + var rc RuleCondition + err := json.Unmarshal(body, &rc) + return rc, err + default: + var fprc FirewallPolicyRuleCondition + err := json.Unmarshal(body, &fprc) + return fprc, err + } +} +func unmarshalBasicFirewallPolicyRuleConditionArray(body []byte) ([]BasicFirewallPolicyRuleCondition, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fprcArray := make([]BasicFirewallPolicyRuleCondition, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fprc, err := unmarshalBasicFirewallPolicyRuleCondition(*rawMessage) + if err != nil { + return nil, err + } + fprcArray[index] = fprc + } + return fprcArray, nil +} + +// MarshalJSON is the custom marshaler for FirewallPolicyRuleCondition. +func (fprc FirewallPolicyRuleCondition) MarshalJSON() ([]byte, error) { + fprc.RuleConditionType = RuleConditionTypeFirewallPolicyRuleCondition + objectMap := make(map[string]interface{}) + if fprc.Name != nil { + objectMap["name"] = fprc.Name + } + if fprc.Description != nil { + objectMap["description"] = fprc.Description + } + if fprc.RuleConditionType != "" { + objectMap["ruleConditionType"] = fprc.RuleConditionType + } + return json.Marshal(objectMap) +} + +// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition. +func (fprc FirewallPolicyRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) { + return nil, false +} + +// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition. +func (fprc FirewallPolicyRuleCondition) AsRuleCondition() (*RuleCondition, bool) { + return nil, false +} + +// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition. +func (fprc FirewallPolicyRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) { + return &fprc, true +} + +// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition. +func (fprc FirewallPolicyRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) { + return &fprc, true +} + +// FirewallPolicyRuleConditionApplicationProtocol properties of the application rule protocol. +type FirewallPolicyRuleConditionApplicationProtocol struct { + // ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTP', 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS' + ProtocolType FirewallPolicyRuleConditionApplicationProtocolType `json:"protocolType,omitempty"` + // Port - Port number for the protocol, cannot be greater than 64000. + Port *int32 `json:"port,omitempty"` +} + +// FirewallPolicyRuleGroup rule Group resource. +type FirewallPolicyRuleGroup struct { + autorest.Response `json:"-"` + // FirewallPolicyRuleGroupProperties - The properties of the firewall policy rule group. + *FirewallPolicyRuleGroupProperties `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 FirewallPolicyRuleGroup. +func (fprg FirewallPolicyRuleGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fprg.FirewallPolicyRuleGroupProperties != nil { + objectMap["properties"] = fprg.FirewallPolicyRuleGroupProperties + } + if fprg.Name != nil { + objectMap["name"] = fprg.Name + } + if fprg.ID != nil { + objectMap["id"] = fprg.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroup struct. +func (fprg *FirewallPolicyRuleGroup) UnmarshalJSON(body []byte) error { + var m map[string]*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 firewallPolicyRuleGroupProperties FirewallPolicyRuleGroupProperties + err = json.Unmarshal(*v, &firewallPolicyRuleGroupProperties) + if err != nil { + return err + } + fprg.FirewallPolicyRuleGroupProperties = &firewallPolicyRuleGroupProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + fprg.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + fprg.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + fprg.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + fprg.ID = &ID + } + } + } + + return nil +} + +// FirewallPolicyRuleGroupListResult response for ListFirewallPolicyRuleGroups API service call. +type FirewallPolicyRuleGroupListResult struct { + autorest.Response `json:"-"` + // Value - List of FirewallPolicyRuleGroups in a FirewallPolicy. + Value *[]FirewallPolicyRuleGroup `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// FirewallPolicyRuleGroupListResultIterator provides access to a complete listing of +// FirewallPolicyRuleGroup values. +type FirewallPolicyRuleGroupListResultIterator struct { + i int + page FirewallPolicyRuleGroupListResultPage +} + +// 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 *FirewallPolicyRuleGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultIterator.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 *FirewallPolicyRuleGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter FirewallPolicyRuleGroupListResultIterator) 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 FirewallPolicyRuleGroupListResultIterator) Response() FirewallPolicyRuleGroupListResult { + 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 FirewallPolicyRuleGroupListResultIterator) Value() FirewallPolicyRuleGroup { + if !iter.page.NotDone() { + return FirewallPolicyRuleGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the FirewallPolicyRuleGroupListResultIterator type. +func NewFirewallPolicyRuleGroupListResultIterator(page FirewallPolicyRuleGroupListResultPage) FirewallPolicyRuleGroupListResultIterator { + return FirewallPolicyRuleGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (fprglr FirewallPolicyRuleGroupListResult) IsEmpty() bool { + return fprglr.Value == nil || len(*fprglr.Value) == 0 +} + +// firewallPolicyRuleGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (fprglr FirewallPolicyRuleGroupListResult) firewallPolicyRuleGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if fprglr.NextLink == nil || len(to.String(fprglr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(fprglr.NextLink))) +} + +// FirewallPolicyRuleGroupListResultPage contains a page of FirewallPolicyRuleGroup values. +type FirewallPolicyRuleGroupListResultPage struct { + fn func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error) + fprglr FirewallPolicyRuleGroupListResult +} + +// 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 *FirewallPolicyRuleGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.fprglr) + if err != nil { + return err + } + page.fprglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *FirewallPolicyRuleGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page FirewallPolicyRuleGroupListResultPage) NotDone() bool { + return !page.fprglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page FirewallPolicyRuleGroupListResultPage) Response() FirewallPolicyRuleGroupListResult { + return page.fprglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page FirewallPolicyRuleGroupListResultPage) Values() []FirewallPolicyRuleGroup { + if page.fprglr.IsEmpty() { + return nil + } + return *page.fprglr.Value +} + +// Creates a new instance of the FirewallPolicyRuleGroupListResultPage type. +func NewFirewallPolicyRuleGroupListResultPage(getNextPage func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)) FirewallPolicyRuleGroupListResultPage { + return FirewallPolicyRuleGroupListResultPage{fn: getNextPage} +} + +// FirewallPolicyRuleGroupProperties properties of the rule group. +type FirewallPolicyRuleGroupProperties struct { + // Priority - Priority of the Firewall Policy Rule Group resource. + Priority *int32 `json:"priority,omitempty"` + // Rules - Group of Firewall Policy rules. + Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroupProperties struct. +func (fprgp *FirewallPolicyRuleGroupProperties) UnmarshalJSON(body []byte) error { + 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 + } + fprgp.Priority = &priority + } + case "rules": + if v != nil { + rules, err := unmarshalBasicFirewallPolicyRuleArray(*v) + if err != nil { + return err + } + fprgp.Rules = &rules + } + case "provisioningState": + if v != nil { + var provisioningState ProvisioningState + err = json.Unmarshal(*v, &provisioningState) + if err != nil { + return err + } + fprgp.ProvisioningState = provisioningState + } + } + } + + return nil +} + +// FirewallPolicyRuleGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type FirewallPolicyRuleGroupsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) Result(client FirewallPolicyRuleGroupsClient) (fprg FirewallPolicyRuleGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if fprg.Response.Response, err = future.GetResult(sender); err == nil && fprg.Response.Response.StatusCode != http.StatusNoContent { + fprg, err = client.CreateOrUpdateResponder(fprg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", fprg.Response.Response, "Failure responding to request") + } + } + return +} + +// FirewallPolicyRuleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type FirewallPolicyRuleGroupsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *FirewallPolicyRuleGroupsDeleteFuture) Result(client FirewallPolicyRuleGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// 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: 'JSON' + 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(fllr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.fllr) + if err != nil { + return err + } + page.fllr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage { + return FlowLogListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type FlowLogsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6' + 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"` + // ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,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"` +} + +// GatewayRouteListResult list of virtual network gateway routes. +type GatewayRouteListResult struct { + autorest.Response `json:"-"` + // Value - List of gateway routes. + Value *[]GatewayRoute `json:"value,omitempty"` +} + +// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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 { + // PublicIPAddresses - List of Public IP addresses associated with azure firewall. + PublicIPAddresses *[]AzureFirewallPublicIPAddress `json:"publicIPAddresses,omitempty"` + // PrivateIPAddress - Private IP Address associated with azure firewall. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` +} + +// 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 - VirtualHub to RemoteVnet transit to enabled or not. + AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` + // AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways. + AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` + // EnableInternetSecurity - Enable internet security. + EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.inrlr) + if err != nil { + return err + } + page.inrlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage { + return InboundNatRuleListResultPage{fn: getNextPage} +} + +// 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"` + // ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InboundNatRulesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// 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:"-"` + // 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.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 "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"` +} + +// 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"` +} + +// 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"` + // 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.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 "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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.iiclr) + if err != nil { + return err + } + page.iiclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage { + return InterfaceIPConfigurationListResultPage{fn: getNextPage} +} + +// 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"` +} + +// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. +type InterfaceIPConfigurationPropertiesFormat struct { + // 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: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface. + PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.ilr) + if err != nil { + return err + } + page.ilr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { + return InterfaceListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.ilblr) + if err != nil { + return err + } + page.ilblr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage { + return InterfaceLoadBalancerListResultPage{fn: getNextPage} +} + +// 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfacesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(itclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.itclr) + if err != nil { + return err + } + page.itclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage { + return InterfaceTapConfigurationListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type InterfaceTapConfigurationsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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 +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Static', 'Dynamic' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(iglr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.iglr) + if err != nil { + return err + } + page.iglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage { + return IPGroupListResultPage{fn: getNextPage} +} + +// IPGroupPropertiesFormat the IpGroups property information. +type IPGroupPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource. + IPAddresses *[]string `json:"ipAddresses,omitempty"` + // Firewalls - READ-ONLY; List of references to Azure resources that this IpGroups is associated with. + Firewalls *[]SubResource `json:"firewalls,omitempty"` +} + +// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IPGroupsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + 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: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + 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"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lhvncr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lhvncr) + if err != nil { + return err + } + page.lhvncr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage { + return ListHubVirtualNetworkConnectionsResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lpvgr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lpvgr) + if err != nil { + return err + } + page.lpvgr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage { + return ListP2SVpnGatewaysResultPage{fn: getNextPage} +} + +// ListString ... +type ListString struct { + autorest.Response `json:"-"` + Value *[]string `json:"value,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvhrtvr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvhrtvr) + if err != nil { + return err + } + page.lvhrtvr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage { + return ListVirtualHubRouteTableV2sResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvhr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvhr) + if err != nil { + return err + } + page.lvhr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage { + return ListVirtualHubsResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvwnr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvwnr) + if err != nil { + return err + } + page.lvwnr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage { + return ListVirtualWANsResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvcr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvcr) + if err != nil { + return err + } + page.lvcr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage { + return ListVpnConnectionsResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvgr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvgr) + if err != nil { + return err + } + page.lvgr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage { + return ListVpnGatewaysResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvscr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvscr) + if err != nil { + return err + } + page.lvscr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage { + return ListVpnServerConfigurationsResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvslcr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvslcr) + if err != nil { + return err + } + page.lvslcr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage { + return ListVpnSiteLinkConnectionsResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvslr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvslr) + if err != nil { + return err + } + page.lvslr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage { + return ListVpnSiteLinksResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lvsr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lvsr) + if err != nil { + return err + } + page.lvsr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage { + return ListVpnSitesResultPage{fn: getNextPage} +} + +// LoadBalancer loadBalancer resource. +type LoadBalancer struct { + autorest.Response `json:"-"` + // 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.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 "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 +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lbbaplr) + if err != nil { + return err + } + page.lbbaplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage { + return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lbficlr) + if err != nil { + return err + } + page.lbficlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage { + return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lblr) + if err != nil { + return err + } + page.lblr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { + return LoadBalancerListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lblbrlr) + if err != nil { + return err + } + page.lblbrlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage { + return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lborlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lborlr) + if err != nil { + return err + } + page.lborlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage { + return LoadBalancerOutboundRuleListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lbplr) + if err != nil { + return err + } + page.lbplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage { + return LoadBalancerProbeListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LoadBalancersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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' + Name LoadBalancerSkuName `json:"name,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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.lnglr) + if err != nil { + return err + } + page.lnglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { + return LocalNetworkGatewayListResultPage{fn: getNextPage} +} + +// 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LocalNetworkGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies' + 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 +} + +// 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.NextLink == nil || len(to.String(nglr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.nglr) + if err != nil { + return err + } + page.nglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage { + return NatGatewayListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type NatGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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"` +} + +// 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 +} + +// operationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(olr.NextLink))) +} + +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(context.Context, OperationListResult) (OperationListResult, error) + olr OperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationListResultPage) Response() OperationListResult { + return page.olr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { + return nil + } + return *page.olr.Value +} + +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames' + 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"` + // ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway. + VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` + // VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to. + VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` + // VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status. + VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` +} + +// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type P2sVpnGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// P2SVpnProfileParameters vpn Client Parameters for package generation. +type P2SVpnProfileParameters struct { + // AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + 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 *int32 `json:"bytesToCapturePerPacket,omitempty"` + // TotalBytesPerSession - Maximum size of the capture output. + TotalBytesPerSession *int32 `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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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 *int32 `json:"bytesToCapturePerPacket,omitempty"` + // TotalBytesPerSession - Maximum size of the capture output. + TotalBytesPerSession *int32 `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"` +} + +// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(percclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.percclr) + if err != nil { + return err + } + page.percclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage { + return PeerExpressRouteCircuitConnectionListResultPage{fn: getNextPage} +} + +// 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: 'Connected', 'Connecting', 'Disconnected' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,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"` +} + +// PrivateEndpoint private endpoint resource. +type PrivateEndpoint struct { + autorest.Response `json:"-"` + // 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.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 "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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(peclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.peclr) + if err != nil { + return err + } + page.peclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // LinkIdentifier - READ-ONLY; The consumer link id. + LinkIdentifier *string `json:"linkIdentifier,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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(pelr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.pelr) + if err != nil { + return err + } + page.pelr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage { + return PrivateEndpointListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateEndpointsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateLinkService private link service resource. +type PrivateLinkService struct { + autorest.Response `json:"-"` + // 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.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 "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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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: 'Static', 'Dynamic' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(plslr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.plslr) + if err != nil { + return err + } + page.plslr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage { + return PrivateLinkServiceListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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"` +} + +// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateLinkServicesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(plr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.plr) + if err != nil { + return err + } + page.plr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage { + return ProfileListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ProfilesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// 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: 'Relaxed', 'Low', 'Default', 'High' + TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"` +} + +// PublicIPAddress public IP address resource. +type PublicIPAddress struct { + autorest.Response `json:"-"` + // 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.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 "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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(pialr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.pialr) + if err != nil { + return err + } + page.pialr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage { + return PublicIPAddressListResultPage{fn: getNextPage} +} + +// PublicIPAddressPropertiesFormat public IP address properties. +type PublicIPAddressPropertiesFormat struct { + // PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic' + PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` + // PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// PublicIPPrefix public IP prefix resource. +type PublicIPPrefix struct { + autorest.Response `json:"-"` + // 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.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 "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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(piplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.piplr) + if err != nil { + return err + } + page.piplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage { + return PublicIPPrefixListResultPage{fn: getNextPage} +} + +// PublicIPPrefixPropertiesFormat public IP prefix properties. +type PublicIPPrefixPropertiesFormat struct { + // PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6' + 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PutBastionShareableLinkAllFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// 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"` + // 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.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 "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 +} + +// 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.NextLink == nil || len(to.String(rflr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.rflr) + if err != nil { + return err + } + page.rflr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage { + return RouteFilterListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.rfrlr) + if err != nil { + return err + } + page.rfrlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage { + return RouteFilterRuleListResultPage{fn: getNextPage} +} + +// RouteFilterRulePropertiesFormat route Filter Rule Resource. +type RouteFilterRulePropertiesFormat struct { + // Access - The access type of the rule. Possible values include: 'Allow', 'Deny' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type RouteFilterRulesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rlr.NextLink))) +} + +// 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) + }() + } + next, err := page.fn(ctx, page.rlr) + if err != nil { + return err + } + page.rlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage { + return RouteListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RoutesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.rtlr) + if err != nil { + return err + } + page.rtlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage { + return RouteTableListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type RouteTablesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RuleCondition rule condition of type network. +type RuleCondition struct { + // IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols. + IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `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"` + // Name - Name of the rule condition. + Name *string `json:"name,omitempty"` + // Description - Description of the rule condition. + Description *string `json:"description,omitempty"` + // RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition' + RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RuleCondition. +func (rc RuleCondition) MarshalJSON() ([]byte, error) { + rc.RuleConditionType = RuleConditionTypeNetworkRuleCondition + objectMap := make(map[string]interface{}) + if rc.IPProtocols != nil { + objectMap["ipProtocols"] = rc.IPProtocols + } + if rc.SourceAddresses != nil { + objectMap["sourceAddresses"] = rc.SourceAddresses + } + if rc.DestinationAddresses != nil { + objectMap["destinationAddresses"] = rc.DestinationAddresses + } + if rc.DestinationPorts != nil { + objectMap["destinationPorts"] = rc.DestinationPorts + } + if rc.Name != nil { + objectMap["name"] = rc.Name + } + if rc.Description != nil { + objectMap["description"] = rc.Description + } + if rc.RuleConditionType != "" { + objectMap["ruleConditionType"] = rc.RuleConditionType + } + return json.Marshal(objectMap) +} + +// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition. +func (rc RuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) { + return nil, false +} + +// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition. +func (rc RuleCondition) AsRuleCondition() (*RuleCondition, bool) { + return &rc, true +} + +// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition. +func (rc RuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) { + return nil, false +} + +// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition. +func (rc RuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) { + return &rc, 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 +} + +// 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.NextLink == nil || len(to.String(sglr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.sglr) + if err != nil { + return err + } + page.sglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage { + return SecurityGroupListResultPage{fn: getNextPage} +} + +// 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SecurityGroupsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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"` + // 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.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 "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 +} + +// 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.NextLink == nil || len(to.String(srlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.srlr) + if err != nil { + return err + } + page.srlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage { + return SecurityRuleListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SecurityRulesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ServiceEndpointPoliciesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` + // 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 "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"` + // 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.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 "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 +} + +// 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.NextLink == nil || len(to.String(sepdlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.sepdlr) + if err != nil { + return err + } + page.sepdlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage { + return ServiceEndpointPolicyDefinitionListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(seplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.seplr) + if err != nil { + return err + } + page.seplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage { + return ServiceEndpointPolicyListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// 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"` +} + +// 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"` +} + +// SessionIds list of session IDs. +type SessionIds struct { + // SessionIds - List of session IDs. + SessionIds *[]string `json:"sessionIds,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"` + // 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.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 "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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(slr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.slr) + if err != nil { + return err + } + page.slr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage { + return SubnetListResultPage{fn: getNextPage} +} + +// 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. + PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"` + // PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet. + PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"` +} + +// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type SubnetsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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: 'Associated', 'Contains' + 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"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(ulr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.ulr) + if err != nil { + return err + } + page.ulr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage { + return UsagesListResultPage{fn: getNextPage} +} + +// 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: 'Inbound', 'Outbound' + 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: 'Allow', 'Deny' + 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"` +} + +// 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"` + // 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 "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 +} + +// 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"` +} + +// 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"` + // VirtualNetworkConnections - List of all vnet connections with this VirtualHub. + VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualHubRouteTableV2sCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetwork virtual Network resource. +type VirtualNetwork struct { + autorest.Response `json:"-"` + // 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.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 "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"` +} + +// 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"` + // 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.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 "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: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` + // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' + ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` + // RoutingWeight - The routing weight. + RoutingWeight *int32 `json:"routingWeight,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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding. + ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vngclr) + if err != nil { + return err + } + page.vngclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage { + return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage} +} + +// 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"` + // ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` + // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' + ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` + // RoutingWeight - The routing weight. + RoutingWeight *int32 `json:"routingWeight,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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding. + ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` +} + +// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'Static', 'Dynamic' + 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"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vnglcr) + if err != nil { + return err + } + page.vnglcr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage { + return VirtualNetworkGatewayListConnectionsResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vnglr) + if err != nil { + return err + } + page.vnglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage { + return VirtualNetworkGatewayListResultPage{fn: getNextPage} +} + +// 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' + GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` + // VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased' + 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewaysResetFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vnlr) + if err != nil { + return err + } + page.vnlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage { + return VirtualNetworkListResultPage{fn: getNextPage} +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vnlur) + if err != nil { + return err + } + page.vnlur = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage { + return VirtualNetworkListUsageResultPage{fn: getNextPage} +} + +// 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"` + // 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.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 "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 +} + +// 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.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vnplr) + if err != nil { + return err + } + page.vnplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage { + return VirtualNetworkPeeringListResultPage{fn: getNextPage} +} + +// 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 remote virtual network address space. + RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` + // PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' + PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkPeeringsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworksCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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.NextLink == nil || len(to.String(vntlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vntlr) + if err != nil { + return err + } + page.vntlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage { + return VirtualNetworkTapListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkTapsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(vrlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vrlr) + if err != nil { + return err + } + page.vrlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage { + return VirtualRouterListResultPage{fn: getNextPage} +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(vrplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.vrplr) + if err != nil { + return err + } + page.vrplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage { + return VirtualRouterPeeringListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualRouterPeeringsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualRoutersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Type - The type of the VirtualWAN. + Type *string `json:"type,omitempty"` +} + +// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualWansCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'External', 'Native' + 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: 'EAPTLS', 'EAPMSCHAPv2' + 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) +} + +// 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"` + // 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"` + // 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"` +} + +// 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"` +} + +// 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: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + 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: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + 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: 'Amd64', 'X86' + ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` + // AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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 +} + +// 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"` + // 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: 'IKEv2', 'IKEv1' + 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VpnLinkConnections - List of all vpn site link connections to the gateway. + VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"` +} + +// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + 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 +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VpnGatewayScaleUnit - The scale unit for this vpn gateway. + VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` +} + +// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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 +} + +// 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"` +} + +// 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"` +} + +// 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"` + // 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"` +} + +// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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"` + // 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: 'IKEv2', 'IKEv1' + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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"` + // 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} + +// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnSitesConfigurationDownloadFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WatchersCheckConnectivityFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WebApplicationFirewallPoliciesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +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 { + 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(wafplr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.wafplr) + if err != nil { + return err + } + page.wafplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage { + return WebApplicationFirewallPolicyListResultPage{fn: getNextPage} +} + +// 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: 'Succeeded', 'Updating', 'Deleting', 'Failed' + 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"` +} diff --git a/services/network/mgmt/2019-11-01/network/natgateways.go b/services/network/mgmt/2019-11-01/network/natgateways.go new file mode 100644 index 000000000000..b704bad0afff --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/natgateways.go @@ -0,0 +1,583 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result NatGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) GetResponder(resp *http.Response) (result NatGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) ListResponder(resp *http.Response) (result NatGatewayListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/networkapi/interfaces.go b/services/network/mgmt/2019-11-01/network/networkapi/interfaces.go new file mode 100644 index 000000000000..c5246a2e326a --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/networkapi/interfaces.go @@ -0,0 +1,1123 @@ +package networkapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-11-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) + +// 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.AzureFirewall, 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) + +// 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) +} + +var _ BastionHostsClientAPI = (*network.BastionHostsClient)(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) + +// 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) + +// 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) +} + +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) + +// 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) + 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) + +// FirewallPolicyRuleGroupsClientAPI contains the set of methods on the FirewallPolicyRuleGroupsClient type. +type FirewallPolicyRuleGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string, parameters network.FirewallPolicyRuleGroup) (result network.FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleGroupName string) (result network.FirewallPolicyRuleGroup, err error) + List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result network.FirewallPolicyRuleGroupListResultIterator, err error) +} + +var _ FirewallPolicyRuleGroupsClientAPI = (*network.FirewallPolicyRuleGroupsClient)(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) + 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 { + 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) + +// 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) + 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) + 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) + +// 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) + +// 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) (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) +} + +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) + +// PrivateLinkServicesClientAPI contains the set of methods on the PrivateLinkServicesClient type. +type PrivateLinkServicesClientAPI interface { + CheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters network.CheckPrivateLinkServiceVisibilityRequest) (result network.PrivateLinkServiceVisibility, err error) + CheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters network.CheckPrivateLinkServiceVisibilityRequest) (result network.PrivateLinkServiceVisibility, 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) + +// 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) + 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) + 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) + +// 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) + +// 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) + +// 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) (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) + 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) + 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) + +// 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) + 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 { + 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) + UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters network.TagsObject) (result network.VpnGateway, err error) +} + +var _ VpnGatewaysClientAPI = (*network.VpnGatewaysClient)(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) +} + +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) + +// VpnLinkConnectionsClientAPI contains the set of methods on the VpnLinkConnectionsClient type. +type VpnLinkConnectionsClientAPI interface { + 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) +} + +var _ VpnLinkConnectionsClientAPI = (*network.VpnLinkConnectionsClient)(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) + UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters network.TagsObject) (result network.P2SVpnGateway, 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) + +// 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/2019-11-01/network/operations.go b/services/network/mgmt/2019-11-01/network/operations.go new file mode 100644 index 000000000000..29dd44965f0c --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/operations.go @@ -0,0 +1,148 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the 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 +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.operationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "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/2019-11-01/network/p2svpngateways.go b/services/network/mgmt/2019-11-01/network/p2svpngateways.go new file mode 100644 index 000000000000..cbb4ee7b0f36 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/p2svpngateways.go @@ -0,0 +1,898 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result P2SVpnGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) GetResponder(resp *http.Response) (result P2SVpnGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) ListResponder(resp *http.Response) (result ListP2SVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListP2SVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 P2SVpnGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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, gatewayName, p2SVpnGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "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.P2sVpnGatewaysClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", resp, "Failure responding to request") + } + + 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 = "2019-11-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) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/packetcaptures.go b/services/network/mgmt/2019-11-01/network/packetcaptures.go new file mode 100644 index 000000000000..f336c33bc7f0 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/packetcaptures.go @@ -0,0 +1,525 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) CreateResponder(resp *http.Response) (result PacketCaptureResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) GetResponder(resp *http.Response) (result PacketCaptureResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PacketCapturesClient) ListResponder(resp *http.Response) (result PacketCaptureListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/network/mgmt/2019-11-01/network/peerexpressroutecircuitconnections.go b/services/network/mgmt/2019-11-01/network/peerexpressroutecircuitconnections.go new file mode 100644 index 000000000000..d50420ac397e --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/peerexpressroutecircuitconnections.go @@ -0,0 +1,242 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PeerExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result PeerExpressRouteCircuitConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PeerExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result PeerExpressRouteCircuitConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/privateendpoints.go b/services/network/mgmt/2019-11-01/network/privateendpoints.go new file mode 100644 index 000000000000..5194458a7949 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/privateendpoints.go @@ -0,0 +1,504 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpoint, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) GetResponder(resp *http.Response) (result PrivateEndpoint, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) ListResponder(resp *http.Response) (result PrivateEndpointListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client PrivateEndpointsClient) ListBySubscriptionResponder(resp *http.Response) (result PrivateEndpointListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/privatelinkservices.go b/services/network/mgmt/2019-11-01/network/privatelinkservices.go new file mode 100644 index 000000000000..48bcca9230c3 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/privatelinkservices.go @@ -0,0 +1,1255 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 PrivateLinkServiceVisibility, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.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 + } + + resp, err := client.CheckPrivateLinkServiceVisibilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", resp, "Failure sending request") + return + } + + result, err = client.CheckPrivateLinkServiceVisibilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", resp, "Failure responding to request") + } + + 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 = "2019-11-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) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + 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 PrivateLinkServiceVisibility, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.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 + } + + resp, err := client.CheckPrivateLinkServiceVisibilityByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", resp, "Failure responding to request") + } + + 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 = "2019-11-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) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateLinkService, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) GetResponder(resp *http.Response) (result PrivateLinkService, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListResponder(resp *http.Response) (result PrivateLinkServiceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListBySubscriptionResponder(resp *http.Response) (result PrivateLinkServiceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/profiles.go b/services/network/mgmt/2019-11-01/network/profiles.go new file mode 100644 index 000000000000..86318aee2d7e --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/profiles.go @@ -0,0 +1,583 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result Profile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProfilesClient) ListResponder(resp *http.Response) (result ProfileListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/publicipaddresses.go b/services/network/mgmt/2019-11-01/network/publicipaddresses.go new file mode 100644 index 000000000000..b1408c2ea97a --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/publicipaddresses.go @@ -0,0 +1,923 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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}}}, + }}, + }}}}}); 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPAddress, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified public IP address. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPAddressName - the name of the subnet. +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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified public IP address in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// publicIPAddressName - the name of the subnet. +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) GetResponder(resp *http.Response) (result PublicIPAddress, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 +} + +// 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/publicipprefixes.go b/services/network/mgmt/2019-11-01/network/publicipprefixes.go new file mode 100644 index 000000000000..f12470577dae --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/publicipprefixes.go @@ -0,0 +1,584 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPPrefix, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) GetResponder(resp *http.Response) (result PublicIPPrefix, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PublicIPPrefixesClient) ListResponder(resp *http.Response) (result PublicIPPrefixListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/resourcenavigationlinks.go b/services/network/mgmt/2019-11-01/network/resourcenavigationlinks.go new file mode 100644 index 000000000000..3a4ea85d925a --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/resourcenavigationlinks.go @@ -0,0 +1,122 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ResourceNavigationLinksClient) ListResponder(resp *http.Response) (result ResourceNavigationLinksListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/routefilterrules.go b/services/network/mgmt/2019-11-01/network/routefilterrules.go new file mode 100644 index 000000000000..c9d91516795d --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/routefilterrules.go @@ -0,0 +1,408 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RouteFilterRulesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilterRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RouteFilterRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RouteFilterRulesClient) GetResponder(resp *http.Response) (result RouteFilterRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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/2019-11-01/network/routefilters.go b/services/network/mgmt/2019-11-01/network/routefilters.go new file mode 100644 index 000000000000..ef77ae47f280 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/routefilters.go @@ -0,0 +1,583 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilter, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) GetResponder(resp *http.Response) (result RouteFilter, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) ListResponder(resp *http.Response) (result RouteFilterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client RouteFiltersClient) ListByResourceGroupResponder(resp *http.Response) (result RouteFilterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/routes.go b/services/network/mgmt/2019-11-01/network/routes.go new file mode 100644 index 000000000000..74f1e8158d46 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/routes.go @@ -0,0 +1,397 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RoutesClient) CreateOrUpdateResponder(resp *http.Response) (result Route, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RoutesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RoutesClient) GetResponder(resp *http.Response) (result Route, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RoutesClient) ListResponder(resp *http.Response) (result RouteListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/routetables.go b/services/network/mgmt/2019-11-01/network/routetables.go new file mode 100644 index 000000000000..455164a734a4 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/routetables.go @@ -0,0 +1,583 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteTable, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) GetResponder(resp *http.Response) (result RouteTable, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RouteTablesClient) ListResponder(resp *http.Response) (result RouteTableListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/securitygroups.go b/services/network/mgmt/2019-11-01/network/securitygroups.go new file mode 100644 index 000000000000..2b28843eb905 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/securitygroups.go @@ -0,0 +1,583 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) GetResponder(resp *http.Response) (result SecurityGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SecurityGroupsClient) ListResponder(resp *http.Response) (result SecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/securityrules.go b/services/network/mgmt/2019-11-01/network/securityrules.go new file mode 100644 index 000000000000..8cda3815127c --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/securityrules.go @@ -0,0 +1,397 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SecurityRulesClient) CreateOrUpdateResponder(resp *http.Response) (result SecurityRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SecurityRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SecurityRulesClient) GetResponder(resp *http.Response) (result SecurityRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SecurityRulesClient) ListResponder(resp *http.Response) (result SecurityRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/serviceassociationlinks.go b/services/network/mgmt/2019-11-01/network/serviceassociationlinks.go new file mode 100644 index 000000000000..b6446c0e86b0 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/serviceassociationlinks.go @@ -0,0 +1,122 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceAssociationLinksClient) ListResponder(resp *http.Response) (result ServiceAssociationLinksListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/serviceendpointpolicies.go b/services/network/mgmt/2019-11-01/network/serviceendpointpolicies.go new file mode 100644 index 000000000000..58c383cff0dc --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/serviceendpointpolicies.go @@ -0,0 +1,584 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceEndpointPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) GetResponder(resp *http.Response) (result ServiceEndpointPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) ListResponder(resp *http.Response) (result ServiceEndpointPolicyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPoliciesClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceEndpointPolicyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/serviceendpointpolicydefinitions.go b/services/network/mgmt/2019-11-01/network/serviceendpointpolicydefinitions.go new file mode 100644 index 000000000000..27f6a96e36f9 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/serviceendpointpolicydefinitions.go @@ -0,0 +1,399 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceEndpointPolicyDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPolicyDefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPolicyDefinitionsClient) GetResponder(resp *http.Response) (result ServiceEndpointPolicyDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceEndpointPolicyDefinitionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/servicetags.go b/services/network/mgmt/2019-11-01/network/servicetags.go new file mode 100644 index 000000000000..1c1b9f4d817c --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/servicetags.go @@ -0,0 +1,119 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceTagsClient) ListResponder(resp *http.Response) (result ServiceTagsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/subnets.go b/services/network/mgmt/2019-11-01/network/subnets.go new file mode 100644 index 000000000000..e4e526460c53 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/subnets.go @@ -0,0 +1,565 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SubnetsClient) CreateOrUpdateResponder(resp *http.Response) (result Subnet, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SubnetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SubnetsClient) GetResponder(resp *http.Response) (result Subnet, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SubnetsClient) ListResponder(resp *http.Response) (result SubnetListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/network/mgmt/2019-11-01/network/usages.go b/services/network/mgmt/2019-11-01/network/usages.go new file mode 100644 index 000000000000..f9a996255ab0 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/usages.go @@ -0,0 +1,162 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client UsagesClient) ListResponder(resp *http.Response) (result UsagesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/version.go b/services/network/mgmt/2019-11-01/network/version.go new file mode 100644 index 000000000000..9d428a027dcb --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/version.go @@ -0,0 +1,30 @@ +package network + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " network/2019-11-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/2019-11-01/network/virtualhubroutetablev2s.go b/services/network/mgmt/2019-11-01/network/virtualhubroutetablev2s.go new file mode 100644 index 000000000000..5cf7a7837d70 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualhubroutetablev2s.go @@ -0,0 +1,399 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualHubRouteTableV2, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) GetResponder(resp *http.Response) (result VirtualHubRouteTableV2, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) ListResponder(resp *http.Response) (result ListVirtualHubRouteTableV2sResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/virtualhubs.go b/services/network/mgmt/2019-11-01/network/virtualhubs.go new file mode 100644 index 000000000000..a3a1b97ee648 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualhubs.go @@ -0,0 +1,579 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + 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", result.Response(), "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 = "2019-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + virtualHubParameters.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}", 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualHub, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) GetResponder(resp *http.Response) (result VirtualHub, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) ListResponder(resp *http.Response) (result ListVirtualHubsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualHubsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualHubsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-11-01/network/virtualnetworkgatewayconnections.go new file mode 100644 index 000000000000..b9cf00687fb6 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualnetworkgatewayconnections.go @@ -0,0 +1,909 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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: nil}}}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, 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: 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) GetResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayConnectionsClient) ListResponder(resp *http.Response) (result VirtualNetworkGatewayConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/virtualnetworkgateways.go b/services/network/mgmt/2019-11-01/network/virtualnetworkgateways.go new file mode 100644 index 000000000000..a30f2820c590 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualnetworkgateways.go @@ -0,0 +1,1877 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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: 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (result VirtualNetworkGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) ListResponder(resp *http.Response) (result VirtualNetworkGatewayListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/virtualnetworkpeerings.go b/services/network/mgmt/2019-11-01/network/virtualnetworkpeerings.go new file mode 100644 index 000000000000..a89798adbcae --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualnetworkpeerings.go @@ -0,0 +1,399 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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. +func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering) (result VirtualNetworkPeeringsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters) + 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", result.Response(), "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) (*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 = "2019-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkPeering, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkPeeringsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkPeeringsClient) GetResponder(resp *http.Response) (result VirtualNetworkPeering, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualNetworkPeeringsClient) ListResponder(resp *http.Response) (result VirtualNetworkPeeringListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/virtualnetworks.go b/services/network/mgmt/2019-11-01/network/virtualnetworks.go new file mode 100644 index 000000000000..33fe77ca6990 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualnetworks.go @@ -0,0 +1,787 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetwork, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result VirtualNetwork, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) ListResponder(resp *http.Response) (result VirtualNetworkListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/virtualnetworktaps.go b/services/network/mgmt/2019-11-01/network/virtualnetworktaps.go new file mode 100644 index 000000000000..46aa3f713485 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualnetworktaps.go @@ -0,0 +1,612 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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.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}}}, + }}, + }}, + }}, + }}, + }}, + }}}}}); 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkTap, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) GetResponder(resp *http.Response) (result VirtualNetworkTap, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualNetworkTapsClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualNetworkTapListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/virtualrouterpeerings.go b/services/network/mgmt/2019-11-01/network/virtualrouterpeerings.go new file mode 100644 index 000000000000..9498ce11bbfe --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualrouterpeerings.go @@ -0,0 +1,411 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualRouterPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualRouterPeering, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualRouterPeeringsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualRouterPeeringsClient) GetResponder(resp *http.Response) (result VirtualRouterPeering, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualRouterPeeringsClient) ListResponder(resp *http.Response) (result VirtualRouterPeeringListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/virtualrouters.go b/services/network/mgmt/2019-11-01/network/virtualrouters.go new file mode 100644 index 000000000000..95962cf782b1 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualrouters.go @@ -0,0 +1,515 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualRouter, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) GetResponder(resp *http.Response) (result VirtualRouter, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) ListResponder(resp *http.Response) (result VirtualRouterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualRoutersClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualRouterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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/2019-11-01/network/virtualwans.go b/services/network/mgmt/2019-11-01/network/virtualwans.go new file mode 100644 index 000000000000..6ce44778fd91 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/virtualwans.go @@ -0,0 +1,579 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualWAN, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) GetResponder(resp *http.Response) (result VirtualWAN, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) ListResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VirtualWansClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualWANsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/vpnconnections.go b/services/network/mgmt/2019-11-01/network/vpnconnections.go new file mode 100644 index 000000000000..fe6cbf7cc3cb --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpnconnections.go @@ -0,0 +1,398 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnConnectionsClient) GetResponder(resp *http.Response) (result VpnConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} diff --git a/services/network/mgmt/2019-11-01/network/vpngateways.go b/services/network/mgmt/2019-11-01/network/vpngateways.go new file mode 100644 index 000000000000..b7f9c369a7e3 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpngateways.go @@ -0,0 +1,656 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) GetResponder(resp *http.Response) (result VpnGateway, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) ListResponder(resp *http.Response) (result ListVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnGatewaysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 VpnGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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, gatewayName, vpnGatewayParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "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.VpnGatewaysClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", resp, "Failure responding to request") + } + + 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 = "2019-11-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) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/vpnlinkconnections.go b/services/network/mgmt/2019-11-01/network/vpnlinkconnections.go new file mode 100644 index 000000000000..37da10e7c818 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpnlinkconnections.go @@ -0,0 +1,160 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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)} +} + +// ListByVpnConnection retrieves all vpn site link connections for a particular virtual wan vpn gateway 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 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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 +} diff --git a/services/network/mgmt/2019-11-01/network/vpnserverconfigurations.go b/services/network/mgmt/2019-11-01/network/vpnserverconfigurations.go new file mode 100644 index 000000000000..042adbf34818 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpnserverconfigurations.go @@ -0,0 +1,581 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnServerConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) GetResponder(resp *http.Response) (result VpnServerConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) ListResponder(resp *http.Response) (result ListVpnServerConfigurationsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnServerConfigurationsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go b/services/network/mgmt/2019-11-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go new file mode 100644 index 000000000000..1bb0e570048b --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go @@ -0,0 +1,121 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListResponder(resp *http.Response) (result VpnServerConfigurationsResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/vpnsitelinkconnections.go b/services/network/mgmt/2019-11-01/network/vpnsitelinkconnections.go new file mode 100644 index 000000000000..1d1f895132de --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpnsitelinkconnections.go @@ -0,0 +1,124 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSiteLinkConnectionsClient) GetResponder(resp *http.Response) (result VpnSiteLinkConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/vpnsitelinks.go b/services/network/mgmt/2019-11-01/network/vpnsitelinks.go new file mode 100644 index 000000000000..9cf6b66d1a54 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpnsitelinks.go @@ -0,0 +1,236 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSiteLinksClient) GetResponder(resp *http.Response) (result VpnSiteLink, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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/2019-11-01/network/vpnsites.go b/services/network/mgmt/2019-11-01/network/vpnsites.go new file mode 100644 index 000000000000..63a70b2d90a6 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpnsites.go @@ -0,0 +1,579 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) CreateOrUpdateResponder(resp *http.Response) (result VpnSite, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) GetResponder(resp *http.Response) (result VpnSite, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) ListResponder(resp *http.Response) (result ListVpnSitesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnSitesClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnSitesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/vpnsitesconfiguration.go b/services/network/mgmt/2019-11-01/network/vpnsitesconfiguration.go new file mode 100644 index 000000000000..f4a0f23b808e --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/vpnsitesconfiguration.go @@ -0,0 +1,129 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/network/mgmt/2019-11-01/network/watchers.go b/services/network/mgmt/2019-11-01/network/watchers.go new file mode 100644 index 000000000000..ea288fe8adb8 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/watchers.go @@ -0,0 +1,1551 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.Response() != nil { + sc = result.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.Destination", Name: validation.Null, Rule: true, 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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WatchersClient) CreateOrUpdateResponder(resp *http.Response) (result Watcher, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WatchersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetResponder(resp *http.Response) (result Watcher, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WatchersClient) ListResponder(resp *http.Response) (result WatcherListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/network/mgmt/2019-11-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-11-01/network/webapplicationfirewallpolicies.go new file mode 100644 index 000000000000..2399a2a74be9 --- /dev/null +++ b/services/network/mgmt/2019-11-01/network/webapplicationfirewallpolicies.go @@ -0,0 +1,532 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// 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.InclusiveMaximum, Rule: int64(128), Chain: nil}, + {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, + }}, + {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result WebApplicationFirewallPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes 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.Response() != nil { + sc = result.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", result.Response(), "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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) GetResponder(resp *http.Response) (result WebApplicationFirewallPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all of the 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 +} + +// 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 = "2019-11-01" + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) ListResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client 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 +} + +// 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 = "2019-11-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + 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/notificationhubs/mgmt/2014-09-01/notificationhubs/client.go b/services/notificationhubs/mgmt/2014-09-01/notificationhubs/client.go index 8d5d74223dc8..98fb891fc50e 100644 --- a/services/notificationhubs/mgmt/2014-09-01/notificationhubs/client.go +++ b/services/notificationhubs/mgmt/2014-09-01/notificationhubs/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/notificationhubs/mgmt/2014-09-01/notificationhubs/namespaces.go b/services/notificationhubs/mgmt/2014-09-01/notificationhubs/namespaces.go index 73eb001739b0..60a0384962b4 100644 --- a/services/notificationhubs/mgmt/2014-09-01/notificationhubs/namespaces.go +++ b/services/notificationhubs/mgmt/2014-09-01/notificationhubs/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/notificationhubs/mgmt/2014-09-01/notificationhubs/notificationhubs.go b/services/notificationhubs/mgmt/2014-09-01/notificationhubs/notificationhubs.go index cef3ffd8eeb2..a6f3068bc3e7 100644 --- a/services/notificationhubs/mgmt/2014-09-01/notificationhubs/notificationhubs.go +++ b/services/notificationhubs/mgmt/2014-09-01/notificationhubs/notificationhubs.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/notificationhubs/mgmt/2014-09-01/notificationhubs/notificationhubsapi/interfaces.go b/services/notificationhubs/mgmt/2014-09-01/notificationhubs/notificationhubsapi/interfaces.go index b78e8c6c3557..837165ad6ef7 100644 --- a/services/notificationhubs/mgmt/2014-09-01/notificationhubs/notificationhubsapi/interfaces.go +++ b/services/notificationhubs/mgmt/2014-09-01/notificationhubs/notificationhubsapi/interfaces.go @@ -34,8 +34,11 @@ type NamespacesClientAPI interface { GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result notificationhubs.SharedAccessAuthorizationRuleResource, err error) GetLongRunningOperationStatus(ctx context.Context, operationStatusLink string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string) (result notificationhubs.NamespaceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result notificationhubs.NamespaceListResultIterator, err error) ListAll(ctx context.Context) (result notificationhubs.NamespaceListResultPage, err error) + ListAllComplete(ctx context.Context) (result notificationhubs.NamespaceListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result notificationhubs.ResourceListKeys, err error) } @@ -52,7 +55,9 @@ type ClientAPI interface { GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result notificationhubs.SharedAccessAuthorizationRuleResource, err error) GetPnsCredentials(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.ResourceType, err error) List(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.ListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.ListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result notificationhubs.ResourceListKeys, err error) } diff --git a/services/notificationhubs/mgmt/2016-03-01/notificationhubs/client.go b/services/notificationhubs/mgmt/2016-03-01/notificationhubs/client.go index e7ac2a48c8a0..0103ebadceaa 100644 --- a/services/notificationhubs/mgmt/2016-03-01/notificationhubs/client.go +++ b/services/notificationhubs/mgmt/2016-03-01/notificationhubs/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/notificationhubs/mgmt/2016-03-01/notificationhubs/namespaces.go b/services/notificationhubs/mgmt/2016-03-01/notificationhubs/namespaces.go index ae48a36e26ac..f8d0df8a51dc 100644 --- a/services/notificationhubs/mgmt/2016-03-01/notificationhubs/namespaces.go +++ b/services/notificationhubs/mgmt/2016-03-01/notificationhubs/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/notificationhubs/mgmt/2016-03-01/notificationhubs/notificationhubs.go b/services/notificationhubs/mgmt/2016-03-01/notificationhubs/notificationhubs.go index cf01b99f06ff..d7668ad37d31 100644 --- a/services/notificationhubs/mgmt/2016-03-01/notificationhubs/notificationhubs.go +++ b/services/notificationhubs/mgmt/2016-03-01/notificationhubs/notificationhubs.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/notificationhubs/mgmt/2016-03-01/notificationhubs/notificationhubsapi/interfaces.go b/services/notificationhubs/mgmt/2016-03-01/notificationhubs/notificationhubsapi/interfaces.go index d21ef206d70f..a77d96beb6c5 100644 --- a/services/notificationhubs/mgmt/2016-03-01/notificationhubs/notificationhubsapi/interfaces.go +++ b/services/notificationhubs/mgmt/2016-03-01/notificationhubs/notificationhubsapi/interfaces.go @@ -33,8 +33,11 @@ type NamespacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.NamespaceResource, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result notificationhubs.SharedAccessAuthorizationRuleResource, err error) List(ctx context.Context, resourceGroupName string) (result notificationhubs.NamespaceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result notificationhubs.NamespaceListResultIterator, err error) ListAll(ctx context.Context) (result notificationhubs.NamespaceListResultPage, err error) + ListAllComplete(ctx context.Context) (result notificationhubs.NamespaceListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result notificationhubs.ResourceListKeys, err error) Patch(ctx context.Context, resourceGroupName string, namespaceName string, parameters notificationhubs.NamespacePatchParameters) (result notificationhubs.NamespaceResource, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters notificationhubs.PolicykeyResource) (result notificationhubs.ResourceListKeys, err error) @@ -53,7 +56,9 @@ type ClientAPI interface { GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result notificationhubs.SharedAccessAuthorizationRuleResource, err error) GetPnsCredentials(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.PnsCredentialsResource, err error) List(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.ListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.ListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result notificationhubs.ResourceListKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters notificationhubs.PolicykeyResource) (result notificationhubs.ResourceListKeys, err error) } diff --git a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/client.go b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/client.go index e6e99da73137..ff048d43de81 100644 --- a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/client.go +++ b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go index 933d03575753..830252c7ac2c 100644 --- a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go +++ b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go index d14f343ee4b3..a4a589b6776c 100644 --- a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go +++ b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubsapi/interfaces.go b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubsapi/interfaces.go index 6e5916732d97..baf0202ee304 100644 --- a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubsapi/interfaces.go +++ b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result notificationhubs.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result notificationhubs.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*notificationhubs.OperationsClient)(nil) @@ -40,8 +41,11 @@ type NamespacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.NamespaceResource, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result notificationhubs.SharedAccessAuthorizationRuleResource, err error) List(ctx context.Context, resourceGroupName string) (result notificationhubs.NamespaceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result notificationhubs.NamespaceListResultIterator, err error) ListAll(ctx context.Context) (result notificationhubs.NamespaceListResultPage, err error) + ListAllComplete(ctx context.Context) (result notificationhubs.NamespaceListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result notificationhubs.SharedAccessAuthorizationRuleListResult, err error) Patch(ctx context.Context, resourceGroupName string, namespaceName string, parameters notificationhubs.NamespacePatchParameters) (result notificationhubs.NamespaceResource, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters notificationhubs.PolicykeyResource) (result notificationhubs.ResourceListKeys, err error) @@ -61,7 +65,9 @@ type ClientAPI interface { GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result notificationhubs.SharedAccessAuthorizationRuleResource, err error) GetPnsCredentials(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.PnsCredentialsResource, err error) List(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.ListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result notificationhubs.ListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result notificationhubs.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result notificationhubs.ResourceListKeys, err error) Patch(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, parameters *notificationhubs.PatchParameters) (result notificationhubs.ResourceType, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters notificationhubs.PolicykeyResource) (result notificationhubs.ResourceListKeys, err error) diff --git a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go index f758aa5c52ce..ce557f600ce1 100644 --- a/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go +++ b/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/client.go b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/client.go index 187545849d14..26f2c4b076de 100644 --- a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/client.go +++ b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, purgeID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, purgeID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, purgeID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/operationalinsightsapi/interfaces.go b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/operationalinsightsapi/interfaces.go index 7db515a6cbbd..d9254ced9ae5 100644 --- a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/operationalinsightsapi/interfaces.go +++ b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/operationalinsightsapi/interfaces.go @@ -29,6 +29,7 @@ type StorageInsightsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, storageInsightName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, storageInsightName string) (result operationalinsights.StorageInsight, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result operationalinsights.StorageInsightListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result operationalinsights.StorageInsightListResultIterator, err error) } var _ StorageInsightsClientAPI = (*operationalinsights.StorageInsightsClient)(nil) diff --git a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/operations.go b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/operations.go index 12cd7d5a7aca..2b9f300322a0 100644 --- a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/operations.go +++ b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, purgeID string) OperationsClient return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, purgeID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, purgeID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, purgeID)} } diff --git a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/savedsearches.go b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/savedsearches.go index 58c3d761c746..71c46ec51244 100644 --- a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/savedsearches.go +++ b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/savedsearches.go @@ -36,7 +36,8 @@ func NewSavedSearchesClient(subscriptionID string, purgeID string) SavedSearches return NewSavedSearchesClientWithBaseURI(DefaultBaseURI, subscriptionID, purgeID) } -// NewSavedSearchesClientWithBaseURI creates an instance of the SavedSearchesClient client. +// NewSavedSearchesClientWithBaseURI creates an instance of the SavedSearchesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSavedSearchesClientWithBaseURI(baseURI string, subscriptionID string, purgeID string) SavedSearchesClient { return SavedSearchesClient{NewWithBaseURI(baseURI, subscriptionID, purgeID)} } diff --git a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/storageinsights.go b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/storageinsights.go index 064769913a81..8bb3ff833624 100644 --- a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/storageinsights.go +++ b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/storageinsights.go @@ -36,7 +36,8 @@ func NewStorageInsightsClient(subscriptionID string, purgeID string) StorageInsi return NewStorageInsightsClientWithBaseURI(DefaultBaseURI, subscriptionID, purgeID) } -// NewStorageInsightsClientWithBaseURI creates an instance of the StorageInsightsClient client. +// NewStorageInsightsClientWithBaseURI creates an instance of the StorageInsightsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStorageInsightsClientWithBaseURI(baseURI string, subscriptionID string, purgeID string) StorageInsightsClient { return StorageInsightsClient{NewWithBaseURI(baseURI, subscriptionID, purgeID)} } diff --git a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/workspaces.go b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/workspaces.go index 26f9a8aa6db7..78e6919aa33a 100644 --- a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/workspaces.go +++ b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/workspaces.go @@ -36,7 +36,8 @@ func NewWorkspacesClient(subscriptionID string, purgeID string) WorkspacesClient return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID, purgeID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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, purgeID string) WorkspacesClient { return WorkspacesClient{NewWithBaseURI(baseURI, subscriptionID, purgeID)} } diff --git a/services/operationalinsights/v1/operationalinsights/client.go b/services/operationalinsights/v1/operationalinsights/client.go index 54772e13d48d..1594420e9936 100644 --- a/services/operationalinsights/v1/operationalinsights/client.go +++ b/services/operationalinsights/v1/operationalinsights/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/operationalinsights/v1/operationalinsights/query.go b/services/operationalinsights/v1/operationalinsights/query.go index 6e999399d694..a0e019a49739 100644 --- a/services/operationalinsights/v1/operationalinsights/query.go +++ b/services/operationalinsights/v1/operationalinsights/query.go @@ -36,7 +36,8 @@ func NewQueryClient() QueryClient { return NewQueryClientWithBaseURI(DefaultBaseURI) } -// NewQueryClientWithBaseURI creates an instance of the QueryClient client. +// NewQueryClientWithBaseURI creates an instance of the QueryClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryClientWithBaseURI(baseURI string) QueryClient { return QueryClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/client.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/client.go index 9a2f81f6139d..c9ee54351ea7 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/client.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/operations.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/operations.go index fe11e03a34d9..3f278af5b278 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/operations.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go index 28c2d9196d15..a611f5be3997 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go @@ -37,7 +37,8 @@ func NewPolicyEventsClient() PolicyEventsClient { return NewPolicyEventsClientWithBaseURI(DefaultBaseURI) } -// NewPolicyEventsClientWithBaseURI creates an instance of the PolicyEventsClient client. +// NewPolicyEventsClientWithBaseURI creates an instance of the PolicyEventsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyEventsClientWithBaseURI(baseURI string) PolicyEventsClient { return PolicyEventsClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go index 2f8d0fa20e30..bf4260a73c13 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go @@ -37,7 +37,8 @@ func NewPolicyStatesClient() PolicyStatesClient { return NewPolicyStatesClientWithBaseURI(DefaultBaseURI) } -// NewPolicyStatesClientWithBaseURI creates an instance of the PolicyStatesClient client. +// NewPolicyStatesClientWithBaseURI creates an instance of the PolicyStatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyStatesClientWithBaseURI(baseURI string) PolicyStatesClient { return PolicyStatesClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/client.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/client.go index 4687a8ef8675..dba65fe987a4 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/client.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/operations.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/operations.go index 3b7784383db2..bbc2b760329c 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/operations.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policyevents.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policyevents.go index 28c2d9196d15..a611f5be3997 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policyevents.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policyevents.go @@ -37,7 +37,8 @@ func NewPolicyEventsClient() PolicyEventsClient { return NewPolicyEventsClientWithBaseURI(DefaultBaseURI) } -// NewPolicyEventsClientWithBaseURI creates an instance of the PolicyEventsClient client. +// NewPolicyEventsClientWithBaseURI creates an instance of the PolicyEventsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyEventsClientWithBaseURI(baseURI string) PolicyEventsClient { return PolicyEventsClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policyinsightsapi/interfaces.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policyinsightsapi/interfaces.go index 33bcb444986b..185d4bdff7d2 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policyinsightsapi/interfaces.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policyinsightsapi/interfaces.go @@ -26,9 +26,13 @@ import ( // PolicyTrackedResourcesClientAPI contains the set of methods on the PolicyTrackedResourcesClient type. type PolicyTrackedResourcesClientAPI interface { ListQueryResultsForManagementGroup(ctx context.Context, managementGroupName string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsPage, err error) + ListQueryResultsForManagementGroupComplete(ctx context.Context, managementGroupName string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsIterator, err error) ListQueryResultsForResource(ctx context.Context, resourceID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsPage, err error) + ListQueryResultsForResourceComplete(ctx context.Context, resourceID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsIterator, err error) ListQueryResultsForResourceGroup(ctx context.Context, resourceGroupName string, subscriptionID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsPage, err error) + ListQueryResultsForResourceGroupComplete(ctx context.Context, resourceGroupName string, subscriptionID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsIterator, err error) ListQueryResultsForSubscription(ctx context.Context, subscriptionID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsPage, err error) + ListQueryResultsForSubscriptionComplete(ctx context.Context, subscriptionID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsIterator, err error) } var _ PolicyTrackedResourcesClientAPI = (*policyinsights.PolicyTrackedResourcesClient)(nil) @@ -52,13 +56,21 @@ type RemediationsClientAPI interface { GetAtResourceGroup(ctx context.Context, subscriptionID string, resourceGroupName string, remediationName string) (result policyinsights.Remediation, err error) GetAtSubscription(ctx context.Context, subscriptionID string, remediationName string) (result policyinsights.Remediation, err error) ListDeploymentsAtManagementGroup(ctx context.Context, managementGroupID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultPage, err error) + ListDeploymentsAtManagementGroupComplete(ctx context.Context, managementGroupID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultIterator, err error) ListDeploymentsAtResource(ctx context.Context, resourceID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultPage, err error) + ListDeploymentsAtResourceComplete(ctx context.Context, resourceID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultIterator, err error) ListDeploymentsAtResourceGroup(ctx context.Context, subscriptionID string, resourceGroupName string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultPage, err error) + ListDeploymentsAtResourceGroupComplete(ctx context.Context, subscriptionID string, resourceGroupName string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultIterator, err error) ListDeploymentsAtSubscription(ctx context.Context, subscriptionID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultPage, err error) + ListDeploymentsAtSubscriptionComplete(ctx context.Context, subscriptionID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultIterator, err error) ListForManagementGroup(ctx context.Context, managementGroupID string, top *int32, filter string) (result policyinsights.RemediationListResultPage, err error) + ListForManagementGroupComplete(ctx context.Context, managementGroupID string, top *int32, filter string) (result policyinsights.RemediationListResultIterator, err error) ListForResource(ctx context.Context, resourceID string, top *int32, filter string) (result policyinsights.RemediationListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceID string, top *int32, filter string) (result policyinsights.RemediationListResultIterator, err error) ListForResourceGroup(ctx context.Context, subscriptionID string, resourceGroupName string, top *int32, filter string) (result policyinsights.RemediationListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, subscriptionID string, resourceGroupName string, top *int32, filter string) (result policyinsights.RemediationListResultIterator, err error) ListForSubscription(ctx context.Context, subscriptionID string, top *int32, filter string) (result policyinsights.RemediationListResultPage, err error) + ListForSubscriptionComplete(ctx context.Context, subscriptionID string, top *int32, filter string) (result policyinsights.RemediationListResultIterator, err error) } var _ RemediationsClientAPI = (*policyinsights.RemediationsClient)(nil) @@ -111,6 +123,7 @@ var _ OperationsClientAPI = (*policyinsights.OperationsClient)(nil) type PolicyMetadataClientAPI interface { GetResource(ctx context.Context, resourceName string) (result policyinsights.PolicyMetadata, err error) List(ctx context.Context, top *int32) (result policyinsights.PolicyMetadataCollectionPage, err error) + ListComplete(ctx context.Context, top *int32) (result policyinsights.PolicyMetadataCollectionIterator, err error) } var _ PolicyMetadataClientAPI = (*policyinsights.PolicyMetadataClient)(nil) diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policymetadata.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policymetadata.go index a8cbc80533f5..a31615f5036e 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policymetadata.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policymetadata.go @@ -36,7 +36,8 @@ func NewPolicyMetadataClient() PolicyMetadataClient { return NewPolicyMetadataClientWithBaseURI(DefaultBaseURI) } -// NewPolicyMetadataClientWithBaseURI creates an instance of the PolicyMetadataClient client. +// NewPolicyMetadataClientWithBaseURI creates an instance of the PolicyMetadataClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyMetadataClientWithBaseURI(baseURI string) PolicyMetadataClient { return PolicyMetadataClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policystates.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policystates.go index 8c51cec8ba9e..56b16a3d0ce6 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policystates.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policystates.go @@ -37,7 +37,8 @@ func NewPolicyStatesClient() PolicyStatesClient { return NewPolicyStatesClientWithBaseURI(DefaultBaseURI) } -// NewPolicyStatesClientWithBaseURI creates an instance of the PolicyStatesClient client. +// NewPolicyStatesClientWithBaseURI creates an instance of the PolicyStatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyStatesClientWithBaseURI(baseURI string) PolicyStatesClient { return PolicyStatesClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policytrackedresources.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policytrackedresources.go index dd5a4ecd9183..558c1215e4f6 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policytrackedresources.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policytrackedresources.go @@ -36,7 +36,9 @@ func NewPolicyTrackedResourcesClient() PolicyTrackedResourcesClient { return NewPolicyTrackedResourcesClientWithBaseURI(DefaultBaseURI) } -// NewPolicyTrackedResourcesClientWithBaseURI creates an instance of the PolicyTrackedResourcesClient client. +// NewPolicyTrackedResourcesClientWithBaseURI creates an instance of the PolicyTrackedResourcesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewPolicyTrackedResourcesClientWithBaseURI(baseURI string) PolicyTrackedResourcesClient { return PolicyTrackedResourcesClient{NewWithBaseURI(baseURI)} } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/remediations.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/remediations.go index da8443891771..36c061862f28 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/remediations.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/remediations.go @@ -36,7 +36,8 @@ func NewRemediationsClient() RemediationsClient { return NewRemediationsClientWithBaseURI(DefaultBaseURI) } -// NewRemediationsClientWithBaseURI creates an instance of the RemediationsClient client. +// NewRemediationsClientWithBaseURI creates an instance of the RemediationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRemediationsClientWithBaseURI(baseURI string) RemediationsClient { return RemediationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go b/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go index 5d4fb9fecb7e..d8547962e123 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go @@ -38,7 +38,9 @@ func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailability return NewCheckNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client. +// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckNameAvailabilityClient { return CheckNameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/client.go b/services/postgresql/mgmt/2017-12-01/postgresql/client.go index 13f6e3a49759..912aea7c3847 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/client.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go b/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go index 0fc70f44c4e6..d26db410591e 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go @@ -37,7 +37,8 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/databases.go b/services/postgresql/mgmt/2017-12-01/postgresql/databases.go index 942f7ee8c6d7..5ad5a712f1ed 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/databases.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/databases.go @@ -37,7 +37,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go b/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go index 4a831dbb5eda..4ddf2d56475d 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go @@ -38,7 +38,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go b/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go index fe3b1c7206ed..eff2e66238ad 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go @@ -38,7 +38,8 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string) LocationBasedP } // NewLocationBasedPerformanceTierClientWithBaseURI creates an instance of the LocationBasedPerformanceTierClient -// 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 NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedPerformanceTierClient { return LocationBasedPerformanceTierClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go b/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go index 1b45274e0d84..6a7ec48271c2 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go @@ -37,7 +37,8 @@ func NewLogFilesClient(subscriptionID string) LogFilesClient { return NewLogFilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client. +// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFilesClient { return LogFilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/operations.go b/services/postgresql/mgmt/2017-12-01/postgresql/operations.go index 368d0b13fedb..42ef28087d79 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/operations.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/postgresqlapi/interfaces.go b/services/postgresql/mgmt/2017-12-01/postgresql/postgresqlapi/interfaces.go index 21daa590e39f..fcc627d78cd6 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/postgresqlapi/interfaces.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/postgresqlapi/interfaces.go @@ -58,6 +58,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result postgresql.VirtualNetworkRulesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result postgresql.VirtualNetworkRule, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result postgresql.VirtualNetworkRuleListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result postgresql.VirtualNetworkRuleListResultIterator, err error) } var _ VirtualNetworkRulesClientAPI = (*postgresql.VirtualNetworkRulesClient)(nil) diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/replicas.go b/services/postgresql/mgmt/2017-12-01/postgresql/replicas.go index c0606334dda8..ad4f9288bd34 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/replicas.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/replicas.go @@ -37,7 +37,8 @@ func NewReplicasClient(subscriptionID string) ReplicasClient { return NewReplicasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client. +// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicasClientWithBaseURI(baseURI string, subscriptionID string) ReplicasClient { return ReplicasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/servers.go b/services/postgresql/mgmt/2017-12-01/postgresql/servers.go index 43f6cdd1e997..0ffcde562031 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/servers.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/servers.go @@ -38,7 +38,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go b/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go index f80c9e8009be..f6430498a368 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go @@ -37,7 +37,9 @@ func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityA return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client. +// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go b/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go index 584d19045f0b..8c11ce808b0f 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go @@ -38,7 +38,9 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/capacities.go b/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/capacities.go index f8662d290d1e..6cc9d1530f45 100644 --- a/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/capacities.go +++ b/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/capacities.go @@ -37,7 +37,8 @@ func NewCapacitiesClient(subscriptionID string) CapacitiesClient { return NewCapacitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCapacitiesClientWithBaseURI creates an instance of the CapacitiesClient client. +// NewCapacitiesClientWithBaseURI creates an instance of the CapacitiesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCapacitiesClientWithBaseURI(baseURI string, subscriptionID string) CapacitiesClient { return CapacitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/client.go b/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/client.go index 57a141493907..3f3bf218cbbd 100644 --- a/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/client.go +++ b/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/operations.go b/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/operations.go index c7e421388ea5..77fb8ac97801 100644 --- a/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/operations.go +++ b/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/powerbidedicatedapi/interfaces.go b/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/powerbidedicatedapi/interfaces.go index 228fb14e698a..ec473f637a0e 100644 --- a/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/powerbidedicatedapi/interfaces.go +++ b/services/powerbidedicated/mgmt/2017-10-01/powerbidedicated/powerbidedicatedapi/interfaces.go @@ -42,6 +42,7 @@ var _ CapacitiesClientAPI = (*powerbidedicated.CapacitiesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result powerbidedicated.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result powerbidedicated.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*powerbidedicated.OperationsClient)(nil) diff --git a/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/client.go b/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/client.go index 9e54b879833b..e89f1a66c2ef 100644 --- a/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/client.go +++ b/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspacecollections.go b/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspacecollections.go index 10453cae08de..bce53bc19200 100644 --- a/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspacecollections.go +++ b/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspacecollections.go @@ -37,7 +37,9 @@ func NewWorkspaceCollectionsClient(subscriptionID string) WorkspaceCollectionsCl return NewWorkspaceCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspaceCollectionsClientWithBaseURI creates an instance of the WorkspaceCollectionsClient client. +// NewWorkspaceCollectionsClientWithBaseURI creates an instance of the WorkspaceCollectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkspaceCollectionsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceCollectionsClient { return WorkspaceCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspaces.go b/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspaces.go index bbbd4f5f15e5..a371708ad25c 100644 --- a/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspaces.go +++ b/services/powerbiembedded/mgmt/2016-01-29/powerbiembedded/workspaces.go @@ -35,7 +35,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } diff --git a/services/preview/addons/mgmt/2017-05-15/addons/canonicalsupportplantypes.go b/services/preview/addons/mgmt/2017-05-15/addons/canonicalsupportplantypes.go index 6da410f71531..1a072e9df6fd 100644 --- a/services/preview/addons/mgmt/2017-05-15/addons/canonicalsupportplantypes.go +++ b/services/preview/addons/mgmt/2017-05-15/addons/canonicalsupportplantypes.go @@ -35,7 +35,9 @@ func NewCanonicalSupportPlanTypesClient(subscriptionID string) CanonicalSupportP return NewCanonicalSupportPlanTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCanonicalSupportPlanTypesClientWithBaseURI creates an instance of the CanonicalSupportPlanTypesClient client. +// NewCanonicalSupportPlanTypesClientWithBaseURI creates an instance of the CanonicalSupportPlanTypesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewCanonicalSupportPlanTypesClientWithBaseURI(baseURI string, subscriptionID string) CanonicalSupportPlanTypesClient { return CanonicalSupportPlanTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/addons/mgmt/2017-05-15/addons/client.go b/services/preview/addons/mgmt/2017-05-15/addons/client.go index 923d5a4f997a..9c14fa75522f 100644 --- a/services/preview/addons/mgmt/2017-05-15/addons/client.go +++ b/services/preview/addons/mgmt/2017-05-15/addons/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/addons/mgmt/2017-05-15/addons/operations.go b/services/preview/addons/mgmt/2017-05-15/addons/operations.go index b9f75d897f61..f0e4952b6af6 100644 --- a/services/preview/addons/mgmt/2017-05-15/addons/operations.go +++ b/services/preview/addons/mgmt/2017-05-15/addons/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/addons/mgmt/2017-05-15/addons/supportplantypes.go b/services/preview/addons/mgmt/2017-05-15/addons/supportplantypes.go index 3ad50addd8ec..5814004d3ac0 100644 --- a/services/preview/addons/mgmt/2017-05-15/addons/supportplantypes.go +++ b/services/preview/addons/mgmt/2017-05-15/addons/supportplantypes.go @@ -35,7 +35,9 @@ func NewSupportPlanTypesClient(subscriptionID string) SupportPlanTypesClient { return NewSupportPlanTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSupportPlanTypesClientWithBaseURI creates an instance of the SupportPlanTypesClient client. +// NewSupportPlanTypesClientWithBaseURI creates an instance of the SupportPlanTypesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSupportPlanTypesClientWithBaseURI(baseURI string, subscriptionID string) SupportPlanTypesClient { return SupportPlanTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/addons/mgmt/2018-03-01/addons/client.go b/services/preview/addons/mgmt/2018-03-01/addons/client.go index 9b1eedfc379a..7e6f36a6d9dc 100644 --- a/services/preview/addons/mgmt/2018-03-01/addons/client.go +++ b/services/preview/addons/mgmt/2018-03-01/addons/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/addons/mgmt/2018-03-01/addons/operations.go b/services/preview/addons/mgmt/2018-03-01/addons/operations.go index de689e444e6d..82c3804d0d71 100644 --- a/services/preview/addons/mgmt/2018-03-01/addons/operations.go +++ b/services/preview/addons/mgmt/2018-03-01/addons/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/addons/mgmt/2018-03-01/addons/supportplantypes.go b/services/preview/addons/mgmt/2018-03-01/addons/supportplantypes.go index 1946fbe1681f..831d1d0a122d 100644 --- a/services/preview/addons/mgmt/2018-03-01/addons/supportplantypes.go +++ b/services/preview/addons/mgmt/2018-03-01/addons/supportplantypes.go @@ -35,7 +35,9 @@ func NewSupportPlanTypesClient(subscriptionID string) SupportPlanTypesClient { return NewSupportPlanTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSupportPlanTypesClientWithBaseURI creates an instance of the SupportPlanTypesClient client. +// NewSupportPlanTypesClientWithBaseURI creates an instance of the SupportPlanTypesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSupportPlanTypesClientWithBaseURI(baseURI string, subscriptionID string) SupportPlanTypesClient { return SupportPlanTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/advisorapi/interfaces.go b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/advisorapi/interfaces.go index 6f0b98fbbc64..c7ce9509f7f4 100644 --- a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/advisorapi/interfaces.go +++ b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/advisorapi/interfaces.go @@ -30,6 +30,7 @@ type RecommendationsClientAPI interface { Get(ctx context.Context, resourceURI string, recommendationID string) (result advisor.ResourceRecommendationBase, err error) GetGenerateRecommendationsStatus(ctx context.Context, operationID uuid.UUID) (result autorest.Response, err error) List(ctx context.Context, filter string, top *int32, skipToken string) (result advisor.ResourceRecommendationBaseListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skipToken string) (result advisor.ResourceRecommendationBaseListResultIterator, err error) } var _ RecommendationsClientAPI = (*advisor.RecommendationsClient)(nil) @@ -37,6 +38,7 @@ var _ RecommendationsClientAPI = (*advisor.RecommendationsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result advisor.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result advisor.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*advisor.OperationsClient)(nil) diff --git a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/client.go b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/client.go index 5b53a85a6ef3..ce400722d909 100644 --- a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/client.go +++ b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/operations.go b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/operations.go index e9f394600d3f..28a41008708f 100644 --- a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/operations.go +++ b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/recommendations.go b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/recommendations.go index fa70c2b4fcc7..b8f6233c0046 100644 --- a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/recommendations.go +++ b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/recommendations.go @@ -36,7 +36,8 @@ func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/suppressions.go b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/suppressions.go index e4784792a3e9..68c1c9a912f5 100644 --- a/services/preview/advisor/mgmt/2016-07-12-preview/advisor/suppressions.go +++ b/services/preview/advisor/mgmt/2016-07-12-preview/advisor/suppressions.go @@ -35,7 +35,8 @@ func NewSuppressionsClient(subscriptionID string) SuppressionsClient { return NewSuppressionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient client. +// NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSuppressionsClientWithBaseURI(baseURI string, subscriptionID string) SuppressionsClient { return SuppressionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/alerts.go b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/alerts.go index 9509ecaa8626..c0a3b191d749 100644 --- a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/alerts.go +++ b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/alerts.go @@ -35,7 +35,8 @@ func NewAlertsClient(subscriptionID string, monitorService1 MonitorService) Aler return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID, monitorService1) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string, monitorService1 MonitorService) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID, monitorService1)} } diff --git a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/alertsmanagementapi/interfaces.go b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/alertsmanagementapi/interfaces.go index 5b6e7af938d7..fbf6a54be170 100644 --- a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/alertsmanagementapi/interfaces.go +++ b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/alertsmanagementapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result alertsmanagement.OperationsListPage, err error) + ListComplete(ctx context.Context) (result alertsmanagement.OperationsListIterator, err error) } var _ OperationsClientAPI = (*alertsmanagement.OperationsClient)(nil) @@ -33,6 +34,7 @@ var _ OperationsClientAPI = (*alertsmanagement.OperationsClient)(nil) type AlertsClientAPI interface { ChangeState(ctx context.Context, alertID string, newState alertsmanagement.AlertState) (result alertsmanagement.Alert, err error) GetAll(ctx context.Context, targetResource string, targetResourceGroup string, targetResourceType string, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, smartGroupID string, includePayload *bool, pageCount *int32, sortBy alertsmanagement.AlertsSortByFields, sortOrder string, timeRange alertsmanagement.TimeRange) (result alertsmanagement.AlertsListPage, err error) + GetAllComplete(ctx context.Context, targetResource string, targetResourceGroup string, targetResourceType string, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, smartGroupID string, includePayload *bool, pageCount *int32, sortBy alertsmanagement.AlertsSortByFields, sortOrder string, timeRange alertsmanagement.TimeRange) (result alertsmanagement.AlertsListIterator, err error) GetByID(ctx context.Context, alertID string) (result alertsmanagement.Alert, err error) GetHistory(ctx context.Context, alertID string) (result alertsmanagement.AlertModification, err error) GetSummary(ctx context.Context, targetResourceGroup string, timeRange alertsmanagement.TimeRange) (result alertsmanagement.AlertsSummary, err error) diff --git a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/client.go b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/client.go index baebc81b0b26..103a90d90c26 100644 --- a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/client.go +++ b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, monitorService1 MonitorService) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, monitorService1) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, monitorService1 MonitorService) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/operations.go b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/operations.go index 361b379a5512..7fc2853a3566 100644 --- a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/operations.go +++ b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, monitorService1 MonitorService) return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, monitorService1) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, monitorService1 MonitorService) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, monitorService1)} } diff --git a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/smartgroups.go b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/smartgroups.go index f60cb826cde5..925dde94e6f7 100644 --- a/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/smartgroups.go +++ b/services/preview/alertsmanagement/mgmt/2018-05-05-preview/alertsmanagement/smartgroups.go @@ -35,7 +35,8 @@ func NewSmartGroupsClient(subscriptionID string, monitorService1 MonitorService) return NewSmartGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID, monitorService1) } -// NewSmartGroupsClientWithBaseURI creates an instance of the SmartGroupsClient client. +// NewSmartGroupsClientWithBaseURI creates an instance of the SmartGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSmartGroupsClientWithBaseURI(baseURI string, subscriptionID string, monitorService1 MonitorService) SmartGroupsClient { return SmartGroupsClient{NewWithBaseURI(baseURI, subscriptionID, monitorService1)} } diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/actionrules.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/actionrules.go index 4f649164c364..7e0616ed16cb 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/actionrules.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/actionrules.go @@ -36,7 +36,8 @@ func NewActionRulesClient(subscriptionID string) ActionRulesClient { return NewActionRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionRulesClientWithBaseURI creates an instance of the ActionRulesClient client. +// NewActionRulesClientWithBaseURI creates an instance of the ActionRulesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActionRulesClientWithBaseURI(baseURI string, subscriptionID string) ActionRulesClient { return ActionRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alerts.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alerts.go index 3d2eaeb1847e..857758e437f2 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alerts.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alerts.go @@ -36,7 +36,8 @@ func NewAlertsClient(subscriptionID string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alertsmanagementapi/interfaces.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alertsmanagementapi/interfaces.go index d2d90ae31f3c..e0321fb9a412 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alertsmanagementapi/interfaces.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/alertsmanagementapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result alertsmanagement.OperationsListPage, err error) + ListComplete(ctx context.Context) (result alertsmanagement.OperationsListIterator, err error) } var _ OperationsClientAPI = (*alertsmanagement.OperationsClient)(nil) @@ -33,6 +34,7 @@ var _ OperationsClientAPI = (*alertsmanagement.OperationsClient)(nil) type AlertsClientAPI interface { ChangeState(ctx context.Context, alertID string, newState alertsmanagement.AlertState) (result alertsmanagement.Alert, err error) GetAll(ctx context.Context, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, smartGroupID string, includeContext *bool, includeEgressConfig *bool, pageCount *int32, sortBy alertsmanagement.AlertsSortByFields, sortOrder string, selectParameter string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsListPage, err error) + GetAllComplete(ctx context.Context, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, smartGroupID string, includeContext *bool, includeEgressConfig *bool, pageCount *int32, sortBy alertsmanagement.AlertsSortByFields, sortOrder string, selectParameter string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsListIterator, err error) GetByID(ctx context.Context, alertID string) (result alertsmanagement.Alert, err error) GetHistory(ctx context.Context, alertID string) (result alertsmanagement.AlertModification, err error) GetSummary(ctx context.Context, groupby alertsmanagement.AlertsSummaryGroupByFields, includeSmartGroupsCount *bool, targetResource string, targetResourceType string, targetResourceGroup string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, alertState alertsmanagement.AlertState, alertRule string, timeRange alertsmanagement.TimeRange, customTimeRange string) (result alertsmanagement.AlertsSummary, err error) @@ -45,6 +47,7 @@ var _ AlertsClientAPI = (*alertsmanagement.AlertsClient)(nil) type SmartGroupsClientAPI interface { ChangeState(ctx context.Context, smartGroupID string, newState alertsmanagement.AlertState) (result alertsmanagement.SmartGroup, err error) GetAll(ctx context.Context, targetResource string, targetResourceGroup string, targetResourceType string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, smartGroupState alertsmanagement.AlertState, timeRange alertsmanagement.TimeRange, pageCount *int32, sortBy alertsmanagement.SmartGroupsSortByFields, sortOrder string) (result alertsmanagement.SmartGroupsListPage, err error) + GetAllComplete(ctx context.Context, targetResource string, targetResourceGroup string, targetResourceType string, monitorService alertsmanagement.MonitorService, monitorCondition alertsmanagement.MonitorCondition, severity alertsmanagement.Severity, smartGroupState alertsmanagement.AlertState, timeRange alertsmanagement.TimeRange, pageCount *int32, sortBy alertsmanagement.SmartGroupsSortByFields, sortOrder string) (result alertsmanagement.SmartGroupsListIterator, err error) GetByID(ctx context.Context, smartGroupID string) (result alertsmanagement.SmartGroup, err error) GetHistory(ctx context.Context, smartGroupID string) (result alertsmanagement.SmartGroupModification, err error) } @@ -57,7 +60,9 @@ type ActionRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, actionRuleName string) (result alertsmanagement.Bool, err error) GetByName(ctx context.Context, resourceGroupName string, actionRuleName string) (result alertsmanagement.ActionRule, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, targetResourceGroup string, targetResourceType string, targetResource string, severity alertsmanagement.Severity, monitorService alertsmanagement.MonitorService, impactedScope string, description string, alertRuleID string, actionGroup string, name string) (result alertsmanagement.ActionRulesListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, targetResourceGroup string, targetResourceType string, targetResource string, severity alertsmanagement.Severity, monitorService alertsmanagement.MonitorService, impactedScope string, description string, alertRuleID string, actionGroup string, name string) (result alertsmanagement.ActionRulesListIterator, err error) ListBySubscription(ctx context.Context, targetResourceGroup string, targetResourceType string, targetResource string, severity alertsmanagement.Severity, monitorService alertsmanagement.MonitorService, impactedScope string, description string, alertRuleID string, actionGroup string, name string) (result alertsmanagement.ActionRulesListPage, err error) + ListBySubscriptionComplete(ctx context.Context, targetResourceGroup string, targetResourceType string, targetResource string, severity alertsmanagement.Severity, monitorService alertsmanagement.MonitorService, impactedScope string, description string, alertRuleID string, actionGroup string, name string) (result alertsmanagement.ActionRulesListIterator, err error) Update(ctx context.Context, resourceGroupName string, actionRuleName string, actionRulePatch alertsmanagement.PatchObject) (result alertsmanagement.ActionRule, err error) } diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/client.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/client.go index 497ccddd5807..b0ed5bbf650b 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/client.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/operations.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/operations.go index a385604e4bb5..9c7b2749fe74 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/operations.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/smartgroups.go b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/smartgroups.go index 7dfe878d1f40..c8d368e03985 100644 --- a/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/smartgroups.go +++ b/services/preview/alertsmanagement/mgmt/2019-05-05/alertsmanagement/smartgroups.go @@ -36,7 +36,8 @@ func NewSmartGroupsClient(subscriptionID string) SmartGroupsClient { return NewSmartGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSmartGroupsClientWithBaseURI creates an instance of the SmartGroupsClient client. +// NewSmartGroupsClientWithBaseURI creates an instance of the SmartGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSmartGroupsClientWithBaseURI(baseURI string, subscriptionID string) SmartGroupsClient { return SmartGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apimanagementapi/interfaces.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apimanagementapi/interfaces.go index 1aec8bc268b3..b838af4ef396 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apimanagementapi/interfaces.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apimanagementapi/interfaces.go @@ -53,6 +53,7 @@ type APIClientAPI interface { Delete(ctx context.Context, apimBaseURL string, apiid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, apiid string) (result apimanagement.APIContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, apiid string, parameters apimanagement.APIUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -64,6 +65,7 @@ type APIOperationClientAPI interface { Delete(ctx context.Context, apimBaseURL string, apiid string, operationID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, apiid string, operationID string) (result apimanagement.OperationContract, err error) ListByAPI(ctx context.Context, apimBaseURL string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionPage, err error) + ListByAPIComplete(ctx context.Context, apimBaseURL string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.OperationCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, apiid string, operationID string, parameters apimanagement.OperationUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -82,6 +84,7 @@ var _ APIOperationPolicyClientAPI = (*apimanagement.APIOperationPolicyClient)(ni // APIProductClientAPI contains the set of methods on the APIProductClient type. type APIProductClientAPI interface { ListByApis(ctx context.Context, apimBaseURL string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionPage, err error) + ListByApisComplete(ctx context.Context, apimBaseURL string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionIterator, err error) } var _ APIProductClientAPI = (*apimanagement.APIProductClient)(nil) @@ -102,6 +105,7 @@ type APISchemaClientAPI interface { Delete(ctx context.Context, apimBaseURL string, apiid string, schemaID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, apiid string, schemaID string) (result apimanagement.SchemaContract, err error) ListByAPI(ctx context.Context, apimBaseURL string, apiid string) (result apimanagement.SchemaCollectionPage, err error) + ListByAPIComplete(ctx context.Context, apimBaseURL string, apiid string) (result apimanagement.SchemaCollectionIterator, err error) } var _ APISchemaClientAPI = (*apimanagement.APISchemaClient)(nil) @@ -112,6 +116,7 @@ type AuthorizationServerClientAPI interface { Delete(ctx context.Context, apimBaseURL string, authsid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, authsid string) (result apimanagement.AuthorizationServerContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, authsid string, parameters apimanagement.AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -123,6 +128,7 @@ type BackendClientAPI interface { Delete(ctx context.Context, apimBaseURL string, backendid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, backendid string) (result apimanagement.BackendContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, backendid string, parameters apimanagement.BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -134,6 +140,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, apimBaseURL string, certificateID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, certificateID string) (result apimanagement.CertificateContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionIterator, err error) } var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) @@ -144,6 +151,7 @@ type EmailTemplateClientAPI interface { Delete(ctx context.Context, apimBaseURL string, templateName apimanagement.TemplateName, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, templateName apimanagement.TemplateName) (result apimanagement.EmailTemplateContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, templateName apimanagement.TemplateName, parameters apimanagement.EmailTemplateUpdateParameters) (result autorest.Response, err error) } @@ -155,6 +163,7 @@ type GroupClientAPI interface { Delete(ctx context.Context, apimBaseURL string, groupID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, groupID string) (result apimanagement.GroupContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, groupID string, parameters apimanagement.GroupUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -165,6 +174,7 @@ type GroupUserClientAPI interface { Create(ctx context.Context, apimBaseURL string, groupID string, UID string) (result apimanagement.UserContract, err error) Delete(ctx context.Context, apimBaseURL string, groupID string, UID string) (result autorest.Response, err error) List(ctx context.Context, apimBaseURL string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) } var _ GroupUserClientAPI = (*apimanagement.GroupUserClient)(nil) @@ -186,6 +196,7 @@ type LoggerClientAPI interface { Delete(ctx context.Context, apimBaseURL string, loggerid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, loggerid string) (result apimanagement.LoggerContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, loggerid string, parameters apimanagement.LoggerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -197,6 +208,7 @@ type OpenIDConnectProviderClientAPI interface { Delete(ctx context.Context, apimBaseURL string, opid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, opid string) (result apimanagement.OpenidConnectProviderContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, opid string, parameters apimanagement.OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -235,6 +247,7 @@ type ProductClientAPI interface { Delete(ctx context.Context, apimBaseURL string, productID string, ifMatch string, deleteSubscriptions *bool) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, productID string) (result apimanagement.ProductContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.ProductCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, productID string, parameters apimanagement.ProductUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -245,6 +258,7 @@ type ProductAPIClientAPI interface { CreateOrUpdate(ctx context.Context, apimBaseURL string, productID string, apiid string) (result apimanagement.APIContract, err error) Delete(ctx context.Context, apimBaseURL string, productID string, apiid string) (result autorest.Response, err error) ListByProduct(ctx context.Context, apimBaseURL string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByProductComplete(ctx context.Context, apimBaseURL string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) } var _ ProductAPIClientAPI = (*apimanagement.ProductAPIClient)(nil) @@ -254,6 +268,7 @@ type ProductGroupClientAPI interface { CreateOrUpdate(ctx context.Context, apimBaseURL string, productID string, groupID string) (result apimanagement.GroupContract, err error) Delete(ctx context.Context, apimBaseURL string, productID string, groupID string) (result autorest.Response, err error) ListByProduct(ctx context.Context, apimBaseURL string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByProductComplete(ctx context.Context, apimBaseURL string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) @@ -261,6 +276,7 @@ var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) // ProductSubscriptionsClientAPI contains the set of methods on the ProductSubscriptionsClient type. type ProductSubscriptionsClientAPI interface { List(ctx context.Context, apimBaseURL string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient)(nil) @@ -281,6 +297,7 @@ type PropertyClientAPI interface { Delete(ctx context.Context, apimBaseURL string, propID string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, propID string) (result apimanagement.PropertyContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, propID string, parameters apimanagement.PropertyUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -305,13 +322,20 @@ var _ QuotaByPeriodKeysClientAPI = (*apimanagement.QuotaByPeriodKeysClient)(nil) // ReportsClientAPI contains the set of methods on the ReportsClient type. type ReportsClientAPI interface { ListByAPI(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByAPIComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByGeo(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByGeoComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByOperation(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByOperationComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByProduct(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByProductComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByRequest(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.RequestReportCollection, err error) ListBySubscription(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByTime(ctx context.Context, apimBaseURL string, interval string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByTimeComplete(ctx context.Context, apimBaseURL string, interval string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByUser(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByUserComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) } var _ ReportsClientAPI = (*apimanagement.ReportsClient)(nil) @@ -322,6 +346,7 @@ type SubscriptionClientAPI interface { Delete(ctx context.Context, apimBaseURL string, sid string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, apimBaseURL string, sid string) (result apimanagement.SubscriptionContract, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) RegeneratePrimaryKey(ctx context.Context, apimBaseURL string, sid string) (result autorest.Response, err error) RegenerateSecondaryKey(ctx context.Context, apimBaseURL string, sid string) (result autorest.Response, err error) Update(ctx context.Context, apimBaseURL string, sid string, parameters apimanagement.SubscriptionUpdateParameters, ifMatch string, notify string) (result autorest.Response, err error) @@ -366,6 +391,7 @@ type UserClientAPI interface { Get(ctx context.Context, apimBaseURL string, UID string) (result apimanagement.UserContract, err error) GetSharedAccessToken(ctx context.Context, apimBaseURL string, UID string, parameters apimanagement.UserTokenParameters) (result apimanagement.UserTokenResult, err error) List(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) Update(ctx context.Context, apimBaseURL string, UID string, parameters apimanagement.UserUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -374,6 +400,7 @@ var _ UserClientAPI = (*apimanagement.UserClient)(nil) // UserGroupClientAPI contains the set of methods on the UserGroupClient type. type UserGroupClientAPI interface { List(ctx context.Context, apimBaseURL string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, UID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) @@ -381,6 +408,7 @@ var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) // UserSubscriptionClientAPI contains the set of methods on the UserSubscriptionClient type. type UserSubscriptionClientAPI interface { List(ctx context.Context, apimBaseURL string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, apimBaseURL string, UID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ UserSubscriptionClientAPI = (*apimanagement.UserSubscriptionClient)(nil) diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go index 4f4768b74409..73f63d351f23 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go @@ -36,7 +36,8 @@ func NewAPIClient(subscriptionID string) APIClient { return NewAPIClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIClientWithBaseURI creates an instance of the APIClient client. +// NewAPIClientWithBaseURI creates an instance of the APIClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIClientWithBaseURI(baseURI string, subscriptionID string) APIClient { return APIClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go index 48c13201d05f..eaefac6ef846 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go @@ -36,7 +36,8 @@ func NewAPIDiagnosticClient(subscriptionID string) APIDiagnosticClient { return NewAPIDiagnosticClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIDiagnosticClientWithBaseURI creates an instance of the APIDiagnosticClient client. +// NewAPIDiagnosticClientWithBaseURI creates an instance of the APIDiagnosticClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) APIDiagnosticClient { return APIDiagnosticClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiexport.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiexport.go index 4ee620ed7d41..7f536583c542 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiexport.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiexport.go @@ -36,7 +36,8 @@ func NewAPIExportClient(subscriptionID string) APIExportClient { return NewAPIExportClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client. +// NewAPIExportClientWithBaseURI creates an instance of the APIExportClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIExportClientWithBaseURI(baseURI string, subscriptionID string) APIExportClient { return APIExportClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go index 6f8b1d14a03c..a83c63ce0a1c 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go @@ -36,7 +36,8 @@ func NewAPIIssueClient(subscriptionID string) APIIssueClient { return NewAPIIssueClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueClientWithBaseURI creates an instance of the APIIssueClient client. +// NewAPIIssueClientWithBaseURI creates an instance of the APIIssueClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssueClientWithBaseURI(baseURI string, subscriptionID string) APIIssueClient { return APIIssueClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go index ad0e7f29cd2c..1b557c46d6fe 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go @@ -36,7 +36,9 @@ func NewAPIIssueAttachmentClient(subscriptionID string) APIIssueAttachmentClient return NewAPIIssueAttachmentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueAttachmentClientWithBaseURI creates an instance of the APIIssueAttachmentClient client. +// NewAPIIssueAttachmentClientWithBaseURI creates an instance of the APIIssueAttachmentClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIIssueAttachmentClientWithBaseURI(baseURI string, subscriptionID string) APIIssueAttachmentClient { return APIIssueAttachmentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go index 038cb9f4723d..335f57d2f2f9 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go @@ -36,7 +36,8 @@ func NewAPIIssueCommentClient(subscriptionID string) APIIssueCommentClient { return NewAPIIssueCommentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIIssueCommentClientWithBaseURI creates an instance of the APIIssueCommentClient client. +// NewAPIIssueCommentClientWithBaseURI creates an instance of the APIIssueCommentClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIIssueCommentClientWithBaseURI(baseURI string, subscriptionID string) APIIssueCommentClient { return APIIssueCommentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apimanagementapi/interfaces.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apimanagementapi/interfaces.go index 4b2f0f2a424f..77d8c153dc6d 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apimanagementapi/interfaces.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apimanagementapi/interfaces.go @@ -30,7 +30,9 @@ type APIClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result apimanagement.APIContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, tags string, expandAPIVersionSet *bool) (result apimanagement.APICollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, tags string, expandAPIVersionSet *bool) (result apimanagement.APICollectionIterator, err error) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (result apimanagement.TagResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters apimanagement.APIUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -39,6 +41,7 @@ var _ APIClientAPI = (*apimanagement.APIClient)(nil) // APIRevisionsClientAPI contains the set of methods on the APIRevisionsClient type. type APIRevisionsClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIRevisionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIRevisionCollectionIterator, err error) } var _ APIRevisionsClientAPI = (*apimanagement.APIRevisionsClient)(nil) @@ -50,6 +53,7 @@ type APIReleaseClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result apimanagement.APIReleaseContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIReleaseCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.APIReleaseCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters apimanagement.APIReleaseContract, ifMatch string) (result autorest.Response, err error) } @@ -62,6 +66,7 @@ type APIOperationClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result apimanagement.OperationContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, tags string) (result apimanagement.OperationCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, tags string) (result apimanagement.OperationCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters apimanagement.OperationUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -97,9 +102,13 @@ type TagClientAPI interface { GetEntityStateByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (result autorest.Response, err error) GetEntityStateByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.TagCollectionIterator, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (result apimanagement.TagCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (result apimanagement.TagCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters apimanagement.TagCreateUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -108,6 +117,7 @@ var _ TagClientAPI = (*apimanagement.TagClient)(nil) // APIProductClientAPI contains the set of methods on the APIProductClient type. type APIProductClientAPI interface { ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionPage, err error) + ListByApisComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.ProductCollectionIterator, err error) } var _ APIProductClientAPI = (*apimanagement.APIProductClient)(nil) @@ -130,6 +140,7 @@ type APISchemaClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result apimanagement.SchemaContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.SchemaCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.SchemaCollectionIterator, err error) } var _ APISchemaClientAPI = (*apimanagement.APISchemaClient)(nil) @@ -141,6 +152,7 @@ type APIDiagnosticClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result apimanagement.DiagnosticContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, parameters apimanagement.DiagnosticContract, ifMatch string) (result autorest.Response, err error) } @@ -153,6 +165,7 @@ type APIIssueClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, expandCommentsAttachments *bool) (result apimanagement.IssueContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, expandCommentsAttachments *bool, top *int32, skip *int32) (result apimanagement.IssueCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, expandCommentsAttachments *bool, top *int32, skip *int32) (result apimanagement.IssueCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, parameters apimanagement.IssueUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -165,6 +178,7 @@ type APIIssueCommentClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string) (result apimanagement.IssueCommentContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueCommentCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueCommentCollectionIterator, err error) } var _ APIIssueCommentClientAPI = (*apimanagement.APIIssueCommentClient)(nil) @@ -176,6 +190,7 @@ type APIIssueAttachmentClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string) (result apimanagement.IssueAttachmentContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueAttachmentCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result apimanagement.IssueAttachmentCollectionIterator, err error) } var _ APIIssueAttachmentClientAPI = (*apimanagement.APIIssueAttachmentClient)(nil) @@ -187,6 +202,7 @@ type TagDescriptionClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result apimanagement.TagDescriptionContract, err error) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagDescriptionCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result apimanagement.TagDescriptionCollectionIterator, err error) } var _ TagDescriptionClientAPI = (*apimanagement.TagDescriptionClient)(nil) @@ -194,6 +210,7 @@ var _ TagDescriptionClientAPI = (*apimanagement.TagDescriptionClient)(nil) // OperationClientAPI contains the set of methods on the OperationClient type. type OperationClientAPI interface { ListByTags(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (result apimanagement.TagResourceCollectionIterator, err error) } var _ OperationClientAPI = (*apimanagement.OperationClient)(nil) @@ -205,6 +222,7 @@ type AuthorizationServerClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result apimanagement.AuthorizationServerContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.AuthorizationServerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters apimanagement.AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -217,6 +235,7 @@ type BackendClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, backendID string) (result apimanagement.BackendContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.BackendCollectionIterator, err error) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters *apimanagement.BackendReconnectContract) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters apimanagement.BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -230,6 +249,7 @@ type CacheClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, cacheID string) (result apimanagement.CacheContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, cacheID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.CacheCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.CacheCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, parameters apimanagement.CacheUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -242,6 +262,7 @@ type CertificateClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result apimanagement.CertificateContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.CertificateCollectionIterator, err error) } var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) @@ -249,6 +270,7 @@ var _ CertificateClientAPI = (*apimanagement.CertificateClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result apimanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) @@ -256,6 +278,7 @@ var _ OperationsClientAPI = (*apimanagement.OperationsClient)(nil) // ServiceSkusClientAPI contains the set of methods on the ServiceSkusClient type. type ServiceSkusClientAPI interface { ListAvailableServiceSkus(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ResourceSkuResultsPage, err error) + ListAvailableServiceSkusComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ResourceSkuResultsIterator, err error) } var _ ServiceSkusClientAPI = (*apimanagement.ServiceSkusClient)(nil) @@ -270,7 +293,9 @@ type ServiceClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceResource, err error) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.ServiceGetSsoTokenResult, err error) List(ctx context.Context) (result apimanagement.ServiceListResultPage, err error) + ListComplete(ctx context.Context) (result apimanagement.ServiceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result apimanagement.ServiceListResultIterator, err error) Restore(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceBackupRestoreParameters) (result apimanagement.ServiceRestoreFuture, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateParameters) (result apimanagement.ServiceUpdateFuture, err error) UpdateHostname(ctx context.Context, resourceGroupName string, serviceName string, parameters apimanagement.ServiceUpdateHostnameParameters) (result apimanagement.ServiceUpdateHostnameFuture, err error) @@ -286,6 +311,7 @@ type DiagnosticClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result apimanagement.DiagnosticContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.DiagnosticCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, parameters apimanagement.DiagnosticContract, ifMatch string) (result autorest.Response, err error) } @@ -298,6 +324,7 @@ type EmailTemplateClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName) (result apimanagement.EmailTemplateContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.EmailTemplateCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName apimanagement.TemplateName, parameters apimanagement.EmailTemplateUpdateParameters) (result autorest.Response, err error) } @@ -310,6 +337,7 @@ type GroupClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result apimanagement.GroupContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters apimanagement.GroupUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -321,6 +349,7 @@ type GroupUserClientAPI interface { Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (result apimanagement.UserContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result apimanagement.UserCollectionIterator, err error) } var _ GroupUserClientAPI = (*apimanagement.GroupUserClient)(nil) @@ -332,6 +361,7 @@ type IdentityProviderClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType) (result apimanagement.IdentityProviderContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.IdentityProviderListPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.IdentityProviderListIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName apimanagement.IdentityProviderType, parameters apimanagement.IdentityProviderUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -341,6 +371,7 @@ var _ IdentityProviderClientAPI = (*apimanagement.IdentityProviderClient)(nil) type IssueClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, issueID string) (result apimanagement.IssueContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.IssueCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.IssueCollectionIterator, err error) } var _ IssueClientAPI = (*apimanagement.IssueClient)(nil) @@ -352,6 +383,7 @@ type LoggerClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, loggerID string) (result apimanagement.LoggerContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.LoggerCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, parameters apimanagement.LoggerUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -362,6 +394,7 @@ type NotificationClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName apimanagement.NotificationName, ifMatch string) (result apimanagement.NotificationContract, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, notificationName apimanagement.NotificationName) (result apimanagement.NotificationContract, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.NotificationCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result apimanagement.NotificationCollectionIterator, err error) } var _ NotificationClientAPI = (*apimanagement.NotificationClient)(nil) @@ -401,6 +434,7 @@ type OpenIDConnectProviderClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result apimanagement.OpenidConnectProviderContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.OpenIDConnectProviderCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters apimanagement.OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error) } @@ -461,7 +495,9 @@ type ProductClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result apimanagement.ProductContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool, tags string) (result apimanagement.ProductCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool, tags string) (result apimanagement.ProductCollectionIterator, err error) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (result apimanagement.TagResourceCollectionPage, err error) + ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (result apimanagement.TagResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters apimanagement.ProductUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -473,6 +509,7 @@ type ProductAPIClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result apimanagement.APIContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.APICollectionIterator, err error) } var _ ProductAPIClientAPI = (*apimanagement.ProductAPIClient)(nil) @@ -483,6 +520,7 @@ type ProductGroupClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result apimanagement.GroupContract, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) @@ -490,6 +528,7 @@ var _ ProductGroupClientAPI = (*apimanagement.ProductGroupClient)(nil) // ProductSubscriptionsClientAPI contains the set of methods on the ProductSubscriptionsClient type. type ProductSubscriptionsClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ ProductSubscriptionsClientAPI = (*apimanagement.ProductSubscriptionsClient)(nil) @@ -512,6 +551,7 @@ type PropertyClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result apimanagement.PropertyContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.PropertyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters apimanagement.PropertyUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -536,6 +576,7 @@ var _ QuotaByPeriodKeysClientAPI = (*apimanagement.QuotaByPeriodKeysClient)(nil) // RegionClientAPI contains the set of methods on the RegionClient type. type RegionClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.RegionListResultPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result apimanagement.RegionListResultIterator, err error) } var _ RegionClientAPI = (*apimanagement.RegionClient)(nil) @@ -543,13 +584,20 @@ var _ RegionClientAPI = (*apimanagement.RegionClient)(nil) // ReportsClientAPI contains the set of methods on the ReportsClient type. type ReportsClientAPI interface { ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByGeo(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByGeoComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByRequest(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.RequestReportCollection, err error) ListBySubscription(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByTime(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByTimeComplete(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) ListByUser(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionPage, err error) + ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.ReportCollectionIterator, err error) } var _ ReportsClientAPI = (*apimanagement.ReportsClient)(nil) @@ -561,6 +609,7 @@ type SubscriptionClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result apimanagement.SubscriptionContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) List(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters apimanagement.SubscriptionUpdateParameters, ifMatch string, notify *bool) (result autorest.Response, err error) @@ -571,6 +620,7 @@ var _ SubscriptionClientAPI = (*apimanagement.SubscriptionClient)(nil) // TagResourceClientAPI contains the set of methods on the TagResourceClient type. type TagResourceClientAPI interface { ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.TagResourceCollectionIterator, err error) } var _ TagResourceClientAPI = (*apimanagement.TagResourceClient)(nil) @@ -614,6 +664,7 @@ type UserClientAPI interface { GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result autorest.Response, err error) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters apimanagement.UserTokenParameters) (result apimanagement.UserTokenResult, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.UserCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result apimanagement.UserCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters apimanagement.UserUpdateParameters, ifMatch string) (result autorest.Response, err error) } @@ -622,6 +673,7 @@ var _ UserClientAPI = (*apimanagement.UserClient)(nil) // UserGroupClientAPI contains the set of methods on the UserGroupClient type. type UserGroupClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result apimanagement.GroupCollectionIterator, err error) } var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) @@ -629,6 +681,7 @@ var _ UserGroupClientAPI = (*apimanagement.UserGroupClient)(nil) // UserSubscriptionClientAPI contains the set of methods on the UserSubscriptionClient type. type UserSubscriptionClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result apimanagement.SubscriptionCollectionIterator, err error) } var _ UserSubscriptionClientAPI = (*apimanagement.UserSubscriptionClient)(nil) @@ -636,6 +689,7 @@ var _ UserSubscriptionClientAPI = (*apimanagement.UserSubscriptionClient)(nil) // UserIdentitiesClientAPI contains the set of methods on the UserIdentitiesClient type. type UserIdentitiesClientAPI interface { List(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result apimanagement.UserIdentityCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result apimanagement.UserIdentityCollectionIterator, err error) } var _ UserIdentitiesClientAPI = (*apimanagement.UserIdentitiesClient)(nil) @@ -654,6 +708,7 @@ type APIVersionSetClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result apimanagement.APIVersionSetContract, err error) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result autorest.Response, err error) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APIVersionSetCollectionPage, err error) + ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result apimanagement.APIVersionSetCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, parameters apimanagement.APIVersionSetUpdateParameters, ifMatch string) (result autorest.Response, err error) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go index 75a484ecd459..8970ce2f7e92 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go @@ -36,7 +36,8 @@ func NewAPIOperationClient(subscriptionID string) APIOperationClient { return NewAPIOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationClientWithBaseURI creates an instance of the APIOperationClient client. +// NewAPIOperationClientWithBaseURI creates an instance of the APIOperationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIOperationClientWithBaseURI(baseURI string, subscriptionID string) APIOperationClient { return APIOperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperationpolicy.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperationpolicy.go index f13cfd5a7ac0..03a85fc7eb0d 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperationpolicy.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperationpolicy.go @@ -36,7 +36,9 @@ func NewAPIOperationPolicyClient(subscriptionID string) APIOperationPolicyClient return NewAPIOperationPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIOperationPolicyClientWithBaseURI creates an instance of the APIOperationPolicyClient client. +// NewAPIOperationPolicyClientWithBaseURI creates an instance of the APIOperationPolicyClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAPIOperationPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIOperationPolicyClient { return APIOperationPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apipolicy.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apipolicy.go index 2156fe3000b4..0c18e44db61f 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apipolicy.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apipolicy.go @@ -36,7 +36,8 @@ func NewAPIPolicyClient(subscriptionID string) APIPolicyClient { return NewAPIPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client. +// NewAPIPolicyClientWithBaseURI creates an instance of the APIPolicyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIPolicyClient { return APIPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go index 04bcd8a8e457..76fceb370c34 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go @@ -36,7 +36,8 @@ func NewAPIProductClient(subscriptionID string) APIProductClient { return NewAPIProductClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIProductClientWithBaseURI creates an instance of the APIProductClient client. +// NewAPIProductClientWithBaseURI creates an instance of the APIProductClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIProductClientWithBaseURI(baseURI string, subscriptionID string) APIProductClient { return APIProductClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go index 9ff1e8c234d4..03b556b42f82 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go @@ -36,7 +36,8 @@ func NewAPIReleaseClient(subscriptionID string) APIReleaseClient { return NewAPIReleaseClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIReleaseClientWithBaseURI creates an instance of the APIReleaseClient client. +// NewAPIReleaseClientWithBaseURI creates an instance of the APIReleaseClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIReleaseClientWithBaseURI(baseURI string, subscriptionID string) APIReleaseClient { return APIReleaseClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go index c52f948ead91..a82c21d62756 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go @@ -36,7 +36,8 @@ func NewAPIRevisionsClient(subscriptionID string) APIRevisionsClient { return NewAPIRevisionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIRevisionsClientWithBaseURI creates an instance of the APIRevisionsClient client. +// NewAPIRevisionsClientWithBaseURI creates an instance of the APIRevisionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIRevisionsClientWithBaseURI(baseURI string, subscriptionID string) APIRevisionsClient { return APIRevisionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go index 99181a0fffb7..ce9d481b71a7 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go @@ -36,7 +36,8 @@ func NewAPISchemaClient(subscriptionID string) APISchemaClient { return NewAPISchemaClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPISchemaClientWithBaseURI creates an instance of the APISchemaClient client. +// NewAPISchemaClientWithBaseURI creates an instance of the APISchemaClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPISchemaClientWithBaseURI(baseURI string, subscriptionID string) APISchemaClient { return APISchemaClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go index 371aef7fce1c..165788e2a3bb 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go @@ -36,7 +36,8 @@ func NewAPIVersionSetClient(subscriptionID string) APIVersionSetClient { return NewAPIVersionSetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIVersionSetClientWithBaseURI creates an instance of the APIVersionSetClient client. +// NewAPIVersionSetClientWithBaseURI creates an instance of the APIVersionSetClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAPIVersionSetClientWithBaseURI(baseURI string, subscriptionID string) APIVersionSetClient { return APIVersionSetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go index 6a8557fcb3fe..738693960cff 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go @@ -36,7 +36,9 @@ func NewAuthorizationServerClient(subscriptionID string) AuthorizationServerClie return NewAuthorizationServerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationServerClientWithBaseURI creates an instance of the AuthorizationServerClient client. +// NewAuthorizationServerClientWithBaseURI creates an instance of the AuthorizationServerClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAuthorizationServerClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationServerClient { return AuthorizationServerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go index f73f1d4326dd..9513f7a31a3e 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go @@ -36,7 +36,8 @@ func NewBackendClient(subscriptionID string) BackendClient { return NewBackendClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackendClientWithBaseURI creates an instance of the BackendClient client. +// NewBackendClientWithBaseURI creates an instance of the BackendClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackendClientWithBaseURI(baseURI string, subscriptionID string) BackendClient { return BackendClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/cache.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/cache.go index 5658af282ad5..73d84db5e34f 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/cache.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/cache.go @@ -36,7 +36,8 @@ func NewCacheClient(subscriptionID string) CacheClient { return NewCacheClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCacheClientWithBaseURI creates an instance of the CacheClient client. +// NewCacheClientWithBaseURI creates an instance of the CacheClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCacheClientWithBaseURI(baseURI string, subscriptionID string) CacheClient { return CacheClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go index 7fa5a017a11e..dddbe9dc2f1c 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/client.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/client.go index 717c2363ad74..0a922bc5d63d 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/client.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/delegationsettings.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/delegationsettings.go index 1744c24793c8..a0d8d76edcc8 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/delegationsettings.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/delegationsettings.go @@ -36,7 +36,9 @@ func NewDelegationSettingsClient(subscriptionID string) DelegationSettingsClient return NewDelegationSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDelegationSettingsClientWithBaseURI creates an instance of the DelegationSettingsClient client. +// NewDelegationSettingsClientWithBaseURI creates an instance of the DelegationSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDelegationSettingsClientWithBaseURI(baseURI string, subscriptionID string) DelegationSettingsClient { return DelegationSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go index f067d77fb587..64238fab3334 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go @@ -36,7 +36,8 @@ func NewDiagnosticClient(subscriptionID string) DiagnosticClient { return NewDiagnosticClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticClientWithBaseURI creates an instance of the DiagnosticClient client. +// NewDiagnosticClientWithBaseURI creates an instance of the DiagnosticClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticClient { return DiagnosticClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go index 70509ba4d52e..c912f6a4014f 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go @@ -36,7 +36,8 @@ func NewEmailTemplateClient(subscriptionID string) EmailTemplateClient { return NewEmailTemplateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEmailTemplateClientWithBaseURI creates an instance of the EmailTemplateClient client. +// NewEmailTemplateClientWithBaseURI creates an instance of the EmailTemplateClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEmailTemplateClientWithBaseURI(baseURI string, subscriptionID string) EmailTemplateClient { return EmailTemplateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go index bd197ac4a1c6..7c4edd74ad2e 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go @@ -36,7 +36,8 @@ func NewGroupClient(subscriptionID string) GroupClient { return NewGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupClientWithBaseURI creates an instance of the GroupClient client. +// NewGroupClientWithBaseURI creates an instance of the GroupClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClient { return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go index 039c015ae585..4018d96abd1b 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go @@ -36,7 +36,8 @@ func NewGroupUserClient(subscriptionID string) GroupUserClient { return NewGroupUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupUserClientWithBaseURI creates an instance of the GroupUserClient client. +// NewGroupUserClientWithBaseURI creates an instance of the GroupUserClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupUserClientWithBaseURI(baseURI string, subscriptionID string) GroupUserClient { return GroupUserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/identityprovider.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/identityprovider.go index c198ec934619..d3e8f4decccc 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/identityprovider.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/identityprovider.go @@ -36,7 +36,9 @@ func NewIdentityProviderClient(subscriptionID string) IdentityProviderClient { return NewIdentityProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIdentityProviderClientWithBaseURI creates an instance of the IdentityProviderClient client. +// NewIdentityProviderClientWithBaseURI creates an instance of the IdentityProviderClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIdentityProviderClientWithBaseURI(baseURI string, subscriptionID string) IdentityProviderClient { return IdentityProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/issue.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/issue.go index 8a7abe57d03a..3d81b9221ecf 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/issue.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/issue.go @@ -36,7 +36,8 @@ func NewIssueClient(subscriptionID string) IssueClient { return NewIssueClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIssueClientWithBaseURI creates an instance of the IssueClient client. +// NewIssueClientWithBaseURI creates an instance of the IssueClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIssueClientWithBaseURI(baseURI string, subscriptionID string) IssueClient { return IssueClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go index d1c28346ccfb..5281f19b06da 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go @@ -36,7 +36,8 @@ func NewLoggerClient(subscriptionID string) LoggerClient { return NewLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoggerClientWithBaseURI creates an instance of the LoggerClient client. +// NewLoggerClientWithBaseURI creates an instance of the LoggerClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLoggerClientWithBaseURI(baseURI string, subscriptionID string) LoggerClient { return LoggerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/networkstatus.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/networkstatus.go index b1acab456621..9a6580cd27b1 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/networkstatus.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/networkstatus.go @@ -36,7 +36,8 @@ func NewNetworkStatusClient(subscriptionID string) NetworkStatusClient { return NewNetworkStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client. +// NewNetworkStatusClientWithBaseURI creates an instance of the NetworkStatusClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNetworkStatusClientWithBaseURI(baseURI string, subscriptionID string) NetworkStatusClient { return NetworkStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go index 08c9496aa30c..49ffaf0d631b 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go @@ -36,7 +36,8 @@ func NewNotificationClient(subscriptionID string) NotificationClient { return NewNotificationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationClientWithBaseURI creates an instance of the NotificationClient client. +// NewNotificationClientWithBaseURI creates an instance of the NotificationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNotificationClientWithBaseURI(baseURI string, subscriptionID string) NotificationClient { return NotificationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientemail.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientemail.go index 165e355a0ff4..c30c040ae994 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientemail.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientemail.go @@ -36,7 +36,9 @@ func NewNotificationRecipientEmailClient(subscriptionID string) NotificationReci return NewNotificationRecipientEmailClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationRecipientEmailClientWithBaseURI creates an instance of the NotificationRecipientEmailClient client. +// NewNotificationRecipientEmailClientWithBaseURI creates an instance of the NotificationRecipientEmailClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewNotificationRecipientEmailClientWithBaseURI(baseURI string, subscriptionID string) NotificationRecipientEmailClient { return NotificationRecipientEmailClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientuser.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientuser.go index 31a9a1455b7b..f2b143bc9f3e 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientuser.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientuser.go @@ -36,7 +36,9 @@ func NewNotificationRecipientUserClient(subscriptionID string) NotificationRecip return NewNotificationRecipientUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationRecipientUserClientWithBaseURI creates an instance of the NotificationRecipientUserClient client. +// NewNotificationRecipientUserClientWithBaseURI creates an instance of the NotificationRecipientUserClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewNotificationRecipientUserClientWithBaseURI(baseURI string, subscriptionID string) NotificationRecipientUserClient { return NotificationRecipientUserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go index 26907d0a9e63..54d0a91b73d7 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go @@ -36,7 +36,9 @@ func NewOpenIDConnectProviderClient(subscriptionID string) OpenIDConnectProvider return NewOpenIDConnectProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenIDConnectProviderClientWithBaseURI creates an instance of the OpenIDConnectProviderClient client. +// NewOpenIDConnectProviderClientWithBaseURI creates an instance of the OpenIDConnectProviderClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewOpenIDConnectProviderClientWithBaseURI(baseURI string, subscriptionID string) OpenIDConnectProviderClient { return OpenIDConnectProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go index f2a21e0ad3fb..baa055428fcf 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go @@ -36,7 +36,8 @@ func NewOperationClient(subscriptionID string) OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string, subscriptionID string) OperationClient { return OperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operations.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operations.go index 70c7373ccd02..677e9cea7ece 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operations.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policy.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policy.go index b9bb9c4ce2bb..17b0cba8f454 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policy.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policy.go @@ -36,7 +36,8 @@ func NewPolicyClient(subscriptionID string) PolicyClient { return NewPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client. +// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyClientWithBaseURI(baseURI string, subscriptionID string) PolicyClient { return PolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policysnippets.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policysnippets.go index f095bcba439d..1d88cc65f70e 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policysnippets.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policysnippets.go @@ -36,7 +36,8 @@ func NewPolicySnippetsClient(subscriptionID string) PolicySnippetsClient { return NewPolicySnippetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client. +// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySnippetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySnippetsClient { return PolicySnippetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go index 012f0403d105..3932856d23ed 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go @@ -36,7 +36,8 @@ func NewProductClient(subscriptionID string) ProductClient { return NewProductClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductClientWithBaseURI creates an instance of the ProductClient client. +// NewProductClientWithBaseURI creates an instance of the ProductClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductClientWithBaseURI(baseURI string, subscriptionID string) ProductClient { return ProductClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go index a15a9cda55ae..a2518e53bbb5 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go @@ -36,7 +36,8 @@ func NewProductAPIClient(subscriptionID string) ProductAPIClient { return NewProductAPIClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductAPIClientWithBaseURI creates an instance of the ProductAPIClient client. +// NewProductAPIClientWithBaseURI creates an instance of the ProductAPIClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductAPIClientWithBaseURI(baseURI string, subscriptionID string) ProductAPIClient { return ProductAPIClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go index 2cb96a28a548..2190d8ccfa00 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go @@ -36,7 +36,8 @@ func NewProductGroupClient(subscriptionID string) ProductGroupClient { return NewProductGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductGroupClientWithBaseURI creates an instance of the ProductGroupClient client. +// NewProductGroupClientWithBaseURI creates an instance of the ProductGroupClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductGroupClientWithBaseURI(baseURI string, subscriptionID string) ProductGroupClient { return ProductGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productpolicy.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productpolicy.go index be87a005073a..8cd5306a5790 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productpolicy.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productpolicy.go @@ -36,7 +36,8 @@ func NewProductPolicyClient(subscriptionID string) ProductPolicyClient { return NewProductPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client. +// NewProductPolicyClientWithBaseURI creates an instance of the ProductPolicyClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductPolicyClientWithBaseURI(baseURI string, subscriptionID string) ProductPolicyClient { return ProductPolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go index 6193312abd6b..b23ffd8eb3b7 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go @@ -36,7 +36,9 @@ func NewProductSubscriptionsClient(subscriptionID string) ProductSubscriptionsCl return NewProductSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client. +// NewProductSubscriptionsClientWithBaseURI creates an instance of the ProductSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProductSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ProductSubscriptionsClient { return ProductSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go index 69fdab7d7a82..018a911e4e8d 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go @@ -36,7 +36,8 @@ func NewPropertyClient(subscriptionID string) PropertyClient { return NewPropertyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client. +// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) PropertyClient { return PropertyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabycounterkeys.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabycounterkeys.go index b70c802d5cbf..927386625804 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabycounterkeys.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabycounterkeys.go @@ -36,7 +36,9 @@ func NewQuotaByCounterKeysClient(subscriptionID string) QuotaByCounterKeysClient return NewQuotaByCounterKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client. +// NewQuotaByCounterKeysClientWithBaseURI creates an instance of the QuotaByCounterKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByCounterKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByCounterKeysClient { return QuotaByCounterKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabyperiodkeys.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabyperiodkeys.go index 918a42c804fa..91f0c6163994 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabyperiodkeys.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabyperiodkeys.go @@ -36,7 +36,9 @@ func NewQuotaByPeriodKeysClient(subscriptionID string) QuotaByPeriodKeysClient { return NewQuotaByPeriodKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client. +// NewQuotaByPeriodKeysClientWithBaseURI creates an instance of the QuotaByPeriodKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewQuotaByPeriodKeysClientWithBaseURI(baseURI string, subscriptionID string) QuotaByPeriodKeysClient { return QuotaByPeriodKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/region.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/region.go index 633ac6cd643e..5d97fb1b8f21 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/region.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/region.go @@ -36,7 +36,8 @@ func NewRegionClient(subscriptionID string) RegionClient { return NewRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionClientWithBaseURI creates an instance of the RegionClient client. +// NewRegionClientWithBaseURI creates an instance of the RegionClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionClientWithBaseURI(baseURI string, subscriptionID string) RegionClient { return RegionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go index 3dc0f32b031b..a6df536db066 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go @@ -36,7 +36,8 @@ func NewReportsClient(subscriptionID string) ReportsClient { return NewReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReportsClientWithBaseURI creates an instance of the ReportsClient client. +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return ReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/service.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/service.go index ca85d76609f6..6b908d7a20d4 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/service.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/service.go @@ -36,7 +36,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go index 92ec29a19cba..f707e886d0e2 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go @@ -36,7 +36,8 @@ func NewServiceSkusClient(subscriptionID string) ServiceSkusClient { return NewServiceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client. +// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceSkusClientWithBaseURI(baseURI string, subscriptionID string) ServiceSkusClient { return ServiceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signinsettings.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signinsettings.go index 4a349d88de54..ef11145996d4 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signinsettings.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signinsettings.go @@ -36,7 +36,8 @@ func NewSignInSettingsClient(subscriptionID string) SignInSettingsClient { return NewSignInSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSignInSettingsClientWithBaseURI creates an instance of the SignInSettingsClient client. +// NewSignInSettingsClientWithBaseURI creates an instance of the SignInSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignInSettingsClientWithBaseURI(baseURI string, subscriptionID string) SignInSettingsClient { return SignInSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signupsettings.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signupsettings.go index 200e7a0cd034..9cb4a016e711 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signupsettings.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signupsettings.go @@ -36,7 +36,8 @@ func NewSignUpSettingsClient(subscriptionID string) SignUpSettingsClient { return NewSignUpSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSignUpSettingsClientWithBaseURI creates an instance of the SignUpSettingsClient client. +// NewSignUpSettingsClientWithBaseURI creates an instance of the SignUpSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSignUpSettingsClientWithBaseURI(baseURI string, subscriptionID string) SignUpSettingsClient { return SignUpSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go index 254dce88fbdd..53c81ef4c111 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go @@ -36,7 +36,8 @@ func NewSubscriptionClient(subscriptionID string) SubscriptionClient { return NewSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionClientWithBaseURI creates an instance of the SubscriptionClient client. +// NewSubscriptionClientWithBaseURI creates an instance of the SubscriptionClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionClient { return SubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go index ec6828fe12cc..8589b5900df9 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go @@ -36,7 +36,8 @@ func NewTagClient(subscriptionID string) TagClient { return NewTagClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagClientWithBaseURI creates an instance of the TagClient client. +// NewTagClientWithBaseURI creates an instance of the TagClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagClientWithBaseURI(baseURI string, subscriptionID string) TagClient { return TagClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go index bd3217ed79db..bdaeab218225 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go @@ -36,7 +36,8 @@ func NewTagDescriptionClient(subscriptionID string) TagDescriptionClient { return NewTagDescriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagDescriptionClientWithBaseURI creates an instance of the TagDescriptionClient client. +// NewTagDescriptionClientWithBaseURI creates an instance of the TagDescriptionClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) TagDescriptionClient { return TagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go index 976b3f8a8fc7..5791df8b43fc 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go @@ -36,7 +36,8 @@ func NewTagResourceClient(subscriptionID string) TagResourceClient { return NewTagResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagResourceClientWithBaseURI creates an instance of the TagResourceClient client. +// NewTagResourceClientWithBaseURI creates an instance of the TagResourceClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagResourceClientWithBaseURI(baseURI string, subscriptionID string) TagResourceClient { return TagResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccess.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccess.go index eb75ebc7b9e8..827e0553c385 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccess.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccess.go @@ -36,7 +36,8 @@ func NewTenantAccessClient(subscriptionID string) TenantAccessClient { return NewTenantAccessClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client. +// NewTenantAccessClientWithBaseURI creates an instance of the TenantAccessClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessClient { return TenantAccessClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccessgit.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccessgit.go index 0a9197525f24..72e9b2d350cb 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccessgit.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccessgit.go @@ -36,7 +36,8 @@ func NewTenantAccessGitClient(subscriptionID string) TenantAccessGitClient { return NewTenantAccessGitClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client. +// NewTenantAccessGitClientWithBaseURI creates an instance of the TenantAccessGitClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantAccessGitClientWithBaseURI(baseURI string, subscriptionID string) TenantAccessGitClient { return TenantAccessGitClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantconfiguration.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantconfiguration.go index d216648f5ec3..f2720c3ad1e5 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantconfiguration.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantconfiguration.go @@ -36,7 +36,9 @@ func NewTenantConfigurationClient(subscriptionID string) TenantConfigurationClie return NewTenantConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client. +// NewTenantConfigurationClientWithBaseURI creates an instance of the TenantConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantConfigurationClientWithBaseURI(baseURI string, subscriptionID string) TenantConfigurationClient { return TenantConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go index d05939dd2c69..9c492ca97fcb 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go @@ -36,7 +36,8 @@ func NewUserClient(subscriptionID string) UserClient { return NewUserClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserClientWithBaseURI creates an instance of the UserClient client. +// NewUserClientWithBaseURI creates an instance of the UserClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserClientWithBaseURI(baseURI string, subscriptionID string) UserClient { return UserClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/userconfirmationpassword.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/userconfirmationpassword.go index 4e857d1841ab..2fdb51e35533 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/userconfirmationpassword.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/userconfirmationpassword.go @@ -36,7 +36,9 @@ func NewUserConfirmationPasswordClient(subscriptionID string) UserConfirmationPa return NewUserConfirmationPasswordClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserConfirmationPasswordClientWithBaseURI creates an instance of the UserConfirmationPasswordClient client. +// NewUserConfirmationPasswordClientWithBaseURI creates an instance of the UserConfirmationPasswordClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewUserConfirmationPasswordClientWithBaseURI(baseURI string, subscriptionID string) UserConfirmationPasswordClient { return UserConfirmationPasswordClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go index 8071b17824f5..066da5f9d24e 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go @@ -36,7 +36,8 @@ func NewUserGroupClient(subscriptionID string) UserGroupClient { return NewUserGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserGroupClientWithBaseURI creates an instance of the UserGroupClient client. +// NewUserGroupClientWithBaseURI creates an instance of the UserGroupClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserGroupClientWithBaseURI(baseURI string, subscriptionID string) UserGroupClient { return UserGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/useridentities.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/useridentities.go index 7ebf2cc39b91..88c5ee7beb11 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/useridentities.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/useridentities.go @@ -36,7 +36,8 @@ func NewUserIdentitiesClient(subscriptionID string) UserIdentitiesClient { return NewUserIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client. +// NewUserIdentitiesClientWithBaseURI creates an instance of the UserIdentitiesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) UserIdentitiesClient { return UserIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go index 0babd5fa78a9..a699208d1399 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go @@ -36,7 +36,9 @@ func NewUserSubscriptionClient(subscriptionID string) UserSubscriptionClient { return NewUserSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserSubscriptionClientWithBaseURI creates an instance of the UserSubscriptionClient client. +// NewUserSubscriptionClientWithBaseURI creates an instance of the UserSubscriptionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewUserSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) UserSubscriptionClient { return UserSubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/appconfigurationapi/interfaces.go b/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/appconfigurationapi/interfaces.go index b09e153e4a30..c68cb06e62f5 100644 --- a/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/appconfigurationapi/interfaces.go +++ b/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/appconfigurationapi/interfaces.go @@ -28,8 +28,11 @@ type ConfigurationStoresClientAPI interface { Delete(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.ConfigurationStoresDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.ConfigurationStore, err error) List(ctx context.Context, skipToken string) (result appconfiguration.ConfigurationStoreListResultPage, err error) + ListComplete(ctx context.Context, skipToken string) (result appconfiguration.ConfigurationStoreListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result appconfiguration.ConfigurationStoreListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result appconfiguration.ConfigurationStoreListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (result appconfiguration.APIKeyListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (result appconfiguration.APIKeyListResultIterator, err error) ListKeyValue(ctx context.Context, resourceGroupName string, configStoreName string, listKeyValueParameters appconfiguration.ListKeyValueParameters) (result appconfiguration.KeyValue, err error) RegenerateKey(ctx context.Context, resourceGroupName string, configStoreName string, regenerateKeyParameters appconfiguration.RegenerateKeyParameters) (result appconfiguration.APIKey, err error) Update(ctx context.Context, resourceGroupName string, configStoreName string, configStoreUpdateParameters appconfiguration.ConfigurationStoreUpdateParameters) (result appconfiguration.ConfigurationStoresUpdateFuture, err error) @@ -41,6 +44,7 @@ var _ ConfigurationStoresClientAPI = (*appconfiguration.ConfigurationStoresClien type OperationsClientAPI interface { CheckNameAvailability(ctx context.Context, checkNameAvailabilityParameters appconfiguration.CheckNameAvailabilityParameters) (result appconfiguration.NameAvailabilityStatus, err error) List(ctx context.Context, skipToken string) (result appconfiguration.OperationDefinitionListResultPage, err error) + ListComplete(ctx context.Context, skipToken string) (result appconfiguration.OperationDefinitionListResultIterator, err error) } var _ OperationsClientAPI = (*appconfiguration.OperationsClient)(nil) diff --git a/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/client.go b/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/client.go index 4711bc925b6b..245fd3981c2e 100644 --- a/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/client.go +++ b/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/configurationstores.go b/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/configurationstores.go index d5263579ac0c..bb8ca34c2ad6 100644 --- a/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/configurationstores.go +++ b/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/configurationstores.go @@ -36,7 +36,9 @@ func NewConfigurationStoresClient(subscriptionID string) ConfigurationStoresClie return NewConfigurationStoresClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationStoresClientWithBaseURI creates an instance of the ConfigurationStoresClient client. +// NewConfigurationStoresClientWithBaseURI creates an instance of the ConfigurationStoresClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewConfigurationStoresClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationStoresClient { return ConfigurationStoresClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/operations.go b/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/operations.go index 7909910cb614..d335b9019cd1 100644 --- a/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/operations.go +++ b/services/preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/appconfigurationapi/interfaces.go b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/appconfigurationapi/interfaces.go new file mode 100644 index 000000000000..94692adb05c8 --- /dev/null +++ b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/appconfigurationapi/interfaces.go @@ -0,0 +1,70 @@ +package appconfigurationapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration" +) + +// ConfigurationStoresClientAPI contains the set of methods on the ConfigurationStoresClient type. +type ConfigurationStoresClientAPI interface { + Create(ctx context.Context, resourceGroupName string, configStoreName string, configStoreCreationParameters appconfiguration.ConfigurationStore) (result appconfiguration.ConfigurationStoresCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.ConfigurationStoresDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.ConfigurationStore, err error) + List(ctx context.Context, skipToken string) (result appconfiguration.ConfigurationStoreListResultPage, err error) + ListComplete(ctx context.Context, skipToken string) (result appconfiguration.ConfigurationStoreListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result appconfiguration.ConfigurationStoreListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result appconfiguration.ConfigurationStoreListResultIterator, err error) + ListKeys(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (result appconfiguration.APIKeyListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (result appconfiguration.APIKeyListResultIterator, err error) + ListKeyValue(ctx context.Context, resourceGroupName string, configStoreName string, listKeyValueParameters appconfiguration.ListKeyValueParameters) (result appconfiguration.KeyValue, err error) + RegenerateKey(ctx context.Context, resourceGroupName string, configStoreName string, regenerateKeyParameters appconfiguration.RegenerateKeyParameters) (result appconfiguration.APIKey, err error) + Update(ctx context.Context, resourceGroupName string, configStoreName string, configStoreUpdateParameters appconfiguration.ConfigurationStoreUpdateParameters) (result appconfiguration.ConfigurationStoresUpdateFuture, err error) +} + +var _ ConfigurationStoresClientAPI = (*appconfiguration.ConfigurationStoresClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + CheckNameAvailability(ctx context.Context, checkNameAvailabilityParameters appconfiguration.CheckNameAvailabilityParameters) (result appconfiguration.NameAvailabilityStatus, err error) + List(ctx context.Context, skipToken string) (result appconfiguration.OperationDefinitionListResultPage, err error) + ListComplete(ctx context.Context, skipToken string) (result appconfiguration.OperationDefinitionListResultIterator, err error) +} + +var _ OperationsClientAPI = (*appconfiguration.OperationsClient)(nil) + +// PrivateEndpointConnectionsClientAPI contains the set of methods on the PrivateEndpointConnectionsClient type. +type PrivateEndpointConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, configStoreName string, privateEndpointConnectionName string, privateEndpointConnection appconfiguration.PrivateEndpointConnection) (result appconfiguration.PrivateEndpointConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, configStoreName string, privateEndpointConnectionName string) (result appconfiguration.PrivateEndpointConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, configStoreName string, privateEndpointConnectionName string) (result appconfiguration.PrivateEndpointConnection, err error) + ListByConfigurationStore(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.PrivateEndpointConnectionListResultPage, err error) + ListByConfigurationStoreComplete(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.PrivateEndpointConnectionListResultIterator, err error) +} + +var _ PrivateEndpointConnectionsClientAPI = (*appconfiguration.PrivateEndpointConnectionsClient)(nil) + +// PrivateLinkResourcesClientAPI contains the set of methods on the PrivateLinkResourcesClient type. +type PrivateLinkResourcesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, configStoreName string, groupName string) (result appconfiguration.PrivateLinkResource, err error) + ListByConfigurationStore(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.PrivateLinkResourceListResultPage, err error) + ListByConfigurationStoreComplete(ctx context.Context, resourceGroupName string, configStoreName string) (result appconfiguration.PrivateLinkResourceListResultIterator, err error) +} + +var _ PrivateLinkResourcesClientAPI = (*appconfiguration.PrivateLinkResourcesClient)(nil) diff --git a/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/client.go b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/client.go new file mode 100644 index 000000000000..a7040ee5a2f7 --- /dev/null +++ b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/client.go @@ -0,0 +1,52 @@ +// Package appconfiguration implements the Azure ARM Appconfiguration service API version 2019-11-01-preview. +// +// +package appconfiguration + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Appconfiguration + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Appconfiguration. +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/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/configurationstores.go b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/configurationstores.go new file mode 100644 index 000000000000..0f27645dcfef --- /dev/null +++ b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/configurationstores.go @@ -0,0 +1,935 @@ +package appconfiguration + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ConfigurationStoresClient is the client for the ConfigurationStores methods of the Appconfiguration service. +type ConfigurationStoresClient struct { + BaseClient +} + +// NewConfigurationStoresClient creates an instance of the ConfigurationStoresClient client. +func NewConfigurationStoresClient(subscriptionID string) ConfigurationStoresClient { + return NewConfigurationStoresClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewConfigurationStoresClientWithBaseURI creates an instance of the ConfigurationStoresClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewConfigurationStoresClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationStoresClient { + return ConfigurationStoresClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a configuration store with the specified parameters. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// configStoreCreationParameters - the parameters for creating a configuration store. +func (client ConfigurationStoresClient) Create(ctx context.Context, resourceGroupName string, configStoreName string, configStoreCreationParameters ConfigurationStore) (result ConfigurationStoresCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}, + {TargetValue: configStoreCreationParameters, + Constraints: []validation.Constraint{{Target: "configStoreCreationParameters.Sku", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "configStoreCreationParameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("appconfiguration.ConfigurationStoresClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, configStoreName, configStoreCreationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ConfigurationStoresClient) CreatePreparer(ctx context.Context, resourceGroupName string, configStoreName string, configStoreCreationParameters ConfigurationStore) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}", pathParameters), + autorest.WithJSON(configStoreCreationParameters), + 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 ConfigurationStoresClient) CreateSender(req *http.Request) (future ConfigurationStoresCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) CreateResponder(resp *http.Response) (result ConfigurationStore, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a configuration store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +func (client ConfigurationStoresClient) Delete(ctx context.Context, resourceGroupName string, configStoreName string) (result ConfigurationStoresDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.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: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.ConfigurationStoresClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, configStoreName) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ConfigurationStoresClient) DeletePreparer(ctx context.Context, resourceGroupName string, configStoreName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}", 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 ConfigurationStoresClient) DeleteSender(req *http.Request) (future ConfigurationStoresDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the properties of the specified configuration store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +func (client ConfigurationStoresClient) Get(ctx context.Context, resourceGroupName string, configStoreName string) (result ConfigurationStore, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.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: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.ConfigurationStoresClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, configStoreName) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ConfigurationStoresClient) GetPreparer(ctx context.Context, resourceGroupName string, configStoreName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ConfigurationStoresClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) GetResponder(resp *http.Response) (result ConfigurationStore, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the configuration stores for a given subscription. +// Parameters: +// skipToken - a skip token is used to continue retrieving items after an operation returns 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. +func (client ConfigurationStoresClient) List(ctx context.Context, skipToken string) (result ConfigurationStoreListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.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, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "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, "appconfiguration.ConfigurationStoresClient", "List", resp, "Failure sending request") + return + } + + result.cslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ConfigurationStoresClient) ListPreparer(ctx context.Context, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/configurationStores", 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 ConfigurationStoresClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) ListResponder(resp *http.Response) (result ConfigurationStoreListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ConfigurationStoresClient) listNextResults(ctx context.Context, lastResults ConfigurationStoreListResult) (result ConfigurationStoreListResult, err error) { + req, err := lastResults.configurationStoreListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "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, "appconfiguration.ConfigurationStoresClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ConfigurationStoresClient) ListComplete(ctx context.Context, skipToken string) (result ConfigurationStoreListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, skipToken) + return +} + +// ListByResourceGroup lists the configuration stores for a given resource group. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// skipToken - a skip token is used to continue retrieving items after an operation returns 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. +func (client ConfigurationStoresClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result ConfigurationStoreListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.cslr.Response.Response != nil { + sc = result.cslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.cslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.cslr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ConfigurationStoresClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + 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.AppConfiguration/configurationStores", 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 ConfigurationStoresClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) ListByResourceGroupResponder(resp *http.Response) (result ConfigurationStoreListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client ConfigurationStoresClient) listByResourceGroupNextResults(ctx context.Context, lastResults ConfigurationStoreListResult) (result ConfigurationStoreListResult, err error) { + req, err := lastResults.configurationStoreListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "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, "appconfiguration.ConfigurationStoresClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ConfigurationStoresClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result ConfigurationStoreListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.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, skipToken) + return +} + +// ListKeys lists the access key for the specified configuration store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// skipToken - a skip token is used to continue retrieving items after an operation returns 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. +func (client ConfigurationStoresClient) ListKeys(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (result APIKeyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.ListKeys") + defer func() { + sc := -1 + if result.aklr.Response.Response != nil { + sc = result.aklr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.ConfigurationStoresClient", "ListKeys", err.Error()) + } + + result.fn = client.listKeysNextResults + req, err := client.ListKeysPreparer(ctx, resourceGroupName, configStoreName, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListKeys", nil, "Failure preparing request") + return + } + + resp, err := client.ListKeysSender(req) + if err != nil { + result.aklr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListKeys", resp, "Failure sending request") + return + } + + result.aklr, err = client.ListKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListKeys", resp, "Failure responding to request") + } + + return +} + +// ListKeysPreparer prepares the ListKeys request. +func (client ConfigurationStoresClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/ListKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListKeysSender sends the ListKeys request. The method will close the +// http.Response Body if it receives an error. +func (client ConfigurationStoresClient) ListKeysSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListKeysResponder handles the response to the ListKeys request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) ListKeysResponder(resp *http.Response) (result APIKeyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listKeysNextResults retrieves the next set of results, if any. +func (client ConfigurationStoresClient) listKeysNextResults(ctx context.Context, lastResults APIKeyListResult) (result APIKeyListResult, err error) { + req, err := lastResults.aPIKeyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "listKeysNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "listKeysNextResults", resp, "Failure sending next results request") + } + result, err = client.ListKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "listKeysNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListKeysComplete enumerates all values, automatically crossing page boundaries as required. +func (client ConfigurationStoresClient) ListKeysComplete(ctx context.Context, resourceGroupName string, configStoreName string, skipToken string) (result APIKeyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.ListKeys") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListKeys(ctx, resourceGroupName, configStoreName, skipToken) + return +} + +// ListKeyValue lists a configuration store key-value. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// listKeyValueParameters - the parameters for retrieving a key-value. +func (client ConfigurationStoresClient) ListKeyValue(ctx context.Context, resourceGroupName string, configStoreName string, listKeyValueParameters ListKeyValueParameters) (result KeyValue, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.ListKeyValue") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}, + {TargetValue: listKeyValueParameters, + Constraints: []validation.Constraint{{Target: "listKeyValueParameters.Key", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.ConfigurationStoresClient", "ListKeyValue", err.Error()) + } + + req, err := client.ListKeyValuePreparer(ctx, resourceGroupName, configStoreName, listKeyValueParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListKeyValue", nil, "Failure preparing request") + return + } + + resp, err := client.ListKeyValueSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListKeyValue", resp, "Failure sending request") + return + } + + result, err = client.ListKeyValueResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "ListKeyValue", resp, "Failure responding to request") + } + + return +} + +// ListKeyValuePreparer prepares the ListKeyValue request. +func (client ConfigurationStoresClient) ListKeyValuePreparer(ctx context.Context, resourceGroupName string, configStoreName string, listKeyValueParameters ListKeyValueParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}/listKeyValue", pathParameters), + autorest.WithJSON(listKeyValueParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListKeyValueSender sends the ListKeyValue request. The method will close the +// http.Response Body if it receives an error. +func (client ConfigurationStoresClient) ListKeyValueSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListKeyValueResponder handles the response to the ListKeyValue request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) ListKeyValueResponder(resp *http.Response) (result KeyValue, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegenerateKey regenerates an access key for the specified configuration store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// regenerateKeyParameters - the parameters for regenerating an access key. +func (client ConfigurationStoresClient) RegenerateKey(ctx context.Context, resourceGroupName string, configStoreName string, regenerateKeyParameters RegenerateKeyParameters) (result APIKey, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.RegenerateKey") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.ConfigurationStoresClient", "RegenerateKey", err.Error()) + } + + req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, configStoreName, regenerateKeyParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "RegenerateKey", nil, "Failure preparing request") + return + } + + resp, err := client.RegenerateKeySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "RegenerateKey", resp, "Failure sending request") + return + } + + result, err = client.RegenerateKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "RegenerateKey", resp, "Failure responding to request") + } + + return +} + +// RegenerateKeyPreparer prepares the RegenerateKey request. +func (client ConfigurationStoresClient) RegenerateKeyPreparer(ctx context.Context, resourceGroupName string, configStoreName string, regenerateKeyParameters RegenerateKeyParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}/RegenerateKey", pathParameters), + autorest.WithJSON(regenerateKeyParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegenerateKeySender sends the RegenerateKey request. The method will close the +// http.Response Body if it receives an error. +func (client ConfigurationStoresClient) RegenerateKeySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// RegenerateKeyResponder handles the response to the RegenerateKey request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) RegenerateKeyResponder(resp *http.Response) (result APIKey, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates a configuration store with the specified parameters. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// configStoreUpdateParameters - the parameters for updating a configuration store. +func (client ConfigurationStoresClient) Update(ctx context.Context, resourceGroupName string, configStoreName string, configStoreUpdateParameters ConfigurationStoreUpdateParameters) (result ConfigurationStoresUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoresClient.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: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.ConfigurationStoresClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, configStoreName, configStoreUpdateParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ConfigurationStoresClient) UpdatePreparer(ctx context.Context, resourceGroupName string, configStoreName string, configStoreUpdateParameters ConfigurationStoreUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}", pathParameters), + autorest.WithJSON(configStoreUpdateParameters), + 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 ConfigurationStoresClient) UpdateSender(req *http.Request) (future ConfigurationStoresUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ConfigurationStoresClient) UpdateResponder(resp *http.Response) (result ConfigurationStore, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/models.go b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/models.go new file mode 100644 index 000000000000..cbbb68dd266c --- /dev/null +++ b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/models.go @@ -0,0 +1,1570 @@ +package appconfiguration + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration" + +// ActionsRequired enumerates the values for actions required. +type ActionsRequired string + +const ( + // None ... + None ActionsRequired = "None" + // Recreate ... + Recreate ActionsRequired = "Recreate" +) + +// PossibleActionsRequiredValues returns an array of possible values for the ActionsRequired const type. +func PossibleActionsRequiredValues() []ActionsRequired { + return []ActionsRequired{None, Recreate} +} + +// ConnectionStatus enumerates the values for connection status. +type ConnectionStatus string + +const ( + // Approved ... + Approved ConnectionStatus = "Approved" + // Disconnected ... + Disconnected ConnectionStatus = "Disconnected" + // Pending ... + Pending ConnectionStatus = "Pending" + // Rejected ... + Rejected ConnectionStatus = "Rejected" +) + +// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type. +func PossibleConnectionStatusValues() []ConnectionStatus { + return []ConnectionStatus{Approved, Disconnected, Pending, Rejected} +} + +// IdentityType enumerates the values for identity type. +type IdentityType string + +const ( + // IdentityTypeNone ... + IdentityTypeNone IdentityType = "None" + // IdentityTypeSystemAssigned ... + IdentityTypeSystemAssigned IdentityType = "SystemAssigned" + // IdentityTypeSystemAssignedUserAssigned ... + IdentityTypeSystemAssignedUserAssigned IdentityType = "SystemAssigned, UserAssigned" + // IdentityTypeUserAssigned ... + IdentityTypeUserAssigned IdentityType = "UserAssigned" +) + +// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{IdentityTypeNone, IdentityTypeSystemAssigned, IdentityTypeSystemAssignedUserAssigned, IdentityTypeUserAssigned} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // Canceled ... + Canceled ProvisioningState = "Canceled" + // Creating ... + Creating ProvisioningState = "Creating" + // Deleting ... + Deleting ProvisioningState = "Deleting" + // Failed ... + Failed ProvisioningState = "Failed" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" + // Updating ... + Updating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{Canceled, Creating, Deleting, Failed, Succeeded, Updating} +} + +// APIKey an API key used for authenticating with a configuration store endpoint. +type APIKey struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The key ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; A name for the key describing its usage. + Name *string `json:"name,omitempty"` + // Value - READ-ONLY; The value of the key that is used for authentication purposes. + Value *string `json:"value,omitempty"` + // ConnectionString - READ-ONLY; A connection string that can be used by supporting clients for authentication. + ConnectionString *string `json:"connectionString,omitempty"` + // LastModified - READ-ONLY; The last time any of the key's properties were modified. + LastModified *date.Time `json:"lastModified,omitempty"` + // ReadOnly - READ-ONLY; Whether this key can only be used for read operations. + ReadOnly *bool `json:"readOnly,omitempty"` +} + +// APIKeyListResult the result of a request to list API keys. +type APIKeyListResult struct { + autorest.Response `json:"-"` + // Value - The collection value. + Value *[]APIKey `json:"value,omitempty"` + // NextLink - The URI that can be used to request the next set of paged results. + NextLink *string `json:"nextLink,omitempty"` +} + +// APIKeyListResultIterator provides access to a complete listing of APIKey values. +type APIKeyListResultIterator struct { + i int + page APIKeyListResultPage +} + +// 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 *APIKeyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/APIKeyListResultIterator.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 *APIKeyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter APIKeyListResultIterator) 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 APIKeyListResultIterator) Response() APIKeyListResult { + 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 APIKeyListResultIterator) Value() APIKey { + if !iter.page.NotDone() { + return APIKey{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the APIKeyListResultIterator type. +func NewAPIKeyListResultIterator(page APIKeyListResultPage) APIKeyListResultIterator { + return APIKeyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aklr APIKeyListResult) IsEmpty() bool { + return aklr.Value == nil || len(*aklr.Value) == 0 +} + +// aPIKeyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aklr APIKeyListResult) aPIKeyListResultPreparer(ctx context.Context) (*http.Request, error) { + if aklr.NextLink == nil || len(to.String(aklr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aklr.NextLink))) +} + +// APIKeyListResultPage contains a page of APIKey values. +type APIKeyListResultPage struct { + fn func(context.Context, APIKeyListResult) (APIKeyListResult, error) + aklr APIKeyListResult +} + +// 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 *APIKeyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/APIKeyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.aklr) + if err != nil { + return err + } + page.aklr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *APIKeyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page APIKeyListResultPage) NotDone() bool { + return !page.aklr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page APIKeyListResultPage) Response() APIKeyListResult { + return page.aklr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page APIKeyListResultPage) Values() []APIKey { + if page.aklr.IsEmpty() { + return nil + } + return *page.aklr.Value +} + +// Creates a new instance of the APIKeyListResultPage type. +func NewAPIKeyListResultPage(getNextPage func(context.Context, APIKeyListResult) (APIKeyListResult, error)) APIKeyListResultPage { + return APIKeyListResultPage{fn: getNextPage} +} + +// CheckNameAvailabilityParameters parameters used for checking whether a resource name is available. +type CheckNameAvailabilityParameters struct { + // Name - The name to check for availability. + Name *string `json:"name,omitempty"` + // Type - The resource type to check for name availability. + Type *string `json:"type,omitempty"` +} + +// ConfigurationStore the configuration store along with all resource properties. The Configuration Store +// will have all information to begin utilizing it. +type ConfigurationStore struct { + autorest.Response `json:"-"` + // Identity - The managed identity information, if configured. + Identity *ResourceIdentity `json:"identity,omitempty"` + // ConfigurationStoreProperties - The properties of a configuration store. + *ConfigurationStoreProperties `json:"properties,omitempty"` + // Sku - The sku of the configuration store. + Sku *Sku `json:"sku,omitempty"` + // ID - READ-ONLY; The resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource. This cannot be changed after the resource is created. + Location *string `json:"location,omitempty"` + // Tags - The tags of the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ConfigurationStore. +func (cs ConfigurationStore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cs.Identity != nil { + objectMap["identity"] = cs.Identity + } + if cs.ConfigurationStoreProperties != nil { + objectMap["properties"] = cs.ConfigurationStoreProperties + } + if cs.Sku != nil { + objectMap["sku"] = cs.Sku + } + if cs.Location != nil { + objectMap["location"] = cs.Location + } + if cs.Tags != nil { + objectMap["tags"] = cs.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ConfigurationStore struct. +func (cs *ConfigurationStore) UnmarshalJSON(body []byte) error { + 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 ResourceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + cs.Identity = &identity + } + case "properties": + if v != nil { + var configurationStoreProperties ConfigurationStoreProperties + err = json.Unmarshal(*v, &configurationStoreProperties) + if err != nil { + return err + } + cs.ConfigurationStoreProperties = &configurationStoreProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + cs.Sku = &sku + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cs.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cs.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cs.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cs.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cs.Tags = tags + } + } + } + + return nil +} + +// ConfigurationStoreListResult the result of a request to list configuration stores. +type ConfigurationStoreListResult struct { + autorest.Response `json:"-"` + // Value - The collection value. + Value *[]ConfigurationStore `json:"value,omitempty"` + // NextLink - The URI that can be used to request the next set of paged results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ConfigurationStoreListResultIterator provides access to a complete listing of ConfigurationStore values. +type ConfigurationStoreListResultIterator struct { + i int + page ConfigurationStoreListResultPage +} + +// 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 *ConfigurationStoreListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoreListResultIterator.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 *ConfigurationStoreListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ConfigurationStoreListResultIterator) 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 ConfigurationStoreListResultIterator) Response() ConfigurationStoreListResult { + 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 ConfigurationStoreListResultIterator) Value() ConfigurationStore { + if !iter.page.NotDone() { + return ConfigurationStore{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ConfigurationStoreListResultIterator type. +func NewConfigurationStoreListResultIterator(page ConfigurationStoreListResultPage) ConfigurationStoreListResultIterator { + return ConfigurationStoreListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (cslr ConfigurationStoreListResult) IsEmpty() bool { + return cslr.Value == nil || len(*cslr.Value) == 0 +} + +// configurationStoreListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cslr ConfigurationStoreListResult) configurationStoreListResultPreparer(ctx context.Context) (*http.Request, error) { + if cslr.NextLink == nil || len(to.String(cslr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cslr.NextLink))) +} + +// ConfigurationStoreListResultPage contains a page of ConfigurationStore values. +type ConfigurationStoreListResultPage struct { + fn func(context.Context, ConfigurationStoreListResult) (ConfigurationStoreListResult, error) + cslr ConfigurationStoreListResult +} + +// 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 *ConfigurationStoreListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationStoreListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.cslr) + if err != nil { + return err + } + page.cslr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ConfigurationStoreListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ConfigurationStoreListResultPage) NotDone() bool { + return !page.cslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ConfigurationStoreListResultPage) Response() ConfigurationStoreListResult { + return page.cslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ConfigurationStoreListResultPage) Values() []ConfigurationStore { + if page.cslr.IsEmpty() { + return nil + } + return *page.cslr.Value +} + +// Creates a new instance of the ConfigurationStoreListResultPage type. +func NewConfigurationStoreListResultPage(getNextPage func(context.Context, ConfigurationStoreListResult) (ConfigurationStoreListResult, error)) ConfigurationStoreListResultPage { + return ConfigurationStoreListResultPage{fn: getNextPage} +} + +// ConfigurationStoreProperties the properties of a configuration store. +type ConfigurationStoreProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of the configuration store. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // CreationDate - READ-ONLY; The creation date of configuration store. + CreationDate *date.Time `json:"creationDate,omitempty"` + // Endpoint - READ-ONLY; The DNS endpoint where the configuration store API will be available. + Endpoint *string `json:"endpoint,omitempty"` + // Encryption - The encryption settings of the configuration store. + Encryption *EncryptionProperties `json:"encryption,omitempty"` +} + +// ConfigurationStorePropertiesUpdateParameters the properties for updating a configuration store. +type ConfigurationStorePropertiesUpdateParameters struct { + // Encryption - The encryption settings of the configuration store. + Encryption *EncryptionProperties `json:"encryption,omitempty"` +} + +// ConfigurationStoresCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConfigurationStoresCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConfigurationStoresCreateFuture) Result(client ConfigurationStoresClient) (cs ConfigurationStore, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("appconfiguration.ConfigurationStoresCreateFuture") + 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.CreateResponder(cs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresCreateFuture", "Result", cs.Response.Response, "Failure responding to request") + } + } + return +} + +// ConfigurationStoresDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConfigurationStoresDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConfigurationStoresDeleteFuture) Result(client ConfigurationStoresClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("appconfiguration.ConfigurationStoresDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ConfigurationStoresUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConfigurationStoresUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConfigurationStoresUpdateFuture) Result(client ConfigurationStoresClient) (cs ConfigurationStore, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.ConfigurationStoresUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("appconfiguration.ConfigurationStoresUpdateFuture") + 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, "appconfiguration.ConfigurationStoresUpdateFuture", "Result", cs.Response.Response, "Failure responding to request") + } + } + return +} + +// ConfigurationStoreUpdateParameters the parameters for updating a configuration store. +type ConfigurationStoreUpdateParameters struct { + // ConfigurationStorePropertiesUpdateParameters - The properties for updating a configuration store. + *ConfigurationStorePropertiesUpdateParameters `json:"properties,omitempty"` + // Identity - The managed identity information for the configuration store. + Identity *ResourceIdentity `json:"identity,omitempty"` + // Sku - The SKU of the configuration store. + Sku *Sku `json:"sku,omitempty"` + // Tags - The ARM resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ConfigurationStoreUpdateParameters. +func (csup ConfigurationStoreUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if csup.ConfigurationStorePropertiesUpdateParameters != nil { + objectMap["properties"] = csup.ConfigurationStorePropertiesUpdateParameters + } + if csup.Identity != nil { + objectMap["identity"] = csup.Identity + } + if csup.Sku != nil { + objectMap["sku"] = csup.Sku + } + if csup.Tags != nil { + objectMap["tags"] = csup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ConfigurationStoreUpdateParameters struct. +func (csup *ConfigurationStoreUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*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 configurationStorePropertiesUpdateParameters ConfigurationStorePropertiesUpdateParameters + err = json.Unmarshal(*v, &configurationStorePropertiesUpdateParameters) + if err != nil { + return err + } + csup.ConfigurationStorePropertiesUpdateParameters = &configurationStorePropertiesUpdateParameters + } + case "identity": + if v != nil { + var identity ResourceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + csup.Identity = &identity + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + csup.Sku = &sku + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + csup.Tags = tags + } + } + } + + return nil +} + +// EncryptionProperties the encryption settings for a configuration store. +type EncryptionProperties struct { + // KeyVaultProperties - Key vault properties. + KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"` +} + +// Error appConfiguration error object. +type Error struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Message - Error message. + Message *string `json:"message,omitempty"` +} + +// KeyValue the result of a request to retrieve a key-value from the specified configuration store. +type KeyValue struct { + autorest.Response `json:"-"` + // Key - READ-ONLY; The primary identifier of a key-value. + // The key is used in unison with the label to uniquely identify a key-value. + Key *string `json:"key,omitempty"` + // Label - READ-ONLY; A value used to group key-values. + // The label is used in unison with the key to uniquely identify a key-value. + Label *string `json:"label,omitempty"` + // Value - READ-ONLY; The value of the key-value. + Value *string `json:"value,omitempty"` + // ContentType - READ-ONLY; The content type of the key-value's value. + // Providing a proper content-type can enable transformations of values when they are retrieved by applications. + ContentType *string `json:"contentType,omitempty"` + // ETag - READ-ONLY; An ETag indicating the state of a key-value within a configuration store. + ETag *string `json:"eTag,omitempty"` + // LastModified - READ-ONLY; The last time a modifying operation was performed on the given key-value. + LastModified *date.Time `json:"lastModified,omitempty"` + // Locked - READ-ONLY; A value indicating whether the key-value is locked. + // A locked key-value may not be modified until it is unlocked. + Locked *bool `json:"locked,omitempty"` + // Tags - READ-ONLY; A dictionary of tags that can help identify what a key-value may be applicable for. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for KeyValue. +func (kv KeyValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// KeyVaultProperties settings concerning key vault encryption for a configuration store. +type KeyVaultProperties struct { + // KeyIdentifier - The URI of the key vault key used to encrypt data. + KeyIdentifier *string `json:"keyIdentifier,omitempty"` + // IdentityClientID - The client id of the identity which will be used to access key vault. + IdentityClientID *string `json:"identityClientId,omitempty"` +} + +// ListKeyValueParameters the parameters used to list a configuration store key-value +type ListKeyValueParameters struct { + // Key - The key to retrieve. + Key *string `json:"key,omitempty"` + // Label - The label of the key. + Label *string `json:"label,omitempty"` +} + +// NameAvailabilityStatus the result of a request to check the availability of a resource name. +type NameAvailabilityStatus struct { + autorest.Response `json:"-"` + // NameAvailable - READ-ONLY; The value indicating whether the resource name is available. + NameAvailable *bool `json:"nameAvailable,omitempty"` + // Message - READ-ONLY; If any, the error message that provides more detail for the reason that the name is not available. + Message *string `json:"message,omitempty"` + // Reason - READ-ONLY; If any, the reason that the name is not available. + Reason *string `json:"reason,omitempty"` +} + +// OperationDefinition the definition of a configuration store operation. +type OperationDefinition struct { + // Name - Operation name: {provider}/{resource}/{operation}. + Name *string `json:"name,omitempty"` + // Display - The display information for the configuration store operation. + Display *OperationDefinitionDisplay `json:"display,omitempty"` +} + +// OperationDefinitionDisplay the display information for a configuration store operation. +type OperationDefinitionDisplay struct { + // Provider - READ-ONLY; The resource provider name: Microsoft App Configuration." + Provider *string `json:"provider,omitempty"` + // Resource - The resource on which the operation is performed. + Resource *string `json:"resource,omitempty"` + // Operation - The operation that users can perform. + Operation *string `json:"operation,omitempty"` + // Description - The description for the operation. + Description *string `json:"description,omitempty"` +} + +// OperationDefinitionListResult the result of a request to list configuration store operations. +type OperationDefinitionListResult struct { + autorest.Response `json:"-"` + // Value - The collection value. + Value *[]OperationDefinition `json:"value,omitempty"` + // NextLink - The URI that can be used to request the next set of paged results. + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationDefinitionListResultIterator provides access to a complete listing of OperationDefinition +// values. +type OperationDefinitionListResultIterator struct { + i int + page OperationDefinitionListResultPage +} + +// 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 *OperationDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationDefinitionListResultIterator.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 *OperationDefinitionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OperationDefinitionListResultIterator) 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 OperationDefinitionListResultIterator) Response() OperationDefinitionListResult { + 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 OperationDefinitionListResultIterator) Value() OperationDefinition { + if !iter.page.NotDone() { + return OperationDefinition{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OperationDefinitionListResultIterator type. +func NewOperationDefinitionListResultIterator(page OperationDefinitionListResultPage) OperationDefinitionListResultIterator { + return OperationDefinitionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (odlr OperationDefinitionListResult) IsEmpty() bool { + return odlr.Value == nil || len(*odlr.Value) == 0 +} + +// operationDefinitionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (odlr OperationDefinitionListResult) operationDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) { + if odlr.NextLink == nil || len(to.String(odlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(odlr.NextLink))) +} + +// OperationDefinitionListResultPage contains a page of OperationDefinition values. +type OperationDefinitionListResultPage struct { + fn func(context.Context, OperationDefinitionListResult) (OperationDefinitionListResult, error) + odlr OperationDefinitionListResult +} + +// 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 *OperationDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationDefinitionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.odlr) + if err != nil { + return err + } + page.odlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationDefinitionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationDefinitionListResultPage) NotDone() bool { + return !page.odlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationDefinitionListResultPage) Response() OperationDefinitionListResult { + return page.odlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationDefinitionListResultPage) Values() []OperationDefinition { + if page.odlr.IsEmpty() { + return nil + } + return *page.odlr.Value +} + +// Creates a new instance of the OperationDefinitionListResultPage type. +func NewOperationDefinitionListResultPage(getNextPage func(context.Context, OperationDefinitionListResult) (OperationDefinitionListResult, error)) OperationDefinitionListResultPage { + return OperationDefinitionListResultPage{fn: getNextPage} +} + +// PrivateEndpoint private endpoint which a connection belongs to. +type PrivateEndpoint struct { + // ID - The resource Id for private endpoint + ID *string `json:"id,omitempty"` +} + +// PrivateEndpointConnection a private endpoint connection +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` + // PrivateEndpointConnectionProperties - The properties of a private endpoint. + *PrivateEndpointConnectionProperties `json:"properties,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 "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 + } + case "properties": + if v != nil { + var privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) + if err != nil { + return err + } + pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + } + } + + return nil +} + +// PrivateEndpointConnectionListResult a list of private endpoint connections +type PrivateEndpointConnectionListResult struct { + autorest.Response `json:"-"` + // Value - The collection value. + Value *[]PrivateEndpointConnection `json:"value,omitempty"` + // NextLink - The URI that can be used to request the next set of paged results. + 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 +} + +// 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.NextLink == nil || len(to.String(peclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.peclr) + if err != nil { + return err + } + page.peclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{fn: getNextPage} +} + +// PrivateEndpointConnectionProperties properties of a private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // ProvisioningState - READ-ONLY; The provisioning status of the private endpoint connection. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateEndpoint - The resource of private endpoint. + 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"` +} + +// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type PrivateEndpointConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) Result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("appconfiguration.PrivateEndpointConnectionsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(pec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsCreateOrUpdateFuture", "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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsDeleteFuture) Result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("appconfiguration.PrivateEndpointConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateLinkResource a resource that supports private link capabilities. +type PrivateLinkResource struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` + // PrivateLinkResourceProperties - Private link resource properties. + *PrivateLinkResourceProperties `json:"properties,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 "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 + } + case "properties": + if v != nil { + var privateLinkResourceProperties PrivateLinkResourceProperties + err = json.Unmarshal(*v, &privateLinkResourceProperties) + if err != nil { + return err + } + plr.PrivateLinkResourceProperties = &privateLinkResourceProperties + } + } + } + + return nil +} + +// PrivateLinkResourceListResult a list of private link resources. +type PrivateLinkResourceListResult struct { + autorest.Response `json:"-"` + // Value - The collection value. + Value *[]PrivateLinkResource `json:"value,omitempty"` + // NextLink - The URI that can be used to request the next set of paged results. + NextLink *string `json:"nextLink,omitempty"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(plrlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.plrlr) + if err != nil { + return err + } + page.plrlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return PrivateLinkResourceListResultPage{fn: getNextPage} +} + +// 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"` +} + +// PrivateLinkServiceConnectionState the state of a private link service connection. +type PrivateLinkServiceConnectionState struct { + // Status - The private link service connection status. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + Status ConnectionStatus `json:"status,omitempty"` + // Description - The private link service connection description. + Description *string `json:"description,omitempty"` + // ActionsRequired - READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect). Possible values include: 'None', 'Recreate' + ActionsRequired ActionsRequired `json:"actionsRequired,omitempty"` +} + +// RegenerateKeyParameters the parameters used to regenerate an API key. +type RegenerateKeyParameters struct { + // ID - The id of the key to regenerate. + ID *string `json:"id,omitempty"` +} + +// Resource an Azure resource. +type Resource struct { + // ID - READ-ONLY; The resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource. This cannot be changed after the resource is created. + Location *string `json:"location,omitempty"` + // Tags - The tags of the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for 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) +} + +// ResourceIdentity an identity that can be associated with a resource. +type ResourceIdentity struct { + // Type - The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identities. Possible values include: 'IdentityTypeNone', 'IdentityTypeSystemAssigned', 'IdentityTypeUserAssigned', 'IdentityTypeSystemAssignedUserAssigned' + Type IdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user-assigned identities associated with the resource. The user-assigned identity dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]*UserIdentity `json:"userAssignedIdentities"` + // PrincipalID - READ-ONLY; The principal id of the 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 resource's identity. This property will only be provided for a system-assigned identity. + TenantID *string `json:"tenantId,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceIdentity. +func (ri ResourceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ri.Type != "" { + objectMap["type"] = ri.Type + } + if ri.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = ri.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// Sku describes a configuration store SKU. +type Sku struct { + // Name - The SKU name of the configuration store. + Name *string `json:"name,omitempty"` +} + +// UserIdentity a resource identity that is managed by the user of the service. +type UserIdentity struct { + // PrincipalID - READ-ONLY; The principal ID of the user-assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - READ-ONLY; The client ID of the user-assigned identity. + ClientID *string `json:"clientId,omitempty"` +} diff --git a/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/operations.go b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/operations.go new file mode 100644 index 000000000000..75a27a77dea5 --- /dev/null +++ b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/operations.go @@ -0,0 +1,239 @@ +package appconfiguration + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the client for the Operations methods of the Appconfiguration service. +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client 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 checks whether the configuration store name is available for use. +// Parameters: +// checkNameAvailabilityParameters - the object containing information for the availability request. +func (client OperationsClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityParameters CheckNameAvailabilityParameters) (result NameAvailabilityStatus, 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: checkNameAvailabilityParameters, + Constraints: []validation.Constraint{{Target: "checkNameAvailabilityParameters.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "checkNameAvailabilityParameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.OperationsClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, checkNameAvailabilityParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.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, "appconfiguration.OperationsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.OperationsClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client OperationsClient) CheckNameAvailabilityPreparer(ctx context.Context, checkNameAvailabilityParameters CheckNameAvailabilityParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/checkNameAvailability", pathParameters), + autorest.WithJSON(checkNameAvailabilityParameters), + 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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client OperationsClient) CheckNameAvailabilityResponder(resp *http.Response) (result NameAvailabilityStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the operations available from this provider. +// Parameters: +// skipToken - a skip token is used to continue retrieving items after an operation returns 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. +func (client OperationsClient) List(ctx context.Context, skipToken string) (result OperationDefinitionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.odlr.Response.Response != nil { + sc = result.odlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.odlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appconfiguration.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.odlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context, skipToken string) (*http.Request, error) { + const APIVersion = "2019-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.AppConfiguration/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationDefinitionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationDefinitionListResult) (result OperationDefinitionListResult, err error) { + req, err := lastResults.operationDefinitionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "appconfiguration.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, "appconfiguration.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.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, skipToken string) (result OperationDefinitionListResultIterator, 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, skipToken) + return +} diff --git a/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/privateendpointconnections.go b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/privateendpointconnections.go new file mode 100644 index 000000000000..bac28f16e1f6 --- /dev/null +++ b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/privateendpointconnections.go @@ -0,0 +1,438 @@ +package appconfiguration + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateEndpointConnectionsClient is the client for the PrivateEndpointConnections methods of the Appconfiguration +// service. +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)} +} + +// CreateOrUpdate update the state of the specified private endpoint connection associated with the configuration +// store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// privateEndpointConnectionName - private endpoint connection name +// privateEndpointConnection - the private endpoint connection properties. +func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, configStoreName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection) (result PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}, + {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("appconfiguration.PrivateEndpointConnectionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, configStoreName, privateEndpointConnectionName, privateEndpointConnection) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateEndpointConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, configStoreName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-01-preview" + 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.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithJSON(privateEndpointConnection), + 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 PrivateEndpointConnectionsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a private endpoint connection. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// privateEndpointConnectionName - private endpoint connection name +func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, configStoreName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, configStoreName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, configStoreName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified private endpoint connection associated with the configuration store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// privateEndpointConnectionName - private endpoint connection name +func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, configStoreName 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: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, configStoreName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.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, "appconfiguration.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, configStoreName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByConfigurationStore lists all private endpoint connections for a configuration store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +func (client PrivateEndpointConnectionsClient) ListByConfigurationStore(ctx context.Context, resourceGroupName string, configStoreName string) (result PrivateEndpointConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByConfigurationStore") + defer func() { + sc := -1 + if result.peclr.Response.Response != nil { + sc = result.peclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.PrivateEndpointConnectionsClient", "ListByConfigurationStore", err.Error()) + } + + result.fn = client.listByConfigurationStoreNextResults + req, err := client.ListByConfigurationStorePreparer(ctx, resourceGroupName, configStoreName) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "ListByConfigurationStore", nil, "Failure preparing request") + return + } + + resp, err := client.ListByConfigurationStoreSender(req) + if err != nil { + result.peclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "ListByConfigurationStore", resp, "Failure sending request") + return + } + + result.peclr, err = client.ListByConfigurationStoreResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "ListByConfigurationStore", resp, "Failure responding to request") + } + + return +} + +// ListByConfigurationStorePreparer prepares the ListByConfigurationStore request. +func (client PrivateEndpointConnectionsClient) ListByConfigurationStorePreparer(ctx context.Context, resourceGroupName string, configStoreName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByConfigurationStoreSender sends the ListByConfigurationStore request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) ListByConfigurationStoreSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByConfigurationStoreResponder handles the response to the ListByConfigurationStore request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) ListByConfigurationStoreResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByConfigurationStoreNextResults retrieves the next set of results, if any. +func (client PrivateEndpointConnectionsClient) listByConfigurationStoreNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { + req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "listByConfigurationStoreNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByConfigurationStoreSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "listByConfigurationStoreNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByConfigurationStoreResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateEndpointConnectionsClient", "listByConfigurationStoreNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByConfigurationStoreComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateEndpointConnectionsClient) ListByConfigurationStoreComplete(ctx context.Context, resourceGroupName string, configStoreName string) (result PrivateEndpointConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByConfigurationStore") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByConfigurationStore(ctx, resourceGroupName, configStoreName) + return +} diff --git a/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/privatelinkresources.go b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/privatelinkresources.go new file mode 100644 index 000000000000..55f5e130e125 --- /dev/null +++ b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/privatelinkresources.go @@ -0,0 +1,254 @@ +package appconfiguration + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateLinkResourcesClient is the client for the PrivateLinkResources methods of the Appconfiguration service. +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 gets a private link resource that need to be created for a configuration store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +// groupName - the name of the private link resource group. +func (client PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, configStoreName string, groupName 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: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.PrivateLinkResourcesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, configStoreName, groupName) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.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, "appconfiguration.PrivateLinkResourcesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateLinkResourcesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkResourcesClient) GetPreparer(ctx context.Context, resourceGroupName string, configStoreName string, groupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "groupName": autorest.Encode("path", groupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources/{groupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByConfigurationStore gets the private link resources that need to be created for a configuration store. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// configStoreName - the name of the configuration store. +func (client PrivateLinkResourcesClient) ListByConfigurationStore(ctx context.Context, resourceGroupName string, configStoreName string) (result PrivateLinkResourceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByConfigurationStore") + 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: configStoreName, + Constraints: []validation.Constraint{{Target: "configStoreName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "configStoreName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "configStoreName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9_-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appconfiguration.PrivateLinkResourcesClient", "ListByConfigurationStore", err.Error()) + } + + result.fn = client.listByConfigurationStoreNextResults + req, err := client.ListByConfigurationStorePreparer(ctx, resourceGroupName, configStoreName) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateLinkResourcesClient", "ListByConfigurationStore", nil, "Failure preparing request") + return + } + + resp, err := client.ListByConfigurationStoreSender(req) + if err != nil { + result.plrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateLinkResourcesClient", "ListByConfigurationStore", resp, "Failure sending request") + return + } + + result.plrlr, err = client.ListByConfigurationStoreResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateLinkResourcesClient", "ListByConfigurationStore", resp, "Failure responding to request") + } + + return +} + +// ListByConfigurationStorePreparer prepares the ListByConfigurationStore request. +func (client PrivateLinkResourcesClient) ListByConfigurationStorePreparer(ctx context.Context, resourceGroupName string, configStoreName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configStoreName": autorest.Encode("path", configStoreName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-11-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.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByConfigurationStoreSender sends the ListByConfigurationStore request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkResourcesClient) ListByConfigurationStoreSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByConfigurationStoreResponder handles the response to the ListByConfigurationStore request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) ListByConfigurationStoreResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByConfigurationStoreNextResults retrieves the next set of results, if any. +func (client PrivateLinkResourcesClient) listByConfigurationStoreNextResults(ctx context.Context, lastResults PrivateLinkResourceListResult) (result PrivateLinkResourceListResult, err error) { + req, err := lastResults.privateLinkResourceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "appconfiguration.PrivateLinkResourcesClient", "listByConfigurationStoreNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByConfigurationStoreSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "appconfiguration.PrivateLinkResourcesClient", "listByConfigurationStoreNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByConfigurationStoreResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appconfiguration.PrivateLinkResourcesClient", "listByConfigurationStoreNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByConfigurationStoreComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkResourcesClient) ListByConfigurationStoreComplete(ctx context.Context, resourceGroupName string, configStoreName string) (result PrivateLinkResourceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByConfigurationStore") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByConfigurationStore(ctx, resourceGroupName, configStoreName) + return +} diff --git a/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/version.go b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/version.go new file mode 100644 index 000000000000..22d39ffd8076 --- /dev/null +++ b/services/preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration/version.go @@ -0,0 +1,30 @@ +package appconfiguration + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " appconfiguration/2019-11-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/appinsights/v1/insights/client.go b/services/preview/appinsights/v1/insights/client.go index 49ccf5f10da4..fb3f1695fa6f 100644 --- a/services/preview/appinsights/v1/insights/client.go +++ b/services/preview/appinsights/v1/insights/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/appinsights/v1/insights/events.go b/services/preview/appinsights/v1/insights/events.go index 391683054cbd..95c2f72af8d5 100644 --- a/services/preview/appinsights/v1/insights/events.go +++ b/services/preview/appinsights/v1/insights/events.go @@ -35,7 +35,8 @@ func NewEventsClient() EventsClient { return NewEventsClientWithBaseURI(DefaultBaseURI) } -// NewEventsClientWithBaseURI creates an instance of the EventsClient client. +// NewEventsClientWithBaseURI creates an instance of the EventsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventsClientWithBaseURI(baseURI string) EventsClient { return EventsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/appinsights/v1/insights/metrics.go b/services/preview/appinsights/v1/insights/metrics.go index 5e52f3ec129d..0d589470f9c0 100644 --- a/services/preview/appinsights/v1/insights/metrics.go +++ b/services/preview/appinsights/v1/insights/metrics.go @@ -36,7 +36,8 @@ func NewMetricsClient() MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/appinsights/v1/insights/query.go b/services/preview/appinsights/v1/insights/query.go index afc606e32d6c..0af8b3e6c75c 100644 --- a/services/preview/appinsights/v1/insights/query.go +++ b/services/preview/appinsights/v1/insights/query.go @@ -36,7 +36,8 @@ func NewQueryClient() QueryClient { return NewQueryClientWithBaseURI(DefaultBaseURI) } -// NewQueryClientWithBaseURI creates an instance of the QueryClient client. +// NewQueryClientWithBaseURI creates an instance of the QueryClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryClientWithBaseURI(baseURI string) QueryClient { return QueryClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/appplatformapi/interfaces.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/appplatformapi/interfaces.go index ed3dd18b4f23..2149383d24e6 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/appplatformapi/interfaces.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/appplatformapi/interfaces.go @@ -32,7 +32,9 @@ type ServicesClientAPI interface { EnableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.TestKeys, err error) Get(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.ServiceResource, err error) List(ctx context.Context, resourceGroupName string) (result appplatform.ServiceResourceListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result appplatform.ServiceResourceListIterator, err error) ListBySubscription(ctx context.Context) (result appplatform.ServiceResourceListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result appplatform.ServiceResourceListIterator, err error) ListTestKeys(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.TestKeys, err error) RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest appplatform.RegenerateTestKeyRequestPayload) (result appplatform.TestKeys, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, resource appplatform.ServiceResource) (result appplatform.ServicesUpdateFuture, err error) @@ -47,6 +49,7 @@ type AppsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, syncStatus string) (result appplatform.AppResource, err error) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, appName string) (result appplatform.ResourceUploadDefinition, err error) List(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.AppResourceCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.AppResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource appplatform.AppResource) (result appplatform.AppsUpdateFuture, err error) } @@ -58,6 +61,7 @@ type BindingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string) (result appplatform.BindingResource, err error) List(ctx context.Context, resourceGroupName string, serviceName string, appName string) (result appplatform.BindingResourceCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, appName string) (result appplatform.BindingResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource appplatform.BindingResource) (result appplatform.BindingResource, err error) } @@ -70,7 +74,9 @@ type DeploymentsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.DeploymentResource, err error) GetLogFileURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.LogFileURLResponse, err error) List(ctx context.Context, resourceGroupName string, serviceName string, appName string, version []string) (result appplatform.DeploymentResourceCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, serviceName string, appName string, version []string) (result appplatform.DeploymentResourceCollectionIterator, err error) ListClusterAllDeployments(ctx context.Context, resourceGroupName string, serviceName string, version []string) (result appplatform.DeploymentResourceCollectionPage, err error) + ListClusterAllDeploymentsComplete(ctx context.Context, resourceGroupName string, serviceName string, version []string) (result appplatform.DeploymentResourceCollectionIterator, err error) Restart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.DeploymentsRestartFuture, err error) Start(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.DeploymentsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.DeploymentsStopFuture, err error) @@ -82,6 +88,7 @@ var _ DeploymentsClientAPI = (*appplatform.DeploymentsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result appplatform.AvailableOperationsPage, err error) + ListComplete(ctx context.Context) (result appplatform.AvailableOperationsIterator, err error) } var _ OperationsClientAPI = (*appplatform.OperationsClient)(nil) diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/apps.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/apps.go index 901e66480740..93650f80f18f 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/apps.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/apps.go @@ -36,7 +36,8 @@ func NewAppsClient(subscriptionID string) AppsClient { return NewAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppsClientWithBaseURI creates an instance of the AppsClient client. +// NewAppsClientWithBaseURI creates an instance of the AppsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient { return AppsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/bindings.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/bindings.go index dd8a40ebcad7..d37e96da2f90 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/bindings.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/bindings.go @@ -35,7 +35,8 @@ func NewBindingsClient(subscriptionID string) BindingsClient { return NewBindingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBindingsClientWithBaseURI creates an instance of the BindingsClient client. +// NewBindingsClientWithBaseURI creates an instance of the BindingsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBindingsClientWithBaseURI(baseURI string, subscriptionID string) BindingsClient { return BindingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/client.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/client.go index cf95f5e086bb..57360ab1ed28 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/client.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/deployments.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/deployments.go index 5b701f3829bc..41f3f10f786a 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/deployments.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/operations.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/operations.go index 8bfb2858835f..5c45b7edb717 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/operations.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/services.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/services.go index 7c3229668f90..15309a634e97 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/services.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/authorizationapi/interfaces.go b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/authorizationapi/interfaces.go index 3856b3d366e2..9255f4da90b6 100644 --- a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/authorizationapi/interfaces.go +++ b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/authorizationapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ClassicAdministratorsClientAPI contains the set of methods on the ClassicAdministratorsClient type. type ClassicAdministratorsClientAPI interface { List(ctx context.Context) (result authorization.ClassicAdministratorListResultPage, err error) + ListComplete(ctx context.Context) (result authorization.ClassicAdministratorListResultIterator, err error) } var _ ClassicAdministratorsClientAPI = (*authorization.ClassicAdministratorsClient)(nil) @@ -33,7 +34,9 @@ var _ ClassicAdministratorsClientAPI = (*authorization.ClassicAdministratorsClie // PermissionsClientAPI contains the set of methods on the PermissionsClient type. type PermissionsClientAPI interface { ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultIterator, err error) } var _ PermissionsClientAPI = (*authorization.PermissionsClient)(nil) @@ -45,6 +48,7 @@ type RoleDefinitionsClientAPI interface { Get(ctx context.Context, scope string, roleDefinitionID string) (result authorization.RoleDefinition, err error) GetByID(ctx context.Context, roleDefinitionID string) (result authorization.RoleDefinition, err error) List(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultPage, err error) + ListComplete(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultIterator, err error) } var _ RoleDefinitionsClientAPI = (*authorization.RoleDefinitionsClient)(nil) @@ -53,6 +57,7 @@ var _ RoleDefinitionsClientAPI = (*authorization.RoleDefinitionsClient)(nil) type ProviderOperationsMetadataClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, APIVersion string, expand string) (result authorization.ProviderOperationsMetadata, err error) List(ctx context.Context, APIVersion string, expand string) (result authorization.ProviderOperationsMetadataListResultPage, err error) + ListComplete(ctx context.Context, APIVersion string, expand string) (result authorization.ProviderOperationsMetadataListResultIterator, err error) } var _ ProviderOperationsMetadataClientAPI = (*authorization.ProviderOperationsMetadataClient)(nil) @@ -73,9 +78,13 @@ type RoleAssignmentsClientAPI interface { Get(ctx context.Context, scope string, roleAssignmentName string) (result authorization.RoleAssignment, err error) GetByID(ctx context.Context, roleAssignmentID string) (result authorization.RoleAssignment, err error) List(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForScope(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForScopeComplete(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) } var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) diff --git a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/classicadministrators.go b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/classicadministrators.go index bffdad6236b7..7b4bdd54396b 100644 --- a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/classicadministrators.go +++ b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/classicadministrators.go @@ -38,7 +38,9 @@ func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministrators return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client. +// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient { return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/client.go b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/client.go index 6b6f6de95ef0..1bf118f80c7d 100644 --- a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/client.go +++ b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/client.go @@ -44,7 +44,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/globaladministrator.go b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/globaladministrator.go index d899a74f7cba..1203f015c7c9 100644 --- a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/globaladministrator.go +++ b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/globaladministrator.go @@ -38,7 +38,9 @@ func NewGlobalAdministratorClient(subscriptionID string) GlobalAdministratorClie return NewGlobalAdministratorClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client. +// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGlobalAdministratorClientWithBaseURI(baseURI string, subscriptionID string) GlobalAdministratorClient { return GlobalAdministratorClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/permissions.go b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/permissions.go index 29f4b6ca82cd..5140e1e02d8a 100644 --- a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/permissions.go +++ b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/permissions.go @@ -38,7 +38,8 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient { return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. +// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient { return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/provideroperationsmetadata.go b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/provideroperationsmetadata.go index c7e814a9dcf2..90d6cf4ad8ab 100644 --- a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/provideroperationsmetadata.go +++ b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/provideroperationsmetadata.go @@ -38,7 +38,9 @@ func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperatio return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client. +// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient { return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/roleassignments.go b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/roleassignments.go index ef14640a4da2..feeaa289424d 100644 --- a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/roleassignments.go +++ b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/roleassignments.go @@ -38,7 +38,8 @@ func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/roledefinitions.go b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/roledefinitions.go index 4c19c4d9a6c7..a1488cb8a1ac 100644 --- a/services/preview/authorization/mgmt/2017-10-01-preview/authorization/roledefinitions.go +++ b/services/preview/authorization/mgmt/2017-10-01-preview/authorization/roledefinitions.go @@ -38,7 +38,8 @@ func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient { return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client. +// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient { return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/authorizationapi/interfaces.go b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/authorizationapi/interfaces.go index c1f30431780a..4bfecc09ce68 100644 --- a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/authorizationapi/interfaces.go +++ b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/authorizationapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ClassicAdministratorsClientAPI contains the set of methods on the ClassicAdministratorsClient type. type ClassicAdministratorsClientAPI interface { List(ctx context.Context) (result authorization.ClassicAdministratorListResultPage, err error) + ListComplete(ctx context.Context) (result authorization.ClassicAdministratorListResultIterator, err error) } var _ ClassicAdministratorsClientAPI = (*authorization.ClassicAdministratorsClient)(nil) @@ -41,6 +42,7 @@ var _ GlobalAdministratorClientAPI = (*authorization.GlobalAdministratorClient)( type ProviderOperationsMetadataClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result authorization.ProviderOperationsMetadata, err error) List(ctx context.Context, expand string) (result authorization.ProviderOperationsMetadataListResultPage, err error) + ListComplete(ctx context.Context, expand string) (result authorization.ProviderOperationsMetadataListResultIterator, err error) } var _ ProviderOperationsMetadataClientAPI = (*authorization.ProviderOperationsMetadataClient)(nil) @@ -54,9 +56,13 @@ type RoleAssignmentsClientAPI interface { Get(ctx context.Context, scope string, roleAssignmentName string) (result authorization.RoleAssignment, err error) GetByID(ctx context.Context, roleID string) (result authorization.RoleAssignment, err error) List(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForScope(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForScopeComplete(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) } var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) @@ -64,7 +70,9 @@ var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) // PermissionsClientAPI contains the set of methods on the PermissionsClient type. type PermissionsClientAPI interface { ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultIterator, err error) } var _ PermissionsClientAPI = (*authorization.PermissionsClient)(nil) @@ -76,6 +84,7 @@ type RoleDefinitionsClientAPI interface { Get(ctx context.Context, scope string, roleDefinitionID string) (result authorization.RoleDefinition, err error) GetByID(ctx context.Context, roleID string) (result authorization.RoleDefinition, err error) List(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultPage, err error) + ListComplete(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultIterator, err error) } var _ RoleDefinitionsClientAPI = (*authorization.RoleDefinitionsClient)(nil) diff --git a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go index c0dc1eeeb41d..57c3e50bc69d 100644 --- a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go +++ b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go @@ -35,7 +35,9 @@ func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministrators return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client. +// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient { return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/client.go b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/client.go index 362420bdfa36..1958a67601a6 100644 --- a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/client.go +++ b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/globaladministrator.go b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/globaladministrator.go index ec555ff00193..3ce564104df9 100644 --- a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/globaladministrator.go +++ b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/globaladministrator.go @@ -35,7 +35,9 @@ func NewGlobalAdministratorClient(subscriptionID string) GlobalAdministratorClie return NewGlobalAdministratorClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client. +// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGlobalAdministratorClientWithBaseURI(baseURI string, subscriptionID string) GlobalAdministratorClient { return GlobalAdministratorClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/permissions.go b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/permissions.go index c99b1e4ae6a1..eb57a7e22ed7 100644 --- a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/permissions.go +++ b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/permissions.go @@ -35,7 +35,8 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient { return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. +// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient { return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go index 4e915dca25ae..9f0c30168cdb 100644 --- a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go +++ b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go @@ -36,7 +36,9 @@ func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperatio return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client. +// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient { return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go index 39954b869dfa..45a56aeff558 100644 --- a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go +++ b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go @@ -36,7 +36,8 @@ func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go index 4c42845fdfc7..432e862b4964 100644 --- a/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go +++ b/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go @@ -35,7 +35,8 @@ func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient { return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client. +// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient { return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/authorizationapi/interfaces.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/authorizationapi/interfaces.go index 70b5d055bab4..9321daf15824 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/authorizationapi/interfaces.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/authorizationapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ClassicAdministratorsClientAPI contains the set of methods on the ClassicAdministratorsClient type. type ClassicAdministratorsClientAPI interface { List(ctx context.Context) (result authorization.ClassicAdministratorListResultPage, err error) + ListComplete(ctx context.Context) (result authorization.ClassicAdministratorListResultIterator, err error) } var _ ClassicAdministratorsClientAPI = (*authorization.ClassicAdministratorsClient)(nil) @@ -41,6 +42,7 @@ var _ GlobalAdministratorClientAPI = (*authorization.GlobalAdministratorClient)( type ProviderOperationsMetadataClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result authorization.ProviderOperationsMetadata, err error) List(ctx context.Context, expand string) (result authorization.ProviderOperationsMetadataListResultPage, err error) + ListComplete(ctx context.Context, expand string) (result authorization.ProviderOperationsMetadataListResultIterator, err error) } var _ ProviderOperationsMetadataClientAPI = (*authorization.ProviderOperationsMetadataClient)(nil) @@ -54,9 +56,13 @@ type RoleAssignmentsClientAPI interface { Get(ctx context.Context, scope string, roleAssignmentName string) (result authorization.RoleAssignment, err error) GetByID(ctx context.Context, roleID string) (result authorization.RoleAssignment, err error) List(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForScope(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForScopeComplete(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) } var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) @@ -64,7 +70,9 @@ var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) // PermissionsClientAPI contains the set of methods on the PermissionsClient type. type PermissionsClientAPI interface { ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultIterator, err error) } var _ PermissionsClientAPI = (*authorization.PermissionsClient)(nil) @@ -76,6 +84,7 @@ type RoleDefinitionsClientAPI interface { Get(ctx context.Context, scope string, roleDefinitionID string) (result authorization.RoleDefinition, err error) GetByID(ctx context.Context, roleID string) (result authorization.RoleDefinition, err error) List(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultPage, err error) + ListComplete(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultIterator, err error) } var _ RoleDefinitionsClientAPI = (*authorization.RoleDefinitionsClient)(nil) @@ -85,9 +94,13 @@ type DenyAssignmentsClientAPI interface { Get(ctx context.Context, scope string, denyAssignmentID string) (result authorization.DenyAssignment, err error) GetByID(ctx context.Context, denyAssignmentID string) (result authorization.DenyAssignment, err error) List(ctx context.Context, filter string) (result authorization.DenyAssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result authorization.DenyAssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.DenyAssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.DenyAssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result authorization.DenyAssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result authorization.DenyAssignmentListResultIterator, err error) ListForScope(ctx context.Context, scope string, filter string) (result authorization.DenyAssignmentListResultPage, err error) + ListForScopeComplete(ctx context.Context, scope string, filter string) (result authorization.DenyAssignmentListResultIterator, err error) } var _ DenyAssignmentsClientAPI = (*authorization.DenyAssignmentsClient)(nil) diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/classicadministrators.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/classicadministrators.go index c0dc1eeeb41d..57c3e50bc69d 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/classicadministrators.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/classicadministrators.go @@ -35,7 +35,9 @@ func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministrators return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client. +// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient { return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/client.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/client.go index 362420bdfa36..1958a67601a6 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/client.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/denyassignments.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/denyassignments.go index f1a5482501c1..2ab6b5f0add6 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/denyassignments.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/denyassignments.go @@ -35,7 +35,8 @@ func NewDenyAssignmentsClient(subscriptionID string) DenyAssignmentsClient { return NewDenyAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDenyAssignmentsClientWithBaseURI creates an instance of the DenyAssignmentsClient client. +// NewDenyAssignmentsClientWithBaseURI creates an instance of the DenyAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDenyAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) DenyAssignmentsClient { return DenyAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/globaladministrator.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/globaladministrator.go index ec555ff00193..3ce564104df9 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/globaladministrator.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/globaladministrator.go @@ -35,7 +35,9 @@ func NewGlobalAdministratorClient(subscriptionID string) GlobalAdministratorClie return NewGlobalAdministratorClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client. +// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGlobalAdministratorClientWithBaseURI(baseURI string, subscriptionID string) GlobalAdministratorClient { return GlobalAdministratorClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/permissions.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/permissions.go index c99b1e4ae6a1..eb57a7e22ed7 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/permissions.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/permissions.go @@ -35,7 +35,8 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient { return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. +// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient { return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/provideroperationsmetadata.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/provideroperationsmetadata.go index 4e915dca25ae..9f0c30168cdb 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/provideroperationsmetadata.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/provideroperationsmetadata.go @@ -36,7 +36,9 @@ func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperatio return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client. +// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient { return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/roleassignments.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/roleassignments.go index 39954b869dfa..45a56aeff558 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/roleassignments.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/roleassignments.go @@ -36,7 +36,8 @@ func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/roledefinitions.go b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/roledefinitions.go index 4c42845fdfc7..432e862b4964 100644 --- a/services/preview/authorization/mgmt/2018-07-01-preview/authorization/roledefinitions.go +++ b/services/preview/authorization/mgmt/2018-07-01-preview/authorization/roledefinitions.go @@ -35,7 +35,8 @@ func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient { return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client. +// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient { return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/authorizationapi/interfaces.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/authorizationapi/interfaces.go index 410062073799..1f3aa9c5c659 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/authorizationapi/interfaces.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/authorizationapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ClassicAdministratorsClientAPI contains the set of methods on the ClassicAdministratorsClient type. type ClassicAdministratorsClientAPI interface { List(ctx context.Context) (result authorization.ClassicAdministratorListResultPage, err error) + ListComplete(ctx context.Context) (result authorization.ClassicAdministratorListResultIterator, err error) } var _ ClassicAdministratorsClientAPI = (*authorization.ClassicAdministratorsClient)(nil) @@ -41,6 +42,7 @@ var _ GlobalAdministratorClientAPI = (*authorization.GlobalAdministratorClient)( type ProviderOperationsMetadataClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result authorization.ProviderOperationsMetadata, err error) List(ctx context.Context, expand string) (result authorization.ProviderOperationsMetadataListResultPage, err error) + ListComplete(ctx context.Context, expand string) (result authorization.ProviderOperationsMetadataListResultIterator, err error) } var _ ProviderOperationsMetadataClientAPI = (*authorization.ProviderOperationsMetadataClient)(nil) @@ -54,9 +56,13 @@ type RoleAssignmentsClientAPI interface { Get(ctx context.Context, scope string, roleAssignmentName string) (result authorization.RoleAssignment, err error) GetByID(ctx context.Context, roleID string) (result authorization.RoleAssignment, err error) List(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) ListForScope(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultPage, err error) + ListForScopeComplete(ctx context.Context, scope string, filter string) (result authorization.RoleAssignmentListResultIterator, err error) } var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) @@ -64,7 +70,9 @@ var _ RoleAssignmentsClientAPI = (*authorization.RoleAssignmentsClient)(nil) // PermissionsClientAPI contains the set of methods on the PermissionsClient type. type PermissionsClientAPI interface { ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result authorization.PermissionGetResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string) (result authorization.PermissionGetResultIterator, err error) } var _ PermissionsClientAPI = (*authorization.PermissionsClient)(nil) @@ -76,6 +84,7 @@ type RoleDefinitionsClientAPI interface { Get(ctx context.Context, scope string, roleDefinitionID string) (result authorization.RoleDefinition, err error) GetByID(ctx context.Context, roleID string) (result authorization.RoleDefinition, err error) List(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultPage, err error) + ListComplete(ctx context.Context, scope string, filter string) (result authorization.RoleDefinitionListResultIterator, err error) } var _ RoleDefinitionsClientAPI = (*authorization.RoleDefinitionsClient)(nil) @@ -85,9 +94,13 @@ type DenyAssignmentsClientAPI interface { Get(ctx context.Context, scope string, denyAssignmentID string) (result authorization.DenyAssignment, err error) GetByID(ctx context.Context, denyAssignmentID string) (result authorization.DenyAssignment, err error) List(ctx context.Context, filter string) (result authorization.DenyAssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result authorization.DenyAssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.DenyAssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result authorization.DenyAssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result authorization.DenyAssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result authorization.DenyAssignmentListResultIterator, err error) ListForScope(ctx context.Context, scope string, filter string) (result authorization.DenyAssignmentListResultPage, err error) + ListForScopeComplete(ctx context.Context, scope string, filter string) (result authorization.DenyAssignmentListResultIterator, err error) } var _ DenyAssignmentsClientAPI = (*authorization.DenyAssignmentsClient)(nil) diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/classicadministrators.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/classicadministrators.go index c0dc1eeeb41d..57c3e50bc69d 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/classicadministrators.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/classicadministrators.go @@ -35,7 +35,9 @@ func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministrators return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client. +// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient { return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/client.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/client.go index 362420bdfa36..1958a67601a6 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/client.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/denyassignments.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/denyassignments.go index f1a5482501c1..2ab6b5f0add6 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/denyassignments.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/denyassignments.go @@ -35,7 +35,8 @@ func NewDenyAssignmentsClient(subscriptionID string) DenyAssignmentsClient { return NewDenyAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDenyAssignmentsClientWithBaseURI creates an instance of the DenyAssignmentsClient client. +// NewDenyAssignmentsClientWithBaseURI creates an instance of the DenyAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDenyAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) DenyAssignmentsClient { return DenyAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/globaladministrator.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/globaladministrator.go index ec555ff00193..3ce564104df9 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/globaladministrator.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/globaladministrator.go @@ -35,7 +35,9 @@ func NewGlobalAdministratorClient(subscriptionID string) GlobalAdministratorClie return NewGlobalAdministratorClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client. +// NewGlobalAdministratorClientWithBaseURI creates an instance of the GlobalAdministratorClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGlobalAdministratorClientWithBaseURI(baseURI string, subscriptionID string) GlobalAdministratorClient { return GlobalAdministratorClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/permissions.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/permissions.go index c99b1e4ae6a1..eb57a7e22ed7 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/permissions.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/permissions.go @@ -35,7 +35,8 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient { return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. +// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient { return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/provideroperationsmetadata.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/provideroperationsmetadata.go index 4e915dca25ae..9f0c30168cdb 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/provideroperationsmetadata.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/provideroperationsmetadata.go @@ -36,7 +36,9 @@ func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperatio return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client. +// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient { return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/roleassignments.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/roleassignments.go index 33fccb633881..eeb92f2f01f8 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/roleassignments.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/roleassignments.go @@ -36,7 +36,8 @@ func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/roledefinitions.go b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/roledefinitions.go index 4c42845fdfc7..432e862b4964 100644 --- a/services/preview/authorization/mgmt/2018-09-01-preview/authorization/roledefinitions.go +++ b/services/preview/authorization/mgmt/2018-09-01-preview/authorization/roledefinitions.go @@ -35,7 +35,8 @@ func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient { return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client. +// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient { return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/account.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/account.go index 4e6f63f78e08..d0417b02f452 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/account.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/activity.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/activity.go index 453039a7c6d5..8a3310d24b2f 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/activity.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/activity.go @@ -36,7 +36,8 @@ func NewActivityClient(subscriptionID string) ActivityClient { return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityClientWithBaseURI creates an instance of the ActivityClient client. +// NewActivityClientWithBaseURI creates an instance of the ActivityClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/agentregistrationinformation.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/agentregistrationinformation.go index 82aee70aa8be..2376931b23b0 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/agentregistrationinformation.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/agentregistrationinformation.go @@ -37,7 +37,8 @@ func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrat } // NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient -// 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 NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/automationapi/interfaces.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/automationapi/interfaces.go index 13130d74e7f2..f6ff89391e44 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/automationapi/interfaces.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/automationapi/interfaces.go @@ -31,7 +31,9 @@ type AccountClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.Account, err error) List(ctx context.Context) (result automation.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result automation.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result automation.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result automation.AccountListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, parameters automation.AccountUpdateParameters) (result automation.Account, err error) } @@ -71,6 +73,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result automation.Certificate, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CertificateListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CertificateListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters automation.CertificateUpdateParameters) (result automation.Certificate, err error) } @@ -82,6 +85,7 @@ type ConnectionClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result automation.Connection, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result automation.Connection, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters automation.ConnectionUpdateParameters) (result automation.Connection, err error) } @@ -93,6 +97,7 @@ type ConnectionTypeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result automation.ConnectionType, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionTypeListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionTypeListResultIterator, err error) } var _ ConnectionTypeClientAPI = (*automation.ConnectionTypeClient)(nil) @@ -103,6 +108,7 @@ type CredentialClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result automation.Credential, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CredentialListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CredentialListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters automation.CredentialUpdateParameters) (result automation.Credential, err error) } @@ -114,6 +120,7 @@ type DscCompilationJobClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result automation.DscCompilationJob, err error) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result automation.JobStream, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscCompilationJobListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscCompilationJobListResultIterator, err error) } var _ DscCompilationJobClientAPI = (*automation.DscCompilationJobClient)(nil) @@ -132,6 +139,7 @@ type DscConfigurationClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result automation.DscConfiguration, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscConfigurationListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscConfigurationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters *automation.DscConfigurationUpdateParameters) (result automation.DscConfiguration, err error) } @@ -150,6 +158,7 @@ type DscNodeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result automation.DscNode, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result automation.DscNode, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscNodeListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscNodeListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters automation.DscNodeUpdateParameters) (result automation.DscNode, err error) } @@ -160,6 +169,7 @@ type NodeReportsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result automation.DscNodeReport, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result automation.SetObject, err error) ListByNode(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result automation.DscNodeReportListResultPage, err error) + ListByNodeComplete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result automation.DscNodeReportListResultIterator, err error) } var _ NodeReportsClientAPI = (*automation.NodeReportsClient)(nil) @@ -170,6 +180,7 @@ type DscNodeConfigurationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result automation.DscNodeConfiguration, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscNodeConfigurationListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscNodeConfigurationListResultIterator, err error) } var _ DscNodeConfigurationClientAPI = (*automation.DscNodeConfigurationClient)(nil) @@ -179,6 +190,7 @@ type HybridRunbookWorkerGroupClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result automation.HybridRunbookWorkerGroup, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.HybridRunbookWorkerGroupsListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.HybridRunbookWorkerGroupsListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters automation.HybridRunbookWorkerGroupUpdateParameters) (result automation.HybridRunbookWorkerGroup, err error) } @@ -190,6 +202,7 @@ type JobScheduleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result automation.JobSchedule, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobScheduleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobScheduleListResultIterator, err error) } var _ JobScheduleClientAPI = (*automation.JobScheduleClient)(nil) @@ -205,6 +218,7 @@ var _ LinkedWorkspaceClientAPI = (*automation.LinkedWorkspaceClient)(nil) type ActivityClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result automation.Activity, err error) ListByModule(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.ActivityListResultPage, err error) + ListByModuleComplete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.ActivityListResultIterator, err error) } var _ ActivityClientAPI = (*automation.ActivityClient)(nil) @@ -215,6 +229,7 @@ type ModuleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.Module, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters automation.ModuleUpdateParameters) (result automation.Module, err error) } @@ -253,6 +268,7 @@ type RunbookClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.Runbook, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.RunbookListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.RunbookListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters automation.RunbookUpdateParameters) (result automation.Runbook, err error) } @@ -262,6 +278,7 @@ var _ RunbookClientAPI = (*automation.RunbookClient)(nil) type TestJobStreamsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result automation.JobStream, err error) ListByTestJob(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result automation.JobStreamListResultPage, err error) + ListByTestJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result automation.JobStreamListResultIterator, err error) } var _ TestJobStreamsClientAPI = (*automation.TestJobStreamsClient)(nil) @@ -283,6 +300,7 @@ type ScheduleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result automation.Schedule, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ScheduleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ScheduleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters automation.ScheduleUpdateParameters) (result automation.Schedule, err error) } @@ -294,6 +312,7 @@ type VariableClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result automation.Variable, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.VariableListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.VariableListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters automation.VariableUpdateParameters) (result automation.Variable, err error) } @@ -306,6 +325,7 @@ type WebhookClientAPI interface { GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.String, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result automation.Webhook, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WebhookListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WebhookListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters automation.WebhookUpdateParameters) (result automation.Webhook, err error) } @@ -343,6 +363,7 @@ type SourceControlClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (result automation.SourceControl, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.SourceControlListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.SourceControlListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters automation.SourceControlUpdateParameters) (result automation.SourceControl, err error) } @@ -353,6 +374,7 @@ type SourceControlSyncJobClientAPI interface { Create(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, parameters automation.SourceControlSyncJobCreateParameters) (result automation.SourceControlSyncJob, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (result automation.SourceControlSyncJobByID, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result automation.SourceControlSyncJobListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result automation.SourceControlSyncJobListResultIterator, err error) } var _ SourceControlSyncJobClientAPI = (*automation.SourceControlSyncJobClient)(nil) @@ -361,6 +383,7 @@ var _ SourceControlSyncJobClientAPI = (*automation.SourceControlSyncJobClient)(n type SourceControlSyncJobStreamsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, streamID string) (result automation.SourceControlSyncJobStreamByID, err error) ListBySyncJob(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, filter string) (result automation.SourceControlSyncJobStreamsListBySyncJobPage, err error) + ListBySyncJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, filter string) (result automation.SourceControlSyncJobStreamsListBySyncJobIterator, err error) } var _ SourceControlSyncJobStreamsClientAPI = (*automation.SourceControlSyncJobStreamsClient)(nil) @@ -372,6 +395,7 @@ type JobClientAPI interface { GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result automation.ReadCloser, err error) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (result automation.JobListResultV2Page, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (result automation.JobListResultV2Iterator, err error) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) @@ -383,6 +407,7 @@ var _ JobClientAPI = (*automation.JobClient)(nil) type JobStreamClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, jobStreamID string, clientRequestID string) (result automation.JobStream, err error) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (result automation.JobStreamListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (result automation.JobStreamListResultIterator, err error) } var _ JobStreamClientAPI = (*automation.JobStreamClient)(nil) diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/certificate.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/certificate.go index 2c78aee0afd9..b6cec1846342 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/certificate.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/client.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/client.go index 71700fb23f89..59d291c37980 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/client.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/connection.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/connection.go index 8f3f172c1ca1..8c3df318f915 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/connection.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/connection.go @@ -36,7 +36,8 @@ func NewConnectionClient(subscriptionID string) ConnectionClient { return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. +// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/connectiontype.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/connectiontype.go index e408013691a0..7aba51e3da4c 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/connectiontype.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/connectiontype.go @@ -36,7 +36,8 @@ func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient { return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. +// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/credential.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/credential.go index fe721caade5a..8abdad518e22 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/credential.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/credential.go @@ -36,7 +36,8 @@ func NewCredentialClient(subscriptionID string) CredentialClient { return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. +// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go index d82bca52bb16..4add21068375 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/dsccompilationjob.go @@ -37,7 +37,9 @@ func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. +// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go index 462c8fde2b37..ec659ac8ddb0 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/dsccompilationjobstream.go @@ -37,7 +37,9 @@ func NewDscCompilationJobStreamClient(subscriptionID string) DscCompilationJobSt return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client. +// NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobStreamClient { return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go index 1adb2650c6d0..dc8ffb74290f 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/dscconfiguration.go @@ -36,7 +36,9 @@ func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. +// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/dscnode.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/dscnode.go index 4e60dfbd888a..f5b40646bead 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/dscnode.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/dscnode.go @@ -36,7 +36,8 @@ func NewDscNodeClient(subscriptionID string) DscNodeClient { return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client. +// NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeClient { return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go index 71175e74c636..355523da68b2 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/dscnodeconfiguration.go @@ -36,7 +36,9 @@ func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationCl return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. +// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/fields.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/fields.go index 3ebac62895f4..d134d7ee6191 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/fields.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/fields.go @@ -36,7 +36,8 @@ func NewFieldsClient(subscriptionID string) FieldsClient { return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFieldsClientWithBaseURI creates an instance of the FieldsClient client. +// NewFieldsClientWithBaseURI creates an instance of the FieldsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsClient { return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/hybridrunbookworkergroup.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/hybridrunbookworkergroup.go index 48878c158c2e..16c0350b5b46 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/hybridrunbookworkergroup.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/hybridrunbookworkergroup.go @@ -36,7 +36,9 @@ func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorke return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. +// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/job.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/job.go index 82ba4b309109..9a1702c20ba3 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/job.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/job.go @@ -36,7 +36,8 @@ func NewJobClient(subscriptionID string) JobClient { return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobClientWithBaseURI creates an instance of the JobClient client. +// NewJobClientWithBaseURI creates an instance of the JobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { return JobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/jobschedule.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/jobschedule.go index 78fd95ae7562..bbe3542342b4 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/jobschedule.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/jobschedule.go @@ -37,7 +37,8 @@ func NewJobScheduleClient(subscriptionID string) JobScheduleClient { return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. +// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/jobstream.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/jobstream.go index 30e69ed082be..7ef8e9031114 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/jobstream.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/jobstream.go @@ -36,7 +36,8 @@ func NewJobStreamClient(subscriptionID string) JobStreamClient { return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. +// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/keys.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/keys.go index bd3e6559f126..4133e9eedfaa 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/keys.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/keys.go @@ -36,7 +36,8 @@ func NewKeysClient(subscriptionID string) KeysClient { return NewKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewKeysClientWithBaseURI creates an instance of the KeysClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/linkedworkspace.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/linkedworkspace.go index 7d8fd8777256..bab0e15bb61d 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/linkedworkspace.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/linkedworkspace.go @@ -36,7 +36,8 @@ func NewLinkedWorkspaceClient(subscriptionID string) LinkedWorkspaceClient { return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client. +// NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) LinkedWorkspaceClient { return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/module.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/module.go index caa351e6ad51..4baa74c91a06 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/module.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/module.go @@ -36,7 +36,8 @@ func NewModuleClient(subscriptionID string) ModuleClient { return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewModuleClientWithBaseURI creates an instance of the ModuleClient client. +// NewModuleClientWithBaseURI creates an instance of the ModuleClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleClient { return ModuleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/nodereports.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/nodereports.go index 034184bc193c..d3f94b7801b0 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/nodereports.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/nodereports.go @@ -36,7 +36,8 @@ func NewNodeReportsClient(subscriptionID string) NodeReportsClient { return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. +// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/objectdatatypes.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/objectdatatypes.go index 04f4391df47b..fd8db25c5d94 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/objectdatatypes.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/objectdatatypes.go @@ -36,7 +36,8 @@ func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient { return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. +// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/operations.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/operations.go index 12d40bbde3a7..3231c683b9ff 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/operations.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/runbook.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/runbook.go index 3549cafc513c..76d01fded9d3 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/runbook.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/runbook.go @@ -36,7 +36,8 @@ func NewRunbookClient(subscriptionID string) RunbookClient { return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookClientWithBaseURI creates an instance of the RunbookClient client. +// NewRunbookClientWithBaseURI creates an instance of the RunbookClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookClient { return RunbookClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go index 85161bb635f8..0fff2f7f986e 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/runbookdraft.go @@ -37,7 +37,8 @@ func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. +// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/schedule.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/schedule.go index 0f68168c8073..58b68d34a5cc 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/schedule.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/schedule.go @@ -36,7 +36,8 @@ func NewScheduleClient(subscriptionID string) ScheduleClient { return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. +// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go index b201cf357022..291ed8411b59 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationmachineruns.go @@ -39,7 +39,8 @@ func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string) Soft } // NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI creates an instance of the -// SoftwareUpdateConfigurationMachineRunsClient client. +// SoftwareUpdateConfigurationMachineRunsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationMachineRunsClient { return SoftwareUpdateConfigurationMachineRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go index 40e5e92a8086..85cfdd5d4c6f 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurationruns.go @@ -38,7 +38,8 @@ func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string) SoftwareUpd } // NewSoftwareUpdateConfigurationRunsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationRunsClient -// 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 NewSoftwareUpdateConfigurationRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationRunsClient { return SoftwareUpdateConfigurationRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go index 76085e5cb67c..02a1d3a750e9 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/softwareupdateconfigurations.go @@ -37,7 +37,8 @@ func NewSoftwareUpdateConfigurationsClient(subscriptionID string) SoftwareUpdate } // NewSoftwareUpdateConfigurationsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationsClient -// 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 NewSoftwareUpdateConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationsClient { return SoftwareUpdateConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go index c265e95a193e..f02d380d492f 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrol.go @@ -36,7 +36,8 @@ func NewSourceControlClient(subscriptionID string) SourceControlClient { return NewSourceControlClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlClientWithBaseURI creates an instance of the SourceControlClient client. +// NewSourceControlClientWithBaseURI creates an instance of the SourceControlClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSourceControlClientWithBaseURI(baseURI string, subscriptionID string) SourceControlClient { return SourceControlClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjob.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjob.go index 9685b6988770..245a6d75077d 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjob.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjob.go @@ -37,7 +37,9 @@ func NewSourceControlSyncJobClient(subscriptionID string) SourceControlSyncJobCl return NewSourceControlSyncJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlSyncJobClientWithBaseURI creates an instance of the SourceControlSyncJobClient client. +// NewSourceControlSyncJobClientWithBaseURI creates an instance of the SourceControlSyncJobClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSourceControlSyncJobClientWithBaseURI(baseURI string, subscriptionID string) SourceControlSyncJobClient { return SourceControlSyncJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjobstreams.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjobstreams.go index e60ac69a03db..0ae400f87748 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjobstreams.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/sourcecontrolsyncjobstreams.go @@ -37,7 +37,9 @@ func NewSourceControlSyncJobStreamsClient(subscriptionID string) SourceControlSy return NewSourceControlSyncJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlSyncJobStreamsClientWithBaseURI creates an instance of the SourceControlSyncJobStreamsClient client. +// NewSourceControlSyncJobStreamsClientWithBaseURI creates an instance of the SourceControlSyncJobStreamsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewSourceControlSyncJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) SourceControlSyncJobStreamsClient { return SourceControlSyncJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/statistics.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/statistics.go index 625062d6ebd2..e31ab7362b6f 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/statistics.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/statistics.go @@ -36,7 +36,8 @@ func NewStatisticsClient(subscriptionID string) StatisticsClient { return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. +// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/testjob.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/testjob.go index 26908a87daec..e7e509cb433d 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/testjob.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/testjob.go @@ -36,7 +36,8 @@ func NewTestJobClient(subscriptionID string) TestJobClient { return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobClientWithBaseURI creates an instance of the TestJobClient client. +// NewTestJobClientWithBaseURI creates an instance of the TestJobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobClient { return TestJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/testjobstreams.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/testjobstreams.go index 67dbb8106d46..53ccfdda7f24 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/testjobstreams.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/testjobstreams.go @@ -36,7 +36,8 @@ func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient { return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. +// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/usages.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/usages.go index ee694d481382..1c98177cb82d 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/usages.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/variable.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/variable.go index dc1b92a10af0..95fb899f1e2b 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/variable.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/variable.go @@ -36,7 +36,8 @@ func NewVariableClient(subscriptionID string) VariableClient { return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVariableClientWithBaseURI creates an instance of the VariableClient client. +// NewVariableClientWithBaseURI creates an instance of the VariableClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2017-05-15-preview/automation/webhook.go b/services/preview/automation/mgmt/2017-05-15-preview/automation/webhook.go index 0f01dd04f534..96c30c2a20f4 100644 --- a/services/preview/automation/mgmt/2017-05-15-preview/automation/webhook.go +++ b/services/preview/automation/mgmt/2017-05-15-preview/automation/webhook.go @@ -36,7 +36,8 @@ func NewWebhookClient(subscriptionID string) WebhookClient { return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhookClientWithBaseURI creates an instance of the WebhookClient client. +// NewWebhookClientWithBaseURI creates an instance of the WebhookClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookClient { return WebhookClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/account.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/account.go index 4e6f63f78e08..d0417b02f452 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/account.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/activity.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/activity.go index 453039a7c6d5..8a3310d24b2f 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/activity.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/activity.go @@ -36,7 +36,8 @@ func NewActivityClient(subscriptionID string) ActivityClient { return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityClientWithBaseURI creates an instance of the ActivityClient client. +// NewActivityClientWithBaseURI creates an instance of the ActivityClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/agentregistrationinformation.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/agentregistrationinformation.go index 4b5c0b2180ac..73846c7b7fb4 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/agentregistrationinformation.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/agentregistrationinformation.go @@ -37,7 +37,8 @@ func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrat } // NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient -// 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 NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/automationapi/interfaces.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/automationapi/interfaces.go index d436f27b759b..ed01a962cbf5 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/automationapi/interfaces.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/automationapi/interfaces.go @@ -31,7 +31,9 @@ type AccountClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.Account, err error) List(ctx context.Context) (result automation.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result automation.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result automation.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result automation.AccountListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, parameters automation.AccountUpdateParameters) (result automation.Account, err error) } @@ -71,6 +73,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result automation.Certificate, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CertificateListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CertificateListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters automation.CertificateUpdateParameters) (result automation.Certificate, err error) } @@ -82,6 +85,7 @@ type ConnectionClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result automation.Connection, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result automation.Connection, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters automation.ConnectionUpdateParameters) (result automation.Connection, err error) } @@ -93,6 +97,7 @@ type ConnectionTypeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result automation.ConnectionType, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionTypeListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionTypeListResultIterator, err error) } var _ ConnectionTypeClientAPI = (*automation.ConnectionTypeClient)(nil) @@ -103,6 +108,7 @@ type CredentialClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result automation.Credential, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CredentialListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CredentialListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters automation.CredentialUpdateParameters) (result automation.Credential, err error) } @@ -115,6 +121,7 @@ type DscConfigurationClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result automation.DscConfiguration, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscConfigurationListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscConfigurationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters *automation.DscConfigurationUpdateParameters) (result automation.DscConfiguration, err error) } @@ -125,6 +132,7 @@ type HybridRunbookWorkerGroupClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result automation.HybridRunbookWorkerGroup, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.HybridRunbookWorkerGroupsListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.HybridRunbookWorkerGroupsListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters automation.HybridRunbookWorkerGroupUpdateParameters) (result automation.HybridRunbookWorkerGroup, err error) } @@ -136,6 +144,7 @@ type JobScheduleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result automation.JobSchedule, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobScheduleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobScheduleListResultIterator, err error) } var _ JobScheduleClientAPI = (*automation.JobScheduleClient)(nil) @@ -151,6 +160,7 @@ var _ LinkedWorkspaceClientAPI = (*automation.LinkedWorkspaceClient)(nil) type ActivityClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result automation.Activity, err error) ListByModule(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.ActivityListResultPage, err error) + ListByModuleComplete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.ActivityListResultIterator, err error) } var _ ActivityClientAPI = (*automation.ActivityClient)(nil) @@ -161,6 +171,7 @@ type ModuleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.Module, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters automation.ModuleUpdateParameters) (result automation.Module, err error) } @@ -199,6 +210,7 @@ type RunbookClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.Runbook, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.RunbookListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.RunbookListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters automation.RunbookUpdateParameters) (result automation.Runbook, err error) } @@ -208,6 +220,7 @@ var _ RunbookClientAPI = (*automation.RunbookClient)(nil) type TestJobStreamsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result automation.JobStream, err error) ListByTestJob(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result automation.JobStreamListResultPage, err error) + ListByTestJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result automation.JobStreamListResultIterator, err error) } var _ TestJobStreamsClientAPI = (*automation.TestJobStreamsClient)(nil) @@ -229,6 +242,7 @@ type ScheduleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result automation.Schedule, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ScheduleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ScheduleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters automation.ScheduleUpdateParameters) (result automation.Schedule, err error) } @@ -240,6 +254,7 @@ type VariableClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result automation.Variable, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.VariableListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.VariableListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters automation.VariableUpdateParameters) (result automation.Variable, err error) } @@ -252,6 +267,7 @@ type WebhookClientAPI interface { GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.String, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result automation.Webhook, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WebhookListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WebhookListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters automation.WebhookUpdateParameters) (result automation.Webhook, err error) } @@ -263,6 +279,7 @@ type WatcherClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string) (result automation.Watcher, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WatcherListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WatcherListResultIterator, err error) Start(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string) (result autorest.Response, err error) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, parameters automation.WatcherUpdateParameters) (result automation.Watcher, err error) @@ -302,6 +319,7 @@ type SourceControlClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (result automation.SourceControl, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.SourceControlListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.SourceControlListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters automation.SourceControlUpdateParameters) (result automation.SourceControl, err error) } @@ -312,6 +330,7 @@ type SourceControlSyncJobClientAPI interface { Create(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, parameters automation.SourceControlSyncJobCreateParameters) (result automation.SourceControlSyncJob, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (result automation.SourceControlSyncJobByID, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result automation.SourceControlSyncJobListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result automation.SourceControlSyncJobListResultIterator, err error) } var _ SourceControlSyncJobClientAPI = (*automation.SourceControlSyncJobClient)(nil) @@ -320,6 +339,7 @@ var _ SourceControlSyncJobClientAPI = (*automation.SourceControlSyncJobClient)(n type SourceControlSyncJobStreamsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, streamID string) (result automation.SourceControlSyncJobStreamByID, err error) ListBySyncJob(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, filter string) (result automation.SourceControlSyncJobStreamsListBySyncJobPage, err error) + ListBySyncJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, filter string) (result automation.SourceControlSyncJobStreamsListBySyncJobIterator, err error) } var _ SourceControlSyncJobStreamsClientAPI = (*automation.SourceControlSyncJobStreamsClient)(nil) @@ -331,6 +351,7 @@ type JobClientAPI interface { GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result automation.ReadCloser, err error) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (result automation.JobListResultV2Page, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (result automation.JobListResultV2Iterator, err error) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) @@ -342,6 +363,7 @@ var _ JobClientAPI = (*automation.JobClient)(nil) type JobStreamClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, jobStreamID string, clientRequestID string) (result automation.JobStream, err error) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (result automation.JobStreamListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (result automation.JobStreamListResultIterator, err error) } var _ JobStreamClientAPI = (*automation.JobStreamClient)(nil) @@ -359,6 +381,7 @@ type DscNodeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result automation.DscNode, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result automation.DscNode, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscNodeListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscNodeListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, dscNodeUpdateParameters automation.DscNodeUpdateParameters) (result automation.DscNode, err error) } @@ -369,6 +392,7 @@ type NodeReportsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result automation.DscNodeReport, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result automation.SetObject, err error) ListByNode(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result automation.DscNodeReportListResultPage, err error) + ListByNodeComplete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result automation.DscNodeReportListResultIterator, err error) } var _ NodeReportsClientAPI = (*automation.NodeReportsClient)(nil) @@ -379,6 +403,7 @@ type DscCompilationJobClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobName string) (result automation.DscCompilationJob, err error) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result automation.JobStream, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscCompilationJobListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscCompilationJobListResultIterator, err error) } var _ DscCompilationJobClientAPI = (*automation.DscCompilationJobClient)(nil) @@ -396,6 +421,7 @@ type DscNodeConfigurationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result automation.DscNodeConfiguration, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscNodeConfigurationListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscNodeConfigurationListResultIterator, err error) } var _ DscNodeConfigurationClientAPI = (*automation.DscNodeConfigurationClient)(nil) diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/certificate.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/certificate.go index 2c78aee0afd9..b6cec1846342 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/certificate.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/client.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/client.go index 71700fb23f89..59d291c37980 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/client.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/connection.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/connection.go index 8f3f172c1ca1..8c3df318f915 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/connection.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/connection.go @@ -36,7 +36,8 @@ func NewConnectionClient(subscriptionID string) ConnectionClient { return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. +// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/connectiontype.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/connectiontype.go index e408013691a0..7aba51e3da4c 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/connectiontype.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/connectiontype.go @@ -36,7 +36,8 @@ func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient { return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. +// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/credential.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/credential.go index fe721caade5a..8abdad518e22 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/credential.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/credential.go @@ -36,7 +36,8 @@ func NewCredentialClient(subscriptionID string) CredentialClient { return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. +// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/dsccompilationjob.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/dsccompilationjob.go index 910535ed3316..412688b6fbdd 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/dsccompilationjob.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/dsccompilationjob.go @@ -37,7 +37,9 @@ func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. +// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/dsccompilationjobstream.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/dsccompilationjobstream.go index 0dae64a4dd86..b89fbce37363 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/dsccompilationjobstream.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/dsccompilationjobstream.go @@ -37,7 +37,9 @@ func NewDscCompilationJobStreamClient(subscriptionID string) DscCompilationJobSt return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client. +// NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobStreamClient { return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/dscconfiguration.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/dscconfiguration.go index 1adb2650c6d0..dc8ffb74290f 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/dscconfiguration.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/dscconfiguration.go @@ -36,7 +36,9 @@ func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. +// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/dscnode.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/dscnode.go index bca9fe56e034..6a30f30f5433 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/dscnode.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/dscnode.go @@ -36,7 +36,8 @@ func NewDscNodeClient(subscriptionID string) DscNodeClient { return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client. +// NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeClient { return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/dscnodeconfiguration.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/dscnodeconfiguration.go index 8ad905e7abf0..9233e284592f 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/dscnodeconfiguration.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/dscnodeconfiguration.go @@ -36,7 +36,9 @@ func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationCl return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. +// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/fields.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/fields.go index 3ebac62895f4..d134d7ee6191 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/fields.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/fields.go @@ -36,7 +36,8 @@ func NewFieldsClient(subscriptionID string) FieldsClient { return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFieldsClientWithBaseURI creates an instance of the FieldsClient client. +// NewFieldsClientWithBaseURI creates an instance of the FieldsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsClient { return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/hybridrunbookworkergroup.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/hybridrunbookworkergroup.go index 48878c158c2e..16c0350b5b46 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/hybridrunbookworkergroup.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/hybridrunbookworkergroup.go @@ -36,7 +36,9 @@ func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorke return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. +// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/job.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/job.go index 82ba4b309109..9a1702c20ba3 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/job.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/job.go @@ -36,7 +36,8 @@ func NewJobClient(subscriptionID string) JobClient { return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobClientWithBaseURI creates an instance of the JobClient client. +// NewJobClientWithBaseURI creates an instance of the JobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { return JobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/jobschedule.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/jobschedule.go index 78fd95ae7562..bbe3542342b4 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/jobschedule.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/jobschedule.go @@ -37,7 +37,8 @@ func NewJobScheduleClient(subscriptionID string) JobScheduleClient { return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. +// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/jobstream.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/jobstream.go index 30e69ed082be..7ef8e9031114 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/jobstream.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/jobstream.go @@ -36,7 +36,8 @@ func NewJobStreamClient(subscriptionID string) JobStreamClient { return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. +// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/keys.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/keys.go index bd3e6559f126..4133e9eedfaa 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/keys.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/keys.go @@ -36,7 +36,8 @@ func NewKeysClient(subscriptionID string) KeysClient { return NewKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewKeysClientWithBaseURI creates an instance of the KeysClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/linkedworkspace.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/linkedworkspace.go index 7d8fd8777256..bab0e15bb61d 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/linkedworkspace.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/linkedworkspace.go @@ -36,7 +36,8 @@ func NewLinkedWorkspaceClient(subscriptionID string) LinkedWorkspaceClient { return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client. +// NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) LinkedWorkspaceClient { return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/module.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/module.go index caa351e6ad51..4baa74c91a06 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/module.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/module.go @@ -36,7 +36,8 @@ func NewModuleClient(subscriptionID string) ModuleClient { return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewModuleClientWithBaseURI creates an instance of the ModuleClient client. +// NewModuleClientWithBaseURI creates an instance of the ModuleClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleClient { return ModuleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/nodecountinformation.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/nodecountinformation.go index 201f7b44bf41..58e483ac4fa0 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/nodecountinformation.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/nodecountinformation.go @@ -36,7 +36,9 @@ func NewNodeCountInformationClient(subscriptionID string) NodeCountInformationCl return NewNodeCountInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodeCountInformationClientWithBaseURI creates an instance of the NodeCountInformationClient client. +// NewNodeCountInformationClientWithBaseURI creates an instance of the NodeCountInformationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewNodeCountInformationClientWithBaseURI(baseURI string, subscriptionID string) NodeCountInformationClient { return NodeCountInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/nodereports.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/nodereports.go index 2eff77f6ca3d..55db54bec77b 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/nodereports.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/nodereports.go @@ -36,7 +36,8 @@ func NewNodeReportsClient(subscriptionID string) NodeReportsClient { return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. +// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/objectdatatypes.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/objectdatatypes.go index 04f4391df47b..fd8db25c5d94 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/objectdatatypes.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/objectdatatypes.go @@ -36,7 +36,8 @@ func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient { return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. +// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/operations.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/operations.go index 12d40bbde3a7..3231c683b9ff 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/operations.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/runbook.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/runbook.go index 3549cafc513c..76d01fded9d3 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/runbook.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/runbook.go @@ -36,7 +36,8 @@ func NewRunbookClient(subscriptionID string) RunbookClient { return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookClientWithBaseURI creates an instance of the RunbookClient client. +// NewRunbookClientWithBaseURI creates an instance of the RunbookClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookClient { return RunbookClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/runbookdraft.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/runbookdraft.go index 85161bb635f8..0fff2f7f986e 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/runbookdraft.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/runbookdraft.go @@ -37,7 +37,8 @@ func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. +// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/schedule.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/schedule.go index 0f68168c8073..58b68d34a5cc 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/schedule.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/schedule.go @@ -36,7 +36,8 @@ func NewScheduleClient(subscriptionID string) ScheduleClient { return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. +// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurationmachineruns.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurationmachineruns.go index b201cf357022..291ed8411b59 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurationmachineruns.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurationmachineruns.go @@ -39,7 +39,8 @@ func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string) Soft } // NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI creates an instance of the -// SoftwareUpdateConfigurationMachineRunsClient client. +// SoftwareUpdateConfigurationMachineRunsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationMachineRunsClient { return SoftwareUpdateConfigurationMachineRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurationruns.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurationruns.go index 40e5e92a8086..85cfdd5d4c6f 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurationruns.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurationruns.go @@ -38,7 +38,8 @@ func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string) SoftwareUpd } // NewSoftwareUpdateConfigurationRunsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationRunsClient -// 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 NewSoftwareUpdateConfigurationRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationRunsClient { return SoftwareUpdateConfigurationRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurations.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurations.go index 76085e5cb67c..02a1d3a750e9 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurations.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/softwareupdateconfigurations.go @@ -37,7 +37,8 @@ func NewSoftwareUpdateConfigurationsClient(subscriptionID string) SoftwareUpdate } // NewSoftwareUpdateConfigurationsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationsClient -// 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 NewSoftwareUpdateConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationsClient { return SoftwareUpdateConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrol.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrol.go index c265e95a193e..f02d380d492f 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrol.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrol.go @@ -36,7 +36,8 @@ func NewSourceControlClient(subscriptionID string) SourceControlClient { return NewSourceControlClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlClientWithBaseURI creates an instance of the SourceControlClient client. +// NewSourceControlClientWithBaseURI creates an instance of the SourceControlClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSourceControlClientWithBaseURI(baseURI string, subscriptionID string) SourceControlClient { return SourceControlClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrolsyncjob.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrolsyncjob.go index 9685b6988770..245a6d75077d 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrolsyncjob.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrolsyncjob.go @@ -37,7 +37,9 @@ func NewSourceControlSyncJobClient(subscriptionID string) SourceControlSyncJobCl return NewSourceControlSyncJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlSyncJobClientWithBaseURI creates an instance of the SourceControlSyncJobClient client. +// NewSourceControlSyncJobClientWithBaseURI creates an instance of the SourceControlSyncJobClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSourceControlSyncJobClientWithBaseURI(baseURI string, subscriptionID string) SourceControlSyncJobClient { return SourceControlSyncJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrolsyncjobstreams.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrolsyncjobstreams.go index e60ac69a03db..0ae400f87748 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrolsyncjobstreams.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/sourcecontrolsyncjobstreams.go @@ -37,7 +37,9 @@ func NewSourceControlSyncJobStreamsClient(subscriptionID string) SourceControlSy return NewSourceControlSyncJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlSyncJobStreamsClientWithBaseURI creates an instance of the SourceControlSyncJobStreamsClient client. +// NewSourceControlSyncJobStreamsClientWithBaseURI creates an instance of the SourceControlSyncJobStreamsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewSourceControlSyncJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) SourceControlSyncJobStreamsClient { return SourceControlSyncJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/statistics.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/statistics.go index 625062d6ebd2..e31ab7362b6f 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/statistics.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/statistics.go @@ -36,7 +36,8 @@ func NewStatisticsClient(subscriptionID string) StatisticsClient { return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. +// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/testjob.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/testjob.go index 26908a87daec..e7e509cb433d 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/testjob.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/testjob.go @@ -36,7 +36,8 @@ func NewTestJobClient(subscriptionID string) TestJobClient { return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobClientWithBaseURI creates an instance of the TestJobClient client. +// NewTestJobClientWithBaseURI creates an instance of the TestJobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobClient { return TestJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/testjobstreams.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/testjobstreams.go index 67dbb8106d46..53ccfdda7f24 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/testjobstreams.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/testjobstreams.go @@ -36,7 +36,8 @@ func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient { return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. +// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/usages.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/usages.go index ee694d481382..1c98177cb82d 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/usages.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/variable.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/variable.go index dc1b92a10af0..95fb899f1e2b 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/variable.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/variable.go @@ -36,7 +36,8 @@ func NewVariableClient(subscriptionID string) VariableClient { return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVariableClientWithBaseURI creates an instance of the VariableClient client. +// NewVariableClientWithBaseURI creates an instance of the VariableClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/watcher.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/watcher.go index 77086c1b0707..fad0185e6f5e 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/watcher.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/watcher.go @@ -36,7 +36,8 @@ func NewWatcherClient(subscriptionID string) WatcherClient { return NewWatcherClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatcherClientWithBaseURI creates an instance of the WatcherClient client. +// NewWatcherClientWithBaseURI creates an instance of the WatcherClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWatcherClientWithBaseURI(baseURI string, subscriptionID string) WatcherClient { return WatcherClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-01-15-preview/automation/webhook.go b/services/preview/automation/mgmt/2018-01-15-preview/automation/webhook.go index 0f01dd04f534..96c30c2a20f4 100644 --- a/services/preview/automation/mgmt/2018-01-15-preview/automation/webhook.go +++ b/services/preview/automation/mgmt/2018-01-15-preview/automation/webhook.go @@ -36,7 +36,8 @@ func NewWebhookClient(subscriptionID string) WebhookClient { return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhookClientWithBaseURI creates an instance of the WebhookClient client. +// NewWebhookClientWithBaseURI creates an instance of the WebhookClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookClient { return WebhookClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/account.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/account.go index 4e6f63f78e08..d0417b02f452 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/account.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/account.go @@ -36,7 +36,8 @@ func NewAccountClient(subscriptionID string) AccountClient { return NewAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountClientWithBaseURI creates an instance of the AccountClient client. +// NewAccountClientWithBaseURI creates an instance of the AccountClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountClient { return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/activity.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/activity.go index 453039a7c6d5..8a3310d24b2f 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/activity.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/activity.go @@ -36,7 +36,8 @@ func NewActivityClient(subscriptionID string) ActivityClient { return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityClientWithBaseURI creates an instance of the ActivityClient client. +// NewActivityClientWithBaseURI creates an instance of the ActivityClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/agentregistrationinformation.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/agentregistrationinformation.go index 4b5c0b2180ac..73846c7b7fb4 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/agentregistrationinformation.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/agentregistrationinformation.go @@ -37,7 +37,8 @@ func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrat } // NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient -// 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 NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/automationapi/interfaces.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/automationapi/interfaces.go index ec40aa7035a8..bb3e3493eae5 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/automationapi/interfaces.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/automationapi/interfaces.go @@ -31,7 +31,9 @@ type AccountClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.Account, err error) List(ctx context.Context) (result automation.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result automation.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result automation.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result automation.AccountListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, parameters automation.AccountUpdateParameters) (result automation.Account, err error) } @@ -71,6 +73,7 @@ type CertificateClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result automation.Certificate, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CertificateListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CertificateListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters automation.CertificateUpdateParameters) (result automation.Certificate, err error) } @@ -82,6 +85,7 @@ type ConnectionClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result automation.Connection, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result automation.Connection, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters automation.ConnectionUpdateParameters) (result automation.Connection, err error) } @@ -93,6 +97,7 @@ type ConnectionTypeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result automation.ConnectionType, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionTypeListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ConnectionTypeListResultIterator, err error) } var _ ConnectionTypeClientAPI = (*automation.ConnectionTypeClient)(nil) @@ -103,6 +108,7 @@ type CredentialClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result automation.Credential, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CredentialListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.CredentialListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters automation.CredentialUpdateParameters) (result automation.Credential, err error) } @@ -115,6 +121,7 @@ type DscConfigurationClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result automation.DscConfiguration, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscConfigurationListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscConfigurationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters *automation.DscConfigurationUpdateParameters) (result automation.DscConfiguration, err error) } @@ -125,6 +132,7 @@ type HybridRunbookWorkerGroupClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result automation.HybridRunbookWorkerGroup, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.HybridRunbookWorkerGroupsListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.HybridRunbookWorkerGroupsListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters automation.HybridRunbookWorkerGroupUpdateParameters) (result automation.HybridRunbookWorkerGroup, err error) } @@ -136,6 +144,7 @@ type JobScheduleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result automation.JobSchedule, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobScheduleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.JobScheduleListResultIterator, err error) } var _ JobScheduleClientAPI = (*automation.JobScheduleClient)(nil) @@ -151,6 +160,7 @@ var _ LinkedWorkspaceClientAPI = (*automation.LinkedWorkspaceClient)(nil) type ActivityClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result automation.Activity, err error) ListByModule(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.ActivityListResultPage, err error) + ListByModuleComplete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.ActivityListResultIterator, err error) } var _ ActivityClientAPI = (*automation.ActivityClient)(nil) @@ -161,6 +171,7 @@ type ModuleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result automation.Module, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters automation.ModuleUpdateParameters) (result automation.Module, err error) } @@ -187,6 +198,7 @@ type ScheduleClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result automation.Schedule, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ScheduleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ScheduleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters automation.ScheduleUpdateParameters) (result automation.Schedule, err error) } @@ -198,6 +210,7 @@ type VariableClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result automation.Variable, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.VariableListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.VariableListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters automation.VariableUpdateParameters) (result automation.Variable, err error) } @@ -210,6 +223,7 @@ type WebhookClientAPI interface { GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.String, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result automation.Webhook, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WebhookListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WebhookListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters automation.WebhookUpdateParameters) (result automation.Webhook, err error) } @@ -221,6 +235,7 @@ type WatcherClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string) (result automation.Watcher, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WatcherListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.WatcherListResultIterator, err error) Start(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string) (result autorest.Response, err error) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, parameters automation.WatcherUpdateParameters) (result automation.Watcher, err error) @@ -260,6 +275,7 @@ type SourceControlClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string) (result automation.SourceControl, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.SourceControlListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.SourceControlListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters automation.SourceControlUpdateParameters) (result automation.SourceControl, err error) } @@ -270,6 +286,7 @@ type SourceControlSyncJobClientAPI interface { Create(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, parameters automation.SourceControlSyncJobCreateParameters) (result automation.SourceControlSyncJob, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID) (result automation.SourceControlSyncJobByID, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result automation.SourceControlSyncJobListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, filter string) (result automation.SourceControlSyncJobListResultIterator, err error) } var _ SourceControlSyncJobClientAPI = (*automation.SourceControlSyncJobClient)(nil) @@ -278,6 +295,7 @@ var _ SourceControlSyncJobClientAPI = (*automation.SourceControlSyncJobClient)(n type SourceControlSyncJobStreamsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, streamID string) (result automation.SourceControlSyncJobStreamByID, err error) ListBySyncJob(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, filter string) (result automation.SourceControlSyncJobStreamsListBySyncJobPage, err error) + ListBySyncJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID uuid.UUID, filter string) (result automation.SourceControlSyncJobStreamsListBySyncJobIterator, err error) } var _ SourceControlSyncJobStreamsClientAPI = (*automation.SourceControlSyncJobStreamsClient)(nil) @@ -289,6 +307,7 @@ type JobClientAPI interface { GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result automation.ReadCloser, err error) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (result automation.JobListResultV2Page, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, clientRequestID string) (result automation.JobListResultV2Iterator, err error) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, clientRequestID string) (result autorest.Response, err error) @@ -300,6 +319,7 @@ var _ JobClientAPI = (*automation.JobClient)(nil) type JobStreamClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, jobStreamID string, clientRequestID string) (result automation.JobStream, err error) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (result automation.JobStreamListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, filter string, clientRequestID string) (result automation.JobStreamListResultIterator, err error) } var _ JobStreamClientAPI = (*automation.JobStreamClient)(nil) @@ -317,6 +337,7 @@ type DscNodeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result automation.DscNode, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result automation.DscNode, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscNodeListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscNodeListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, dscNodeUpdateParameters automation.DscNodeUpdateParameters) (result automation.DscNode, err error) } @@ -327,6 +348,7 @@ type NodeReportsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result automation.DscNodeReport, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result automation.SetObject, err error) ListByNode(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result automation.DscNodeReportListResultPage, err error) + ListByNodeComplete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result automation.DscNodeReportListResultIterator, err error) } var _ NodeReportsClientAPI = (*automation.NodeReportsClient)(nil) @@ -337,6 +359,7 @@ type DscCompilationJobClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobName string) (result automation.DscCompilationJob, err error) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result automation.JobStream, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscCompilationJobListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result automation.DscCompilationJobListResultIterator, err error) } var _ DscCompilationJobClientAPI = (*automation.DscCompilationJobClient)(nil) @@ -354,6 +377,7 @@ type DscNodeConfigurationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result automation.DscNodeConfiguration, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscNodeConfigurationListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result automation.DscNodeConfigurationListResultIterator, err error) } var _ DscNodeConfigurationClientAPI = (*automation.DscNodeConfigurationClient)(nil) @@ -382,6 +406,7 @@ type RunbookClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.Runbook, err error) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.ReadCloser, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.RunbookListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.RunbookListResultIterator, err error) Publish(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result automation.RunbookPublishFuture, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters automation.RunbookUpdateParameters) (result automation.Runbook, err error) } @@ -392,6 +417,7 @@ var _ RunbookClientAPI = (*automation.RunbookClient)(nil) type TestJobStreamsClientAPI interface { Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result automation.JobStream, err error) ListByTestJob(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result automation.JobStreamListResultPage, err error) + ListByTestJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result automation.JobStreamListResultIterator, err error) } var _ TestJobStreamsClientAPI = (*automation.TestJobStreamsClient)(nil) @@ -413,6 +439,7 @@ type Python2PackageClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string) (result automation.Module, err error) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultPage, err error) + ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result automation.ModuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters automation.PythonPackageUpdateParameters) (result automation.Module, err error) } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/certificate.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/certificate.go index 2c78aee0afd9..b6cec1846342 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/certificate.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/certificate.go @@ -36,7 +36,8 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/client.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/client.go index 71700fb23f89..59d291c37980 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/client.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/connection.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/connection.go index 8f3f172c1ca1..8c3df318f915 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/connection.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/connection.go @@ -36,7 +36,8 @@ func NewConnectionClient(subscriptionID string) ConnectionClient { return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. +// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/connectiontype.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/connectiontype.go index e408013691a0..7aba51e3da4c 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/connectiontype.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/connectiontype.go @@ -36,7 +36,8 @@ func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient { return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. +// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/credential.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/credential.go index fe721caade5a..8abdad518e22 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/credential.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/credential.go @@ -36,7 +36,8 @@ func NewCredentialClient(subscriptionID string) CredentialClient { return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. +// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/dsccompilationjob.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/dsccompilationjob.go index 910535ed3316..412688b6fbdd 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/dsccompilationjob.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/dsccompilationjob.go @@ -37,7 +37,9 @@ func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. +// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/dsccompilationjobstream.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/dsccompilationjobstream.go index 0dae64a4dd86..b89fbce37363 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/dsccompilationjobstream.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/dsccompilationjobstream.go @@ -37,7 +37,9 @@ func NewDscCompilationJobStreamClient(subscriptionID string) DscCompilationJobSt return NewDscCompilationJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client. +// NewDscCompilationJobStreamClientWithBaseURI creates an instance of the DscCompilationJobStreamClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobStreamClient { return DscCompilationJobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/dscconfiguration.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/dscconfiguration.go index 1adb2650c6d0..dc8ffb74290f 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/dscconfiguration.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/dscconfiguration.go @@ -36,7 +36,9 @@ func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. +// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/dscnode.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/dscnode.go index bca9fe56e034..6a30f30f5433 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/dscnode.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/dscnode.go @@ -36,7 +36,8 @@ func NewDscNodeClient(subscriptionID string) DscNodeClient { return NewDscNodeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client. +// NewDscNodeClientWithBaseURI creates an instance of the DscNodeClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeClient { return DscNodeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/dscnodeconfiguration.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/dscnodeconfiguration.go index 8ad905e7abf0..9233e284592f 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/dscnodeconfiguration.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/dscnodeconfiguration.go @@ -36,7 +36,9 @@ func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationCl return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. +// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/fields.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/fields.go index 3ebac62895f4..d134d7ee6191 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/fields.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/fields.go @@ -36,7 +36,8 @@ func NewFieldsClient(subscriptionID string) FieldsClient { return NewFieldsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFieldsClientWithBaseURI creates an instance of the FieldsClient client. +// NewFieldsClientWithBaseURI creates an instance of the FieldsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsClient { return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/hybridrunbookworkergroup.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/hybridrunbookworkergroup.go index 48878c158c2e..16c0350b5b46 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/hybridrunbookworkergroup.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/hybridrunbookworkergroup.go @@ -36,7 +36,9 @@ func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorke return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. +// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/job.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/job.go index 82ba4b309109..9a1702c20ba3 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/job.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/job.go @@ -36,7 +36,8 @@ func NewJobClient(subscriptionID string) JobClient { return NewJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobClientWithBaseURI creates an instance of the JobClient client. +// NewJobClientWithBaseURI creates an instance of the JobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { return JobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/jobschedule.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/jobschedule.go index 78fd95ae7562..bbe3542342b4 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/jobschedule.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/jobschedule.go @@ -37,7 +37,8 @@ func NewJobScheduleClient(subscriptionID string) JobScheduleClient { return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. +// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/jobstream.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/jobstream.go index 30e69ed082be..7ef8e9031114 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/jobstream.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/jobstream.go @@ -36,7 +36,8 @@ func NewJobStreamClient(subscriptionID string) JobStreamClient { return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. +// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/keys.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/keys.go index bd3e6559f126..4133e9eedfaa 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/keys.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/keys.go @@ -36,7 +36,8 @@ func NewKeysClient(subscriptionID string) KeysClient { return NewKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewKeysClientWithBaseURI creates an instance of the KeysClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/linkedworkspace.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/linkedworkspace.go index 7d8fd8777256..bab0e15bb61d 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/linkedworkspace.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/linkedworkspace.go @@ -36,7 +36,8 @@ func NewLinkedWorkspaceClient(subscriptionID string) LinkedWorkspaceClient { return NewLinkedWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client. +// NewLinkedWorkspaceClientWithBaseURI creates an instance of the LinkedWorkspaceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) LinkedWorkspaceClient { return LinkedWorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/module.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/module.go index caa351e6ad51..4baa74c91a06 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/module.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/module.go @@ -36,7 +36,8 @@ func NewModuleClient(subscriptionID string) ModuleClient { return NewModuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewModuleClientWithBaseURI creates an instance of the ModuleClient client. +// NewModuleClientWithBaseURI creates an instance of the ModuleClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleClient { return ModuleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/nodecountinformation.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/nodecountinformation.go index 201f7b44bf41..58e483ac4fa0 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/nodecountinformation.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/nodecountinformation.go @@ -36,7 +36,9 @@ func NewNodeCountInformationClient(subscriptionID string) NodeCountInformationCl return NewNodeCountInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodeCountInformationClientWithBaseURI creates an instance of the NodeCountInformationClient client. +// NewNodeCountInformationClientWithBaseURI creates an instance of the NodeCountInformationClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewNodeCountInformationClientWithBaseURI(baseURI string, subscriptionID string) NodeCountInformationClient { return NodeCountInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/nodereports.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/nodereports.go index 2eff77f6ca3d..55db54bec77b 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/nodereports.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/nodereports.go @@ -36,7 +36,8 @@ func NewNodeReportsClient(subscriptionID string) NodeReportsClient { return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. +// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/objectdatatypes.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/objectdatatypes.go index 04f4391df47b..fd8db25c5d94 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/objectdatatypes.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/objectdatatypes.go @@ -36,7 +36,8 @@ func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient { return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. +// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/operations.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/operations.go index 12d40bbde3a7..3231c683b9ff 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/operations.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/python2package.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/python2package.go index 40daddc93832..ee2f6dd160f3 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/python2package.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/python2package.go @@ -36,7 +36,8 @@ func NewPython2PackageClient(subscriptionID string) Python2PackageClient { return NewPython2PackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPython2PackageClientWithBaseURI creates an instance of the Python2PackageClient client. +// NewPython2PackageClientWithBaseURI creates an instance of the Python2PackageClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPython2PackageClientWithBaseURI(baseURI string, subscriptionID string) Python2PackageClient { return Python2PackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/runbook.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/runbook.go index fbc3c321f382..7506fd6ff73c 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/runbook.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/runbook.go @@ -36,7 +36,8 @@ func NewRunbookClient(subscriptionID string) RunbookClient { return NewRunbookClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookClientWithBaseURI creates an instance of the RunbookClient client. +// NewRunbookClientWithBaseURI creates an instance of the RunbookClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookClient { return RunbookClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/runbookdraft.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/runbookdraft.go index dfdc3bed20ee..a1f08da8bf9a 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/runbookdraft.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/runbookdraft.go @@ -37,7 +37,8 @@ func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. +// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/schedule.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/schedule.go index 0f68168c8073..58b68d34a5cc 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/schedule.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/schedule.go @@ -36,7 +36,8 @@ func NewScheduleClient(subscriptionID string) ScheduleClient { return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. +// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurationmachineruns.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurationmachineruns.go index b201cf357022..291ed8411b59 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurationmachineruns.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurationmachineruns.go @@ -39,7 +39,8 @@ func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string) Soft } // NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI creates an instance of the -// SoftwareUpdateConfigurationMachineRunsClient client. +// SoftwareUpdateConfigurationMachineRunsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSoftwareUpdateConfigurationMachineRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationMachineRunsClient { return SoftwareUpdateConfigurationMachineRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurationruns.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurationruns.go index 40e5e92a8086..85cfdd5d4c6f 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurationruns.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurationruns.go @@ -38,7 +38,8 @@ func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string) SoftwareUpd } // NewSoftwareUpdateConfigurationRunsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationRunsClient -// 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 NewSoftwareUpdateConfigurationRunsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationRunsClient { return SoftwareUpdateConfigurationRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurations.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurations.go index 76085e5cb67c..02a1d3a750e9 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurations.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/softwareupdateconfigurations.go @@ -37,7 +37,8 @@ func NewSoftwareUpdateConfigurationsClient(subscriptionID string) SoftwareUpdate } // NewSoftwareUpdateConfigurationsClientWithBaseURI creates an instance of the SoftwareUpdateConfigurationsClient -// 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 NewSoftwareUpdateConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) SoftwareUpdateConfigurationsClient { return SoftwareUpdateConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrol.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrol.go index c265e95a193e..f02d380d492f 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrol.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrol.go @@ -36,7 +36,8 @@ func NewSourceControlClient(subscriptionID string) SourceControlClient { return NewSourceControlClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlClientWithBaseURI creates an instance of the SourceControlClient client. +// NewSourceControlClientWithBaseURI creates an instance of the SourceControlClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSourceControlClientWithBaseURI(baseURI string, subscriptionID string) SourceControlClient { return SourceControlClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrolsyncjob.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrolsyncjob.go index 9685b6988770..245a6d75077d 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrolsyncjob.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrolsyncjob.go @@ -37,7 +37,9 @@ func NewSourceControlSyncJobClient(subscriptionID string) SourceControlSyncJobCl return NewSourceControlSyncJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlSyncJobClientWithBaseURI creates an instance of the SourceControlSyncJobClient client. +// NewSourceControlSyncJobClientWithBaseURI creates an instance of the SourceControlSyncJobClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSourceControlSyncJobClientWithBaseURI(baseURI string, subscriptionID string) SourceControlSyncJobClient { return SourceControlSyncJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrolsyncjobstreams.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrolsyncjobstreams.go index e60ac69a03db..0ae400f87748 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrolsyncjobstreams.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/sourcecontrolsyncjobstreams.go @@ -37,7 +37,9 @@ func NewSourceControlSyncJobStreamsClient(subscriptionID string) SourceControlSy return NewSourceControlSyncJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSourceControlSyncJobStreamsClientWithBaseURI creates an instance of the SourceControlSyncJobStreamsClient client. +// NewSourceControlSyncJobStreamsClientWithBaseURI creates an instance of the SourceControlSyncJobStreamsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewSourceControlSyncJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) SourceControlSyncJobStreamsClient { return SourceControlSyncJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/statistics.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/statistics.go index 625062d6ebd2..e31ab7362b6f 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/statistics.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/statistics.go @@ -36,7 +36,8 @@ func NewStatisticsClient(subscriptionID string) StatisticsClient { return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. +// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/testjob.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/testjob.go index 21b477ef8b3a..f6353a23f136 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/testjob.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/testjob.go @@ -36,7 +36,8 @@ func NewTestJobClient(subscriptionID string) TestJobClient { return NewTestJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobClientWithBaseURI creates an instance of the TestJobClient client. +// NewTestJobClientWithBaseURI creates an instance of the TestJobClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobClient { return TestJobClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/testjobstreams.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/testjobstreams.go index a308710cc19e..4e224618c8ad 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/testjobstreams.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/testjobstreams.go @@ -36,7 +36,8 @@ func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient { return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. +// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/usages.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/usages.go index ee694d481382..1c98177cb82d 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/usages.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/variable.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/variable.go index dc1b92a10af0..95fb899f1e2b 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/variable.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/variable.go @@ -36,7 +36,8 @@ func NewVariableClient(subscriptionID string) VariableClient { return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVariableClientWithBaseURI creates an instance of the VariableClient client. +// NewVariableClientWithBaseURI creates an instance of the VariableClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/watcher.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/watcher.go index 77086c1b0707..fad0185e6f5e 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/watcher.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/watcher.go @@ -36,7 +36,8 @@ func NewWatcherClient(subscriptionID string) WatcherClient { return NewWatcherClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatcherClientWithBaseURI creates an instance of the WatcherClient client. +// NewWatcherClientWithBaseURI creates an instance of the WatcherClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWatcherClientWithBaseURI(baseURI string, subscriptionID string) WatcherClient { return WatcherClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/automation/mgmt/2018-06-30-preview/automation/webhook.go b/services/preview/automation/mgmt/2018-06-30-preview/automation/webhook.go index 0f01dd04f534..96c30c2a20f4 100644 --- a/services/preview/automation/mgmt/2018-06-30-preview/automation/webhook.go +++ b/services/preview/automation/mgmt/2018-06-30-preview/automation/webhook.go @@ -36,7 +36,8 @@ func NewWebhookClient(subscriptionID string) WebhookClient { return NewWebhookClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhookClientWithBaseURI creates an instance of the WebhookClient client. +// NewWebhookClientWithBaseURI creates an instance of the WebhookClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookClient { return WebhookClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi/interfaces.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi/interfaces.go index 666c6350b0c5..96f71f942d09 100644 --- a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi/interfaces.go +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result azuredata.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result azuredata.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*azuredata.OperationsClient)(nil) @@ -36,7 +37,9 @@ type SQLServerRegistrationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string) (result azuredata.SQLServerRegistration, err error) List(ctx context.Context) (result azuredata.SQLServerRegistrationListResultPage, err error) + ListComplete(ctx context.Context) (result azuredata.SQLServerRegistrationListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result azuredata.SQLServerRegistrationListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result azuredata.SQLServerRegistrationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, parameters azuredata.SQLServerRegistrationUpdate) (result azuredata.SQLServerRegistration, err error) } @@ -48,6 +51,7 @@ type SQLServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string, expand string) (result azuredata.SQLServer, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, expand string) (result azuredata.SQLServerListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, expand string) (result azuredata.SQLServerListResultIterator, err error) } var _ SQLServersClientAPI = (*azuredata.SQLServersClient)(nil) diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/client.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/client.go index ce715030929f..904bba0e9238 100644 --- a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/client.go +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/operations.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/operations.go index 28e7bd30911f..b022b3a498ba 100644 --- a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/operations.go +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlserverregistrations.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlserverregistrations.go index e6a988feae73..0455f6ccdc58 100644 --- a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlserverregistrations.go +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlserverregistrations.go @@ -36,7 +36,9 @@ func NewSQLServerRegistrationsClient(subscriptionID string) SQLServerRegistratio return NewSQLServerRegistrationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSQLServerRegistrationsClientWithBaseURI creates an instance of the SQLServerRegistrationsClient client. +// NewSQLServerRegistrationsClientWithBaseURI creates an instance of the SQLServerRegistrationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewSQLServerRegistrationsClientWithBaseURI(baseURI string, subscriptionID string) SQLServerRegistrationsClient { return SQLServerRegistrationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlservers.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlservers.go index d468ae57e832..64efc7cb76df 100644 --- a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlservers.go +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlservers.go @@ -36,7 +36,8 @@ func NewSQLServersClient(subscriptionID string) SQLServersClient { return NewSQLServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSQLServersClientWithBaseURI creates an instance of the SQLServersClient client. +// NewSQLServersClientWithBaseURI creates an instance of the SQLServersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSQLServersClientWithBaseURI(baseURI string, subscriptionID string) SQLServersClient { return SQLServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/batchaiapi/interfaces.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/batchaiapi/interfaces.go index 087a8ef55ded..fea582304413 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/batchaiapi/interfaces.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/batchaiapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result batchai.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result batchai.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*batchai.OperationsClient)(nil) @@ -35,8 +36,11 @@ type ClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, clusterName string) (result batchai.ClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, clusterName string) (result batchai.Cluster, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.ClusterListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.ClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.ClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.ClusterListResultIterator, err error) ListRemoteLoginInformation(ctx context.Context, resourceGroupName string, clusterName string) (result batchai.RemoteLoginInformationListResultPage, err error) + ListRemoteLoginInformationComplete(ctx context.Context, resourceGroupName string, clusterName string) (result batchai.RemoteLoginInformationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters batchai.ClusterUpdateParameters) (result batchai.Cluster, err error) } @@ -48,9 +52,13 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobName string) (result batchai.JobsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, jobName string) (result batchai.Job, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.JobListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.JobListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.JobListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.JobListResultIterator, err error) ListOutputFiles(ctx context.Context, resourceGroupName string, jobName string, outputdirectoryid string, linkexpiryinminutes *int32, maxResults *int32) (result batchai.FileListResultPage, err error) + ListOutputFilesComplete(ctx context.Context, resourceGroupName string, jobName string, outputdirectoryid string, linkexpiryinminutes *int32, maxResults *int32) (result batchai.FileListResultIterator, err error) ListRemoteLoginInformation(ctx context.Context, resourceGroupName string, jobName string) (result batchai.RemoteLoginInformationListResultPage, err error) + ListRemoteLoginInformationComplete(ctx context.Context, resourceGroupName string, jobName string) (result batchai.RemoteLoginInformationListResultIterator, err error) Terminate(ctx context.Context, resourceGroupName string, jobName string) (result batchai.JobsTerminateFuture, err error) } @@ -62,7 +70,9 @@ type FileServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, fileServerName string) (result batchai.FileServersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, fileServerName string) (result batchai.FileServer, err error) List(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.FileServerListResultPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, maxResults *int32) (result batchai.FileServerListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.FileServerListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, maxResults *int32) (result batchai.FileServerListResultIterator, err error) } var _ FileServersClientAPI = (*batchai.FileServersClient)(nil) diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/client.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/client.go index 06cd01575f24..8b1e4c6c9939 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/client.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/clusters.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/clusters.go index cdf765d0babb..b3f90b3826c4 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/clusters.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/fileservers.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/fileservers.go index 861d6fd2e11d..9a864f21a0b9 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/fileservers.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/fileservers.go @@ -36,7 +36,8 @@ func NewFileServersClient(subscriptionID string) FileServersClient { return NewFileServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileServersClientWithBaseURI creates an instance of the FileServersClient client. +// NewFileServersClientWithBaseURI creates an instance of the FileServersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileServersClientWithBaseURI(baseURI string, subscriptionID string) FileServersClient { return FileServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/jobs.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/jobs.go index 1b94df13f957..1755a1c930f7 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/jobs.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/operations.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/operations.go index 4821dfab4c9b..2a734c53e9f9 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/operations.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/billing/mgmt/2017-02-27-preview/billing/billingapi/interfaces.go b/services/preview/billing/mgmt/2017-02-27-preview/billing/billingapi/interfaces.go index 54e4a2f16147..9d9ff6bd4a04 100644 --- a/services/preview/billing/mgmt/2017-02-27-preview/billing/billingapi/interfaces.go +++ b/services/preview/billing/mgmt/2017-02-27-preview/billing/billingapi/interfaces.go @@ -27,6 +27,7 @@ type InvoicesClientAPI interface { Get(ctx context.Context, invoiceName string) (result billing.Invoice, err error) GetLatest(ctx context.Context) (result billing.Invoice, err error) List(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result billing.InvoicesListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result billing.InvoicesListResultIterator, err error) } var _ InvoicesClientAPI = (*billing.InvoicesClient)(nil) @@ -34,6 +35,7 @@ var _ InvoicesClientAPI = (*billing.InvoicesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result billing.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result billing.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*billing.OperationsClient)(nil) diff --git a/services/preview/billing/mgmt/2017-02-27-preview/billing/client.go b/services/preview/billing/mgmt/2017-02-27-preview/billing/client.go index e70f67492bc8..76c391bdaf7e 100644 --- a/services/preview/billing/mgmt/2017-02-27-preview/billing/client.go +++ b/services/preview/billing/mgmt/2017-02-27-preview/billing/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/billing/mgmt/2017-02-27-preview/billing/invoices.go b/services/preview/billing/mgmt/2017-02-27-preview/billing/invoices.go index 866f909f13d9..4921904cdfb4 100644 --- a/services/preview/billing/mgmt/2017-02-27-preview/billing/invoices.go +++ b/services/preview/billing/mgmt/2017-02-27-preview/billing/invoices.go @@ -38,7 +38,8 @@ func NewInvoicesClient(subscriptionID string) InvoicesClient { return NewInvoicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client. +// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient { return InvoicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2017-02-27-preview/billing/operations.go b/services/preview/billing/mgmt/2017-02-27-preview/billing/operations.go index 414161cca564..84efa7e89f74 100644 --- a/services/preview/billing/mgmt/2017-02-27-preview/billing/operations.go +++ b/services/preview/billing/mgmt/2017-02-27-preview/billing/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/billing/mgmt/2017-04-24-preview/billing/billingapi/interfaces.go b/services/preview/billing/mgmt/2017-04-24-preview/billing/billingapi/interfaces.go index 51c3b7e88fe9..4a0d1210c156 100644 --- a/services/preview/billing/mgmt/2017-04-24-preview/billing/billingapi/interfaces.go +++ b/services/preview/billing/mgmt/2017-04-24-preview/billing/billingapi/interfaces.go @@ -26,6 +26,7 @@ import ( type PeriodsClientAPI interface { Get(ctx context.Context, billingPeriodName string) (result billing.Period, err error) List(ctx context.Context, filter string, skiptoken string, top *int32) (result billing.PeriodsListResultPage, err error) + ListComplete(ctx context.Context, filter string, skiptoken string, top *int32) (result billing.PeriodsListResultIterator, err error) } var _ PeriodsClientAPI = (*billing.PeriodsClient)(nil) @@ -35,6 +36,7 @@ type InvoicesClientAPI interface { Get(ctx context.Context, invoiceName string) (result billing.Invoice, err error) GetLatest(ctx context.Context) (result billing.Invoice, err error) List(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result billing.InvoicesListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result billing.InvoicesListResultIterator, err error) } var _ InvoicesClientAPI = (*billing.InvoicesClient)(nil) @@ -42,6 +44,7 @@ var _ InvoicesClientAPI = (*billing.InvoicesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result billing.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result billing.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*billing.OperationsClient)(nil) diff --git a/services/preview/billing/mgmt/2017-04-24-preview/billing/client.go b/services/preview/billing/mgmt/2017-04-24-preview/billing/client.go index 3a1e174984a1..be0096a54ba6 100644 --- a/services/preview/billing/mgmt/2017-04-24-preview/billing/client.go +++ b/services/preview/billing/mgmt/2017-04-24-preview/billing/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/billing/mgmt/2017-04-24-preview/billing/invoices.go b/services/preview/billing/mgmt/2017-04-24-preview/billing/invoices.go index 924eadeeb3cd..7455aa033059 100644 --- a/services/preview/billing/mgmt/2017-04-24-preview/billing/invoices.go +++ b/services/preview/billing/mgmt/2017-04-24-preview/billing/invoices.go @@ -38,7 +38,8 @@ func NewInvoicesClient(subscriptionID string) InvoicesClient { return NewInvoicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client. +// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient { return InvoicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2017-04-24-preview/billing/operations.go b/services/preview/billing/mgmt/2017-04-24-preview/billing/operations.go index 77bd7fb0ec9b..98f303eeca30 100644 --- a/services/preview/billing/mgmt/2017-04-24-preview/billing/operations.go +++ b/services/preview/billing/mgmt/2017-04-24-preview/billing/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/billing/mgmt/2017-04-24-preview/billing/periods.go b/services/preview/billing/mgmt/2017-04-24-preview/billing/periods.go index 5494ab385ae6..7a27d417f919 100644 --- a/services/preview/billing/mgmt/2017-04-24-preview/billing/periods.go +++ b/services/preview/billing/mgmt/2017-04-24-preview/billing/periods.go @@ -38,7 +38,8 @@ func NewPeriodsClient(subscriptionID string) PeriodsClient { return NewPeriodsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPeriodsClientWithBaseURI creates an instance of the PeriodsClient client. +// NewPeriodsClientWithBaseURI creates an instance of the PeriodsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPeriodsClientWithBaseURI(baseURI string, subscriptionID string) PeriodsClient { return PeriodsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-03-01-preview/billing/billingapi/interfaces.go b/services/preview/billing/mgmt/2018-03-01-preview/billing/billingapi/interfaces.go index 8ce90881da2a..f9863c8fadb6 100644 --- a/services/preview/billing/mgmt/2018-03-01-preview/billing/billingapi/interfaces.go +++ b/services/preview/billing/mgmt/2018-03-01-preview/billing/billingapi/interfaces.go @@ -26,6 +26,7 @@ import ( type EnrollmentAccountsClientAPI interface { Get(ctx context.Context, name string) (result billing.EnrollmentAccount, err error) List(ctx context.Context) (result billing.EnrollmentAccountListResultPage, err error) + ListComplete(ctx context.Context) (result billing.EnrollmentAccountListResultIterator, err error) } var _ EnrollmentAccountsClientAPI = (*billing.EnrollmentAccountsClient)(nil) @@ -34,6 +35,7 @@ var _ EnrollmentAccountsClientAPI = (*billing.EnrollmentAccountsClient)(nil) type PeriodsClientAPI interface { Get(ctx context.Context, billingPeriodName string) (result billing.Period, err error) List(ctx context.Context, filter string, skiptoken string, top *int32) (result billing.PeriodsListResultPage, err error) + ListComplete(ctx context.Context, filter string, skiptoken string, top *int32) (result billing.PeriodsListResultIterator, err error) } var _ PeriodsClientAPI = (*billing.PeriodsClient)(nil) @@ -43,6 +45,7 @@ type InvoicesClientAPI interface { Get(ctx context.Context, invoiceName string) (result billing.Invoice, err error) GetLatest(ctx context.Context) (result billing.Invoice, err error) List(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result billing.InvoicesListResultPage, err error) + ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32) (result billing.InvoicesListResultIterator, err error) } var _ InvoicesClientAPI = (*billing.InvoicesClient)(nil) @@ -50,6 +53,7 @@ var _ InvoicesClientAPI = (*billing.InvoicesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result billing.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result billing.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*billing.OperationsClient)(nil) diff --git a/services/preview/billing/mgmt/2018-03-01-preview/billing/client.go b/services/preview/billing/mgmt/2018-03-01-preview/billing/client.go index 0da92af415db..c176f876ad29 100644 --- a/services/preview/billing/mgmt/2018-03-01-preview/billing/client.go +++ b/services/preview/billing/mgmt/2018-03-01-preview/billing/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/billing/mgmt/2018-03-01-preview/billing/enrollmentaccounts.go b/services/preview/billing/mgmt/2018-03-01-preview/billing/enrollmentaccounts.go index 77209f150e62..790f41662891 100644 --- a/services/preview/billing/mgmt/2018-03-01-preview/billing/enrollmentaccounts.go +++ b/services/preview/billing/mgmt/2018-03-01-preview/billing/enrollmentaccounts.go @@ -35,7 +35,9 @@ func NewEnrollmentAccountsClient(subscriptionID string) EnrollmentAccountsClient return NewEnrollmentAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnrollmentAccountsClientWithBaseURI creates an instance of the EnrollmentAccountsClient client. +// NewEnrollmentAccountsClientWithBaseURI creates an instance of the EnrollmentAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEnrollmentAccountsClientWithBaseURI(baseURI string, subscriptionID string) EnrollmentAccountsClient { return EnrollmentAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-03-01-preview/billing/invoices.go b/services/preview/billing/mgmt/2018-03-01-preview/billing/invoices.go index 5b8278b4d4f4..ffd2ebac8459 100644 --- a/services/preview/billing/mgmt/2018-03-01-preview/billing/invoices.go +++ b/services/preview/billing/mgmt/2018-03-01-preview/billing/invoices.go @@ -36,7 +36,8 @@ func NewInvoicesClient(subscriptionID string) InvoicesClient { return NewInvoicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client. +// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient { return InvoicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-03-01-preview/billing/operations.go b/services/preview/billing/mgmt/2018-03-01-preview/billing/operations.go index 07f99ed608c0..9a7f753ebbd9 100644 --- a/services/preview/billing/mgmt/2018-03-01-preview/billing/operations.go +++ b/services/preview/billing/mgmt/2018-03-01-preview/billing/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/billing/mgmt/2018-03-01-preview/billing/periods.go b/services/preview/billing/mgmt/2018-03-01-preview/billing/periods.go index c3a7bdca4b14..dd8b30c2d7cd 100644 --- a/services/preview/billing/mgmt/2018-03-01-preview/billing/periods.go +++ b/services/preview/billing/mgmt/2018-03-01-preview/billing/periods.go @@ -36,7 +36,8 @@ func NewPeriodsClient(subscriptionID string) PeriodsClient { return NewPeriodsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPeriodsClientWithBaseURI creates an instance of the PeriodsClient client. +// NewPeriodsClientWithBaseURI creates an instance of the PeriodsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPeriodsClientWithBaseURI(baseURI string, subscriptionID string) PeriodsClient { return PeriodsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/accounts.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/accounts.go index 987a43b45d32..a585b134af44 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/accounts.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/accounts.go @@ -35,7 +35,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/addresses.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/addresses.go index e60ec8ff2418..42011e519f60 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/addresses.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/addresses.go @@ -35,7 +35,8 @@ func NewAddressesClient(subscriptionID string) AddressesClient { return NewAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAddressesClientWithBaseURI creates an instance of the AddressesClient client. +// NewAddressesClientWithBaseURI creates an instance of the AddressesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAddressesClientWithBaseURI(baseURI string, subscriptionID string) AddressesClient { return AddressesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/agreements.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/agreements.go index dfd35f44fef7..a6aa6e6fc78e 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/agreements.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/agreements.go @@ -35,7 +35,8 @@ func NewAgreementsClient(subscriptionID string) AgreementsClient { return NewAgreementsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgreementsClientWithBaseURI creates an instance of the AgreementsClient client. +// NewAgreementsClientWithBaseURI creates an instance of the AgreementsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgreementsClientWithBaseURI(baseURI string, subscriptionID string) AgreementsClient { return AgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/availablebalances.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/availablebalances.go index 5aca952ce656..306e7f1174ef 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/availablebalances.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/availablebalances.go @@ -35,7 +35,9 @@ func NewAvailableBalancesClient(subscriptionID string) AvailableBalancesClient { return NewAvailableBalancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableBalancesClientWithBaseURI creates an instance of the AvailableBalancesClient client. +// NewAvailableBalancesClientWithBaseURI creates an instance of the AvailableBalancesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAvailableBalancesClientWithBaseURI(baseURI string, subscriptionID string) AvailableBalancesClient { return AvailableBalancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/billingapi/interfaces.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/billingapi/interfaces.go index e99ffd0d4b4b..7aed646a2611 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/billingapi/interfaces.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/billingapi/interfaces.go @@ -27,6 +27,7 @@ import ( type AccountsClientAPI interface { Get(ctx context.Context, billingAccountName string, expand string) (result billing.Account, err error) List(ctx context.Context, expand string) (result billing.AccountListResultPage, err error) + ListComplete(ctx context.Context, expand string) (result billing.AccountListResultIterator, err error) Update(ctx context.Context, billingAccountName string, parameters billing.AccountUpdateProperties) (result billing.AccountsUpdateFuture, err error) } @@ -35,7 +36,9 @@ var _ AccountsClientAPI = (*billing.AccountsClient)(nil) // PaymentMethodsClientAPI contains the set of methods on the PaymentMethodsClient type. type PaymentMethodsClientAPI interface { ListByBillingAccountName(ctx context.Context, billingAccountName string) (result billing.PaymentMethodsListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string) (result billing.PaymentMethodsListResultIterator, err error) ListByBillingProfileName(ctx context.Context, billingAccountName string, billingProfileName string) (result billing.PaymentMethodsListResultPage, err error) + ListByBillingProfileNameComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result billing.PaymentMethodsListResultIterator, err error) } var _ PaymentMethodsClientAPI = (*billing.PaymentMethodsClient)(nil) @@ -59,6 +62,7 @@ type ProfilesClientAPI interface { Create(ctx context.Context, billingAccountName string, parameters billing.ProfileCreationParameters) (result billing.ProfilesCreateFuture, err error) Get(ctx context.Context, billingAccountName string, billingProfileName string, expand string) (result billing.Profile, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string, expand string) (result billing.ProfileListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string, expand string) (result billing.ProfileListResultIterator, err error) Update(ctx context.Context, billingAccountName string, billingProfileName string, parameters billing.Profile) (result billing.ProfilesUpdateFuture, err error) } @@ -68,6 +72,7 @@ var _ ProfilesClientAPI = (*billing.ProfilesClient)(nil) type CustomersClientAPI interface { Get(ctx context.Context, billingAccountName string, customerName string, expand string) (result billing.Customer, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string, filter string, skiptoken string) (result billing.CustomerListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string, filter string, skiptoken string) (result billing.CustomerListResultIterator, err error) } var _ CustomersClientAPI = (*billing.CustomersClient)(nil) @@ -79,7 +84,9 @@ type InvoiceSectionsClientAPI interface { Get(ctx context.Context, billingAccountName string, invoiceSectionName string, expand string) (result billing.InvoiceSection, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string, expand string) (result billing.InvoiceSectionListResult, err error) ListByBillingProfileName(ctx context.Context, billingAccountName string, billingProfileName string) (result billing.InvoiceSectionListResultPage, err error) + ListByBillingProfileNameComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result billing.InvoiceSectionListResultIterator, err error) ListByCreateSubscriptionPermission(ctx context.Context, billingAccountName string, expand string) (result billing.InvoiceSectionListResultPage, err error) + ListByCreateSubscriptionPermissionComplete(ctx context.Context, billingAccountName string, expand string) (result billing.InvoiceSectionListResultIterator, err error) Update(ctx context.Context, billingAccountName string, invoiceSectionName string, parameters billing.InvoiceSection) (result billing.InvoiceSectionsUpdateFuture, err error) } @@ -89,6 +96,7 @@ var _ InvoiceSectionsClientAPI = (*billing.InvoiceSectionsClient)(nil) type DepartmentsClientAPI interface { Get(ctx context.Context, billingAccountName string, departmentName string, expand string, filter string) (result billing.Department, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string, expand string, filter string) (result billing.DepartmentListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string, expand string, filter string) (result billing.DepartmentListResultIterator, err error) } var _ DepartmentsClientAPI = (*billing.DepartmentsClient)(nil) @@ -97,6 +105,7 @@ var _ DepartmentsClientAPI = (*billing.DepartmentsClient)(nil) type EnrollmentAccountsClientAPI interface { GetByEnrollmentAccountID(ctx context.Context, billingAccountName string, enrollmentAccountName string, expand string, filter string) (result billing.EnrollmentAccount, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string, expand string, filter string) (result billing.EnrollmentAccountListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string, expand string, filter string) (result billing.EnrollmentAccountListResultIterator, err error) } var _ EnrollmentAccountsClientAPI = (*billing.EnrollmentAccountsClient)(nil) @@ -105,7 +114,9 @@ var _ EnrollmentAccountsClientAPI = (*billing.EnrollmentAccountsClient)(nil) type InvoicesClientAPI interface { Get(ctx context.Context, billingAccountName string, billingProfileName string, invoiceName string) (result billing.InvoiceSummary, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string, periodStartDate string, periodEndDate string) (result billing.InvoiceListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string, periodStartDate string, periodEndDate string) (result billing.InvoiceListResultIterator, err error) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, periodStartDate string, periodEndDate string) (result billing.InvoiceListResultPage, err error) + ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string, periodStartDate string, periodEndDate string) (result billing.InvoiceListResultIterator, err error) } var _ InvoicesClientAPI = (*billing.InvoicesClient)(nil) @@ -122,9 +133,13 @@ type SubscriptionsClientAPI interface { Get(ctx context.Context, billingAccountName string, invoiceSectionName string, billingSubscriptionName string) (result billing.SubscriptionSummary, err error) GetByCustomerName(ctx context.Context, billingAccountName string, customerName string, billingSubscriptionName string) (result billing.SubscriptionSummary, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string) (result billing.SubscriptionsListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string) (result billing.SubscriptionsListResultIterator, err error) ListByBillingProfileName(ctx context.Context, billingAccountName string, billingProfileName string) (result billing.SubscriptionsListResultPage, err error) + ListByBillingProfileNameComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result billing.SubscriptionsListResultIterator, err error) ListByCustomerName(ctx context.Context, billingAccountName string, customerName string) (result billing.SubscriptionsListResultPage, err error) + ListByCustomerNameComplete(ctx context.Context, billingAccountName string, customerName string) (result billing.SubscriptionsListResultIterator, err error) ListByInvoiceSectionName(ctx context.Context, billingAccountName string, invoiceSectionName string) (result billing.SubscriptionsListResultPage, err error) + ListByInvoiceSectionNameComplete(ctx context.Context, billingAccountName string, invoiceSectionName string) (result billing.SubscriptionsListResultIterator, err error) Transfer(ctx context.Context, billingAccountName string, invoiceSectionName string, billingSubscriptionName string, parameters billing.TransferBillingSubscriptionRequestProperties) (result billing.SubscriptionsTransferFuture, err error) ValidateTransfer(ctx context.Context, billingAccountName string, invoiceSectionName string, billingSubscriptionName string, parameters billing.TransferBillingSubscriptionRequestProperties) (result billing.ValidateSubscriptionTransferEligibilityResult, err error) } @@ -135,7 +150,9 @@ var _ SubscriptionsClientAPI = (*billing.SubscriptionsClient)(nil) type ProductsClientAPI interface { Get(ctx context.Context, billingAccountName string, invoiceSectionName string, productName string) (result billing.ProductSummary, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string, filter string) (result billing.ProductsListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string, filter string) (result billing.ProductsListResultIterator, err error) ListByInvoiceSectionName(ctx context.Context, billingAccountName string, invoiceSectionName string, filter string) (result billing.ProductsListResultPage, err error) + ListByInvoiceSectionNameComplete(ctx context.Context, billingAccountName string, invoiceSectionName string, filter string) (result billing.ProductsListResultIterator, err error) Transfer(ctx context.Context, billingAccountName string, invoiceSectionName string, productName string, parameters billing.TransferProductRequestProperties) (result billing.ProductSummary, err error) UpdateAutoRenewByBillingAccountName(ctx context.Context, billingAccountName string, productName string, body billing.UpdateAutoRenewRequest) (result billing.UpdateAutoRenewOperationSummary, err error) UpdateAutoRenewByInvoiceSectionName(ctx context.Context, billingAccountName string, invoiceSectionName string, productName string, body billing.UpdateAutoRenewRequest) (result billing.UpdateAutoRenewOperationSummary, err error) @@ -147,9 +164,13 @@ var _ ProductsClientAPI = (*billing.ProductsClient)(nil) // TransactionsClientAPI contains the set of methods on the TransactionsClient type. type TransactionsClientAPI interface { ListByBillingAccountName(ctx context.Context, billingAccountName string, startDate string, endDate string, filter string) (result billing.TransactionsListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string, startDate string, endDate string, filter string) (result billing.TransactionsListResultIterator, err error) ListByBillingProfileName(ctx context.Context, billingAccountName string, billingProfileName string, startDate string, endDate string, filter string) (result billing.TransactionsListResultPage, err error) + ListByBillingProfileNameComplete(ctx context.Context, billingAccountName string, billingProfileName string, startDate string, endDate string, filter string) (result billing.TransactionsListResultIterator, err error) ListByCustomerName(ctx context.Context, billingAccountName string, customerName string, startDate string, endDate string, filter string) (result billing.TransactionsListResultPage, err error) + ListByCustomerNameComplete(ctx context.Context, billingAccountName string, customerName string, startDate string, endDate string, filter string) (result billing.TransactionsListResultIterator, err error) ListByInvoiceSectionName(ctx context.Context, billingAccountName string, invoiceSectionName string, startDate string, endDate string, filter string) (result billing.TransactionsListResultPage, err error) + ListByInvoiceSectionNameComplete(ctx context.Context, billingAccountName string, invoiceSectionName string, startDate string, endDate string, filter string) (result billing.TransactionsListResultIterator, err error) } var _ TransactionsClientAPI = (*billing.TransactionsClient)(nil) @@ -175,6 +196,7 @@ type TransfersClientAPI interface { Get(ctx context.Context, billingAccountName string, invoiceSectionName string, transferName string) (result billing.TransferDetails, err error) Initiate(ctx context.Context, billingAccountName string, invoiceSectionName string, body billing.InitiateTransferRequest) (result billing.TransferDetails, err error) List(ctx context.Context, billingAccountName string, invoiceSectionName string) (result billing.TransferDetailsListResultPage, err error) + ListComplete(ctx context.Context, billingAccountName string, invoiceSectionName string) (result billing.TransferDetailsListResultIterator, err error) } var _ TransfersClientAPI = (*billing.TransfersClient)(nil) @@ -185,6 +207,7 @@ type RecipientTransfersClientAPI interface { Decline(ctx context.Context, transferName string) (result billing.RecipientTransferDetails, err error) Get(ctx context.Context, transferName string) (result billing.RecipientTransferDetails, err error) List(ctx context.Context) (result billing.RecipientTransferDetailsListResultPage, err error) + ListComplete(ctx context.Context) (result billing.RecipientTransferDetailsListResultIterator, err error) } var _ RecipientTransfersClientAPI = (*billing.RecipientTransfersClient)(nil) @@ -192,6 +215,7 @@ var _ RecipientTransfersClientAPI = (*billing.RecipientTransfersClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result billing.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result billing.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*billing.OperationsClient)(nil) @@ -240,6 +264,7 @@ var _ RoleAssignmentsClientAPI = (*billing.RoleAssignmentsClient)(nil) type AgreementsClientAPI interface { Get(ctx context.Context, billingAccountName string, agreementName string, expand string) (result billing.Agreement, err error) ListByBillingAccountName(ctx context.Context, billingAccountName string, expand string) (result billing.AgreementListResultPage, err error) + ListByBillingAccountNameComplete(ctx context.Context, billingAccountName string, expand string) (result billing.AgreementListResultIterator, err error) } var _ AgreementsClientAPI = (*billing.AgreementsClient)(nil) diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/client.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/client.go index 3c6cc9a7fdd3..ca71e1b19e59 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/client.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/customers.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/customers.go index 1747fd15439e..9b8872f1a027 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/customers.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/customers.go @@ -35,7 +35,8 @@ func NewCustomersClient(subscriptionID string) CustomersClient { return NewCustomersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomersClientWithBaseURI creates an instance of the CustomersClient client. +// NewCustomersClientWithBaseURI creates an instance of the CustomersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomersClientWithBaseURI(baseURI string, subscriptionID string) CustomersClient { return CustomersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/departments.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/departments.go index 3512a0433b5e..0aa86387bd57 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/departments.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/departments.go @@ -35,7 +35,8 @@ func NewDepartmentsClient(subscriptionID string) DepartmentsClient { return NewDepartmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDepartmentsClientWithBaseURI creates an instance of the DepartmentsClient client. +// NewDepartmentsClientWithBaseURI creates an instance of the DepartmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDepartmentsClientWithBaseURI(baseURI string, subscriptionID string) DepartmentsClient { return DepartmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/enrollmentaccounts.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/enrollmentaccounts.go index 23f2e222e9ba..a6d655c44930 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/enrollmentaccounts.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/enrollmentaccounts.go @@ -35,7 +35,9 @@ func NewEnrollmentAccountsClient(subscriptionID string) EnrollmentAccountsClient return NewEnrollmentAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnrollmentAccountsClientWithBaseURI creates an instance of the EnrollmentAccountsClient client. +// NewEnrollmentAccountsClientWithBaseURI creates an instance of the EnrollmentAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEnrollmentAccountsClientWithBaseURI(baseURI string, subscriptionID string) EnrollmentAccountsClient { return EnrollmentAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/invoices.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/invoices.go index a777f9f5d36e..cea2bd782830 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/invoices.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/invoices.go @@ -35,7 +35,8 @@ func NewInvoicesClient(subscriptionID string) InvoicesClient { return NewInvoicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client. +// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient { return InvoicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/invoicesections.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/invoicesections.go index e90f3652cf4e..9b3abf359f90 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/invoicesections.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/invoicesections.go @@ -35,7 +35,8 @@ func NewInvoiceSectionsClient(subscriptionID string) InvoiceSectionsClient { return NewInvoiceSectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInvoiceSectionsClientWithBaseURI creates an instance of the InvoiceSectionsClient client. +// NewInvoiceSectionsClientWithBaseURI creates an instance of the InvoiceSectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInvoiceSectionsClientWithBaseURI(baseURI string, subscriptionID string) InvoiceSectionsClient { return InvoiceSectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/lineofcredits.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/lineofcredits.go index 9634580e2509..64ce3a15ad0a 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/lineofcredits.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/lineofcredits.go @@ -35,7 +35,8 @@ func NewLineOfCreditsClient(subscriptionID string) LineOfCreditsClient { return NewLineOfCreditsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLineOfCreditsClientWithBaseURI creates an instance of the LineOfCreditsClient client. +// NewLineOfCreditsClientWithBaseURI creates an instance of the LineOfCreditsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLineOfCreditsClientWithBaseURI(baseURI string, subscriptionID string) LineOfCreditsClient { return LineOfCreditsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/operations.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/operations.go index 236648346643..2bbb032ba7a3 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/operations.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/paymentmethods.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/paymentmethods.go index bcd21ae7da64..f25d34f2ea0b 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/paymentmethods.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/paymentmethods.go @@ -35,7 +35,8 @@ func NewPaymentMethodsClient(subscriptionID string) PaymentMethodsClient { return NewPaymentMethodsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPaymentMethodsClientWithBaseURI creates an instance of the PaymentMethodsClient client. +// NewPaymentMethodsClientWithBaseURI creates an instance of the PaymentMethodsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPaymentMethodsClientWithBaseURI(baseURI string, subscriptionID string) PaymentMethodsClient { return PaymentMethodsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/permissions.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/permissions.go index f1fdc51735e3..d800e133a9f5 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/permissions.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/permissions.go @@ -35,7 +35,8 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient { return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. +// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient { return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/policies.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/policies.go index f42e3ef32f7f..fd0226774490 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/policies.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/policies.go @@ -35,7 +35,8 @@ func NewPoliciesClient(subscriptionID string) PoliciesClient { return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client. +// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient { return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/pricesheet.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/pricesheet.go index 17a895f3992c..7dba05c2213c 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/pricesheet.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/pricesheet.go @@ -35,7 +35,8 @@ func NewPriceSheetClient(subscriptionID string) PriceSheetClient { return NewPriceSheetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client. +// NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient { return PriceSheetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/products.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/products.go index 69e700e8a92b..4ebebd3afd83 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/products.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/products.go @@ -35,7 +35,8 @@ func NewProductsClient(subscriptionID string) ProductsClient { return NewProductsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductsClientWithBaseURI creates an instance of the ProductsClient client. +// NewProductsClientWithBaseURI creates an instance of the ProductsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductsClientWithBaseURI(baseURI string, subscriptionID string) ProductsClient { return ProductsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/profiles.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/profiles.go index fe4182176f86..955bb3199bf9 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/profiles.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/property.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/property.go index 1c71cdc908f4..950b8773c4f2 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/property.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/property.go @@ -35,7 +35,8 @@ func NewPropertyClient(subscriptionID string) PropertyClient { return NewPropertyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client. +// NewPropertyClientWithBaseURI creates an instance of the PropertyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) PropertyClient { return PropertyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/recipienttransfers.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/recipienttransfers.go index 78775ece32b1..0dead409a9ae 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/recipienttransfers.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/recipienttransfers.go @@ -35,7 +35,9 @@ func NewRecipientTransfersClient(subscriptionID string) RecipientTransfersClient return NewRecipientTransfersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecipientTransfersClientWithBaseURI creates an instance of the RecipientTransfersClient client. +// NewRecipientTransfersClientWithBaseURI creates an instance of the RecipientTransfersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRecipientTransfersClientWithBaseURI(baseURI string, subscriptionID string) RecipientTransfersClient { return RecipientTransfersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/roleassignments.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/roleassignments.go index 604e2c34ab0d..d0386376f712 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/roleassignments.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/roleassignments.go @@ -35,7 +35,8 @@ func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/roledefinitions.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/roledefinitions.go index d6b72475c797..a288d71d1e7b 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/roledefinitions.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/roledefinitions.go @@ -35,7 +35,8 @@ func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient { return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client. +// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient { return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/subscriptions.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/subscriptions.go index 6bd533d78044..0a8f37a59743 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/subscriptions.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/subscriptions.go @@ -35,7 +35,8 @@ func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/transactions.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/transactions.go index 699fa5f89b5a..09f0f6c64ab3 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/transactions.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/transactions.go @@ -35,7 +35,8 @@ func NewTransactionsClient(subscriptionID string) TransactionsClient { return NewTransactionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransactionsClientWithBaseURI creates an instance of the TransactionsClient client. +// NewTransactionsClientWithBaseURI creates an instance of the TransactionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransactionsClientWithBaseURI(baseURI string, subscriptionID string) TransactionsClient { return TransactionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/billing/mgmt/2018-11-01-preview/billing/transfers.go b/services/preview/billing/mgmt/2018-11-01-preview/billing/transfers.go index d20c8ed160ca..d467e414d493 100644 --- a/services/preview/billing/mgmt/2018-11-01-preview/billing/transfers.go +++ b/services/preview/billing/mgmt/2018-11-01-preview/billing/transfers.go @@ -35,7 +35,8 @@ func NewTransfersClient(subscriptionID string) TransfersClient { return NewTransfersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransfersClientWithBaseURI creates an instance of the TransfersClient client. +// NewTransfersClientWithBaseURI creates an instance of the TransfersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransfersClientWithBaseURI(baseURI string, subscriptionID string) TransfersClient { return TransfersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/blockchainapi/interfaces.go b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/blockchainapi/interfaces.go index 17c41fc0293e..687d5b6be45a 100644 --- a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/blockchainapi/interfaces.go +++ b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/blockchainapi/interfaces.go @@ -28,9 +28,12 @@ type MembersClientAPI interface { Delete(ctx context.Context, blockchainMemberName string, resourceGroupName string) (result blockchain.MembersDeleteFuture, err error) Get(ctx context.Context, blockchainMemberName string, resourceGroupName string) (result blockchain.Member, err error) List(ctx context.Context, resourceGroupName string) (result blockchain.MemberCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result blockchain.MemberCollectionIterator, err error) ListAll(ctx context.Context) (result blockchain.MemberCollectionPage, err error) + ListAllComplete(ctx context.Context) (result blockchain.MemberCollectionIterator, err error) ListAPIKeys(ctx context.Context, blockchainMemberName string, resourceGroupName string) (result blockchain.APIKeyCollection, err error) ListConsortiumMembers(ctx context.Context, blockchainMemberName string, resourceGroupName string) (result blockchain.ConsortiumMemberCollectionPage, err error) + ListConsortiumMembersComplete(ctx context.Context, blockchainMemberName string, resourceGroupName string) (result blockchain.ConsortiumMemberCollectionIterator, err error) ListRegenerateAPIKeys(ctx context.Context, blockchainMemberName string, resourceGroupName string, APIKey *blockchain.APIKey) (result blockchain.APIKeyCollection, err error) Update(ctx context.Context, blockchainMemberName string, resourceGroupName string, blockchainMember *blockchain.MemberUpdate) (result blockchain.Member, err error) } @@ -55,6 +58,7 @@ var _ LocationsClientAPI = (*blockchain.LocationsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result blockchain.ResourceProviderOperationCollectionPage, err error) + ListComplete(ctx context.Context) (result blockchain.ResourceProviderOperationCollectionIterator, err error) } var _ OperationsClientAPI = (*blockchain.OperationsClient)(nil) @@ -72,6 +76,7 @@ type TransactionNodesClientAPI interface { Delete(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string) (result blockchain.TransactionNodesDeleteFuture, err error) Get(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string) (result blockchain.TransactionNode, err error) List(ctx context.Context, blockchainMemberName string, resourceGroupName string) (result blockchain.TransactionNodeCollectionPage, err error) + ListComplete(ctx context.Context, blockchainMemberName string, resourceGroupName string) (result blockchain.TransactionNodeCollectionIterator, err error) ListAPIKeys(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string) (result blockchain.APIKeyCollection, err error) ListRegenerateAPIKeys(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, APIKey *blockchain.APIKey) (result blockchain.APIKeyCollection, err error) Update(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, transactionNode *blockchain.TransactionNodeUpdate) (result blockchain.TransactionNode, err error) diff --git a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/client.go b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/client.go index 7e855df18b71..daccb6fe02ce 100644 --- a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/client.go +++ b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/locations.go b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/locations.go index a710df340dee..c14921cab4fd 100644 --- a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/locations.go +++ b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/memberoperationresults.go b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/memberoperationresults.go index b95406e0fae4..43dea505bc56 100644 --- a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/memberoperationresults.go +++ b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/memberoperationresults.go @@ -35,7 +35,9 @@ func NewMemberOperationResultsClient(subscriptionID string) MemberOperationResul return NewMemberOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMemberOperationResultsClientWithBaseURI creates an instance of the MemberOperationResultsClient client. +// NewMemberOperationResultsClientWithBaseURI creates an instance of the MemberOperationResultsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMemberOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) MemberOperationResultsClient { return MemberOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/members.go b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/members.go index c633530ffd4e..6504898c4eba 100644 --- a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/members.go +++ b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/members.go @@ -35,7 +35,8 @@ func NewMembersClient(subscriptionID string) MembersClient { return NewMembersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMembersClientWithBaseURI creates an instance of the MembersClient client. +// NewMembersClientWithBaseURI creates an instance of the MembersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMembersClientWithBaseURI(baseURI string, subscriptionID string) MembersClient { return MembersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/operations.go b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/operations.go index 35634dc954d6..2b6f399edcef 100644 --- a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/operations.go +++ b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/skus.go b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/skus.go index ea672d34e8e8..1e3b51bb681d 100644 --- a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/skus.go +++ b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/skus.go @@ -35,7 +35,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/transactionnodes.go b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/transactionnodes.go index fab13950f0e6..37a7e65ac1b7 100644 --- a/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/transactionnodes.go +++ b/services/preview/blockchain/mgmt/2018-06-01-preview/blockchain/transactionnodes.go @@ -35,7 +35,9 @@ func NewTransactionNodesClient(subscriptionID string) TransactionNodesClient { return NewTransactionNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransactionNodesClientWithBaseURI creates an instance of the TransactionNodesClient client. +// NewTransactionNodesClientWithBaseURI creates an instance of the TransactionNodesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTransactionNodesClientWithBaseURI(baseURI string, subscriptionID string) TransactionNodesClient { return TransactionNodesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/artifacts.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/artifacts.go index 46435da6db35..2374ee1c1ea8 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/artifacts.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/artifacts.go @@ -35,7 +35,8 @@ func NewArtifactsClient() ArtifactsClient { return NewArtifactsClientWithBaseURI(DefaultBaseURI) } -// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient client. +// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactsClientWithBaseURI(baseURI string) ArtifactsClient { return ArtifactsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignmentoperations.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignmentoperations.go index 2d9f5ab51526..574304258b59 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignmentoperations.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignmentoperations.go @@ -35,7 +35,9 @@ func NewAssignmentOperationsClient() AssignmentOperationsClient { return NewAssignmentOperationsClientWithBaseURI(DefaultBaseURI) } -// NewAssignmentOperationsClientWithBaseURI creates an instance of the AssignmentOperationsClient client. +// NewAssignmentOperationsClientWithBaseURI creates an instance of the AssignmentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAssignmentOperationsClientWithBaseURI(baseURI string) AssignmentOperationsClient { return AssignmentOperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignments.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignments.go index 278be43378fd..31843eb25d1e 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignments.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/assignments.go @@ -36,7 +36,8 @@ func NewAssignmentsClient() AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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) AssignmentsClient { return AssignmentsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprintapi/interfaces.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprintapi/interfaces.go index 74af04b463d9..ac6a9e684e2e 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprintapi/interfaces.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprintapi/interfaces.go @@ -28,6 +28,7 @@ type BlueprintsClientAPI interface { Delete(ctx context.Context, scope string, blueprintName string) (result blueprint.Model, err error) Get(ctx context.Context, scope string, blueprintName string) (result blueprint.Model, err error) List(ctx context.Context, scope string) (result blueprint.ListPage, err error) + ListComplete(ctx context.Context, scope string) (result blueprint.ListIterator, err error) } var _ BlueprintsClientAPI = (*blueprint.BlueprintsClient)(nil) @@ -38,6 +39,7 @@ type ArtifactsClientAPI interface { Delete(ctx context.Context, scope string, blueprintName string, artifactName string) (result blueprint.ArtifactModel, err error) Get(ctx context.Context, scope string, blueprintName string, artifactName string) (result blueprint.ArtifactModel, err error) List(ctx context.Context, scope string, blueprintName string) (result blueprint.ArtifactListPage, err error) + ListComplete(ctx context.Context, scope string, blueprintName string) (result blueprint.ArtifactListIterator, err error) } var _ ArtifactsClientAPI = (*blueprint.ArtifactsClient)(nil) @@ -48,6 +50,7 @@ type PublishedBlueprintsClientAPI interface { Delete(ctx context.Context, scope string, blueprintName string, versionID string) (result blueprint.PublishedBlueprint, err error) Get(ctx context.Context, scope string, blueprintName string, versionID string) (result blueprint.PublishedBlueprint, err error) List(ctx context.Context, scope string, blueprintName string) (result blueprint.PublishedBlueprintListPage, err error) + ListComplete(ctx context.Context, scope string, blueprintName string) (result blueprint.PublishedBlueprintListIterator, err error) } var _ PublishedBlueprintsClientAPI = (*blueprint.PublishedBlueprintsClient)(nil) @@ -56,6 +59,7 @@ var _ PublishedBlueprintsClientAPI = (*blueprint.PublishedBlueprintsClient)(nil) type PublishedArtifactsClientAPI interface { Get(ctx context.Context, scope string, blueprintName string, versionID string, artifactName string) (result blueprint.ArtifactModel, err error) List(ctx context.Context, scope string, blueprintName string, versionID string) (result blueprint.ArtifactListPage, err error) + ListComplete(ctx context.Context, scope string, blueprintName string, versionID string) (result blueprint.ArtifactListIterator, err error) } var _ PublishedArtifactsClientAPI = (*blueprint.PublishedArtifactsClient)(nil) @@ -66,6 +70,7 @@ type AssignmentsClientAPI interface { Delete(ctx context.Context, scope string, assignmentName string) (result blueprint.Assignment, err error) Get(ctx context.Context, scope string, assignmentName string) (result blueprint.Assignment, err error) List(ctx context.Context, scope string) (result blueprint.AssignmentListPage, err error) + ListComplete(ctx context.Context, scope string) (result blueprint.AssignmentListIterator, err error) WhoIsBlueprint(ctx context.Context, scope string, assignmentName string) (result blueprint.WhoIsBlueprintContract, err error) } @@ -75,6 +80,7 @@ var _ AssignmentsClientAPI = (*blueprint.AssignmentsClient)(nil) type AssignmentOperationsClientAPI interface { Get(ctx context.Context, scope string, assignmentName string, assignmentOperationName string) (result blueprint.AssignmentOperation, err error) List(ctx context.Context, scope string, assignmentName string) (result blueprint.AssignmentOperationListPage, err error) + ListComplete(ctx context.Context, scope string, assignmentName string) (result blueprint.AssignmentOperationListIterator, err error) } var _ AssignmentOperationsClientAPI = (*blueprint.AssignmentOperationsClient)(nil) diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprints.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprints.go index b0126247ad94..5646b309ea23 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprints.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/blueprints.go @@ -36,7 +36,8 @@ func NewBlueprintsClient() BlueprintsClient { return NewBlueprintsClientWithBaseURI(DefaultBaseURI) } -// NewBlueprintsClientWithBaseURI creates an instance of the BlueprintsClient client. +// NewBlueprintsClientWithBaseURI creates an instance of the BlueprintsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlueprintsClientWithBaseURI(baseURI string) BlueprintsClient { return BlueprintsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/client.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/client.go index 08b1074bad2c..e20a4848b2cf 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/client.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/models.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/models.go index 0d848a3bcef1..95a2bd2feef9 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/models.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/models.go @@ -757,6 +757,8 @@ type AssignmentLockSettings struct { Mode AssignmentLockMode `json:"mode,omitempty"` // ExcludedPrincipals - List of AAD principals excluded from blueprint locks. Up to 5 principals are permitted. ExcludedPrincipals *[]string `json:"excludedPrincipals,omitempty"` + // ExcludedActions - List of management operations that are excluded from blueprint locks. Up to 200 actions are permitted. If the lock mode is set to 'AllResourcesReadOnly', then the following actions are automatically appended to 'excludedActions': '*/read', 'Microsoft.Network/virtualNetworks/subnets/join/action' and 'Microsoft.Authorization/locks/delete'. If the lock mode is set to 'AllResourcesDoNotDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will get removed. + ExcludedActions *[]string `json:"excludedActions,omitempty"` } // AssignmentOperation represents underlying deployment detail for each update to the blueprint assignment. diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedartifacts.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedartifacts.go index fde348cd2ca7..43eb9966c748 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedartifacts.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedartifacts.go @@ -35,7 +35,9 @@ func NewPublishedArtifactsClient() PublishedArtifactsClient { return NewPublishedArtifactsClientWithBaseURI(DefaultBaseURI) } -// NewPublishedArtifactsClientWithBaseURI creates an instance of the PublishedArtifactsClient client. +// NewPublishedArtifactsClientWithBaseURI creates an instance of the PublishedArtifactsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPublishedArtifactsClientWithBaseURI(baseURI string) PublishedArtifactsClient { return PublishedArtifactsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedblueprints.go b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedblueprints.go index af8f354fb990..e19dc1c09a64 100644 --- a/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedblueprints.go +++ b/services/preview/blueprint/mgmt/2018-11-01-preview/blueprint/publishedblueprints.go @@ -36,7 +36,9 @@ func NewPublishedBlueprintsClient() PublishedBlueprintsClient { return NewPublishedBlueprintsClientWithBaseURI(DefaultBaseURI) } -// NewPublishedBlueprintsClientWithBaseURI creates an instance of the PublishedBlueprintsClient client. +// NewPublishedBlueprintsClientWithBaseURI creates an instance of the PublishedBlueprintsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPublishedBlueprintsClientWithBaseURI(baseURI string) PublishedBlueprintsClient { return PublishedBlueprintsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/botservice/mgmt/2017-12-01/botservice/botconnection.go b/services/preview/botservice/mgmt/2017-12-01/botservice/botconnection.go index a937e4491ca6..199249de226f 100644 --- a/services/preview/botservice/mgmt/2017-12-01/botservice/botconnection.go +++ b/services/preview/botservice/mgmt/2017-12-01/botservice/botconnection.go @@ -36,7 +36,8 @@ func NewBotConnectionClient(subscriptionID string) BotConnectionClient { return NewBotConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBotConnectionClientWithBaseURI creates an instance of the BotConnectionClient client. +// NewBotConnectionClientWithBaseURI creates an instance of the BotConnectionClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBotConnectionClientWithBaseURI(baseURI string, subscriptionID string) BotConnectionClient { return BotConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/botservice/mgmt/2017-12-01/botservice/bots.go b/services/preview/botservice/mgmt/2017-12-01/botservice/bots.go index 074f7f0fd76f..d5ea1e0c2dcb 100644 --- a/services/preview/botservice/mgmt/2017-12-01/botservice/bots.go +++ b/services/preview/botservice/mgmt/2017-12-01/botservice/bots.go @@ -36,7 +36,8 @@ func NewBotsClient(subscriptionID string) BotsClient { return NewBotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBotsClientWithBaseURI creates an instance of the BotsClient client. +// NewBotsClientWithBaseURI creates an instance of the BotsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBotsClientWithBaseURI(baseURI string, subscriptionID string) BotsClient { return BotsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/botservice/mgmt/2017-12-01/botservice/botserviceapi/interfaces.go b/services/preview/botservice/mgmt/2017-12-01/botservice/botserviceapi/interfaces.go index 65e651a4d182..2aab79fe333f 100644 --- a/services/preview/botservice/mgmt/2017-12-01/botservice/botserviceapi/interfaces.go +++ b/services/preview/botservice/mgmt/2017-12-01/botservice/botserviceapi/interfaces.go @@ -30,7 +30,9 @@ type BotsClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.Bot, err error) GetCheckNameAvailability(ctx context.Context, parameters botservice.CheckNameAvailabilityRequestBody) (result botservice.CheckNameAvailabilityResponseBody, err error) List(ctx context.Context) (result botservice.BotResponseListPage, err error) + ListComplete(ctx context.Context) (result botservice.BotResponseListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result botservice.BotResponseListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result botservice.BotResponseListIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters botservice.Bot) (result botservice.Bot, err error) } @@ -42,6 +44,7 @@ type ChannelsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (result botservice.BotChannel, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.ChannelResponseListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.ChannelResponseListIterator, err error) ListWithKeys(ctx context.Context, resourceGroupName string, resourceName string, channelName botservice.ChannelName) (result botservice.BotChannel, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, channelName botservice.ChannelName, parameters botservice.BotChannel) (result botservice.BotChannel, err error) } @@ -51,6 +54,7 @@ var _ ChannelsClientAPI = (*botservice.ChannelsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result botservice.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result botservice.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*botservice.OperationsClient)(nil) @@ -61,6 +65,7 @@ type BotConnectionClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result botservice.ConnectionSetting, err error) ListByBotService(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.ConnectionSettingResponseListPage, err error) + ListByBotServiceComplete(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.ConnectionSettingResponseListIterator, err error) ListServiceProviders(ctx context.Context) (result botservice.ServiceProviderResponseList, err error) ListWithSecrets(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result botservice.ConnectionSetting, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters botservice.ConnectionSetting) (result botservice.ConnectionSetting, err error) diff --git a/services/preview/botservice/mgmt/2017-12-01/botservice/channels.go b/services/preview/botservice/mgmt/2017-12-01/botservice/channels.go index 52bb0ebbe0f7..0a6d90aca7ff 100644 --- a/services/preview/botservice/mgmt/2017-12-01/botservice/channels.go +++ b/services/preview/botservice/mgmt/2017-12-01/botservice/channels.go @@ -36,7 +36,8 @@ func NewChannelsClient(subscriptionID string) ChannelsClient { return NewChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChannelsClientWithBaseURI creates an instance of the ChannelsClient client. +// NewChannelsClientWithBaseURI creates an instance of the ChannelsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChannelsClientWithBaseURI(baseURI string, subscriptionID string) ChannelsClient { return ChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/botservice/mgmt/2017-12-01/botservice/client.go b/services/preview/botservice/mgmt/2017-12-01/botservice/client.go index 161b5af8c207..d2b726e6910e 100644 --- a/services/preview/botservice/mgmt/2017-12-01/botservice/client.go +++ b/services/preview/botservice/mgmt/2017-12-01/botservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/botservice/mgmt/2017-12-01/botservice/operations.go b/services/preview/botservice/mgmt/2017-12-01/botservice/operations.go index 347f9b1e3913..14468aa074fe 100644 --- a/services/preview/botservice/mgmt/2017-12-01/botservice/operations.go +++ b/services/preview/botservice/mgmt/2017-12-01/botservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/botconnection.go b/services/preview/botservice/mgmt/2018-07-12/botservice/botconnection.go index 5582ae18a839..b99f1cfe578b 100644 --- a/services/preview/botservice/mgmt/2018-07-12/botservice/botconnection.go +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/botconnection.go @@ -36,7 +36,8 @@ func NewBotConnectionClient(subscriptionID string) BotConnectionClient { return NewBotConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBotConnectionClientWithBaseURI creates an instance of the BotConnectionClient client. +// NewBotConnectionClientWithBaseURI creates an instance of the BotConnectionClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBotConnectionClientWithBaseURI(baseURI string, subscriptionID string) BotConnectionClient { return BotConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/bots.go b/services/preview/botservice/mgmt/2018-07-12/botservice/bots.go index 6a487ceeb75f..fe8c883b059f 100644 --- a/services/preview/botservice/mgmt/2018-07-12/botservice/bots.go +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/bots.go @@ -36,7 +36,8 @@ func NewBotsClient(subscriptionID string) BotsClient { return NewBotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBotsClientWithBaseURI creates an instance of the BotsClient client. +// NewBotsClientWithBaseURI creates an instance of the BotsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBotsClientWithBaseURI(baseURI string, subscriptionID string) BotsClient { return BotsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/botserviceapi/interfaces.go b/services/preview/botservice/mgmt/2018-07-12/botservice/botserviceapi/interfaces.go index af0545e7d180..68b1babed042 100644 --- a/services/preview/botservice/mgmt/2018-07-12/botservice/botserviceapi/interfaces.go +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/botserviceapi/interfaces.go @@ -30,7 +30,9 @@ type BotsClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.Bot, err error) GetCheckNameAvailability(ctx context.Context, parameters botservice.CheckNameAvailabilityRequestBody) (result botservice.CheckNameAvailabilityResponseBody, err error) List(ctx context.Context) (result botservice.BotResponseListPage, err error) + ListComplete(ctx context.Context) (result botservice.BotResponseListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result botservice.BotResponseListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result botservice.BotResponseListIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters botservice.Bot) (result botservice.Bot, err error) } @@ -42,6 +44,7 @@ type ChannelsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (result botservice.BotChannel, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.ChannelResponseListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.ChannelResponseListIterator, err error) ListWithKeys(ctx context.Context, resourceGroupName string, resourceName string, channelName botservice.ChannelName) (result botservice.BotChannel, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, channelName botservice.ChannelName, parameters botservice.BotChannel) (result botservice.BotChannel, err error) } @@ -51,6 +54,7 @@ var _ ChannelsClientAPI = (*botservice.ChannelsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result botservice.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result botservice.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*botservice.OperationsClient)(nil) @@ -61,6 +65,7 @@ type BotConnectionClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result botservice.ConnectionSetting, err error) ListByBotService(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.ConnectionSettingResponseListPage, err error) + ListByBotServiceComplete(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.ConnectionSettingResponseListIterator, err error) ListServiceProviders(ctx context.Context) (result botservice.ServiceProviderResponseList, err error) ListWithSecrets(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result botservice.ConnectionSetting, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters botservice.ConnectionSetting) (result botservice.ConnectionSetting, err error) @@ -75,6 +80,7 @@ type EnterpriseChannelsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.EnterpriseChannelsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result botservice.EnterpriseChannel, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result botservice.EnterpriseChannelResponseListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result botservice.EnterpriseChannelResponseListIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters botservice.EnterpriseChannel) (result botservice.EnterpriseChannelsUpdateFuture, err error) } diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/channels.go b/services/preview/botservice/mgmt/2018-07-12/botservice/channels.go index dfc52ae46d36..1787ec3f6f87 100644 --- a/services/preview/botservice/mgmt/2018-07-12/botservice/channels.go +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/channels.go @@ -36,7 +36,8 @@ func NewChannelsClient(subscriptionID string) ChannelsClient { return NewChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChannelsClientWithBaseURI creates an instance of the ChannelsClient client. +// NewChannelsClientWithBaseURI creates an instance of the ChannelsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChannelsClientWithBaseURI(baseURI string, subscriptionID string) ChannelsClient { return ChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/client.go b/services/preview/botservice/mgmt/2018-07-12/botservice/client.go index 86959a63eecc..11ff1b431b5e 100644 --- a/services/preview/botservice/mgmt/2018-07-12/botservice/client.go +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/enterprisechannels.go b/services/preview/botservice/mgmt/2018-07-12/botservice/enterprisechannels.go index 8e02db8c88e0..fb4dba70f5a8 100644 --- a/services/preview/botservice/mgmt/2018-07-12/botservice/enterprisechannels.go +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/enterprisechannels.go @@ -36,7 +36,9 @@ func NewEnterpriseChannelsClient(subscriptionID string) EnterpriseChannelsClient return NewEnterpriseChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnterpriseChannelsClientWithBaseURI creates an instance of the EnterpriseChannelsClient client. +// NewEnterpriseChannelsClientWithBaseURI creates an instance of the EnterpriseChannelsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEnterpriseChannelsClientWithBaseURI(baseURI string, subscriptionID string) EnterpriseChannelsClient { return EnterpriseChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/botservice/mgmt/2018-07-12/botservice/operations.go b/services/preview/botservice/mgmt/2018-07-12/botservice/operations.go index 9e73bf1e6775..483fba3d5033 100644 --- a/services/preview/botservice/mgmt/2018-07-12/botservice/operations.go +++ b/services/preview/botservice/mgmt/2018-07-12/botservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/cdnapi/interfaces.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/cdnapi/interfaces.go index e1ed1ff86ff2..1046b602fe89 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/cdnapi/interfaces.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/cdnapi/interfaces.go @@ -39,8 +39,11 @@ type ProfilesClientAPI interface { GenerateSsoURI(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SsoURI, err error) Get(ctx context.Context, resourceGroupName string, profileName string) (result cdn.Profile, err error) List(ctx context.Context) (result cdn.ProfileListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ProfileListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result cdn.ProfileListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.ResourceUsageListResultIterator, err error) ListSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string) (result cdn.SupportedOptimizationTypesListResult, err error) Update(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters cdn.ProfileUpdateParameters) (result cdn.ProfilesUpdateFuture, err error) } @@ -53,7 +56,9 @@ type EndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.Endpoint, err error) ListByProfile(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultPage, err error) + ListByProfileComplete(ctx context.Context, resourceGroupName string, profileName string) (result cdn.EndpointListResultIterator, err error) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultPage, err error) + ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.ResourceUsageListResultIterator, err error) LoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.LoadParameters) (result cdn.EndpointsLoadContentFuture, err error) PurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths cdn.PurgeParameters) (result cdn.EndpointsPurgeContentFuture, err error) Start(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.EndpointsStartFuture, err error) @@ -68,6 +73,7 @@ var _ EndpointsClientAPI = (*cdn.EndpointsClient)(nil) type OriginsClientAPI interface { Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string) (result cdn.Origin, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.OriginListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties cdn.OriginUpdateParameters) (result cdn.OriginsUpdateFuture, err error) } @@ -81,6 +87,7 @@ type CustomDomainsClientAPI interface { EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainHTTPSParameters *cdn.BasicCustomDomainHTTPSParameters) (result cdn.CustomDomain, err error) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result cdn.CustomDomain, err error) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultPage, err error) + ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result cdn.CustomDomainListResultIterator, err error) } var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) @@ -88,6 +95,7 @@ var _ CustomDomainsClientAPI = (*cdn.CustomDomainsClient)(nil) // ResourceUsageClientAPI contains the set of methods on the ResourceUsageClient type. type ResourceUsageClientAPI interface { List(ctx context.Context) (result cdn.ResourceUsageListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.ResourceUsageListResultIterator, err error) } var _ ResourceUsageClientAPI = (*cdn.ResourceUsageClient)(nil) @@ -95,6 +103,7 @@ var _ ResourceUsageClientAPI = (*cdn.ResourceUsageClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result cdn.OperationsListResultPage, err error) + ListComplete(ctx context.Context) (result cdn.OperationsListResultIterator, err error) } var _ OperationsClientAPI = (*cdn.OperationsClient)(nil) @@ -102,6 +111,7 @@ var _ OperationsClientAPI = (*cdn.OperationsClient)(nil) // EdgeNodesClientAPI contains the set of methods on the EdgeNodesClient type. type EdgeNodesClientAPI interface { List(ctx context.Context) (result cdn.EdgenodeResultPage, err error) + ListComplete(ctx context.Context) (result cdn.EdgenodeResultIterator, err error) } var _ EdgeNodesClientAPI = (*cdn.EdgeNodesClient)(nil) @@ -112,6 +122,7 @@ type PoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, policyName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, policyName string) (result cdn.WebApplicationFirewallPolicy, err error) List(ctx context.Context, resourceGroupName string) (result cdn.WebApplicationFirewallPolicyListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result cdn.WebApplicationFirewallPolicyListIterator, err error) Update(ctx context.Context, resourceGroupName string, policyName string, cdnWebApplicationFirewallPolicyPatchParameters cdn.WebApplicationFirewallPolicyPatchParameters) (result cdn.PoliciesUpdateFuture, err error) } @@ -120,6 +131,7 @@ var _ PoliciesClientAPI = (*cdn.PoliciesClient)(nil) // ManagedRuleSetsClientAPI contains the set of methods on the ManagedRuleSetsClient type. type ManagedRuleSetsClientAPI interface { List(ctx context.Context) (result cdn.ManagedRuleSetDefinitionListPage, err error) + ListComplete(ctx context.Context) (result cdn.ManagedRuleSetDefinitionListIterator, err error) } var _ ManagedRuleSetsClientAPI = (*cdn.ManagedRuleSetsClient)(nil) diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/client.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/client.go index 87888123af40..40a63e8922f3 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/client.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/client.go @@ -47,7 +47,8 @@ func New(subscriptionID string, subscriptionID1 string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, subscriptionID1 string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/customdomains.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/customdomains.go index dc5c4975b905..7d692f1aa8e9 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/customdomains.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/customdomains.go @@ -36,7 +36,8 @@ func NewCustomDomainsClient(subscriptionID string, subscriptionID1 string) Custo return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client. +// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CustomDomainsClient { return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/edgenodes.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/edgenodes.go index fa7143267372..8d84be0125ed 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/edgenodes.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/edgenodes.go @@ -35,7 +35,8 @@ func NewEdgeNodesClient(subscriptionID string, subscriptionID1 string) EdgeNodes return NewEdgeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client. +// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEdgeNodesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) EdgeNodesClient { return EdgeNodesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/endpoints.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/endpoints.go index 2adfd438aa34..e28506a3f012 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/endpoints.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/endpoints.go @@ -36,7 +36,8 @@ func NewEndpointsClient(subscriptionID string, subscriptionID1 string) Endpoints return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/managedrulesets.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/managedrulesets.go index fc2b842900ed..286c6f61c613 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/managedrulesets.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/managedrulesets.go @@ -35,7 +35,8 @@ func NewManagedRuleSetsClient(subscriptionID string, subscriptionID1 string) Man return NewManagedRuleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewManagedRuleSetsClientWithBaseURI creates an instance of the ManagedRuleSetsClient client. +// NewManagedRuleSetsClientWithBaseURI creates an instance of the ManagedRuleSetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedRuleSetsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) ManagedRuleSetsClient { return ManagedRuleSetsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/operations.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/operations.go index da02f140cbaa..7149ffdf903f 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/operations.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, subscriptionID1 string) Operatio return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, subscriptionID1 string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/origins.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/origins.go index 6bf3796363d9..6c2675b75ae0 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/origins.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/origins.go @@ -36,7 +36,8 @@ func NewOriginsClient(subscriptionID string, subscriptionID1 string) OriginsClie return NewOriginsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client. +// NewOriginsClientWithBaseURI creates an instance of the OriginsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) OriginsClient { return OriginsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/policies.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/policies.go index aadf01eb0c1a..6036e3974df9 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/policies.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/policies.go @@ -36,7 +36,8 @@ func NewPoliciesClient(subscriptionID string, subscriptionID1 string) PoliciesCl return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client. +// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PoliciesClient { return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/profiles.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/profiles.go index 8221660310b2..5188226f659f 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/profiles.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/profiles.go @@ -36,7 +36,8 @@ func NewProfilesClient(subscriptionID string, subscriptionID1 string) ProfilesCl return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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, subscriptionID1 string) ProfilesClient { return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/resourceusage.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/resourceusage.go index 10f3069bd48a..affed5e8b703 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/resourceusage.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/resourceusage.go @@ -35,7 +35,8 @@ func NewResourceUsageClient(subscriptionID string, subscriptionID1 string) Resou return NewResourceUsageClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client. +// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourceUsageClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) ResourceUsageClient { return ResourceUsageClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cognitiveservices/mgmt/2016-02-01-preview/cognitiveservices/accounts.go b/services/preview/cognitiveservices/mgmt/2016-02-01-preview/cognitiveservices/accounts.go index 5f366082a323..3798628ec523 100644 --- a/services/preview/cognitiveservices/mgmt/2016-02-01-preview/cognitiveservices/accounts.go +++ b/services/preview/cognitiveservices/mgmt/2016-02-01-preview/cognitiveservices/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/cognitiveservices/mgmt/2016-02-01-preview/cognitiveservices/client.go b/services/preview/cognitiveservices/mgmt/2016-02-01-preview/cognitiveservices/client.go index 61dbd4bd73d6..e05cc69ef0e1 100644 --- a/services/preview/cognitiveservices/mgmt/2016-02-01-preview/cognitiveservices/client.go +++ b/services/preview/cognitiveservices/mgmt/2016-02-01-preview/cognitiveservices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/commerce/mgmt/2015-06-01-preview/commerce/client.go b/services/preview/commerce/mgmt/2015-06-01-preview/commerce/client.go index 2a57f1c8a55f..1adf79799312 100644 --- a/services/preview/commerce/mgmt/2015-06-01-preview/commerce/client.go +++ b/services/preview/commerce/mgmt/2015-06-01-preview/commerce/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/commerce/mgmt/2015-06-01-preview/commerce/commerceapi/interfaces.go b/services/preview/commerce/mgmt/2015-06-01-preview/commerce/commerceapi/interfaces.go index 2c3025ca88e8..a442d57abd5b 100644 --- a/services/preview/commerce/mgmt/2015-06-01-preview/commerce/commerceapi/interfaces.go +++ b/services/preview/commerce/mgmt/2015-06-01-preview/commerce/commerceapi/interfaces.go @@ -26,6 +26,7 @@ import ( // UsageAggregatesClientAPI contains the set of methods on the UsageAggregatesClient type. type UsageAggregatesClientAPI interface { List(ctx context.Context, reportedStartTime date.Time, reportedEndTime date.Time, showDetails *bool, aggregationGranularity commerce.AggregationGranularity, continuationToken string) (result commerce.UsageAggregationListResultPage, err error) + ListComplete(ctx context.Context, reportedStartTime date.Time, reportedEndTime date.Time, showDetails *bool, aggregationGranularity commerce.AggregationGranularity, continuationToken string) (result commerce.UsageAggregationListResultIterator, err error) } var _ UsageAggregatesClientAPI = (*commerce.UsageAggregatesClient)(nil) diff --git a/services/preview/commerce/mgmt/2015-06-01-preview/commerce/ratecard.go b/services/preview/commerce/mgmt/2015-06-01-preview/commerce/ratecard.go index 35148dd81c83..ca2fa10c41cc 100644 --- a/services/preview/commerce/mgmt/2015-06-01-preview/commerce/ratecard.go +++ b/services/preview/commerce/mgmt/2015-06-01-preview/commerce/ratecard.go @@ -35,7 +35,8 @@ func NewRateCardClient(subscriptionID string) RateCardClient { return NewRateCardClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRateCardClientWithBaseURI creates an instance of the RateCardClient client. +// NewRateCardClientWithBaseURI creates an instance of the RateCardClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRateCardClientWithBaseURI(baseURI string, subscriptionID string) RateCardClient { return RateCardClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/commerce/mgmt/2015-06-01-preview/commerce/usageaggregates.go b/services/preview/commerce/mgmt/2015-06-01-preview/commerce/usageaggregates.go index 3f3c284fc7a4..8f2849eb8f70 100644 --- a/services/preview/commerce/mgmt/2015-06-01-preview/commerce/usageaggregates.go +++ b/services/preview/commerce/mgmt/2015-06-01-preview/commerce/usageaggregates.go @@ -36,7 +36,8 @@ func NewUsageAggregatesClient(subscriptionID string) UsageAggregatesClient { return NewUsageAggregatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageAggregatesClientWithBaseURI creates an instance of the UsageAggregatesClient client. +// NewUsageAggregatesClientWithBaseURI creates an instance of the UsageAggregatesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageAggregatesClientWithBaseURI(baseURI string, subscriptionID string) UsageAggregatesClient { return UsageAggregatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/availabilitysets.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/availabilitysets.go index bdc4a7a9156b..f948887a97a8 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/availabilitysets.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/client.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/client.go index a06c86a83313..0d7dd1cb4351 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/client.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/computeapi/interfaces.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/computeapi/interfaces.go index 325f542c5a4b..21425a74f457 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/computeapi/interfaces.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/computeapi/interfaces.go @@ -28,8 +28,10 @@ type AvailabilitySetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result compute.OperationStatusResponse, 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) (result compute.AvailabilitySetListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result compute.AvailabilitySetListResultIterator, err error) } var _ AvailabilitySetsClientAPI = (*compute.AvailabilitySetsClient)(nil) @@ -64,7 +66,9 @@ type VirtualMachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, err error) GetExtensions(ctx context.Context, resourceGroupName string, VMName string, expand string) (result compute.VirtualMachineExtensionsListResult, 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) (result compute.VirtualMachineListResultPage, err error) + ListAllComplete(ctx context.Context) (result compute.VirtualMachineListResultIterator, err error) ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachineSizeListResult, err error) PowerOff(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesPowerOffFuture, err error) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result compute.VirtualMachinesRedeployFuture, err error) @@ -88,6 +92,7 @@ var _ VirtualMachineImagesClientAPI = (*compute.VirtualMachineImagesClient)(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) @@ -105,7 +110,9 @@ type ImagesClientAPI interface { 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) } var _ ImagesClientAPI = (*compute.ImagesClient)(nil) @@ -119,8 +126,11 @@ type VirtualMachineScaleSetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetInstanceView, 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) 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) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *compute.VirtualMachineScaleSetVMInstanceIDs) (result compute.VirtualMachineScaleSetsPowerOffFuture, err error) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetsReimageFuture, err error) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetsReimageAllFuture, err error) @@ -138,6 +148,7 @@ type VirtualMachineScaleSetVMsClientAPI interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsPowerOffFuture, err error) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsReimageFuture, err error) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result compute.VirtualMachineScaleSetVMsReimageAllFuture, err error) @@ -154,7 +165,9 @@ type DisksClientAPI interface { 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) } @@ -168,7 +181,9 @@ type SnapshotsClientAPI interface { 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) } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go index 8b44b9b6c651..26c3e39e911c 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go index 8524e47e38ea..8c4e6287e1eb 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go @@ -36,7 +36,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go index 839c3d5163f5..6f690a95c905 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/usage.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/usage.go index 72ba4e94341a..449071cbad31 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/usage.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensionimages.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensionimages.go index 23b07fa2372b..5cf251ad1360 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensionimages.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// 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 NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go index daecd16a8ad4..c0f4c07096bf 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineimages.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineimages.go index d09430b4858d..4c97471fd8f0 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineimages.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go index 14595e2c42a7..66e734f62cfc 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go index 44d68347c025..0d2e1c8e127f 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go index 7d04750918de..98fb6e394b0b 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go @@ -35,7 +35,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// 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)} } diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinesizes.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinesizes.go index f644332f1ffa..36a05d52b5b3 100644 --- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinesizes.go +++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// 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)} } diff --git a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/client.go b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/client.go index 849987da08d6..2c5cb62f0337 100644 --- a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/client.go +++ b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/consumptionapi/interfaces.go b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/consumptionapi/interfaces.go index 3b09fd8664c2..e207c80a9aa9 100644 --- a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/consumptionapi/interfaces.go +++ b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/consumptionapi/interfaces.go @@ -25,6 +25,7 @@ import ( // UsageDetailsClientAPI contains the set of methods on the UsageDetailsClient type. type UsageDetailsClientAPI interface { List(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultPage, err error) + ListComplete(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32) (result consumption.UsageDetailsListResultIterator, err error) } var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) @@ -32,6 +33,7 @@ var _ UsageDetailsClientAPI = (*consumption.UsageDetailsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/operations.go b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/operations.go index c39d1b7d8380..bf8240af2ac6 100644 --- a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/operations.go +++ b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/usagedetails.go b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/usagedetails.go index 70edd4700442..5cf0df3c4f06 100644 --- a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/usagedetails.go +++ b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/usagedetails.go @@ -38,7 +38,8 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/consumption/mgmt/2017-12-30-preview/consumption/budgets.go b/services/preview/consumption/mgmt/2017-12-30-preview/consumption/budgets.go index f355135250e9..f631896ca9d1 100644 --- a/services/preview/consumption/mgmt/2017-12-30-preview/consumption/budgets.go +++ b/services/preview/consumption/mgmt/2017-12-30-preview/consumption/budgets.go @@ -37,7 +37,8 @@ func NewBudgetsClient(subscriptionID string, name string) BudgetsClient { return NewBudgetsClientWithBaseURI(DefaultBaseURI, subscriptionID, name) } -// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client. +// NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string, name string) BudgetsClient { return BudgetsClient{NewWithBaseURI(baseURI, subscriptionID, name)} } diff --git a/services/preview/consumption/mgmt/2017-12-30-preview/consumption/client.go b/services/preview/consumption/mgmt/2017-12-30-preview/consumption/client.go index cd11d29834cf..9e8959f5b03a 100644 --- a/services/preview/consumption/mgmt/2017-12-30-preview/consumption/client.go +++ b/services/preview/consumption/mgmt/2017-12-30-preview/consumption/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, name string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, name) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, name string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/consumption/mgmt/2017-12-30-preview/consumption/consumptionapi/interfaces.go b/services/preview/consumption/mgmt/2017-12-30-preview/consumption/consumptionapi/interfaces.go index 04bb480ad2fe..a52fd7a7ee10 100644 --- a/services/preview/consumption/mgmt/2017-12-30-preview/consumption/consumptionapi/interfaces.go +++ b/services/preview/consumption/mgmt/2017-12-30-preview/consumption/consumptionapi/interfaces.go @@ -36,6 +36,7 @@ var _ BudgetsClientAPI = (*consumption.BudgetsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result consumption.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result consumption.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*consumption.OperationsClient)(nil) diff --git a/services/preview/consumption/mgmt/2017-12-30-preview/consumption/operations.go b/services/preview/consumption/mgmt/2017-12-30-preview/consumption/operations.go index 25b3db012392..52657b41e523 100644 --- a/services/preview/consumption/mgmt/2017-12-30-preview/consumption/operations.go +++ b/services/preview/consumption/mgmt/2017-12-30-preview/consumption/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string, name string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, name) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, name string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, name)} } diff --git a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/client.go b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/client.go index 7371c32ac27f..574b723e43fb 100644 --- a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/client.go +++ b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containergroups.go b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containergroups.go index c7a376f475d4..9d1791a373c0 100644 --- a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containergroups.go +++ b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containergroups.go @@ -36,7 +36,8 @@ func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containerinstanceapi/interfaces.go b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containerinstanceapi/interfaces.go index bd6de2decc91..cd5b58fe5495 100644 --- a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containerinstanceapi/interfaces.go +++ b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containerinstanceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) List(ctx context.Context) (result containerinstance.ContainerGroupListResultPage, err error) + ListComplete(ctx context.Context) (result containerinstance.ContainerGroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultIterator, err error) } var _ ContainerGroupsClientAPI = (*containerinstance.ContainerGroupsClient)(nil) diff --git a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containerlogs.go b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containerlogs.go index 2db6e163b700..845a9a324208 100644 --- a/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containerlogs.go +++ b/services/preview/containerinstance/mgmt/2017-08-01-preview/containerinstance/containerlogs.go @@ -35,7 +35,8 @@ func NewContainerLogsClient(subscriptionID string) ContainerLogsClient { return NewContainerLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client. +// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) ContainerLogsClient { return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/client.go b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/client.go index fe2a24cd6375..4e5713ac96f3 100644 --- a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/client.go +++ b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containergroups.go b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containergroups.go index 3cf7c6ee507d..67554b5b9604 100644 --- a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containergroups.go +++ b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containergroups.go @@ -36,7 +36,8 @@ func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containerinstanceapi/interfaces.go b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containerinstanceapi/interfaces.go index ac4c13ffc9fb..902e5f664644 100644 --- a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containerinstanceapi/interfaces.go +++ b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containerinstanceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) List(ctx context.Context) (result containerinstance.ContainerGroupListResultPage, err error) + ListComplete(ctx context.Context) (result containerinstance.ContainerGroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultIterator, err error) } var _ ContainerGroupsClientAPI = (*containerinstance.ContainerGroupsClient)(nil) diff --git a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containerlogs.go b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containerlogs.go index a4153a44fc94..e518c65a9720 100644 --- a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containerlogs.go +++ b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/containerlogs.go @@ -35,7 +35,8 @@ func NewContainerLogsClient(subscriptionID string) ContainerLogsClient { return NewContainerLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client. +// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) ContainerLogsClient { return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/operations.go b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/operations.go index c31cd7fdeaa0..2f4a06f8a5b8 100644 --- a/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/operations.go +++ b/services/preview/containerinstance/mgmt/2017-10-01-preview/containerinstance/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/client.go b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/client.go index 35819d4abb22..2b7d91999051 100644 --- a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/client.go +++ b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containergroups.go b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containergroups.go index b616c8acdd75..0de8289410b4 100644 --- a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containergroups.go +++ b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containergroups.go @@ -36,7 +36,8 @@ func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containergroupusage.go b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containergroupusage.go index 55563c7166bf..8af4bd72b8ad 100644 --- a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containergroupusage.go +++ b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containergroupusage.go @@ -35,7 +35,9 @@ func NewContainerGroupUsageClient(subscriptionID string) ContainerGroupUsageClie return NewContainerGroupUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client. +// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerGroupUsageClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupUsageClient { return ContainerGroupUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containerinstanceapi/interfaces.go b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containerinstanceapi/interfaces.go index 82f9748ba746..19399c2f95c4 100644 --- a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containerinstanceapi/interfaces.go +++ b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containerinstanceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) List(ctx context.Context) (result containerinstance.ContainerGroupListResultPage, err error) + ListComplete(ctx context.Context) (result containerinstance.ContainerGroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultIterator, err error) } var _ ContainerGroupsClientAPI = (*containerinstance.ContainerGroupsClient)(nil) diff --git a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containerlogs.go b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containerlogs.go index 5ef4bd83905f..917bb429d5c7 100644 --- a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containerlogs.go +++ b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/containerlogs.go @@ -35,7 +35,8 @@ func NewContainerLogsClient(subscriptionID string) ContainerLogsClient { return NewContainerLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client. +// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) ContainerLogsClient { return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/operations.go b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/operations.go index e0ad5aae8597..477614d70911 100644 --- a/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/operations.go +++ b/services/preview/containerinstance/mgmt/2017-12-01-preview/containerinstance/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/client.go b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/client.go index 09c33225fe2f..bd3b435e4fa8 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/client.go +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go index defa581a6088..45e59ebf7b0c 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroups.go @@ -36,7 +36,8 @@ func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient { return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client. +// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient { return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroupusage.go b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroupusage.go index ab4b1e909be4..83e5117df8c6 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroupusage.go +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containergroupusage.go @@ -35,7 +35,9 @@ func NewContainerGroupUsageClient(subscriptionID string) ContainerGroupUsageClie return NewContainerGroupUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client. +// NewContainerGroupUsageClientWithBaseURI creates an instance of the ContainerGroupUsageClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerGroupUsageClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupUsageClient { return ContainerGroupUsageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containerinstanceapi/interfaces.go b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containerinstanceapi/interfaces.go index 3f116d248e12..93c21be6f2a1 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containerinstanceapi/interfaces.go +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containerinstanceapi/interfaces.go @@ -28,7 +28,9 @@ type ContainerGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result containerinstance.ContainerGroup, err error) List(ctx context.Context) (result containerinstance.ContainerGroupListResultPage, err error) + ListComplete(ctx context.Context) (result containerinstance.ContainerGroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerinstance.ContainerGroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, containerGroupName string, resource containerinstance.Resource) (result containerinstance.ContainerGroup, err error) } diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containerlogs.go b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containerlogs.go index d0ab373db76e..6d1ebcdd5f29 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containerlogs.go +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/containerlogs.go @@ -35,7 +35,8 @@ func NewContainerLogsClient(subscriptionID string) ContainerLogsClient { return NewContainerLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client. +// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) ContainerLogsClient { return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/operations.go b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/operations.go index 5e076f57c241..c6ff7b433807 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/operations.go +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/startcontainer.go b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/startcontainer.go index 41f1bf17dcfe..8df57ce2e83b 100644 --- a/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/startcontainer.go +++ b/services/preview/containerinstance/mgmt/2018-02-01-preview/containerinstance/startcontainer.go @@ -35,7 +35,8 @@ func NewStartContainerClient(subscriptionID string) StartContainerClient { return NewStartContainerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStartContainerClientWithBaseURI creates an instance of the StartContainerClient client. +// NewStartContainerClientWithBaseURI creates an instance of the StartContainerClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStartContainerClientWithBaseURI(baseURI string, subscriptionID string) StartContainerClient { return StartContainerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/client.go b/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/client.go index 8b32e9a09a20..48648779efe0 100644 --- a/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/client.go +++ b/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/containerregistryapi/interfaces.go b/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/containerregistryapi/interfaces.go index 43c07ddc60bf..e374dfc58172 100644 --- a/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/containerregistryapi/interfaces.go +++ b/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/containerregistryapi/interfaces.go @@ -31,7 +31,9 @@ type RegistriesClientAPI interface { GetCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryCredentials, err error) GetProperties(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.Registry, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) RegenerateCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryCredentials, err error) Update(ctx context.Context, resourceGroupName string, registryName string, registryUpdateParameters containerregistry.RegistryUpdateParameters) (result containerregistry.Registry, err error) } diff --git a/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/registries.go b/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/registries.go index 91e43bd01bd9..5e994f5686a3 100644 --- a/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/registries.go +++ b/services/preview/containerregistry/mgmt/2016-06-27-preview/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/client.go b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/client.go index d09c156b09a1..8d9d8f1ad809 100644 --- a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/client.go +++ b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/containerregistryapi/interfaces.go b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/containerregistryapi/interfaces.go index 75e1cb0f6a74..75d9a34b0f90 100644 --- a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/containerregistryapi/interfaces.go +++ b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/containerregistryapi/interfaces.go @@ -29,7 +29,9 @@ type RegistriesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistriesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.Registry, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters containerregistry.RegenerateCredentialParameters) (result containerregistry.RegistryListCredentialsResult, err error) @@ -41,6 +43,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -51,6 +54,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -63,7 +67,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } diff --git a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/operations.go b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/operations.go index 0017134850f9..99ab467b4be0 100644 --- a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/operations.go +++ b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/registries.go b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/registries.go index 1d35667eeafa..b72fcaefdca8 100644 --- a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/registries.go +++ b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/replications.go b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/replications.go index 34565bf5f31b..f55d8c19ef81 100644 --- a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/replications.go +++ b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/webhooks.go b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/webhooks.go index bb7472654d16..c7a0fb7987a1 100644 --- a/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/webhooks.go +++ b/services/preview/containerregistry/mgmt/2017-06-01-preview/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go index b258d5766995..5eb449c9b44c 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/builds.go @@ -36,7 +36,8 @@ func NewBuildsClient(subscriptionID string) BuildsClient { return NewBuildsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBuildsClientWithBaseURI creates an instance of the BuildsClient client. +// NewBuildsClientWithBaseURI creates an instance of the BuildsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBuildsClientWithBaseURI(baseURI string, subscriptionID string) BuildsClient { return BuildsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go index 9caa0e341e8a..eeb977e54e0a 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildsteps.go @@ -36,7 +36,8 @@ func NewBuildStepsClient(subscriptionID string) BuildStepsClient { return NewBuildStepsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBuildStepsClientWithBaseURI creates an instance of the BuildStepsClient client. +// NewBuildStepsClientWithBaseURI creates an instance of the BuildStepsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBuildStepsClientWithBaseURI(baseURI string, subscriptionID string) BuildStepsClient { return BuildStepsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go index 87f3984528ab..b8daed283b23 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go @@ -36,7 +36,8 @@ func NewBuildTasksClient(subscriptionID string) BuildTasksClient { return NewBuildTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBuildTasksClientWithBaseURI creates an instance of the BuildTasksClient client. +// NewBuildTasksClientWithBaseURI creates an instance of the BuildTasksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBuildTasksClientWithBaseURI(baseURI string, subscriptionID string) BuildTasksClient { return BuildTasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/client.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/client.go index b463ed53737b..578a43823145 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/client.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/containerregistryapi/interfaces.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/containerregistryapi/interfaces.go index c017b51effa8..62ae578d2f56 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/containerregistryapi/interfaces.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/containerregistryapi/interfaces.go @@ -31,7 +31,9 @@ type RegistriesClientAPI interface { GetBuildSourceUploadURL(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.SourceUploadDefinition, err error) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters containerregistry.ImportImageParameters) (result containerregistry.RegistriesImportImageFuture, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListPolicies(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryPolicies, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) @@ -46,6 +48,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -56,6 +59,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -68,7 +72,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } @@ -81,6 +87,7 @@ type BuildsClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, buildID string) (result containerregistry.Build, err error) GetLogLink(ctx context.Context, resourceGroupName string, registryName string, buildID string) (result containerregistry.BuildGetLogResult, err error) List(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32, skipToken string) (result containerregistry.BuildListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string, filter string, top *int32, skipToken string) (result containerregistry.BuildListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, buildID string, buildUpdateParameters containerregistry.BuildUpdateParameters) (result containerregistry.BuildsUpdateFuture, err error) } @@ -92,7 +99,9 @@ type BuildStepsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string, stepName string) (result containerregistry.BuildStepsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string, stepName string) (result containerregistry.BuildStep, err error) List(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string) (result containerregistry.BuildStepListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string) (result containerregistry.BuildStepListIterator, err error) ListBuildArguments(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string, stepName string) (result containerregistry.BuildArgumentListPage, err error) + ListBuildArgumentsComplete(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string, stepName string) (result containerregistry.BuildArgumentListIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string, stepName string, buildStepUpdateParameters containerregistry.BuildStepUpdateParameters) (result containerregistry.BuildStepsUpdateFuture, err error) } @@ -104,6 +113,7 @@ type BuildTasksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string) (result containerregistry.BuildTasksDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string) (result containerregistry.BuildTask, err error) List(ctx context.Context, resourceGroupName string, registryName string, filter string, skipToken string) (result containerregistry.BuildTaskListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string, filter string, skipToken string) (result containerregistry.BuildTaskListResultIterator, err error) ListSourceRepositoryProperties(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string) (result containerregistry.SourceRepositoryProperties, err error) Update(ctx context.Context, resourceGroupName string, registryName string, buildTaskName string, buildTaskUpdateParameters containerregistry.BuildTaskUpdateParameters) (result containerregistry.BuildTasksUpdateFuture, err error) } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/operations.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/operations.go index 6123d75bf384..2eaed86de9f2 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/operations.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go index e4e4921d5eb1..c8822edb6c1c 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go index f356afa2d4f8..aef18a24a12e 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go index de31f53c3d02..ebe61d50b5ff 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/client.go b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/client.go index a5b7e3cc955e..48457dda989c 100644 --- a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/client.go +++ b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/containerregistryapi/interfaces.go b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/containerregistryapi/interfaces.go index 452426068449..641d71342d86 100644 --- a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/containerregistryapi/interfaces.go +++ b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/containerregistryapi/interfaces.go @@ -30,7 +30,9 @@ type RegistriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.Registry, err error) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters containerregistry.ImportImageParameters) (result containerregistry.RegistriesImportImageFuture, err error) List(ctx context.Context) (result containerregistry.RegistryListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.RegistryListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerregistry.RegistryListResultIterator, err error) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryListCredentialsResult, err error) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.RegistryUsageListResult, err error) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters containerregistry.RegenerateCredentialParameters) (result containerregistry.RegistryListCredentialsResult, err error) @@ -42,6 +44,7 @@ var _ RegistriesClientAPI = (*containerregistry.RegistriesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result containerregistry.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result containerregistry.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*containerregistry.OperationsClient)(nil) @@ -52,6 +55,7 @@ type ReplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.ReplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result containerregistry.Replication, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.ReplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters containerregistry.ReplicationUpdateParameters) (result containerregistry.ReplicationsUpdateFuture, err error) } @@ -64,7 +68,9 @@ type WebhooksClientAPI interface { Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.Webhook, err error) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.CallbackConfig, err error) List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.WebhookListResultIterator, err error) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultPage, err error) + ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventListResultIterator, err error) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result containerregistry.EventInfo, err error) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters containerregistry.WebhookUpdateParameters) (result containerregistry.WebhooksUpdateFuture, err error) } diff --git a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/operations.go b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/operations.go index 880c431d602c..ec0764cc7e74 100644 --- a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/operations.go +++ b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/registries.go b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/registries.go index d9ceb594e336..e0861394313f 100644 --- a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/registries.go +++ b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/registries.go @@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/replications.go b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/replications.go index 8dd4d2d46f95..6687636501ef 100644 --- a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/replications.go +++ b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/replications.go @@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient { return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/webhooks.go b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/webhooks.go index d6b726638740..69242e03a5de 100644 --- a/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/webhooks.go +++ b/services/preview/containerregistry/mgmt/2019-12-01-preview/containerregistry/webhooks.go @@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient { return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/accesstokens.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/accesstokens.go new file mode 100644 index 000000000000..599360943a5e --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/accesstokens.go @@ -0,0 +1,191 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AccessTokensClient is the metadata API definition for the Azure Container Registry runtime +type AccessTokensClient struct { + BaseClient +} + +// NewAccessTokensClient creates an instance of the AccessTokensClient client. +func NewAccessTokensClient(loginURI string) AccessTokensClient { + return AccessTokensClient{New(loginURI)} +} + +// Get exchange ACR Refresh token for an ACR Access Token +// Parameters: +// service - indicates the name of your Azure container registry. +// scope - which is expected to be a valid scope, and can be specified more than once for multiple scope +// requests. You obtained this from the Www-Authenticate response header from the challenge. +// refreshToken - must be a valid ACR refresh token +func (client AccessTokensClient) Get(ctx context.Context, service string, scope string, refreshToken string) (result AccessToken, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccessTokensClient.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, service, scope, refreshToken) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.AccessTokensClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.AccessTokensClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.AccessTokensClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AccessTokensClient) GetPreparer(ctx context.Context, service string, scope string, refreshToken string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + formDataParameters := map[string]interface{}{ + "grant_type": "refresh_token", + "refresh_token": refreshToken, + "scope": scope, + "service": service, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPath("/oauth2/token"), + autorest.WithFormData(autorest.MapToValues(formDataParameters))) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client AccessTokensClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AccessTokensClient) GetResponder(resp *http.Response) (result AccessToken, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetFromLogin exchange Username, Password and Scope an ACR Access Token +// Parameters: +// service - indicates the name of your Azure container registry. +// scope - expected to be a valid scope, and can be specified more than once for multiple scope requests. You +// can obtain this from the Www-Authenticate response header from the challenge. +func (client AccessTokensClient) GetFromLogin(ctx context.Context, service string, scope string) (result AccessToken, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccessTokensClient.GetFromLogin") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetFromLoginPreparer(ctx, service, scope) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.AccessTokensClient", "GetFromLogin", nil, "Failure preparing request") + return + } + + resp, err := client.GetFromLoginSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.AccessTokensClient", "GetFromLogin", resp, "Failure sending request") + return + } + + result, err = client.GetFromLoginResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.AccessTokensClient", "GetFromLogin", resp, "Failure responding to request") + } + + return +} + +// GetFromLoginPreparer prepares the GetFromLogin request. +func (client AccessTokensClient) GetFromLoginPreparer(ctx context.Context, service string, scope string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + queryParameters := map[string]interface{}{ + "scope": autorest.Encode("query", scope), + "service": autorest.Encode("query", service), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPath("/oauth2/token"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetFromLoginSender sends the GetFromLogin request. The method will close the +// http.Response Body if it receives an error. +func (client AccessTokensClient) GetFromLoginSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetFromLoginResponder handles the response to the GetFromLogin request. The method always +// closes the http.Response Body. +func (client AccessTokensClient) GetFromLoginResponder(resp *http.Response) (result AccessToken, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/blob.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/blob.go new file mode 100644 index 000000000000..acd00fa5611f --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/blob.go @@ -0,0 +1,864 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "io" + "net/http" +) + +// BlobClient is the metadata API definition for the Azure Container Registry runtime +type BlobClient struct { + BaseClient +} + +// NewBlobClient creates an instance of the BlobClient client. +func NewBlobClient(loginURI string) BlobClient { + return BlobClient{New(loginURI)} +} + +// CancelUpload cancel outstanding upload processes, releasing associated resources. If this is not called, the +// unfinished uploads will eventually timeout. +// Parameters: +// location - link acquired from upload start or previous chunk. Note, do not include initial / (must do +// substring(1) ) +func (client BlobClient) CancelUpload(ctx context.Context, location string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.CancelUpload") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CancelUploadPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "CancelUpload", nil, "Failure preparing request") + return + } + + resp, err := client.CancelUploadSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "CancelUpload", resp, "Failure sending request") + return + } + + result, err = client.CancelUploadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "CancelUpload", resp, "Failure responding to request") + } + + return +} + +// CancelUploadPreparer prepares the CancelUpload request. +func (client BlobClient) CancelUploadPreparer(ctx context.Context, location string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "nextBlobUuidLink": location, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/{nextBlobUuidLink}", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CancelUploadSender sends the CancelUpload request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) CancelUploadSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CancelUploadResponder handles the response to the CancelUpload request. The method always +// closes the http.Response Body. +func (client BlobClient) CancelUploadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Check same as GET, except only the headers are returned. +// Parameters: +// name - name of the image (including the namespace) +// digest - digest of a BLOB +func (client BlobClient) Check(ctx context.Context, name string, digest string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.Check") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckPreparer(ctx, name, digest) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Check", nil, "Failure preparing request") + return + } + + resp, err := client.CheckSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Check", resp, "Failure sending request") + return + } + + result, err = client.CheckResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Check", resp, "Failure responding to request") + } + + return +} + +// CheckPreparer prepares the Check request. +func (client BlobClient) CheckPreparer(ctx context.Context, name string, digest string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "digest": autorest.Encode("path", digest), + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/blobs/{digest}", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckSender sends the Check request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) CheckSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckResponder handles the response to the Check request. The method always +// closes the http.Response Body. +func (client BlobClient) CheckResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusTemporaryRedirect), + autorest.ByClosing()) + result.Response = resp + return +} + +// CheckChunk same as GET, except only the headers are returned. +// Parameters: +// name - name of the image (including the namespace) +// digest - digest of a BLOB +// rangeParameter - format : bytes=-, HTTP Range header specifying blob chunk. +func (client BlobClient) CheckChunk(ctx context.Context, name string, digest string, rangeParameter string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.CheckChunk") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckChunkPreparer(ctx, name, digest, rangeParameter) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "CheckChunk", nil, "Failure preparing request") + return + } + + resp, err := client.CheckChunkSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "CheckChunk", resp, "Failure sending request") + return + } + + result, err = client.CheckChunkResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "CheckChunk", resp, "Failure responding to request") + } + + return +} + +// CheckChunkPreparer prepares the CheckChunk request. +func (client BlobClient) CheckChunkPreparer(ctx context.Context, name string, digest string, rangeParameter string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "digest": autorest.Encode("path", digest), + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/blobs/{digest}", pathParameters), + autorest.WithHeader("Range", autorest.String(rangeParameter))) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckChunkSender sends the CheckChunk request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) CheckChunkSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckChunkResponder handles the response to the CheckChunk request. The method always +// closes the http.Response Body. +func (client BlobClient) CheckChunkResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Delete removes an already uploaded blob. +// Parameters: +// name - name of the image (including the namespace) +// digest - digest of a BLOB +func (client BlobClient) Delete(ctx context.Context, name string, digest string) (result ReadCloser, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.Delete") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, name, digest) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BlobClient) DeletePreparer(ctx context.Context, name string, digest string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "digest": autorest.Encode("path", digest), + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/blobs/{digest}", pathParameters)) + 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 BlobClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BlobClient) DeleteResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + result.Response = autorest.Response{Response: resp} + return +} + +// EndUpload complete the upload, providing all the data in the body, if necessary. A request without a body will just +// complete the upload with previously uploaded content. +// Parameters: +// digest - digest of a BLOB +// location - link acquired from upload start or previous chunk. Note, do not include initial / (must do +// substring(1) ) +// value - optional raw data of blob +func (client BlobClient) EndUpload(ctx context.Context, digest string, location string, value io.ReadCloser) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.EndUpload") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.EndUploadPreparer(ctx, digest, location, value) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "EndUpload", nil, "Failure preparing request") + return + } + + resp, err := client.EndUploadSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "EndUpload", resp, "Failure sending request") + return + } + + result, err = client.EndUploadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "EndUpload", resp, "Failure responding to request") + } + + return +} + +// EndUploadPreparer prepares the EndUpload request. +func (client BlobClient) EndUploadPreparer(ctx context.Context, digest string, location string, value io.ReadCloser) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "nextBlobUuidLink": location, + } + + queryParameters := map[string]interface{}{ + "digest": autorest.Encode("query", digest), + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/octet-stream"), + autorest.AsPut(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/{nextBlobUuidLink}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if value != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithFile(value)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EndUploadSender sends the EndUpload request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) EndUploadSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// EndUploadResponder handles the response to the EndUpload request. The method always +// closes the http.Response Body. +func (client BlobClient) EndUploadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieve the blob from the registry identified by digest. +// Parameters: +// name - name of the image (including the namespace) +// digest - digest of a BLOB +func (client BlobClient) Get(ctx context.Context, name string, digest string) (result ReadCloser, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.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, digest) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client BlobClient) GetPreparer(ctx context.Context, name string, digest string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "digest": autorest.Encode("path", digest), + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/blobs/{digest}", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BlobClient) GetResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusTemporaryRedirect)) + result.Response = autorest.Response{Response: resp} + return +} + +// GetChunk retrieve the blob from the registry identified by `digest`. This endpoint may also support RFC7233 +// compliant range requests. Support can be detected by issuing a HEAD request. If the header `Accept-Range: bytes` is +// returned, range requests can be used to fetch partial content. +// Parameters: +// name - name of the image (including the namespace) +// digest - digest of a BLOB +// rangeParameter - format : bytes=-, HTTP Range header specifying blob chunk. +func (client BlobClient) GetChunk(ctx context.Context, name string, digest string, rangeParameter string) (result ReadCloser, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.GetChunk") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetChunkPreparer(ctx, name, digest, rangeParameter) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "GetChunk", nil, "Failure preparing request") + return + } + + resp, err := client.GetChunkSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "GetChunk", resp, "Failure sending request") + return + } + + result, err = client.GetChunkResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "GetChunk", resp, "Failure responding to request") + } + + return +} + +// GetChunkPreparer prepares the GetChunk request. +func (client BlobClient) GetChunkPreparer(ctx context.Context, name string, digest string, rangeParameter string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "digest": autorest.Encode("path", digest), + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/blobs/{digest}", pathParameters), + autorest.WithHeader("Range", autorest.String(rangeParameter))) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetChunkSender sends the GetChunk request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) GetChunkSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetChunkResponder handles the response to the GetChunk request. The method always +// closes the http.Response Body. +func (client BlobClient) GetChunkResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusPartialContent)) + result.Response = autorest.Response{Response: resp} + return +} + +// GetStatus retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the +// current status of a resumable upload. +// Parameters: +// location - link acquired from upload start or previous chunk. Note, do not include initial / (must do +// substring(1) ) +func (client BlobClient) GetStatus(ctx context.Context, location string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.GetStatus") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetStatusPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "GetStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetStatusSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "GetStatus", resp, "Failure sending request") + return + } + + result, err = client.GetStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "GetStatus", resp, "Failure responding to request") + } + + return +} + +// GetStatusPreparer prepares the GetStatus request. +func (client BlobClient) GetStatusPreparer(ctx context.Context, location string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "nextBlobUuidLink": location, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/{nextBlobUuidLink}", pathParameters)) + 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 BlobClient) GetStatusSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetStatusResponder handles the response to the GetStatus request. The method always +// closes the http.Response Body. +func (client BlobClient) GetStatusResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Mount mount a blob identified by the `mount` parameter from another repository. +// Parameters: +// name - name of the image (including the namespace) +// from - name of the source repository. +// mount - digest of blob to mount from the source repository. +func (client BlobClient) Mount(ctx context.Context, name string, from string, mount string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.Mount") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.MountPreparer(ctx, name, from, mount) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Mount", nil, "Failure preparing request") + return + } + + resp, err := client.MountSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Mount", resp, "Failure sending request") + return + } + + result, err = client.MountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Mount", resp, "Failure responding to request") + } + + return +} + +// MountPreparer prepares the Mount request. +func (client BlobClient) MountPreparer(ctx context.Context, name string, from string, mount string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + } + + queryParameters := map[string]interface{}{ + "from": autorest.Encode("query", from), + "mount": autorest.Encode("query", mount), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/blobs/uploads/", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// MountSender sends the Mount request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) MountSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// MountResponder handles the response to the Mount request. The method always +// closes the http.Response Body. +func (client BlobClient) MountResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartUpload initiate a resumable blob upload with an empty request body. +// Parameters: +// name - name of the image (including the namespace) +func (client BlobClient) StartUpload(ctx context.Context, name string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.StartUpload") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.StartUploadPreparer(ctx, name) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "StartUpload", nil, "Failure preparing request") + return + } + + resp, err := client.StartUploadSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "StartUpload", resp, "Failure sending request") + return + } + + result, err = client.StartUploadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "StartUpload", resp, "Failure responding to request") + } + + return +} + +// StartUploadPreparer prepares the StartUpload request. +func (client BlobClient) StartUploadPreparer(ctx context.Context, name string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/blobs/uploads/", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartUploadSender sends the StartUpload request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) StartUploadSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartUploadResponder handles the response to the StartUpload request. The method always +// closes the http.Response Body. +func (client BlobClient) StartUploadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Upload upload a stream of data without completing the upload. +// Parameters: +// value - raw data of blob +// location - link acquired from upload start or previous chunk. Note, do not include initial / (must do +// substring(1) ) +func (client BlobClient) Upload(ctx context.Context, value io.ReadCloser, location string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobClient.Upload") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UploadPreparer(ctx, value, location) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Upload", nil, "Failure preparing request") + return + } + + resp, err := client.UploadSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Upload", resp, "Failure sending request") + return + } + + result, err = client.UploadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.BlobClient", "Upload", resp, "Failure responding to request") + } + + return +} + +// UploadPreparer prepares the Upload request. +func (client BlobClient) UploadPreparer(ctx context.Context, value io.ReadCloser, location string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "nextBlobUuidLink": location, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/octet-stream"), + autorest.AsPatch(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/{nextBlobUuidLink}", pathParameters), + autorest.WithFile(value)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UploadSender sends the Upload request. The method will close the +// http.Response Body if it receives an error. +func (client BlobClient) UploadSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UploadResponder handles the response to the Upload request. The method always +// closes the http.Response Body. +func (client BlobClient) UploadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/client.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/client.go new file mode 100644 index 000000000000..bbf3fb2c3693 --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/client.go @@ -0,0 +1,44 @@ +// Package containerregistry implements the Azure ARM Containerregistry service API version 2019-08-15-preview. +// +// Metadata API definition for the Azure Container Registry runtime +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +// BaseClient is the base client for Containerregistry. +type BaseClient struct { + autorest.Client + LoginURI string +} + +// New creates an instance of the BaseClient client. +func New(loginURI string) BaseClient { + return NewWithoutDefaults(loginURI) +} + +// NewWithoutDefaults creates an instance of the BaseClient client. +func NewWithoutDefaults(loginURI string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + LoginURI: loginURI, + } +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/containerregistryapi/interfaces.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/containerregistryapi/interfaces.go new file mode 100644 index 000000000000..cdb34e1e36bc --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/containerregistryapi/interfaces.go @@ -0,0 +1,96 @@ +package containerregistryapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry" + "github.com/Azure/go-autorest/autorest" + "io" +) + +// V2SupportClientAPI contains the set of methods on the V2SupportClient type. +type V2SupportClientAPI interface { + Check(ctx context.Context) (result autorest.Response, err error) +} + +var _ V2SupportClientAPI = (*containerregistry.V2SupportClient)(nil) + +// ManifestsClientAPI contains the set of methods on the ManifestsClient type. +type ManifestsClientAPI interface { + Create(ctx context.Context, name string, reference string, payload containerregistry.Manifest) (result containerregistry.SetObject, err error) + Delete(ctx context.Context, name string, reference string) (result autorest.Response, err error) + Get(ctx context.Context, name string, reference string, accept string) (result containerregistry.ManifestWrapper, err error) + GetAttributes(ctx context.Context, name string, reference string) (result containerregistry.ManifestAttributes, err error) + GetList(ctx context.Context, name string, last string, n *int32, orderby string) (result containerregistry.AcrManifests, err error) + UpdateAttributes(ctx context.Context, name string, reference string, value *containerregistry.ChangeableAttributes) (result autorest.Response, err error) +} + +var _ ManifestsClientAPI = (*containerregistry.ManifestsClient)(nil) + +// BlobClientAPI contains the set of methods on the BlobClient type. +type BlobClientAPI interface { + CancelUpload(ctx context.Context, location string) (result autorest.Response, err error) + Check(ctx context.Context, name string, digest string) (result autorest.Response, err error) + CheckChunk(ctx context.Context, name string, digest string, rangeParameter string) (result autorest.Response, err error) + Delete(ctx context.Context, name string, digest string) (result containerregistry.ReadCloser, err error) + EndUpload(ctx context.Context, digest string, location string, value io.ReadCloser) (result autorest.Response, err error) + Get(ctx context.Context, name string, digest string) (result containerregistry.ReadCloser, err error) + GetChunk(ctx context.Context, name string, digest string, rangeParameter string) (result containerregistry.ReadCloser, err error) + GetStatus(ctx context.Context, location string) (result autorest.Response, err error) + Mount(ctx context.Context, name string, from string, mount string) (result autorest.Response, err error) + StartUpload(ctx context.Context, name string) (result autorest.Response, err error) + Upload(ctx context.Context, value io.ReadCloser, location string) (result autorest.Response, err error) +} + +var _ BlobClientAPI = (*containerregistry.BlobClient)(nil) + +// RepositoryClientAPI contains the set of methods on the RepositoryClient type. +type RepositoryClientAPI interface { + Delete(ctx context.Context, name string) (result containerregistry.DeletedRepository, err error) + GetAttributes(ctx context.Context, name string) (result containerregistry.RepositoryAttributes, err error) + GetList(ctx context.Context, last string, n *int32) (result containerregistry.Repositories, err error) + UpdateAttributes(ctx context.Context, name string, value *containerregistry.ChangeableAttributes) (result autorest.Response, err error) +} + +var _ RepositoryClientAPI = (*containerregistry.RepositoryClient)(nil) + +// TagClientAPI contains the set of methods on the TagClient type. +type TagClientAPI interface { + Delete(ctx context.Context, name string, reference string) (result autorest.Response, err error) + GetAttributes(ctx context.Context, name string, reference string) (result containerregistry.TagAttributes, err error) + GetList(ctx context.Context, name string, last string, n *int32, orderby string, digest string) (result containerregistry.TagList, err error) + UpdateAttributes(ctx context.Context, name string, reference string, value *containerregistry.ChangeableAttributes) (result autorest.Response, err error) +} + +var _ TagClientAPI = (*containerregistry.TagClient)(nil) + +// RefreshTokensClientAPI contains the set of methods on the RefreshTokensClient type. +type RefreshTokensClientAPI interface { + GetFromExchange(ctx context.Context, grantType string, service string, tenant string, refreshToken string, accessToken string) (result containerregistry.RefreshToken, err error) +} + +var _ RefreshTokensClientAPI = (*containerregistry.RefreshTokensClient)(nil) + +// AccessTokensClientAPI contains the set of methods on the AccessTokensClient type. +type AccessTokensClientAPI interface { + Get(ctx context.Context, service string, scope string, refreshToken string) (result containerregistry.AccessToken, err error) + GetFromLogin(ctx context.Context, service string, scope string) (result containerregistry.AccessToken, err error) +} + +var _ AccessTokensClientAPI = (*containerregistry.AccessTokensClient)(nil) diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/manifests.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/manifests.go new file mode 100644 index 000000000000..19d09b846329 --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/manifests.go @@ -0,0 +1,508 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ManifestsClient is the metadata API definition for the Azure Container Registry runtime +type ManifestsClient struct { + BaseClient +} + +// NewManifestsClient creates an instance of the ManifestsClient client. +func NewManifestsClient(loginURI string) ManifestsClient { + return ManifestsClient{New(loginURI)} +} + +// Create put the manifest identified by `name` and `reference` where `reference` can be a tag or digest. +// Parameters: +// name - name of the image (including the namespace) +// reference - a tag or a digest, pointing to a specific image +// payload - manifest body, can take v1 or v2 values depending on accept header +func (client ManifestsClient) Create(ctx context.Context, name string, reference string, payload Manifest) (result SetObject, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManifestsClient.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, name, reference, payload) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ManifestsClient) CreatePreparer(ctx context.Context, name string, reference string, payload Manifest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "reference": autorest.Encode("path", reference), + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/vnd.docker.distribution.manifest.v2+json"), + autorest.AsPut(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/manifests/{reference}", pathParameters), + autorest.WithJSON(payload)) + 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 ManifestsClient) CreateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ManifestsClient) CreateResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by +// `digest`. +// Parameters: +// name - name of the image (including the namespace) +// reference - a tag or a digest, pointing to a specific image +func (client ManifestsClient) Delete(ctx context.Context, name string, reference string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManifestsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, name, reference) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ManifestsClient) DeletePreparer(ctx context.Context, name string, reference string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "reference": autorest.Encode("path", reference), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/manifests/{reference}", pathParameters)) + 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 ManifestsClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ManifestsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the manifest identified by `name` and `reference` where `reference` can be a tag or digest. +// Parameters: +// name - name of the image (including the namespace) +// reference - a tag or a digest, pointing to a specific image +// accept - accept header string delimited by comma. For example, +// application/vnd.docker.distribution.manifest.v2+json +func (client ManifestsClient) Get(ctx context.Context, name string, reference string, accept string) (result ManifestWrapper, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManifestsClient.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, reference, accept) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ManifestsClient) GetPreparer(ctx context.Context, name string, reference string, accept string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "reference": autorest.Encode("path", reference), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/v2/{name}/manifests/{reference}", pathParameters)) + if len(accept) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("accept", autorest.String(accept))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ManifestsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ManifestsClient) GetResponder(resp *http.Response) (result ManifestWrapper, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAttributes get manifest attributes +// Parameters: +// name - name of the image (including the namespace) +// reference - a tag or a digest, pointing to a specific image +func (client ManifestsClient) GetAttributes(ctx context.Context, name string, reference string) (result ManifestAttributes, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManifestsClient.GetAttributes") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetAttributesPreparer(ctx, name, reference) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "GetAttributes", nil, "Failure preparing request") + return + } + + resp, err := client.GetAttributesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "GetAttributes", resp, "Failure sending request") + return + } + + result, err = client.GetAttributesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "GetAttributes", resp, "Failure responding to request") + } + + return +} + +// GetAttributesPreparer prepares the GetAttributes request. +func (client ManifestsClient) GetAttributesPreparer(ctx context.Context, name string, reference string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "reference": autorest.Encode("path", reference), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}/_manifests/{reference}", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAttributesSender sends the GetAttributes request. The method will close the +// http.Response Body if it receives an error. +func (client ManifestsClient) GetAttributesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetAttributesResponder handles the response to the GetAttributes request. The method always +// closes the http.Response Body. +func (client ManifestsClient) GetAttributesResponder(resp *http.Response) (result ManifestAttributes, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetList list manifests of a repository +// Parameters: +// name - name of the image (including the namespace) +// last - query parameter for the last item in previous query. Result set will include values lexically after +// last. +// n - query parameter for max number of items +// orderby - orderby query parameter +func (client ManifestsClient) GetList(ctx context.Context, name string, last string, n *int32, orderby string) (result AcrManifests, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManifestsClient.GetList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetListPreparer(ctx, name, last, n, orderby) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "GetList", nil, "Failure preparing request") + return + } + + resp, err := client.GetListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "GetList", resp, "Failure sending request") + return + } + + result, err = client.GetListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "GetList", resp, "Failure responding to request") + } + + return +} + +// GetListPreparer prepares the GetList request. +func (client ManifestsClient) GetListPreparer(ctx context.Context, name string, last string, n *int32, orderby string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + } + + queryParameters := map[string]interface{}{} + if len(last) > 0 { + queryParameters["last"] = autorest.Encode("query", last) + } + if n != nil { + queryParameters["n"] = autorest.Encode("query", *n) + } + if len(orderby) > 0 { + queryParameters["orderby"] = autorest.Encode("query", orderby) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}/_manifests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetListSender sends the GetList request. The method will close the +// http.Response Body if it receives an error. +func (client ManifestsClient) GetListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetListResponder handles the response to the GetList request. The method always +// closes the http.Response Body. +func (client ManifestsClient) GetListResponder(resp *http.Response) (result AcrManifests, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateAttributes update attributes of a manifest +// Parameters: +// name - name of the image (including the namespace) +// reference - a tag or a digest, pointing to a specific image +// value - repository attribute value +func (client ManifestsClient) UpdateAttributes(ctx context.Context, name string, reference string, value *ChangeableAttributes) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManifestsClient.UpdateAttributes") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateAttributesPreparer(ctx, name, reference, value) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "UpdateAttributes", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateAttributesSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "UpdateAttributes", resp, "Failure sending request") + return + } + + result, err = client.UpdateAttributesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ManifestsClient", "UpdateAttributes", resp, "Failure responding to request") + } + + return +} + +// UpdateAttributesPreparer prepares the UpdateAttributes request. +func (client ManifestsClient) UpdateAttributesPreparer(ctx context.Context, name string, reference string, value *ChangeableAttributes) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "reference": autorest.Encode("path", reference), + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}/_manifests/{reference}", pathParameters)) + if value != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(value)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateAttributesSender sends the UpdateAttributes request. The method will close the +// http.Response Body if it receives an error. +func (client ManifestsClient) UpdateAttributesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateAttributesResponder handles the response to the UpdateAttributes request. The method always +// closes the http.Response Body. +func (client ManifestsClient) UpdateAttributesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/models.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/models.go new file mode 100644 index 000000000000..8ccafc99a407 --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/models.go @@ -0,0 +1,639 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "io" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry" + +// AccessToken ... +type AccessToken struct { + autorest.Response `json:"-"` + // AccessToken - The access token for performing authenticated requests + AccessToken *string `json:"access_token,omitempty"` +} + +// AcrErrorInfo error information +type AcrErrorInfo struct { + // Code - Error code + Code *string `json:"code,omitempty"` + // Message - Error message + Message *string `json:"message,omitempty"` + // Detail - Error details + Detail interface{} `json:"detail,omitempty"` +} + +// AcrErrors acr error response describing why the operation failed +type AcrErrors struct { + // Errors - Array of detailed error + Errors *[]AcrErrorInfo `json:"errors,omitempty"` +} + +// AcrManifests manifest attributes +type AcrManifests struct { + autorest.Response `json:"-"` + // Registry - Registry name + Registry *string `json:"registry,omitempty"` + // ImageName - Image name + ImageName *string `json:"imageName,omitempty"` + // ManifestsAttributes - List of manifests + ManifestsAttributes *[]ManifestAttributesBase `json:"manifests,omitempty"` +} + +// Annotations additional information provided through arbitrary metadata. +type Annotations struct { + // AdditionalProperties - Unmatched properties from the message are deserialized this collection + AdditionalProperties map[string]interface{} `json:""` + // Created - Date and time on which the image was built (string, date-time as defined by https://tools.ietf.org/html/rfc3339#section-5.6) + Created *date.Time `json:"org.opencontainers.image.created,omitempty"` + // Authors - Contact details of the people or organization responsible for the image. + Authors *string `json:"org.opencontainers.image.authors,omitempty"` + // URL - URL to find more information on the image. + URL *string `json:"org.opencontainers.image.url,omitempty"` + // Documentation - URL to get documentation on the image. + Documentation *string `json:"org.opencontainers.image.documentation,omitempty"` + // Source - URL to get source code for building the image. + Source *string `json:"org.opencontainers.image.source,omitempty"` + // Version - Version of the packaged software. The version MAY match a label or tag in the source code repository, may also be Semantic versioning-compatible + Version *string `json:"org.opencontainers.image.version,omitempty"` + // Revision - Source control revision identifier for the packaged software. + Revision *string `json:"org.opencontainers.image.revision,omitempty"` + // Vendor - Name of the distributing entity, organization or individual. + Vendor *string `json:"org.opencontainers.image.vendor,omitempty"` + // Licenses - License(s) under which contained software is distributed as an SPDX License Expression. + Licenses *string `json:"org.opencontainers.image.licenses,omitempty"` + // Name - Name of the reference for a target. + Name *string `json:"org.opencontainers.image.ref.name,omitempty"` + // Title - Human-readable title of the image + Title *string `json:"org.opencontainers.image.title,omitempty"` + // Description - Human-readable description of the software packaged in the image + Description *string `json:"org.opencontainers.image.description,omitempty"` +} + +// MarshalJSON is the custom marshaler for Annotations. +func (a Annotations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if a.Created != nil { + objectMap["org.opencontainers.image.created"] = a.Created + } + if a.Authors != nil { + objectMap["org.opencontainers.image.authors"] = a.Authors + } + if a.URL != nil { + objectMap["org.opencontainers.image.url"] = a.URL + } + if a.Documentation != nil { + objectMap["org.opencontainers.image.documentation"] = a.Documentation + } + if a.Source != nil { + objectMap["org.opencontainers.image.source"] = a.Source + } + if a.Version != nil { + objectMap["org.opencontainers.image.version"] = a.Version + } + if a.Revision != nil { + objectMap["org.opencontainers.image.revision"] = a.Revision + } + if a.Vendor != nil { + objectMap["org.opencontainers.image.vendor"] = a.Vendor + } + if a.Licenses != nil { + objectMap["org.opencontainers.image.licenses"] = a.Licenses + } + if a.Name != nil { + objectMap["org.opencontainers.image.ref.name"] = a.Name + } + if a.Title != nil { + objectMap["org.opencontainers.image.title"] = a.Title + } + if a.Description != nil { + objectMap["org.opencontainers.image.description"] = a.Description + } + for k, v := range a.AdditionalProperties { + objectMap[k] = v + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Annotations struct. +func (a *Annotations) UnmarshalJSON(body []byte) 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 a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[k] = additionalProperties + } + case "org.opencontainers.image.created": + if v != nil { + var created date.Time + err = json.Unmarshal(*v, &created) + if err != nil { + return err + } + a.Created = &created + } + case "org.opencontainers.image.authors": + if v != nil { + var authors string + err = json.Unmarshal(*v, &authors) + if err != nil { + return err + } + a.Authors = &authors + } + case "org.opencontainers.image.url": + if v != nil { + var URL string + err = json.Unmarshal(*v, &URL) + if err != nil { + return err + } + a.URL = &URL + } + case "org.opencontainers.image.documentation": + if v != nil { + var documentation string + err = json.Unmarshal(*v, &documentation) + if err != nil { + return err + } + a.Documentation = &documentation + } + case "org.opencontainers.image.source": + if v != nil { + var source string + err = json.Unmarshal(*v, &source) + if err != nil { + return err + } + a.Source = &source + } + case "org.opencontainers.image.version": + if v != nil { + var version string + err = json.Unmarshal(*v, &version) + if err != nil { + return err + } + a.Version = &version + } + case "org.opencontainers.image.revision": + if v != nil { + var revision string + err = json.Unmarshal(*v, &revision) + if err != nil { + return err + } + a.Revision = &revision + } + case "org.opencontainers.image.vendor": + if v != nil { + var vendor string + err = json.Unmarshal(*v, &vendor) + if err != nil { + return err + } + a.Vendor = &vendor + } + case "org.opencontainers.image.licenses": + if v != nil { + var licenses string + err = json.Unmarshal(*v, &licenses) + if err != nil { + return err + } + a.Licenses = &licenses + } + case "org.opencontainers.image.ref.name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + a.Name = &name + } + case "org.opencontainers.image.title": + if v != nil { + var title string + err = json.Unmarshal(*v, &title) + if err != nil { + return err + } + a.Title = &title + } + case "org.opencontainers.image.description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + a.Description = &description + } + } + } + + return nil +} + +// ChangeableAttributes ... +type ChangeableAttributes struct { + // DeleteEnabled - Delete enabled + DeleteEnabled *bool `json:"deleteEnabled,omitempty"` + // WriteEnabled - Write enabled + WriteEnabled *bool `json:"writeEnabled,omitempty"` + // ListEnabled - List enabled + ListEnabled *bool `json:"listEnabled,omitempty"` + // ReadEnabled - Read enabled + ReadEnabled *bool `json:"readEnabled,omitempty"` +} + +// DeletedRepository deleted repository +type DeletedRepository struct { + autorest.Response `json:"-"` + // ManifestsDeleted - SHA of the deleted image + ManifestsDeleted *[]string `json:"manifestsDeleted,omitempty"` + // TagsDeleted - Tag of the deleted image + TagsDeleted *[]string `json:"tagsDeleted,omitempty"` +} + +// Descriptor docker V2 image layer descriptor including config and layers +type Descriptor struct { + // MediaType - Layer media type + MediaType *string `json:"mediaType,omitempty"` + // Size - Layer size + Size *int64 `json:"size,omitempty"` + // Digest - Layer digest + Digest *string `json:"digest,omitempty"` + // Urls - Specifies a list of URIs from which this object may be downloaded. + Urls *[]string `json:"urls,omitempty"` + Annotations *Annotations `json:"annotations,omitempty"` +} + +// FsLayer image layer information +type FsLayer struct { + // BlobSum - SHA of an image layer + BlobSum *string `json:"blobSum,omitempty"` +} + +// History a list of unstructured historical data for v1 compatibility +type History struct { + // V1Compatibility - The raw v1 compatibility information + V1Compatibility *string `json:"v1Compatibility,omitempty"` +} + +// ImageSignature signature of a signed manifest +type ImageSignature struct { + // Header - A JSON web signature + Header *JWK `json:"header,omitempty"` + // Signature - A signature for the image manifest, signed by a libtrust private key + Signature *string `json:"signature,omitempty"` + // Protected - The signed protected header + Protected *string `json:"protected,omitempty"` +} + +// JWK a JSON web signature +type JWK struct { + Jwk *JWKHeader `json:"jwk,omitempty"` + // Alg - The algorithm used to sign or encrypt the JWT + Alg *string `json:"alg,omitempty"` +} + +// JWKHeader JSON web key parameter +type JWKHeader struct { + // Crv - crv value + Crv *string `json:"crv,omitempty"` + // Kid - kid value + Kid *string `json:"kid,omitempty"` + // Kty - kty value + Kty *string `json:"kty,omitempty"` + // X - x value + X *string `json:"x,omitempty"` + // Y - y value + Y *string `json:"y,omitempty"` +} + +// Manifest returns the requested manifest file +type Manifest struct { + // SchemaVersion - Schema version + SchemaVersion *int32 `json:"schemaVersion,omitempty"` +} + +// ManifestAttributes manifest attributes details +type ManifestAttributes struct { + autorest.Response `json:"-"` + // Registry - Registry name + Registry *string `json:"registry,omitempty"` + // ImageName - Image name + ImageName *string `json:"imageName,omitempty"` + // Attributes - Manifest attributes + Attributes *ManifestAttributesBase `json:"manifest,omitempty"` +} + +// ManifestAttributesBase manifest details +type ManifestAttributesBase struct { + // Digest - Manifest + Digest *string `json:"digest,omitempty"` + // ImageSize - Image size + ImageSize *int64 `json:"imageSize,omitempty"` + // CreatedTime - Created time + CreatedTime *string `json:"createdTime,omitempty"` + // LastUpdateTime - Last update time + LastUpdateTime *string `json:"lastUpdateTime,omitempty"` + // Architecture - CPU architecture + Architecture *string `json:"architecture,omitempty"` + // Os - Operating system + Os *string `json:"os,omitempty"` + // MediaType - Media type + MediaType *string `json:"mediaType,omitempty"` + // ConfigMediaType - Config blob media type + ConfigMediaType *string `json:"configMediaType,omitempty"` + // Tags - List of tags + Tags *[]string `json:"tags,omitempty"` + // ChangeableAttributes - Changeable attributes + ChangeableAttributes *ChangeableAttributes `json:"changeableAttributes,omitempty"` +} + +// ManifestAttributesManifest list of manifest attributes +type ManifestAttributesManifest struct { + // References - List of manifest attributes details + References *[]ManifestAttributesManifestReferences `json:"references,omitempty"` + // QuarantineTag - Quarantine tag name + QuarantineTag *string `json:"quarantineTag,omitempty"` +} + +// ManifestAttributesManifestReferences manifest attributes details +type ManifestAttributesManifestReferences struct { + // Digest - Manifest digest + Digest *string `json:"digest,omitempty"` + // Architecture - CPU architecture + Architecture *string `json:"architecture,omitempty"` + // Os - Operating system + Os *string `json:"os,omitempty"` +} + +// ManifestChangeableAttributes changeable attributes +type ManifestChangeableAttributes struct { + // DeleteEnabled - Delete enabled + DeleteEnabled *bool `json:"deleteEnabled,omitempty"` + // WriteEnabled - Write enabled + WriteEnabled *bool `json:"writeEnabled,omitempty"` + // ListEnabled - List enabled + ListEnabled *bool `json:"listEnabled,omitempty"` + // ReadEnabled - Read enabled + ReadEnabled *bool `json:"readEnabled,omitempty"` + // QuarantineState - Quarantine state + QuarantineState *string `json:"quarantineState,omitempty"` + // QuarantineDetails - Quarantine details + QuarantineDetails *string `json:"quarantineDetails,omitempty"` +} + +// ManifestList returns the requested Docker multi-arch-manifest file +type ManifestList struct { + // MediaType - Media type for this Manifest + MediaType *string `json:"mediaType,omitempty"` + // Manifests - List of V2 image layer information + Manifests *[]ManifestListAttributes `json:"manifests,omitempty"` + // SchemaVersion - Schema version + SchemaVersion *int32 `json:"schemaVersion,omitempty"` +} + +// ManifestListAttributes ... +type ManifestListAttributes struct { + // MediaType - The MIME type of the referenced object. This will generally be application/vnd.docker.image.manifest.v2+json, but it could also be application/vnd.docker.image.manifest.v1+json + MediaType *string `json:"mediaType,omitempty"` + // Size - The size in bytes of the object + Size *int64 `json:"size,omitempty"` + // Digest - The digest of the content, as defined by the Registry V2 HTTP API Specification + Digest *string `json:"digest,omitempty"` + Platform *Platform `json:"platform,omitempty"` +} + +// ManifestWrapper returns the requested manifest file +type ManifestWrapper struct { + autorest.Response `json:"-"` + // MediaType - Media type for this Manifest + MediaType *string `json:"mediaType,omitempty"` + // Manifests - (ManifestList, OCIIndex) List of V2 image layer information + Manifests *[]ManifestListAttributes `json:"manifests,omitempty"` + // Config - (V2, OCI) Image config descriptor + Config *Descriptor `json:"config,omitempty"` + // Layers - (V2, OCI) List of V2 image layer information + Layers *[]Descriptor `json:"layers,omitempty"` + // Annotations - (OCI, OCIIndex) Additional metadata + Annotations *Annotations `json:"annotations,omitempty"` + // Architecture - (V1) CPU architecture + Architecture *string `json:"architecture,omitempty"` + // Name - (V1) Image name + Name *string `json:"name,omitempty"` + // Tag - (V1) Image tag + Tag *string `json:"tag,omitempty"` + // FsLayers - (V1) List of layer information + FsLayers *[]FsLayer `json:"fsLayers,omitempty"` + // History - (V1) Image history + History *[]History `json:"history,omitempty"` + // Signatures - (V1) Image signature + Signatures *[]ImageSignature `json:"signatures,omitempty"` + // SchemaVersion - Schema version + SchemaVersion *int32 `json:"schemaVersion,omitempty"` +} + +// OCIIndex returns the requested OCI index file +type OCIIndex struct { + // Manifests - List of OCI image layer information + Manifests *[]ManifestListAttributes `json:"manifests,omitempty"` + Annotations *Annotations `json:"annotations,omitempty"` + // SchemaVersion - Schema version + SchemaVersion *int32 `json:"schemaVersion,omitempty"` +} + +// OCIManifest returns the requested OCI Manifest file +type OCIManifest struct { + // Config - V2 image config descriptor + Config *Descriptor `json:"config,omitempty"` + // Layers - List of V2 image layer information + Layers *[]Descriptor `json:"layers,omitempty"` + Annotations *Annotations `json:"annotations,omitempty"` + // SchemaVersion - Schema version + SchemaVersion *int32 `json:"schemaVersion,omitempty"` +} + +// Platform the platform object describes the platform which the image in the manifest runs on. A full list +// of valid operating system and architecture values are listed in the Go language documentation for $GOOS +// and $GOARCH +type Platform struct { + // Architecture - Specifies the CPU architecture, for example amd64 or ppc64le. + Architecture *string `json:"architecture,omitempty"` + // Os - The os field specifies the operating system, for example linux or windows. + Os *string `json:"os,omitempty"` + // OsVersion - The optional os.version field specifies the operating system version, for example 10.0.10586. + OsVersion *string `json:"os.version,omitempty"` + // OsFeatures - The optional os.features field specifies an array of strings, each listing a required OS feature (for example on Windows win32k + OsFeatures *[]string `json:"os.features,omitempty"` + // Variant - The optional variant field specifies a variant of the CPU, for example armv6l to specify a particular CPU variant of the ARM CPU. + Variant *string `json:"variant,omitempty"` + // Features - The optional features field specifies an array of strings, each listing a required CPU feature (for example sse4 or aes + Features *[]string `json:"features,omitempty"` +} + +// ReadCloser ... +type ReadCloser struct { + autorest.Response `json:"-"` + Value *io.ReadCloser `json:"value,omitempty"` +} + +// RefreshToken ... +type RefreshToken struct { + autorest.Response `json:"-"` + // RefreshToken - The refresh token to be used for generating access tokens + RefreshToken *string `json:"refresh_token,omitempty"` +} + +// Repositories list of repositories +type Repositories struct { + autorest.Response `json:"-"` + // Names - Repository names + Names *[]string `json:"repositories,omitempty"` +} + +// RepositoryAttributes repository attributes +type RepositoryAttributes struct { + autorest.Response `json:"-"` + // Registry - Registry name + Registry *string `json:"registry,omitempty"` + // ImageName - Image name + ImageName *string `json:"imageName,omitempty"` + // CreatedTime - Image created time + CreatedTime *string `json:"createdTime,omitempty"` + // LastUpdateTime - Image last update time + LastUpdateTime *string `json:"lastUpdateTime,omitempty"` + // ManifestCount - Number of the manifests + ManifestCount *int32 `json:"manifestCount,omitempty"` + // TagCount - Number of the tags + TagCount *int32 `json:"tagCount,omitempty"` + // ChangeableAttributes - Changeable attributes + ChangeableAttributes *ChangeableAttributes `json:"changeableAttributes,omitempty"` +} + +// RepositoryTags result of the request to list tags of the image +type RepositoryTags struct { + // Name - Name of the image + Name *string `json:"name,omitempty"` + // Tags - List of tags + Tags *[]string `json:"tags,omitempty"` +} + +// SetObject ... +type SetObject struct { + autorest.Response `json:"-"` + Value interface{} `json:"value,omitempty"` +} + +// TagAttributes tag attributes +type TagAttributes struct { + autorest.Response `json:"-"` + // Registry - Registry name + Registry *string `json:"registry,omitempty"` + // ImageName - Image name + ImageName *string `json:"imageName,omitempty"` + // Attributes - List of tag attribute details + Attributes *TagAttributesBase `json:"tag,omitempty"` +} + +// TagAttributesBase tag attribute details +type TagAttributesBase struct { + // Name - Tag name + Name *string `json:"name,omitempty"` + // Digest - Tag digest + Digest *string `json:"digest,omitempty"` + // CreatedTime - Tag created time + CreatedTime *string `json:"createdTime,omitempty"` + // LastUpdateTime - Tag last update time + LastUpdateTime *string `json:"lastUpdateTime,omitempty"` + // Signed - Is signed + Signed *bool `json:"signed,omitempty"` + // ChangeableAttributes - Changeable attributes + ChangeableAttributes *ChangeableAttributes `json:"changeableAttributes,omitempty"` +} + +// TagAttributesTag tag +type TagAttributesTag struct { + // SignatureRecord - SignatureRecord value + SignatureRecord *string `json:"signatureRecord,omitempty"` +} + +// TagList list of tag details +type TagList struct { + autorest.Response `json:"-"` + // Registry - Registry name + Registry *string `json:"registry,omitempty"` + // ImageName - Image name + ImageName *string `json:"imageName,omitempty"` + // Tags - List of tag attribute details + Tags *[]TagAttributesBase `json:"tags,omitempty"` +} + +// V1Manifest returns the requested V1 manifest file +type V1Manifest struct { + // Architecture - CPU architecture + Architecture *string `json:"architecture,omitempty"` + // Name - Image name + Name *string `json:"name,omitempty"` + // Tag - Image tag + Tag *string `json:"tag,omitempty"` + // FsLayers - List of layer information + FsLayers *[]FsLayer `json:"fsLayers,omitempty"` + // History - Image history + History *[]History `json:"history,omitempty"` + // Signatures - Image signature + Signatures *[]ImageSignature `json:"signatures,omitempty"` + // SchemaVersion - Schema version + SchemaVersion *int32 `json:"schemaVersion,omitempty"` +} + +// V2Manifest returns the requested Docker V2 Manifest file +type V2Manifest struct { + // MediaType - Media type for this Manifest + MediaType *string `json:"mediaType,omitempty"` + // Config - V2 image config descriptor + Config *Descriptor `json:"config,omitempty"` + // Layers - List of V2 image layer information + Layers *[]Descriptor `json:"layers,omitempty"` + // SchemaVersion - Schema version + SchemaVersion *int32 `json:"schemaVersion,omitempty"` +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/refreshtokens.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/refreshtokens.go new file mode 100644 index 000000000000..a6440e642e97 --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/refreshtokens.go @@ -0,0 +1,123 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RefreshTokensClient is the metadata API definition for the Azure Container Registry runtime +type RefreshTokensClient struct { + BaseClient +} + +// NewRefreshTokensClient creates an instance of the RefreshTokensClient client. +func NewRefreshTokensClient(loginURI string) RefreshTokensClient { + return RefreshTokensClient{New(loginURI)} +} + +// GetFromExchange exchange AAD tokens for an ACR refresh Token +// Parameters: +// grantType - can take a value of access_token_refresh_token, or access_token, or refresh_token +// service - indicates the name of your Azure container registry. +// tenant - AAD tenant associated to the AAD credentials. +// refreshToken - AAD refresh token, mandatory when grant_type is access_token_refresh_token or refresh_token +// accessToken - AAD access token, mandatory when grant_type is access_token_refresh_token or access_token. +func (client RefreshTokensClient) GetFromExchange(ctx context.Context, grantType string, service string, tenant string, refreshToken string, accessToken string) (result RefreshToken, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RefreshTokensClient.GetFromExchange") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetFromExchangePreparer(ctx, grantType, service, tenant, refreshToken, accessToken) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RefreshTokensClient", "GetFromExchange", nil, "Failure preparing request") + return + } + + resp, err := client.GetFromExchangeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.RefreshTokensClient", "GetFromExchange", resp, "Failure sending request") + return + } + + result, err = client.GetFromExchangeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RefreshTokensClient", "GetFromExchange", resp, "Failure responding to request") + } + + return +} + +// GetFromExchangePreparer prepares the GetFromExchange request. +func (client RefreshTokensClient) GetFromExchangePreparer(ctx context.Context, grantType string, service string, tenant string, refreshToken string, accessToken string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + formDataParameters := map[string]interface{}{ + "grant_type": grantType, + "service": service, + } + if len(tenant) > 0 { + formDataParameters["tenant"] = tenant + } + if len(refreshToken) > 0 { + formDataParameters["refresh_token"] = refreshToken + } + if len(accessToken) > 0 { + formDataParameters["access_token"] = accessToken + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPath("/oauth2/exchange"), + autorest.WithFormData(autorest.MapToValues(formDataParameters))) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetFromExchangeSender sends the GetFromExchange request. The method will close the +// http.Response Body if it receives an error. +func (client RefreshTokensClient) GetFromExchangeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetFromExchangeResponder handles the response to the GetFromExchange request. The method always +// closes the http.Response Body. +func (client RefreshTokensClient) GetFromExchangeResponder(resp *http.Response) (result RefreshToken, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/repository.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/repository.go new file mode 100644 index 000000000000..d221fccd74ab --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/repository.go @@ -0,0 +1,336 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RepositoryClient is the metadata API definition for the Azure Container Registry runtime +type RepositoryClient struct { + BaseClient +} + +// NewRepositoryClient creates an instance of the RepositoryClient client. +func NewRepositoryClient(loginURI string) RepositoryClient { + return RepositoryClient{New(loginURI)} +} + +// Delete delete the repository identified by `name` +// Parameters: +// name - name of the image (including the namespace) +func (client RepositoryClient) Delete(ctx context.Context, name string) (result DeletedRepository, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RepositoryClient.Delete") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, name) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RepositoryClient) DeletePreparer(ctx context.Context, name string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}", pathParameters)) + 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 RepositoryClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RepositoryClient) DeleteResponder(resp *http.Response) (result DeletedRepository, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAttributes get repository attributes +// Parameters: +// name - name of the image (including the namespace) +func (client RepositoryClient) GetAttributes(ctx context.Context, name string) (result RepositoryAttributes, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RepositoryClient.GetAttributes") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetAttributesPreparer(ctx, name) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "GetAttributes", nil, "Failure preparing request") + return + } + + resp, err := client.GetAttributesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "GetAttributes", resp, "Failure sending request") + return + } + + result, err = client.GetAttributesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "GetAttributes", resp, "Failure responding to request") + } + + return +} + +// GetAttributesPreparer prepares the GetAttributes request. +func (client RepositoryClient) GetAttributesPreparer(ctx context.Context, name string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAttributesSender sends the GetAttributes request. The method will close the +// http.Response Body if it receives an error. +func (client RepositoryClient) GetAttributesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetAttributesResponder handles the response to the GetAttributes request. The method always +// closes the http.Response Body. +func (client RepositoryClient) GetAttributesResponder(resp *http.Response) (result RepositoryAttributes, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetList list repositories +// Parameters: +// last - query parameter for the last item in previous query. Result set will include values lexically after +// last. +// n - query parameter for max number of items +func (client RepositoryClient) GetList(ctx context.Context, last string, n *int32) (result Repositories, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RepositoryClient.GetList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetListPreparer(ctx, last, n) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "GetList", nil, "Failure preparing request") + return + } + + resp, err := client.GetListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "GetList", resp, "Failure sending request") + return + } + + result, err = client.GetListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "GetList", resp, "Failure responding to request") + } + + return +} + +// GetListPreparer prepares the GetList request. +func (client RepositoryClient) GetListPreparer(ctx context.Context, last string, n *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + queryParameters := map[string]interface{}{} + if len(last) > 0 { + queryParameters["last"] = autorest.Encode("query", last) + } + if n != nil { + queryParameters["n"] = autorest.Encode("query", *n) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPath("/acr/v1/_catalog"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetListSender sends the GetList request. The method will close the +// http.Response Body if it receives an error. +func (client RepositoryClient) GetListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetListResponder handles the response to the GetList request. The method always +// closes the http.Response Body. +func (client RepositoryClient) GetListResponder(resp *http.Response) (result Repositories, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateAttributes update the attribute identified by `name` where `reference` is the name of the repository. +// Parameters: +// name - name of the image (including the namespace) +// value - repository attribute value +func (client RepositoryClient) UpdateAttributes(ctx context.Context, name string, value *ChangeableAttributes) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RepositoryClient.UpdateAttributes") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateAttributesPreparer(ctx, name, value) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "UpdateAttributes", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateAttributesSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "UpdateAttributes", resp, "Failure sending request") + return + } + + result, err = client.UpdateAttributesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RepositoryClient", "UpdateAttributes", resp, "Failure responding to request") + } + + return +} + +// UpdateAttributesPreparer prepares the UpdateAttributes request. +func (client RepositoryClient) UpdateAttributesPreparer(ctx context.Context, name string, value *ChangeableAttributes) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}", pathParameters)) + if value != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(value)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateAttributesSender sends the UpdateAttributes request. The method will close the +// http.Response Body if it receives an error. +func (client RepositoryClient) UpdateAttributesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateAttributesResponder handles the response to the UpdateAttributes request. The method always +// closes the http.Response Body. +func (client RepositoryClient) UpdateAttributesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/tag.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/tag.go new file mode 100644 index 000000000000..abc0e238436c --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/tag.go @@ -0,0 +1,354 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TagClient is the metadata API definition for the Azure Container Registry runtime +type TagClient struct { + BaseClient +} + +// NewTagClient creates an instance of the TagClient client. +func NewTagClient(loginURI string) TagClient { + return TagClient{New(loginURI)} +} + +// Delete delete tag +// Parameters: +// name - name of the image (including the namespace) +// reference - tag name +func (client TagClient) Delete(ctx context.Context, name string, reference string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, name, reference) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client TagClient) DeletePreparer(ctx context.Context, name string, reference string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "reference": autorest.Encode("path", reference), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}/_tags/{reference}", pathParameters)) + 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 TagClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client TagClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetAttributes get tag attributes by tag +// Parameters: +// name - name of the image (including the namespace) +// reference - tag name +func (client TagClient) GetAttributes(ctx context.Context, name string, reference string) (result TagAttributes, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetAttributes") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetAttributesPreparer(ctx, name, reference) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "GetAttributes", nil, "Failure preparing request") + return + } + + resp, err := client.GetAttributesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "GetAttributes", resp, "Failure sending request") + return + } + + result, err = client.GetAttributesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "GetAttributes", resp, "Failure responding to request") + } + + return +} + +// GetAttributesPreparer prepares the GetAttributes request. +func (client TagClient) GetAttributesPreparer(ctx context.Context, name string, reference string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "reference": autorest.Encode("path", reference), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}/_tags/{reference}", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAttributesSender sends the GetAttributes request. The method will close the +// http.Response Body if it receives an error. +func (client TagClient) GetAttributesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetAttributesResponder handles the response to the GetAttributes request. The method always +// closes the http.Response Body. +func (client TagClient) GetAttributesResponder(resp *http.Response) (result TagAttributes, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetList list tags of a repository +// Parameters: +// name - name of the image (including the namespace) +// last - query parameter for the last item in previous query. Result set will include values lexically after +// last. +// n - query parameter for max number of items +// orderby - orderby query parameter +// digest - filter by digest +func (client TagClient) GetList(ctx context.Context, name string, last string, n *int32, orderby string, digest string) (result TagList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetListPreparer(ctx, name, last, n, orderby, digest) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "GetList", nil, "Failure preparing request") + return + } + + resp, err := client.GetListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "GetList", resp, "Failure sending request") + return + } + + result, err = client.GetListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "GetList", resp, "Failure responding to request") + } + + return +} + +// GetListPreparer prepares the GetList request. +func (client TagClient) GetListPreparer(ctx context.Context, name string, last string, n *int32, orderby string, digest string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + } + + queryParameters := map[string]interface{}{} + if len(last) > 0 { + queryParameters["last"] = autorest.Encode("query", last) + } + if n != nil { + queryParameters["n"] = autorest.Encode("query", *n) + } + if len(orderby) > 0 { + queryParameters["orderby"] = autorest.Encode("query", orderby) + } + if len(digest) > 0 { + queryParameters["digest"] = autorest.Encode("query", digest) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}/_tags", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetListSender sends the GetList request. The method will close the +// http.Response Body if it receives an error. +func (client TagClient) GetListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetListResponder handles the response to the GetList request. The method always +// closes the http.Response Body. +func (client TagClient) GetListResponder(resp *http.Response) (result TagList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateAttributes update tag attributes +// Parameters: +// name - name of the image (including the namespace) +// reference - tag name +// value - repository attribute value +func (client TagClient) UpdateAttributes(ctx context.Context, name string, reference string, value *ChangeableAttributes) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.UpdateAttributes") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateAttributesPreparer(ctx, name, reference, value) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "UpdateAttributes", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateAttributesSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "UpdateAttributes", resp, "Failure sending request") + return + } + + result, err = client.UpdateAttributesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TagClient", "UpdateAttributes", resp, "Failure responding to request") + } + + return +} + +// UpdateAttributesPreparer prepares the UpdateAttributes request. +func (client TagClient) UpdateAttributesPreparer(ctx context.Context, name string, reference string, value *ChangeableAttributes) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "reference": autorest.Encode("path", reference), + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPathParameters("/acr/v1/{name}/_tags/{reference}", pathParameters)) + if value != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(value)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateAttributesSender sends the UpdateAttributes request. The method will close the +// http.Response Body if it receives an error. +func (client TagClient) UpdateAttributesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateAttributesResponder handles the response to the UpdateAttributes request. The method always +// closes the http.Response Body. +func (client TagClient) UpdateAttributesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/v2support.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/v2support.go new file mode 100644 index 000000000000..327c5fdca0d4 --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/v2support.go @@ -0,0 +1,101 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// V2SupportClient is the metadata API definition for the Azure Container Registry runtime +type V2SupportClient struct { + BaseClient +} + +// NewV2SupportClient creates an instance of the V2SupportClient client. +func NewV2SupportClient(loginURI string) V2SupportClient { + return V2SupportClient{New(loginURI)} +} + +// Check tells whether this Docker Registry instance supports Docker Registry HTTP API v2 +func (client V2SupportClient) Check(ctx context.Context) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/V2SupportClient.Check") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.V2SupportClient", "Check", nil, "Failure preparing request") + return + } + + resp, err := client.CheckSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.V2SupportClient", "Check", resp, "Failure sending request") + return + } + + result, err = client.CheckResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.V2SupportClient", "Check", resp, "Failure responding to request") + } + + return +} + +// CheckPreparer prepares the Check request. +func (client V2SupportClient) CheckPreparer(ctx context.Context) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "url": client.LoginURI, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{url}", urlParameters), + autorest.WithPath("/v2/")) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckSender sends the Check request. The method will close the +// http.Response Body if it receives an error. +func (client V2SupportClient) CheckSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckResponder handles the response to the Check request. The method always +// closes the http.Response Body. +func (client V2SupportClient) CheckResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/version.go b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/version.go new file mode 100644 index 000000000000..9b55b2fd29f6 --- /dev/null +++ b/services/preview/containerregistry/runtime/2019-08-15-preview/containerregistry/version.go @@ -0,0 +1,30 @@ +package containerregistry + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " containerregistry/2019-08-15-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/client.go b/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/client.go index b89393d7cfb8..ad3b3219c54c 100644 --- a/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/client.go +++ b/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go b/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go index 2382d69ca780..3c8c2e1754d1 100644 --- a/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go +++ b/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/client.go b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/client.go +++ b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/containerserviceapi/interfaces.go b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/containerserviceapi/interfaces.go index 4bfefb739006..da984827da8c 100644 --- a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/containerserviceapi/interfaces.go +++ b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,7 +65,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) diff --git a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/containerservices.go b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/containerservices.go index c3e6fa6ad1ed..6e289aca8a16 100644 --- a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/containerservices.go +++ b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/managedclusters.go b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/managedclusters.go index 747015d8d2d6..38e53946b1d0 100644 --- a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/managedclusters.go +++ b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/openshiftmanagedclusters.go b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/openshiftmanagedclusters.go index 180281349e42..2f407c484f79 100644 --- a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/openshiftmanagedclusters.go +++ b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/operations.go b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/operations.go index bd04fc7fe809..2ebe5258b662 100644 --- a/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/operations.go +++ b/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/client.go b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/client.go +++ b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/containerserviceapi/interfaces.go b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/containerserviceapi/interfaces.go index b86c7f46f866..df6b34b2ff7d 100644 --- a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/containerserviceapi/interfaces.go +++ b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,7 +65,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) diff --git a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/containerservices.go b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/containerservices.go index c3e6fa6ad1ed..6e289aca8a16 100644 --- a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/containerservices.go +++ b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/managedclusters.go b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/managedclusters.go index de04ca199b84..8626541f7cc9 100644 --- a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/managedclusters.go +++ b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/openshiftmanagedclusters.go b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/openshiftmanagedclusters.go index 180281349e42..2f407c484f79 100644 --- a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/openshiftmanagedclusters.go +++ b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/operations.go b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/operations.go index 1a6474e5b014..80650bc42f34 100644 --- a/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/operations.go +++ b/services/preview/containerservice/mgmt/2018-09-30-preview/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/agentpools.go b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/agentpools.go index 669d3c9b0412..328ad71e731a 100644 --- a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/agentpools.go +++ b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/agentpools.go @@ -36,7 +36,8 @@ func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client. +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/client.go b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/client.go index 09a36def717c..858e168f208f 100644 --- a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/client.go +++ b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/containerserviceapi/interfaces.go b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/containerserviceapi/interfaces.go index 48d8fcad7f57..63a055862cb4 100644 --- a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/containerserviceapi/interfaces.go +++ b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/containerserviceapi/interfaces.go @@ -28,7 +28,9 @@ type OpenShiftManagedClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.OpenShiftManagedCluster, err error) List(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.OpenShiftManagedClusterListResultIterator, err error) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.TagsObject) (result containerservice.OpenShiftManagedClustersUpdateTagsFuture, err error) } @@ -40,7 +42,9 @@ type ContainerServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerServicesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result containerservice.ContainerService, err error) List(ctx context.Context) (result containerservice.ListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ListResultIterator, err error) ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error) } @@ -61,7 +65,9 @@ type ManagedClustersClientAPI interface { GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result containerservice.ManagedClusterAccessProfile, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.ManagedClusterUpgradeProfile, err error) List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) + ListComplete(ctx context.Context) (result containerservice.ManagedClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultIterator, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) @@ -80,6 +86,7 @@ type AgentPoolsClientAPI interface { GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolAvailableVersions, err error) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result containerservice.AgentPoolUpgradeProfile, err error) List(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.AgentPoolListResultIterator, err error) } var _ AgentPoolsClientAPI = (*containerservice.AgentPoolsClient)(nil) diff --git a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/containerservices.go b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/containerservices.go index 1bd2a37eec45..4e598cbfe88a 100644 --- a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/containerservices.go +++ b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/managedclusters.go b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/managedclusters.go index 9702c6cbdc45..b8920cc4dbad 100644 --- a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/managedclusters.go +++ b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/managedclusters.go @@ -36,7 +36,8 @@ func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client. +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/openshiftmanagedclusters.go b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/openshiftmanagedclusters.go index 4208abf82afd..cdd3badac4b6 100644 --- a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/openshiftmanagedclusters.go +++ b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/openshiftmanagedclusters.go @@ -36,7 +36,9 @@ func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedCl return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client. +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/operations.go b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/operations.go index a61a628971f6..c3c696b7eb82 100644 --- a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/operations.go +++ b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/cassandraresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/cassandraresources.go index 34d85d065d0e..a3849e09e6b5 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/cassandraresources.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/cassandraresources.go @@ -36,7 +36,9 @@ func NewCassandraResourcesClient(subscriptionID string, subscriptionID1 string) return NewCassandraResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewCassandraResourcesClientWithBaseURI creates an instance of the CassandraResourcesClient client. +// NewCassandraResourcesClientWithBaseURI creates an instance of the CassandraResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCassandraResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CassandraResourcesClient { return CassandraResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/client.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/client.go index 4ec4afc0d7fa..81a12f33ea0d 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/client.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, subscriptionID1 string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, subscriptionID1 string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collection.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collection.go index b9110335888d..a2f158bffee3 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collection.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collection.go @@ -36,7 +36,8 @@ func NewCollectionClient(subscriptionID string, subscriptionID1 string) Collecti return NewCollectionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewCollectionClientWithBaseURI creates an instance of the CollectionClient client. +// NewCollectionClientWithBaseURI creates an instance of the CollectionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionClient { return CollectionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartition.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartition.go index b1b4fa6694be..2f7658d33708 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartition.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartition.go @@ -36,7 +36,9 @@ func NewCollectionPartitionClient(subscriptionID string, subscriptionID1 string) return NewCollectionPartitionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewCollectionPartitionClientWithBaseURI creates an instance of the CollectionPartitionClient client. +// NewCollectionPartitionClientWithBaseURI creates an instance of the CollectionPartitionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionClient { return CollectionPartitionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartitionregion.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartitionregion.go index 2201606d5e42..8d3c0861f2c4 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartitionregion.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionpartitionregion.go @@ -36,7 +36,9 @@ func NewCollectionPartitionRegionClient(subscriptionID string, subscriptionID1 s return NewCollectionPartitionRegionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewCollectionPartitionRegionClientWithBaseURI creates an instance of the CollectionPartitionRegionClient client. +// NewCollectionPartitionRegionClientWithBaseURI creates an instance of the CollectionPartitionRegionClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionPartitionRegionClient { return CollectionPartitionRegionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionregion.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionregion.go index b49a0ec2223d..c2dce746e01a 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionregion.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/collectionregion.go @@ -36,7 +36,9 @@ func NewCollectionRegionClient(subscriptionID string, subscriptionID1 string) Co return NewCollectionRegionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewCollectionRegionClientWithBaseURI creates an instance of the CollectionRegionClient client. +// NewCollectionRegionClientWithBaseURI creates an instance of the CollectionRegionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) CollectionRegionClient { return CollectionRegionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/database.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/database.go index dbb88abcf0db..1cdff50338c3 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/database.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/database.go @@ -36,7 +36,8 @@ func NewDatabaseClient(subscriptionID string, subscriptionID1 string) DatabaseCl return NewDatabaseClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewDatabaseClientWithBaseURI creates an instance of the DatabaseClient client. +// NewDatabaseClientWithBaseURI creates an instance of the DatabaseClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseClient { return DatabaseClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccountregion.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccountregion.go index 0aa629aaa019..3cf9e2fd7a99 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccountregion.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccountregion.go @@ -36,7 +36,9 @@ func NewDatabaseAccountRegionClient(subscriptionID string, subscriptionID1 strin return NewDatabaseAccountRegionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewDatabaseAccountRegionClientWithBaseURI creates an instance of the DatabaseAccountRegionClient client. +// NewDatabaseAccountRegionClientWithBaseURI creates an instance of the DatabaseAccountRegionClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountRegionClient { return DatabaseAccountRegionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go index 2c8d7b153ac0..b48e1422bab5 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go @@ -36,7 +36,9 @@ func NewDatabaseAccountsClient(subscriptionID string, subscriptionID1 string) Da return NewDatabaseAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client. +// NewDatabaseAccountsClientWithBaseURI creates an instance of the DatabaseAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) DatabaseAccountsClient { return DatabaseAccountsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go index b51f2fa91d3c..a1540a237691 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/documentdbapi/interfaces.go @@ -50,6 +50,7 @@ var _ DatabaseAccountsClientAPI = (*documentdb.DatabaseAccountsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result documentdb.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result documentdb.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*documentdb.OperationsClient)(nil) diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go index 58fa12241603..5ea3fbbc5157 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go @@ -36,7 +36,9 @@ func NewGremlinResourcesClient(subscriptionID string, subscriptionID1 string) Gr return NewGremlinResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewGremlinResourcesClientWithBaseURI creates an instance of the GremlinResourcesClient client. +// NewGremlinResourcesClientWithBaseURI creates an instance of the GremlinResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGremlinResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) GremlinResourcesClient { return GremlinResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/mongodbresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/mongodbresources.go index 285ad9277bd8..d66d0ea4c70d 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/mongodbresources.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/mongodbresources.go @@ -36,7 +36,9 @@ func NewMongoDBResourcesClient(subscriptionID string, subscriptionID1 string) Mo return NewMongoDBResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewMongoDBResourcesClientWithBaseURI creates an instance of the MongoDBResourcesClient client. +// NewMongoDBResourcesClientWithBaseURI creates an instance of the MongoDBResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMongoDBResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) MongoDBResourcesClient { return MongoDBResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/operations.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/operations.go index 3bc8f43221f8..1706318a1020 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/operations.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, subscriptionID1 string) Operatio return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, subscriptionID1 string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeid.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeid.go index 2c8b5f4cad6b..c08865997fb1 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeid.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeid.go @@ -36,7 +36,9 @@ func NewPartitionKeyRangeIDClient(subscriptionID string, subscriptionID1 string) return NewPartitionKeyRangeIDClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewPartitionKeyRangeIDClientWithBaseURI creates an instance of the PartitionKeyRangeIDClient client. +// NewPartitionKeyRangeIDClientWithBaseURI creates an instance of the PartitionKeyRangeIDClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDClient { return PartitionKeyRangeIDClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeidregion.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeidregion.go index 0534f9cf65b2..e85a2ead4e66 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeidregion.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/partitionkeyrangeidregion.go @@ -36,7 +36,9 @@ func NewPartitionKeyRangeIDRegionClient(subscriptionID string, subscriptionID1 s return NewPartitionKeyRangeIDRegionClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewPartitionKeyRangeIDRegionClientWithBaseURI creates an instance of the PartitionKeyRangeIDRegionClient client. +// NewPartitionKeyRangeIDRegionClientWithBaseURI creates an instance of the PartitionKeyRangeIDRegionClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PartitionKeyRangeIDRegionClient { return PartitionKeyRangeIDRegionClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentile.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentile.go index 9efb6d639359..ba7703072872 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentile.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentile.go @@ -36,7 +36,8 @@ func NewPercentileClient(subscriptionID string, subscriptionID1 string) Percenti return NewPercentileClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewPercentileClientWithBaseURI creates an instance of the PercentileClient client. +// NewPercentileClientWithBaseURI creates an instance of the PercentileClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileClient { return PercentileClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentilesourcetarget.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentilesourcetarget.go index 88474d51e4b6..04873f10dda0 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentilesourcetarget.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentilesourcetarget.go @@ -36,7 +36,9 @@ func NewPercentileSourceTargetClient(subscriptionID string, subscriptionID1 stri return NewPercentileSourceTargetClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewPercentileSourceTargetClientWithBaseURI creates an instance of the PercentileSourceTargetClient client. +// NewPercentileSourceTargetClientWithBaseURI creates an instance of the PercentileSourceTargetClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileSourceTargetClient { return PercentileSourceTargetClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentiletarget.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentiletarget.go index 4e8ebc595c22..16b94341ae76 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentiletarget.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/percentiletarget.go @@ -36,7 +36,9 @@ func NewPercentileTargetClient(subscriptionID string, subscriptionID1 string) Pe return NewPercentileTargetClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewPercentileTargetClientWithBaseURI creates an instance of the PercentileTargetClient client. +// NewPercentileTargetClientWithBaseURI creates an instance of the PercentileTargetClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) PercentileTargetClient { return PercentileTargetClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privateendpointconnections.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privateendpointconnections.go index 56d231a17208..cd07529ec10e 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privateendpointconnections.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privateendpointconnections.go @@ -36,7 +36,9 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, subscriptionID1 return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client. +// 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, subscriptionID1 string) PrivateEndpointConnectionsClient { return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privatelinkresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privatelinkresources.go index 2126e74d070f..fea8f87d8af6 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privatelinkresources.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/privatelinkresources.go @@ -36,7 +36,9 @@ func NewPrivateLinkResourcesClient(subscriptionID string, subscriptionID1 string return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client. +// 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, subscriptionID1 string) PrivateLinkResourcesClient { return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go index 6985bcb6bc85..d81260d53094 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go @@ -36,7 +36,8 @@ func NewSQLResourcesClient(subscriptionID string, subscriptionID1 string) SQLRes return NewSQLResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewSQLResourcesClientWithBaseURI creates an instance of the SQLResourcesClient client. +// NewSQLResourcesClientWithBaseURI creates an instance of the SQLResourcesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSQLResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) SQLResourcesClient { return SQLResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } @@ -1930,7 +1931,7 @@ func (client SQLResourcesClient) ListSQLStoredProceduresPreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2023,7 +2024,7 @@ func (client SQLResourcesClient) ListSQLTriggersPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -2116,7 +2117,7 @@ func (client SQLResourcesClient) ListSQLUserDefinedFunctionsPreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/tableresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/tableresources.go index c798f9685310..b1af992ddb44 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/tableresources.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/tableresources.go @@ -36,7 +36,8 @@ func NewTableResourcesClient(subscriptionID string, subscriptionID1 string) Tabl return NewTableResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID, subscriptionID1) } -// NewTableResourcesClientWithBaseURI creates an instance of the TableResourcesClient client. +// NewTableResourcesClientWithBaseURI creates an instance of the TableResourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) TableResourcesClient { return TableResourcesClient{NewWithBaseURI(baseURI, subscriptionID, subscriptionID1)} } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/alerts.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/alerts.go index bb446b5aba46..8ac9fa63fe7d 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/alerts.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/alerts.go @@ -36,7 +36,8 @@ func NewAlertsClient(subscriptionID string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/billingaccountdimensions.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/billingaccountdimensions.go index ee70dd07786d..4aaea9fb31eb 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/billingaccountdimensions.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/billingaccountdimensions.go @@ -36,7 +36,9 @@ func NewBillingAccountDimensionsClient(subscriptionID string) BillingAccountDime return NewBillingAccountDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBillingAccountDimensionsClientWithBaseURI creates an instance of the BillingAccountDimensionsClient client. +// NewBillingAccountDimensionsClientWithBaseURI creates an instance of the BillingAccountDimensionsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewBillingAccountDimensionsClientWithBaseURI(baseURI string, subscriptionID string) BillingAccountDimensionsClient { return BillingAccountDimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/client.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/client.go index 299191e2b452..e6cafb34b4e7 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/client.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/connector.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/connector.go index 4eb232b5bd5e..153c50050417 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/connector.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/connector.go @@ -35,7 +35,8 @@ func NewConnectorClient(subscriptionID string) ConnectorClient { return NewConnectorClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectorClientWithBaseURI creates an instance of the ConnectorClient client. +// NewConnectorClientWithBaseURI creates an instance of the ConnectorClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectorClientWithBaseURI(baseURI string, subscriptionID string) ConnectorClient { return ConnectorClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/costmanagementapi/interfaces.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/costmanagementapi/interfaces.go index a45c009c6ade..3737dbb5519c 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/costmanagementapi/interfaces.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/costmanagementapi/interfaces.go @@ -104,11 +104,17 @@ type AlertsClientAPI interface { GetByResourceGroupName(ctx context.Context, resourceGroupName string, alertID string) (result costmanagement.Alert, err error) GetBySubscription(ctx context.Context, alertID string) (result costmanagement.Alert, err error) List(ctx context.Context, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultPage, err error) + ListComplete(ctx context.Context, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultIterator, err error) ListByAccount(ctx context.Context, billingAccountID string, enrollmentAccountID string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultPage, err error) + ListByAccountComplete(ctx context.Context, billingAccountID string, enrollmentAccountID string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultIterator, err error) ListByDepartment(ctx context.Context, billingAccountID string, departmentID string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultPage, err error) + ListByDepartmentComplete(ctx context.Context, billingAccountID string, departmentID string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultIterator, err error) ListByEnrollment(ctx context.Context, billingAccountID string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultPage, err error) + ListByEnrollmentComplete(ctx context.Context, billingAccountID string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultIterator, err error) ListByManagementGroups(ctx context.Context, managementGroupID string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultPage, err error) + ListByManagementGroupsComplete(ctx context.Context, managementGroupID string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultIterator, err error) ListByResourceGroupName(ctx context.Context, resourceGroupName string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultPage, err error) + ListByResourceGroupNameComplete(ctx context.Context, resourceGroupName string, filter string, skiptoken string, top *int32) (result costmanagement.AlertListResultIterator, err error) UpdateBillingAccountAlertStatus(ctx context.Context, billingAccountID string, alertID string, parameters costmanagement.Alert) (result costmanagement.Alert, err error) UpdateDepartmentsAlertStatus(ctx context.Context, billingAccountID string, departmentID string, alertID string, parameters costmanagement.Alert) (result costmanagement.Alert, err error) UpdateEnrollmentAccountAlertStatus(ctx context.Context, billingAccountID string, enrollmentAccountID string, alertID string, parameters costmanagement.Alert) (result costmanagement.Alert, err error) @@ -122,6 +128,7 @@ var _ AlertsClientAPI = (*costmanagement.AlertsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result costmanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result costmanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*costmanagement.OperationsClient)(nil) diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/operations.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/operations.go index 514b189da527..23ecfdb9fd8e 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/operations.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/reports.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/reports.go index de61661487a4..c806da04f358 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/reports.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/reports.go @@ -36,7 +36,8 @@ func NewReportsClient(subscriptionID string) ReportsClient { return NewReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReportsClientWithBaseURI creates an instance of the ReportsClient client. +// NewReportsClientWithBaseURI creates an instance of the ReportsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsClient { return ReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/resourcegroupdimensions.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/resourcegroupdimensions.go index fa4b1e991772..a90d1f20ebf7 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/resourcegroupdimensions.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/resourcegroupdimensions.go @@ -36,7 +36,9 @@ func NewResourceGroupDimensionsClient(subscriptionID string) ResourceGroupDimens return NewResourceGroupDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceGroupDimensionsClientWithBaseURI creates an instance of the ResourceGroupDimensionsClient client. +// NewResourceGroupDimensionsClientWithBaseURI creates an instance of the ResourceGroupDimensionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceGroupDimensionsClientWithBaseURI(baseURI string, subscriptionID string) ResourceGroupDimensionsClient { return ResourceGroupDimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/subscriptiondimensions.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/subscriptiondimensions.go index 6d42e66c84d9..bf3c4257fc04 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/subscriptiondimensions.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/subscriptiondimensions.go @@ -36,7 +36,9 @@ func NewSubscriptionDimensionsClient(subscriptionID string) SubscriptionDimensio return NewSubscriptionDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionDimensionsClientWithBaseURI creates an instance of the SubscriptionDimensionsClient client. +// NewSubscriptionDimensionsClientWithBaseURI creates an instance of the SubscriptionDimensionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewSubscriptionDimensionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionDimensionsClient { return SubscriptionDimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/client.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/client.go index 42beb99cba09..3861c9aa64f8 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/client.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/cloudconnector.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/cloudconnector.go index b15a1cc2f5cb..865b4206141b 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/cloudconnector.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/cloudconnector.go @@ -35,7 +35,8 @@ func NewCloudConnectorClient(subscriptionID string) CloudConnectorClient { return NewCloudConnectorClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCloudConnectorClientWithBaseURI creates an instance of the CloudConnectorClient client. +// NewCloudConnectorClientWithBaseURI creates an instance of the CloudConnectorClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCloudConnectorClientWithBaseURI(baseURI string, subscriptionID string) CloudConnectorClient { return CloudConnectorClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/costmanagementapi/interfaces.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/costmanagementapi/interfaces.go index a2c5ca8efb0f..76abb2f64835 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/costmanagementapi/interfaces.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/costmanagementapi/interfaces.go @@ -108,6 +108,7 @@ var _ ShowbackRuleClientAPI = (*costmanagement.ShowbackRuleClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result costmanagement.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result costmanagement.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*costmanagement.OperationsClient)(nil) diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/dimensions.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/dimensions.go index 72981a13db33..9fe58ea503d7 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/dimensions.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/dimensions.go @@ -36,7 +36,8 @@ func NewDimensionsClient(subscriptionID string) DimensionsClient { return NewDimensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client. +// NewDimensionsClientWithBaseURI creates an instance of the DimensionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDimensionsClientWithBaseURI(baseURI string, subscriptionID string) DimensionsClient { return DimensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/externalbillingaccount.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/externalbillingaccount.go index e536236ae8b2..41f21ec60c04 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/externalbillingaccount.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/externalbillingaccount.go @@ -35,7 +35,9 @@ func NewExternalBillingAccountClient(subscriptionID string) ExternalBillingAccou return NewExternalBillingAccountClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExternalBillingAccountClientWithBaseURI creates an instance of the ExternalBillingAccountClient client. +// NewExternalBillingAccountClientWithBaseURI creates an instance of the ExternalBillingAccountClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewExternalBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) ExternalBillingAccountClient { return ExternalBillingAccountClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/externalsubscription.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/externalsubscription.go index 615f76360d99..617cf7b0e09d 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/externalsubscription.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/externalsubscription.go @@ -35,7 +35,9 @@ func NewExternalSubscriptionClient(subscriptionID string) ExternalSubscriptionCl return NewExternalSubscriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExternalSubscriptionClientWithBaseURI creates an instance of the ExternalSubscriptionClient client. +// NewExternalSubscriptionClientWithBaseURI creates an instance of the ExternalSubscriptionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewExternalSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) ExternalSubscriptionClient { return ExternalSubscriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/forecast.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/forecast.go index b269e157f62e..140f07bbfcff 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/forecast.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/forecast.go @@ -36,7 +36,8 @@ func NewForecastClient(subscriptionID string) ForecastClient { return NewForecastClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewForecastClientWithBaseURI creates an instance of the ForecastClient client. +// NewForecastClientWithBaseURI creates an instance of the ForecastClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewForecastClientWithBaseURI(baseURI string, subscriptionID string) ForecastClient { return ForecastClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/operations.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/operations.go index 802618a5d097..4fb61c6726dc 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/operations.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/query.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/query.go index 452f1aaeb1ef..4d9afda4268c 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/query.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/query.go @@ -36,7 +36,8 @@ func NewQueryClient(subscriptionID string) QueryClient { return NewQueryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueryClientWithBaseURI creates an instance of the QueryClient client. +// NewQueryClientWithBaseURI creates an instance of the QueryClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryClientWithBaseURI(baseURI string, subscriptionID string) QueryClient { return QueryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/showbackrule.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/showbackrule.go index ee618d623ede..5b119664c3e5 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/showbackrule.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/showbackrule.go @@ -35,7 +35,8 @@ func NewShowbackRuleClient(subscriptionID string) ShowbackRuleClient { return NewShowbackRuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewShowbackRuleClientWithBaseURI creates an instance of the ShowbackRuleClient client. +// NewShowbackRuleClientWithBaseURI creates an instance of the ShowbackRuleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewShowbackRuleClientWithBaseURI(baseURI string, subscriptionID string) ShowbackRuleClient { return ShowbackRuleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/showbackrules.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/showbackrules.go index 5664cf394c75..5d169339029e 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/showbackrules.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/showbackrules.go @@ -35,7 +35,8 @@ func NewShowbackRulesClient(subscriptionID string) ShowbackRulesClient { return NewShowbackRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewShowbackRulesClientWithBaseURI creates an instance of the ShowbackRulesClient client. +// NewShowbackRulesClientWithBaseURI creates an instance of the ShowbackRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewShowbackRulesClientWithBaseURI(baseURI string, subscriptionID string) ShowbackRulesClient { return ShowbackRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/client.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/client.go index bbdbc5aa19d6..19c49175df86 100644 --- a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/client.go +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi/interfaces.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi/interfaces.go index f7014864856b..57141eec651c 100644 --- a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi/interfaces.go +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context, APIVersion string) (result customerlockbox.OperationListResultPage, err error) + ListComplete(ctx context.Context, APIVersion string) (result customerlockbox.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*customerlockbox.OperationsClient)(nil) @@ -33,6 +34,7 @@ var _ OperationsClientAPI = (*customerlockbox.OperationsClient)(nil) type RequestsClientAPI interface { Get(ctx context.Context, requestID string, subscriptionID string, APIVersion string) (result customerlockbox.LockboxRequestResponse, err error) List(ctx context.Context, subscriptionID string, filter string) (result customerlockbox.RequestListResultPage, err error) + ListComplete(ctx context.Context, subscriptionID string, filter string) (result customerlockbox.RequestListResultIterator, err error) UpdateStatus(ctx context.Context, approval customerlockbox.Approval, subscriptionID string, requestID string, APIVersion string) (result customerlockbox.Approval, err error) } diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/operations.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/operations.go index 2e7b18a51aa9..02b3c6c08e98 100644 --- a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/operations.go +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/requests.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/requests.go index 4c572c25fbbb..83c2b5b1bc71 100644 --- a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/requests.go +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/requests.go @@ -35,7 +35,8 @@ func NewRequestsClient() RequestsClient { return NewRequestsClientWithBaseURI(DefaultBaseURI) } -// NewRequestsClientWithBaseURI creates an instance of the RequestsClient client. +// NewRequestsClientWithBaseURI creates an instance of the RequestsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRequestsClientWithBaseURI(baseURI string) RequestsClient { return RequestsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/associations.go b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/associations.go index 06b435af1e8c..0556669a6e75 100644 --- a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/associations.go +++ b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/associations.go @@ -35,7 +35,8 @@ func NewAssociationsClient(subscriptionID string) AssociationsClient { return NewAssociationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssociationsClientWithBaseURI creates an instance of the AssociationsClient client. +// NewAssociationsClientWithBaseURI creates an instance of the AssociationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAssociationsClientWithBaseURI(baseURI string, subscriptionID string) AssociationsClient { return AssociationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/client.go b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/client.go index f4b2f603ed9c..777132e13257 100644 --- a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/client.go +++ b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/customprovidersapi/interfaces.go b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/customprovidersapi/interfaces.go index 8a08d10565c9..8c75fa12e7db 100644 --- a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/customprovidersapi/interfaces.go +++ b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/customprovidersapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result customproviders.ResourceProviderOperationListPage, err error) + ListComplete(ctx context.Context) (result customproviders.ResourceProviderOperationListIterator, err error) } var _ OperationsClientAPI = (*customproviders.OperationsClient)(nil) @@ -35,7 +36,9 @@ type CustomResourceProviderClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceProviderName string) (result customproviders.CustomResourceProviderDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceProviderName string) (result customproviders.CustomRPManifest, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result customproviders.ListByCustomRPManifestPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result customproviders.ListByCustomRPManifestIterator, err error) ListBySubscription(ctx context.Context) (result customproviders.ListByCustomRPManifestPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result customproviders.ListByCustomRPManifestIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderName string, patchableResource customproviders.ResourceProvidersUpdate) (result customproviders.CustomRPManifest, err error) } @@ -47,6 +50,7 @@ type AssociationsClientAPI interface { Delete(ctx context.Context, scope string, associationName string) (result customproviders.AssociationsDeleteFuture, err error) Get(ctx context.Context, scope string, associationName string) (result customproviders.Association, err error) ListAll(ctx context.Context, scope string) (result customproviders.AssociationsListPage, err error) + ListAllComplete(ctx context.Context, scope string) (result customproviders.AssociationsListIterator, err error) } var _ AssociationsClientAPI = (*customproviders.AssociationsClient)(nil) diff --git a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/customresourceprovider.go b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/customresourceprovider.go index 49220046639a..a340ba53b6fc 100644 --- a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/customresourceprovider.go +++ b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/customresourceprovider.go @@ -36,7 +36,9 @@ func NewCustomResourceProviderClient(subscriptionID string) CustomResourceProvid return NewCustomResourceProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomResourceProviderClientWithBaseURI creates an instance of the CustomResourceProviderClient client. +// NewCustomResourceProviderClientWithBaseURI creates an instance of the CustomResourceProviderClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCustomResourceProviderClientWithBaseURI(baseURI string, subscriptionID string) CustomResourceProviderClient { return CustomResourceProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/operations.go b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/operations.go index fab74969923b..6f75ca706b9e 100644 --- a/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/operations.go +++ b/services/preview/customproviders/mgmt/2018-09-01-preview/customproviders/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go index 718dfd3b89aa..985f28ca904c 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go @@ -38,7 +38,8 @@ func NewActivityRunsClient(subscriptionID string) ActivityRunsClient { return NewActivityRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityRunsClientWithBaseURI creates an instance of the ActivityRunsClient client. +// NewActivityRunsClientWithBaseURI creates an instance of the ActivityRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityRunsClientWithBaseURI(baseURI string, subscriptionID string) ActivityRunsClient { return ActivityRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/client.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/client.go index ed83664c30c1..25f920c79ccd 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/client.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/datafactoryapi/interfaces.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/datafactoryapi/interfaces.go index 54b33cf104eb..9e56badec4ba 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/datafactoryapi/interfaces.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/datafactoryapi/interfaces.go @@ -39,7 +39,9 @@ type FactoriesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.Factory, err error) List(ctx context.Context) (result datafactory.FactoryListResponsePage, err error) + ListComplete(ctx context.Context) (result datafactory.FactoryListResponseIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result datafactory.FactoryListResponsePage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result datafactory.FactoryListResponseIterator, err error) Update(ctx context.Context, resourceGroupName string, factoryName string, factoryUpdateParameters datafactory.FactoryUpdateParameters) (result datafactory.Factory, err error) } @@ -55,6 +57,7 @@ type IntegrationRuntimesClientAPI interface { GetStatus(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result datafactory.IntegrationRuntimeStatusResponse, err error) ListAuthKeys(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result datafactory.IntegrationRuntimeAuthKeys, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.IntegrationRuntimeListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.IntegrationRuntimeListResponseIterator, err error) RegenerateAuthKey(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, regenerateKeyParameters datafactory.IntegrationRuntimeRegenerateKeyParameters) (result datafactory.IntegrationRuntimeAuthKeys, err error) RemoveNode(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string, removeNodeParameters datafactory.IntegrationRuntimeRemoveNodeRequest) (result autorest.Response, err error) Start(ctx context.Context, resourceGroupName string, factoryName string, integrationRuntimeName string) (result datafactory.IntegrationRuntimesStartFuture, err error) @@ -81,6 +84,7 @@ type LinkedServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string, linkedServiceName string) (result datafactory.LinkedServiceResource, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.LinkedServiceListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.LinkedServiceListResponseIterator, err error) } var _ LinkedServicesClientAPI = (*datafactory.LinkedServicesClient)(nil) @@ -91,6 +95,7 @@ type DatasetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, datasetName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string, datasetName string) (result datafactory.DatasetResource, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.DatasetListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.DatasetListResponseIterator, err error) } var _ DatasetsClientAPI = (*datafactory.DatasetsClient)(nil) @@ -102,6 +107,7 @@ type PipelinesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string, pipelineName string) (result datafactory.PipelineResource, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.PipelineListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.PipelineListResponseIterator, err error) } var _ PipelinesClientAPI = (*datafactory.PipelinesClient)(nil) @@ -117,6 +123,7 @@ var _ PipelineRunsClientAPI = (*datafactory.PipelineRunsClient)(nil) // ActivityRunsClientAPI contains the set of methods on the ActivityRunsClient type. type ActivityRunsClientAPI interface { ListByPipelineRun(ctx context.Context, resourceGroupName string, factoryName string, runID string, startTime date.Time, endTime date.Time, status string, activityName string, linkedServiceName string) (result datafactory.ActivityRunsListResponsePage, err error) + ListByPipelineRunComplete(ctx context.Context, resourceGroupName string, factoryName string, runID string, startTime date.Time, endTime date.Time, status string, activityName string, linkedServiceName string) (result datafactory.ActivityRunsListResponseIterator, err error) } var _ ActivityRunsClientAPI = (*datafactory.ActivityRunsClient)(nil) @@ -127,7 +134,9 @@ type TriggersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.TriggerResource, err error) ListByFactory(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.TriggerListResponsePage, err error) + ListByFactoryComplete(ctx context.Context, resourceGroupName string, factoryName string) (result datafactory.TriggerListResponseIterator, err error) ListRuns(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, startTime date.Time, endTime date.Time) (result datafactory.TriggerRunListResponsePage, err error) + ListRunsComplete(ctx context.Context, resourceGroupName string, factoryName string, triggerName string, startTime date.Time, endTime date.Time) (result datafactory.TriggerRunListResponseIterator, err error) Start(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.TriggersStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, factoryName string, triggerName string) (result datafactory.TriggersStopFuture, err error) } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/datasets.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/datasets.go index cec2fd22bd74..09ebe1713bde 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/datasets.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/datasets.go @@ -37,7 +37,8 @@ func NewDatasetsClient(subscriptionID string) DatasetsClient { return NewDatasetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatasetsClientWithBaseURI creates an instance of the DatasetsClient client. +// NewDatasetsClientWithBaseURI creates an instance of the DatasetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatasetsClientWithBaseURI(baseURI string, subscriptionID string) DatasetsClient { return DatasetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go index 8f58269adfb4..8ad1d3afbcb7 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/factories.go @@ -37,7 +37,8 @@ func NewFactoriesClient(subscriptionID string) FactoriesClient { return NewFactoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFactoriesClientWithBaseURI creates an instance of the FactoriesClient client. +// NewFactoriesClientWithBaseURI creates an instance of the FactoriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFactoriesClientWithBaseURI(baseURI string, subscriptionID string) FactoriesClient { return FactoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimenodes.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimenodes.go index 1aa49a991f7c..44817b73f423 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimenodes.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimenodes.go @@ -37,7 +37,9 @@ func NewIntegrationRuntimeNodesClient(subscriptionID string) IntegrationRuntimeN return NewIntegrationRuntimeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationRuntimeNodesClientWithBaseURI creates an instance of the IntegrationRuntimeNodesClient client. +// 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)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go index 4ca1d27c3550..b5a4994909a0 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/integrationruntimes.go @@ -37,7 +37,9 @@ func NewIntegrationRuntimesClient(subscriptionID string) IntegrationRuntimesClie return NewIntegrationRuntimesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationRuntimesClientWithBaseURI creates an instance of the IntegrationRuntimesClient client. +// 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)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/linkedservices.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/linkedservices.go index 586d2f867c5b..827790aa63b8 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/linkedservices.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/linkedservices.go @@ -37,7 +37,8 @@ func NewLinkedServicesClient(subscriptionID string) LinkedServicesClient { return NewLinkedServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedServicesClientWithBaseURI creates an instance of the LinkedServicesClient client. +// NewLinkedServicesClientWithBaseURI creates an instance of the LinkedServicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedServicesClientWithBaseURI(baseURI string, subscriptionID string) LinkedServicesClient { return LinkedServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/operations.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/operations.go index e7a7da5e553c..75aa13387b63 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/operations.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelineruns.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelineruns.go index 432390d33770..98a5219ae4eb 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelineruns.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelineruns.go @@ -37,7 +37,8 @@ func NewPipelineRunsClient(subscriptionID string) PipelineRunsClient { return NewPipelineRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPipelineRunsClientWithBaseURI creates an instance of the PipelineRunsClient client. +// NewPipelineRunsClientWithBaseURI creates an instance of the PipelineRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPipelineRunsClientWithBaseURI(baseURI string, subscriptionID string) PipelineRunsClient { return PipelineRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go index 3514f0f74aaf..fffa7f507f1c 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go @@ -37,7 +37,8 @@ func NewPipelinesClient(subscriptionID string) PipelinesClient { return NewPipelinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPipelinesClientWithBaseURI creates an instance of the PipelinesClient client. +// NewPipelinesClientWithBaseURI creates an instance of the PipelinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPipelinesClientWithBaseURI(baseURI string, subscriptionID string) PipelinesClient { return PipelinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go index fd742501271d..da14bccf2912 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/triggers.go @@ -38,7 +38,8 @@ func NewTriggersClient(subscriptionID string) TriggersClient { return NewTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client. +// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) TriggersClient { return TriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datalake/analytics/2015-10-01-preview/catalog/catalogapi/interfaces.go b/services/preview/datalake/analytics/2015-10-01-preview/catalog/catalogapi/interfaces.go index 531f0c9588c3..590ede460045 100644 --- a/services/preview/datalake/analytics/2015-10-01-preview/catalog/catalogapi/interfaces.go +++ b/services/preview/datalake/analytics/2015-10-01-preview/catalog/catalogapi/interfaces.go @@ -42,18 +42,31 @@ type ClientAPI interface { GetTableValuedFunction(ctx context.Context, accountName string, databaseName string, schemaName string, tableValuedFunctionName string) (result catalog.USQLTableValuedFunction, err error) GetView(ctx context.Context, accountName string, databaseName string, schemaName string, viewName string) (result catalog.USQLView, err error) ListAssemblies(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLAssemblyListPage, err error) + ListAssembliesComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLAssemblyListIterator, err error) ListCredentials(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLCredentialListPage, err error) + ListCredentialsComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLCredentialListIterator, err error) ListDatabases(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLDatabaseListPage, err error) + ListDatabasesComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLDatabaseListIterator, err error) ListExternalDataSources(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLExternalDataSourceListPage, err error) + ListExternalDataSourcesComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLExternalDataSourceListIterator, err error) ListProcedures(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLProcedureListPage, err error) + ListProceduresComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLProcedureListIterator, err error) ListSchemas(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLSchemaListPage, err error) + ListSchemasComplete(ctx context.Context, accountName string, databaseName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLSchemaListIterator, err error) ListTablePartitions(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTablePartitionListPage, err error) + ListTablePartitionsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTablePartitionListIterator, err error) ListTables(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTableListPage, err error) + ListTablesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTableListIterator, err error) ListTableStatistics(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTableStatisticsListPage, err error) + ListTableStatisticsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, tableName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTableStatisticsListIterator, err error) ListTableTypes(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTableTypeListPage, err error) + ListTableTypesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTableTypeListIterator, err error) ListTableValuedFunctions(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTableValuedFunctionListPage, err error) + ListTableValuedFunctionsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTableValuedFunctionListIterator, err error) ListTypes(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTypeListPage, err error) + ListTypesComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLTypeListIterator, err error) ListViews(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLViewListPage, err error) + ListViewsComplete(ctx context.Context, accountName string, databaseName string, schemaName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool) (result catalog.USQLViewListIterator, err error) UpdateSecret(ctx context.Context, accountName string, databaseName string, secretName string, parameters catalog.DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters) (result catalog.USQLSecret, err error) } diff --git a/services/preview/datalake/analytics/2015-11-01-preview/job/jobapi/interfaces.go b/services/preview/datalake/analytics/2015-11-01-preview/job/jobapi/interfaces.go index 91ba4a51c835..d3d8b784c5a0 100644 --- a/services/preview/datalake/analytics/2015-11-01-preview/job/jobapi/interfaces.go +++ b/services/preview/datalake/analytics/2015-11-01-preview/job/jobapi/interfaces.go @@ -33,6 +33,7 @@ type ClientAPI interface { GetDebugDataPath(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.DataPath, err error) GetStatistics(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.Statistics, err error) List(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result job.InfoListResultPage, err error) + ListComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result job.InfoListResultIterator, err error) } var _ ClientAPI = (*job.Client)(nil) diff --git a/services/preview/datalake/analytics/2016-03-20-preview/job/jobapi/interfaces.go b/services/preview/datalake/analytics/2016-03-20-preview/job/jobapi/interfaces.go index b518e9137e3e..08f353d4292d 100644 --- a/services/preview/datalake/analytics/2016-03-20-preview/job/jobapi/interfaces.go +++ b/services/preview/datalake/analytics/2016-03-20-preview/job/jobapi/interfaces.go @@ -33,6 +33,7 @@ type ClientAPI interface { GetDebugDataPath(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.DataPath, err error) GetStatistics(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.Statistics, err error) List(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result job.InfoListResultPage, err error) + ListComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result job.InfoListResultIterator, err error) } var _ ClientAPI = (*job.Client)(nil) diff --git a/services/preview/datalake/analytics/2017-09-01-preview/job/jobapi/interfaces.go b/services/preview/datalake/analytics/2017-09-01-preview/job/jobapi/interfaces.go index 92cf1b90ed4c..18848910982b 100644 --- a/services/preview/datalake/analytics/2017-09-01-preview/job/jobapi/interfaces.go +++ b/services/preview/datalake/analytics/2017-09-01-preview/job/jobapi/interfaces.go @@ -33,6 +33,7 @@ type ClientAPI interface { GetDebugDataPath(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.DataPath, err error) GetStatistics(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.Statistics, err error) List(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result job.InfoListResultPage, err error) + ListComplete(ctx context.Context, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result job.InfoListResultIterator, err error) Update(ctx context.Context, accountName string, jobIdentity uuid.UUID, parameters *job.UpdateJobParameters) (result job.UpdateFuture, err error) Yield(ctx context.Context, accountName string, jobIdentity uuid.UUID) (result job.YieldFuture, err error) } @@ -43,6 +44,7 @@ var _ ClientAPI = (*job.Client)(nil) type PipelineClientAPI interface { Get(ctx context.Context, accountName string, pipelineIdentity uuid.UUID, startDateTime *date.Time, endDateTime *date.Time) (result job.PipelineInformation, err error) List(ctx context.Context, accountName string, startDateTime *date.Time, endDateTime *date.Time) (result job.PipelineInformationListResultPage, err error) + ListComplete(ctx context.Context, accountName string, startDateTime *date.Time, endDateTime *date.Time) (result job.PipelineInformationListResultIterator, err error) } var _ PipelineClientAPI = (*job.PipelineClient)(nil) @@ -51,6 +53,7 @@ var _ PipelineClientAPI = (*job.PipelineClient)(nil) type RecurrenceClientAPI interface { Get(ctx context.Context, accountName string, recurrenceIdentity uuid.UUID, startDateTime *date.Time, endDateTime *date.Time) (result job.RecurrenceInformation, err error) List(ctx context.Context, accountName string, startDateTime *date.Time, endDateTime *date.Time) (result job.RecurrenceInformationListResultPage, err error) + ListComplete(ctx context.Context, accountName string, startDateTime *date.Time, endDateTime *date.Time) (result job.RecurrenceInformationListResultIterator, err error) } var _ RecurrenceClientAPI = (*job.RecurrenceClient)(nil) diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go index c79ab2b728d7..ed91348ab40e 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/account.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accountapi/interfaces.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accountapi/interfaces.go index 6ca4073bf3d3..67793ce330a7 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accountapi/interfaces.go +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/accountapi/interfaces.go @@ -36,11 +36,17 @@ type ClientAPI interface { GetStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.StorageAccountInfo, err error) GetStorageContainer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.BlobContainer, err error) List(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListResultIterator, err error) ListDataLakeStoreAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListDataLakeStoreResultPage, err error) + ListDataLakeStoreAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListDataLakeStoreResultIterator, err error) ListSasTokens(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.ListSasTokensResultPage, err error) + ListSasTokensComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result account.ListSasTokensResultIterator, err error) ListStorageAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListStorageAccountsResultPage, err error) + ListStorageAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeAnalyticsAccountListStorageAccountsResultIterator, err error) ListStorageContainers(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.ListBlobContainersResultPage, err error) + ListStorageContainersComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result account.ListBlobContainersResultIterator, err error) Update(ctx context.Context, resourceGroupName string, name string, parameters account.DataLakeAnalyticsAccount) (result account.UpdateFuture, err error) UpdateStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters account.AddStorageAccountParameters) (result autorest.Response, err error) } diff --git a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/client.go b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/client.go index 2f1ae7042095..dbb7db2c2f22 100644 --- a/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/client.go +++ b/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/datalake/store/mgmt/2015-10-01-preview/account/account.go b/services/preview/datalake/store/mgmt/2015-10-01-preview/account/account.go index 12b94533cd80..a474d562f7e9 100644 --- a/services/preview/datalake/store/mgmt/2015-10-01-preview/account/account.go +++ b/services/preview/datalake/store/mgmt/2015-10-01-preview/account/account.go @@ -35,7 +35,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/preview/datalake/store/mgmt/2015-10-01-preview/account/accountapi/interfaces.go b/services/preview/datalake/store/mgmt/2015-10-01-preview/account/accountapi/interfaces.go index 0b1414f642be..3e29e3ee6687 100644 --- a/services/preview/datalake/store/mgmt/2015-10-01-preview/account/accountapi/interfaces.go +++ b/services/preview/datalake/store/mgmt/2015-10-01-preview/account/accountapi/interfaces.go @@ -33,8 +33,11 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result account.DataLakeStoreAccount, err error) GetFirewallRule(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result account.FirewallRule, err error) List(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeStoreAccountListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeStoreAccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeStoreAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result account.DataLakeStoreAccountListResultIterator, err error) ListFirewallRules(ctx context.Context, resourceGroupName string, accountName string) (result account.DataLakeStoreFirewallRuleListResultPage, err error) + ListFirewallRulesComplete(ctx context.Context, resourceGroupName string, accountName string) (result account.DataLakeStoreFirewallRuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, name string, parameters account.DataLakeStoreAccount) (result account.UpdateFuture, err error) } diff --git a/services/preview/datalake/store/mgmt/2015-10-01-preview/account/client.go b/services/preview/datalake/store/mgmt/2015-10-01-preview/account/client.go index e772145d546e..eda85a14e46c 100644 --- a/services/preview/datalake/store/mgmt/2015-10-01-preview/account/client.go +++ b/services/preview/datalake/store/mgmt/2015-10-01-preview/account/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/client.go b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/client.go index aa24d3d6e48b..9b5d3d661f6b 100644 --- a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/client.go +++ b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/datamigrationapi/interfaces.go b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/datamigrationapi/interfaces.go index fcde60ca2ccb..322a407bccea 100644 --- a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/datamigrationapi/interfaces.go +++ b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/datamigrationapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { ListSkus(ctx context.Context) (result datamigration.ResourceSkusResultPage, err error) + ListSkusComplete(ctx context.Context) (result datamigration.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*datamigration.ResourceSkusClient)(nil) @@ -39,8 +40,11 @@ type ServicesClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, deleteRunningTasks *bool) (result datamigration.ServicesDeleteFuture, err error) Get(ctx context.Context, groupName string, serviceName string) (result datamigration.Service, err error) List(ctx context.Context) (result datamigration.ServiceListPage, err error) + ListComplete(ctx context.Context) (result datamigration.ServiceListIterator, err error) ListByResourceGroup(ctx context.Context, groupName string) (result datamigration.ServiceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, groupName string) (result datamigration.ServiceListIterator, err error) ListSkus(ctx context.Context, groupName string, serviceName string) (result datamigration.ServiceSkuListPage, err error) + ListSkusComplete(ctx context.Context, groupName string, serviceName string) (result datamigration.ServiceSkuListIterator, err error) Start(ctx context.Context, groupName string, serviceName string) (result datamigration.ServicesStartFuture, err error) Stop(ctx context.Context, groupName string, serviceName string) (result datamigration.ServicesStopFuture, err error) Update(ctx context.Context, parameters datamigration.Service, groupName string, serviceName string) (result datamigration.ServicesUpdateFuture, err error) @@ -55,6 +59,7 @@ type TasksClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, taskName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string, taskName string, expand string) (result datamigration.ProjectTask, err error) List(ctx context.Context, groupName string, serviceName string, projectName string, taskType string) (result datamigration.TaskListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string, projectName string, taskType string) (result datamigration.TaskListIterator, err error) Update(ctx context.Context, parameters datamigration.ProjectTask, groupName string, serviceName string, projectName string, taskName string) (result datamigration.ProjectTask, err error) } @@ -66,6 +71,7 @@ type ProjectsClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string) (result datamigration.Project, err error) List(ctx context.Context, groupName string, serviceName string) (result datamigration.ProjectListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string) (result datamigration.ProjectListIterator, err error) Update(ctx context.Context, parameters datamigration.Project, groupName string, serviceName string, projectName string) (result datamigration.Project, err error) } @@ -74,6 +80,7 @@ var _ ProjectsClientAPI = (*datamigration.ProjectsClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result datamigration.QuotaListPage, err error) + ListComplete(ctx context.Context, location string) (result datamigration.QuotaListIterator, err error) } var _ UsagesClientAPI = (*datamigration.UsagesClient)(nil) @@ -81,6 +88,7 @@ var _ UsagesClientAPI = (*datamigration.UsagesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result datamigration.ServiceOperationListPage, err error) + ListComplete(ctx context.Context) (result datamigration.ServiceOperationListIterator, err error) } var _ OperationsClientAPI = (*datamigration.OperationsClient)(nil) diff --git a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/operations.go b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/operations.go index 8eb5aaf1a6c4..5d8224e88955 100644 --- a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/operations.go +++ b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/projects.go b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/projects.go index 1cfccbd9e93d..a062ecf31aca 100644 --- a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/projects.go +++ b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/projects.go @@ -35,7 +35,8 @@ func NewProjectsClient(subscriptionID string) ProjectsClient { return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string) ProjectsClient { return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/resourceskus.go b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/resourceskus.go index 18c741d35b3b..a2e0f462658e 100644 --- a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/resourceskus.go +++ b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/services.go b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/services.go index 7815ce782009..f4c68bfa299b 100644 --- a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/services.go +++ b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/tasks.go b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/tasks.go index f999e9ae6dc1..c542e1b45946 100644 --- a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/tasks.go +++ b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/tasks.go @@ -35,7 +35,8 @@ func NewTasksClient(subscriptionID string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/usages.go b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/usages.go index 3d1df0539005..a08f7c285375 100644 --- a/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/usages.go +++ b/services/preview/datamigration/mgmt/2017-11-15-preview/datamigration/usages.go @@ -35,7 +35,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/client.go b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/client.go index e82d442622fc..9bd591851049 100644 --- a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/client.go +++ b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/datamigrationapi/interfaces.go b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/datamigrationapi/interfaces.go index 685dae961ea0..0b022613779e 100644 --- a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/datamigrationapi/interfaces.go +++ b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/datamigrationapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { ListSkus(ctx context.Context) (result datamigration.ResourceSkusResultPage, err error) + ListSkusComplete(ctx context.Context) (result datamigration.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*datamigration.ResourceSkusClient)(nil) @@ -39,8 +40,11 @@ type ServicesClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, deleteRunningTasks *bool) (result datamigration.ServicesDeleteFuture, err error) Get(ctx context.Context, groupName string, serviceName string) (result datamigration.Service, err error) List(ctx context.Context) (result datamigration.ServiceListPage, err error) + ListComplete(ctx context.Context) (result datamigration.ServiceListIterator, err error) ListByResourceGroup(ctx context.Context, groupName string) (result datamigration.ServiceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, groupName string) (result datamigration.ServiceListIterator, err error) ListSkus(ctx context.Context, groupName string, serviceName string) (result datamigration.ServiceSkuListPage, err error) + ListSkusComplete(ctx context.Context, groupName string, serviceName string) (result datamigration.ServiceSkuListIterator, err error) Start(ctx context.Context, groupName string, serviceName string) (result datamigration.ServicesStartFuture, err error) Stop(ctx context.Context, groupName string, serviceName string) (result datamigration.ServicesStopFuture, err error) Update(ctx context.Context, parameters datamigration.Service, groupName string, serviceName string) (result datamigration.ServicesUpdateFuture, err error) @@ -55,6 +59,7 @@ type TasksClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, taskName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string, taskName string, expand string) (result datamigration.ProjectTask, err error) List(ctx context.Context, groupName string, serviceName string, projectName string, taskType string) (result datamigration.TaskListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string, projectName string, taskType string) (result datamigration.TaskListIterator, err error) Update(ctx context.Context, parameters datamigration.ProjectTask, groupName string, serviceName string, projectName string, taskName string) (result datamigration.ProjectTask, err error) } @@ -66,6 +71,7 @@ type ProjectsClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string) (result datamigration.Project, err error) List(ctx context.Context, groupName string, serviceName string) (result datamigration.ProjectListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string) (result datamigration.ProjectListIterator, err error) Update(ctx context.Context, parameters datamigration.Project, groupName string, serviceName string, projectName string) (result datamigration.Project, err error) } @@ -74,6 +80,7 @@ var _ ProjectsClientAPI = (*datamigration.ProjectsClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result datamigration.QuotaListPage, err error) + ListComplete(ctx context.Context, location string) (result datamigration.QuotaListIterator, err error) } var _ UsagesClientAPI = (*datamigration.UsagesClient)(nil) @@ -81,6 +88,7 @@ var _ UsagesClientAPI = (*datamigration.UsagesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result datamigration.ServiceOperationListPage, err error) + ListComplete(ctx context.Context) (result datamigration.ServiceOperationListIterator, err error) } var _ OperationsClientAPI = (*datamigration.OperationsClient)(nil) diff --git a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/operations.go b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/operations.go index 4945e8ce80cc..9d19cf778eb4 100644 --- a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/operations.go +++ b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/projects.go b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/projects.go index 7d2b47925236..38eb23a1852f 100644 --- a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/projects.go +++ b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/projects.go @@ -35,7 +35,8 @@ func NewProjectsClient(subscriptionID string) ProjectsClient { return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string) ProjectsClient { return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/resourceskus.go b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/resourceskus.go index 0f20aa80693d..d578bc735ebc 100644 --- a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/resourceskus.go +++ b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/services.go b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/services.go index 2a8aa1f83a29..0440096056d3 100644 --- a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/services.go +++ b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/tasks.go b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/tasks.go index 52b06f3095ab..845c9cdbfb85 100644 --- a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/tasks.go +++ b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/tasks.go @@ -35,7 +35,8 @@ func NewTasksClient(subscriptionID string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/usages.go b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/usages.go index 24562d4a798b..9b000a28aaa0 100644 --- a/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/usages.go +++ b/services/preview/datamigration/mgmt/2018-03-31-preview/datamigration/usages.go @@ -35,7 +35,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/client.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/client.go index 3f4c1091a386..8cba21ee2bb4 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/client.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/datamigrationapi/interfaces.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/datamigrationapi/interfaces.go index ff60b7bcd751..370ab066c4b8 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/datamigrationapi/interfaces.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/datamigrationapi/interfaces.go @@ -26,6 +26,7 @@ import ( // ResourceSkusClientAPI contains the set of methods on the ResourceSkusClient type. type ResourceSkusClientAPI interface { ListSkus(ctx context.Context) (result datamigration.ResourceSkusResultPage, err error) + ListSkusComplete(ctx context.Context) (result datamigration.ResourceSkusResultIterator, err error) } var _ ResourceSkusClientAPI = (*datamigration.ResourceSkusClient)(nil) @@ -39,8 +40,11 @@ type ServicesClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, deleteRunningTasks *bool) (result datamigration.ServicesDeleteFuture, err error) Get(ctx context.Context, groupName string, serviceName string) (result datamigration.Service, err error) List(ctx context.Context) (result datamigration.ServiceListPage, err error) + ListComplete(ctx context.Context) (result datamigration.ServiceListIterator, err error) ListByResourceGroup(ctx context.Context, groupName string) (result datamigration.ServiceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, groupName string) (result datamigration.ServiceListIterator, err error) ListSkus(ctx context.Context, groupName string, serviceName string) (result datamigration.ServiceSkuListPage, err error) + ListSkusComplete(ctx context.Context, groupName string, serviceName string) (result datamigration.ServiceSkuListIterator, err error) Start(ctx context.Context, groupName string, serviceName string) (result datamigration.ServicesStartFuture, err error) Stop(ctx context.Context, groupName string, serviceName string) (result datamigration.ServicesStopFuture, err error) Update(ctx context.Context, parameters datamigration.Service, groupName string, serviceName string) (result datamigration.ServicesUpdateFuture, err error) @@ -56,6 +60,7 @@ type TasksClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, taskName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string, taskName string, expand string) (result datamigration.ProjectTask, err error) List(ctx context.Context, groupName string, serviceName string, projectName string, taskType string) (result datamigration.TaskListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string, projectName string, taskType string) (result datamigration.TaskListIterator, err error) Update(ctx context.Context, parameters datamigration.ProjectTask, groupName string, serviceName string, projectName string, taskName string) (result datamigration.ProjectTask, err error) } @@ -68,6 +73,7 @@ type ServiceTasksClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, taskName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, taskName string, expand string) (result datamigration.ProjectTask, err error) List(ctx context.Context, groupName string, serviceName string, taskType string) (result datamigration.TaskListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string, taskType string) (result datamigration.TaskListIterator, err error) Update(ctx context.Context, parameters datamigration.ProjectTask, groupName string, serviceName string, taskName string) (result datamigration.ProjectTask, err error) } @@ -79,6 +85,7 @@ type ProjectsClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, deleteRunningTasks *bool) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string) (result datamigration.Project, err error) List(ctx context.Context, groupName string, serviceName string) (result datamigration.ProjectListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string) (result datamigration.ProjectListIterator, err error) Update(ctx context.Context, parameters datamigration.Project, groupName string, serviceName string, projectName string) (result datamigration.Project, err error) } @@ -87,6 +94,7 @@ var _ ProjectsClientAPI = (*datamigration.ProjectsClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result datamigration.QuotaListPage, err error) + ListComplete(ctx context.Context, location string) (result datamigration.QuotaListIterator, err error) } var _ UsagesClientAPI = (*datamigration.UsagesClient)(nil) @@ -94,6 +102,7 @@ var _ UsagesClientAPI = (*datamigration.UsagesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result datamigration.ServiceOperationListPage, err error) + ListComplete(ctx context.Context) (result datamigration.ServiceOperationListIterator, err error) } var _ OperationsClientAPI = (*datamigration.OperationsClient)(nil) @@ -104,6 +113,7 @@ type FilesClientAPI interface { Delete(ctx context.Context, groupName string, serviceName string, projectName string, fileName string) (result autorest.Response, err error) Get(ctx context.Context, groupName string, serviceName string, projectName string, fileName string) (result datamigration.ProjectFile, err error) List(ctx context.Context, groupName string, serviceName string, projectName string) (result datamigration.FileListPage, err error) + ListComplete(ctx context.Context, groupName string, serviceName string, projectName string) (result datamigration.FileListIterator, err error) Read(ctx context.Context, groupName string, serviceName string, projectName string, fileName string) (result datamigration.FileStorageInfo, err error) ReadWrite(ctx context.Context, groupName string, serviceName string, projectName string, fileName string) (result datamigration.FileStorageInfo, err error) Update(ctx context.Context, parameters datamigration.ProjectFile, groupName string, serviceName string, projectName string, fileName string) (result datamigration.ProjectFile, err error) diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/files.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/files.go index de1e3f86452b..dcf4b46258c6 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/files.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/files.go @@ -35,7 +35,8 @@ func NewFilesClient(subscriptionID string) FilesClient { return NewFilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFilesClientWithBaseURI creates an instance of the FilesClient client. +// NewFilesClientWithBaseURI creates an instance of the FilesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFilesClientWithBaseURI(baseURI string, subscriptionID string) FilesClient { return FilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/operations.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/operations.go index 0045072c653b..613185a613a2 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/operations.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/projects.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/projects.go index 545e6a1fcea0..045520855104 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/projects.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/projects.go @@ -35,7 +35,8 @@ func NewProjectsClient(subscriptionID string) ProjectsClient { return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string) ProjectsClient { return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/resourceskus.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/resourceskus.go index f2a0bc77b411..4071c32c1a0f 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/resourceskus.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/resourceskus.go @@ -35,7 +35,8 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// 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)} } diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/services.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/services.go index 9921d788a18f..15a8f1ad5728 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/services.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/servicetasks.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/servicetasks.go index 2d9e7bfb9a43..5bfc89b0265c 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/servicetasks.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/servicetasks.go @@ -35,7 +35,8 @@ func NewServiceTasksClient(subscriptionID string) ServiceTasksClient { return NewServiceTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTasksClientWithBaseURI creates an instance of the ServiceTasksClient client. +// NewServiceTasksClientWithBaseURI creates an instance of the ServiceTasksClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceTasksClientWithBaseURI(baseURI string, subscriptionID string) ServiceTasksClient { return ServiceTasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/tasks.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/tasks.go index c3e462aea8f2..86c042f94b3d 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/tasks.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/tasks.go @@ -35,7 +35,8 @@ func NewTasksClient(subscriptionID string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/usages.go b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/usages.go index c3ca8ead179c..8bf0bd65836e 100644 --- a/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/usages.go +++ b/services/preview/datamigration/mgmt/2018-07-15-preview/datamigration/usages.go @@ -35,7 +35,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/accounts.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/accounts.go index dd19c8547988..634d777d0c3c 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/accounts.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/client.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/client.go index 89c3a65c79e8..5f8e5071ab67 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/client.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/consumerinvitations.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/consumerinvitations.go index 92c14dd19b12..428779050aa9 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/consumerinvitations.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/consumerinvitations.go @@ -36,7 +36,9 @@ func NewConsumerInvitationsClient(subscriptionID string) ConsumerInvitationsClie return NewConsumerInvitationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerInvitationsClientWithBaseURI creates an instance of the ConsumerInvitationsClient client. +// NewConsumerInvitationsClientWithBaseURI creates an instance of the ConsumerInvitationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewConsumerInvitationsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerInvitationsClient { return ConsumerInvitationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/consumersourcedatasets.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/consumersourcedatasets.go index a62ed54dfb80..31474a25ed45 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/consumersourcedatasets.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/consumersourcedatasets.go @@ -35,7 +35,9 @@ func NewConsumerSourceDataSetsClient(subscriptionID string) ConsumerSourceDataSe return NewConsumerSourceDataSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerSourceDataSetsClientWithBaseURI creates an instance of the ConsumerSourceDataSetsClient client. +// NewConsumerSourceDataSetsClientWithBaseURI creates an instance of the ConsumerSourceDataSetsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewConsumerSourceDataSetsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerSourceDataSetsClient { return ConsumerSourceDataSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datasetmappings.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datasetmappings.go index 632d75aba2cf..c2f2b09d8023 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datasetmappings.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datasetmappings.go @@ -35,7 +35,8 @@ func NewDataSetMappingsClient(subscriptionID string) DataSetMappingsClient { return NewDataSetMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataSetMappingsClientWithBaseURI creates an instance of the DataSetMappingsClient client. +// NewDataSetMappingsClientWithBaseURI creates an instance of the DataSetMappingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataSetMappingsClientWithBaseURI(baseURI string, subscriptionID string) DataSetMappingsClient { return DataSetMappingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datasets.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datasets.go index 47bee16b75c2..b7b22acae7ce 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datasets.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datasets.go @@ -35,7 +35,8 @@ func NewDataSetsClient(subscriptionID string) DataSetsClient { return NewDataSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataSetsClientWithBaseURI creates an instance of the DataSetsClient client. +// NewDataSetsClientWithBaseURI creates an instance of the DataSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataSetsClientWithBaseURI(baseURI string, subscriptionID string) DataSetsClient { return DataSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datashareapi/interfaces.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datashareapi/interfaces.go index cde7671b16c2..fbfac2a90425 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datashareapi/interfaces.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/datashareapi/interfaces.go @@ -29,7 +29,9 @@ type AccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string) (result datashare.AccountsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string) (result datashare.Account, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result datashare.AccountListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result datashare.AccountListIterator, err error) ListBySubscription(ctx context.Context, skipToken string) (result datashare.AccountListPage, err error) + ListBySubscriptionComplete(ctx context.Context, skipToken string) (result datashare.AccountListIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, accountUpdateParameters datashare.AccountUpdateParameters) (result datashare.Account, err error) } @@ -39,6 +41,7 @@ var _ AccountsClientAPI = (*datashare.AccountsClient)(nil) type ConsumerInvitationsClientAPI interface { Get(ctx context.Context, location string, invitationID string) (result datashare.ConsumerInvitation, err error) ListInvitations(ctx context.Context, skipToken string) (result datashare.ConsumerInvitationListPage, err error) + ListInvitationsComplete(ctx context.Context, skipToken string) (result datashare.ConsumerInvitationListIterator, err error) RejectInvitation(ctx context.Context, location string, invitation datashare.ConsumerInvitation) (result datashare.ConsumerInvitation, err error) } @@ -50,6 +53,7 @@ type DataSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string) (result datashare.DataSetsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, dataSetName string) (result datashare.DataSetModel, err error) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.DataSetListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.DataSetListIterator, err error) } var _ DataSetsClientAPI = (*datashare.DataSetsClient)(nil) @@ -60,6 +64,7 @@ type DataSetMappingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, dataSetMappingName string) (result datashare.DataSetMappingModel, err error) ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.DataSetMappingListPage, err error) + ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.DataSetMappingListIterator, err error) } var _ DataSetMappingsClientAPI = (*datashare.DataSetMappingsClient)(nil) @@ -70,6 +75,7 @@ type InvitationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, invitationName string) (result datashare.Invitation, err error) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.InvitationListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.InvitationListIterator, err error) } var _ InvitationsClientAPI = (*datashare.InvitationsClient)(nil) @@ -77,6 +83,7 @@ var _ InvitationsClientAPI = (*datashare.InvitationsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result datashare.OperationListPage, err error) + ListComplete(ctx context.Context) (result datashare.OperationListIterator, err error) } var _ OperationsClientAPI = (*datashare.OperationsClient)(nil) @@ -87,8 +94,11 @@ type SharesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result datashare.SharesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result datashare.Share, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareListPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareListIterator, err error) ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization datashare.ShareSynchronization, skipToken string) (result datashare.SynchronizationDetailsListPage, err error) + ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, shareSynchronization datashare.ShareSynchronization, skipToken string) (result datashare.SynchronizationDetailsListIterator, err error) ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ShareSynchronizationListPage, err error) + ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ShareSynchronizationListIterator, err error) } var _ SharesClientAPI = (*datashare.SharesClient)(nil) @@ -97,6 +107,7 @@ var _ SharesClientAPI = (*datashare.SharesClient)(nil) type ProviderShareSubscriptionsClientAPI interface { GetByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string) (result datashare.ProviderShareSubscription, err error) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ProviderShareSubscriptionListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.ProviderShareSubscriptionListIterator, err error) Reinstate(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string) (result datashare.ProviderShareSubscription, err error) Revoke(ctx context.Context, resourceGroupName string, accountName string, shareName string, providerShareSubscriptionID string) (result datashare.ProviderShareSubscriptionsRevokeFuture, err error) } @@ -110,9 +121,13 @@ type ShareSubscriptionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string) (result datashare.ShareSubscriptionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string) (result datashare.ShareSubscription, err error) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareSubscriptionListPage, err error) + ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string) (result datashare.ShareSubscriptionListIterator, err error) ListSourceShareSynchronizationSettings(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.SourceShareSynchronizationSettingListPage, err error) + ListSourceShareSynchronizationSettingsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.SourceShareSynchronizationSettingListIterator, err error) ListSynchronizationDetails(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization datashare.ShareSubscriptionSynchronization, skipToken string) (result datashare.SynchronizationDetailsListPage, err error) + ListSynchronizationDetailsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, shareSubscriptionSynchronization datashare.ShareSubscriptionSynchronization, skipToken string) (result datashare.SynchronizationDetailsListIterator, err error) ListSynchronizations(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ShareSubscriptionSynchronizationListPage, err error) + ListSynchronizationsComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ShareSubscriptionSynchronizationListIterator, err error) SynchronizeMethod(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, synchronize datashare.Synchronize) (result datashare.ShareSubscriptionsSynchronizeMethodFuture, err error) } @@ -121,6 +136,7 @@ var _ ShareSubscriptionsClientAPI = (*datashare.ShareSubscriptionsClient)(nil) // ConsumerSourceDataSetsClientAPI contains the set of methods on the ConsumerSourceDataSetsClient type. type ConsumerSourceDataSetsClientAPI interface { ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ConsumerSourceDataSetListPage, err error) + ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.ConsumerSourceDataSetListIterator, err error) } var _ ConsumerSourceDataSetsClientAPI = (*datashare.ConsumerSourceDataSetsClient)(nil) @@ -131,6 +147,7 @@ type SynchronizationSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string, synchronizationSettingName string) (result datashare.SynchronizationSettingsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, synchronizationSettingName string) (result datashare.SynchronizationSettingModel, err error) ListByShare(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.SynchronizationSettingListPage, err error) + ListByShareComplete(ctx context.Context, resourceGroupName string, accountName string, shareName string, skipToken string) (result datashare.SynchronizationSettingListIterator, err error) } var _ SynchronizationSettingsClientAPI = (*datashare.SynchronizationSettingsClient)(nil) @@ -141,6 +158,7 @@ type TriggersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, triggerName string) (result datashare.TriggersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, triggerName string) (result datashare.TriggerModel, err error) ListByShareSubscription(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.TriggerListPage, err error) + ListByShareSubscriptionComplete(ctx context.Context, resourceGroupName string, accountName string, shareSubscriptionName string, skipToken string) (result datashare.TriggerListIterator, err error) } var _ TriggersClientAPI = (*datashare.TriggersClient)(nil) diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/invitations.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/invitations.go index 34665155f9cc..12c9596f2ddc 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/invitations.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/invitations.go @@ -35,7 +35,8 @@ func NewInvitationsClient(subscriptionID string) InvitationsClient { return NewInvitationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInvitationsClientWithBaseURI creates an instance of the InvitationsClient client. +// NewInvitationsClientWithBaseURI creates an instance of the InvitationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInvitationsClientWithBaseURI(baseURI string, subscriptionID string) InvitationsClient { return InvitationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/operations.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/operations.go index 1e771b9520bf..f22fd95eef60 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/operations.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/providersharesubscriptions.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/providersharesubscriptions.go index d15914dd5024..917584b7bf12 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/providersharesubscriptions.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/providersharesubscriptions.go @@ -35,7 +35,9 @@ func NewProviderShareSubscriptionsClient(subscriptionID string) ProviderShareSub return NewProviderShareSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderShareSubscriptionsClientWithBaseURI creates an instance of the ProviderShareSubscriptionsClient client. +// NewProviderShareSubscriptionsClientWithBaseURI creates an instance of the ProviderShareSubscriptionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProviderShareSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ProviderShareSubscriptionsClient { return ProviderShareSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/shares.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/shares.go index a097385910d9..a30bfbc531b6 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/shares.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/shares.go @@ -35,7 +35,8 @@ func NewSharesClient(subscriptionID string) SharesClient { return NewSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSharesClientWithBaseURI creates an instance of the SharesClient client. +// NewSharesClientWithBaseURI creates an instance of the SharesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSharesClientWithBaseURI(baseURI string, subscriptionID string) SharesClient { return SharesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/sharesubscriptions.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/sharesubscriptions.go index b55873cc2cbd..1800ee1e32fe 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/sharesubscriptions.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/sharesubscriptions.go @@ -36,7 +36,9 @@ func NewShareSubscriptionsClient(subscriptionID string) ShareSubscriptionsClient return NewShareSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewShareSubscriptionsClientWithBaseURI creates an instance of the ShareSubscriptionsClient client. +// NewShareSubscriptionsClientWithBaseURI creates an instance of the ShareSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewShareSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) ShareSubscriptionsClient { return ShareSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/synchronizationsettings.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/synchronizationsettings.go index 30a335363586..b24334f7c213 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/synchronizationsettings.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/synchronizationsettings.go @@ -35,7 +35,9 @@ func NewSynchronizationSettingsClient(subscriptionID string) SynchronizationSett return NewSynchronizationSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSynchronizationSettingsClientWithBaseURI creates an instance of the SynchronizationSettingsClient client. +// NewSynchronizationSettingsClientWithBaseURI creates an instance of the SynchronizationSettingsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewSynchronizationSettingsClientWithBaseURI(baseURI string, subscriptionID string) SynchronizationSettingsClient { return SynchronizationSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/triggers.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/triggers.go index fa3014c65386..532d198e3f7f 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/triggers.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/triggers.go @@ -35,7 +35,8 @@ func NewTriggersClient(subscriptionID string) TriggersClient { return NewTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client. +// NewTriggersClientWithBaseURI creates an instance of the TriggersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTriggersClientWithBaseURI(baseURI string, subscriptionID string) TriggersClient { return TriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/artifactsources.go b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/artifactsources.go index 43ea821583e8..5d03bcbc65a7 100644 --- a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/artifactsources.go +++ b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/artifactsources.go @@ -37,7 +37,8 @@ func NewArtifactSourcesClient(subscriptionID string) ArtifactSourcesClient { return NewArtifactSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client. +// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactSourcesClientWithBaseURI(baseURI string, subscriptionID string) ArtifactSourcesClient { return ArtifactSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/client.go b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/client.go index c34fbe775dc3..4b5ae4218c8c 100644 --- a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/client.go +++ b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/operations.go b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/operations.go index 864cbb4e738f..a5aa5f070586 100644 --- a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/operations.go +++ b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/rollouts.go b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/rollouts.go index 1831c7de163f..a2e20ec26722 100644 --- a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/rollouts.go +++ b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/rollouts.go @@ -37,7 +37,8 @@ func NewRolloutsClient(subscriptionID string) RolloutsClient { return NewRolloutsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRolloutsClientWithBaseURI creates an instance of the RolloutsClient client. +// NewRolloutsClientWithBaseURI creates an instance of the RolloutsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRolloutsClientWithBaseURI(baseURI string, subscriptionID string) RolloutsClient { return RolloutsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/services.go b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/services.go index aa58a9054d46..9c734cf18c0a 100644 --- a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/services.go +++ b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/services.go @@ -37,7 +37,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/servicetopologies.go b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/servicetopologies.go index 0d6546e93ab4..1ddfde7407e6 100644 --- a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/servicetopologies.go +++ b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/servicetopologies.go @@ -37,7 +37,9 @@ func NewServiceTopologiesClient(subscriptionID string) ServiceTopologiesClient { return NewServiceTopologiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTopologiesClientWithBaseURI creates an instance of the ServiceTopologiesClient client. +// NewServiceTopologiesClientWithBaseURI creates an instance of the ServiceTopologiesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceTopologiesClientWithBaseURI(baseURI string, subscriptionID string) ServiceTopologiesClient { return ServiceTopologiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/serviceunits.go b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/serviceunits.go index 31db92c0e608..8b33811da85e 100644 --- a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/serviceunits.go +++ b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/serviceunits.go @@ -37,7 +37,8 @@ func NewServiceUnitsClient(subscriptionID string) ServiceUnitsClient { return NewServiceUnitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceUnitsClientWithBaseURI creates an instance of the ServiceUnitsClient client. +// NewServiceUnitsClientWithBaseURI creates an instance of the ServiceUnitsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceUnitsClientWithBaseURI(baseURI string, subscriptionID string) ServiceUnitsClient { return ServiceUnitsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/steps.go b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/steps.go index 926dbe6fee52..5ff8cb96f780 100644 --- a/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/steps.go +++ b/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/steps.go @@ -37,7 +37,8 @@ func NewStepsClient(subscriptionID string) StepsClient { return NewStepsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStepsClientWithBaseURI creates an instance of the StepsClient client. +// NewStepsClientWithBaseURI creates an instance of the StepsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStepsClientWithBaseURI(baseURI string, subscriptionID string) StepsClient { return StepsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/artifactsources.go b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/artifactsources.go index 425f09c41dca..62a5b6b271b0 100644 --- a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/artifactsources.go +++ b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/artifactsources.go @@ -37,7 +37,8 @@ func NewArtifactSourcesClient(subscriptionID string) ArtifactSourcesClient { return NewArtifactSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client. +// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactSourcesClientWithBaseURI(baseURI string, subscriptionID string) ArtifactSourcesClient { return ArtifactSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/client.go b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/client.go index f3129f3a7c85..a8026bee8f61 100644 --- a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/client.go +++ b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/operations.go b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/operations.go index 4e1e6c0e632e..7e40ef1e88f5 100644 --- a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/operations.go +++ b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/rollouts.go b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/rollouts.go index 524bcba3c41e..c8ff6027ace1 100644 --- a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/rollouts.go +++ b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/rollouts.go @@ -37,7 +37,8 @@ func NewRolloutsClient(subscriptionID string) RolloutsClient { return NewRolloutsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRolloutsClientWithBaseURI creates an instance of the RolloutsClient client. +// NewRolloutsClientWithBaseURI creates an instance of the RolloutsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRolloutsClientWithBaseURI(baseURI string, subscriptionID string) RolloutsClient { return RolloutsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/services.go b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/services.go index b7a3c40c7a71..6a583ec04b48 100644 --- a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/services.go +++ b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/services.go @@ -37,7 +37,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/servicetopologies.go b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/servicetopologies.go index 72b5f03f4e7f..48165e6d59c3 100644 --- a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/servicetopologies.go +++ b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/servicetopologies.go @@ -37,7 +37,9 @@ func NewServiceTopologiesClient(subscriptionID string) ServiceTopologiesClient { return NewServiceTopologiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTopologiesClientWithBaseURI creates an instance of the ServiceTopologiesClient client. +// NewServiceTopologiesClientWithBaseURI creates an instance of the ServiceTopologiesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceTopologiesClientWithBaseURI(baseURI string, subscriptionID string) ServiceTopologiesClient { return ServiceTopologiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/serviceunits.go b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/serviceunits.go index 0bb27361b68e..5b5bdba98810 100644 --- a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/serviceunits.go +++ b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/serviceunits.go @@ -37,7 +37,8 @@ func NewServiceUnitsClient(subscriptionID string) ServiceUnitsClient { return NewServiceUnitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceUnitsClientWithBaseURI creates an instance of the ServiceUnitsClient client. +// NewServiceUnitsClientWithBaseURI creates an instance of the ServiceUnitsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceUnitsClientWithBaseURI(baseURI string, subscriptionID string) ServiceUnitsClient { return ServiceUnitsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/steps.go b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/steps.go index a0143e637160..c0de323fb7cc 100644 --- a/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/steps.go +++ b/services/preview/deploymentmanager/mgmt/2019-11-01-preview/deploymentmanager/steps.go @@ -37,7 +37,8 @@ func NewStepsClient(subscriptionID string) StepsClient { return NewStepsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStepsClientWithBaseURI creates an instance of the StepsClient client. +// NewStepsClientWithBaseURI creates an instance of the StepsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStepsClientWithBaseURI(baseURI string, subscriptionID string) StepsClient { return StepsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devops/mgmt/2019-07-01-preview/devops/client.go b/services/preview/devops/mgmt/2019-07-01-preview/devops/client.go index a478f8ea875d..49ce44e730c0 100644 --- a/services/preview/devops/mgmt/2019-07-01-preview/devops/client.go +++ b/services/preview/devops/mgmt/2019-07-01-preview/devops/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/devops/mgmt/2019-07-01-preview/devops/devopsapi/interfaces.go b/services/preview/devops/mgmt/2019-07-01-preview/devops/devopsapi/interfaces.go index b3ad46d91d27..e373268162bc 100644 --- a/services/preview/devops/mgmt/2019-07-01-preview/devops/devopsapi/interfaces.go +++ b/services/preview/devops/mgmt/2019-07-01-preview/devops/devopsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result devops.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result devops.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*devops.OperationsClient)(nil) @@ -33,6 +34,7 @@ var _ OperationsClientAPI = (*devops.OperationsClient)(nil) // PipelineTemplateDefinitionsClientAPI contains the set of methods on the PipelineTemplateDefinitionsClient type. type PipelineTemplateDefinitionsClientAPI interface { List(ctx context.Context) (result devops.PipelineTemplateDefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result devops.PipelineTemplateDefinitionListResultIterator, err error) } var _ PipelineTemplateDefinitionsClientAPI = (*devops.PipelineTemplateDefinitionsClient)(nil) @@ -43,7 +45,9 @@ type PipelinesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, pipelineName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, pipelineName string) (result devops.Pipeline, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devops.PipelineListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devops.PipelineListResultIterator, err error) ListBySubscription(ctx context.Context) (result devops.PipelineListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result devops.PipelineListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, pipelineName string, updateOperationParameters devops.PipelineUpdateParameters) (result devops.Pipeline, err error) } diff --git a/services/preview/devops/mgmt/2019-07-01-preview/devops/operations.go b/services/preview/devops/mgmt/2019-07-01-preview/devops/operations.go index 7591c10ecf80..cf29b7d94e22 100644 --- a/services/preview/devops/mgmt/2019-07-01-preview/devops/operations.go +++ b/services/preview/devops/mgmt/2019-07-01-preview/devops/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/devops/mgmt/2019-07-01-preview/devops/pipelines.go b/services/preview/devops/mgmt/2019-07-01-preview/devops/pipelines.go index 70420edcaf52..31ae6c6b0fa4 100644 --- a/services/preview/devops/mgmt/2019-07-01-preview/devops/pipelines.go +++ b/services/preview/devops/mgmt/2019-07-01-preview/devops/pipelines.go @@ -36,7 +36,8 @@ func NewPipelinesClient(subscriptionID string) PipelinesClient { return NewPipelinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPipelinesClientWithBaseURI creates an instance of the PipelinesClient client. +// NewPipelinesClientWithBaseURI creates an instance of the PipelinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPipelinesClientWithBaseURI(baseURI string, subscriptionID string) PipelinesClient { return PipelinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devops/mgmt/2019-07-01-preview/devops/pipelinetemplatedefinitions.go b/services/preview/devops/mgmt/2019-07-01-preview/devops/pipelinetemplatedefinitions.go index 5c0c55c35639..0fac6f67735a 100644 --- a/services/preview/devops/mgmt/2019-07-01-preview/devops/pipelinetemplatedefinitions.go +++ b/services/preview/devops/mgmt/2019-07-01-preview/devops/pipelinetemplatedefinitions.go @@ -35,7 +35,9 @@ func NewPipelineTemplateDefinitionsClient(subscriptionID string) PipelineTemplat return NewPipelineTemplateDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPipelineTemplateDefinitionsClientWithBaseURI creates an instance of the PipelineTemplateDefinitionsClient client. +// NewPipelineTemplateDefinitionsClientWithBaseURI creates an instance of the PipelineTemplateDefinitionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewPipelineTemplateDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) PipelineTemplateDefinitionsClient { return PipelineTemplateDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/artifact.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/artifact.go index c1067b6b8818..dc5a507304c6 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/artifact.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/artifact.go @@ -35,7 +35,8 @@ func NewArtifactClient(subscriptionID string) ArtifactClient { return NewArtifactClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactClientWithBaseURI creates an instance of the ArtifactClient client. +// NewArtifactClientWithBaseURI creates an instance of the ArtifactClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactClientWithBaseURI(baseURI string, subscriptionID string) ArtifactClient { return ArtifactClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/artifactsource.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/artifactsource.go index 9eaef10fd0c6..d2b0324d5331 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/artifactsource.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/artifactsource.go @@ -35,7 +35,8 @@ func NewArtifactSourceClient(subscriptionID string) ArtifactSourceClient { return NewArtifactSourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactSourceClientWithBaseURI creates an instance of the ArtifactSourceClient client. +// NewArtifactSourceClientWithBaseURI creates an instance of the ArtifactSourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewArtifactSourceClientWithBaseURI(baseURI string, subscriptionID string) ArtifactSourceClient { return ArtifactSourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/client.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/client.go index 2b8c2c0cb84a..8c60f9f1a6fe 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/client.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/cost.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/cost.go index ac20f7e88821..a4413a46bcfe 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/cost.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/cost.go @@ -35,7 +35,8 @@ func NewCostClient(subscriptionID string) CostClient { return NewCostClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCostClientWithBaseURI creates an instance of the CostClient client. +// NewCostClientWithBaseURI creates an instance of the CostClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCostClientWithBaseURI(baseURI string, subscriptionID string) CostClient { return CostClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/costinsight.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/costinsight.go index 87b9972581a5..d920e3435839 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/costinsight.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/costinsight.go @@ -35,7 +35,8 @@ func NewCostInsightClient(subscriptionID string) CostInsightClient { return NewCostInsightClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCostInsightClientWithBaseURI creates an instance of the CostInsightClient client. +// NewCostInsightClientWithBaseURI creates an instance of the CostInsightClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCostInsightClientWithBaseURI(baseURI string, subscriptionID string) CostInsightClient { return CostInsightClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/customimage.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/customimage.go index 5e79deda2c52..e96ec2ad7ded 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/customimage.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/customimage.go @@ -35,7 +35,8 @@ func NewCustomImageClient(subscriptionID string) CustomImageClient { return NewCustomImageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomImageClientWithBaseURI creates an instance of the CustomImageClient client. +// NewCustomImageClientWithBaseURI creates an instance of the CustomImageClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCustomImageClientWithBaseURI(baseURI string, subscriptionID string) CustomImageClient { return CustomImageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/dtlapi/interfaces.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/dtlapi/interfaces.go index 243c4bfc05c6..2afa42726404 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/dtlapi/interfaces.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/dtlapi/interfaces.go @@ -31,8 +31,11 @@ type LabClientAPI interface { GenerateUploadURI(ctx context.Context, resourceGroupName string, name string, generateUploadURIParameter dtl.GenerateUploadURIParameter) (result dtl.GenerateUploadURIResponse, err error) GetResource(ctx context.Context, resourceGroupName string, name string) (result dtl.Lab, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationLabPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationLabIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationLabPage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationLabIterator, err error) ListVhds(ctx context.Context, resourceGroupName string, name string) (result dtl.ResponseWithContinuationLabVhdPage, err error) + ListVhdsComplete(ctx context.Context, resourceGroupName string, name string) (result dtl.ResponseWithContinuationLabVhdIterator, err error) PatchResource(ctx context.Context, resourceGroupName string, name string, lab dtl.Lab) (result dtl.Lab, err error) } @@ -44,6 +47,7 @@ type ArtifactSourceClientAPI interface { DeleteResource(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) GetResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ArtifactSource, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationArtifactSourcePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationArtifactSourceIterator, err error) PatchResource(ctx context.Context, resourceGroupName string, labName string, name string, artifactSource dtl.ArtifactSource) (result dtl.ArtifactSource, err error) } @@ -54,6 +58,7 @@ type ArtifactClientAPI interface { GenerateArmTemplate(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, generateArmTemplateRequest dtl.GenerateArmTemplateRequest) (result dtl.ArmTemplateInfo, err error) GetResource(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string) (result dtl.Artifact, err error) List(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationArtifactPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationArtifactIterator, err error) } var _ ArtifactClientAPI = (*dtl.ArtifactClient)(nil) @@ -62,6 +67,7 @@ var _ ArtifactClientAPI = (*dtl.ArtifactClient)(nil) type CostInsightClientAPI interface { GetResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.CostInsight, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationCostInsightPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationCostInsightIterator, err error) RefreshData(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.CostInsightRefreshDataFuture, err error) } @@ -71,6 +77,7 @@ var _ CostInsightClientAPI = (*dtl.CostInsightClient)(nil) type CostClientAPI interface { GetResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.Cost, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationCostPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationCostIterator, err error) RefreshData(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.CostRefreshDataFuture, err error) } @@ -82,6 +89,7 @@ type CustomImageClientAPI interface { DeleteResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.CustomImageDeleteResourceFuture, err error) GetResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.CustomImage, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationCustomImagePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationCustomImageIterator, err error) } var _ CustomImageClientAPI = (*dtl.CustomImageClient)(nil) @@ -92,6 +100,7 @@ type FormulaClientAPI interface { DeleteResource(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) GetResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.Formula, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationFormulaPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationFormulaIterator, err error) } var _ FormulaClientAPI = (*dtl.FormulaClient)(nil) @@ -99,6 +108,7 @@ var _ FormulaClientAPI = (*dtl.FormulaClient)(nil) // GalleryImageClientAPI contains the set of methods on the GalleryImageClient type. type GalleryImageClientAPI interface { List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationGalleryImagePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationGalleryImageIterator, err error) } var _ GalleryImageClientAPI = (*dtl.GalleryImageClient)(nil) @@ -116,6 +126,7 @@ type PolicyClientAPI interface { DeleteResource(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string) (result autorest.Response, err error) GetResource(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string) (result dtl.Policy, err error) List(ctx context.Context, resourceGroupName string, labName string, policySetName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationPolicyPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, policySetName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationPolicyIterator, err error) PatchResource(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, policy dtl.Policy) (result dtl.Policy, err error) } @@ -128,6 +139,7 @@ type ScheduleClientAPI interface { Execute(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.ScheduleExecuteFuture, err error) GetResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.Schedule, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationSchedulePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationScheduleIterator, err error) PatchResource(ctx context.Context, resourceGroupName string, labName string, name string, schedule dtl.Schedule) (result dtl.Schedule, err error) } @@ -140,6 +152,7 @@ type VirtualMachineClientAPI interface { DeleteResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualMachineDeleteResourceFuture, err error) GetResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.LabVirtualMachine, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationLabVirtualMachinePage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationLabVirtualMachineIterator, err error) PatchResource(ctx context.Context, resourceGroupName string, labName string, name string, labVirtualMachine dtl.LabVirtualMachine) (result dtl.LabVirtualMachine, err error) Start(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualMachineStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualMachineStopFuture, err error) @@ -153,6 +166,7 @@ type VirtualNetworkClientAPI interface { DeleteResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualNetworkDeleteResourceFuture, err error) GetResource(ctx context.Context, resourceGroupName string, labName string, name string) (result dtl.VirtualNetwork, err error) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationVirtualNetworkPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderBy string) (result dtl.ResponseWithContinuationVirtualNetworkIterator, err error) PatchResource(ctx context.Context, resourceGroupName string, labName string, name string, virtualNetwork dtl.VirtualNetwork) (result dtl.VirtualNetwork, err error) } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/formula.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/formula.go index c61063c54f9c..7d1562b4ea07 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/formula.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/formula.go @@ -35,7 +35,8 @@ func NewFormulaClient(subscriptionID string) FormulaClient { return NewFormulaClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFormulaClientWithBaseURI creates an instance of the FormulaClient client. +// NewFormulaClientWithBaseURI creates an instance of the FormulaClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFormulaClientWithBaseURI(baseURI string, subscriptionID string) FormulaClient { return FormulaClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/galleryimage.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/galleryimage.go index 7a7b696510fd..5c1190f8d7b0 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/galleryimage.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/galleryimage.go @@ -35,7 +35,8 @@ func NewGalleryImageClient(subscriptionID string) GalleryImageClient { return NewGalleryImageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImageClientWithBaseURI creates an instance of the GalleryImageClient client. +// NewGalleryImageClientWithBaseURI creates an instance of the GalleryImageClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGalleryImageClientWithBaseURI(baseURI string, subscriptionID string) GalleryImageClient { return GalleryImageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/lab.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/lab.go index 2d66207860c9..552595c791c1 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/lab.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/lab.go @@ -35,7 +35,8 @@ func NewLabClient(subscriptionID string) LabClient { return NewLabClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLabClientWithBaseURI creates an instance of the LabClient client. +// NewLabClientWithBaseURI creates an instance of the LabClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLabClientWithBaseURI(baseURI string, subscriptionID string) LabClient { return LabClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/policy.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/policy.go index f2352566bf14..bae0eaf034dd 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/policy.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/policy.go @@ -35,7 +35,8 @@ func NewPolicyClient(subscriptionID string) PolicyClient { return NewPolicyClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client. +// NewPolicyClientWithBaseURI creates an instance of the PolicyClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyClientWithBaseURI(baseURI string, subscriptionID string) PolicyClient { return PolicyClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/policyset.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/policyset.go index f10ec8380370..7fb3e916a63a 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/policyset.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/policyset.go @@ -35,7 +35,8 @@ func NewPolicySetClient(subscriptionID string) PolicySetClient { return NewPolicySetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySetClientWithBaseURI creates an instance of the PolicySetClient client. +// NewPolicySetClientWithBaseURI creates an instance of the PolicySetClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicySetClientWithBaseURI(baseURI string, subscriptionID string) PolicySetClient { return PolicySetClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/schedule.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/schedule.go index 01185c6c5db8..6f4e479192df 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/schedule.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/schedule.go @@ -35,7 +35,8 @@ func NewScheduleClient(subscriptionID string) ScheduleClient { return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. +// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualmachine.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualmachine.go index ca3027004700..8929c6e7d4f5 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualmachine.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualmachine.go @@ -35,7 +35,8 @@ func NewVirtualMachineClient(subscriptionID string) VirtualMachineClient { return NewVirtualMachineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineClientWithBaseURI creates an instance of the VirtualMachineClient client. +// NewVirtualMachineClientWithBaseURI creates an instance of the VirtualMachineClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualMachineClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineClient { return VirtualMachineClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualnetwork.go b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualnetwork.go index 62df4b23eb44..5182c1fc1add 100644 --- a/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualnetwork.go +++ b/services/preview/devtestlabs/mgmt/2015-05-21-preview/dtl/virtualnetwork.go @@ -35,7 +35,8 @@ func NewVirtualNetworkClient(subscriptionID string) VirtualNetworkClient { return NewVirtualNetworkClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkClientWithBaseURI creates an instance of the VirtualNetworkClient client. +// NewVirtualNetworkClientWithBaseURI creates an instance of the VirtualNetworkClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualNetworkClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkClient { return VirtualNetworkClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/client.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/client.go new file mode 100644 index 000000000000..3eed0373ff72 --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/client.go @@ -0,0 +1,53 @@ +// Package digitaltwins implements the Azure ARM Digitaltwins service API version 2020-03-01-preview. +// +// Azure Digital Twins Client for managing DigitalTwinsInstance +package digitaltwins + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/satori/go.uuid" +) + +const ( + // DefaultBaseURI is the default URI used for the service Digitaltwins + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Digitaltwins. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID uuid.UUID +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID uuid.UUID) 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 uuid.UUID) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/digitaltwins.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/digitaltwins.go new file mode 100644 index 000000000000..92591d09af08 --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/digitaltwins.go @@ -0,0 +1,718 @@ +package digitaltwins + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "github.com/satori/go.uuid" + "net/http" +) + +// Client is the azure Digital Twins Client for managing DigitalTwinsInstance +type Client struct { + BaseClient +} + +// NewClient creates an instance of the Client client. +func NewClient(subscriptionID uuid.UUID) 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 uuid.UUID) Client { + return Client{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability check if a DigitalTwinsInstance name is available. +// Parameters: +// location - location of DigitalTwinsInstance. +// digitalTwinsInstanceCheckName - set the name parameter in the DigitalTwinsInstanceCheckName structure to the +// name of the DigitalTwinsInstance to check. +func (client Client) CheckNameAvailability(ctx context.Context, location string, digitalTwinsInstanceCheckName CheckNameRequest) (result CheckNameResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.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: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: digitalTwinsInstanceCheckName, + Constraints: []validation.Constraint{{Target: "digitalTwinsInstanceCheckName.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "digitalTwinsInstanceCheckName.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.Client", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, location, digitalTwinsInstanceCheckName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client Client) CheckNameAvailabilityPreparer(ctx context.Context, location string, digitalTwinsInstanceCheckName CheckNameRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-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.DigitalTwins/locations/{location}/checkNameAvailability", pathParameters), + autorest.WithJSON(digitalTwinsInstanceCheckName), + 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 Client) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client Client) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate create or update the metadata of a DigitalTwinsInstance. The usual pattern to modify a property is to +// retrieve the DigitalTwinsInstance and security metadata, and then combine them with the modified values in a new +// body to update the DigitalTwinsInstance. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +// digitalTwinsCreate - the DigitalTwinsInstance and security metadata. +func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsCreate Description) (result CreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.Client", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, digitalTwinsCreate) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsCreate Description) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}", pathParameters), + autorest.WithJSON(digitalTwinsCreate), + 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 Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client Client) CreateOrUpdateResponder(resp *http.Response) (result Description, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a DigitalTwinsInstance. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result DeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.Client", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}", 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 Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client Client) DeleteResponder(resp *http.Response) (result Description, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get DigitalTwinsInstances resource. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +func (client Client) Get(ctx context.Context, resourceGroupName string, resourceName string) (result Description, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.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: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.Client", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client Client) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client Client) GetResponder(resp *http.Response) (result Description, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all the DigitalTwinsInstances in a subscription. +func (client Client) List(ctx context.Context) (result DescriptionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.List") + defer func() { + sc := -1 + if result.dlr.Response.Response != nil { + sc = result.dlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.dlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "List", resp, "Failure sending request") + return + } + + result.dlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client Client) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-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.DigitalTwins/digitalTwinsInstances", 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 Client) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client Client) ListResponder(resp *http.Response) (result DescriptionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client Client) listNextResults(ctx context.Context, lastResults DescriptionListResult) (result DescriptionListResult, err error) { + req, err := lastResults.descriptionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "digitaltwins.Client", "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, "digitaltwins.Client", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client Client) ListComplete(ctx context.Context) (result DescriptionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.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 get all the DigitalTwinsInstances in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DescriptionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup") + defer func() { + sc := -1 + if result.dlr.Response.Response != nil { + sc = result.dlr.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: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.Client", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.dlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.dlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client Client) 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-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances", 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 Client) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client Client) ListByResourceGroupResponder(resp *http.Response) (result DescriptionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client Client) listByResourceGroupNextResults(ctx context.Context, lastResults DescriptionListResult) (result DescriptionListResult, err error) { + req, err := lastResults.descriptionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "digitaltwins.Client", "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, "digitaltwins.Client", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DescriptionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.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 metadata of DigitalTwinsInstance. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +// digitalTwinsPatchDescription - the DigitalTwinsInstance and security metadata. +func (client Client) Update(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsPatchDescription PatchDescription) (result UpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.Client", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, digitalTwinsPatchDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.Client", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsPatchDescription PatchDescription) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}", pathParameters), + autorest.WithJSON(digitalTwinsPatchDescription), + 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 Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client Client) UpdateResponder(resp *http.Response) (result Description, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/digitaltwinsapi/interfaces.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/digitaltwinsapi/interfaces.go new file mode 100644 index 000000000000..6206795991a2 --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/digitaltwinsapi/interfaces.go @@ -0,0 +1,74 @@ +package digitaltwinsapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins" +) + +// ClientAPI contains the set of methods on the Client type. +type ClientAPI interface { + CheckNameAvailability(ctx context.Context, location string, digitalTwinsInstanceCheckName digitaltwins.CheckNameRequest) (result digitaltwins.CheckNameResult, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsCreate digitaltwins.Description) (result digitaltwins.CreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, resourceName string) (result digitaltwins.DeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, resourceName string) (result digitaltwins.Description, err error) + List(ctx context.Context) (result digitaltwins.DescriptionListResultPage, err error) + ListComplete(ctx context.Context) (result digitaltwins.DescriptionListResultIterator, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result digitaltwins.DescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result digitaltwins.DescriptionListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, resourceName string, digitalTwinsPatchDescription digitaltwins.PatchDescription) (result digitaltwins.UpdateFuture, err error) +} + +var _ ClientAPI = (*digitaltwins.Client)(nil) + +// EndpointClientAPI contains the set of methods on the EndpointClient type. +type EndpointClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, endpointDescription digitaltwins.EndpointResource) (result digitaltwins.EndpointCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, resourceName string, endpointName string) (result digitaltwins.EndpointDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, resourceName string, endpointName string) (result digitaltwins.EndpointResource, err error) + List(ctx context.Context, resourceGroupName string, resourceName string) (result digitaltwins.EndpointResourceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result digitaltwins.EndpointResourceListResultIterator, err error) +} + +var _ EndpointClientAPI = (*digitaltwins.EndpointClient)(nil) + +// IoTHubClientAPI contains the set of methods on the IoTHubClient type. +type IoTHubClientAPI interface { + CreateOrUpdate(ctx context.Context, scope string, integrationResourceName string, iotHubDescription digitaltwins.IntegrationResource) (result digitaltwins.IntegrationResource, err error) + Delete(ctx context.Context, scope string, integrationResourceName string) (result digitaltwins.IoTHubDeleteFuture, err error) + Get(ctx context.Context, scope string, integrationResourceName string) (result digitaltwins.IntegrationResource, err error) +} + +var _ IoTHubClientAPI = (*digitaltwins.IoTHubClient)(nil) + +// IoTHubsClientAPI contains the set of methods on the IoTHubsClient type. +type IoTHubsClientAPI interface { + List(ctx context.Context, resourceGroupName string, resourceName string) (result digitaltwins.IntegrationResourceListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result digitaltwins.IntegrationResourceListResultIterator, err error) +} + +var _ IoTHubsClientAPI = (*digitaltwins.IoTHubsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result digitaltwins.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result digitaltwins.OperationListResultIterator, err error) +} + +var _ OperationsClientAPI = (*digitaltwins.OperationsClient)(nil) diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/endpoint.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/endpoint.go new file mode 100644 index 000000000000..3b3d018bf228 --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/endpoint.go @@ -0,0 +1,451 @@ +package digitaltwins + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "github.com/satori/go.uuid" + "net/http" +) + +// EndpointClient is the azure Digital Twins Client for managing DigitalTwinsInstance +type EndpointClient struct { + BaseClient +} + +// NewEndpointClient creates an instance of the EndpointClient client. +func NewEndpointClient(subscriptionID uuid.UUID) EndpointClient { + return NewEndpointClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEndpointClientWithBaseURI creates an instance of the EndpointClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewEndpointClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) EndpointClient { + return EndpointClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update DigitalTwinsInstance endpoint. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +// endpointName - name of Endpoint Resource. +// endpointDescription - the DigitalTwinsInstance endpoint metadata and security metadata. +func (client EndpointClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, endpointDescription EndpointResource) (result EndpointCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: endpointName, + Constraints: []validation.Constraint{{Target: "endpointName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "endpointName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "endpointName", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.EndpointClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, endpointName, endpointDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client EndpointClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, endpointName string, endpointDescription EndpointResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "endpointName": autorest.Encode("path", endpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}", pathParameters), + autorest.WithJSON(endpointDescription), + 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 EndpointClient) CreateOrUpdateSender(req *http.Request) (future EndpointCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client EndpointClient) CreateOrUpdateResponder(resp *http.Response) (result EndpointResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a DigitalTwinsInstance endpoint. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +// endpointName - name of Endpoint Resource. +func (client EndpointClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, endpointName string) (result EndpointDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: endpointName, + Constraints: []validation.Constraint{{Target: "endpointName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "endpointName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "endpointName", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.EndpointClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, endpointName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client EndpointClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, endpointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "endpointName": autorest.Encode("path", endpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}", 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 EndpointClient) DeleteSender(req *http.Request) (future EndpointDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client EndpointClient) DeleteResponder(resp *http.Response) (result EndpointResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get DigitalTwinsInstances Endpoint. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +// endpointName - name of Endpoint Resource. +func (client EndpointClient) Get(ctx context.Context, resourceGroupName string, resourceName string, endpointName string) (result EndpointResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointClient.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: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: endpointName, + Constraints: []validation.Constraint{{Target: "endpointName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "endpointName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "endpointName", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.EndpointClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, endpointName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client EndpointClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, endpointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "endpointName": autorest.Encode("path", endpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client EndpointClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client EndpointClient) GetResponder(resp *http.Response) (result EndpointResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get DigitalTwinsInstance Endpoints. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +func (client EndpointClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result EndpointResourceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointClient.List") + defer func() { + sc := -1 + if result.erlr.Response.Response != nil { + sc = result.erlr.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: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.EndpointClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.erlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "List", resp, "Failure sending request") + return + } + + result.erlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client EndpointClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints", 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 EndpointClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client EndpointClient) ListResponder(resp *http.Response) (result EndpointResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client EndpointClient) listNextResults(ctx context.Context, lastResults EndpointResourceListResult) (result EndpointResourceListResult, err error) { + req, err := lastResults.endpointResourceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "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, "digitaltwins.EndpointClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client EndpointClient) ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result EndpointResourceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointClient.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, resourceName) + return +} diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/iothub.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/iothub.go new file mode 100644 index 000000000000..72923b24d918 --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/iothub.go @@ -0,0 +1,281 @@ +package digitaltwins + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "github.com/satori/go.uuid" + "net/http" +) + +// IoTHubClient is the azure Digital Twins Client for managing DigitalTwinsInstance +type IoTHubClient struct { + BaseClient +} + +// NewIoTHubClient creates an instance of the IoTHubClient client. +func NewIoTHubClient(subscriptionID uuid.UUID) IoTHubClient { + return NewIoTHubClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIoTHubClientWithBaseURI creates an instance of the IoTHubClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewIoTHubClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) IoTHubClient { + return IoTHubClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or Updates an IoTHub Integration with DigitalTwinsInstances. +// Parameters: +// scope - the scope of the Digital Twins Integration. The scope has to be an IoTHub resource. For example, +// /{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IoTHubs/{resourceName}. +// integrationResourceName - name of IoTHub and DigitalTwinsInstance integration instance. +// iotHubDescription - the IoTHub metadata. +func (client IoTHubClient) CreateOrUpdate(ctx context.Context, scope string, integrationResourceName string, iotHubDescription IntegrationResource) (result IntegrationResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IoTHubClient.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: integrationResourceName, + Constraints: []validation.Constraint{{Target: "integrationResourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "integrationResourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.IoTHubClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, scope, integrationResourceName, iotHubDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client IoTHubClient) CreateOrUpdatePreparer(ctx context.Context, scope string, integrationResourceName string, iotHubDescription IntegrationResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationResourceName": autorest.Encode("path", integrationResourceName), + "scope": autorest.Encode("path", scope), + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.DigitalTwins/integrationResources/{integrationResourceName}", pathParameters), + autorest.WithJSON(iotHubDescription)) + 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 IoTHubClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client IoTHubClient) CreateOrUpdateResponder(resp *http.Response) (result IntegrationResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a DigitalTwinsInstance link with IoTHub. +// Parameters: +// scope - the scope of the Digital Twins Integration. The scope has to be an IoTHub resource. For example, +// /{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IoTHubs/{resourceName}. +// integrationResourceName - name of IoTHub and DigitalTwinsInstance integration instance. +func (client IoTHubClient) Delete(ctx context.Context, scope string, integrationResourceName string) (result IoTHubDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IoTHubClient.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: integrationResourceName, + Constraints: []validation.Constraint{{Target: "integrationResourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "integrationResourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.IoTHubClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, scope, integrationResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client IoTHubClient) DeletePreparer(ctx context.Context, scope string, integrationResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationResourceName": autorest.Encode("path", integrationResourceName), + "scope": autorest.Encode("path", scope), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.DigitalTwins/integrationResources/{integrationResourceName}", pathParameters)) + 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 IoTHubClient) DeleteSender(req *http.Request) (future IoTHubDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client IoTHubClient) DeleteResponder(resp *http.Response) (result IntegrationResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets properties of an IoTHub Integration. +// Parameters: +// scope - the scope of the Digital Twins Integration. The scope has to be an IoTHub resource. For example, +// /{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IoTHubs/{resourceName}. +// integrationResourceName - name of IoTHub and DigitalTwinsInstance integration instance. +func (client IoTHubClient) Get(ctx context.Context, scope string, integrationResourceName string) (result IntegrationResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IoTHubClient.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: integrationResourceName, + Constraints: []validation.Constraint{{Target: "integrationResourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "integrationResourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.IoTHubClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, scope, integrationResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client IoTHubClient) GetPreparer(ctx context.Context, scope string, integrationResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "integrationResourceName": autorest.Encode("path", integrationResourceName), + "scope": autorest.Encode("path", scope), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.DigitalTwins/integrationResources/{integrationResourceName}", pathParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client IoTHubClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IoTHubClient) GetResponder(resp *http.Response) (result IntegrationResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/iothubs.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/iothubs.go new file mode 100644 index 000000000000..663bf4d76df7 --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/iothubs.go @@ -0,0 +1,169 @@ +package digitaltwins + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "github.com/satori/go.uuid" + "net/http" +) + +// IoTHubsClient is the azure Digital Twins Client for managing DigitalTwinsInstance +type IoTHubsClient struct { + BaseClient +} + +// NewIoTHubsClient creates an instance of the IoTHubsClient client. +func NewIoTHubsClient(subscriptionID uuid.UUID) IoTHubsClient { + return NewIoTHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIoTHubsClientWithBaseURI creates an instance of the IoTHubsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewIoTHubsClientWithBaseURI(baseURI string, subscriptionID uuid.UUID) IoTHubsClient { + return IoTHubsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List get DigitalTwinsInstance IoTHubs. +// Parameters: +// resourceGroupName - the name of the resource group that contains the DigitalTwinsInstance. +// resourceName - the name of the DigitalTwinsInstance. +func (client IoTHubsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result IntegrationResourceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IoTHubsClient.List") + 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: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("digitaltwins.IoTHubsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.irlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubsClient", "List", resp, "Failure sending request") + return + } + + result.irlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client IoTHubsClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/integrationResources", 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 IoTHubsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IoTHubsClient) ListResponder(resp *http.Response) (result IntegrationResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client IoTHubsClient) listNextResults(ctx context.Context, lastResults IntegrationResourceListResult) (result IntegrationResourceListResult, err error) { + req, err := lastResults.integrationResourceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "digitaltwins.IoTHubsClient", "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, "digitaltwins.IoTHubsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client IoTHubsClient) ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result IntegrationResourceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IoTHubsClient.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, resourceName) + return +} diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/models.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/models.go new file mode 100644 index 000000000000..ae3b11035aa5 --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/models.go @@ -0,0 +1,1659 @@ +package digitaltwins + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins" + +// EndpointProvisioningState enumerates the values for endpoint provisioning state. +type EndpointProvisioningState string + +const ( + // Canceled ... + Canceled EndpointProvisioningState = "Canceled" + // Deleting ... + Deleting EndpointProvisioningState = "Deleting" + // Failed ... + Failed EndpointProvisioningState = "Failed" + // Provisioning ... + Provisioning EndpointProvisioningState = "Provisioning" + // Succeeded ... + Succeeded EndpointProvisioningState = "Succeeded" +) + +// PossibleEndpointProvisioningStateValues returns an array of possible values for the EndpointProvisioningState const type. +func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState { + return []EndpointProvisioningState{Canceled, Deleting, Failed, Provisioning, Succeeded} +} + +// EndpointType enumerates the values for endpoint type. +type EndpointType string + +const ( + // EndpointTypeDigitalTwinsEndpointResourceProperties ... + EndpointTypeDigitalTwinsEndpointResourceProperties EndpointType = "DigitalTwinsEndpointResourceProperties" + // EndpointTypeEventGrid ... + EndpointTypeEventGrid EndpointType = "EventGrid" + // EndpointTypeEventHub ... + EndpointTypeEventHub EndpointType = "EventHub" + // EndpointTypeServiceBus ... + EndpointTypeServiceBus EndpointType = "ServiceBus" +) + +// PossibleEndpointTypeValues returns an array of possible values for the EndpointType const type. +func PossibleEndpointTypeValues() []EndpointType { + return []EndpointType{EndpointTypeDigitalTwinsEndpointResourceProperties, EndpointTypeEventGrid, EndpointTypeEventHub, EndpointTypeServiceBus} +} + +// IntegrationResourceState enumerates the values for integration resource state. +type IntegrationResourceState string + +const ( + // IntegrationResourceStateCanceled ... + IntegrationResourceStateCanceled IntegrationResourceState = "Canceled" + // IntegrationResourceStateDeleting ... + IntegrationResourceStateDeleting IntegrationResourceState = "Deleting" + // IntegrationResourceStateFailed ... + IntegrationResourceStateFailed IntegrationResourceState = "Failed" + // IntegrationResourceStateProvisioning ... + IntegrationResourceStateProvisioning IntegrationResourceState = "Provisioning" + // IntegrationResourceStateSucceeded ... + IntegrationResourceStateSucceeded IntegrationResourceState = "Succeeded" +) + +// PossibleIntegrationResourceStateValues returns an array of possible values for the IntegrationResourceState const type. +func PossibleIntegrationResourceStateValues() []IntegrationResourceState { + return []IntegrationResourceState{IntegrationResourceStateCanceled, IntegrationResourceStateDeleting, IntegrationResourceStateFailed, IntegrationResourceStateProvisioning, IntegrationResourceStateSucceeded} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateCanceled ... + ProvisioningStateCanceled ProvisioningState = "Canceled" + // 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{ProvisioningStateCanceled, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateProvisioning, ProvisioningStateSucceeded} +} + +// Reason enumerates the values for reason. +type Reason string + +const ( + // AlreadyExists ... + AlreadyExists Reason = "AlreadyExists" + // Invalid ... + Invalid Reason = "Invalid" +) + +// PossibleReasonValues returns an array of possible values for the Reason const type. +func PossibleReasonValues() []Reason { + return []Reason{AlreadyExists, Invalid} +} + +// CheckNameRequest the result returned from a database check name availability request. +type CheckNameRequest struct { + // Name - Resource name. + Name *string `json:"name,omitempty"` + // Type - The type of resource, for instance Microsoft.DigitalTwins/digitalTwinsInstances. + Type *string `json:"type,omitempty"` +} + +// CheckNameResult the result returned from a check name availability request. +type CheckNameResult struct { + autorest.Response `json:"-"` + // NameAvailable - Specifies a Boolean value that indicates if the name is available. + NameAvailable *bool `json:"nameAvailable,omitempty"` + // Name - The name that was checked. + Name *string `json:"name,omitempty"` + // Message - Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. + Message *string `json:"message,omitempty"` + // Reason - Message providing the reason why the given name is invalid. Possible values include: 'Invalid', 'AlreadyExists' + Reason Reason `json:"reason,omitempty"` +} + +// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CreateOrUpdateFuture) Result(client Client) (d Description, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("digitaltwins.CreateOrUpdateFuture") + 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, "digitaltwins.CreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request") + } + } + return +} + +// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type DeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DeleteFuture) Result(client Client) (d Description, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.DeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("digitaltwins.DeleteFuture") + 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.DeleteResponder(d.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.DeleteFuture", "Result", d.Response.Response, "Failure responding to request") + } + } + return +} + +// Description the description of the DigitalTwins service. +type Description struct { + autorest.Response `json:"-"` + // Properties - DigitalTwins instance properties. + *Properties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` + // Sku - The resource sku. + Sku *SkuInfo `json:"sku,omitempty"` +} + +// MarshalJSON is the custom marshaler for Description. +func (d Description) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if d.Properties != nil { + objectMap["properties"] = d.Properties + } + if d.Location != nil { + objectMap["location"] = d.Location + } + if d.Tags != nil { + objectMap["tags"] = d.Tags + } + if d.Sku != nil { + objectMap["sku"] = d.Sku + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Description struct. +func (d *Description) UnmarshalJSON(body []byte) error { + var m map[string]*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 properties Properties + err = json.Unmarshal(*v, &properties) + if err != nil { + return err + } + d.Properties = &properties + } + 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 + } + case "sku": + if v != nil { + var sku SkuInfo + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + d.Sku = &sku + } + } + } + + return nil +} + +// DescriptionListResult a list of DigitalTwins description objects with a next link. +type DescriptionListResult struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of DigitalTwins description objects. + NextLink *string `json:"nextLink,omitempty"` + // Value - A list of DigitalTwins description objects. + Value *[]Description `json:"value,omitempty"` +} + +// DescriptionListResultIterator provides access to a complete listing of Description values. +type DescriptionListResultIterator struct { + i int + page DescriptionListResultPage +} + +// 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 *DescriptionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DescriptionListResultIterator.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 *DescriptionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DescriptionListResultIterator) 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 DescriptionListResultIterator) Response() DescriptionListResult { + 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 DescriptionListResultIterator) Value() Description { + if !iter.page.NotDone() { + return Description{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DescriptionListResultIterator type. +func NewDescriptionListResultIterator(page DescriptionListResultPage) DescriptionListResultIterator { + return DescriptionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dlr DescriptionListResult) IsEmpty() bool { + return dlr.Value == nil || len(*dlr.Value) == 0 +} + +// descriptionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dlr DescriptionListResult) descriptionListResultPreparer(ctx context.Context) (*http.Request, error) { + if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dlr.NextLink))) +} + +// DescriptionListResultPage contains a page of Description values. +type DescriptionListResultPage struct { + fn func(context.Context, DescriptionListResult) (DescriptionListResult, error) + dlr DescriptionListResult +} + +// 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 *DescriptionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DescriptionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.dlr) + if err != nil { + return err + } + page.dlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *DescriptionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DescriptionListResultPage) NotDone() bool { + return !page.dlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DescriptionListResultPage) Response() DescriptionListResult { + return page.dlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DescriptionListResultPage) Values() []Description { + if page.dlr.IsEmpty() { + return nil + } + return *page.dlr.Value +} + +// Creates a new instance of the DescriptionListResultPage type. +func NewDescriptionListResultPage(getNextPage func(context.Context, DescriptionListResult) (DescriptionListResult, error)) DescriptionListResultPage { + return DescriptionListResultPage{fn: getNextPage} +} + +// EndpointCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type EndpointCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *EndpointCreateOrUpdateFuture) Result(client EndpointClient) (er EndpointResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("digitaltwins.EndpointCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if er.Response.Response, err = future.GetResult(sender); err == nil && er.Response.Response.StatusCode != http.StatusNoContent { + er, err = client.CreateOrUpdateResponder(er.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointCreateOrUpdateFuture", "Result", er.Response.Response, "Failure responding to request") + } + } + return +} + +// EndpointDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type EndpointDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *EndpointDeleteFuture) Result(client EndpointClient) (er EndpointResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("digitaltwins.EndpointDeleteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if er.Response.Response, err = future.GetResult(sender); err == nil && er.Response.Response.StatusCode != http.StatusNoContent { + er, err = client.DeleteResponder(er.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.EndpointDeleteFuture", "Result", er.Response.Response, "Failure responding to request") + } + } + return +} + +// EndpointResource digitalTwinsInstance endpoint resource. +type EndpointResource struct { + autorest.Response `json:"-"` + // BasicEndpointResourceProperties - DigitalTwinsInstance endpoint resource properties. + BasicEndpointResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Extension resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for EndpointResource. +func (er EndpointResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = er.BasicEndpointResourceProperties + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for EndpointResource struct. +func (er *EndpointResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + basicEndpointResourceProperties, err := unmarshalBasicEndpointResourceProperties(*v) + if err != nil { + return err + } + er.BasicEndpointResourceProperties = basicEndpointResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + er.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + er.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + er.Type = &typeVar + } + } + } + + return nil +} + +// EndpointResourceListResult a list of DigitalTwinsInstance Endpoints with a next link. +type EndpointResourceListResult struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of DigitalTwinsInstance Endpoints. + NextLink *string `json:"nextLink,omitempty"` + // Value - A list of DigitalTwinsInstance Endpoints. + Value *[]EndpointResource `json:"value,omitempty"` +} + +// EndpointResourceListResultIterator provides access to a complete listing of EndpointResource values. +type EndpointResourceListResultIterator struct { + i int + page EndpointResourceListResultPage +} + +// 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 *EndpointResourceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointResourceListResultIterator.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 *EndpointResourceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EndpointResourceListResultIterator) 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 EndpointResourceListResultIterator) Response() EndpointResourceListResult { + 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 EndpointResourceListResultIterator) Value() EndpointResource { + if !iter.page.NotDone() { + return EndpointResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EndpointResourceListResultIterator type. +func NewEndpointResourceListResultIterator(page EndpointResourceListResultPage) EndpointResourceListResultIterator { + return EndpointResourceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erlr EndpointResourceListResult) IsEmpty() bool { + return erlr.Value == nil || len(*erlr.Value) == 0 +} + +// endpointResourceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erlr EndpointResourceListResult) endpointResourceListResultPreparer(ctx context.Context) (*http.Request, error) { + if erlr.NextLink == nil || len(to.String(erlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erlr.NextLink))) +} + +// EndpointResourceListResultPage contains a page of EndpointResource values. +type EndpointResourceListResultPage struct { + fn func(context.Context, EndpointResourceListResult) (EndpointResourceListResult, error) + erlr EndpointResourceListResult +} + +// 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 *EndpointResourceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointResourceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.erlr) + if err != nil { + return err + } + page.erlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *EndpointResourceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EndpointResourceListResultPage) NotDone() bool { + return !page.erlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EndpointResourceListResultPage) Response() EndpointResourceListResult { + return page.erlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EndpointResourceListResultPage) Values() []EndpointResource { + if page.erlr.IsEmpty() { + return nil + } + return *page.erlr.Value +} + +// Creates a new instance of the EndpointResourceListResultPage type. +func NewEndpointResourceListResultPage(getNextPage func(context.Context, EndpointResourceListResult) (EndpointResourceListResult, error)) EndpointResourceListResultPage { + return EndpointResourceListResultPage{fn: getNextPage} +} + +// BasicEndpointResourceProperties properties related to Digital Twins Endpoint +type BasicEndpointResourceProperties interface { + AsServiceBus() (*ServiceBus, bool) + AsEventHub() (*EventHub, bool) + AsEventGrid() (*EventGrid, bool) + AsEndpointResourceProperties() (*EndpointResourceProperties, bool) +} + +// EndpointResourceProperties properties related to Digital Twins Endpoint +type EndpointResourceProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'Provisioning', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + ProvisioningState EndpointProvisioningState `json:"provisioningState,omitempty"` + // CreatedTime - READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` + // EndpointType - Possible values include: 'EndpointTypeDigitalTwinsEndpointResourceProperties', 'EndpointTypeServiceBus', 'EndpointTypeEventHub', 'EndpointTypeEventGrid' + EndpointType EndpointType `json:"endpointType,omitempty"` +} + +func unmarshalBasicEndpointResourceProperties(body []byte) (BasicEndpointResourceProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["endpointType"] { + case string(EndpointTypeServiceBus): + var sb ServiceBus + err := json.Unmarshal(body, &sb) + return sb, err + case string(EndpointTypeEventHub): + var eh EventHub + err := json.Unmarshal(body, &eh) + return eh, err + case string(EndpointTypeEventGrid): + var eg EventGrid + err := json.Unmarshal(body, &eg) + return eg, err + default: + var erp EndpointResourceProperties + err := json.Unmarshal(body, &erp) + return erp, err + } +} +func unmarshalBasicEndpointResourcePropertiesArray(body []byte) ([]BasicEndpointResourceProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + erpArray := make([]BasicEndpointResourceProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + erp, err := unmarshalBasicEndpointResourceProperties(*rawMessage) + if err != nil { + return nil, err + } + erpArray[index] = erp + } + return erpArray, nil +} + +// MarshalJSON is the custom marshaler for EndpointResourceProperties. +func (erp EndpointResourceProperties) MarshalJSON() ([]byte, error) { + erp.EndpointType = EndpointTypeDigitalTwinsEndpointResourceProperties + objectMap := make(map[string]interface{}) + if erp.Tags != nil { + objectMap["tags"] = erp.Tags + } + if erp.EndpointType != "" { + objectMap["endpointType"] = erp.EndpointType + } + return json.Marshal(objectMap) +} + +// AsServiceBus is the BasicEndpointResourceProperties implementation for EndpointResourceProperties. +func (erp EndpointResourceProperties) AsServiceBus() (*ServiceBus, bool) { + return nil, false +} + +// AsEventHub is the BasicEndpointResourceProperties implementation for EndpointResourceProperties. +func (erp EndpointResourceProperties) AsEventHub() (*EventHub, bool) { + return nil, false +} + +// AsEventGrid is the BasicEndpointResourceProperties implementation for EndpointResourceProperties. +func (erp EndpointResourceProperties) AsEventGrid() (*EventGrid, bool) { + return nil, false +} + +// AsEndpointResourceProperties is the BasicEndpointResourceProperties implementation for EndpointResourceProperties. +func (erp EndpointResourceProperties) AsEndpointResourceProperties() (*EndpointResourceProperties, bool) { + return &erp, true +} + +// AsBasicEndpointResourceProperties is the BasicEndpointResourceProperties implementation for EndpointResourceProperties. +func (erp EndpointResourceProperties) AsBasicEndpointResourceProperties() (BasicEndpointResourceProperties, bool) { + return &erp, true +} + +// ErrorDefinition error definition. +type ErrorDefinition struct { + // Code - READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; Description of the error. + Message *string `json:"message,omitempty"` + // Details - READ-ONLY; Internal error details. + Details *[]ErrorDefinition `json:"details,omitempty"` +} + +// ErrorResponse error response. +type ErrorResponse struct { + // Error - Error description + Error *ErrorDefinition `json:"error,omitempty"` +} + +// EventGrid properties related to eventgrid. +type EventGrid struct { + // TopicEndpoint - EventGrid Topic Endpoint + TopicEndpoint *string `json:"TopicEndpoint,omitempty"` + // AccessKey1 - EventGrid secondary accesskey. Will be obfuscated during read + AccessKey1 *string `json:"accessKey1,omitempty"` + // AccessKey2 - EventGrid secondary accesskey. Will be obfuscated during read + AccessKey2 *string `json:"accessKey2,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'Provisioning', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + ProvisioningState EndpointProvisioningState `json:"provisioningState,omitempty"` + // CreatedTime - READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` + // EndpointType - Possible values include: 'EndpointTypeDigitalTwinsEndpointResourceProperties', 'EndpointTypeServiceBus', 'EndpointTypeEventHub', 'EndpointTypeEventGrid' + EndpointType EndpointType `json:"endpointType,omitempty"` +} + +// MarshalJSON is the custom marshaler for EventGrid. +func (eg EventGrid) MarshalJSON() ([]byte, error) { + eg.EndpointType = EndpointTypeEventGrid + objectMap := make(map[string]interface{}) + if eg.TopicEndpoint != nil { + objectMap["TopicEndpoint"] = eg.TopicEndpoint + } + if eg.AccessKey1 != nil { + objectMap["accessKey1"] = eg.AccessKey1 + } + if eg.AccessKey2 != nil { + objectMap["accessKey2"] = eg.AccessKey2 + } + if eg.Tags != nil { + objectMap["tags"] = eg.Tags + } + if eg.EndpointType != "" { + objectMap["endpointType"] = eg.EndpointType + } + return json.Marshal(objectMap) +} + +// AsServiceBus is the BasicEndpointResourceProperties implementation for EventGrid. +func (eg EventGrid) AsServiceBus() (*ServiceBus, bool) { + return nil, false +} + +// AsEventHub is the BasicEndpointResourceProperties implementation for EventGrid. +func (eg EventGrid) AsEventHub() (*EventHub, bool) { + return nil, false +} + +// AsEventGrid is the BasicEndpointResourceProperties implementation for EventGrid. +func (eg EventGrid) AsEventGrid() (*EventGrid, bool) { + return &eg, true +} + +// AsEndpointResourceProperties is the BasicEndpointResourceProperties implementation for EventGrid. +func (eg EventGrid) AsEndpointResourceProperties() (*EndpointResourceProperties, bool) { + return nil, false +} + +// AsBasicEndpointResourceProperties is the BasicEndpointResourceProperties implementation for EventGrid. +func (eg EventGrid) AsBasicEndpointResourceProperties() (BasicEndpointResourceProperties, bool) { + return &eg, true +} + +// EventHub properties related to eventhub. +type EventHub struct { + // ConnectionStringPrimaryKey - PrimaryConnectionString of the endpoint. Will be obfuscated during read + ConnectionStringPrimaryKey *string `json:"connectionString-PrimaryKey,omitempty"` + // ConnectionStringSecondaryKey - SecondaryConnectionString of the endpoint. Will be obfuscated during read + ConnectionStringSecondaryKey *string `json:"connectionString-SecondaryKey,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'Provisioning', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + ProvisioningState EndpointProvisioningState `json:"provisioningState,omitempty"` + // CreatedTime - READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` + // EndpointType - Possible values include: 'EndpointTypeDigitalTwinsEndpointResourceProperties', 'EndpointTypeServiceBus', 'EndpointTypeEventHub', 'EndpointTypeEventGrid' + EndpointType EndpointType `json:"endpointType,omitempty"` +} + +// MarshalJSON is the custom marshaler for EventHub. +func (eh EventHub) MarshalJSON() ([]byte, error) { + eh.EndpointType = EndpointTypeEventHub + objectMap := make(map[string]interface{}) + if eh.ConnectionStringPrimaryKey != nil { + objectMap["connectionString-PrimaryKey"] = eh.ConnectionStringPrimaryKey + } + if eh.ConnectionStringSecondaryKey != nil { + objectMap["connectionString-SecondaryKey"] = eh.ConnectionStringSecondaryKey + } + if eh.Tags != nil { + objectMap["tags"] = eh.Tags + } + if eh.EndpointType != "" { + objectMap["endpointType"] = eh.EndpointType + } + return json.Marshal(objectMap) +} + +// AsServiceBus is the BasicEndpointResourceProperties implementation for EventHub. +func (eh EventHub) AsServiceBus() (*ServiceBus, bool) { + return nil, false +} + +// AsEventHub is the BasicEndpointResourceProperties implementation for EventHub. +func (eh EventHub) AsEventHub() (*EventHub, bool) { + return &eh, true +} + +// AsEventGrid is the BasicEndpointResourceProperties implementation for EventHub. +func (eh EventHub) AsEventGrid() (*EventGrid, bool) { + return nil, false +} + +// AsEndpointResourceProperties is the BasicEndpointResourceProperties implementation for EventHub. +func (eh EventHub) AsEndpointResourceProperties() (*EndpointResourceProperties, bool) { + return nil, false +} + +// AsBasicEndpointResourceProperties is the BasicEndpointResourceProperties implementation for EventHub. +func (eh EventHub) AsBasicEndpointResourceProperties() (BasicEndpointResourceProperties, bool) { + return &eh, true +} + +// ExternalResource definition of a Resource. +type ExternalResource struct { + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Extension resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// IntegrationResource ioTHub integration resource. +type IntegrationResource struct { + autorest.Response `json:"-"` + // IntegrationResourceProperties - IoTHub integration resource properties. + *IntegrationResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Extension resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationResource. +func (ir IntegrationResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ir.IntegrationResourceProperties != nil { + objectMap["properties"] = ir.IntegrationResourceProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationResource struct. +func (ir *IntegrationResource) UnmarshalJSON(body []byte) error { + var m map[string]*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 integrationResourceProperties IntegrationResourceProperties + err = json.Unmarshal(*v, &integrationResourceProperties) + if err != nil { + return err + } + ir.IntegrationResourceProperties = &integrationResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ir.Type = &typeVar + } + } + } + + return nil +} + +// IntegrationResourceListResult a list of DigitalTwinsInstance IoTHubs with a next link. +type IntegrationResourceListResult struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of DigitalTwinsInstance IoTHubs. + NextLink *string `json:"nextLink,omitempty"` + // Value - A list of DigitalTwinsInstance IoTHubs. + Value *[]IntegrationResource `json:"value,omitempty"` +} + +// IntegrationResourceListResultIterator provides access to a complete listing of IntegrationResource +// values. +type IntegrationResourceListResultIterator struct { + i int + page IntegrationResourceListResultPage +} + +// 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 *IntegrationResourceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationResourceListResultIterator.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 *IntegrationResourceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter IntegrationResourceListResultIterator) 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 IntegrationResourceListResultIterator) Response() IntegrationResourceListResult { + 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 IntegrationResourceListResultIterator) Value() IntegrationResource { + if !iter.page.NotDone() { + return IntegrationResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the IntegrationResourceListResultIterator type. +func NewIntegrationResourceListResultIterator(page IntegrationResourceListResultPage) IntegrationResourceListResultIterator { + return IntegrationResourceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (irlr IntegrationResourceListResult) IsEmpty() bool { + return irlr.Value == nil || len(*irlr.Value) == 0 +} + +// integrationResourceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (irlr IntegrationResourceListResult) integrationResourceListResultPreparer(ctx context.Context) (*http.Request, error) { + if irlr.NextLink == nil || len(to.String(irlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(irlr.NextLink))) +} + +// IntegrationResourceListResultPage contains a page of IntegrationResource values. +type IntegrationResourceListResultPage struct { + fn func(context.Context, IntegrationResourceListResult) (IntegrationResourceListResult, error) + irlr IntegrationResourceListResult +} + +// 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 *IntegrationResourceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationResourceListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.irlr) + if err != nil { + return err + } + page.irlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *IntegrationResourceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IntegrationResourceListResultPage) NotDone() bool { + return !page.irlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page IntegrationResourceListResultPage) Response() IntegrationResourceListResult { + return page.irlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page IntegrationResourceListResultPage) Values() []IntegrationResource { + if page.irlr.IsEmpty() { + return nil + } + return *page.irlr.Value +} + +// Creates a new instance of the IntegrationResourceListResultPage type. +func NewIntegrationResourceListResultPage(getNextPage func(context.Context, IntegrationResourceListResult) (IntegrationResourceListResult, error)) IntegrationResourceListResultPage { + return IntegrationResourceListResultPage{fn: getNextPage} +} + +// IntegrationResourceProperties properties related to the IoTHub DigitalTwinsInstance Integration +// Resource. +type IntegrationResourceProperties struct { + // ResourceID - Fully qualified resource identifier of the DigitalTwins Azure resource. + ResourceID *string `json:"resourceId,omitempty"` + // CreatedTime - READ-ONLY; Time when the IoTHub was added to DigitalTwinsInstance. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // ProvisioningState - READ-ONLY; DigitalTwinsInstance - IoTHub link state. Possible values include: 'IntegrationResourceStateProvisioning', 'IntegrationResourceStateDeleting', 'IntegrationResourceStateSucceeded', 'IntegrationResourceStateFailed', 'IntegrationResourceStateCanceled' + ProvisioningState IntegrationResourceState `json:"provisioningState,omitempty"` +} + +// IntegrationResourceState1 properties related to the IoTHub DigitalTwinsInstance Integration Resource. +type IntegrationResourceState1 struct { + // ProvisioningState - READ-ONLY; DigitalTwinsInstance - IoTHub link state. Possible values include: 'IntegrationResourceStateProvisioning', 'IntegrationResourceStateDeleting', 'IntegrationResourceStateSucceeded', 'IntegrationResourceStateFailed', 'IntegrationResourceStateCanceled' + ProvisioningState IntegrationResourceState `json:"provisioningState,omitempty"` +} + +// IntegrationResourceUpdateInfo ioTHub integration resource. +type IntegrationResourceUpdateInfo struct { + // IntegrationResourceUpdateProperties - IoTHub integration resource properties to be updated. + *IntegrationResourceUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Extension resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for IntegrationResourceUpdateInfo. +func (irui IntegrationResourceUpdateInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if irui.IntegrationResourceUpdateProperties != nil { + objectMap["properties"] = irui.IntegrationResourceUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for IntegrationResourceUpdateInfo struct. +func (irui *IntegrationResourceUpdateInfo) UnmarshalJSON(body []byte) error { + var m map[string]*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 integrationResourceUpdateProperties IntegrationResourceUpdateProperties + err = json.Unmarshal(*v, &integrationResourceUpdateProperties) + if err != nil { + return err + } + irui.IntegrationResourceUpdateProperties = &integrationResourceUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + irui.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + irui.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + irui.Type = &typeVar + } + } + } + + return nil +} + +// IntegrationResourceUpdateProperties updatable properties related to the IoTHub DigitalTwinsInstance +// Integration Resource. +type IntegrationResourceUpdateProperties struct { + // ProvisioningState - READ-ONLY; DigitalTwinsInstance - IoTHub link state. Possible values include: 'IntegrationResourceStateProvisioning', 'IntegrationResourceStateDeleting', 'IntegrationResourceStateSucceeded', 'IntegrationResourceStateFailed', 'IntegrationResourceStateCanceled' + ProvisioningState IntegrationResourceState `json:"provisioningState,omitempty"` +} + +// IoTHubDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type IoTHubDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *IoTHubDeleteFuture) Result(client IoTHubClient) (ir IntegrationResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("digitaltwins.IoTHubDeleteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ir.Response.Response, err = future.GetResult(sender); err == nil && ir.Response.Response.StatusCode != http.StatusNoContent { + ir, err = client.DeleteResponder(ir.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.IoTHubDeleteFuture", "Result", ir.Response.Response, "Failure responding to request") + } + } + return +} + +// Operation digitalTwins service REST API operation +type Operation struct { + // Name - READ-ONLY; Operation name: {provider}/{resource}/{read | write | action | delete} + Name *string `json:"name,omitempty"` + // Display - Operation properties display + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay the object that represents the operation. +type OperationDisplay struct { + // Provider - READ-ONLY; Service provider: Microsoft DigitalTwins + Provider *string `json:"provider,omitempty"` + // Resource - READ-ONLY; Resource Type: DigitalTwinsInstances + Resource *string `json:"resource,omitempty"` + // Operation - READ-ONLY; Name of the operation + Operation *string `json:"operation,omitempty"` + // Description - READ-ONLY; Friendly description for the operation, + Description *string `json:"description,omitempty"` +} + +// OperationListResult a list of DigitalTwins service operations. It contains a list of operations and a +// URL link to get the next set of results. +type OperationListResult struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of DigitalTwins description objects. + NextLink *string `json:"nextLink,omitempty"` + // Value - READ-ONLY; A list of DigitalTwins operations supported by the Microsoft.DigitalTwins resource provider. + Value *[]Operation `json:"value,omitempty"` +} + +// OperationListResultIterator provides access to a complete listing of Operation values. +type OperationListResultIterator struct { + i int + page OperationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *OperationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OperationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter OperationListResultIterator) Response() OperationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter OperationListResultIterator) Value() Operation { + if !iter.page.NotDone() { + return Operation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (olr OperationListResult) IsEmpty() bool { + return olr.Value == nil || len(*olr.Value) == 0 +} + +// operationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(olr.NextLink))) +} + +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(context.Context, OperationListResult) (OperationListResult, error) + olr OperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationListResultPage) Response() OperationListResult { + return page.olr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { + return nil + } + return *page.olr.Value +} + +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + +// PatchDescription the description of the DigitalTwins service. +type PatchDescription struct { + // Tags - Instance tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for PatchDescription. +func (pd PatchDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pd.Tags != nil { + objectMap["tags"] = pd.Tags + } + return json.Marshal(objectMap) +} + +// Properties the properties of a DigitalTwinsInstance. +type Properties struct { + // CreatedTime - READ-ONLY; Time when DigitalTwinsInstance was created. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // LastUpdatedTime - READ-ONLY; Time when DigitalTwinsInstance was created. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'ProvisioningStateProvisioning', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // HostName - READ-ONLY; Api endpoint to work with DigitalTwinsInstance. + HostName *string `json:"hostName,omitempty"` +} + +// Resource the common properties of a DigitalTwinsInstance. +type Resource struct { + // ID - READ-ONLY; The resource identifier. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Location - The resource location. + Location *string `json:"location,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` + // Sku - The resource sku. + Sku *SkuInfo `json:"sku,omitempty"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + if r.Sku != nil { + objectMap["sku"] = r.Sku + } + return json.Marshal(objectMap) +} + +// ServiceBus properties related to servicebus. +type ServiceBus struct { + // PrimaryConnectionString - PrimaryConnectionString of the endpoint. Will be obfuscated during read + PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"` + // SecondaryConnectionString - SecondaryConnectionString of the endpoint. Will be obfuscated during read + SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state. Possible values include: 'Provisioning', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + ProvisioningState EndpointProvisioningState `json:"provisioningState,omitempty"` + // CreatedTime - READ-ONLY; Time when the Endpoint was added to DigitalTwinsInstance. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // Tags - The resource tags. + Tags map[string]*string `json:"tags"` + // EndpointType - Possible values include: 'EndpointTypeDigitalTwinsEndpointResourceProperties', 'EndpointTypeServiceBus', 'EndpointTypeEventHub', 'EndpointTypeEventGrid' + EndpointType EndpointType `json:"endpointType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceBus. +func (sb ServiceBus) MarshalJSON() ([]byte, error) { + sb.EndpointType = EndpointTypeServiceBus + objectMap := make(map[string]interface{}) + if sb.PrimaryConnectionString != nil { + objectMap["primaryConnectionString"] = sb.PrimaryConnectionString + } + if sb.SecondaryConnectionString != nil { + objectMap["secondaryConnectionString"] = sb.SecondaryConnectionString + } + if sb.Tags != nil { + objectMap["tags"] = sb.Tags + } + if sb.EndpointType != "" { + objectMap["endpointType"] = sb.EndpointType + } + return json.Marshal(objectMap) +} + +// AsServiceBus is the BasicEndpointResourceProperties implementation for ServiceBus. +func (sb ServiceBus) AsServiceBus() (*ServiceBus, bool) { + return &sb, true +} + +// AsEventHub is the BasicEndpointResourceProperties implementation for ServiceBus. +func (sb ServiceBus) AsEventHub() (*EventHub, bool) { + return nil, false +} + +// AsEventGrid is the BasicEndpointResourceProperties implementation for ServiceBus. +func (sb ServiceBus) AsEventGrid() (*EventGrid, bool) { + return nil, false +} + +// AsEndpointResourceProperties is the BasicEndpointResourceProperties implementation for ServiceBus. +func (sb ServiceBus) AsEndpointResourceProperties() (*EndpointResourceProperties, bool) { + return nil, false +} + +// AsBasicEndpointResourceProperties is the BasicEndpointResourceProperties implementation for ServiceBus. +func (sb ServiceBus) AsBasicEndpointResourceProperties() (BasicEndpointResourceProperties, bool) { + return &sb, true +} + +// SkuInfo information about the SKU of the DigitalTwinsInstance. +type SkuInfo struct { + // Name - The name of the SKU. + Name *string `json:"name,omitempty"` +} + +// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type UpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *UpdateFuture) Result(client Client) (d Description, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.UpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("digitaltwins.UpdateFuture") + 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, "digitaltwins.UpdateFuture", "Result", d.Response.Response, "Failure responding to request") + } + } + return +} diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/operations.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/operations.go new file mode 100644 index 000000000000..103a6a5373bc --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/operations.go @@ -0,0 +1,149 @@ +package digitaltwins + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "github.com/satori/go.uuid" + "net/http" +) + +// OperationsClient is the azure Digital Twins Client for managing DigitalTwinsInstance +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID uuid.UUID) 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 uuid.UUID) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available DigitalTwins service 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, "digitaltwins.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, "digitaltwins.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.olr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.DigitalTwins/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.operationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "digitaltwins.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, "digitaltwins.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "digitaltwins.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/version.go b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/version.go new file mode 100644 index 000000000000..ce86d4c221e9 --- /dev/null +++ b/services/preview/digitaltwins/mgmt/2020-03-01-preview/digitaltwins/version.go @@ -0,0 +1,30 @@ +package digitaltwins + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " digitaltwins/2020-03-01-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/preview/dns/mgmt/2015-05-04-preview/dns/client.go b/services/preview/dns/mgmt/2015-05-04-preview/dns/client.go index f8477391ab59..386c3f38444a 100644 --- a/services/preview/dns/mgmt/2015-05-04-preview/dns/client.go +++ b/services/preview/dns/mgmt/2015-05-04-preview/dns/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/dns/mgmt/2015-05-04-preview/dns/dnsapi/interfaces.go b/services/preview/dns/mgmt/2015-05-04-preview/dns/dnsapi/interfaces.go index 70576804bb65..0ad8df6dd926 100644 --- a/services/preview/dns/mgmt/2015-05-04-preview/dns/dnsapi/interfaces.go +++ b/services/preview/dns/mgmt/2015-05-04-preview/dns/dnsapi/interfaces.go @@ -29,7 +29,9 @@ type RecordSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, relativeRecordSetName string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, relativeRecordSetName string) (result dns.RecordSet, err error) List(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top string, filter string) (result dns.RecordSetListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top string, filter string) (result dns.RecordSetListResultIterator, err error) ListAll(ctx context.Context, resourceGroupName string, zoneName string, top string, filter string) (result dns.RecordSetListResultPage, err error) + ListAllComplete(ctx context.Context, resourceGroupName string, zoneName string, top string, filter string) (result dns.RecordSetListResultIterator, err error) } var _ RecordSetsClientAPI = (*dns.RecordSetsClient)(nil) @@ -40,7 +42,9 @@ type ZonesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, zoneName string) (result dns.Zone, err error) ListZonesInResourceGroup(ctx context.Context, resourceGroupName string, top string, filter string) (result dns.ZoneListResultPage, err error) + ListZonesInResourceGroupComplete(ctx context.Context, resourceGroupName string, top string, filter string) (result dns.ZoneListResultIterator, err error) ListZonesInSubscription(ctx context.Context, top string, filter string) (result dns.ZoneListResultPage, err error) + ListZonesInSubscriptionComplete(ctx context.Context, top string, filter string) (result dns.ZoneListResultIterator, err error) } var _ ZonesClientAPI = (*dns.ZonesClient)(nil) diff --git a/services/preview/dns/mgmt/2015-05-04-preview/dns/recordsets.go b/services/preview/dns/mgmt/2015-05-04-preview/dns/recordsets.go index 961e75e5f5d1..3ccbdf3ce1b0 100644 --- a/services/preview/dns/mgmt/2015-05-04-preview/dns/recordsets.go +++ b/services/preview/dns/mgmt/2015-05-04-preview/dns/recordsets.go @@ -36,7 +36,8 @@ func NewRecordSetsClient(subscriptionID string) RecordSetsClient { return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client. +// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/dns/mgmt/2015-05-04-preview/dns/zones.go b/services/preview/dns/mgmt/2015-05-04-preview/dns/zones.go index 23e5d53d9fa1..3e5f98e56d1c 100644 --- a/services/preview/dns/mgmt/2015-05-04-preview/dns/zones.go +++ b/services/preview/dns/mgmt/2015-05-04-preview/dns/zones.go @@ -36,7 +36,8 @@ func NewZonesClient(subscriptionID string) ZonesClient { return NewZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewZonesClientWithBaseURI creates an instance of the ZonesClient client. +// NewZonesClientWithBaseURI creates an instance of the ZonesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient { return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/dns/mgmt/2018-03-01-preview/dns/client.go b/services/preview/dns/mgmt/2018-03-01-preview/dns/client.go index 7b653b49a40b..e3bfc3e4c04c 100644 --- a/services/preview/dns/mgmt/2018-03-01-preview/dns/client.go +++ b/services/preview/dns/mgmt/2018-03-01-preview/dns/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/dns/mgmt/2018-03-01-preview/dns/dnsapi/interfaces.go b/services/preview/dns/mgmt/2018-03-01-preview/dns/dnsapi/interfaces.go index bd34bb1244bd..ba1bb16818ac 100644 --- a/services/preview/dns/mgmt/2018-03-01-preview/dns/dnsapi/interfaces.go +++ b/services/preview/dns/mgmt/2018-03-01-preview/dns/dnsapi/interfaces.go @@ -29,8 +29,11 @@ type RecordSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType) (result dns.RecordSet, err error) ListAllByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result dns.RecordSetListResultPage, err error) + ListAllByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result dns.RecordSetListResultIterator, err error) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultPage, err error) + ListByTypeComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType dns.RecordType, top *int32, recordsetnamesuffix string) (result dns.RecordSetListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType dns.RecordType, parameters dns.RecordSet, ifMatch string) (result dns.RecordSet, err error) } @@ -42,7 +45,9 @@ type ZonesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result dns.ZonesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, zoneName string) (result dns.Zone, err error) List(ctx context.Context, top *int32) (result dns.ZoneListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result dns.ZoneListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result dns.ZoneListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, zoneName string, parameters dns.ZoneUpdate, ifMatch string) (result dns.Zone, err error) } diff --git a/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go b/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go index 046dfca4aedd..864726678617 100644 --- a/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go +++ b/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go @@ -36,7 +36,8 @@ func NewRecordSetsClient(subscriptionID string) RecordSetsClient { return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client. +// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go b/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go index d2a13f6b057b..9a0f953886f6 100644 --- a/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go +++ b/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go @@ -36,7 +36,8 @@ func NewZonesClient(subscriptionID string) ZonesClient { return NewZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewZonesClientWithBaseURI creates an instance of the ZonesClient client. +// NewZonesClientWithBaseURI creates an instance of the ZonesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient { return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/accounts.go b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/accounts.go index 7031694861b6..5676bf326447 100644 --- a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/accounts.go +++ b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/channels.go b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/channels.go index 9e367d10f388..647783f9a6f6 100644 --- a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/channels.go +++ b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/channels.go @@ -36,7 +36,8 @@ func NewChannelsClient(subscriptionID string) ChannelsClient { return NewChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChannelsClientWithBaseURI creates an instance of the ChannelsClient client. +// NewChannelsClientWithBaseURI creates an instance of the ChannelsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChannelsClientWithBaseURI(baseURI string, subscriptionID string) ChannelsClient { return ChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/client.go b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/client.go index 6a99cc2fd051..6ebd7695d4d5 100644 --- a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/client.go +++ b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/operations.go b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/operations.go index 63f7df63e89d..160c88dd1357 100644 --- a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/operations.go +++ b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/skus.go b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/skus.go index f80f1231760e..c936ca85afaf 100644 --- a/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/skus.go +++ b/services/preview/engagementfabric/mgmt/2018-09-01/engagementfabric/skus.go @@ -35,7 +35,8 @@ func NewSKUsClient(subscriptionID string) SKUsClient { return NewSKUsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSKUsClientWithBaseURI creates an instance of the SKUsClient client. +// NewSKUsClientWithBaseURI creates an instance of the SKUsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSKUsClientWithBaseURI(baseURI string, subscriptionID string) SKUsClient { return SKUsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/client.go b/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/client.go index 8f62ccff413c..cb47bdbea84b 100644 --- a/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/client.go +++ b/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/enterpriseknowledgegraph.go b/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/enterpriseknowledgegraph.go index 75dd8196a17a..06e218255cfb 100644 --- a/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/enterpriseknowledgegraph.go +++ b/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/enterpriseknowledgegraph.go @@ -37,7 +37,9 @@ func NewEnterpriseKnowledgeGraphClient(subscriptionID string) EnterpriseKnowledg return NewEnterpriseKnowledgeGraphClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnterpriseKnowledgeGraphClientWithBaseURI creates an instance of the EnterpriseKnowledgeGraphClient client. +// NewEnterpriseKnowledgeGraphClientWithBaseURI creates an instance of the EnterpriseKnowledgeGraphClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewEnterpriseKnowledgeGraphClientWithBaseURI(baseURI string, subscriptionID string) EnterpriseKnowledgeGraphClient { return EnterpriseKnowledgeGraphClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/enterpriseknowledgegraphserviceapi/interfaces.go b/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/enterpriseknowledgegraphserviceapi/interfaces.go index a2a4337360c6..20e73b16dd79 100644 --- a/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/enterpriseknowledgegraphserviceapi/interfaces.go +++ b/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/enterpriseknowledgegraphserviceapi/interfaces.go @@ -29,7 +29,9 @@ type EnterpriseKnowledgeGraphClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result enterpriseknowledgegraphservice.EnterpriseKnowledgeGraph, err error) List(ctx context.Context) (result enterpriseknowledgegraphservice.EnterpriseKnowledgeGraphResponseListPage, err error) + ListComplete(ctx context.Context) (result enterpriseknowledgegraphservice.EnterpriseKnowledgeGraphResponseListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result enterpriseknowledgegraphservice.EnterpriseKnowledgeGraphResponseListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result enterpriseknowledgegraphservice.EnterpriseKnowledgeGraphResponseListIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters enterpriseknowledgegraphservice.EnterpriseKnowledgeGraph) (result enterpriseknowledgegraphservice.EnterpriseKnowledgeGraph, err error) } @@ -38,6 +40,7 @@ var _ EnterpriseKnowledgeGraphClientAPI = (*enterpriseknowledgegraphservice.Ente // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result enterpriseknowledgegraphservice.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result enterpriseknowledgegraphservice.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*enterpriseknowledgegraphservice.OperationsClient)(nil) diff --git a/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/operations.go b/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/operations.go index f2bb1645179f..01c414823bcb 100644 --- a/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/operations.go +++ b/services/preview/enterpriseknowledgegraphservice/2018-12-03/enterpriseknowledgegraphservice/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/client.go b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/client.go index 0370b8785fa6..f8dba3df5c3c 100644 --- a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/client.go +++ b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/eventsubscriptions.go b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/eventsubscriptions.go index c29f5d64a179..5b1287ac3e50 100644 --- a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/eventsubscriptions.go +++ b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/operations.go b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/operations.go index c66d2479b9bb..159ad3a47759 100644 --- a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/operations.go +++ b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topics.go b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topics.go index 93109e2da4ea..198a8e06319b 100644 --- a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topics.go +++ b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topictypes.go b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topictypes.go index 4d5c313c1904..5d96d545fb6b 100644 --- a/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topictypes.go +++ b/services/preview/eventgrid/mgmt/2017-06-15-preview/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/client.go b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/client.go index 48762abb3fc9..d550806be6d6 100644 --- a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/client.go +++ b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/eventsubscriptions.go b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/eventsubscriptions.go index fd6e64ed3df0..42428e089751 100644 --- a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/eventsubscriptions.go +++ b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/operations.go b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/operations.go index c01d81f86251..c1a3673a7dcc 100644 --- a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/operations.go +++ b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topics.go b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topics.go index d30859b38a38..363a4bfd2c3c 100644 --- a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topics.go +++ b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topictypes.go b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topictypes.go index 7ca40d8fd26f..04f8880c3442 100644 --- a/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topictypes.go +++ b/services/preview/eventgrid/mgmt/2017-09-15-preview/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/client.go b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/client.go index 197bbff96e7c..39d2b84ced7f 100644 --- a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/client.go +++ b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/eventsubscriptions.go b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/eventsubscriptions.go index 64a3e2bd7adf..6e8507f98c75 100644 --- a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/eventsubscriptions.go +++ b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/operations.go b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/operations.go index c1d1bde9d539..2630b43bda37 100644 --- a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/operations.go +++ b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topics.go b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topics.go index f537e77abfca..0572f48aada6 100644 --- a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topics.go +++ b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topictypes.go b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topictypes.go index 169ec66f4f54..5381b3d7e717 100644 --- a/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topictypes.go +++ b/services/preview/eventgrid/mgmt/2018-05-01-preview/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/client.go b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/client.go index a2db4dbdb3c7..05818ba810a5 100644 --- a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/client.go +++ b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/domains.go b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/domains.go index a0608e4ed8be..a17d34c3614d 100644 --- a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/domains.go +++ b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/domains.go @@ -36,7 +36,8 @@ func NewDomainsClient(subscriptionID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, subscriptionID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/domaintopics.go b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/domaintopics.go index f39cca2d83fc..ef5860345d6d 100644 --- a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/domaintopics.go +++ b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/domaintopics.go @@ -35,7 +35,8 @@ func NewDomainTopicsClient(subscriptionID string) DomainTopicsClient { return NewDomainTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainTopicsClientWithBaseURI creates an instance of the DomainTopicsClient client. +// NewDomainTopicsClientWithBaseURI creates an instance of the DomainTopicsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainTopicsClientWithBaseURI(baseURI string, subscriptionID string) DomainTopicsClient { return DomainTopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/eventsubscriptions.go b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/eventsubscriptions.go index 86d7c583e8e9..7445c746a131 100644 --- a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/eventsubscriptions.go +++ b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/operations.go b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/operations.go index 7895fa2cc9ef..d391660b39ed 100644 --- a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/operations.go +++ b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/topics.go b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/topics.go index efa0b27ac9f7..1684c7729587 100644 --- a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/topics.go +++ b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/topictypes.go b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/topictypes.go index feb4fe0a4b89..9e75cb371f55 100644 --- a/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/topictypes.go +++ b/services/preview/eventgrid/mgmt/2018-09-15-preview/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/client.go b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/client.go index 629679611239..69b571ed19f9 100644 --- a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/client.go +++ b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/domains.go b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/domains.go index a86223b22e18..e34a577c3b29 100644 --- a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/domains.go +++ b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/domains.go @@ -36,7 +36,8 @@ func NewDomainsClient(subscriptionID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, subscriptionID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/domaintopics.go b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/domaintopics.go index 66797cbf8e6e..e1856b1727d1 100644 --- a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/domaintopics.go +++ b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/domaintopics.go @@ -35,7 +35,8 @@ func NewDomainTopicsClient(subscriptionID string) DomainTopicsClient { return NewDomainTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainTopicsClientWithBaseURI creates an instance of the DomainTopicsClient client. +// NewDomainTopicsClientWithBaseURI creates an instance of the DomainTopicsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainTopicsClientWithBaseURI(baseURI string, subscriptionID string) DomainTopicsClient { return DomainTopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/eventgridapi/interfaces.go b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/eventgridapi/interfaces.go index 6bedbe1affaf..128cc987148c 100644 --- a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/eventgridapi/interfaces.go +++ b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/eventgridapi/interfaces.go @@ -28,7 +28,9 @@ type DomainsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.DomainsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.Domain, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.DomainsListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.DomainsListResultIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32) (result eventgrid.DomainsListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32) (result eventgrid.DomainsListResultIterator, err error) ListSharedAccessKeys(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.DomainSharedAccessKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, domainName string, regenerateKeyRequest eventgrid.DomainRegenerateKeyRequest) (result eventgrid.DomainSharedAccessKeys, err error) Update(ctx context.Context, resourceGroupName string, domainName string, domainUpdateParameters eventgrid.DomainUpdateParameters) (result eventgrid.DomainsUpdateFuture, err error) @@ -42,6 +44,7 @@ type DomainTopicsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, domainName string, domainTopicName string) (result eventgrid.DomainTopicsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, domainName string, domainTopicName string) (result eventgrid.DomainTopic, err error) ListByDomain(ctx context.Context, resourceGroupName string, domainName string, filter string, top *int32) (result eventgrid.DomainTopicsListResultPage, err error) + ListByDomainComplete(ctx context.Context, resourceGroupName string, domainName string, filter string, top *int32) (result eventgrid.DomainTopicsListResultIterator, err error) } var _ DomainTopicsClientAPI = (*eventgrid.DomainTopicsClient)(nil) @@ -53,15 +56,25 @@ type EventSubscriptionsClientAPI interface { Get(ctx context.Context, scope string, eventSubscriptionName string) (result eventgrid.EventSubscription, err error) GetFullURL(ctx context.Context, scope string, eventSubscriptionName string) (result eventgrid.EventSubscriptionFullURL, err error) ListByDomainTopic(ctx context.Context, resourceGroupName string, domainName string, topicName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListByDomainTopicComplete(ctx context.Context, resourceGroupName string, domainName string, topicName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListByResource(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListByResourceComplete(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalByResourceGroupForTopicType(ctx context.Context, resourceGroupName string, topicTypeName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalByResourceGroupForTopicTypeComplete(ctx context.Context, resourceGroupName string, topicTypeName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalBySubscription(ctx context.Context, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalBySubscriptionComplete(ctx context.Context, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalBySubscriptionForTopicType(ctx context.Context, topicTypeName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalBySubscriptionForTopicTypeComplete(ctx context.Context, topicTypeName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalByResourceGroup(ctx context.Context, resourceGroupName string, location string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalByResourceGroupComplete(ctx context.Context, resourceGroupName string, location string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalByResourceGroupForTopicType(ctx context.Context, resourceGroupName string, location string, topicTypeName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalByResourceGroupForTopicTypeComplete(ctx context.Context, resourceGroupName string, location string, topicTypeName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalBySubscription(ctx context.Context, location string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalBySubscriptionComplete(ctx context.Context, location string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalBySubscriptionForTopicType(ctx context.Context, location string, topicTypeName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalBySubscriptionForTopicTypeComplete(ctx context.Context, location string, topicTypeName string, filter string, top *int32, label string) (result eventgrid.EventSubscriptionsListResultIterator, err error) Update(ctx context.Context, scope string, eventSubscriptionName string, eventSubscriptionUpdateParameters eventgrid.EventSubscriptionUpdateParameters) (result eventgrid.EventSubscriptionsUpdateFuture, err error) } @@ -80,7 +93,9 @@ type TopicsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.TopicsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.Topic, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.TopicsListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.TopicsListResultIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32) (result eventgrid.TopicsListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32) (result eventgrid.TopicsListResultIterator, err error) ListEventTypes(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (result eventgrid.EventTypesListResult, err error) ListSharedAccessKeys(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.TopicSharedAccessKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, topicName string, regenerateKeyRequest eventgrid.TopicRegenerateKeyRequest) (result eventgrid.TopicSharedAccessKeys, err error) diff --git a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/eventsubscriptions.go b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/eventsubscriptions.go index caeb0c14eba6..f18aa8d45d20 100644 --- a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/eventsubscriptions.go +++ b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/operations.go b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/operations.go index 9fa2d4dbc40e..cd70a9875296 100644 --- a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/operations.go +++ b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/topics.go b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/topics.go index cdbc853f8c2b..5d1f76f30f13 100644 --- a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/topics.go +++ b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/topictypes.go b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/topictypes.go index 50b8cf706c9d..0374aed5d94e 100644 --- a/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/topictypes.go +++ b/services/preview/eventgrid/mgmt/2019-02-01-preview/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/client.go b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/client.go index 7e480eeeff78..d833cff0d58d 100644 --- a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/client.go +++ b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/domains.go b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/domains.go index 34ee6fef14ab..2e29e094f641 100644 --- a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/domains.go +++ b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/domains.go @@ -36,7 +36,8 @@ func NewDomainsClient(subscriptionID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, subscriptionID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/domaintopics.go b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/domaintopics.go index db41f11edc06..a57a924f73a9 100644 --- a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/domaintopics.go +++ b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/domaintopics.go @@ -35,7 +35,8 @@ func NewDomainTopicsClient(subscriptionID string) DomainTopicsClient { return NewDomainTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainTopicsClientWithBaseURI creates an instance of the DomainTopicsClient client. +// NewDomainTopicsClientWithBaseURI creates an instance of the DomainTopicsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainTopicsClientWithBaseURI(baseURI string, subscriptionID string) DomainTopicsClient { return DomainTopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/eventgridapi/interfaces.go b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/eventgridapi/interfaces.go index c4a6eec2a395..d71d03f6c46c 100644 --- a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/eventgridapi/interfaces.go +++ b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/eventgridapi/interfaces.go @@ -28,7 +28,9 @@ type DomainsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.DomainsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.Domain, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.DomainsListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.DomainsListResultIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32) (result eventgrid.DomainsListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32) (result eventgrid.DomainsListResultIterator, err error) ListSharedAccessKeys(ctx context.Context, resourceGroupName string, domainName string) (result eventgrid.DomainSharedAccessKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, domainName string, regenerateKeyRequest eventgrid.DomainRegenerateKeyRequest) (result eventgrid.DomainSharedAccessKeys, err error) Update(ctx context.Context, resourceGroupName string, domainName string, domainUpdateParameters eventgrid.DomainUpdateParameters) (result eventgrid.DomainsUpdateFuture, err error) @@ -42,6 +44,7 @@ type DomainTopicsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, domainName string, domainTopicName string) (result eventgrid.DomainTopicsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, domainName string, domainTopicName string) (result eventgrid.DomainTopic, err error) ListByDomain(ctx context.Context, resourceGroupName string, domainName string, filter string, top *int32) (result eventgrid.DomainTopicsListResultPage, err error) + ListByDomainComplete(ctx context.Context, resourceGroupName string, domainName string, filter string, top *int32) (result eventgrid.DomainTopicsListResultIterator, err error) } var _ DomainTopicsClientAPI = (*eventgrid.DomainTopicsClient)(nil) @@ -53,15 +56,25 @@ type EventSubscriptionsClientAPI interface { Get(ctx context.Context, scope string, eventSubscriptionName string) (result eventgrid.EventSubscription, err error) GetFullURL(ctx context.Context, scope string, eventSubscriptionName string) (result eventgrid.EventSubscriptionFullURL, err error) ListByDomainTopic(ctx context.Context, resourceGroupName string, domainName string, topicName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListByDomainTopicComplete(ctx context.Context, resourceGroupName string, domainName string, topicName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListByResource(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListByResourceComplete(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalByResourceGroupForTopicType(ctx context.Context, resourceGroupName string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalByResourceGroupForTopicTypeComplete(ctx context.Context, resourceGroupName string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalBySubscription(ctx context.Context, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalBySubscriptionComplete(ctx context.Context, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListGlobalBySubscriptionForTopicType(ctx context.Context, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListGlobalBySubscriptionForTopicTypeComplete(ctx context.Context, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalByResourceGroup(ctx context.Context, resourceGroupName string, location string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalByResourceGroupComplete(ctx context.Context, resourceGroupName string, location string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalByResourceGroupForTopicType(ctx context.Context, resourceGroupName string, location string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalByResourceGroupForTopicTypeComplete(ctx context.Context, resourceGroupName string, location string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalBySubscription(ctx context.Context, location string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalBySubscriptionComplete(ctx context.Context, location string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) ListRegionalBySubscriptionForTopicType(ctx context.Context, location string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultPage, err error) + ListRegionalBySubscriptionForTopicTypeComplete(ctx context.Context, location string, topicTypeName string, filter string, top *int32) (result eventgrid.EventSubscriptionsListResultIterator, err error) Update(ctx context.Context, scope string, eventSubscriptionName string, eventSubscriptionUpdateParameters eventgrid.EventSubscriptionUpdateParameters) (result eventgrid.EventSubscriptionsUpdateFuture, err error) } @@ -80,7 +93,9 @@ type TopicsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.TopicsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.Topic, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.TopicsListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result eventgrid.TopicsListResultIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32) (result eventgrid.TopicsListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32) (result eventgrid.TopicsListResultIterator, err error) ListEventTypes(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (result eventgrid.EventTypesListResult, err error) ListSharedAccessKeys(ctx context.Context, resourceGroupName string, topicName string) (result eventgrid.TopicSharedAccessKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, topicName string, regenerateKeyRequest eventgrid.TopicRegenerateKeyRequest) (result eventgrid.TopicSharedAccessKeys, err error) diff --git a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/eventsubscriptions.go b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/eventsubscriptions.go index 869ee87df3b8..cb7903e3cc01 100644 --- a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/eventsubscriptions.go +++ b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/eventsubscriptions.go @@ -35,7 +35,9 @@ func NewEventSubscriptionsClient(subscriptionID string) EventSubscriptionsClient return NewEventSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client. +// NewEventSubscriptionsClientWithBaseURI creates an instance of the EventSubscriptionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) EventSubscriptionsClient { return EventSubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/operations.go b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/operations.go index c40430d0c001..ebfac9edc88a 100644 --- a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/operations.go +++ b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/topics.go b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/topics.go index 68d6c6392533..b9f6a863429d 100644 --- a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/topics.go +++ b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/topictypes.go b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/topictypes.go index 2895b0f8b74b..aa761c237d9a 100644 --- a/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/topictypes.go +++ b/services/preview/eventgrid/mgmt/2020-01-01-preview/eventgrid/topictypes.go @@ -35,7 +35,8 @@ func NewTopicTypesClient(subscriptionID string) TopicTypesClient { return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client. +// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient { return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/models.go b/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/models.go index a67d91ba8602..eca2db04b476 100644 --- a/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/models.go +++ b/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/models.go @@ -897,7 +897,7 @@ type DomainProperties struct { InputSchema InputSchema `json:"inputSchema,omitempty"` // InputSchemaMapping - Information about the InputSchemaMapping which specified the info about mapping event payload. InputSchemaMapping BasicInputSchemaMapping `json:"inputSchemaMapping,omitempty"` - // MetricResourceID - Metric resource id for the domain. + // MetricResourceID - READ-ONLY; Metric resource id for the domain. MetricResourceID *string `json:"metricResourceId,omitempty"` // AllowTrafficFromAllIPs - This determines if IP filtering rules ought to be evaluated or not. By default it will not evaluate and will allow traffic from all IPs. AllowTrafficFromAllIPs *bool `json:"allowTrafficFromAllIPs,omitempty"` @@ -1505,6 +1505,10 @@ func NewDomainTopicsListResultPage(getNextPage func(context.Context, DomainTopic type DomainUpdateParameters struct { // Tags - Tags of the domains resource Tags map[string]*string `json:"tags"` + // AllowTrafficFromAllIPs - This determines if IP filtering rules ought to be evaluated or not. By default it will not evaluate and will allow traffic from all IPs. + AllowTrafficFromAllIPs *bool `json:"allowTrafficFromAllIPs,omitempty"` + // InboundIPRules - This determines the IP filtering rules that ought be applied when events are received on this domain. + InboundIPRules *[]InboundIPRule `json:"inboundIpRules,omitempty"` } // MarshalJSON is the custom marshaler for DomainUpdateParameters. @@ -1513,6 +1517,12 @@ func (dup DomainUpdateParameters) MarshalJSON() ([]byte, error) { if dup.Tags != nil { objectMap["tags"] = dup.Tags } + if dup.AllowTrafficFromAllIPs != nil { + objectMap["allowTrafficFromAllIPs"] = dup.AllowTrafficFromAllIPs + } + if dup.InboundIPRules != nil { + objectMap["inboundIpRules"] = dup.InboundIPRules + } return json.Marshal(objectMap) } @@ -4356,7 +4366,7 @@ type TopicProperties struct { InputSchema InputSchema `json:"inputSchema,omitempty"` // InputSchemaMapping - This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema. InputSchemaMapping BasicInputSchemaMapping `json:"inputSchemaMapping,omitempty"` - // MetricResourceID - Metric resource id for the topic. + // MetricResourceID - READ-ONLY; Metric resource id for the topic. MetricResourceID *string `json:"metricResourceId,omitempty"` // AllowTrafficFromAllIPs - This determines if IP filtering rules ought to be evaluated or not. By default it will not evaluate and will allow traffic from all IPs. AllowTrafficFromAllIPs *bool `json:"allowTrafficFromAllIPs,omitempty"` @@ -4783,6 +4793,10 @@ type TopicTypesListResult struct { type TopicUpdateParameters struct { // Tags - Tags of the resource. Tags map[string]*string `json:"tags"` + // AllowTrafficFromAllIPs - This determines if IP filtering rules ought to be evaluated or not. By default it will not evaluate and will allow traffic from all IPs. + AllowTrafficFromAllIPs *bool `json:"allowTrafficFromAllIPs,omitempty"` + // InboundIPRules - This determines the IP filtering rules that ought be applied when events are received on this domain. + InboundIPRules *[]InboundIPRule `json:"inboundIpRules,omitempty"` } // MarshalJSON is the custom marshaler for TopicUpdateParameters. @@ -4791,6 +4805,12 @@ func (tup TopicUpdateParameters) MarshalJSON() ([]byte, error) { if tup.Tags != nil { objectMap["tags"] = tup.Tags } + if tup.AllowTrafficFromAllIPs != nil { + objectMap["allowTrafficFromAllIPs"] = tup.AllowTrafficFromAllIPs + } + if tup.InboundIPRules != nil { + objectMap["inboundIpRules"] = tup.InboundIPRules + } return json.Marshal(objectMap) } diff --git a/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/topictypes.go b/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/topictypes.go index c778c872da09..ffc38bd26108 100644 --- a/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/topictypes.go +++ b/services/preview/eventgrid/mgmt/2020-04-01-preview/eventgrid/topictypes.go @@ -183,9 +183,9 @@ func (client TopicTypesClient) ListResponder(resp *http.Response) (result TopicT return } -// ListEventTypes list event types for a topic type +// ListEventTypes list event types for a topic type. // Parameters: -// topicTypeName - name of the topic type +// topicTypeName - name of the topic type. func (client TopicTypesClient) ListEventTypes(ctx context.Context, topicTypeName string) (result EventTypesListResult, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TopicTypesClient.ListEventTypes") diff --git a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/client.go b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/client.go index fc50af41c0fb..7b8fb3206050 100644 --- a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/client.go +++ b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/clusters.go b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/clusters.go index 525b01e29c8f..f949bc49d834 100644 --- a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/clusters.go +++ b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/clusters.go @@ -37,7 +37,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/configuration.go b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/configuration.go index ec846fdefef6..86143f5e9199 100644 --- a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/configuration.go +++ b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/configuration.go @@ -37,7 +37,8 @@ func NewConfigurationClient(subscriptionID string) ConfigurationClient { return NewConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationClientWithBaseURI creates an instance of the ConfigurationClient client. +// NewConfigurationClientWithBaseURI creates an instance of the ConfigurationClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationClient { return ConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/eventhubapi/interfaces.go b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/eventhubapi/interfaces.go index ed7dcfff11cf..33931ce47ff1 100644 --- a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/eventhubapi/interfaces.go +++ b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/eventhubapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result eventhub.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result eventhub.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*eventhub.OperationsClient)(nil) @@ -36,6 +37,7 @@ type ClustersClientAPI interface { Get(ctx context.Context, resourceGroupName string, clusterName string) (result eventhub.Cluster, err error) ListAvailableClusters(ctx context.Context) (result eventhub.AvailableClustersList, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result eventhub.ClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result eventhub.ClusterListResultIterator, err error) ListNamespaces(ctx context.Context, resourceGroupName string, clusterName string) (result eventhub.EHNamespaceIDListResult, err error) Patch(ctx context.Context, resourceGroupName string, clusterName string, parameters eventhub.Cluster) (result eventhub.ClustersPatchFuture, err error) Put(ctx context.Context, resourceGroupName string, clusterName string) (result eventhub.ClustersPutFuture, err error) @@ -65,9 +67,13 @@ type NamespacesClientAPI interface { GetNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.NetworkRuleSet, err error) GetVirtualNetworkRule(ctx context.Context, resourceGroupName string, namespaceName string, virtualNetworkRuleName string) (result eventhub.VirtualNetworkRule, err error) List(ctx context.Context) (result eventhub.EHNamespaceListResultPage, err error) + ListComplete(ctx context.Context) (result eventhub.EHNamespaceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result eventhub.EHNamespaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result eventhub.EHNamespaceListResultIterator, err error) ListIPFilterRules(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.IPFilterRuleListResultPage, err error) + ListIPFilterRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.IPFilterRuleListResultIterator, err error) ListVirtualNetworkRules(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.VirtualNetworkRuleListResultPage, err error) + ListVirtualNetworkRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result eventhub.VirtualNetworkRuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters eventhub.EHNamespace) (result eventhub.EHNamespace, err error) } diff --git a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/namespaces.go b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/namespaces.go index df0b7cb9b477..15326f896afc 100644 --- a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/namespaces.go +++ b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/namespaces.go @@ -37,7 +37,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/operations.go b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/operations.go index 051ebdccef63..90a8dfb3af64 100644 --- a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/operations.go +++ b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/client.go b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/client.go index 9e43da51dba6..dbfd1c974a62 100644 --- a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/client.go +++ b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/hanainstances.go b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/hanainstances.go index 485c2b7576bf..da820aa074cc 100644 --- a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/hanainstances.go +++ b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/hanainstances.go @@ -35,7 +35,8 @@ func NewHanaInstancesClient(subscriptionID string) HanaInstancesClient { return NewHanaInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHanaInstancesClientWithBaseURI creates an instance of the HanaInstancesClient client. +// NewHanaInstancesClientWithBaseURI creates an instance of the HanaInstancesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewHanaInstancesClientWithBaseURI(baseURI string, subscriptionID string) HanaInstancesClient { return HanaInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/hanaonazureapi/interfaces.go b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/hanaonazureapi/interfaces.go index 8201279ac087..af5c2495147f 100644 --- a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/hanaonazureapi/interfaces.go +++ b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/hanaonazureapi/interfaces.go @@ -35,7 +35,9 @@ type HanaInstancesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, hanaInstanceName string) (result hanaonazure.HanaInstancesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, hanaInstanceName string) (result hanaonazure.HanaInstance, err error) List(ctx context.Context) (result hanaonazure.HanaInstancesListResultPage, err error) + ListComplete(ctx context.Context) (result hanaonazure.HanaInstancesListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result hanaonazure.HanaInstancesListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result hanaonazure.HanaInstancesListResultIterator, err error) Restart(ctx context.Context, resourceGroupName string, hanaInstanceName string) (result hanaonazure.HanaInstancesRestartFuture, err error) Shutdown(ctx context.Context, resourceGroupName string, hanaInstanceName string) (result hanaonazure.HanaInstancesShutdownFuture, err error) Start(ctx context.Context, resourceGroupName string, hanaInstanceName string) (result hanaonazure.HanaInstancesStartFuture, err error) @@ -50,6 +52,7 @@ type SapMonitorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, sapMonitorName string) (result hanaonazure.SapMonitorsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, sapMonitorName string) (result hanaonazure.SapMonitor, err error) List(ctx context.Context) (result hanaonazure.SapMonitorListResultPage, err error) + ListComplete(ctx context.Context) (result hanaonazure.SapMonitorListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, sapMonitorName string, tagsParameter hanaonazure.Tags) (result hanaonazure.SapMonitor, err error) } diff --git a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/operations.go b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/operations.go index 8674811c7d33..9d56f980f828 100644 --- a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/operations.go +++ b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/sapmonitors.go b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/sapmonitors.go index d18d6ada070a..535898d5e121 100644 --- a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/sapmonitors.go +++ b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/sapmonitors.go @@ -35,7 +35,8 @@ func NewSapMonitorsClient(subscriptionID string) SapMonitorsClient { return NewSapMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSapMonitorsClientWithBaseURI creates an instance of the SapMonitorsClient client. +// NewSapMonitorsClientWithBaseURI creates an instance of the SapMonitorsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSapMonitorsClientWithBaseURI(baseURI string, subscriptionID string) SapMonitorsClient { return SapMonitorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/applications.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/applications.go index a4181417fe44..5617dfc66e1e 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/applications.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/applications.go @@ -35,7 +35,8 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/client.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/client.go index bead520ee22a..c3db0441edf7 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/client.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go index 2de7f4d4863b..aeb1250f7bf2 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/configurations.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/configurations.go index fc9e24a6aa00..e22c0a39c09a 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/configurations.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/configurations.go @@ -36,7 +36,8 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/extension.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/extension.go index 7cd9a80fa3f5..c3c24daa780e 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/extension.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/extension.go @@ -35,7 +35,8 @@ func NewExtensionClient(subscriptionID string) ExtensionClient { return NewExtensionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExtensionClientWithBaseURI creates an instance of the ExtensionClient client. +// NewExtensionClientWithBaseURI creates an instance of the ExtensionClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExtensionClientWithBaseURI(baseURI string, subscriptionID string) ExtensionClient { return ExtensionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/hdinsightapi/interfaces.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/hdinsightapi/interfaces.go index b0a6b9b4711d..6624354e9ba0 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/hdinsightapi/interfaces.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/hdinsightapi/interfaces.go @@ -31,7 +31,9 @@ type ClustersClientAPI interface { Get(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.Cluster, err error) GetGatewaySettings(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.GatewaySettings, err error) List(ctx context.Context) (result hdinsight.ClusterListResultPage, err error) + ListComplete(ctx context.Context) (result hdinsight.ClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result hdinsight.ClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result hdinsight.ClusterListResultIterator, err error) Resize(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterResizeParameters) (result hdinsight.ClustersResizeFuture, err error) RotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterDiskEncryptionParameters) (result hdinsight.ClustersRotateDiskEncryptionKeyFuture, err error) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterPatchParameters) (result hdinsight.Cluster, err error) @@ -46,6 +48,7 @@ type ApplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result hdinsight.ApplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result hdinsight.Application, err error) List(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ApplicationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ApplicationListResultIterator, err error) } var _ ApplicationsClientAPI = (*hdinsight.ApplicationsClient)(nil) @@ -85,6 +88,7 @@ type ScriptActionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, clusterName string, scriptName string) (result autorest.Response, err error) GetExecutionDetail(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string) (result hdinsight.RuntimeScriptActionDetail, err error) ListPersistedScripts(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionsListPage, err error) + ListPersistedScriptsComplete(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionsListIterator, err error) } var _ ScriptActionsClientAPI = (*hdinsight.ScriptActionsClient)(nil) @@ -92,6 +96,7 @@ var _ ScriptActionsClientAPI = (*hdinsight.ScriptActionsClient)(nil) // ScriptExecutionHistoryClientAPI contains the set of methods on the ScriptExecutionHistoryClient type. type ScriptExecutionHistoryClientAPI interface { List(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionExecutionHistoryListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionExecutionHistoryListIterator, err error) Promote(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string) (result autorest.Response, err error) } @@ -100,6 +105,7 @@ var _ ScriptExecutionHistoryClientAPI = (*hdinsight.ScriptExecutionHistoryClient // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result hdinsight.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result hdinsight.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*hdinsight.OperationsClient)(nil) diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/locations.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/locations.go index 2397de78d65f..85259195cd57 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/locations.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go index 8b411e7d999f..a97cc4b8c0c1 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go @@ -702,6 +702,8 @@ type ClusterCreateProperties struct { StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // DiskEncryptionProperties - The disk encryption properties. DiskEncryptionProperties *DiskEncryptionProperties `json:"diskEncryptionProperties,omitempty"` + // MinSupportedTLSVersion - The minimal supported tls version. + MinSupportedTLSVersion *string `json:"minSupportedTlsVersion,omitempty"` } // ClusterDefinition the cluster definition. @@ -774,6 +776,8 @@ type ClusterGetProperties struct { ConnectivityEndpoints *[]ConnectivityEndpoint `json:"connectivityEndpoints,omitempty"` // DiskEncryptionProperties - The disk encryption properties. DiskEncryptionProperties *DiskEncryptionProperties `json:"diskEncryptionProperties,omitempty"` + // MinSupportedTLSVersion - The minimal supported tls version. + MinSupportedTLSVersion *string `json:"minSupportedTlsVersion,omitempty"` } // ClusterIdentity identity for the cluster. diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/operations.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/operations.go index 9a877a47ca47..5ee0cd8ba21f 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/operations.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/scriptactions.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/scriptactions.go index 98d119eb7fc1..9deb227b562c 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/scriptactions.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/scriptactions.go @@ -35,7 +35,8 @@ func NewScriptActionsClient(subscriptionID string) ScriptActionsClient { return NewScriptActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScriptActionsClientWithBaseURI creates an instance of the ScriptActionsClient client. +// NewScriptActionsClientWithBaseURI creates an instance of the ScriptActionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScriptActionsClientWithBaseURI(baseURI string, subscriptionID string) ScriptActionsClient { return ScriptActionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/scriptexecutionhistory.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/scriptexecutionhistory.go index e8f1cc3b6d57..bfda84154104 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/scriptexecutionhistory.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/scriptexecutionhistory.go @@ -35,7 +35,9 @@ func NewScriptExecutionHistoryClient(subscriptionID string) ScriptExecutionHisto return NewScriptExecutionHistoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScriptExecutionHistoryClientWithBaseURI creates an instance of the ScriptExecutionHistoryClient client. +// NewScriptExecutionHistoryClientWithBaseURI creates an instance of the ScriptExecutionHistoryClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewScriptExecutionHistoryClientWithBaseURI(baseURI string, subscriptionID string) ScriptExecutionHistoryClient { return ScriptExecutionHistoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/applications.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/applications.go index ffe015e0ac5d..1395babb165e 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/applications.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/applications.go @@ -35,7 +35,8 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/client.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/client.go index 19b78b2d7d9a..5e42809eb22b 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/client.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/clusters.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/clusters.go index 849bebdbb15a..8f2ff5014b1b 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/clusters.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/configurations.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/configurations.go index 842c89903dc7..d1cbd1924f91 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/configurations.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/configurations.go @@ -36,7 +36,8 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/extensions.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/extensions.go index 184928f5ec28..806a8bd6e47e 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/extensions.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/extensions.go @@ -35,7 +35,8 @@ func NewExtensionsClient(subscriptionID string) ExtensionsClient { return NewExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExtensionsClientWithBaseURI creates an instance of the ExtensionsClient client. +// NewExtensionsClientWithBaseURI creates an instance of the ExtensionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExtensionsClientWithBaseURI(baseURI string, subscriptionID string) ExtensionsClient { return ExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/hdinsightapi/interfaces.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/hdinsightapi/interfaces.go index 473f035bab0b..a3cad5a86b28 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/hdinsightapi/interfaces.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/hdinsightapi/interfaces.go @@ -31,7 +31,9 @@ type ClustersClientAPI interface { Get(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.Cluster, err error) GetGatewaySettings(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.GatewaySettings, err error) List(ctx context.Context) (result hdinsight.ClusterListResultPage, err error) + ListComplete(ctx context.Context) (result hdinsight.ClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result hdinsight.ClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result hdinsight.ClusterListResultIterator, err error) Resize(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterResizeParameters) (result hdinsight.ClustersResizeFuture, err error) RotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterDiskEncryptionParameters) (result hdinsight.ClustersRotateDiskEncryptionKeyFuture, err error) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterPatchParameters) (result hdinsight.Cluster, err error) @@ -46,6 +48,7 @@ type ApplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result hdinsight.ApplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result hdinsight.Application, err error) ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ApplicationListResultPage, err error) + ListByClusterComplete(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ApplicationListResultIterator, err error) } var _ ApplicationsClientAPI = (*hdinsight.ApplicationsClient)(nil) @@ -85,6 +88,7 @@ type ScriptActionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, clusterName string, scriptName string) (result autorest.Response, err error) GetExecutionDetail(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string) (result hdinsight.RuntimeScriptActionDetail, err error) ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionsListPage, err error) + ListByClusterComplete(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionsListIterator, err error) } var _ ScriptActionsClientAPI = (*hdinsight.ScriptActionsClient)(nil) @@ -92,6 +96,7 @@ var _ ScriptActionsClientAPI = (*hdinsight.ScriptActionsClient)(nil) // ScriptExecutionHistoryClientAPI contains the set of methods on the ScriptExecutionHistoryClient type. type ScriptExecutionHistoryClientAPI interface { ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionExecutionHistoryListPage, err error) + ListByClusterComplete(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionExecutionHistoryListIterator, err error) Promote(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string) (result autorest.Response, err error) } @@ -100,6 +105,7 @@ var _ ScriptExecutionHistoryClientAPI = (*hdinsight.ScriptExecutionHistoryClient // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result hdinsight.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result hdinsight.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*hdinsight.OperationsClient)(nil) diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/locations.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/locations.go index 4ad0c4ccaef8..05b6306eb8c8 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/locations.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go index 41ef4a815a5c..804440086344 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go @@ -702,6 +702,8 @@ type ClusterCreateProperties struct { StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // DiskEncryptionProperties - The disk encryption properties. DiskEncryptionProperties *DiskEncryptionProperties `json:"diskEncryptionProperties,omitempty"` + // MinSupportedTLSVersion - The minimal supported tls version. + MinSupportedTLSVersion *string `json:"minSupportedTlsVersion,omitempty"` } // ClusterDefinition the cluster definition. @@ -774,6 +776,8 @@ type ClusterGetProperties struct { ConnectivityEndpoints *[]ConnectivityEndpoint `json:"connectivityEndpoints,omitempty"` // DiskEncryptionProperties - The disk encryption properties. DiskEncryptionProperties *DiskEncryptionProperties `json:"diskEncryptionProperties,omitempty"` + // MinSupportedTLSVersion - The minimal supported tls version. + MinSupportedTLSVersion *string `json:"minSupportedTlsVersion,omitempty"` } // ClusterIdentity identity for the cluster. diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/operations.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/operations.go index 87d505699d25..617aa0b65ef8 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/operations.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/scriptactions.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/scriptactions.go index ff1ae073c42c..b3f986bcd488 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/scriptactions.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/scriptactions.go @@ -35,7 +35,8 @@ func NewScriptActionsClient(subscriptionID string) ScriptActionsClient { return NewScriptActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScriptActionsClientWithBaseURI creates an instance of the ScriptActionsClient client. +// NewScriptActionsClientWithBaseURI creates an instance of the ScriptActionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewScriptActionsClientWithBaseURI(baseURI string, subscriptionID string) ScriptActionsClient { return ScriptActionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/scriptexecutionhistory.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/scriptexecutionhistory.go index 74f551ef3b7e..2290aedc36e1 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/scriptexecutionhistory.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/scriptexecutionhistory.go @@ -35,7 +35,9 @@ func NewScriptExecutionHistoryClient(subscriptionID string) ScriptExecutionHisto return NewScriptExecutionHistoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScriptExecutionHistoryClientWithBaseURI creates an instance of the ScriptExecutionHistoryClient client. +// NewScriptExecutionHistoryClientWithBaseURI creates an instance of the ScriptExecutionHistoryClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewScriptExecutionHistoryClientWithBaseURI(baseURI string, subscriptionID string) ScriptExecutionHistoryClient { return ScriptExecutionHistoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/client.go b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/client.go index 93457d7f2c43..aa79adfc0c22 100644 --- a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/client.go +++ b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/healthcareapisapi/interfaces.go b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/healthcareapisapi/interfaces.go index c601f369754c..abed4dc6ca8e 100644 --- a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/healthcareapisapi/interfaces.go +++ b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/healthcareapisapi/interfaces.go @@ -29,7 +29,9 @@ type ServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result healthcareapis.ServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result healthcareapis.ServicesDescription, err error) List(ctx context.Context) (result healthcareapis.ServicesDescriptionListResultPage, err error) + ListComplete(ctx context.Context) (result healthcareapis.ServicesDescriptionListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result healthcareapis.ServicesDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result healthcareapis.ServicesDescriptionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, servicePatchDescription healthcareapis.ServicesPatchDescription) (result healthcareapis.ServicesUpdateFuture, err error) } @@ -38,6 +40,7 @@ var _ ServicesClientAPI = (*healthcareapis.ServicesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result healthcareapis.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result healthcareapis.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*healthcareapis.OperationsClient)(nil) diff --git a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/operationresults.go b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/operationresults.go index 504c3684c1cc..f72341f94145 100644 --- a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/operationresults.go +++ b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/operationresults.go @@ -35,7 +35,9 @@ func NewOperationResultsClient(subscriptionID string) OperationResultsClient { return NewOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client. +// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) OperationResultsClient { return OperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/operations.go b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/operations.go index c40e9f07f8ac..b001f3539b2c 100644 --- a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/operations.go +++ b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/services.go b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/services.go index 32cd6b0803a5..00c2f7249b85 100644 --- a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/services.go +++ b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/client.go b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/client.go new file mode 100644 index 000000000000..cb9cc5d72e9e --- /dev/null +++ b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/client.go @@ -0,0 +1,52 @@ +// Package hybridcompute implements the Azure ARM Hybridcompute service API version 2019-12-12. +// +// The Hybrid Compute Management Client. +package hybridcompute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Hybridcompute + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Hybridcompute. +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/hybridcompute/mgmt/2019-12-12/hybridcompute/hybridcomputeapi/interfaces.go b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/hybridcomputeapi/interfaces.go new file mode 100644 index 000000000000..b7a2fae5d0f6 --- /dev/null +++ b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/hybridcomputeapi/interfaces.go @@ -0,0 +1,58 @@ +package hybridcomputeapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute" + "github.com/Azure/go-autorest/autorest" +) + +// MachinesClientAPI contains the set of methods on the MachinesClient type. +type MachinesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters hybridcompute.Machine) (result hybridcompute.Machine, err error) + Delete(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, name string, expand hybridcompute.InstanceViewTypes) (result hybridcompute.Machine, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result hybridcompute.MachineListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result hybridcompute.MachineListResultIterator, err error) + ListBySubscription(ctx context.Context) (result hybridcompute.MachineListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result hybridcompute.MachineListResultIterator, err error) + Reconnect(ctx context.Context, resourceGroupName string, name string, parameters hybridcompute.MachineReconnect) (result hybridcompute.Machine, err error) + Update(ctx context.Context, resourceGroupName string, name string, parameters hybridcompute.MachineUpdate) (result hybridcompute.Machine, err error) +} + +var _ MachinesClientAPI = (*hybridcompute.MachinesClient)(nil) + +// MachineExtensionsClientAPI contains the set of methods on the MachineExtensionsClient type. +type MachineExtensionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, extensionName string, extensionParameters hybridcompute.MachineExtension) (result hybridcompute.MachineExtensionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, name string, extensionName string) (result hybridcompute.MachineExtensionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, name string, extensionName string) (result hybridcompute.MachineExtension, err error) + List(ctx context.Context, resourceGroupName string, name string, expand string) (result hybridcompute.MachineExtensionsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, name string, expand string) (result hybridcompute.MachineExtensionsListResultIterator, err error) + Update(ctx context.Context, resourceGroupName string, name string, extensionName string, extensionParameters hybridcompute.MachineExtensionUpdate) (result hybridcompute.MachineExtensionsUpdateFuture, err error) +} + +var _ MachineExtensionsClientAPI = (*hybridcompute.MachineExtensionsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result hybridcompute.OperationListResult, err error) +} + +var _ OperationsClientAPI = (*hybridcompute.OperationsClient)(nil) diff --git a/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/machineextensions.go b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/machineextensions.go new file mode 100644 index 000000000000..a357a244a518 --- /dev/null +++ b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/machineextensions.go @@ -0,0 +1,514 @@ +package hybridcompute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MachineExtensionsClient is the the Hybrid Compute Management Client. +type MachineExtensionsClient struct { + BaseClient +} + +// NewMachineExtensionsClient creates an instance of the MachineExtensionsClient client. +func NewMachineExtensionsClient(subscriptionID string) MachineExtensionsClient { + return NewMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewMachineExtensionsClientWithBaseURI creates an instance of the MachineExtensionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) MachineExtensionsClient { + return MachineExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the machine where the extension should be created or updated. +// extensionName - the name of the machine extension. +// extensionParameters - parameters supplied to the Create Machine Extension operation. +func (client MachineExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, extensionName string, extensionParameters MachineExtension) (result MachineExtensionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineExtensionsClient.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}}}}); err != nil { + return result, validation.NewError("hybridcompute.MachineExtensionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, name, extensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client MachineExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, name string, extensionName string, extensionParameters MachineExtension) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.HybridCompute/machines/{name}/extensions/{extensionName}", 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 MachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future MachineExtensionsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client MachineExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result MachineExtension, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the machine where the extension should be deleted. +// extensionName - the name of the machine extension. +func (client MachineExtensionsClient) Delete(ctx context.Context, resourceGroupName string, name string, extensionName string) (result MachineExtensionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineExtensionsClient.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}}}}); err != nil { + return result, validation.NewError("hybridcompute.MachineExtensionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, name, extensionName) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client MachineExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, extensionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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/{name}/extensions/{extensionName}", 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 MachineExtensionsClient) DeleteSender(req *http.Request) (future MachineExtensionsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client MachineExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation to get the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the machine containing the extension. +// extensionName - the name of the machine extension. +func (client MachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, name string, extensionName string) (result MachineExtension, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineExtensionsClient.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}}}}); err != nil { + return result, validation.NewError("hybridcompute.MachineExtensionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, extensionName) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MachineExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, extensionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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/{name}/extensions/{extensionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MachineExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MachineExtensionsClient) GetResponder(resp *http.Response) (result MachineExtension, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List the operation to get all extensions of a non-Azure machine +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the machine containing the extension. +// expand - the expand expression to apply on the operation. +func (client MachineExtensionsClient) List(ctx context.Context, resourceGroupName string, name string, expand string) (result MachineExtensionsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineExtensionsClient.List") + defer func() { + sc := -1 + if result.melr.Response.Response != nil { + sc = result.melr.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("hybridcompute.MachineExtensionsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, name, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.melr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "List", resp, "Failure sending request") + return + } + + result.melr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MachineExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, name string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.HybridCompute/machines/{name}/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 MachineExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MachineExtensionsClient) ListResponder(resp *http.Response) (result MachineExtensionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client MachineExtensionsClient) listNextResults(ctx context.Context, lastResults MachineExtensionsListResult) (result MachineExtensionsListResult, err error) { + req, err := lastResults.machineExtensionsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "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, "hybridcompute.MachineExtensionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client MachineExtensionsClient) ListComplete(ctx context.Context, resourceGroupName string, name string, expand string) (result MachineExtensionsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineExtensionsClient.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, name, expand) + return +} + +// Update the operation to create or update the extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the machine where the extension should be created or updated. +// extensionName - the name of the machine extension. +// extensionParameters - parameters supplied to the Create Machine Extension operation. +func (client MachineExtensionsClient) Update(ctx context.Context, resourceGroupName string, name string, extensionName string, extensionParameters MachineExtensionUpdate) (result MachineExtensionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineExtensionsClient.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}}}}); err != nil { + return result, validation.NewError("hybridcompute.MachineExtensionsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, name, extensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client MachineExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, extensionName string, extensionParameters MachineExtensionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.HybridCompute/machines/{name}/extensions/{extensionName}", 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 MachineExtensionsClient) UpdateSender(req *http.Request) (future MachineExtensionsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client MachineExtensionsClient) UpdateResponder(resp *http.Response) (result MachineExtension, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/machines.go b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/machines.go new file mode 100644 index 000000000000..632c462ac827 --- /dev/null +++ b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/machines.go @@ -0,0 +1,707 @@ +package hybridcompute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MachinesClient is the the Hybrid Compute Management Client. +type MachinesClient struct { + BaseClient +} + +// NewMachinesClient creates an instance of the MachinesClient client. +func NewMachinesClient(subscriptionID string) MachinesClient { + return NewMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewMachinesClientWithBaseURI(baseURI string, subscriptionID string) MachinesClient { + return MachinesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update a hybrid machine resource identity in Azure. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the hybrid machine. +// parameters - parameters supplied to the Create hybrid machine operation. +func (client MachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters Machine) (result Machine, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.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}}}}); err != nil { + return result, validation.NewError("hybridcompute.MachinesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, name, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client MachinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, name string, parameters Machine) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.HybridCompute/machines/{name}", 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 MachinesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client MachinesClient) CreateOrUpdateResponder(resp *http.Response) (result Machine, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to remove a hybrid machine identity in Azure. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the hybrid machine. +func (client MachinesClient) Delete(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.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}}}}); err != nil { + return result, validation.NewError("hybridcompute.MachinesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client MachinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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/{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 MachinesClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client MachinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves information about the model view or the instance view of a hybrid machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the hybrid machine. +// expand - the expand expression to apply on the operation. +func (client MachinesClient) Get(ctx context.Context, resourceGroupName string, name string, expand InstanceViewTypes) (result Machine, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.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}}}}); err != nil { + return result, validation.NewError("hybridcompute.MachinesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, name, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MachinesClient) GetPreparer(ctx context.Context, resourceGroupName string, name string, expand InstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.HybridCompute/machines/{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 MachinesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MachinesClient) GetResponder(resp *http.Response) (result Machine, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all the hybrid machines in the specified resource group. Use the nextLink property in the +// response to get the next page of hybrid machines. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client MachinesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result MachineListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.mlr.Response.Response != nil { + sc = result.mlr.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("hybridcompute.MachinesClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.mlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.mlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client MachinesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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", 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 MachinesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client MachinesClient) ListByResourceGroupResponder(resp *http.Response) (result MachineListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client MachinesClient) listByResourceGroupNextResults(ctx context.Context, lastResults MachineListResult) (result MachineListResult, err error) { + req, err := lastResults.machineListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "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, "hybridcompute.MachinesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client MachinesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result MachineListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.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 the hybrid machines in the specified subscription. Use the nextLink property in the +// response to get the next page of hybrid machines. +func (client MachinesClient) ListBySubscription(ctx context.Context) (result MachineListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.ListBySubscription") + defer func() { + sc := -1 + if result.mlr.Response.Response != nil { + sc = result.mlr.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("hybridcompute.MachinesClient", "ListBySubscription", err.Error()) + } + + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.mlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.mlr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client MachinesClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines", 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 MachinesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client MachinesClient) ListBySubscriptionResponder(resp *http.Response) (result MachineListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client MachinesClient) listBySubscriptionNextResults(ctx context.Context, lastResults MachineListResult) (result MachineListResult, err error) { + req, err := lastResults.machineListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "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, "hybridcompute.MachinesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client MachinesClient) ListBySubscriptionComplete(ctx context.Context) (result MachineListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.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 +} + +// Reconnect the operation to reconnect a hybrid machine resource to its identity in Azure. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the hybrid machine. +// parameters - parameters supplied to the Reconnect hybrid machine operation. +func (client MachinesClient) Reconnect(ctx context.Context, resourceGroupName string, name string, parameters MachineReconnect) (result Machine, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.Reconnect") + defer func() { + 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("hybridcompute.MachinesClient", "Reconnect", err.Error()) + } + + req, err := client.ReconnectPreparer(ctx, resourceGroupName, name, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Reconnect", nil, "Failure preparing request") + return + } + + resp, err := client.ReconnectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Reconnect", resp, "Failure sending request") + return + } + + result, err = client.ReconnectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Reconnect", resp, "Failure responding to request") + } + + return +} + +// ReconnectPreparer prepares the Reconnect request. +func (client MachinesClient) ReconnectPreparer(ctx context.Context, resourceGroupName string, name string, parameters MachineReconnect) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.HybridCompute/machines/{name}/reconnect", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReconnectSender sends the Reconnect request. The method will close the +// http.Response Body if it receives an error. +func (client MachinesClient) ReconnectSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReconnectResponder handles the response to the Reconnect request. The method always +// closes the http.Response Body. +func (client MachinesClient) ReconnectResponder(resp *http.Response) (result Machine, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update the operation to update a hybrid machine. +// Parameters: +// resourceGroupName - the name of the resource group. +// name - the name of the hybrid machine. +// parameters - parameters supplied to the Update hybrid machine operation. +func (client MachinesClient) Update(ctx context.Context, resourceGroupName string, name string, parameters MachineUpdate) (result Machine, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachinesClient.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}}}}); err != nil { + return result, validation.NewError("hybridcompute.MachinesClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, name, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachinesClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client MachinesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, parameters MachineUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-12" + 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.HybridCompute/machines/{name}", 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 MachinesClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client MachinesClient) UpdateResponder(resp *http.Response) (result Machine, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/models.go b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/models.go new file mode 100644 index 000000000000..eef7874878be --- /dev/null +++ b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/models.go @@ -0,0 +1,1436 @@ +package hybridcompute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute" + +// InstanceViewTypes enumerates the values for instance view types. +type InstanceViewTypes string + +const ( + // InstanceView ... + InstanceView InstanceViewTypes = "instanceView" +) + +// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type. +func PossibleInstanceViewTypesValues() []InstanceViewTypes { + return []InstanceViewTypes{InstanceView} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{SystemAssigned} +} + +// SkuTier enumerates the values for sku tier. +type SkuTier string + +const ( + // Basic ... + Basic SkuTier = "Basic" + // Free ... + Free SkuTier = "Free" + // Premium ... + Premium SkuTier = "Premium" + // Standard ... + Standard SkuTier = "Standard" +) + +// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. +func PossibleSkuTierValues() []SkuTier { + return []SkuTier{Basic, Free, Premium, Standard} +} + +// StatusLevelTypes enumerates the values for status level types. +type StatusLevelTypes string + +const ( + // Error ... + Error StatusLevelTypes = "Error" + // Info ... + Info StatusLevelTypes = "Info" + // Warning ... + Warning StatusLevelTypes = "Warning" +) + +// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type. +func PossibleStatusLevelTypesValues() []StatusLevelTypes { + return []StatusLevelTypes{Error, Info, Warning} +} + +// StatusTypes enumerates the values for status types. +type StatusTypes string + +const ( + // StatusTypesConnected ... + StatusTypesConnected StatusTypes = "Connected" + // StatusTypesDisconnected ... + StatusTypesDisconnected StatusTypes = "Disconnected" + // StatusTypesError ... + StatusTypesError StatusTypes = "Error" +) + +// PossibleStatusTypesValues returns an array of possible values for the StatusTypes const type. +func PossibleStatusTypesValues() []StatusTypes { + return []StatusTypes{StatusTypesConnected, StatusTypesDisconnected, StatusTypesError} +} + +// AzureEntityResource the resource model definition for a 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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,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"` +} + +// ErrorDetail ... +type ErrorDetail struct { + // Code - The error's code. + Code *string `json:"code,omitempty"` + // Message - A human readable error message. + Message *string `json:"message,omitempty"` + // Target - Indicates which property in the request is responsible for the error. + Target *string `json:"target,omitempty"` + // Details - Additional error details. + Details *[]ErrorDetail `json:"details,omitempty"` +} + +// ErrorResponse the resource management error response. +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"` +} + +// Identity identity for the resource. +type Identity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'SystemAssigned' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// LocationData metadata pertaining to the geographic location of the resource. +type LocationData struct { + // Name - A canonical name for the geographic or physical location. + Name *string `json:"name,omitempty"` + // City - The city or locality where the resource is located. + City *string `json:"city,omitempty"` + // District - The district, state, or province where the resource is located. + District *string `json:"district,omitempty"` + // CountryOrRegion - The country or region where the resource is located + CountryOrRegion *string `json:"countryOrRegion,omitempty"` +} + +// Machine describes a hybrid machine. +type Machine struct { + autorest.Response `json:"-"` + // MachinePropertiesModel - Hybrid Compute Machine properties + *MachinePropertiesModel `json:"properties,omitempty"` + Identity *MachineIdentity `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Machine. +func (mVar Machine) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mVar.MachinePropertiesModel != nil { + objectMap["properties"] = mVar.MachinePropertiesModel + } + if mVar.Identity != nil { + objectMap["identity"] = mVar.Identity + } + if mVar.Tags != nil { + objectMap["tags"] = mVar.Tags + } + if mVar.Location != nil { + objectMap["location"] = mVar.Location + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Machine struct. +func (mVar *Machine) UnmarshalJSON(body []byte) error { + var m map[string]*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 machinePropertiesModel MachinePropertiesModel + err = json.Unmarshal(*v, &machinePropertiesModel) + if err != nil { + return err + } + mVar.MachinePropertiesModel = &machinePropertiesModel + } + case "identity": + if v != nil { + var identity MachineIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + mVar.Identity = &identity + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mVar.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mVar.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mVar.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mVar.Type = &typeVar + } + } + } + + return nil +} + +// MachineExtension describes a Machine Extension. +type MachineExtension struct { + autorest.Response `json:"-"` + // MachineExtensionProperties - Describes Machine Extension Properties. + *MachineExtensionProperties `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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for MachineExtension. +func (me MachineExtension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if me.MachineExtensionProperties != nil { + objectMap["properties"] = me.MachineExtensionProperties + } + if me.Tags != nil { + objectMap["tags"] = me.Tags + } + if me.Location != nil { + objectMap["location"] = me.Location + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MachineExtension struct. +func (me *MachineExtension) UnmarshalJSON(body []byte) error { + var m map[string]*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 machineExtensionProperties MachineExtensionProperties + err = json.Unmarshal(*v, &machineExtensionProperties) + if err != nil { + return err + } + me.MachineExtensionProperties = &machineExtensionProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + me.Tags = tags + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + me.Location = &location + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + me.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + me.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + me.Type = &typeVar + } + } + } + + return nil +} + +// MachineExtensionInstanceView describes the Machine Extension Instance View. +type MachineExtensionInstanceView struct { + // Name - The 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"` + // Status - Instance view status. + Status *MachineExtensionInstanceViewStatus `json:"status,omitempty"` +} + +// MachineExtensionInstanceViewStatus instance view status. +type MachineExtensionInstanceViewStatus struct { + // Code - The status code. + Code *string `json:"code,omitempty"` + // Level - The level code. Possible values include: 'Info', 'Warning', 'Error' + 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"` +} + +// MachineExtensionProperties describes Machine Extension Properties. +type MachineExtensionProperties 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"` + // 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 machine extension instance view. + InstanceView *MachineExtensionPropertiesInstanceView `json:"instanceView,omitempty"` +} + +// MachineExtensionPropertiesInstanceView the machine extension instance view. +type MachineExtensionPropertiesInstanceView struct { + // Name - The 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"` + // Status - Instance view status. + Status *MachineExtensionInstanceViewStatus `json:"status,omitempty"` +} + +// MachineExtensionPropertiesModel describes the properties of a Machine Extension. +type MachineExtensionPropertiesModel 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"` + // 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 machine extension instance view. + InstanceView *MachineExtensionPropertiesInstanceView `json:"instanceView,omitempty"` +} + +// MachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type MachineExtensionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MachineExtensionsCreateOrUpdateFuture) Result(client MachineExtensionsClient) (me MachineExtension, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("hybridcompute.MachineExtensionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if me.Response.Response, err = future.GetResult(sender); err == nil && me.Response.Response.StatusCode != http.StatusNoContent { + me, err = client.CreateOrUpdateResponder(me.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsCreateOrUpdateFuture", "Result", me.Response.Response, "Failure responding to request") + } + } + return +} + +// MachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type MachineExtensionsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MachineExtensionsDeleteFuture) Result(client MachineExtensionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("hybridcompute.MachineExtensionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// MachineExtensionsListResult describes the Machine Extensions List Result. +type MachineExtensionsListResult struct { + autorest.Response `json:"-"` + // Value - The list of extensions + Value *[]MachineExtension `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. + NextLink *string `json:"nextLink,omitempty"` +} + +// MachineExtensionsListResultIterator provides access to a complete listing of MachineExtension values. +type MachineExtensionsListResultIterator struct { + i int + page MachineExtensionsListResultPage +} + +// 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 *MachineExtensionsListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineExtensionsListResultIterator.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 *MachineExtensionsListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter MachineExtensionsListResultIterator) 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 MachineExtensionsListResultIterator) Response() MachineExtensionsListResult { + 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 MachineExtensionsListResultIterator) Value() MachineExtension { + if !iter.page.NotDone() { + return MachineExtension{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the MachineExtensionsListResultIterator type. +func NewMachineExtensionsListResultIterator(page MachineExtensionsListResultPage) MachineExtensionsListResultIterator { + return MachineExtensionsListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (melr MachineExtensionsListResult) IsEmpty() bool { + return melr.Value == nil || len(*melr.Value) == 0 +} + +// machineExtensionsListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (melr MachineExtensionsListResult) machineExtensionsListResultPreparer(ctx context.Context) (*http.Request, error) { + if melr.NextLink == nil || len(to.String(melr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(melr.NextLink))) +} + +// MachineExtensionsListResultPage contains a page of MachineExtension values. +type MachineExtensionsListResultPage struct { + fn func(context.Context, MachineExtensionsListResult) (MachineExtensionsListResult, error) + melr MachineExtensionsListResult +} + +// 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 *MachineExtensionsListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineExtensionsListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.melr) + if err != nil { + return err + } + page.melr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *MachineExtensionsListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page MachineExtensionsListResultPage) NotDone() bool { + return !page.melr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page MachineExtensionsListResultPage) Response() MachineExtensionsListResult { + return page.melr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page MachineExtensionsListResultPage) Values() []MachineExtension { + if page.melr.IsEmpty() { + return nil + } + return *page.melr.Value +} + +// Creates a new instance of the MachineExtensionsListResultPage type. +func NewMachineExtensionsListResultPage(getNextPage func(context.Context, MachineExtensionsListResult) (MachineExtensionsListResult, error)) MachineExtensionsListResultPage { + return MachineExtensionsListResultPage{fn: getNextPage} +} + +// MachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type MachineExtensionsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MachineExtensionsUpdateFuture) Result(client MachineExtensionsClient) (me MachineExtension, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("hybridcompute.MachineExtensionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if me.Response.Response, err = future.GetResult(sender); err == nil && me.Response.Response.StatusCode != http.StatusNoContent { + me, err = client.UpdateResponder(me.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.MachineExtensionsUpdateFuture", "Result", me.Response.Response, "Failure responding to request") + } + } + return +} + +// MachineExtensionUpdate describes a Machine Extension Update. +type MachineExtensionUpdate struct { + // MachineExtensionUpdateProperties - Describes Machine Extension Update Properties. + *MachineExtensionUpdateProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for MachineExtensionUpdate. +func (meu MachineExtensionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if meu.MachineExtensionUpdateProperties != nil { + objectMap["properties"] = meu.MachineExtensionUpdateProperties + } + if meu.Tags != nil { + objectMap["tags"] = meu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MachineExtensionUpdate struct. +func (meu *MachineExtensionUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*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 machineExtensionUpdateProperties MachineExtensionUpdateProperties + err = json.Unmarshal(*v, &machineExtensionUpdateProperties) + if err != nil { + return err + } + meu.MachineExtensionUpdateProperties = &machineExtensionUpdateProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + meu.Tags = tags + } + } + } + + return nil +} + +// MachineExtensionUpdateProperties describes Machine Extension Update Properties. +type MachineExtensionUpdateProperties 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"` + // 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"` +} + +// MachineExtensionUpdatePropertiesModel describes the properties of a Machine Extension. +type MachineExtensionUpdatePropertiesModel 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"` + // 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"` +} + +// MachineIdentity ... +type MachineIdentity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'SystemAssigned' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// MachineListResult the List hybrid machine operation response. +type MachineListResult struct { + autorest.Response `json:"-"` + // Value - The list of hybrid machines. + Value *[]Machine `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of hybrid machines. + NextLink *string `json:"nextLink,omitempty"` +} + +// MachineListResultIterator provides access to a complete listing of Machine values. +type MachineListResultIterator struct { + i int + page MachineListResultPage +} + +// 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 *MachineListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineListResultIterator.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 *MachineListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter MachineListResultIterator) 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 MachineListResultIterator) Response() MachineListResult { + 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 MachineListResultIterator) Value() Machine { + if !iter.page.NotDone() { + return Machine{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the MachineListResultIterator type. +func NewMachineListResultIterator(page MachineListResultPage) MachineListResultIterator { + return MachineListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (mlr MachineListResult) IsEmpty() bool { + return mlr.Value == nil || len(*mlr.Value) == 0 +} + +// machineListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (mlr MachineListResult) machineListResultPreparer(ctx context.Context) (*http.Request, error) { + if mlr.NextLink == nil || len(to.String(mlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(mlr.NextLink))) +} + +// MachineListResultPage contains a page of Machine values. +type MachineListResultPage struct { + fn func(context.Context, MachineListResult) (MachineListResult, error) + mlr MachineListResult +} + +// 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 *MachineListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MachineListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.mlr) + if err != nil { + return err + } + page.mlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *MachineListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page MachineListResultPage) NotDone() bool { + return !page.mlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page MachineListResultPage) Response() MachineListResult { + return page.mlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page MachineListResultPage) Values() []Machine { + if page.mlr.IsEmpty() { + return nil + } + return *page.mlr.Value +} + +// Creates a new instance of the MachineListResultPage type. +func NewMachineListResultPage(getNextPage func(context.Context, MachineListResult) (MachineListResult, error)) MachineListResultPage { + return MachineListResultPage{fn: getNextPage} +} + +// MachineProperties describes the properties of a hybrid machine. +type MachineProperties struct { + LocationData *LocationData `json:"locationData,omitempty"` + // OsProfile - Specifies the operating system settings for the hybrid machine. + OsProfile *MachinePropertiesOsProfile `json:"osProfile,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Status - READ-ONLY; The status of the hybrid machine agent. Possible values include: 'StatusTypesConnected', 'StatusTypesDisconnected', 'StatusTypesError' + Status StatusTypes `json:"status,omitempty"` + // LastStatusChange - READ-ONLY; The time of the last status change. + LastStatusChange *date.Time `json:"lastStatusChange,omitempty"` + // ErrorDetails - READ-ONLY; Details about the error state. + ErrorDetails *[]ErrorDetail `json:"errorDetails,omitempty"` + // AgentVersion - READ-ONLY; The hybrid machine agent full version. + AgentVersion *string `json:"agentVersion,omitempty"` + // VMID - Specifies the hybrid machine unique ID. + VMID *string `json:"vmId,omitempty"` + // DisplayName - READ-ONLY; Specifies the hybrid machine display name. + DisplayName *string `json:"displayName,omitempty"` + // MachineFqdn - READ-ONLY; Specifies the hybrid machine FQDN. + MachineFqdn *string `json:"machineFqdn,omitempty"` + // ClientPublicKey - Public Key that the client provides to be used during initial resource onboarding + ClientPublicKey *string `json:"clientPublicKey,omitempty"` + // OsName - READ-ONLY; The Operating System running on the hybrid machine. + OsName *string `json:"osName,omitempty"` + // OsVersion - READ-ONLY; The version of Operating System running on the hybrid machine. + OsVersion *string `json:"osVersion,omitempty"` + // Extensions - Machine Extensions information + Extensions *[]MachineExtensionInstanceView `json:"extensions,omitempty"` +} + +// MachinePropertiesModel hybrid Compute Machine properties +type MachinePropertiesModel struct { + LocationData *LocationData `json:"locationData,omitempty"` + // OsProfile - Specifies the operating system settings for the hybrid machine. + OsProfile *MachinePropertiesOsProfile `json:"osProfile,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Status - READ-ONLY; The status of the hybrid machine agent. Possible values include: 'StatusTypesConnected', 'StatusTypesDisconnected', 'StatusTypesError' + Status StatusTypes `json:"status,omitempty"` + // LastStatusChange - READ-ONLY; The time of the last status change. + LastStatusChange *date.Time `json:"lastStatusChange,omitempty"` + // ErrorDetails - READ-ONLY; Details about the error state. + ErrorDetails *[]ErrorDetail `json:"errorDetails,omitempty"` + // AgentVersion - READ-ONLY; The hybrid machine agent full version. + AgentVersion *string `json:"agentVersion,omitempty"` + // VMID - Specifies the hybrid machine unique ID. + VMID *string `json:"vmId,omitempty"` + // DisplayName - READ-ONLY; Specifies the hybrid machine display name. + DisplayName *string `json:"displayName,omitempty"` + // MachineFqdn - READ-ONLY; Specifies the hybrid machine FQDN. + MachineFqdn *string `json:"machineFqdn,omitempty"` + // ClientPublicKey - Public Key that the client provides to be used during initial resource onboarding + ClientPublicKey *string `json:"clientPublicKey,omitempty"` + // OsName - READ-ONLY; The Operating System running on the hybrid machine. + OsName *string `json:"osName,omitempty"` + // OsVersion - READ-ONLY; The version of Operating System running on the hybrid machine. + OsVersion *string `json:"osVersion,omitempty"` + // Extensions - Machine Extensions information + Extensions *[]MachineExtensionInstanceView `json:"extensions,omitempty"` +} + +// MachinePropertiesOsProfile specifies the operating system settings for the hybrid machine. +type MachinePropertiesOsProfile struct { + // ComputerName - READ-ONLY; Specifies the host OS name of the hybrid machine. + ComputerName *string `json:"computerName,omitempty"` +} + +// MachineReconnect describes a hybrid machine reconnect. +type MachineReconnect struct { + // MachineReconnectPropertiesModel - Hybrid Compute Machine properties + *MachineReconnectPropertiesModel `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for MachineReconnect. +func (mr MachineReconnect) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mr.MachineReconnectPropertiesModel != nil { + objectMap["properties"] = mr.MachineReconnectPropertiesModel + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MachineReconnect struct. +func (mr *MachineReconnect) UnmarshalJSON(body []byte) error { + var m map[string]*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 machineReconnectPropertiesModel MachineReconnectPropertiesModel + err = json.Unmarshal(*v, &machineReconnectPropertiesModel) + if err != nil { + return err + } + mr.MachineReconnectPropertiesModel = &machineReconnectPropertiesModel + } + } + } + + return nil +} + +// MachineReconnectProperties describes the properties required to reconnect a hybrid machine. +type MachineReconnectProperties struct { + // VMID - Specifies the hybrid machine unique ID. + VMID *string `json:"vmId,omitempty"` + // ClientPublicKey - Public Key that the client provides to be used during initial resource onboarding. + ClientPublicKey *string `json:"clientPublicKey,omitempty"` +} + +// MachineReconnectPropertiesModel hybrid Compute Machine properties +type MachineReconnectPropertiesModel struct { + // VMID - Specifies the hybrid machine unique ID. + VMID *string `json:"vmId,omitempty"` + // ClientPublicKey - Public Key that the client provides to be used during initial resource onboarding. + ClientPublicKey *string `json:"clientPublicKey,omitempty"` +} + +// MachineUpdate describes a hybrid machine Update. +type MachineUpdate struct { + // MachineUpdateIdentity - Hybrid Compute Machine Managed Identity + *MachineUpdateIdentity `json:"identity,omitempty"` + // MachineUpdatePropertiesModel - Hybrid Compute Machine properties + *MachineUpdatePropertiesModel `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for MachineUpdate. +func (mu MachineUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mu.MachineUpdateIdentity != nil { + objectMap["identity"] = mu.MachineUpdateIdentity + } + if mu.MachineUpdatePropertiesModel != nil { + objectMap["properties"] = mu.MachineUpdatePropertiesModel + } + if mu.Tags != nil { + objectMap["tags"] = mu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for MachineUpdate struct. +func (mu *MachineUpdate) UnmarshalJSON(body []byte) error { + 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 machineUpdateIdentity MachineUpdateIdentity + err = json.Unmarshal(*v, &machineUpdateIdentity) + if err != nil { + return err + } + mu.MachineUpdateIdentity = &machineUpdateIdentity + } + case "properties": + if v != nil { + var machineUpdatePropertiesModel MachineUpdatePropertiesModel + err = json.Unmarshal(*v, &machineUpdatePropertiesModel) + if err != nil { + return err + } + mu.MachineUpdatePropertiesModel = &machineUpdatePropertiesModel + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mu.Tags = tags + } + } + } + + return nil +} + +// MachineUpdateIdentity hybrid Compute Machine Managed Identity +type MachineUpdateIdentity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'SystemAssigned' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// MachineUpdateProperties describes the ARM updatable properties of a hybrid machine. +type MachineUpdateProperties struct { + LocationData *LocationData `json:"locationData,omitempty"` +} + +// MachineUpdatePropertiesModel hybrid Compute Machine properties +type MachineUpdatePropertiesModel struct { + LocationData *LocationData `json:"locationData,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"` +} + +// 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 - Display properties + *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 display properties +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"` +} + +// OperationValueDisplayModel describes the properties of a Hybrid Compute Operation Value Display. +type OperationValueDisplayModel 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"` +} + +// OSProfile specifies the operating system settings for the hybrid machine. +type OSProfile struct { + // ComputerName - READ-ONLY; Specifies the host OS name of the hybrid machine. + ComputerName *string `json:"computerName,omitempty"` +} + +// Plan plan for the resource. +type Plan struct { + // Name - A user defined name of the 3rd Party Artifact that is being procured. + Name *string `json:"name,omitempty"` + // Publisher - The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + Publisher *string `json:"publisher,omitempty"` + // Product - The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. + Product *string `json:"product,omitempty"` + // PromotionCode - A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + PromotionCode *string `json:"promotionCode,omitempty"` + // Version - The version of the desired product/artifact. + Version *string `json:"version,omitempty"` +} + +// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than +// required location and tags +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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// Resource ... +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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// ResourceModelWithAllowedPropertySet the resource model definition containing the full set of allowed +// properties for a resource. Except properties bag, there cannot be a top level property outside of this +// set. +type ResourceModelWithAllowedPropertySet 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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.. + Type *string `json:"type,omitempty"` + // Location - The geo-location where the resource lives + Location *string `json:"location,omitempty"` + // ManagedBy - The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Kind - Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. + Kind *string `json:"kind,omitempty"` + // Etag - READ-ONLY; The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + Etag *string `json:"etag,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"` + Sku *ResourceModelWithAllowedPropertySetSku `json:"sku,omitempty"` + Plan *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceModelWithAllowedPropertySet. +func (rmwaps ResourceModelWithAllowedPropertySet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rmwaps.Location != nil { + objectMap["location"] = rmwaps.Location + } + if rmwaps.ManagedBy != nil { + objectMap["managedBy"] = rmwaps.ManagedBy + } + if rmwaps.Kind != nil { + objectMap["kind"] = rmwaps.Kind + } + if rmwaps.Tags != nil { + objectMap["tags"] = rmwaps.Tags + } + if rmwaps.Identity != nil { + objectMap["identity"] = rmwaps.Identity + } + if rmwaps.Sku != nil { + objectMap["sku"] = rmwaps.Sku + } + if rmwaps.Plan != nil { + objectMap["plan"] = rmwaps.Plan + } + return json.Marshal(objectMap) +} + +// ResourceModelWithAllowedPropertySetIdentity ... +type ResourceModelWithAllowedPropertySetIdentity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'SystemAssigned' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// ResourceModelWithAllowedPropertySetPlan ... +type ResourceModelWithAllowedPropertySetPlan struct { + // Name - A user defined name of the 3rd Party Artifact that is being procured. + Name *string `json:"name,omitempty"` + // Publisher - The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + Publisher *string `json:"publisher,omitempty"` + // Product - The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. + Product *string `json:"product,omitempty"` + // PromotionCode - A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + PromotionCode *string `json:"promotionCode,omitempty"` + // Version - The version of the desired product/artifact. + Version *string `json:"version,omitempty"` +} + +// ResourceModelWithAllowedPropertySetSku ... +type ResourceModelWithAllowedPropertySetSku struct { + // Name - The name of the SKU. Ex - P3. It is typically a letter+number code + Name *string `json:"name,omitempty"` + // Tier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + Tier SkuTier `json:"tier,omitempty"` + // Size - The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + Size *string `json:"size,omitempty"` + // Family - If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string `json:"family,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"` +} + +// Sku the resource model definition representing SKU +type Sku struct { + // Name - The name of the SKU. Ex - P3. It is typically a letter+number code + Name *string `json:"name,omitempty"` + // Tier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + Tier SkuTier `json:"tier,omitempty"` + // Size - The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + Size *string `json:"size,omitempty"` + // Family - If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string `json:"family,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"` +} + +// TrackedResource the resource model definition for a ARM tracked top level resource +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. Ex- 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) +} + +// 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) +} diff --git a/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/operations.go b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/operations.go new file mode 100644 index 000000000000..812cd467c641 --- /dev/null +++ b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/operations.go @@ -0,0 +1,110 @@ +package hybridcompute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the the Hybrid Compute 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)} +} + +// List gets a list of hybrid 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, "hybridcompute.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, "hybridcompute.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "hybridcompute.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2019-12-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.HybridCompute/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/version.go b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/version.go new file mode 100644 index 000000000000..3c86dc00fa66 --- /dev/null +++ b/services/preview/hybridcompute/mgmt/2019-12-12/hybridcompute/version.go @@ -0,0 +1,30 @@ +package hybridcompute + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " hybridcompute/2019-12-12" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/preview/iothub/mgmt/2018-12-01-preview/devices/certificates.go b/services/preview/iothub/mgmt/2018-12-01-preview/devices/certificates.go index aba6c148d55d..8c8c45f9986c 100644 --- a/services/preview/iothub/mgmt/2018-12-01-preview/devices/certificates.go +++ b/services/preview/iothub/mgmt/2018-12-01-preview/devices/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/iothub/mgmt/2018-12-01-preview/devices/client.go b/services/preview/iothub/mgmt/2018-12-01-preview/devices/client.go index 661934a51c75..2b0ba4681f80 100644 --- a/services/preview/iothub/mgmt/2018-12-01-preview/devices/client.go +++ b/services/preview/iothub/mgmt/2018-12-01-preview/devices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/iothub/mgmt/2018-12-01-preview/devices/devicesapi/interfaces.go b/services/preview/iothub/mgmt/2018-12-01-preview/devices/devicesapi/interfaces.go index 6452479298c6..f68073baf6f5 100644 --- a/services/preview/iothub/mgmt/2018-12-01-preview/devices/devicesapi/interfaces.go +++ b/services/preview/iothub/mgmt/2018-12-01-preview/devices/devicesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result devices.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result devices.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*devices.OperationsClient)(nil) @@ -40,18 +41,26 @@ type IotHubResourceClientAPI interface { ExportDevices(ctx context.Context, resourceGroupName string, resourceName string, exportDevicesParameters devices.ExportDevicesRequest) (result devices.JobResponse, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubDescription, err error) GetEndpointHealth(ctx context.Context, resourceGroupName string, iotHubName string) (result devices.EndpointHealthDataListResultPage, err error) + GetEndpointHealthComplete(ctx context.Context, resourceGroupName string, iotHubName string) (result devices.EndpointHealthDataListResultIterator, err error) GetEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result devices.EventHubConsumerGroupInfo, err error) GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string) (result devices.JobResponse, err error) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string) (result devices.SharedAccessSignatureAuthorizationRule, err error) GetQuotaMetrics(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultPage, err error) + GetQuotaMetricsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultIterator, err error) GetStats(ctx context.Context, resourceGroupName string, resourceName string) (result devices.RegistryStatistics, err error) GetValidSkus(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultPage, err error) + GetValidSkusComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultIterator, err error) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters devices.ImportDevicesRequest) (result devices.JobResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result devices.IotHubDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result devices.IotHubDescriptionListResultIterator, err error) ListEventHubConsumerGroups(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultPage, err error) + ListEventHubConsumerGroupsComplete(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultIterator, err error) ListJobs(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultPage, err error) + ListJobsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) TestAllRoutes(ctx context.Context, input devices.TestAllRoutesInput, iotHubName string, resourceGroupName string) (result devices.TestAllRoutesResult, err error) TestRoute(ctx context.Context, input devices.TestRouteInput, iotHubName string, resourceGroupName string) (result devices.TestRouteResult, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, iotHubTags devices.TagsResource) (result devices.IotHubResourceUpdateFuture, err error) diff --git a/services/preview/iothub/mgmt/2018-12-01-preview/devices/iothubresource.go b/services/preview/iothub/mgmt/2018-12-01-preview/devices/iothubresource.go index 279bb326a5c8..e09940e16243 100644 --- a/services/preview/iothub/mgmt/2018-12-01-preview/devices/iothubresource.go +++ b/services/preview/iothub/mgmt/2018-12-01-preview/devices/iothubresource.go @@ -36,7 +36,8 @@ func NewIotHubResourceClient(subscriptionID string) IotHubResourceClient { return NewIotHubResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client. +// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotHubResourceClientWithBaseURI(baseURI string, subscriptionID string) IotHubResourceClient { return IotHubResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/iothub/mgmt/2018-12-01-preview/devices/operations.go b/services/preview/iothub/mgmt/2018-12-01-preview/devices/operations.go index a86d73303fb6..c30ec335c897 100644 --- a/services/preview/iothub/mgmt/2018-12-01-preview/devices/operations.go +++ b/services/preview/iothub/mgmt/2018-12-01-preview/devices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/iothub/mgmt/2018-12-01-preview/devices/resourceprovidercommon.go b/services/preview/iothub/mgmt/2018-12-01-preview/devices/resourceprovidercommon.go index bccf673e4e23..d4382a891866 100644 --- a/services/preview/iothub/mgmt/2018-12-01-preview/devices/resourceprovidercommon.go +++ b/services/preview/iothub/mgmt/2018-12-01-preview/devices/resourceprovidercommon.go @@ -35,7 +35,9 @@ func NewResourceProviderCommonClient(subscriptionID string) ResourceProviderComm return NewResourceProviderCommonClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceProviderCommonClientWithBaseURI creates an instance of the ResourceProviderCommonClient client. +// NewResourceProviderCommonClientWithBaseURI creates an instance of the ResourceProviderCommonClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceProviderCommonClientWithBaseURI(baseURI string, subscriptionID string) ResourceProviderCommonClient { return ResourceProviderCommonClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/certificates.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/certificates.go index 3ad460f5c023..82e437a1ea51 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/certificates.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/client.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/client.go index 086bf2bf6e27..283637031c71 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/client.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/devicesapi/interfaces.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/devicesapi/interfaces.go index 6602cac41e37..1e07ead5362b 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/devicesapi/interfaces.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/devicesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result devices.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result devices.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*devices.OperationsClient)(nil) @@ -40,18 +41,26 @@ type IotHubResourceClientAPI interface { ExportDevices(ctx context.Context, resourceGroupName string, resourceName string, exportDevicesParameters devices.ExportDevicesRequest) (result devices.JobResponse, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubDescription, err error) GetEndpointHealth(ctx context.Context, resourceGroupName string, iotHubName string) (result devices.EndpointHealthDataListResultPage, err error) + GetEndpointHealthComplete(ctx context.Context, resourceGroupName string, iotHubName string) (result devices.EndpointHealthDataListResultIterator, err error) GetEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result devices.EventHubConsumerGroupInfo, err error) GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string) (result devices.JobResponse, err error) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string) (result devices.SharedAccessSignatureAuthorizationRule, err error) GetQuotaMetrics(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultPage, err error) + GetQuotaMetricsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubQuotaMetricInfoListResultIterator, err error) GetStats(ctx context.Context, resourceGroupName string, resourceName string) (result devices.RegistryStatistics, err error) GetValidSkus(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultPage, err error) + GetValidSkusComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.IotHubSkuDescriptionListResultIterator, err error) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters devices.ImportDevicesRequest) (result devices.JobResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result devices.IotHubDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result devices.IotHubDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result devices.IotHubDescriptionListResultIterator, err error) ListEventHubConsumerGroups(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultPage, err error) + ListEventHubConsumerGroupsComplete(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result devices.EventHubConsumerGroupsListResultIterator, err error) ListJobs(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultPage, err error) + ListJobsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.JobResponseListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, resourceGroupName string, resourceName string) (result devices.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) TestAllRoutes(ctx context.Context, input devices.TestAllRoutesInput, iotHubName string, resourceGroupName string) (result devices.TestAllRoutesResult, err error) TestRoute(ctx context.Context, input devices.TestRouteInput, iotHubName string, resourceGroupName string) (result devices.TestRouteResult, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, iotHubTags devices.TagsResource) (result devices.IotHubResourceUpdateFuture, err error) diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothub.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothub.go index a92e9ac0ab9b..5a71c032c23a 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothub.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothub.go @@ -36,7 +36,8 @@ func NewIotHubClient(subscriptionID string) IotHubClient { return NewIotHubClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotHubClientWithBaseURI creates an instance of the IotHubClient client. +// NewIotHubClientWithBaseURI creates an instance of the IotHubClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotHubClientWithBaseURI(baseURI string, subscriptionID string) IotHubClient { return IotHubClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothubresource.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothubresource.go index 7d1747026199..783f07719688 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothubresource.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothubresource.go @@ -36,7 +36,8 @@ func NewIotHubResourceClient(subscriptionID string) IotHubResourceClient { return NewIotHubResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client. +// NewIotHubResourceClientWithBaseURI creates an instance of the IotHubResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotHubResourceClientWithBaseURI(baseURI string, subscriptionID string) IotHubResourceClient { return IotHubResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/operations.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/operations.go index 78036060e5ea..eaea4c8fb27f 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/operations.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/resourceprovidercommon.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/resourceprovidercommon.go index c2e9f17d3855..0c590f9eaa1f 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/resourceprovidercommon.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/resourceprovidercommon.go @@ -35,7 +35,9 @@ func NewResourceProviderCommonClient(subscriptionID string) ResourceProviderComm return NewResourceProviderCommonClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceProviderCommonClientWithBaseURI creates an instance of the ResourceProviderCommonClient client. +// NewResourceProviderCommonClientWithBaseURI creates an instance of the ResourceProviderCommonClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceProviderCommonClientWithBaseURI(baseURI string, subscriptionID string) ResourceProviderCommonClient { return ResourceProviderCommonClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/client.go b/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/client.go index 8f32feb4d220..b61f020f7b73 100644 --- a/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/client.go +++ b/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/client.go @@ -42,7 +42,8 @@ func New(subscriptionID uuid.UUID) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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 uuid.UUID) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspaces.go b/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspaces.go index 49587707d0f9..4a24bb0eb241 100644 --- a/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspaces.go +++ b/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspaces.go @@ -37,7 +37,8 @@ func NewClient(subscriptionID uuid.UUID) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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 uuid.UUID) Client { return Client{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspacesapi/interfaces.go b/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspacesapi/interfaces.go index 41159abc2d37..6f05eb65fd85 100644 --- a/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspacesapi/interfaces.go +++ b/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/iotspacesapi/interfaces.go @@ -29,7 +29,9 @@ type ClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result iotspaces.DeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result iotspaces.Description, err error) List(ctx context.Context) (result iotspaces.DescriptionListResultPage, err error) + ListComplete(ctx context.Context) (result iotspaces.DescriptionListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result iotspaces.DescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result iotspaces.DescriptionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, iotSpacePatchDescription iotspaces.PatchDescription) (result iotspaces.UpdateFuture, err error) } @@ -38,6 +40,7 @@ var _ ClientAPI = (*iotspaces.Client)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result iotspaces.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result iotspaces.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*iotspaces.OperationsClient)(nil) diff --git a/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/operations.go b/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/operations.go index 1a8aa21de3f0..0f947736fee7 100644 --- a/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/operations.go +++ b/services/preview/iotspaces/mgmt/2017-10-01-preview/iotspaces/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID uuid.UUID) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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 uuid.UUID) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/client.go b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/client.go index 2262630923b6..fe078acbcf91 100644 --- a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/client.go +++ b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/clusters.go b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/clusters.go index b51b9954997a..ec37e9ebf341 100644 --- a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/clusters.go +++ b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/clusters.go @@ -38,7 +38,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/databases.go b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/databases.go index 93859d223be8..6ed81cf9c6d6 100644 --- a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/databases.go +++ b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/eventhubconnections.go b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/eventhubconnections.go index 4a7731514a2e..8b1cb25fc568 100644 --- a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/eventhubconnections.go +++ b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/eventhubconnections.go @@ -38,7 +38,9 @@ func NewEventHubConnectionsClient(subscriptionID string) EventHubConnectionsClie return NewEventHubConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventHubConnectionsClientWithBaseURI creates an instance of the EventHubConnectionsClient client. +// NewEventHubConnectionsClientWithBaseURI creates an instance of the EventHubConnectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEventHubConnectionsClientWithBaseURI(baseURI string, subscriptionID string) EventHubConnectionsClient { return EventHubConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/kustoapi/interfaces.go b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/kustoapi/interfaces.go index 43406799d3ac..17bc4ab9e460 100644 --- a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/kustoapi/interfaces.go +++ b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/kustoapi/interfaces.go @@ -69,6 +69,7 @@ var _ EventHubConnectionsClientAPI = (*kusto.EventHubConnectionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result kusto.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result kusto.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*kusto.OperationsClient)(nil) diff --git a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/operations.go b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/operations.go index 94c52b791fde..c071c06a154d 100644 --- a/services/preview/kusto/mgmt/2018-09-07-preview/kusto/operations.go +++ b/services/preview/kusto/mgmt/2018-09-07-preview/kusto/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/client.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/client.go index d54a4029be43..d30fbab8e536 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/client.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/logicapi/interfaces.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/logicapi/interfaces.go index d590a6eb64c7..d40d9598f23c 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/logicapi/interfaces.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/logicapi/interfaces.go @@ -31,7 +31,9 @@ type WorkflowsClientAPI interface { Enable(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workflowName string) (result logic.Workflow, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultIterator, err error) Run(ctx context.Context, resourceGroupName string, workflowName string, parameters logic.RunWorkflowParameters) (result logic.WorkflowsRunFuture, err error) Update(ctx context.Context, resourceGroupName string, workflowName string, workflow logic.Workflow) (result logic.Workflow, err error) Validate(ctx context.Context, resourceGroupName string, workflowName string, workflow logic.Workflow) (result autorest.Response, err error) @@ -52,6 +54,7 @@ type WorkflowAccessKeysClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workflowName string, accessKeyName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workflowName string, accessKeyName string) (result logic.WorkflowAccessKey, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowAccessKeyListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowAccessKeyListResultIterator, err error) ListSecretKeys(ctx context.Context, resourceGroupName string, workflowName string, accessKeyName string) (result logic.WorkflowSecretKeys, err error) RegenerateSecretKey(ctx context.Context, resourceGroupName string, workflowName string, accessKeyName string, parameters logic.RegenerateSecretKeyParameters) (result logic.WorkflowSecretKeys, err error) } @@ -62,6 +65,7 @@ var _ WorkflowAccessKeysClientAPI = (*logic.WorkflowAccessKeysClient)(nil) type WorkflowTriggersClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTrigger, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultIterator, err error) Run(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error) } @@ -71,6 +75,7 @@ var _ WorkflowTriggersClientAPI = (*logic.WorkflowTriggersClient)(nil) type WorkflowTriggerHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result logic.WorkflowTriggerHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultIterator, err error) } var _ WorkflowTriggerHistoriesClientAPI = (*logic.WorkflowTriggerHistoriesClient)(nil) @@ -80,6 +85,7 @@ type WorkflowRunsClientAPI interface { Cancel(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result logic.WorkflowRun, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultIterator, err error) } var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil) @@ -88,6 +94,7 @@ var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil) type WorkflowRunActionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.WorkflowRunAction, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultIterator, err error) } var _ WorkflowRunActionsClientAPI = (*logic.WorkflowRunActionsClient)(nil) diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowaccesskeys.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowaccesskeys.go index 415a7211342c..cdcfadac7954 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowaccesskeys.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowaccesskeys.go @@ -35,7 +35,9 @@ func NewWorkflowAccessKeysClient(subscriptionID string) WorkflowAccessKeysClient return NewWorkflowAccessKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowAccessKeysClientWithBaseURI creates an instance of the WorkflowAccessKeysClient client. +// NewWorkflowAccessKeysClientWithBaseURI creates an instance of the WorkflowAccessKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowAccessKeysClientWithBaseURI(baseURI string, subscriptionID string) WorkflowAccessKeysClient { return WorkflowAccessKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowrunactions.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowrunactions.go index 1e951d0d4250..e801e9596732 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowrunactions.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowrunactions.go @@ -35,7 +35,9 @@ func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient return NewWorkflowRunActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client. +// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient { return WorkflowRunActionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowruns.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowruns.go index fc52dcecee0e..f2884cc139e7 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowruns.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowruns.go @@ -35,7 +35,8 @@ func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient { return NewWorkflowRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client. +// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunsClient { return WorkflowRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflows.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflows.go index c04d96c0e085..fea97ea0f65d 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflows.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflows.go @@ -35,7 +35,8 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowtriggerhistories.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowtriggerhistories.go index 0ef0cdc710e6..f3f0625fa7f9 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowtriggerhistories.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowtriggerhistories.go @@ -35,7 +35,9 @@ func NewWorkflowTriggerHistoriesClient(subscriptionID string) WorkflowTriggerHis return NewWorkflowTriggerHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client. +// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewWorkflowTriggerHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggerHistoriesClient { return WorkflowTriggerHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowtriggers.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowtriggers.go index 72d43cf58efd..7ac735dee339 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowtriggers.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowtriggers.go @@ -35,7 +35,9 @@ func NewWorkflowTriggersClient(subscriptionID string) WorkflowTriggersClient { return NewWorkflowTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client. +// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggersClient { return WorkflowTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowversions.go b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowversions.go index 480ce0f41aa5..6fc104ca3aee 100644 --- a/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowversions.go +++ b/services/preview/logic/mgmt/2015-02-01-preview/logic/workflowversions.go @@ -35,7 +35,9 @@ func NewWorkflowVersionsClient(subscriptionID string) WorkflowVersionsClient { return NewWorkflowVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client. +// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowVersionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionsClient { return WorkflowVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-08-01-preview/logic/client.go b/services/preview/logic/mgmt/2015-08-01-preview/logic/client.go index 805e4085e8d4..1b449ba55e5d 100644 --- a/services/preview/logic/mgmt/2015-08-01-preview/logic/client.go +++ b/services/preview/logic/mgmt/2015-08-01-preview/logic/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountagreements.go b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountagreements.go index e4db04f1791b..8896c322f25e 100644 --- a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountagreements.go +++ b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountagreements.go @@ -36,7 +36,8 @@ func NewIntegrationAccountAgreementsClient(subscriptionID string) IntegrationAcc } // NewIntegrationAccountAgreementsClientWithBaseURI creates an instance of the IntegrationAccountAgreementsClient -// 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 NewIntegrationAccountAgreementsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAgreementsClient { return IntegrationAccountAgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountcertificates.go b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountcertificates.go index 23882157bb1f..80e5acdb067a 100644 --- a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountcertificates.go +++ b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountcertificates.go @@ -36,7 +36,8 @@ func NewIntegrationAccountCertificatesClient(subscriptionID string) IntegrationA } // NewIntegrationAccountCertificatesClientWithBaseURI creates an instance of the IntegrationAccountCertificatesClient -// 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 NewIntegrationAccountCertificatesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountCertificatesClient { return IntegrationAccountCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountmaps.go b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountmaps.go index e5127209534e..65e77ca91e92 100644 --- a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountmaps.go +++ b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountmaps.go @@ -35,7 +35,9 @@ func NewIntegrationAccountMapsClient(subscriptionID string) IntegrationAccountMa return NewIntegrationAccountMapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountMapsClientWithBaseURI creates an instance of the IntegrationAccountMapsClient client. +// NewIntegrationAccountMapsClientWithBaseURI creates an instance of the IntegrationAccountMapsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewIntegrationAccountMapsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountMapsClient { return IntegrationAccountMapsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountpartners.go b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountpartners.go index 93539b4dd00e..e5a7477647ee 100644 --- a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountpartners.go +++ b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountpartners.go @@ -35,7 +35,9 @@ func NewIntegrationAccountPartnersClient(subscriptionID string) IntegrationAccou return NewIntegrationAccountPartnersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountPartnersClientWithBaseURI creates an instance of the IntegrationAccountPartnersClient client. +// NewIntegrationAccountPartnersClientWithBaseURI creates an instance of the IntegrationAccountPartnersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewIntegrationAccountPartnersClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountPartnersClient { return IntegrationAccountPartnersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccounts.go b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccounts.go index b067ee23acc4..dea16a50f313 100644 --- a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccounts.go +++ b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccounts.go @@ -35,7 +35,9 @@ func NewIntegrationAccountsClient(subscriptionID string) IntegrationAccountsClie return NewIntegrationAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client. +// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIntegrationAccountsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountsClient { return IntegrationAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountschemas.go b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountschemas.go index f0f03af00144..1988770973de 100644 --- a/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountschemas.go +++ b/services/preview/logic/mgmt/2015-08-01-preview/logic/integrationaccountschemas.go @@ -35,7 +35,9 @@ func NewIntegrationAccountSchemasClient(subscriptionID string) IntegrationAccoun return NewIntegrationAccountSchemasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountSchemasClientWithBaseURI creates an instance of the IntegrationAccountSchemasClient client. +// NewIntegrationAccountSchemasClientWithBaseURI creates an instance of the IntegrationAccountSchemasClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewIntegrationAccountSchemasClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountSchemasClient { return IntegrationAccountSchemasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2015-08-01-preview/logic/logicapi/interfaces.go b/services/preview/logic/mgmt/2015-08-01-preview/logic/logicapi/interfaces.go index de10f00458cf..cfa92ef4420f 100644 --- a/services/preview/logic/mgmt/2015-08-01-preview/logic/logicapi/interfaces.go +++ b/services/preview/logic/mgmt/2015-08-01-preview/logic/logicapi/interfaces.go @@ -29,7 +29,9 @@ type IntegrationAccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string) (result logic.IntegrationAccount, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters logic.ListCallbackURLParameters) (result logic.CallbackURL, err error) Update(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount logic.IntegrationAccount) (result logic.IntegrationAccount, err error) } @@ -42,6 +44,7 @@ type IntegrationAccountSchemasClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result logic.IntegrationAccountSchema, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultIterator, err error) } var _ IntegrationAccountSchemasClientAPI = (*logic.IntegrationAccountSchemasClient)(nil) @@ -52,6 +55,7 @@ type IntegrationAccountMapsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result logic.IntegrationAccountMap, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultIterator, err error) } var _ IntegrationAccountMapsClientAPI = (*logic.IntegrationAccountMapsClient)(nil) @@ -62,6 +66,7 @@ type IntegrationAccountPartnersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result logic.IntegrationAccountPartner, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultIterator, err error) } var _ IntegrationAccountPartnersClientAPI = (*logic.IntegrationAccountPartnersClient)(nil) @@ -72,6 +77,7 @@ type IntegrationAccountAgreementsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result logic.IntegrationAccountAgreement, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultIterator, err error) } var _ IntegrationAccountAgreementsClientAPI = (*logic.IntegrationAccountAgreementsClient)(nil) @@ -82,6 +88,7 @@ type IntegrationAccountCertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result logic.IntegrationAccountCertificate, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultIterator, err error) } var _ IntegrationAccountCertificatesClientAPI = (*logic.IntegrationAccountCertificatesClient)(nil) diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/client.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/client.go index ef06c9aa5443..c035ab45087e 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/client.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountagreements.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountagreements.go index 1720b3063a62..1c63dec0bbce 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountagreements.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountagreements.go @@ -37,7 +37,8 @@ func NewIntegrationAccountAgreementsClient(subscriptionID string) IntegrationAcc } // NewIntegrationAccountAgreementsClientWithBaseURI creates an instance of the IntegrationAccountAgreementsClient -// 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 NewIntegrationAccountAgreementsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAgreementsClient { return IntegrationAccountAgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountassemblies.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountassemblies.go index aa5b00e42894..53871a9a65ad 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountassemblies.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountassemblies.go @@ -37,7 +37,8 @@ func NewIntegrationAccountAssembliesClient(subscriptionID string) IntegrationAcc } // NewIntegrationAccountAssembliesClientWithBaseURI creates an instance of the IntegrationAccountAssembliesClient -// 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 NewIntegrationAccountAssembliesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAssembliesClient { return IntegrationAccountAssembliesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountbatchconfigurations.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountbatchconfigurations.go index ab601bf2c1ba..c609aa1a4e98 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountbatchconfigurations.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountbatchconfigurations.go @@ -38,7 +38,8 @@ func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string) Integ } // NewIntegrationAccountBatchConfigurationsClientWithBaseURI creates an instance of the -// IntegrationAccountBatchConfigurationsClient client. +// IntegrationAccountBatchConfigurationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountBatchConfigurationsClient { return IntegrationAccountBatchConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountcertificates.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountcertificates.go index 3dccf83521d8..7569af30aa12 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountcertificates.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountcertificates.go @@ -37,7 +37,8 @@ func NewIntegrationAccountCertificatesClient(subscriptionID string) IntegrationA } // NewIntegrationAccountCertificatesClientWithBaseURI creates an instance of the IntegrationAccountCertificatesClient -// 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 NewIntegrationAccountCertificatesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountCertificatesClient { return IntegrationAccountCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountmaps.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountmaps.go index a81a0e4a5d3f..4f6cedf10738 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountmaps.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountmaps.go @@ -36,7 +36,9 @@ func NewIntegrationAccountMapsClient(subscriptionID string) IntegrationAccountMa return NewIntegrationAccountMapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountMapsClientWithBaseURI creates an instance of the IntegrationAccountMapsClient client. +// NewIntegrationAccountMapsClientWithBaseURI creates an instance of the IntegrationAccountMapsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewIntegrationAccountMapsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountMapsClient { return IntegrationAccountMapsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountpartners.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountpartners.go index 38f50ab3ee83..3f1b0136c410 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountpartners.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountpartners.go @@ -36,7 +36,9 @@ func NewIntegrationAccountPartnersClient(subscriptionID string) IntegrationAccou return NewIntegrationAccountPartnersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountPartnersClientWithBaseURI creates an instance of the IntegrationAccountPartnersClient client. +// NewIntegrationAccountPartnersClientWithBaseURI creates an instance of the IntegrationAccountPartnersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewIntegrationAccountPartnersClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountPartnersClient { return IntegrationAccountPartnersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccounts.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccounts.go index 7c194a9bf3a1..0e201bed2884 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccounts.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccounts.go @@ -36,7 +36,9 @@ func NewIntegrationAccountsClient(subscriptionID string) IntegrationAccountsClie return NewIntegrationAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client. +// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIntegrationAccountsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountsClient { return IntegrationAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountschemas.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountschemas.go index 61b3b4b676cf..e9a68b2eec7f 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountschemas.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountschemas.go @@ -36,7 +36,9 @@ func NewIntegrationAccountSchemasClient(subscriptionID string) IntegrationAccoun return NewIntegrationAccountSchemasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountSchemasClientWithBaseURI creates an instance of the IntegrationAccountSchemasClient client. +// NewIntegrationAccountSchemasClientWithBaseURI creates an instance of the IntegrationAccountSchemasClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewIntegrationAccountSchemasClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountSchemasClient { return IntegrationAccountSchemasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountsessions.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountsessions.go index 601995e218c3..1c12f8571b31 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountsessions.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountsessions.go @@ -36,7 +36,9 @@ func NewIntegrationAccountSessionsClient(subscriptionID string) IntegrationAccou return NewIntegrationAccountSessionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountSessionsClientWithBaseURI creates an instance of the IntegrationAccountSessionsClient client. +// NewIntegrationAccountSessionsClientWithBaseURI creates an instance of the IntegrationAccountSessionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewIntegrationAccountSessionsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountSessionsClient { return IntegrationAccountSessionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/logicapi/interfaces.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/logicapi/interfaces.go index 5f33f0ecaf2e..bb6d0278518b 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/logicapi/interfaces.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/logicapi/interfaces.go @@ -32,7 +32,9 @@ type WorkflowsClientAPI interface { GenerateUpgradedDefinition(ctx context.Context, resourceGroupName string, workflowName string, parameters logic.GenerateUpgradedDefinitionParameters) (result logic.SetObject, err error) Get(ctx context.Context, resourceGroupName string, workflowName string) (result logic.Workflow, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) ListSwagger(ctx context.Context, resourceGroupName string, workflowName string) (result logic.SetObject, err error) Move(ctx context.Context, resourceGroupName string, workflowName string, move logic.Workflow) (result autorest.Response, err error) @@ -48,6 +50,7 @@ var _ WorkflowsClientAPI = (*logic.WorkflowsClient)(nil) type WorkflowVersionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, versionID string) (result logic.WorkflowVersion, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowVersionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowVersionListResultIterator, err error) } var _ WorkflowVersionsClientAPI = (*logic.WorkflowVersionsClient)(nil) @@ -57,6 +60,7 @@ type WorkflowTriggersClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTrigger, err error) GetSchemaJSON(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.JSONSchema, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTriggerCallbackURL, err error) Reset(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error) Run(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.SetObject, err error) @@ -76,6 +80,7 @@ var _ WorkflowVersionTriggersClientAPI = (*logic.WorkflowVersionTriggersClient)( type WorkflowTriggerHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result logic.WorkflowTriggerHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultIterator, err error) Resubmit(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result autorest.Response, err error) } @@ -87,6 +92,7 @@ type WorkflowRunsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result logic.WorkflowRun, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultIterator, err error) } var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil) @@ -95,6 +101,7 @@ var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil) type WorkflowRunActionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.WorkflowRunAction, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultIterator, err error) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.ExpressionTraces, err error) } @@ -113,6 +120,7 @@ var _ WorkflowRunActionRepetitionsClientAPI = (*logic.WorkflowRunActionRepetitio type WorkflowRunActionRepetitionsRequestHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (result logic.RequestHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.RequestHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.RequestHistoryListResultIterator, err error) } var _ WorkflowRunActionRepetitionsRequestHistoriesClientAPI = (*logic.WorkflowRunActionRepetitionsRequestHistoriesClient)(nil) @@ -121,6 +129,7 @@ var _ WorkflowRunActionRepetitionsRequestHistoriesClientAPI = (*logic.WorkflowRu type WorkflowRunActionRequestHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) (result logic.RequestHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.RequestHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.RequestHistoryListResultIterator, err error) } var _ WorkflowRunActionRequestHistoriesClientAPI = (*logic.WorkflowRunActionRequestHistoriesClient)(nil) @@ -146,7 +155,9 @@ type IntegrationAccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string) (result logic.IntegrationAccount, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters logic.GetCallbackURLParameters) (result logic.CallbackURL, err error) ListKeyVaultKeys(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys logic.ListKeyVaultKeysDefinition) (result logic.KeyVaultKeyCollection, err error) LogTrackingEvents(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents logic.TrackingEventsDefinition) (result autorest.Response, err error) @@ -183,6 +194,7 @@ type IntegrationAccountSchemasClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result logic.IntegrationAccountSchema, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -194,6 +206,7 @@ type IntegrationAccountMapsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result logic.IntegrationAccountMap, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -205,6 +218,7 @@ type IntegrationAccountPartnersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result logic.IntegrationAccountPartner, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -216,6 +230,7 @@ type IntegrationAccountAgreementsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result logic.IntegrationAccountAgreement, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -227,6 +242,7 @@ type IntegrationAccountCertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result logic.IntegrationAccountCertificate, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultIterator, err error) } var _ IntegrationAccountCertificatesClientAPI = (*logic.IntegrationAccountCertificatesClient)(nil) @@ -237,6 +253,7 @@ type IntegrationAccountSessionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result logic.IntegrationAccountSession, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSessionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSessionListResultIterator, err error) } var _ IntegrationAccountSessionsClientAPI = (*logic.IntegrationAccountSessionsClient)(nil) @@ -244,6 +261,7 @@ var _ IntegrationAccountSessionsClientAPI = (*logic.IntegrationAccountSessionsCl // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result logic.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result logic.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*logic.OperationsClient)(nil) diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/operations.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/operations.go index 9dff2df94300..899b56813146 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/operations.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrepetitions.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrepetitions.go index ebc0b6a6ad38..1850b2416536 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrepetitions.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrepetitions.go @@ -36,7 +36,8 @@ func NewWorkflowRunActionRepetitionsClient(subscriptionID string) WorkflowRunAct } // NewWorkflowRunActionRepetitionsClientWithBaseURI creates an instance of the WorkflowRunActionRepetitionsClient -// 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 NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsClient { return WorkflowRunActionRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrepetitionsrequesthistories.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrepetitionsrequesthistories.go index 603ef83cccd6..e5dc2fd9e79c 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrepetitionsrequesthistories.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrepetitionsrequesthistories.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string } // NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI creates an instance of the -// WorkflowRunActionRepetitionsRequestHistoriesClient client. +// WorkflowRunActionRepetitionsRequestHistoriesClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient { return WorkflowRunActionRepetitionsRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrequesthistories.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrequesthistories.go index 44f080c955a9..3ca1ad283846 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrequesthistories.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionrequesthistories.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionRequestHistoriesClient(subscriptionID string) WorkflowR } // NewWorkflowRunActionRequestHistoriesClientWithBaseURI creates an instance of the -// WorkflowRunActionRequestHistoriesClient client. +// WorkflowRunActionRequestHistoriesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRequestHistoriesClient { return WorkflowRunActionRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactions.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactions.go index 7a855f2037d4..46c502efc2f3 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactions.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactions.go @@ -35,7 +35,9 @@ func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient return NewWorkflowRunActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client. +// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient { return WorkflowRunActionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionscoperepetitions.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionscoperepetitions.go index 9dd31ac2df87..8fa52af1206c 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionscoperepetitions.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunactionscoperepetitions.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string) WorkflowR } // NewWorkflowRunActionScopeRepetitionsClientWithBaseURI creates an instance of the -// WorkflowRunActionScopeRepetitionsClient client. +// WorkflowRunActionScopeRepetitionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionScopeRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionScopeRepetitionsClient { return WorkflowRunActionScopeRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunoperations.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunoperations.go index 5091acbb08fe..18f65ce3145c 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunoperations.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowrunoperations.go @@ -35,7 +35,9 @@ func NewWorkflowRunOperationsClient(subscriptionID string) WorkflowRunOperations return NewWorkflowRunOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunOperationsClientWithBaseURI creates an instance of the WorkflowRunOperationsClient client. +// NewWorkflowRunOperationsClientWithBaseURI creates an instance of the WorkflowRunOperationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewWorkflowRunOperationsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunOperationsClient { return WorkflowRunOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowruns.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowruns.go index 282571eb2b2e..109fbab28f17 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowruns.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowruns.go @@ -35,7 +35,8 @@ func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient { return NewWorkflowRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client. +// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunsClient { return WorkflowRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflows.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflows.go index b40db01ea48e..892681dbbabe 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflows.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflows.go @@ -35,7 +35,8 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowtriggerhistories.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowtriggerhistories.go index 87f67bc1f606..fc58cde5568b 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowtriggerhistories.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowtriggerhistories.go @@ -35,7 +35,9 @@ func NewWorkflowTriggerHistoriesClient(subscriptionID string) WorkflowTriggerHis return NewWorkflowTriggerHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client. +// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewWorkflowTriggerHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggerHistoriesClient { return WorkflowTriggerHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowtriggers.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowtriggers.go index a5e3b494c017..5012796f695e 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowtriggers.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowtriggers.go @@ -36,7 +36,9 @@ func NewWorkflowTriggersClient(subscriptionID string) WorkflowTriggersClient { return NewWorkflowTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client. +// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggersClient { return WorkflowTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowversions.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowversions.go index dec5d26f3c39..846126645119 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowversions.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowversions.go @@ -35,7 +35,9 @@ func NewWorkflowVersionsClient(subscriptionID string) WorkflowVersionsClient { return NewWorkflowVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client. +// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowVersionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionsClient { return WorkflowVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowversiontriggers.go b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowversiontriggers.go index 624892bddfde..c6efef193792 100644 --- a/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowversiontriggers.go +++ b/services/preview/logic/mgmt/2018-07-01-preview/logic/workflowversiontriggers.go @@ -35,7 +35,9 @@ func NewWorkflowVersionTriggersClient(subscriptionID string) WorkflowVersionTrig return NewWorkflowVersionTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowVersionTriggersClientWithBaseURI creates an instance of the WorkflowVersionTriggersClient client. +// NewWorkflowVersionTriggersClientWithBaseURI creates an instance of the WorkflowVersionTriggersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewWorkflowVersionTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionTriggersClient { return WorkflowVersionTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/client.go b/services/preview/logic/mgmt/2019-05-01/logic/client.go index 4266e5986969..0c69c4866a33 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/client.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountagreements.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountagreements.go index 374a72298509..6f3ca6413e05 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountagreements.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountagreements.go @@ -37,7 +37,8 @@ func NewIntegrationAccountAgreementsClient(subscriptionID string) IntegrationAcc } // NewIntegrationAccountAgreementsClientWithBaseURI creates an instance of the IntegrationAccountAgreementsClient -// 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 NewIntegrationAccountAgreementsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAgreementsClient { return IntegrationAccountAgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountassemblies.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountassemblies.go index 18d6f53958c0..851bce573df0 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountassemblies.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountassemblies.go @@ -37,7 +37,8 @@ func NewIntegrationAccountAssembliesClient(subscriptionID string) IntegrationAcc } // NewIntegrationAccountAssembliesClientWithBaseURI creates an instance of the IntegrationAccountAssembliesClient -// 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 NewIntegrationAccountAssembliesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountAssembliesClient { return IntegrationAccountAssembliesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountbatchconfigurations.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountbatchconfigurations.go index 406f145f0165..f9bcdc5c15f1 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountbatchconfigurations.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountbatchconfigurations.go @@ -38,7 +38,8 @@ func NewIntegrationAccountBatchConfigurationsClient(subscriptionID string) Integ } // NewIntegrationAccountBatchConfigurationsClientWithBaseURI creates an instance of the -// IntegrationAccountBatchConfigurationsClient client. +// IntegrationAccountBatchConfigurationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountBatchConfigurationsClient { return IntegrationAccountBatchConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountcertificates.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountcertificates.go index 64c787e6bd7a..653cf32db84b 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountcertificates.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountcertificates.go @@ -37,7 +37,8 @@ func NewIntegrationAccountCertificatesClient(subscriptionID string) IntegrationA } // NewIntegrationAccountCertificatesClientWithBaseURI creates an instance of the IntegrationAccountCertificatesClient -// 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 NewIntegrationAccountCertificatesClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountCertificatesClient { return IntegrationAccountCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountmaps.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountmaps.go index 185229088465..7bb4a3609986 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountmaps.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountmaps.go @@ -36,7 +36,9 @@ func NewIntegrationAccountMapsClient(subscriptionID string) IntegrationAccountMa return NewIntegrationAccountMapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountMapsClientWithBaseURI creates an instance of the IntegrationAccountMapsClient client. +// NewIntegrationAccountMapsClientWithBaseURI creates an instance of the IntegrationAccountMapsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewIntegrationAccountMapsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountMapsClient { return IntegrationAccountMapsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountpartners.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountpartners.go index 2dcfcc5da813..5cfcc59956a4 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountpartners.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountpartners.go @@ -36,7 +36,9 @@ func NewIntegrationAccountPartnersClient(subscriptionID string) IntegrationAccou return NewIntegrationAccountPartnersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountPartnersClientWithBaseURI creates an instance of the IntegrationAccountPartnersClient client. +// NewIntegrationAccountPartnersClientWithBaseURI creates an instance of the IntegrationAccountPartnersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewIntegrationAccountPartnersClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountPartnersClient { return IntegrationAccountPartnersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccounts.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccounts.go index 8e1323f505e2..ed4962452c80 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccounts.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccounts.go @@ -36,7 +36,9 @@ func NewIntegrationAccountsClient(subscriptionID string) IntegrationAccountsClie return NewIntegrationAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client. +// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIntegrationAccountsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountsClient { return IntegrationAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountschemas.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountschemas.go index 63a98c3f455a..111ab6199a00 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountschemas.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountschemas.go @@ -36,7 +36,9 @@ func NewIntegrationAccountSchemasClient(subscriptionID string) IntegrationAccoun return NewIntegrationAccountSchemasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountSchemasClientWithBaseURI creates an instance of the IntegrationAccountSchemasClient client. +// NewIntegrationAccountSchemasClientWithBaseURI creates an instance of the IntegrationAccountSchemasClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewIntegrationAccountSchemasClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountSchemasClient { return IntegrationAccountSchemasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountsessions.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountsessions.go index 6cc412ce1588..f4bfd96741e7 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountsessions.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationaccountsessions.go @@ -36,7 +36,9 @@ func NewIntegrationAccountSessionsClient(subscriptionID string) IntegrationAccou return NewIntegrationAccountSessionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountSessionsClientWithBaseURI creates an instance of the IntegrationAccountSessionsClient client. +// NewIntegrationAccountSessionsClientWithBaseURI creates an instance of the IntegrationAccountSessionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewIntegrationAccountSessionsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountSessionsClient { return IntegrationAccountSessionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapioperations.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapioperations.go index 3cf35cc6b268..8cf12ec3102d 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapioperations.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapioperations.go @@ -37,7 +37,8 @@ func NewIntegrationServiceEnvironmentManagedAPIOperationsClient(subscriptionID s } // NewIntegrationServiceEnvironmentManagedAPIOperationsClientWithBaseURI creates an instance of the -// IntegrationServiceEnvironmentManagedAPIOperationsClient client. +// IntegrationServiceEnvironmentManagedAPIOperationsClient client using a custom endpoint. Use this when interacting +// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIntegrationServiceEnvironmentManagedAPIOperationsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentManagedAPIOperationsClient { return IntegrationServiceEnvironmentManagedAPIOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapis.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapis.go index 560c5226e45e..9952fd4f31ce 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapis.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentmanagedapis.go @@ -37,7 +37,8 @@ func NewIntegrationServiceEnvironmentManagedApisClient(subscriptionID string) In } // NewIntegrationServiceEnvironmentManagedApisClientWithBaseURI creates an instance of the -// IntegrationServiceEnvironmentManagedApisClient client. +// IntegrationServiceEnvironmentManagedApisClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIntegrationServiceEnvironmentManagedApisClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentManagedApisClient { return IntegrationServiceEnvironmentManagedApisClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentnetworkhealth.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentnetworkhealth.go index 43092b7df7d9..faf95e23411b 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentnetworkhealth.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentnetworkhealth.go @@ -37,7 +37,8 @@ func NewIntegrationServiceEnvironmentNetworkHealthClient(subscriptionID string) } // NewIntegrationServiceEnvironmentNetworkHealthClientWithBaseURI creates an instance of the -// IntegrationServiceEnvironmentNetworkHealthClient client. +// IntegrationServiceEnvironmentNetworkHealthClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIntegrationServiceEnvironmentNetworkHealthClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentNetworkHealthClient { return IntegrationServiceEnvironmentNetworkHealthClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironments.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironments.go index fe767c387e14..1451d4349f8e 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironments.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironments.go @@ -36,7 +36,8 @@ func NewIntegrationServiceEnvironmentsClient(subscriptionID string) IntegrationS } // NewIntegrationServiceEnvironmentsClientWithBaseURI creates an instance of the IntegrationServiceEnvironmentsClient -// 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 NewIntegrationServiceEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentsClient { return IntegrationServiceEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentskus.go b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentskus.go index 6e9edcad4a6a..aa290b248d57 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentskus.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/integrationserviceenvironmentskus.go @@ -37,7 +37,8 @@ func NewIntegrationServiceEnvironmentSkusClient(subscriptionID string) Integrati } // NewIntegrationServiceEnvironmentSkusClientWithBaseURI creates an instance of the -// IntegrationServiceEnvironmentSkusClient client. +// IntegrationServiceEnvironmentSkusClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIntegrationServiceEnvironmentSkusClientWithBaseURI(baseURI string, subscriptionID string) IntegrationServiceEnvironmentSkusClient { return IntegrationServiceEnvironmentSkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/logicapi/interfaces.go b/services/preview/logic/mgmt/2019-05-01/logic/logicapi/interfaces.go index ad50af7ed0f1..876f84aff94a 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/logicapi/interfaces.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/logicapi/interfaces.go @@ -32,7 +32,9 @@ type WorkflowsClientAPI interface { GenerateUpgradedDefinition(ctx context.Context, resourceGroupName string, workflowName string, parameters logic.GenerateUpgradedDefinitionParameters) (result logic.SetObject, err error) Get(ctx context.Context, resourceGroupName string, workflowName string) (result logic.Workflow, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32, filter string) (result logic.WorkflowListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32, filter string) (result logic.WorkflowListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) ListSwagger(ctx context.Context, resourceGroupName string, workflowName string) (result logic.SetObject, err error) Move(ctx context.Context, resourceGroupName string, workflowName string, move logic.Workflow) (result logic.WorkflowsMoveFuture, err error) @@ -48,6 +50,7 @@ var _ WorkflowsClientAPI = (*logic.WorkflowsClient)(nil) type WorkflowVersionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, versionID string) (result logic.WorkflowVersion, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowVersionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result logic.WorkflowVersionListResultIterator, err error) } var _ WorkflowVersionsClientAPI = (*logic.WorkflowVersionsClient)(nil) @@ -57,6 +60,7 @@ type WorkflowTriggersClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTrigger, err error) GetSchemaJSON(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.JSONSchema, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowTriggerListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.WorkflowTriggerCallbackURL, err error) Reset(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error) Run(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result logic.SetObject, err error) @@ -76,6 +80,7 @@ var _ WorkflowVersionTriggersClientAPI = (*logic.WorkflowVersionTriggersClient)( type WorkflowTriggerHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result logic.WorkflowTriggerHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result logic.WorkflowTriggerHistoryListResultIterator, err error) Resubmit(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result autorest.Response, err error) } @@ -86,6 +91,7 @@ type WorkflowRunsClientAPI interface { Cancel(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result logic.WorkflowRun, err error) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result logic.WorkflowRunListResultIterator, err error) } var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil) @@ -94,6 +100,7 @@ var _ WorkflowRunsClientAPI = (*logic.WorkflowRunsClient)(nil) type WorkflowRunActionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.WorkflowRunAction, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result logic.WorkflowRunActionListResultIterator, err error) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.ExpressionTraces, err error) } @@ -112,6 +119,7 @@ var _ WorkflowRunActionRepetitionsClientAPI = (*logic.WorkflowRunActionRepetitio type WorkflowRunActionRepetitionsRequestHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (result logic.RequestHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.RequestHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result logic.RequestHistoryListResultIterator, err error) } var _ WorkflowRunActionRepetitionsRequestHistoriesClientAPI = (*logic.WorkflowRunActionRepetitionsRequestHistoriesClient)(nil) @@ -120,6 +128,7 @@ var _ WorkflowRunActionRepetitionsRequestHistoriesClientAPI = (*logic.WorkflowRu type WorkflowRunActionRequestHistoriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) (result logic.RequestHistory, err error) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.RequestHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result logic.RequestHistoryListResultIterator, err error) } var _ WorkflowRunActionRequestHistoriesClientAPI = (*logic.WorkflowRunActionRequestHistoriesClient)(nil) @@ -145,7 +154,9 @@ type IntegrationAccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string) (result logic.IntegrationAccount, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result logic.IntegrationAccountListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32) (result logic.IntegrationAccountListResultIterator, err error) ListCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters logic.GetCallbackURLParameters) (result logic.CallbackURL, err error) ListKeyVaultKeys(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys logic.ListKeyVaultKeysDefinition) (result logic.KeyVaultKeyCollection, err error) LogTrackingEvents(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents logic.TrackingEventsDefinition) (result autorest.Response, err error) @@ -182,6 +193,7 @@ type IntegrationAccountSchemasClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result logic.IntegrationAccountSchema, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSchemaListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -193,6 +205,7 @@ type IntegrationAccountMapsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result logic.IntegrationAccountMap, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountMapListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -204,6 +217,7 @@ type IntegrationAccountPartnersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result logic.IntegrationAccountPartner, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountPartnerListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -215,6 +229,7 @@ type IntegrationAccountAgreementsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result logic.IntegrationAccountAgreement, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountAgreementListResultIterator, err error) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL logic.GetCallbackURLParameters) (result logic.WorkflowTriggerCallbackURL, err error) } @@ -226,6 +241,7 @@ type IntegrationAccountCertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result logic.IntegrationAccountCertificate, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result logic.IntegrationAccountCertificateListResultIterator, err error) } var _ IntegrationAccountCertificatesClientAPI = (*logic.IntegrationAccountCertificatesClient)(nil) @@ -236,6 +252,7 @@ type IntegrationAccountSessionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result logic.IntegrationAccountSession, err error) List(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSessionListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result logic.IntegrationAccountSessionListResultIterator, err error) } var _ IntegrationAccountSessionsClientAPI = (*logic.IntegrationAccountSessionsClient)(nil) @@ -246,7 +263,9 @@ type IntegrationServiceEnvironmentsClientAPI interface { Delete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result logic.IntegrationServiceEnvironment, err error) ListByResourceGroup(ctx context.Context, resourceGroup string, top *int32) (result logic.IntegrationServiceEnvironmentListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroup string, top *int32) (result logic.IntegrationServiceEnvironmentListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32) (result logic.IntegrationServiceEnvironmentListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32) (result logic.IntegrationServiceEnvironmentListResultIterator, err error) Restart(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, integrationServiceEnvironment logic.IntegrationServiceEnvironment) (result logic.IntegrationServiceEnvironmentsUpdateFuture, err error) } @@ -256,6 +275,7 @@ var _ IntegrationServiceEnvironmentsClientAPI = (*logic.IntegrationServiceEnviro // IntegrationServiceEnvironmentSkusClientAPI contains the set of methods on the IntegrationServiceEnvironmentSkusClient type. type IntegrationServiceEnvironmentSkusClientAPI interface { List(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result logic.IntegrationServiceEnvironmentSkuListPage, err error) + ListComplete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result logic.IntegrationServiceEnvironmentSkuListIterator, err error) } var _ IntegrationServiceEnvironmentSkusClientAPI = (*logic.IntegrationServiceEnvironmentSkusClient)(nil) @@ -272,6 +292,7 @@ type IntegrationServiceEnvironmentManagedApisClientAPI interface { Delete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result logic.IntegrationServiceEnvironmentManagedApisDeleteFuture, err error) Get(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result logic.ManagedAPI, err error) List(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result logic.ManagedAPIListResultPage, err error) + ListComplete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string) (result logic.ManagedAPIListResultIterator, err error) Put(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result logic.IntegrationServiceEnvironmentManagedApisPutFuture, err error) } @@ -280,6 +301,7 @@ var _ IntegrationServiceEnvironmentManagedApisClientAPI = (*logic.IntegrationSer // IntegrationServiceEnvironmentManagedAPIOperationsClientAPI contains the set of methods on the IntegrationServiceEnvironmentManagedAPIOperationsClient type. type IntegrationServiceEnvironmentManagedAPIOperationsClientAPI interface { List(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result logic.APIOperationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroup string, integrationServiceEnvironmentName string, APIName string) (result logic.APIOperationListResultIterator, err error) } var _ IntegrationServiceEnvironmentManagedAPIOperationsClientAPI = (*logic.IntegrationServiceEnvironmentManagedAPIOperationsClient)(nil) @@ -287,6 +309,7 @@ var _ IntegrationServiceEnvironmentManagedAPIOperationsClientAPI = (*logic.Integ // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result logic.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result logic.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*logic.OperationsClient)(nil) diff --git a/services/preview/logic/mgmt/2019-05-01/logic/operations.go b/services/preview/logic/mgmt/2019-05-01/logic/operations.go index f299645b574b..5355c9d7f678 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/operations.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitions.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitions.go index 4cad34434257..c5bd00f7c21d 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitions.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitions.go @@ -36,7 +36,8 @@ func NewWorkflowRunActionRepetitionsClient(subscriptionID string) WorkflowRunAct } // NewWorkflowRunActionRepetitionsClientWithBaseURI creates an instance of the WorkflowRunActionRepetitionsClient -// 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 NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsClient { return WorkflowRunActionRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitionsrequesthistories.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitionsrequesthistories.go index 655f0dfc2feb..2cbe9cf06b8d 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitionsrequesthistories.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrepetitionsrequesthistories.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string } // NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI creates an instance of the -// WorkflowRunActionRepetitionsRequestHistoriesClient client. +// WorkflowRunActionRepetitionsRequestHistoriesClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient { return WorkflowRunActionRepetitionsRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrequesthistories.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrequesthistories.go index 136c48e555af..65d4d405e5fe 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrequesthistories.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionrequesthistories.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionRequestHistoriesClient(subscriptionID string) WorkflowR } // NewWorkflowRunActionRequestHistoriesClientWithBaseURI creates an instance of the -// WorkflowRunActionRequestHistoriesClient client. +// WorkflowRunActionRequestHistoriesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRequestHistoriesClient { return WorkflowRunActionRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactions.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactions.go index cffaf204691e..8d60650034e1 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactions.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactions.go @@ -35,7 +35,9 @@ func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient return NewWorkflowRunActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client. +// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient { return WorkflowRunActionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionscoperepetitions.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionscoperepetitions.go index 78cffe1c0981..57b992c364e4 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionscoperepetitions.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunactionscoperepetitions.go @@ -37,7 +37,8 @@ func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string) WorkflowR } // NewWorkflowRunActionScopeRepetitionsClientWithBaseURI creates an instance of the -// WorkflowRunActionScopeRepetitionsClient client. +// WorkflowRunActionScopeRepetitionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunActionScopeRepetitionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionScopeRepetitionsClient { return WorkflowRunActionScopeRepetitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunoperations.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunoperations.go index 1e6201c9164a..719ba5398346 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowrunoperations.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowrunoperations.go @@ -35,7 +35,9 @@ func NewWorkflowRunOperationsClient(subscriptionID string) WorkflowRunOperations return NewWorkflowRunOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunOperationsClientWithBaseURI creates an instance of the WorkflowRunOperationsClient client. +// NewWorkflowRunOperationsClientWithBaseURI creates an instance of the WorkflowRunOperationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewWorkflowRunOperationsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunOperationsClient { return WorkflowRunOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowruns.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowruns.go index ed0aeb6c1f89..cef43fdbe907 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowruns.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowruns.go @@ -35,7 +35,8 @@ func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient { return NewWorkflowRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client. +// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowRunsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunsClient { return WorkflowRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflows.go b/services/preview/logic/mgmt/2019-05-01/logic/workflows.go index 198e11baabf0..e15edf3ca3fc 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflows.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflows.go @@ -35,7 +35,8 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowtriggerhistories.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowtriggerhistories.go index 0fdc8ec78f30..eddae5a8b99f 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowtriggerhistories.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowtriggerhistories.go @@ -35,7 +35,9 @@ func NewWorkflowTriggerHistoriesClient(subscriptionID string) WorkflowTriggerHis return NewWorkflowTriggerHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client. +// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewWorkflowTriggerHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggerHistoriesClient { return WorkflowTriggerHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowtriggers.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowtriggers.go index b7ede0e419fb..024dfe2a053d 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowtriggers.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowtriggers.go @@ -36,7 +36,9 @@ func NewWorkflowTriggersClient(subscriptionID string) WorkflowTriggersClient { return NewWorkflowTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client. +// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggersClient { return WorkflowTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowversions.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowversions.go index 55ad06a5d8da..2bfe7f8f7b4a 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowversions.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowversions.go @@ -35,7 +35,9 @@ func NewWorkflowVersionsClient(subscriptionID string) WorkflowVersionsClient { return NewWorkflowVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client. +// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkflowVersionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionsClient { return WorkflowVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/logic/mgmt/2019-05-01/logic/workflowversiontriggers.go b/services/preview/logic/mgmt/2019-05-01/logic/workflowversiontriggers.go index c0d03358fe80..f5a234483b32 100644 --- a/services/preview/logic/mgmt/2019-05-01/logic/workflowversiontriggers.go +++ b/services/preview/logic/mgmt/2019-05-01/logic/workflowversiontriggers.go @@ -35,7 +35,9 @@ func NewWorkflowVersionTriggersClient(subscriptionID string) WorkflowVersionTrig return NewWorkflowVersionTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowVersionTriggersClientWithBaseURI creates an instance of the WorkflowVersionTriggersClient client. +// NewWorkflowVersionTriggersClientWithBaseURI creates an instance of the WorkflowVersionTriggersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewWorkflowVersionTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionTriggersClient { return WorkflowVersionTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/client.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/client.go index 41c542fe6a59..279dc41727b0 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/client.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/client.go @@ -44,7 +44,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentassociations.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentassociations.go index b04c3e300a79..91ad36a5fdc7 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentassociations.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentassociations.go @@ -38,7 +38,9 @@ func NewCommitmentAssociationsClient(subscriptionID string) CommitmentAssociatio return NewCommitmentAssociationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCommitmentAssociationsClientWithBaseURI creates an instance of the CommitmentAssociationsClient client. +// NewCommitmentAssociationsClientWithBaseURI creates an instance of the CommitmentAssociationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCommitmentAssociationsClientWithBaseURI(baseURI string, subscriptionID string) CommitmentAssociationsClient { return CommitmentAssociationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentplans.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentplans.go index 3d12924b2e20..61cff43005dc 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentplans.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentplans.go @@ -38,7 +38,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentplansapi/interfaces.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentplansapi/interfaces.go index 6c4b796b9748..83af2c81844c 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentplansapi/interfaces.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/commitmentplansapi/interfaces.go @@ -41,6 +41,7 @@ var _ SkusClientAPI = (*commitmentplans.SkusClient)(nil) type CommitmentAssociationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentAssociationName string) (result commitmentplans.CommitmentAssociation, err error) List(ctx context.Context, resourceGroupName string, commitmentPlanName string, skipToken string) (result commitmentplans.CommitmentAssociationListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, commitmentPlanName string, skipToken string) (result commitmentplans.CommitmentAssociationListResultIterator, err error) Move(ctx context.Context, resourceGroupName string, commitmentPlanName string, commitmentAssociationName string, movePayload commitmentplans.MoveCommitmentAssociationRequest) (result commitmentplans.CommitmentAssociation, err error) } @@ -51,7 +52,9 @@ type ClientAPI interface { CreateOrUpdate(ctx context.Context, createOrUpdatePayload commitmentplans.CommitmentPlan, resourceGroupName string, commitmentPlanName string) (result commitmentplans.CommitmentPlan, err error) Get(ctx context.Context, resourceGroupName string, commitmentPlanName string) (result commitmentplans.CommitmentPlan, err error) List(ctx context.Context, skipToken string) (result commitmentplans.ListResultPage, err error) + ListComplete(ctx context.Context, skipToken string) (result commitmentplans.ListResultIterator, err error) ListInResourceGroup(ctx context.Context, resourceGroupName string, skipToken string) (result commitmentplans.ListResultPage, err error) + ListInResourceGroupComplete(ctx context.Context, resourceGroupName string, skipToken string) (result commitmentplans.ListResultIterator, err error) Patch(ctx context.Context, patchPayload commitmentplans.PatchPayload, resourceGroupName string, commitmentPlanName string) (result commitmentplans.CommitmentPlan, err error) Remove(ctx context.Context, resourceGroupName string, commitmentPlanName string) (result autorest.Response, err error) } @@ -61,6 +64,7 @@ var _ ClientAPI = (*commitmentplans.Client)(nil) // UsageHistoryClientAPI contains the set of methods on the UsageHistoryClient type. type UsageHistoryClientAPI interface { List(ctx context.Context, resourceGroupName string, commitmentPlanName string, skipToken string) (result commitmentplans.PlanUsageHistoryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, commitmentPlanName string, skipToken string) (result commitmentplans.PlanUsageHistoryListResultIterator, err error) } var _ UsageHistoryClientAPI = (*commitmentplans.UsageHistoryClient)(nil) diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/operations.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/operations.go index 1c4bf166fd64..e5e8d94b2d82 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/operations.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/operations.go @@ -38,7 +38,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/skus.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/skus.go index 9fa86e5b10d3..bfe4eaa9632f 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/skus.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/skus.go @@ -38,7 +38,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/usagehistory.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/usagehistory.go index 08792421c57e..078f6494f403 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/usagehistory.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/commitmentplans/usagehistory.go @@ -38,7 +38,8 @@ func NewUsageHistoryClient(subscriptionID string) UsageHistoryClient { return NewUsageHistoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageHistoryClientWithBaseURI creates an instance of the UsageHistoryClient client. +// NewUsageHistoryClientWithBaseURI creates an instance of the UsageHistoryClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageHistoryClientWithBaseURI(baseURI string, subscriptionID string) UsageHistoryClient { return UsageHistoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/client.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/client.go index ec1926bafef8..813e3039c536 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/client.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/client.go @@ -44,7 +44,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go index 49423963093f..b31afeb0e735 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go @@ -39,7 +39,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservicesapi/interfaces.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservicesapi/interfaces.go index acc8b390d757..7b0035881c36 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservicesapi/interfaces.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservicesapi/interfaces.go @@ -27,7 +27,9 @@ type ClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, webServiceName string, createOrUpdatePayload webservices.WebService) (result webservices.CreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, webServiceName string) (result webservices.WebService, err error) List(ctx context.Context, skiptoken string) (result webservices.PaginatedWebServicesListPage, err error) + ListComplete(ctx context.Context, skiptoken string) (result webservices.PaginatedWebServicesListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result webservices.PaginatedWebServicesListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result webservices.PaginatedWebServicesListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, webServiceName string) (result webservices.Keys, err error) Patch(ctx context.Context, resourceGroupName string, webServiceName string, patchPayload webservices.WebService) (result webservices.PatchFuture, err error) Remove(ctx context.Context, resourceGroupName string, webServiceName string) (result webservices.RemoveFuture, err error) diff --git a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/accounts.go b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/accounts.go index da3b74ea0d3c..014782aaf50a 100644 --- a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/accounts.go +++ b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/accounts.go @@ -37,7 +37,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/client.go b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/client.go index bf0ed039b953..5c39f2e3887a 100644 --- a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/client.go +++ b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/experimentationapi/interfaces.go b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/experimentationapi/interfaces.go index 8893bb10bee1..dbd0123d0f7c 100644 --- a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/experimentationapi/interfaces.go +++ b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/experimentationapi/interfaces.go @@ -36,7 +36,9 @@ type AccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string) (result experimentation.Account, err error) List(ctx context.Context) (result experimentation.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result experimentation.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result experimentation.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result experimentation.AccountListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters experimentation.AccountUpdateParameters) (result experimentation.Account, err error) } @@ -48,6 +50,7 @@ type WorkspacesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, workspaceName string) (result experimentation.Workspace, err error) ListByAccounts(ctx context.Context, accountName string, resourceGroupName string) (result experimentation.WorkspaceListResultPage, err error) + ListByAccountsComplete(ctx context.Context, accountName string, resourceGroupName string) (result experimentation.WorkspaceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, workspaceName string, parameters experimentation.WorkspaceUpdateParameters) (result experimentation.Workspace, err error) } @@ -59,6 +62,7 @@ type ProjectsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, workspaceName string, projectName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, workspaceName string, projectName string) (result experimentation.Project, err error) ListByWorkspace(ctx context.Context, accountName string, workspaceName string, resourceGroupName string) (result experimentation.ProjectListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, accountName string, workspaceName string, resourceGroupName string) (result experimentation.ProjectListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, workspaceName string, projectName string, parameters experimentation.ProjectUpdateParameters) (result experimentation.Project, err error) } diff --git a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/operations.go b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/operations.go index deb87d312191..ced854e0aa2c 100644 --- a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/operations.go +++ b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/projects.go b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/projects.go index ca8978b3b855..1984f7c5c6c2 100644 --- a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/projects.go +++ b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/projects.go @@ -37,7 +37,8 @@ func NewProjectsClient(subscriptionID string) ProjectsClient { return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string) ProjectsClient { return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/workspaces.go b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/workspaces.go index 5501060b6ff2..e4fc2f28591b 100644 --- a/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/workspaces.go +++ b/services/preview/machinelearning/mgmt/2017-05-01-preview/experimentation/workspaces.go @@ -37,7 +37,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } diff --git a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/client.go b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/client.go index f7e55ec99e3e..815240a8e775 100644 --- a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/client.go +++ b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/computeapi/interfaces.go b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/computeapi/interfaces.go index aee468700d53..068eb375c160 100644 --- a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/computeapi/interfaces.go +++ b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/computeapi/interfaces.go @@ -29,7 +29,9 @@ type OperationalizationClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, clusterName string, deleteAll *bool) (result compute.OperationalizationClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, clusterName string) (result compute.OperationalizationCluster, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result compute.PaginatedOperationalizationClustersListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result compute.PaginatedOperationalizationClustersListIterator, err error) ListBySubscriptionID(ctx context.Context, skiptoken string) (result compute.PaginatedOperationalizationClustersListPage, err error) + ListBySubscriptionIDComplete(ctx context.Context, skiptoken string) (result compute.PaginatedOperationalizationClustersListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, clusterName string) (result compute.OperationalizationClusterCredentials, err error) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters compute.OperationalizationClusterUpdateParameters) (result compute.OperationalizationCluster, err error) UpdateSystemServices(ctx context.Context, resourceGroupName string, clusterName string) (result compute.OperationalizationClustersUpdateSystemServicesFuture, err error) diff --git a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/machinelearningcompute.go b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/machinelearningcompute.go index 5aacc56c4dc1..b60f6e29e183 100644 --- a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/machinelearningcompute.go +++ b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/machinelearningcompute.go @@ -39,7 +39,9 @@ func NewMachineLearningComputeClient(subscriptionID string) MachineLearningCompu return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client. +// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient { return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go index ab04b276ab31..05d2b0d287d9 100644 --- a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go +++ b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go @@ -40,7 +40,9 @@ func NewOperationalizationClustersClient(subscriptionID string) Operationalizati return NewOperationalizationClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationalizationClustersClientWithBaseURI creates an instance of the OperationalizationClustersClient client. +// NewOperationalizationClustersClientWithBaseURI creates an instance of the OperationalizationClustersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewOperationalizationClustersClientWithBaseURI(baseURI string, subscriptionID string) OperationalizationClustersClient { return OperationalizationClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/client.go b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/client.go index 0abc37e9001d..0444750dd625 100644 --- a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/client.go +++ b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/machinelearningcompute.go b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/machinelearningcompute.go index 9f91d07e2125..30aaecb25b81 100644 --- a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/machinelearningcompute.go +++ b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/machinelearningcompute.go @@ -36,7 +36,9 @@ func NewMachineLearningComputeClient(subscriptionID string) MachineLearningCompu return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client. +// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient { return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/machinelearningservicesapi/interfaces.go b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/machinelearningservicesapi/interfaces.go index aa55593c9fc7..566f64004340 100644 --- a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/machinelearningservicesapi/interfaces.go +++ b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/machinelearningservicesapi/interfaces.go @@ -36,7 +36,9 @@ type WorkspacesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.Workspace, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListBySubscription(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, skiptoken string) (result machinelearningservices.WorkspaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result machinelearningservices.ListWorkspaceKeysResult, err error) ResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters machinelearningservices.WorkspaceUpdateParameters) (result machinelearningservices.Workspace, err error) @@ -50,6 +52,7 @@ type MachineLearningComputeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.MachineLearningComputeDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeResource, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result machinelearningservices.PaginatedComputeResourcesListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.ComputeSecretsModel, err error) SystemUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result machinelearningservices.MachineLearningComputeSystemUpdateFuture, err error) } diff --git a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/operations.go b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/operations.go index adda949d8173..9929e6bba42a 100644 --- a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/operations.go +++ b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/workspaces.go b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/workspaces.go index e29eceeab87f..fecb09e451ae 100644 --- a/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/workspaces.go +++ b/services/preview/machinelearningservices/mgmt/2018-03-01-preview/machinelearningservices/workspaces.go @@ -35,7 +35,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } diff --git a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/applyupdates.go b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/applyupdates.go index 522184b9d626..a644e42ea83b 100755 --- a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/applyupdates.go +++ b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/applyupdates.go @@ -35,7 +35,8 @@ func NewApplyUpdatesClient(subscriptionID string) ApplyUpdatesClient { return NewApplyUpdatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplyUpdatesClientWithBaseURI creates an instance of the ApplyUpdatesClient client. +// NewApplyUpdatesClientWithBaseURI creates an instance of the ApplyUpdatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplyUpdatesClientWithBaseURI(baseURI string, subscriptionID string) ApplyUpdatesClient { return ApplyUpdatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/client.go b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/client.go index 6401c280e644..3fd605751946 100755 --- a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/client.go +++ b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/configurationassignments.go b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/configurationassignments.go index d2dbf2ff19c0..1e6de21ba837 100755 --- a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/configurationassignments.go +++ b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/configurationassignments.go @@ -35,7 +35,9 @@ func NewConfigurationAssignmentsClient(subscriptionID string) ConfigurationAssig return NewConfigurationAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationAssignmentsClientWithBaseURI creates an instance of the ConfigurationAssignmentsClient client. +// NewConfigurationAssignmentsClientWithBaseURI creates an instance of the ConfigurationAssignmentsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewConfigurationAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationAssignmentsClient { return ConfigurationAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/configurations.go b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/configurations.go index 35504da43e2b..a423333ab86b 100755 --- a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/configurations.go +++ b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/configurations.go @@ -35,7 +35,8 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/operations.go b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/operations.go index 0f45be5df825..7a233d55cb2e 100755 --- a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/operations.go +++ b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/updates.go b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/updates.go index 1647a556fffb..740894dd7b7f 100755 --- a/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/updates.go +++ b/services/preview/maintenance/mgmt/2018-06-01-preview/maintenance/updates.go @@ -35,7 +35,8 @@ func NewUpdatesClient(subscriptionID string) UpdatesClient { return NewUpdatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUpdatesClientWithBaseURI creates an instance of the UpdatesClient client. +// NewUpdatesClientWithBaseURI creates an instance of the UpdatesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUpdatesClientWithBaseURI(baseURI string, subscriptionID string) UpdatesClient { return UpdatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/client.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/client.go index a04580361ca7..2c105f6930e8 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/client.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/groups.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/groups.go index 0a8e16ec3863..ed6aa8b4549f 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/groups.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/groups.go @@ -38,7 +38,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworkapi/interfaces.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworkapi/interfaces.go index a2380cd02d4c..48eceb4abc26 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworkapi/interfaces.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworkapi/interfaces.go @@ -29,7 +29,9 @@ type ManagedNetworksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedNetworkName string) (result managednetwork.ManagedNetworksDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, managedNetworkName string) (result managednetwork.ManagedNetwork, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, skiptoken string) (result managednetwork.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32, skiptoken string) (result managednetwork.ListResultIterator, err error) ListBySubscription(ctx context.Context, top *int32, skiptoken string) (result managednetwork.ListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32, skiptoken string) (result managednetwork.ListResultIterator, err error) Update(ctx context.Context, parameters managednetwork.Update, resourceGroupName string, managedNetworkName string) (result managednetwork.ManagedNetworksUpdateFutureType, err error) } @@ -41,6 +43,7 @@ type ScopeAssignmentsClientAPI interface { Delete(ctx context.Context, scope string, scopeAssignmentName string) (result autorest.Response, err error) Get(ctx context.Context, scope string, scopeAssignmentName string) (result managednetwork.ScopeAssignment, err error) List(ctx context.Context, scope string) (result managednetwork.ScopeAssignmentListResultPage, err error) + ListComplete(ctx context.Context, scope string) (result managednetwork.ScopeAssignmentListResultIterator, err error) } var _ ScopeAssignmentsClientAPI = (*managednetwork.ScopeAssignmentsClient)(nil) @@ -51,6 +54,7 @@ type GroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkGroupName string) (result managednetwork.GroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkGroupName string) (result managednetwork.Group, err error) ListByManagedNetwork(ctx context.Context, resourceGroupName string, managedNetworkName string, top *int32, skiptoken string) (result managednetwork.GroupListResultPage, err error) + ListByManagedNetworkComplete(ctx context.Context, resourceGroupName string, managedNetworkName string, top *int32, skiptoken string) (result managednetwork.GroupListResultIterator, err error) } var _ GroupsClientAPI = (*managednetwork.GroupsClient)(nil) @@ -61,6 +65,7 @@ type PeeringPoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkPeeringPolicyName string) (result managednetwork.PeeringPoliciesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkPeeringPolicyName string) (result managednetwork.PeeringPolicy, err error) ListByManagedNetwork(ctx context.Context, resourceGroupName string, managedNetworkName string, top *int32, skiptoken string) (result managednetwork.PeeringPolicyListResultPage, err error) + ListByManagedNetworkComplete(ctx context.Context, resourceGroupName string, managedNetworkName string, top *int32, skiptoken string) (result managednetwork.PeeringPolicyListResultIterator, err error) } var _ PeeringPoliciesClientAPI = (*managednetwork.PeeringPoliciesClient)(nil) @@ -68,6 +73,7 @@ var _ PeeringPoliciesClientAPI = (*managednetwork.PeeringPoliciesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result managednetwork.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result managednetwork.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*managednetwork.OperationsClient)(nil) diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworks.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworks.go index 7c8863c4bc82..e6c3d4542275 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworks.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworks.go @@ -38,7 +38,8 @@ func NewManagedNetworksClient(subscriptionID string) ManagedNetworksClient { return NewManagedNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedNetworksClientWithBaseURI creates an instance of the ManagedNetworksClient client. +// NewManagedNetworksClientWithBaseURI creates an instance of the ManagedNetworksClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedNetworksClientWithBaseURI(baseURI string, subscriptionID string) ManagedNetworksClient { return ManagedNetworksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/operations.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/operations.go index 4d5a22fb4962..6197302fbb00 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/operations.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/peeringpolicies.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/peeringpolicies.go index e6242d4e9823..8ad5b39592ad 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/peeringpolicies.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/peeringpolicies.go @@ -38,7 +38,8 @@ func NewPeeringPoliciesClient(subscriptionID string) PeeringPoliciesClient { return NewPeeringPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPeeringPoliciesClientWithBaseURI creates an instance of the PeeringPoliciesClient client. +// NewPeeringPoliciesClientWithBaseURI creates an instance of the PeeringPoliciesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPeeringPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PeeringPoliciesClient { return PeeringPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/scopeassignments.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/scopeassignments.go index e22fe1142fec..0aca997caca6 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/scopeassignments.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/scopeassignments.go @@ -37,7 +37,9 @@ func NewScopeAssignmentsClient(subscriptionID string) ScopeAssignmentsClient { return NewScopeAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScopeAssignmentsClientWithBaseURI creates an instance of the ScopeAssignmentsClient client. +// NewScopeAssignmentsClientWithBaseURI creates an instance of the ScopeAssignmentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewScopeAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) ScopeAssignmentsClient { return ScopeAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/managedservices/mgmt/2018-06-01/managedservices/client.go b/services/preview/managedservices/mgmt/2018-06-01/managedservices/client.go index b11201e508e3..dc81f4c85ab2 100644 --- a/services/preview/managedservices/mgmt/2018-06-01/managedservices/client.go +++ b/services/preview/managedservices/mgmt/2018-06-01/managedservices/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/managedservices/mgmt/2018-06-01/managedservices/managedservicesapi/interfaces.go b/services/preview/managedservices/mgmt/2018-06-01/managedservices/managedservicesapi/interfaces.go index 9f6462dce463..258b709e5428 100644 --- a/services/preview/managedservices/mgmt/2018-06-01/managedservices/managedservicesapi/interfaces.go +++ b/services/preview/managedservices/mgmt/2018-06-01/managedservices/managedservicesapi/interfaces.go @@ -29,6 +29,7 @@ type RegistrationDefinitionsClientAPI interface { Delete(ctx context.Context, registrationDefinitionID string, APIVersion string, scope string) (result autorest.Response, err error) Get(ctx context.Context, scope string, registrationDefinitionID string, APIVersion string) (result managedservices.RegistrationDefinition, err error) List(ctx context.Context, scope string, APIVersion string) (result managedservices.RegistrationDefinitionListPage, err error) + ListComplete(ctx context.Context, scope string, APIVersion string) (result managedservices.RegistrationDefinitionListIterator, err error) } var _ RegistrationDefinitionsClientAPI = (*managedservices.RegistrationDefinitionsClient)(nil) @@ -39,6 +40,7 @@ type RegistrationAssignmentsClientAPI interface { Delete(ctx context.Context, scope string, registrationAssignmentID string, APIVersion string) (result autorest.Response, err error) Get(ctx context.Context, scope string, registrationAssignmentID string, APIVersion string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignment, err error) List(ctx context.Context, scope string, APIVersion string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignmentListPage, err error) + ListComplete(ctx context.Context, scope string, APIVersion string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignmentListIterator, err error) } var _ RegistrationAssignmentsClientAPI = (*managedservices.RegistrationAssignmentsClient)(nil) diff --git a/services/preview/managedservices/mgmt/2018-06-01/managedservices/operations.go b/services/preview/managedservices/mgmt/2018-06-01/managedservices/operations.go index 7cca637546d7..2316a37df3cd 100644 --- a/services/preview/managedservices/mgmt/2018-06-01/managedservices/operations.go +++ b/services/preview/managedservices/mgmt/2018-06-01/managedservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/managedservices/mgmt/2018-06-01/managedservices/registrationassignments.go b/services/preview/managedservices/mgmt/2018-06-01/managedservices/registrationassignments.go index 92c37f0157d4..bdd2564ddb12 100644 --- a/services/preview/managedservices/mgmt/2018-06-01/managedservices/registrationassignments.go +++ b/services/preview/managedservices/mgmt/2018-06-01/managedservices/registrationassignments.go @@ -36,7 +36,9 @@ func NewRegistrationAssignmentsClient() RegistrationAssignmentsClient { return NewRegistrationAssignmentsClientWithBaseURI(DefaultBaseURI) } -// NewRegistrationAssignmentsClientWithBaseURI creates an instance of the RegistrationAssignmentsClient client. +// NewRegistrationAssignmentsClientWithBaseURI creates an instance of the RegistrationAssignmentsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRegistrationAssignmentsClientWithBaseURI(baseURI string) RegistrationAssignmentsClient { return RegistrationAssignmentsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/managedservices/mgmt/2018-06-01/managedservices/registrationdefinitions.go b/services/preview/managedservices/mgmt/2018-06-01/managedservices/registrationdefinitions.go index 10252bac4d07..2ec7e6d61812 100644 --- a/services/preview/managedservices/mgmt/2018-06-01/managedservices/registrationdefinitions.go +++ b/services/preview/managedservices/mgmt/2018-06-01/managedservices/registrationdefinitions.go @@ -36,7 +36,9 @@ func NewRegistrationDefinitionsClient() RegistrationDefinitionsClient { return NewRegistrationDefinitionsClientWithBaseURI(DefaultBaseURI) } -// NewRegistrationDefinitionsClientWithBaseURI creates an instance of the RegistrationDefinitionsClient client. +// NewRegistrationDefinitionsClientWithBaseURI creates an instance of the RegistrationDefinitionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRegistrationDefinitionsClientWithBaseURI(baseURI string) RegistrationDefinitionsClient { return RegistrationDefinitionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/managedservices/mgmt/2019-04-01/managedservices/client.go b/services/preview/managedservices/mgmt/2019-04-01/managedservices/client.go index d423d21101a6..9745b2d15529 100644 --- a/services/preview/managedservices/mgmt/2019-04-01/managedservices/client.go +++ b/services/preview/managedservices/mgmt/2019-04-01/managedservices/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/managedservices/mgmt/2019-04-01/managedservices/managedservicesapi/interfaces.go b/services/preview/managedservices/mgmt/2019-04-01/managedservices/managedservicesapi/interfaces.go index 2a77368b980d..202b30daa61e 100644 --- a/services/preview/managedservices/mgmt/2019-04-01/managedservices/managedservicesapi/interfaces.go +++ b/services/preview/managedservices/mgmt/2019-04-01/managedservices/managedservicesapi/interfaces.go @@ -29,6 +29,7 @@ type RegistrationDefinitionsClientAPI interface { Delete(ctx context.Context, registrationDefinitionID string, APIVersion string, scope string) (result autorest.Response, err error) Get(ctx context.Context, scope string, registrationDefinitionID string, APIVersion string) (result managedservices.RegistrationDefinition, err error) List(ctx context.Context, scope string, APIVersion string) (result managedservices.RegistrationDefinitionListPage, err error) + ListComplete(ctx context.Context, scope string, APIVersion string) (result managedservices.RegistrationDefinitionListIterator, err error) } var _ RegistrationDefinitionsClientAPI = (*managedservices.RegistrationDefinitionsClient)(nil) @@ -39,6 +40,7 @@ type RegistrationAssignmentsClientAPI interface { Delete(ctx context.Context, scope string, registrationAssignmentID string, APIVersion string) (result managedservices.RegistrationAssignmentsDeleteFuture, err error) Get(ctx context.Context, scope string, registrationAssignmentID string, APIVersion string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignment, err error) List(ctx context.Context, scope string, APIVersion string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignmentListPage, err error) + ListComplete(ctx context.Context, scope string, APIVersion string, expandRegistrationDefinition *bool) (result managedservices.RegistrationAssignmentListIterator, err error) } var _ RegistrationAssignmentsClientAPI = (*managedservices.RegistrationAssignmentsClient)(nil) diff --git a/services/preview/managedservices/mgmt/2019-04-01/managedservices/operations.go b/services/preview/managedservices/mgmt/2019-04-01/managedservices/operations.go index 7cca637546d7..2316a37df3cd 100644 --- a/services/preview/managedservices/mgmt/2019-04-01/managedservices/operations.go +++ b/services/preview/managedservices/mgmt/2019-04-01/managedservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/managedservices/mgmt/2019-04-01/managedservices/registrationassignments.go b/services/preview/managedservices/mgmt/2019-04-01/managedservices/registrationassignments.go index f34c5dae9365..4fd9fe3bab3d 100644 --- a/services/preview/managedservices/mgmt/2019-04-01/managedservices/registrationassignments.go +++ b/services/preview/managedservices/mgmt/2019-04-01/managedservices/registrationassignments.go @@ -36,7 +36,9 @@ func NewRegistrationAssignmentsClient() RegistrationAssignmentsClient { return NewRegistrationAssignmentsClientWithBaseURI(DefaultBaseURI) } -// NewRegistrationAssignmentsClientWithBaseURI creates an instance of the RegistrationAssignmentsClient client. +// NewRegistrationAssignmentsClientWithBaseURI creates an instance of the RegistrationAssignmentsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRegistrationAssignmentsClientWithBaseURI(baseURI string) RegistrationAssignmentsClient { return RegistrationAssignmentsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/managedservices/mgmt/2019-04-01/managedservices/registrationdefinitions.go b/services/preview/managedservices/mgmt/2019-04-01/managedservices/registrationdefinitions.go index df19e0ee0bc3..5bc182ac0112 100644 --- a/services/preview/managedservices/mgmt/2019-04-01/managedservices/registrationdefinitions.go +++ b/services/preview/managedservices/mgmt/2019-04-01/managedservices/registrationdefinitions.go @@ -36,7 +36,9 @@ func NewRegistrationDefinitionsClient() RegistrationDefinitionsClient { return NewRegistrationDefinitionsClientWithBaseURI(DefaultBaseURI) } -// NewRegistrationDefinitionsClientWithBaseURI creates an instance of the RegistrationDefinitionsClient client. +// NewRegistrationDefinitionsClientWithBaseURI creates an instance of the RegistrationDefinitionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRegistrationDefinitionsClientWithBaseURI(baseURI string) RegistrationDefinitionsClient { return RegistrationDefinitionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/client.go b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/client.go index fca62a318890..89707d039568 100644 --- a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/client.go +++ b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/managementpartnerapi/interfaces.go b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/managementpartnerapi/interfaces.go index f9f73b65915c..4b92186e2e89 100644 --- a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/managementpartnerapi/interfaces.go +++ b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/managementpartnerapi/interfaces.go @@ -36,6 +36,7 @@ var _ PartnerClientAPI = (*managementpartner.PartnerClient)(nil) // OperationClientAPI contains the set of methods on the OperationClient type. type OperationClientAPI interface { List(ctx context.Context) (result managementpartner.OperationListPage, err error) + ListComplete(ctx context.Context) (result managementpartner.OperationListIterator, err error) } var _ OperationClientAPI = (*managementpartner.OperationClient)(nil) diff --git a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/operation.go b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/operation.go index 3ead345972e8..c5b70205b0d7 100644 --- a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/operation.go +++ b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/operation.go @@ -35,7 +35,8 @@ func NewOperationClient() OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string) OperationClient { return OperationClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/partner.go b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/partner.go index 30c28041dafb..30f99d1fe26f 100644 --- a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/partner.go +++ b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/partner.go @@ -35,7 +35,8 @@ func NewPartnerClient() PartnerClient { return NewPartnerClientWithBaseURI(DefaultBaseURI) } -// NewPartnerClientWithBaseURI creates an instance of the PartnerClient client. +// NewPartnerClientWithBaseURI creates an instance of the PartnerClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPartnerClientWithBaseURI(baseURI string) PartnerClient { return PartnerClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/partners.go b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/partners.go index 00891d8bac15..c1d4c8b052d8 100644 --- a/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/partners.go +++ b/services/preview/managementpartner/mgmt/2018-02-01/managementpartner/partners.go @@ -35,7 +35,8 @@ func NewPartnersClient() PartnersClient { return NewPartnersClientWithBaseURI(DefaultBaseURI) } -// NewPartnersClientWithBaseURI creates an instance of the PartnersClient client. +// NewPartnersClientWithBaseURI creates an instance of the PartnersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPartnersClientWithBaseURI(baseURI string) PartnersClient { return PartnersClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/assets.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/assets.go index 0fd34b2c7f6b..ef280d90e62d 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/assets.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/assets.go @@ -35,7 +35,8 @@ func NewAssetsClient(subscriptionID string) AssetsClient { return NewAssetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssetsClientWithBaseURI creates an instance of the AssetsClient client. +// NewAssetsClientWithBaseURI creates an instance of the AssetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAssetsClientWithBaseURI(baseURI string, subscriptionID string) AssetsClient { return AssetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/client.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/client.go index d1b79a652784..21b15ca77ede 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/client.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/contentkeypolicies.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/contentkeypolicies.go index cb417175c04a..ea8492d0ae69 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/contentkeypolicies.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/contentkeypolicies.go @@ -36,7 +36,9 @@ func NewContentKeyPoliciesClient(subscriptionID string) ContentKeyPoliciesClient return NewContentKeyPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContentKeyPoliciesClientWithBaseURI creates an instance of the ContentKeyPoliciesClient client. +// NewContentKeyPoliciesClientWithBaseURI creates an instance of the ContentKeyPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContentKeyPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ContentKeyPoliciesClient { return ContentKeyPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/jobs.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/jobs.go index 6a6086fb8a07..6072701c1825 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/jobs.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go index 38254a6051d1..7bd8dbd62abe 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveevents.go @@ -36,7 +36,8 @@ func NewLiveEventsClient(subscriptionID string) LiveEventsClient { return NewLiveEventsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLiveEventsClientWithBaseURI creates an instance of the LiveEventsClient client. +// NewLiveEventsClientWithBaseURI creates an instance of the LiveEventsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLiveEventsClientWithBaseURI(baseURI string, subscriptionID string) LiveEventsClient { return LiveEventsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go index 3d7d4ad0f459..27eb02560b92 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/liveoutputs.go @@ -36,7 +36,8 @@ func NewLiveOutputsClient(subscriptionID string) LiveOutputsClient { return NewLiveOutputsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLiveOutputsClientWithBaseURI creates an instance of the LiveOutputsClient client. +// NewLiveOutputsClientWithBaseURI creates an instance of the LiveOutputsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLiveOutputsClientWithBaseURI(baseURI string, subscriptionID string) LiveOutputsClient { return LiveOutputsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/locations.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/locations.go index 63ace11598b2..406d186b60ef 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/locations.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/mediaapi/interfaces.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/mediaapi/interfaces.go index ec75e86147bd..409dff32f2e3 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/mediaapi/interfaces.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/mediaapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result media.OperationCollectionPage, err error) + ListComplete(ctx context.Context) (result media.OperationCollectionIterator, err error) } var _ OperationsClientAPI = (*media.OperationsClient)(nil) @@ -37,7 +38,9 @@ type MediaservicesClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result media.Service, err error) GetBySubscription(ctx context.Context, accountName string) (result media.SubscriptionMediaService, err error) List(ctx context.Context, resourceGroupName string) (result media.ServiceCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result media.ServiceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result media.SubscriptionMediaServiceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result media.SubscriptionMediaServiceCollectionIterator, err error) SyncStorageKeys(ctx context.Context, resourceGroupName string, accountName string, parameters media.SyncStorageKeysInput) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters media.Service) (result media.Service, err error) } @@ -58,6 +61,7 @@ type AssetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.Asset, err error) GetEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.AssetStorageEncryptionKey, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.AssetCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.AssetCollectionIterator, err error) ListContainerSas(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters media.ListContainerSasInput) (result media.AssetContainerSas, err error) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters media.Asset) (result media.Asset, err error) } @@ -71,6 +75,7 @@ type ContentKeyPoliciesClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string) (result media.ContentKeyPolicy, err error) GetPolicyPropertiesWithSecrets(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string) (result media.ContentKeyPolicyProperties, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.ContentKeyPolicyCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.ContentKeyPolicyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, parameters media.ContentKeyPolicy) (result media.ContentKeyPolicy, err error) } @@ -82,6 +87,7 @@ type TransformsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string) (result media.Transform, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32) (result media.TransformCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32) (result media.TransformCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, parameters media.Transform) (result media.Transform, err error) } @@ -94,6 +100,7 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string) (result media.Job, err error) List(ctx context.Context, resourceGroupName string, accountName string, transformName string, filter string, top *int32, skip *int32) (result media.JobCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, transformName string, filter string, top *int32, skip *int32) (result media.JobCollectionIterator, err error) } var _ JobsClientAPI = (*media.JobsClient)(nil) @@ -104,6 +111,7 @@ type StreamingPoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result media.StreamingPolicy, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingPolicyCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingPolicyCollectionIterator, err error) } var _ StreamingPoliciesClientAPI = (*media.StreamingPoliciesClient)(nil) @@ -114,6 +122,7 @@ type StreamingLocatorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.StreamingLocator, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingLocatorCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingLocatorCollectionIterator, err error) ListContentKeys(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.ListContentKeysResponse, err error) ListPaths(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.ListPathsResponse, err error) } @@ -126,6 +135,7 @@ type LiveEventsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEvent, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.LiveEventListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.LiveEventListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsResetFuture, err error) Start(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters media.LiveEventActionInput) (result media.LiveEventsStopFuture, err error) @@ -140,6 +150,7 @@ type LiveOutputsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string) (result media.LiveOutputsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string) (result media.LiveOutput, err error) List(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveOutputListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveOutputListResultIterator, err error) } var _ LiveOutputsClientAPI = (*media.LiveOutputsClient)(nil) @@ -150,6 +161,7 @@ type StreamingEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpoint, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.StreamingEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.StreamingEndpointListResultIterator, err error) Scale(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters media.StreamingEntityScaleUnit) (result media.StreamingEndpointsScaleFuture, err error) Start(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsStopFuture, err error) diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/mediaservices.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/mediaservices.go index 4c2bef0ecc0a..f8b687d3147e 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/mediaservices.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/mediaservices.go @@ -35,7 +35,8 @@ func NewMediaservicesClient(subscriptionID string) MediaservicesClient { return NewMediaservicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMediaservicesClientWithBaseURI creates an instance of the MediaservicesClient client. +// NewMediaservicesClientWithBaseURI creates an instance of the MediaservicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMediaservicesClientWithBaseURI(baseURI string, subscriptionID string) MediaservicesClient { return MediaservicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/operations.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/operations.go index a064669ee665..ac1a81f95477 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/operations.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go index 342989918284..45b43fddd14c 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingendpoints.go @@ -36,7 +36,9 @@ func NewStreamingEndpointsClient(subscriptionID string) StreamingEndpointsClient return NewStreamingEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingEndpointsClientWithBaseURI creates an instance of the StreamingEndpointsClient client. +// NewStreamingEndpointsClientWithBaseURI creates an instance of the StreamingEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingEndpointsClientWithBaseURI(baseURI string, subscriptionID string) StreamingEndpointsClient { return StreamingEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streaminglocators.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streaminglocators.go index afa821d9da14..fad7d009fd56 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streaminglocators.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streaminglocators.go @@ -36,7 +36,9 @@ func NewStreamingLocatorsClient(subscriptionID string) StreamingLocatorsClient { return NewStreamingLocatorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingLocatorsClientWithBaseURI creates an instance of the StreamingLocatorsClient client. +// NewStreamingLocatorsClientWithBaseURI creates an instance of the StreamingLocatorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingLocatorsClientWithBaseURI(baseURI string, subscriptionID string) StreamingLocatorsClient { return StreamingLocatorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingpolicies.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingpolicies.go index 8614439045ca..73439127f1f9 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingpolicies.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/streamingpolicies.go @@ -36,7 +36,9 @@ func NewStreamingPoliciesClient(subscriptionID string) StreamingPoliciesClient { return NewStreamingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client. +// NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) StreamingPoliciesClient { return StreamingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/transforms.go b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/transforms.go index bf20014d5f61..606ea3820808 100644 --- a/services/preview/mediaservices/mgmt/2018-03-30-preview/media/transforms.go +++ b/services/preview/mediaservices/mgmt/2018-03-30-preview/media/transforms.go @@ -36,7 +36,8 @@ func NewTransformsClient(subscriptionID string) TransformsClient { return NewTransformsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransformsClientWithBaseURI creates an instance of the TransformsClient client. +// NewTransformsClientWithBaseURI creates an instance of the TransformsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransformsClientWithBaseURI(baseURI string, subscriptionID string) TransformsClient { return TransformsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/assets.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/assets.go index 2b4e07f80cc4..cbd895ee1f1d 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/assets.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/assets.go @@ -35,7 +35,8 @@ func NewAssetsClient(subscriptionID string) AssetsClient { return NewAssetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssetsClientWithBaseURI creates an instance of the AssetsClient client. +// NewAssetsClientWithBaseURI creates an instance of the AssetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAssetsClientWithBaseURI(baseURI string, subscriptionID string) AssetsClient { return AssetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/client.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/client.go index 2834528d9cc3..47b67f1af401 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/client.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/contentkeypolicies.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/contentkeypolicies.go index 1c65494ee3f0..5fbadb0796ce 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/contentkeypolicies.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/contentkeypolicies.go @@ -36,7 +36,9 @@ func NewContentKeyPoliciesClient(subscriptionID string) ContentKeyPoliciesClient return NewContentKeyPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContentKeyPoliciesClientWithBaseURI creates an instance of the ContentKeyPoliciesClient client. +// NewContentKeyPoliciesClientWithBaseURI creates an instance of the ContentKeyPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContentKeyPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ContentKeyPoliciesClient { return ContentKeyPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/jobs.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/jobs.go index 9020ea74cec4..128d63aa9237 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/jobs.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveevents.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveevents.go index 21158a563ca6..c55d9a6c14aa 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveevents.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveevents.go @@ -36,7 +36,8 @@ func NewLiveEventsClient(subscriptionID string) LiveEventsClient { return NewLiveEventsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLiveEventsClientWithBaseURI creates an instance of the LiveEventsClient client. +// NewLiveEventsClientWithBaseURI creates an instance of the LiveEventsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLiveEventsClientWithBaseURI(baseURI string, subscriptionID string) LiveEventsClient { return LiveEventsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveoutputs.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveoutputs.go index 99ed25d606b2..9e2f0a27a76a 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveoutputs.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/liveoutputs.go @@ -36,7 +36,8 @@ func NewLiveOutputsClient(subscriptionID string) LiveOutputsClient { return NewLiveOutputsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLiveOutputsClientWithBaseURI creates an instance of the LiveOutputsClient client. +// NewLiveOutputsClientWithBaseURI creates an instance of the LiveOutputsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLiveOutputsClientWithBaseURI(baseURI string, subscriptionID string) LiveOutputsClient { return LiveOutputsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/locations.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/locations.go index b489eb555a12..817111b302dc 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/locations.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/mediaapi/interfaces.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/mediaapi/interfaces.go index 3861047448d6..052a74952066 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/mediaapi/interfaces.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/mediaapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result media.OperationCollectionPage, err error) + ListComplete(ctx context.Context) (result media.OperationCollectionIterator, err error) } var _ OperationsClientAPI = (*media.OperationsClient)(nil) @@ -37,7 +38,9 @@ type MediaservicesClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result media.Service, err error) GetBySubscription(ctx context.Context, accountName string) (result media.SubscriptionMediaService, err error) List(ctx context.Context, resourceGroupName string) (result media.ServiceCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result media.ServiceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result media.SubscriptionMediaServiceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result media.SubscriptionMediaServiceCollectionIterator, err error) SyncStorageKeys(ctx context.Context, resourceGroupName string, accountName string, parameters media.SyncStorageKeysInput) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters media.Service) (result media.Service, err error) } @@ -58,6 +61,7 @@ type AssetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.Asset, err error) GetEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.AssetStorageEncryptionKey, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.AssetCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.AssetCollectionIterator, err error) ListContainerSas(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters media.ListContainerSasInput) (result media.AssetContainerSas, err error) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters media.Asset) (result media.Asset, err error) } @@ -71,6 +75,7 @@ type ContentKeyPoliciesClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string) (result media.ContentKeyPolicy, err error) GetPolicyPropertiesWithSecrets(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string) (result media.ContentKeyPolicyProperties, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.ContentKeyPolicyCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.ContentKeyPolicyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, parameters media.ContentKeyPolicy) (result media.ContentKeyPolicy, err error) } @@ -82,6 +87,7 @@ type TransformsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string) (result media.Transform, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32) (result media.TransformCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32) (result media.TransformCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, parameters media.Transform) (result media.Transform, err error) } @@ -94,6 +100,7 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string) (result media.Job, err error) List(ctx context.Context, resourceGroupName string, accountName string, transformName string, filter string, top *int32, skip *int32) (result media.JobCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, transformName string, filter string, top *int32, skip *int32) (result media.JobCollectionIterator, err error) } var _ JobsClientAPI = (*media.JobsClient)(nil) @@ -104,6 +111,7 @@ type StreamingPoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result media.StreamingPolicy, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingPolicyCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingPolicyCollectionIterator, err error) } var _ StreamingPoliciesClientAPI = (*media.StreamingPoliciesClient)(nil) @@ -114,6 +122,7 @@ type StreamingLocatorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.StreamingLocator, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingLocatorCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingLocatorCollectionIterator, err error) ListContentKeys(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.ListContentKeysResponse, err error) ListPaths(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.ListPathsResponse, err error) } @@ -126,6 +135,7 @@ type LiveEventsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEvent, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.LiveEventListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.LiveEventListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsResetFuture, err error) Start(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters media.LiveEventActionInput) (result media.LiveEventsStopFuture, err error) @@ -140,6 +150,7 @@ type LiveOutputsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string) (result media.LiveOutputsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string) (result media.LiveOutput, err error) List(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveOutputListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveOutputListResultIterator, err error) } var _ LiveOutputsClientAPI = (*media.LiveOutputsClient)(nil) @@ -150,6 +161,7 @@ type StreamingEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpoint, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.StreamingEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.StreamingEndpointListResultIterator, err error) Scale(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters media.StreamingEntityScaleUnit) (result media.StreamingEndpointsScaleFuture, err error) Start(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsStopFuture, err error) diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/mediaservices.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/mediaservices.go index d708247b7f25..f1d4f67f0884 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/mediaservices.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/mediaservices.go @@ -35,7 +35,8 @@ func NewMediaservicesClient(subscriptionID string) MediaservicesClient { return NewMediaservicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMediaservicesClientWithBaseURI creates an instance of the MediaservicesClient client. +// NewMediaservicesClientWithBaseURI creates an instance of the MediaservicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMediaservicesClientWithBaseURI(baseURI string, subscriptionID string) MediaservicesClient { return MediaservicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/operations.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/operations.go index d4b9424057b4..c42a105b6c57 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/operations.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingendpoints.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingendpoints.go index 84127fbce6db..0e4139e843af 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingendpoints.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingendpoints.go @@ -36,7 +36,9 @@ func NewStreamingEndpointsClient(subscriptionID string) StreamingEndpointsClient return NewStreamingEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingEndpointsClientWithBaseURI creates an instance of the StreamingEndpointsClient client. +// NewStreamingEndpointsClientWithBaseURI creates an instance of the StreamingEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingEndpointsClientWithBaseURI(baseURI string, subscriptionID string) StreamingEndpointsClient { return StreamingEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streaminglocators.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streaminglocators.go index fd9a4265d3ba..4e08da66b598 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streaminglocators.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streaminglocators.go @@ -36,7 +36,9 @@ func NewStreamingLocatorsClient(subscriptionID string) StreamingLocatorsClient { return NewStreamingLocatorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingLocatorsClientWithBaseURI creates an instance of the StreamingLocatorsClient client. +// NewStreamingLocatorsClientWithBaseURI creates an instance of the StreamingLocatorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingLocatorsClientWithBaseURI(baseURI string, subscriptionID string) StreamingLocatorsClient { return StreamingLocatorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingpolicies.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingpolicies.go index 3e1a37237fa2..d685cd69ca0f 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingpolicies.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/streamingpolicies.go @@ -36,7 +36,9 @@ func NewStreamingPoliciesClient(subscriptionID string) StreamingPoliciesClient { return NewStreamingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client. +// NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) StreamingPoliciesClient { return StreamingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/transforms.go b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/transforms.go index 936278a2b637..ea23b9a4b27c 100644 --- a/services/preview/mediaservices/mgmt/2018-06-01-preview/media/transforms.go +++ b/services/preview/mediaservices/mgmt/2018-06-01-preview/media/transforms.go @@ -36,7 +36,8 @@ func NewTransformsClient(subscriptionID string) TransformsClient { return NewTransformsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransformsClientWithBaseURI creates an instance of the TransformsClient client. +// NewTransformsClientWithBaseURI creates an instance of the TransformsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransformsClientWithBaseURI(baseURI string, subscriptionID string) TransformsClient { return TransformsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/accountfilters.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/accountfilters.go index a2a9b0832c6d..c3a3262d59e5 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/accountfilters.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/accountfilters.go @@ -36,7 +36,8 @@ func NewAccountFiltersClient(subscriptionID string) AccountFiltersClient { return NewAccountFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountFiltersClientWithBaseURI creates an instance of the AccountFiltersClient client. +// NewAccountFiltersClientWithBaseURI creates an instance of the AccountFiltersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountFiltersClientWithBaseURI(baseURI string, subscriptionID string) AccountFiltersClient { return AccountFiltersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/assetfilters.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/assetfilters.go index 3c2870223b21..4f540bab7d4e 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/assetfilters.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/assetfilters.go @@ -36,7 +36,8 @@ func NewAssetFiltersClient(subscriptionID string) AssetFiltersClient { return NewAssetFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssetFiltersClientWithBaseURI creates an instance of the AssetFiltersClient client. +// NewAssetFiltersClientWithBaseURI creates an instance of the AssetFiltersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAssetFiltersClientWithBaseURI(baseURI string, subscriptionID string) AssetFiltersClient { return AssetFiltersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/assets.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/assets.go index 1b068b188656..ac8fc5c999e0 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/assets.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/assets.go @@ -35,7 +35,8 @@ func NewAssetsClient(subscriptionID string) AssetsClient { return NewAssetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssetsClientWithBaseURI creates an instance of the AssetsClient client. +// NewAssetsClientWithBaseURI creates an instance of the AssetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAssetsClientWithBaseURI(baseURI string, subscriptionID string) AssetsClient { return AssetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/client.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/client.go index f5f3162a17b1..4de030c30d27 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/client.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/contentkeypolicies.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/contentkeypolicies.go index 5b171643b242..5d7de97a85e9 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/contentkeypolicies.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/contentkeypolicies.go @@ -36,7 +36,9 @@ func NewContentKeyPoliciesClient(subscriptionID string) ContentKeyPoliciesClient return NewContentKeyPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContentKeyPoliciesClientWithBaseURI creates an instance of the ContentKeyPoliciesClient client. +// NewContentKeyPoliciesClientWithBaseURI creates an instance of the ContentKeyPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContentKeyPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ContentKeyPoliciesClient { return ContentKeyPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/jobs.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/jobs.go index d6e6c8f89d69..abb17625a14a 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/jobs.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveevents.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveevents.go index 34908b840bf7..7b7bd752c389 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveevents.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveevents.go @@ -36,7 +36,8 @@ func NewLiveEventsClient(subscriptionID string) LiveEventsClient { return NewLiveEventsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLiveEventsClientWithBaseURI creates an instance of the LiveEventsClient client. +// NewLiveEventsClientWithBaseURI creates an instance of the LiveEventsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLiveEventsClientWithBaseURI(baseURI string, subscriptionID string) LiveEventsClient { return LiveEventsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveoutputs.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveoutputs.go index 8b6c476016a0..20e1ae0ba091 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveoutputs.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/liveoutputs.go @@ -36,7 +36,8 @@ func NewLiveOutputsClient(subscriptionID string) LiveOutputsClient { return NewLiveOutputsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLiveOutputsClientWithBaseURI creates an instance of the LiveOutputsClient client. +// NewLiveOutputsClientWithBaseURI creates an instance of the LiveOutputsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLiveOutputsClientWithBaseURI(baseURI string, subscriptionID string) LiveOutputsClient { return LiveOutputsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/locations.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/locations.go index 275566dab374..d3f199c3032c 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/locations.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/mediaapi/interfaces.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/mediaapi/interfaces.go index 2fd9647e4296..5f940908f666 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/mediaapi/interfaces.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/mediaapi/interfaces.go @@ -29,6 +29,7 @@ type AccountFiltersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, filterName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, filterName string) (result media.AccountFilter, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.AccountFilterCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.AccountFilterCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, filterName string, parameters media.AccountFilter) (result media.AccountFilter, err error) } @@ -37,6 +38,7 @@ var _ AccountFiltersClientAPI = (*media.AccountFiltersClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result media.OperationCollectionPage, err error) + ListComplete(ctx context.Context) (result media.OperationCollectionIterator, err error) } var _ OperationsClientAPI = (*media.OperationsClient)(nil) @@ -48,7 +50,9 @@ type MediaservicesClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string) (result media.Service, err error) GetBySubscription(ctx context.Context, accountName string) (result media.SubscriptionMediaService, err error) List(ctx context.Context, resourceGroupName string) (result media.ServiceCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result media.ServiceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result media.SubscriptionMediaServiceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result media.SubscriptionMediaServiceCollectionIterator, err error) SyncStorageKeys(ctx context.Context, resourceGroupName string, accountName string, parameters media.SyncStorageKeysInput) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters media.Service) (result media.Service, err error) } @@ -69,6 +73,7 @@ type AssetsClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.Asset, err error) GetEncryptionKey(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.StorageEncryptedAssetDecryptionData, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.AssetCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.AssetCollectionIterator, err error) ListContainerSas(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters media.ListContainerSasInput) (result media.AssetContainerSas, err error) ListStreamingLocators(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.ListStreamingLocatorsResponse, err error) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, parameters media.Asset) (result media.Asset, err error) @@ -82,6 +87,7 @@ type AssetFiltersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string) (result media.AssetFilter, err error) List(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.AssetFilterCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, assetName string) (result media.AssetFilterCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, assetName string, filterName string, parameters media.AssetFilter) (result media.AssetFilter, err error) } @@ -94,6 +100,7 @@ type ContentKeyPoliciesClientAPI interface { Get(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string) (result media.ContentKeyPolicy, err error) GetPolicyPropertiesWithSecrets(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string) (result media.ContentKeyPolicyProperties, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.ContentKeyPolicyCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.ContentKeyPolicyCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, contentKeyPolicyName string, parameters media.ContentKeyPolicy) (result media.ContentKeyPolicy, err error) } @@ -105,6 +112,7 @@ type TransformsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string) (result media.Transform, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, orderby string) (result media.TransformCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, orderby string) (result media.TransformCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, parameters media.Transform) (result media.Transform, err error) } @@ -117,6 +125,7 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string) (result media.Job, err error) List(ctx context.Context, resourceGroupName string, accountName string, transformName string, filter string, orderby string) (result media.JobCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, transformName string, filter string, orderby string) (result media.JobCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, transformName string, jobName string, parameters media.Job) (result media.Job, err error) } @@ -128,6 +137,7 @@ type StreamingPoliciesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingPolicyName string) (result media.StreamingPolicy, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingPolicyCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingPolicyCollectionIterator, err error) } var _ StreamingPoliciesClientAPI = (*media.StreamingPoliciesClient)(nil) @@ -138,6 +148,7 @@ type StreamingLocatorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.StreamingLocator, err error) List(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingLocatorCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, orderby string) (result media.StreamingLocatorCollectionIterator, err error) ListContentKeys(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.ListContentKeysResponse, err error) ListPaths(ctx context.Context, resourceGroupName string, accountName string, streamingLocatorName string) (result media.ListPathsResponse, err error) } @@ -150,6 +161,7 @@ type LiveEventsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEvent, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.LiveEventListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.LiveEventListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsResetFuture, err error) Start(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveEventsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, parameters media.LiveEventActionInput) (result media.LiveEventsStopFuture, err error) @@ -164,6 +176,7 @@ type LiveOutputsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string) (result media.LiveOutputsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, liveEventName string, liveOutputName string) (result media.LiveOutput, err error) List(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveOutputListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, liveEventName string) (result media.LiveOutputListResultIterator, err error) } var _ LiveOutputsClientAPI = (*media.LiveOutputsClient)(nil) @@ -174,6 +187,7 @@ type StreamingEndpointsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpoint, err error) List(ctx context.Context, resourceGroupName string, accountName string) (result media.StreamingEndpointListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result media.StreamingEndpointListResultIterator, err error) Scale(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string, parameters media.StreamingEntityScaleUnit) (result media.StreamingEndpointsScaleFuture, err error) Start(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, accountName string, streamingEndpointName string) (result media.StreamingEndpointsStopFuture, err error) diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/mediaservices.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/mediaservices.go index 32db5e143b91..abdcb4f0c53e 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/mediaservices.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/mediaservices.go @@ -35,7 +35,8 @@ func NewMediaservicesClient(subscriptionID string) MediaservicesClient { return NewMediaservicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMediaservicesClientWithBaseURI creates an instance of the MediaservicesClient client. +// NewMediaservicesClientWithBaseURI creates an instance of the MediaservicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMediaservicesClientWithBaseURI(baseURI string, subscriptionID string) MediaservicesClient { return MediaservicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/operations.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/operations.go index 3aedf3117a32..bacb50e6cf12 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/operations.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingendpoints.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingendpoints.go index 5d9e2cd1a1ce..8576b892715d 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingendpoints.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingendpoints.go @@ -36,7 +36,9 @@ func NewStreamingEndpointsClient(subscriptionID string) StreamingEndpointsClient return NewStreamingEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingEndpointsClientWithBaseURI creates an instance of the StreamingEndpointsClient client. +// NewStreamingEndpointsClientWithBaseURI creates an instance of the StreamingEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingEndpointsClientWithBaseURI(baseURI string, subscriptionID string) StreamingEndpointsClient { return StreamingEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streaminglocators.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streaminglocators.go index 8939d9586bf1..7b8503ade806 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streaminglocators.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streaminglocators.go @@ -36,7 +36,9 @@ func NewStreamingLocatorsClient(subscriptionID string) StreamingLocatorsClient { return NewStreamingLocatorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingLocatorsClientWithBaseURI creates an instance of the StreamingLocatorsClient client. +// NewStreamingLocatorsClientWithBaseURI creates an instance of the StreamingLocatorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingLocatorsClientWithBaseURI(baseURI string, subscriptionID string) StreamingLocatorsClient { return StreamingLocatorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingpolicies.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingpolicies.go index 16d98d4f97af..05aa6596b40a 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingpolicies.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/streamingpolicies.go @@ -36,7 +36,9 @@ func NewStreamingPoliciesClient(subscriptionID string) StreamingPoliciesClient { return NewStreamingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client. +// NewStreamingPoliciesClientWithBaseURI creates an instance of the StreamingPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewStreamingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) StreamingPoliciesClient { return StreamingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/transforms.go b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/transforms.go index 961271a3a637..e37ac9e465e9 100644 --- a/services/preview/mediaservices/mgmt/2019-05-01-preview/media/transforms.go +++ b/services/preview/mediaservices/mgmt/2019-05-01-preview/media/transforms.go @@ -36,7 +36,8 @@ func NewTransformsClient(subscriptionID string) TransformsClient { return NewTransformsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransformsClientWithBaseURI creates an instance of the TransformsClient client. +// NewTransformsClientWithBaseURI creates an instance of the TransformsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransformsClientWithBaseURI(baseURI string, subscriptionID string) TransformsClient { return TransformsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/client.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/client.go index 32a3c19821ca..59f2ba259217 100644 --- a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/client.go +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, acceptLanguage string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, acceptLanguage string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/databaseinstances.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/databaseinstances.go index fc0007329fa3..cad24fbfe93d 100644 --- a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/databaseinstances.go +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/databaseinstances.go @@ -35,7 +35,9 @@ func NewDatabaseInstancesClient(subscriptionID string, acceptLanguage string) Da return NewDatabaseInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewDatabaseInstancesClientWithBaseURI creates an instance of the DatabaseInstancesClient client. +// NewDatabaseInstancesClientWithBaseURI creates an instance of the DatabaseInstancesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDatabaseInstancesClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) DatabaseInstancesClient { return DatabaseInstancesClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/databases.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/databases.go index 89e042f7c080..c90f26707068 100644 --- a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/databases.go +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/databases.go @@ -35,7 +35,8 @@ func NewDatabasesClient(subscriptionID string, acceptLanguage string) DatabasesC return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/events.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/events.go index f3faf2457691..7cdcb6e6f26d 100644 --- a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/events.go +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/events.go @@ -35,7 +35,8 @@ func NewEventsClient(subscriptionID string, acceptLanguage string) EventsClient return NewEventsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewEventsClientWithBaseURI creates an instance of the EventsClient client. +// NewEventsClientWithBaseURI creates an instance of the EventsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) EventsClient { return EventsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/machines.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/machines.go index e270e638d3be..fad3f1b11710 100644 --- a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/machines.go +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/machines.go @@ -35,7 +35,8 @@ func NewMachinesClient(subscriptionID string, acceptLanguage string) MachinesCli return NewMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client. +// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMachinesClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) MachinesClient { return MachinesClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/operations.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/operations.go index a46fe51d69a3..49645c975aa8 100644 --- a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/operations.go +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, acceptLanguage string) Operation return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, acceptLanguage string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/projects.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/projects.go index 2da4f08a8be3..bb2f9d191391 100644 --- a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/projects.go +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/projects.go @@ -35,7 +35,8 @@ func NewProjectsClient(subscriptionID string, acceptLanguage string) ProjectsCli return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) ProjectsClient { return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/solutions.go b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/solutions.go index 10ac33062651..5ae6da8a0bc1 100644 --- a/services/preview/migrate/mgmt/2018-09-01-preview/migrate/solutions.go +++ b/services/preview/migrate/mgmt/2018-09-01-preview/migrate/solutions.go @@ -35,7 +35,8 @@ func NewSolutionsClient(subscriptionID string, acceptLanguage string) SolutionsC return NewSolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewSolutionsClientWithBaseURI creates an instance of the SolutionsClient client. +// NewSolutionsClientWithBaseURI creates an instance of the SolutionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSolutionsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) SolutionsClient { return SolutionsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/client.go b/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/client.go index e7a769ea2627..50e1064d54b3 100644 --- a/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/client.go +++ b/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/mixedrealityapi/interfaces.go b/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/mixedrealityapi/interfaces.go index 2c6c671a66f2..1b60bf8b415f 100644 --- a/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/mixedrealityapi/interfaces.go +++ b/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/mixedrealityapi/interfaces.go @@ -33,6 +33,7 @@ var _ BaseClientAPI = (*mixedreality.BaseClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result mixedreality.OperationListPage, err error) + ListComplete(ctx context.Context) (result mixedreality.OperationListIterator, err error) } var _ OperationsClientAPI = (*mixedreality.OperationsClient)(nil) @@ -44,7 +45,9 @@ type SpatialAnchorsAccountsClientAPI interface { Get(ctx context.Context, resourceGroupName string, spatialAnchorsAccountName string) (result mixedreality.SpatialAnchorsAccount, err error) GetKeys(ctx context.Context, resourceGroupName string, spatialAnchorsAccountName string) (result mixedreality.SpatialAnchorsAccountKeys, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result mixedreality.SpatialAnchorsAccountListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result mixedreality.SpatialAnchorsAccountListIterator, err error) ListBySubscription(ctx context.Context) (result mixedreality.SpatialAnchorsAccountListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result mixedreality.SpatialAnchorsAccountListIterator, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, spatialAnchorsAccountName string, spatialAnchorsAccountKeyRegenerate mixedreality.SpatialAnchorsAccountKeyRegenerateRequest) (result mixedreality.SpatialAnchorsAccountKeys, err error) Update(ctx context.Context, resourceGroupName string, spatialAnchorsAccountName string, spatialAnchorsAccount mixedreality.SpatialAnchorsAccount) (result mixedreality.SpatialAnchorsAccount, err error) } diff --git a/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/operations.go b/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/operations.go index c99c3264e7d7..6612ab84caa2 100644 --- a/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/operations.go +++ b/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/spatialanchorsaccounts.go b/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/spatialanchorsaccounts.go index 035518a71fd6..45389e5b690f 100644 --- a/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/spatialanchorsaccounts.go +++ b/services/preview/mixedreality/mgmt/2019-02-28/mixedreality/spatialanchorsaccounts.go @@ -36,7 +36,9 @@ func NewSpatialAnchorsAccountsClient(subscriptionID string) SpatialAnchorsAccoun return NewSpatialAnchorsAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSpatialAnchorsAccountsClientWithBaseURI creates an instance of the SpatialAnchorsAccountsClient client. +// NewSpatialAnchorsAccountsClientWithBaseURI creates an instance of the SpatialAnchorsAccountsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewSpatialAnchorsAccountsClientWithBaseURI(baseURI string, subscriptionID string) SpatialAnchorsAccountsClient { return SpatialAnchorsAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/2018-09-01-preview/monitor/client.go b/services/preview/monitor/2018-09-01-preview/monitor/client.go index 25be8de71cef..6078f019ed5d 100644 --- a/services/preview/monitor/2018-09-01-preview/monitor/client.go +++ b/services/preview/monitor/2018-09-01-preview/monitor/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/monitor/2018-09-01-preview/monitor/metrics.go b/services/preview/monitor/2018-09-01-preview/monitor/metrics.go index 3e2a4592ce6f..fea6b8e83d03 100644 --- a/services/preview/monitor/2018-09-01-preview/monitor/metrics.go +++ b/services/preview/monitor/2018-09-01-preview/monitor/metrics.go @@ -36,7 +36,8 @@ func NewMetricsClient() MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/actiongroups.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/actiongroups.go index 164917c42245..17e732325422 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/actiongroups.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/actiongroups.go @@ -36,7 +36,8 @@ func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/activitylogalerts.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/activitylogalerts.go index ed927c20655a..8891636d5999 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/activitylogalerts.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/activitylogalerts.go @@ -36,7 +36,9 @@ func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/activitylogs.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/activitylogs.go index 60e31eca2b5f..4a718e198be4 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/activitylogs.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/activitylogs.go @@ -35,7 +35,8 @@ func NewActivityLogsClient(subscriptionID string) ActivityLogsClient { return NewActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client. +// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogsClient { return ActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/alertruleincidents.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/alertruleincidents.go index 86569442a225..d9d812d63ab8 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/alertruleincidents.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/alertruleincidents.go @@ -35,7 +35,9 @@ func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/alertrules.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/alertrules.go index 34239f106a8c..d89526ced89b 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/alertrules.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/alertrules.go @@ -36,7 +36,8 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/autoscalesettings.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/autoscalesettings.go index 450ade011189..69cfd54401c0 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/autoscalesettings.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/autoscalesettings.go @@ -36,7 +36,9 @@ func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/client.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/client.go index 5ed388022a2b..557e8413f017 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/client.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/diagnosticsettings.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/diagnosticsettings.go index 3b607d4d8196..5599aefcdd58 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/diagnosticsettings.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/diagnosticsettings.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/diagnosticsettingscategory.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/diagnosticsettingscategory.go index 587b7f562de5..aeb000ac4ea7 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/diagnosticsettingscategory.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/diagnosticsettingscategory.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettin return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/eventcategories.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/eventcategories.go index b09fb63c6881..08f817f0be47 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/eventcategories.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/eventcategories.go @@ -35,7 +35,8 @@ func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient { return NewEventCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client. +// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient { return EventCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/insightsapi/interfaces.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/insightsapi/interfaces.go index 3393f697f13d..6831e77cdd9d 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/insightsapi/interfaces.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/insightsapi/interfaces.go @@ -29,7 +29,9 @@ type AutoscaleSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result insights.AutoscaleSettingResource, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource insights.AutoscaleSettingResourcePatch) (result insights.AutoscaleSettingResource, err error) } @@ -119,6 +121,7 @@ var _ ActivityLogAlertsClientAPI = (*insights.ActivityLogAlertsClient)(nil) // ActivityLogsClientAPI contains the set of methods on the ActivityLogsClient type. type ActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ ActivityLogsClientAPI = (*insights.ActivityLogsClient)(nil) @@ -133,6 +136,7 @@ var _ EventCategoriesClientAPI = (*insights.EventCategoriesClient)(nil) // TenantActivityLogsClientAPI contains the set of methods on the TenantActivityLogsClient type. type TenantActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ TenantActivityLogsClientAPI = (*insights.TenantActivityLogsClient)(nil) diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/logprofiles.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/logprofiles.go index e96cea0a6184..63daa54e523d 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/logprofiles.go @@ -36,7 +36,8 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/metricbaseline.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/metricbaseline.go index d12bd9d4f2b6..6c7043b044cc 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/metricbaseline.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/metricbaseline.go @@ -36,7 +36,8 @@ func NewMetricBaselineClient(subscriptionID string) MetricBaselineClient { return NewMetricBaselineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client. +// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) MetricBaselineClient { return MetricBaselineClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/metricdefinitions.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/metricdefinitions.go index b93e9f72078c..ffe999c05d69 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/metricdefinitions.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/metricdefinitions.go @@ -35,7 +35,9 @@ func NewMetricDefinitionsClient(subscriptionID string) MetricDefinitionsClient { return NewMetricDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client. +// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) MetricDefinitionsClient { return MetricDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/metrics.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/metrics.go index bf8e313bff13..ce0cdfd6d181 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/metrics.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/metrics.go @@ -35,7 +35,8 @@ func NewMetricsClient(subscriptionID string) MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/operations.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/operations.go index bd8af5c238d4..e36f3626e966 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/operations.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/tenantactivitylogs.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/tenantactivitylogs.go index 23739ed5d286..5d6cbb12c013 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/tenantactivitylogs.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/tenantactivitylogs.go @@ -35,7 +35,9 @@ func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient return NewTenantActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client. +// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient { return TenantActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/actiongroups.go b/services/preview/monitor/mgmt/2018-03-01/insights/actiongroups.go index a4ed00ddb3a6..d3fc23acb099 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/actiongroups.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/actiongroups.go @@ -36,7 +36,8 @@ func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/activitylogalerts.go b/services/preview/monitor/mgmt/2018-03-01/insights/activitylogalerts.go index ed927c20655a..8891636d5999 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/activitylogalerts.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/activitylogalerts.go @@ -36,7 +36,9 @@ func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/activitylogs.go b/services/preview/monitor/mgmt/2018-03-01/insights/activitylogs.go index 60e31eca2b5f..4a718e198be4 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/activitylogs.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/activitylogs.go @@ -35,7 +35,8 @@ func NewActivityLogsClient(subscriptionID string) ActivityLogsClient { return NewActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client. +// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogsClient { return ActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/alertruleincidents.go b/services/preview/monitor/mgmt/2018-03-01/insights/alertruleincidents.go index 86569442a225..d9d812d63ab8 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/alertruleincidents.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/alertruleincidents.go @@ -35,7 +35,9 @@ func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/alertrules.go b/services/preview/monitor/mgmt/2018-03-01/insights/alertrules.go index 34239f106a8c..d89526ced89b 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/alertrules.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/alertrules.go @@ -36,7 +36,8 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/autoscalesettings.go b/services/preview/monitor/mgmt/2018-03-01/insights/autoscalesettings.go index 450ade011189..69cfd54401c0 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/autoscalesettings.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/autoscalesettings.go @@ -36,7 +36,9 @@ func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/client.go b/services/preview/monitor/mgmt/2018-03-01/insights/client.go index 5ed388022a2b..557e8413f017 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/client.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettings.go b/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettings.go index 3b607d4d8196..5599aefcdd58 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettings.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettings.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettingscategory.go b/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettingscategory.go index 587b7f562de5..aeb000ac4ea7 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettingscategory.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettingscategory.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettin return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/eventcategories.go b/services/preview/monitor/mgmt/2018-03-01/insights/eventcategories.go index b09fb63c6881..08f817f0be47 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/eventcategories.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/eventcategories.go @@ -35,7 +35,8 @@ func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient { return NewEventCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client. +// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient { return EventCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/insightsapi/interfaces.go b/services/preview/monitor/mgmt/2018-03-01/insights/insightsapi/interfaces.go index 105198cd9630..65aa4eb7fdba 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/insightsapi/interfaces.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/insightsapi/interfaces.go @@ -29,7 +29,9 @@ type AutoscaleSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result insights.AutoscaleSettingResource, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource insights.AutoscaleSettingResourcePatch) (result insights.AutoscaleSettingResource, err error) } @@ -119,6 +121,7 @@ var _ ActivityLogAlertsClientAPI = (*insights.ActivityLogAlertsClient)(nil) // ActivityLogsClientAPI contains the set of methods on the ActivityLogsClient type. type ActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ ActivityLogsClientAPI = (*insights.ActivityLogsClient)(nil) @@ -133,6 +136,7 @@ var _ EventCategoriesClientAPI = (*insights.EventCategoriesClient)(nil) // TenantActivityLogsClientAPI contains the set of methods on the TenantActivityLogsClient type. type TenantActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ TenantActivityLogsClientAPI = (*insights.TenantActivityLogsClient)(nil) diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go index e96cea0a6184..63daa54e523d 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go @@ -36,7 +36,8 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/metricalerts.go b/services/preview/monitor/mgmt/2018-03-01/insights/metricalerts.go index 055a96e3ed3c..9a6b30edee6b 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/metricalerts.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/metricalerts.go @@ -36,7 +36,8 @@ func NewMetricAlertsClient(subscriptionID string) MetricAlertsClient { return NewMetricAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client. +// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricAlertsClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsClient { return MetricAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/metricalertsstatus.go b/services/preview/monitor/mgmt/2018-03-01/insights/metricalertsstatus.go index 04617c643555..6e047493d7f5 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/metricalertsstatus.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/metricalertsstatus.go @@ -35,7 +35,9 @@ func NewMetricAlertsStatusClient(subscriptionID string) MetricAlertsStatusClient return NewMetricAlertsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client. +// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricAlertsStatusClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsStatusClient { return MetricAlertsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/metricbaseline.go b/services/preview/monitor/mgmt/2018-03-01/insights/metricbaseline.go index d12bd9d4f2b6..6c7043b044cc 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/metricbaseline.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/metricbaseline.go @@ -36,7 +36,8 @@ func NewMetricBaselineClient(subscriptionID string) MetricBaselineClient { return NewMetricBaselineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client. +// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) MetricBaselineClient { return MetricBaselineClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/metricdefinitions.go b/services/preview/monitor/mgmt/2018-03-01/insights/metricdefinitions.go index 29a5bbee5319..56bed9528859 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/metricdefinitions.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/metricdefinitions.go @@ -35,7 +35,9 @@ func NewMetricDefinitionsClient(subscriptionID string) MetricDefinitionsClient { return NewMetricDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client. +// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) MetricDefinitionsClient { return MetricDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/metrics.go b/services/preview/monitor/mgmt/2018-03-01/insights/metrics.go index f1952a3fe2a9..24cd091db554 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/metrics.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/metrics.go @@ -35,7 +35,8 @@ func NewMetricsClient(subscriptionID string) MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/models.go b/services/preview/monitor/mgmt/2018-03-01/insights/models.go index 9006850ab41a..a17072da505e 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/models.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/models.go @@ -3312,8 +3312,8 @@ type Metric struct { type MetricAlertAction struct { // ActionGroupID - the id of the action group to use. ActionGroupID *string `json:"actionGroupId,omitempty"` - // WebhookProperties - The properties of a webhook object. - WebhookProperties map[string]*string `json:"webhookProperties"` + // WebHookProperties - The properties of a webhook object. + WebHookProperties map[string]*string `json:"webHookProperties"` } // MarshalJSON is the custom marshaler for MetricAlertAction. @@ -3322,8 +3322,8 @@ func (maa MetricAlertAction) MarshalJSON() ([]byte, error) { if maa.ActionGroupID != nil { objectMap["actionGroupId"] = maa.ActionGroupID } - if maa.WebhookProperties != nil { - objectMap["webhookProperties"] = maa.WebhookProperties + if maa.WebHookProperties != nil { + objectMap["webHookProperties"] = maa.WebHookProperties } return json.Marshal(objectMap) } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/operations.go b/services/preview/monitor/mgmt/2018-03-01/insights/operations.go index bd8af5c238d4..e36f3626e966 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/operations.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go b/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go index b4bb9bca5ddc..44021c67ca5e 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go @@ -36,7 +36,9 @@ func NewScheduledQueryRulesClient(subscriptionID string) ScheduledQueryRulesClie return NewScheduledQueryRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client. +// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewScheduledQueryRulesClientWithBaseURI(baseURI string, subscriptionID string) ScheduledQueryRulesClient { return ScheduledQueryRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/tenantactivitylogs.go b/services/preview/monitor/mgmt/2018-03-01/insights/tenantactivitylogs.go index 23739ed5d286..5d6cbb12c013 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/tenantactivitylogs.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/tenantactivitylogs.go @@ -35,7 +35,9 @@ func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient return NewTenantActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client. +// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient { return TenantActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/actiongroups.go b/services/preview/monitor/mgmt/2018-09-01/insights/actiongroups.go index 164917c42245..17e732325422 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/actiongroups.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/actiongroups.go @@ -36,7 +36,8 @@ func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/activitylogalerts.go b/services/preview/monitor/mgmt/2018-09-01/insights/activitylogalerts.go index ed927c20655a..8891636d5999 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/activitylogalerts.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/activitylogalerts.go @@ -36,7 +36,9 @@ func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/activitylogs.go b/services/preview/monitor/mgmt/2018-09-01/insights/activitylogs.go index 60e31eca2b5f..4a718e198be4 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/activitylogs.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/activitylogs.go @@ -35,7 +35,8 @@ func NewActivityLogsClient(subscriptionID string) ActivityLogsClient { return NewActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client. +// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogsClient { return ActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/alertruleincidents.go b/services/preview/monitor/mgmt/2018-09-01/insights/alertruleincidents.go index 86569442a225..d9d812d63ab8 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/alertruleincidents.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/alertruleincidents.go @@ -35,7 +35,9 @@ func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/alertrules.go b/services/preview/monitor/mgmt/2018-09-01/insights/alertrules.go index 34239f106a8c..d89526ced89b 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/alertrules.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/alertrules.go @@ -36,7 +36,8 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/autoscalesettings.go b/services/preview/monitor/mgmt/2018-09-01/insights/autoscalesettings.go index 450ade011189..69cfd54401c0 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/autoscalesettings.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/autoscalesettings.go @@ -36,7 +36,9 @@ func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/client.go b/services/preview/monitor/mgmt/2018-09-01/insights/client.go index 5ed388022a2b..557e8413f017 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/client.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettings.go b/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettings.go index 3b607d4d8196..5599aefcdd58 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettings.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettings.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettingscategory.go b/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettingscategory.go index 587b7f562de5..aeb000ac4ea7 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettingscategory.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/diagnosticsettingscategory.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettin return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/eventcategories.go b/services/preview/monitor/mgmt/2018-09-01/insights/eventcategories.go index b09fb63c6881..08f817f0be47 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/eventcategories.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/eventcategories.go @@ -35,7 +35,8 @@ func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient { return NewEventCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client. +// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient { return EventCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/insightsapi/interfaces.go b/services/preview/monitor/mgmt/2018-09-01/insights/insightsapi/interfaces.go index d0bcf25316a5..e7950462b41e 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/insightsapi/interfaces.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/insightsapi/interfaces.go @@ -29,7 +29,9 @@ type AutoscaleSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result insights.AutoscaleSettingResource, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource insights.AutoscaleSettingResourcePatch) (result insights.AutoscaleSettingResource, err error) } @@ -119,6 +121,7 @@ var _ ActivityLogAlertsClientAPI = (*insights.ActivityLogAlertsClient)(nil) // ActivityLogsClientAPI contains the set of methods on the ActivityLogsClient type. type ActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ ActivityLogsClientAPI = (*insights.ActivityLogsClient)(nil) @@ -133,6 +136,7 @@ var _ EventCategoriesClientAPI = (*insights.EventCategoriesClient)(nil) // TenantActivityLogsClientAPI contains the set of methods on the TenantActivityLogsClient type. type TenantActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ TenantActivityLogsClientAPI = (*insights.TenantActivityLogsClient)(nil) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go index e96cea0a6184..63daa54e523d 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go @@ -36,7 +36,8 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricalerts.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricalerts.go index 055a96e3ed3c..9a6b30edee6b 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricalerts.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricalerts.go @@ -36,7 +36,8 @@ func NewMetricAlertsClient(subscriptionID string) MetricAlertsClient { return NewMetricAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client. +// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricAlertsClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsClient { return MetricAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricalertsstatus.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricalertsstatus.go index 04617c643555..6e047493d7f5 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricalertsstatus.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricalertsstatus.go @@ -35,7 +35,9 @@ func NewMetricAlertsStatusClient(subscriptionID string) MetricAlertsStatusClient return NewMetricAlertsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client. +// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricAlertsStatusClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsStatusClient { return MetricAlertsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricbaseline.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricbaseline.go index d12bd9d4f2b6..6c7043b044cc 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricbaseline.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricbaseline.go @@ -36,7 +36,8 @@ func NewMetricBaselineClient(subscriptionID string) MetricBaselineClient { return NewMetricBaselineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client. +// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) MetricBaselineClient { return MetricBaselineClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricdefinitions.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricdefinitions.go index 29a5bbee5319..56bed9528859 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricdefinitions.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricdefinitions.go @@ -35,7 +35,9 @@ func NewMetricDefinitionsClient(subscriptionID string) MetricDefinitionsClient { return NewMetricDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client. +// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) MetricDefinitionsClient { return MetricDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metricnamespaces.go b/services/preview/monitor/mgmt/2018-09-01/insights/metricnamespaces.go index 5ff2cdaa2de7..ef9ae2860089 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metricnamespaces.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metricnamespaces.go @@ -35,7 +35,9 @@ func NewMetricNamespacesClient(subscriptionID string) MetricNamespacesClient { return NewMetricNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client. +// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricNamespacesClientWithBaseURI(baseURI string, subscriptionID string) MetricNamespacesClient { return MetricNamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/metrics.go b/services/preview/monitor/mgmt/2018-09-01/insights/metrics.go index f1952a3fe2a9..24cd091db554 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/metrics.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/metrics.go @@ -35,7 +35,8 @@ func NewMetricsClient(subscriptionID string) MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/models.go b/services/preview/monitor/mgmt/2018-09-01/insights/models.go index bb92673e7e68..6ecfff4ffe67 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/models.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/models.go @@ -3322,8 +3322,8 @@ type Metric struct { type MetricAlertAction struct { // ActionGroupID - the id of the action group to use. ActionGroupID *string `json:"actionGroupId,omitempty"` - // WebhookProperties - The properties of a webhook object. - WebhookProperties map[string]*string `json:"webhookProperties"` + // WebHookProperties - The properties of a webhook object. + WebHookProperties map[string]*string `json:"webHookProperties"` } // MarshalJSON is the custom marshaler for MetricAlertAction. @@ -3332,8 +3332,8 @@ func (maa MetricAlertAction) MarshalJSON() ([]byte, error) { if maa.ActionGroupID != nil { objectMap["actionGroupId"] = maa.ActionGroupID } - if maa.WebhookProperties != nil { - objectMap["webhookProperties"] = maa.WebhookProperties + if maa.WebHookProperties != nil { + objectMap["webHookProperties"] = maa.WebHookProperties } return json.Marshal(objectMap) } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/operations.go b/services/preview/monitor/mgmt/2018-09-01/insights/operations.go index bd8af5c238d4..e36f3626e966 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/operations.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/scheduledqueryrules.go b/services/preview/monitor/mgmt/2018-09-01/insights/scheduledqueryrules.go index b4bb9bca5ddc..44021c67ca5e 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/scheduledqueryrules.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/scheduledqueryrules.go @@ -36,7 +36,9 @@ func NewScheduledQueryRulesClient(subscriptionID string) ScheduledQueryRulesClie return NewScheduledQueryRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client. +// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewScheduledQueryRulesClientWithBaseURI(baseURI string, subscriptionID string) ScheduledQueryRulesClient { return ScheduledQueryRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/tenantactivitylogs.go b/services/preview/monitor/mgmt/2018-09-01/insights/tenantactivitylogs.go index 23739ed5d286..5d6cbb12c013 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/tenantactivitylogs.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/tenantactivitylogs.go @@ -35,7 +35,9 @@ func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient return NewTenantActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client. +// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient { return TenantActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/actiongroups.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/actiongroups.go index 164917c42245..17e732325422 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/actiongroups.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/actiongroups.go @@ -36,7 +36,8 @@ func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogalerts.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogalerts.go index ed927c20655a..8891636d5999 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogalerts.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogalerts.go @@ -36,7 +36,9 @@ func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go index 60e31eca2b5f..4a718e198be4 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/activitylogs.go @@ -35,7 +35,8 @@ func NewActivityLogsClient(subscriptionID string) ActivityLogsClient { return NewActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client. +// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogsClient { return ActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertruleincidents.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertruleincidents.go index 86569442a225..d9d812d63ab8 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertruleincidents.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertruleincidents.go @@ -35,7 +35,9 @@ func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertrules.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertrules.go index 34239f106a8c..d89526ced89b 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertrules.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/alertrules.go @@ -36,7 +36,8 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/autoscalesettings.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/autoscalesettings.go index 450ade011189..69cfd54401c0 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/autoscalesettings.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/autoscalesettings.go @@ -36,7 +36,9 @@ func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/client.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/client.go index 5ed388022a2b..557e8413f017 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/client.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettings.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettings.go index 3b607d4d8196..5599aefcdd58 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettings.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettings.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettingscategory.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettingscategory.go index 587b7f562de5..aeb000ac4ea7 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettingscategory.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/diagnosticsettingscategory.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettin return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/eventcategories.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/eventcategories.go index b09fb63c6881..08f817f0be47 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/eventcategories.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/eventcategories.go @@ -35,7 +35,8 @@ func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient { return NewEventCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client. +// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient { return EventCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/insightsapi/interfaces.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/insightsapi/interfaces.go index b7de393f7130..e06564d2b4aa 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/insightsapi/interfaces.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/insightsapi/interfaces.go @@ -29,7 +29,9 @@ type AutoscaleSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result insights.AutoscaleSettingResource, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource insights.AutoscaleSettingResourcePatch) (result insights.AutoscaleSettingResource, err error) } @@ -119,6 +121,7 @@ var _ ActivityLogAlertsClientAPI = (*insights.ActivityLogAlertsClient)(nil) // ActivityLogsClientAPI contains the set of methods on the ActivityLogsClient type. type ActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ ActivityLogsClientAPI = (*insights.ActivityLogsClient)(nil) @@ -133,6 +136,7 @@ var _ EventCategoriesClientAPI = (*insights.EventCategoriesClient)(nil) // TenantActivityLogsClientAPI contains the set of methods on the TenantActivityLogsClient type. type TenantActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ TenantActivityLogsClientAPI = (*insights.TenantActivityLogsClient)(nil) diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go index e96cea0a6184..63daa54e523d 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go @@ -36,7 +36,8 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalerts.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalerts.go index 055a96e3ed3c..9a6b30edee6b 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalerts.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalerts.go @@ -36,7 +36,8 @@ func NewMetricAlertsClient(subscriptionID string) MetricAlertsClient { return NewMetricAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client. +// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricAlertsClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsClient { return MetricAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalertsstatus.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalertsstatus.go index 04617c643555..6e047493d7f5 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalertsstatus.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricalertsstatus.go @@ -35,7 +35,9 @@ func NewMetricAlertsStatusClient(subscriptionID string) MetricAlertsStatusClient return NewMetricAlertsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client. +// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricAlertsStatusClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsStatusClient { return MetricAlertsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricbaseline.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricbaseline.go index d12bd9d4f2b6..6c7043b044cc 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricbaseline.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricbaseline.go @@ -36,7 +36,8 @@ func NewMetricBaselineClient(subscriptionID string) MetricBaselineClient { return NewMetricBaselineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client. +// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) MetricBaselineClient { return MetricBaselineClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricdefinitions.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricdefinitions.go index 29a5bbee5319..56bed9528859 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricdefinitions.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricdefinitions.go @@ -35,7 +35,9 @@ func NewMetricDefinitionsClient(subscriptionID string) MetricDefinitionsClient { return NewMetricDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client. +// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) MetricDefinitionsClient { return MetricDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricnamespaces.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricnamespaces.go index 5ff2cdaa2de7..ef9ae2860089 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricnamespaces.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metricnamespaces.go @@ -35,7 +35,9 @@ func NewMetricNamespacesClient(subscriptionID string) MetricNamespacesClient { return NewMetricNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client. +// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricNamespacesClientWithBaseURI(baseURI string, subscriptionID string) MetricNamespacesClient { return MetricNamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metrics.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metrics.go index f1952a3fe2a9..24cd091db554 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/metrics.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/metrics.go @@ -35,7 +35,8 @@ func NewMetricsClient(subscriptionID string) MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/models.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/models.go index 98a3ae9901d6..309633fdb9a7 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/models.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/models.go @@ -3368,8 +3368,8 @@ type Metric struct { type MetricAlertAction struct { // ActionGroupID - the id of the action group to use. ActionGroupID *string `json:"actionGroupId,omitempty"` - // WebhookProperties - The properties of a webhook object. - WebhookProperties map[string]*string `json:"webhookProperties"` + // WebHookProperties - The properties of a webhook object. + WebHookProperties map[string]*string `json:"webHookProperties"` } // MarshalJSON is the custom marshaler for MetricAlertAction. @@ -3378,8 +3378,8 @@ func (maa MetricAlertAction) MarshalJSON() ([]byte, error) { if maa.ActionGroupID != nil { objectMap["actionGroupId"] = maa.ActionGroupID } - if maa.WebhookProperties != nil { - objectMap["webhookProperties"] = maa.WebhookProperties + if maa.WebHookProperties != nil { + objectMap["webHookProperties"] = maa.WebHookProperties } return json.Marshal(objectMap) } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/operations.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/operations.go index bd8af5c238d4..e36f3626e966 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/operations.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/scheduledqueryrules.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/scheduledqueryrules.go index b4bb9bca5ddc..44021c67ca5e 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/scheduledqueryrules.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/scheduledqueryrules.go @@ -36,7 +36,9 @@ func NewScheduledQueryRulesClient(subscriptionID string) ScheduledQueryRulesClie return NewScheduledQueryRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client. +// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewScheduledQueryRulesClientWithBaseURI(baseURI string, subscriptionID string) ScheduledQueryRulesClient { return ScheduledQueryRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/tenantactivitylogs.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/tenantactivitylogs.go index 23739ed5d286..5d6cbb12c013 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/tenantactivitylogs.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/tenantactivitylogs.go @@ -35,7 +35,9 @@ func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient return NewTenantActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client. +// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient { return TenantActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/vminsights.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/vminsights.go index 76178c59cd2c..b5a7d005f444 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/vminsights.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/vminsights.go @@ -35,7 +35,8 @@ func NewVMInsightsClient(subscriptionID string) VMInsightsClient { return NewVMInsightsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client. +// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVMInsightsClientWithBaseURI(baseURI string, subscriptionID string) VMInsightsClient { return VMInsightsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/actiongroups.go b/services/preview/monitor/mgmt/2019-03-01/insights/actiongroups.go index 9d55e7ab3aa3..1227a145b15c 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/actiongroups.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/actiongroups.go @@ -36,7 +36,8 @@ func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/activitylogalerts.go b/services/preview/monitor/mgmt/2019-03-01/insights/activitylogalerts.go index ed927c20655a..8891636d5999 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/activitylogalerts.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/activitylogalerts.go @@ -36,7 +36,9 @@ func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/activitylogs.go b/services/preview/monitor/mgmt/2019-03-01/insights/activitylogs.go index 60e31eca2b5f..4a718e198be4 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/activitylogs.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/activitylogs.go @@ -35,7 +35,8 @@ func NewActivityLogsClient(subscriptionID string) ActivityLogsClient { return NewActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client. +// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogsClient { return ActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/alertruleincidents.go b/services/preview/monitor/mgmt/2019-03-01/insights/alertruleincidents.go index 86569442a225..d9d812d63ab8 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/alertruleincidents.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/alertruleincidents.go @@ -35,7 +35,9 @@ func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/alertrules.go b/services/preview/monitor/mgmt/2019-03-01/insights/alertrules.go index 34239f106a8c..d89526ced89b 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/alertrules.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/alertrules.go @@ -36,7 +36,8 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/autoscalesettings.go b/services/preview/monitor/mgmt/2019-03-01/insights/autoscalesettings.go index 450ade011189..69cfd54401c0 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/autoscalesettings.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/autoscalesettings.go @@ -36,7 +36,9 @@ func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/baselines.go b/services/preview/monitor/mgmt/2019-03-01/insights/baselines.go index 990d564d1c75..a225d02da2b7 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/baselines.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/baselines.go @@ -35,7 +35,8 @@ func NewBaselinesClient(subscriptionID string) BaselinesClient { return NewBaselinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client. +// NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBaselinesClientWithBaseURI(baseURI string, subscriptionID string) BaselinesClient { return BaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/client.go b/services/preview/monitor/mgmt/2019-03-01/insights/client.go index 5ed388022a2b..557e8413f017 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/client.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/diagnosticsettings.go b/services/preview/monitor/mgmt/2019-03-01/insights/diagnosticsettings.go index 3b607d4d8196..5599aefcdd58 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/diagnosticsettings.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/diagnosticsettings.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/diagnosticsettingscategory.go b/services/preview/monitor/mgmt/2019-03-01/insights/diagnosticsettingscategory.go index 587b7f562de5..aeb000ac4ea7 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/diagnosticsettingscategory.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/diagnosticsettingscategory.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettin return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/eventcategories.go b/services/preview/monitor/mgmt/2019-03-01/insights/eventcategories.go index b09fb63c6881..08f817f0be47 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/eventcategories.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/eventcategories.go @@ -35,7 +35,8 @@ func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient { return NewEventCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client. +// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient { return EventCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/insightsapi/interfaces.go b/services/preview/monitor/mgmt/2019-03-01/insights/insightsapi/interfaces.go index b0adc56c1d81..6e97f399cf8f 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/insightsapi/interfaces.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/insightsapi/interfaces.go @@ -29,7 +29,9 @@ type AutoscaleSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result insights.AutoscaleSettingResource, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource insights.AutoscaleSettingResourcePatch) (result insights.AutoscaleSettingResource, err error) } @@ -119,6 +121,7 @@ var _ ActivityLogAlertsClientAPI = (*insights.ActivityLogAlertsClient)(nil) // ActivityLogsClientAPI contains the set of methods on the ActivityLogsClient type. type ActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ ActivityLogsClientAPI = (*insights.ActivityLogsClient)(nil) @@ -133,6 +136,7 @@ var _ EventCategoriesClientAPI = (*insights.EventCategoriesClient)(nil) // TenantActivityLogsClientAPI contains the set of methods on the TenantActivityLogsClient type. type TenantActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ TenantActivityLogsClientAPI = (*insights.TenantActivityLogsClient)(nil) diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2019-03-01/insights/logprofiles.go index e96cea0a6184..63daa54e523d 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/logprofiles.go @@ -36,7 +36,8 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/metricalerts.go b/services/preview/monitor/mgmt/2019-03-01/insights/metricalerts.go index 055a96e3ed3c..9a6b30edee6b 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/metricalerts.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/metricalerts.go @@ -36,7 +36,8 @@ func NewMetricAlertsClient(subscriptionID string) MetricAlertsClient { return NewMetricAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client. +// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricAlertsClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsClient { return MetricAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/metricalertsstatus.go b/services/preview/monitor/mgmt/2019-03-01/insights/metricalertsstatus.go index 04617c643555..6e047493d7f5 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/metricalertsstatus.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/metricalertsstatus.go @@ -35,7 +35,9 @@ func NewMetricAlertsStatusClient(subscriptionID string) MetricAlertsStatusClient return NewMetricAlertsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client. +// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricAlertsStatusClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsStatusClient { return MetricAlertsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/metricbaseline.go b/services/preview/monitor/mgmt/2019-03-01/insights/metricbaseline.go index d12bd9d4f2b6..6c7043b044cc 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/metricbaseline.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/metricbaseline.go @@ -36,7 +36,8 @@ func NewMetricBaselineClient(subscriptionID string) MetricBaselineClient { return NewMetricBaselineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client. +// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) MetricBaselineClient { return MetricBaselineClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/metricdefinitions.go b/services/preview/monitor/mgmt/2019-03-01/insights/metricdefinitions.go index 29a5bbee5319..56bed9528859 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/metricdefinitions.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/metricdefinitions.go @@ -35,7 +35,9 @@ func NewMetricDefinitionsClient(subscriptionID string) MetricDefinitionsClient { return NewMetricDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client. +// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) MetricDefinitionsClient { return MetricDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/metricnamespaces.go b/services/preview/monitor/mgmt/2019-03-01/insights/metricnamespaces.go index 5ff2cdaa2de7..ef9ae2860089 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/metricnamespaces.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/metricnamespaces.go @@ -35,7 +35,9 @@ func NewMetricNamespacesClient(subscriptionID string) MetricNamespacesClient { return NewMetricNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client. +// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricNamespacesClientWithBaseURI(baseURI string, subscriptionID string) MetricNamespacesClient { return MetricNamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/metrics.go b/services/preview/monitor/mgmt/2019-03-01/insights/metrics.go index f1952a3fe2a9..24cd091db554 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/metrics.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/metrics.go @@ -35,7 +35,8 @@ func NewMetricsClient(subscriptionID string) MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/models.go b/services/preview/monitor/mgmt/2019-03-01/insights/models.go index d4c1971fd379..b56931f5fe7b 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/models.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/models.go @@ -3403,8 +3403,8 @@ type Metric struct { type MetricAlertAction struct { // ActionGroupID - the id of the action group to use. ActionGroupID *string `json:"actionGroupId,omitempty"` - // WebhookProperties - The properties of a webhook object. - WebhookProperties map[string]*string `json:"webhookProperties"` + // WebHookProperties - The properties of a webhook object. + WebHookProperties map[string]*string `json:"webHookProperties"` } // MarshalJSON is the custom marshaler for MetricAlertAction. @@ -3413,8 +3413,8 @@ func (maa MetricAlertAction) MarshalJSON() ([]byte, error) { if maa.ActionGroupID != nil { objectMap["actionGroupId"] = maa.ActionGroupID } - if maa.WebhookProperties != nil { - objectMap["webhookProperties"] = maa.WebhookProperties + if maa.WebHookProperties != nil { + objectMap["webHookProperties"] = maa.WebHookProperties } return json.Marshal(objectMap) } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/operations.go b/services/preview/monitor/mgmt/2019-03-01/insights/operations.go index bd8af5c238d4..e36f3626e966 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/operations.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/scheduledqueryrules.go b/services/preview/monitor/mgmt/2019-03-01/insights/scheduledqueryrules.go index b4bb9bca5ddc..44021c67ca5e 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/scheduledqueryrules.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/scheduledqueryrules.go @@ -36,7 +36,9 @@ func NewScheduledQueryRulesClient(subscriptionID string) ScheduledQueryRulesClie return NewScheduledQueryRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client. +// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewScheduledQueryRulesClientWithBaseURI(baseURI string, subscriptionID string) ScheduledQueryRulesClient { return ScheduledQueryRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/tenantactivitylogs.go b/services/preview/monitor/mgmt/2019-03-01/insights/tenantactivitylogs.go index 23739ed5d286..5d6cbb12c013 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/tenantactivitylogs.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/tenantactivitylogs.go @@ -35,7 +35,9 @@ func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient return NewTenantActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client. +// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient { return TenantActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/vminsights.go b/services/preview/monitor/mgmt/2019-03-01/insights/vminsights.go index 76178c59cd2c..b5a7d005f444 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/vminsights.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/vminsights.go @@ -35,7 +35,8 @@ func NewVMInsightsClient(subscriptionID string) VMInsightsClient { return NewVMInsightsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client. +// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVMInsightsClientWithBaseURI(baseURI string, subscriptionID string) VMInsightsClient { return VMInsightsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go b/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go index d7d55d29ad49..3f06b8307ec7 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go @@ -36,7 +36,8 @@ func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go b/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go index ed927c20655a..8891636d5999 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go @@ -36,7 +36,9 @@ func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go b/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go index 60e31eca2b5f..4a718e198be4 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go @@ -35,7 +35,8 @@ func NewActivityLogsClient(subscriptionID string) ActivityLogsClient { return NewActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client. +// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogsClient { return ActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go b/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go index 86569442a225..d9d812d63ab8 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go @@ -35,7 +35,9 @@ func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go b/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go index 34239f106a8c..d89526ced89b 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go @@ -36,7 +36,8 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go b/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go index 450ade011189..69cfd54401c0 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go @@ -36,7 +36,9 @@ func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go b/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go index 990d564d1c75..a225d02da2b7 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go @@ -35,7 +35,8 @@ func NewBaselinesClient(subscriptionID string) BaselinesClient { return NewBaselinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client. +// NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBaselinesClientWithBaseURI(baseURI string, subscriptionID string) BaselinesClient { return BaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/client.go b/services/preview/monitor/mgmt/2019-06-01/insights/client.go index 5ed388022a2b..557e8413f017 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/client.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go b/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go index 3b607d4d8196..5599aefcdd58 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go b/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go index 587b7f562de5..aeb000ac4ea7 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettin return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go b/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go index b09fb63c6881..08f817f0be47 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go @@ -35,7 +35,8 @@ func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient { return NewEventCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client. +// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient { return EventCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/insightsapi/interfaces.go b/services/preview/monitor/mgmt/2019-06-01/insights/insightsapi/interfaces.go index 25badb89990d..3f6e30c72fd0 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/insightsapi/interfaces.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/insightsapi/interfaces.go @@ -29,7 +29,9 @@ type AutoscaleSettingsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result insights.AutoscaleSettingResource, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result insights.AutoscaleSettingResourceCollectionIterator, err error) ListBySubscription(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result insights.AutoscaleSettingResourceCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource insights.AutoscaleSettingResourcePatch) (result insights.AutoscaleSettingResource, err error) } @@ -119,6 +121,7 @@ var _ ActivityLogAlertsClientAPI = (*insights.ActivityLogAlertsClient)(nil) // ActivityLogsClientAPI contains the set of methods on the ActivityLogsClient type. type ActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ ActivityLogsClientAPI = (*insights.ActivityLogsClient)(nil) @@ -133,6 +136,7 @@ var _ EventCategoriesClientAPI = (*insights.EventCategoriesClient)(nil) // TenantActivityLogsClientAPI contains the set of methods on the TenantActivityLogsClient type. type TenantActivityLogsClientAPI interface { List(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string) (result insights.EventDataCollectionIterator, err error) } var _ TenantActivityLogsClientAPI = (*insights.TenantActivityLogsClient)(nil) diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go index e96cea0a6184..63daa54e523d 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go @@ -36,7 +36,8 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go b/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go index 055a96e3ed3c..9a6b30edee6b 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go @@ -36,7 +36,8 @@ func NewMetricAlertsClient(subscriptionID string) MetricAlertsClient { return NewMetricAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client. +// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricAlertsClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsClient { return MetricAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go b/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go index 04617c643555..6e047493d7f5 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go @@ -35,7 +35,9 @@ func NewMetricAlertsStatusClient(subscriptionID string) MetricAlertsStatusClient return NewMetricAlertsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client. +// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricAlertsStatusClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsStatusClient { return MetricAlertsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go b/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go index d12bd9d4f2b6..6c7043b044cc 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go @@ -36,7 +36,8 @@ func NewMetricBaselineClient(subscriptionID string) MetricBaselineClient { return NewMetricBaselineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client. +// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) MetricBaselineClient { return MetricBaselineClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go b/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go index 29a5bbee5319..56bed9528859 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go @@ -35,7 +35,9 @@ func NewMetricDefinitionsClient(subscriptionID string) MetricDefinitionsClient { return NewMetricDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client. +// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) MetricDefinitionsClient { return MetricDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go b/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go index 5ff2cdaa2de7..ef9ae2860089 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go @@ -35,7 +35,9 @@ func NewMetricNamespacesClient(subscriptionID string) MetricNamespacesClient { return NewMetricNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client. +// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricNamespacesClientWithBaseURI(baseURI string, subscriptionID string) MetricNamespacesClient { return MetricNamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go b/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go index f1952a3fe2a9..24cd091db554 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go @@ -35,7 +35,8 @@ func NewMetricsClient(subscriptionID string) MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/models.go b/services/preview/monitor/mgmt/2019-06-01/insights/models.go index effcd2f083eb..072db4706acf 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/models.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/models.go @@ -3403,8 +3403,8 @@ type Metric struct { type MetricAlertAction struct { // ActionGroupID - the id of the action group to use. ActionGroupID *string `json:"actionGroupId,omitempty"` - // WebhookProperties - The properties of a webhook object. - WebhookProperties map[string]*string `json:"webhookProperties"` + // WebHookProperties - The properties of a webhook object. + WebHookProperties map[string]*string `json:"webHookProperties"` } // MarshalJSON is the custom marshaler for MetricAlertAction. @@ -3413,8 +3413,8 @@ func (maa MetricAlertAction) MarshalJSON() ([]byte, error) { if maa.ActionGroupID != nil { objectMap["actionGroupId"] = maa.ActionGroupID } - if maa.WebhookProperties != nil { - objectMap["webhookProperties"] = maa.WebhookProperties + if maa.WebHookProperties != nil { + objectMap["webHookProperties"] = maa.WebHookProperties } return json.Marshal(objectMap) } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/operations.go b/services/preview/monitor/mgmt/2019-06-01/insights/operations.go index bd8af5c238d4..e36f3626e966 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/operations.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go b/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go index b4bb9bca5ddc..44021c67ca5e 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go @@ -36,7 +36,9 @@ func NewScheduledQueryRulesClient(subscriptionID string) ScheduledQueryRulesClie return NewScheduledQueryRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client. +// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewScheduledQueryRulesClientWithBaseURI(baseURI string, subscriptionID string) ScheduledQueryRulesClient { return ScheduledQueryRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go b/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go index 23739ed5d286..5d6cbb12c013 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go @@ -35,7 +35,9 @@ func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient return NewTenantActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client. +// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient { return TenantActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go b/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go index 76178c59cd2c..b5a7d005f444 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go @@ -35,7 +35,8 @@ func NewVMInsightsClient(subscriptionID string) VMInsightsClient { return NewVMInsightsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client. +// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVMInsightsClientWithBaseURI(baseURI string, subscriptionID string) VMInsightsClient { return VMInsightsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/msi/mgmt/2015-08-31-preview/msi/client.go b/services/preview/msi/mgmt/2015-08-31-preview/msi/client.go index a4e7c71d55b9..7abbf44fad96 100644 --- a/services/preview/msi/mgmt/2015-08-31-preview/msi/client.go +++ b/services/preview/msi/mgmt/2015-08-31-preview/msi/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/msi/mgmt/2015-08-31-preview/msi/msiapi/interfaces.go b/services/preview/msi/mgmt/2015-08-31-preview/msi/msiapi/interfaces.go index bdbaabcdf0e8..855d26fd9cac 100644 --- a/services/preview/msi/mgmt/2015-08-31-preview/msi/msiapi/interfaces.go +++ b/services/preview/msi/mgmt/2015-08-31-preview/msi/msiapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result msi.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result msi.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*msi.OperationsClient)(nil) @@ -36,7 +37,9 @@ type UserAssignedIdentitiesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result msi.Identity, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result msi.UserAssignedIdentitiesListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result msi.UserAssignedIdentitiesListResultIterator, err error) ListBySubscription(ctx context.Context) (result msi.UserAssignedIdentitiesListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result msi.UserAssignedIdentitiesListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters msi.Identity) (result msi.Identity, err error) } diff --git a/services/preview/msi/mgmt/2015-08-31-preview/msi/operations.go b/services/preview/msi/mgmt/2015-08-31-preview/msi/operations.go index 5d3c84727dc1..c4a4e64805ea 100644 --- a/services/preview/msi/mgmt/2015-08-31-preview/msi/operations.go +++ b/services/preview/msi/mgmt/2015-08-31-preview/msi/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/msi/mgmt/2015-08-31-preview/msi/userassignedidentities.go b/services/preview/msi/mgmt/2015-08-31-preview/msi/userassignedidentities.go index 482e363909a3..7a10c8cd0410 100644 --- a/services/preview/msi/mgmt/2015-08-31-preview/msi/userassignedidentities.go +++ b/services/preview/msi/mgmt/2015-08-31-preview/msi/userassignedidentities.go @@ -35,7 +35,9 @@ func NewUserAssignedIdentitiesClient(subscriptionID string) UserAssignedIdentiti return NewUserAssignedIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserAssignedIdentitiesClientWithBaseURI creates an instance of the UserAssignedIdentitiesClient client. +// NewUserAssignedIdentitiesClientWithBaseURI creates an instance of the UserAssignedIdentitiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewUserAssignedIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) UserAssignedIdentitiesClient { return UserAssignedIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/checknameavailability.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/checknameavailability.go index d2930285756a..a46f6ca4d53c 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/checknameavailability.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/checknameavailability.go @@ -38,7 +38,9 @@ func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailability return NewCheckNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client. +// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckNameAvailabilityClient { return CheckNameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/client.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/client.go index 652ee75e725f..7b71ac000a6a 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/client.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/configurations.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/configurations.go index 467564c948ab..59bf2b8c6f2f 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/configurations.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/configurations.go @@ -37,7 +37,8 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/databases.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/databases.go index 0954e0e549f8..3a92edb59bde 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/databases.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/databases.go @@ -37,7 +37,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/firewallrules.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/firewallrules.go index 0d114341180d..6dff14499e52 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/firewallrules.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/firewallrules.go @@ -38,7 +38,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/locationbasedperformancetier.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/locationbasedperformancetier.go index d6b8eeca889b..d30c2468757a 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/locationbasedperformancetier.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/locationbasedperformancetier.go @@ -38,7 +38,8 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string) LocationBasedP } // NewLocationBasedPerformanceTierClientWithBaseURI creates an instance of the LocationBasedPerformanceTierClient -// 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 NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedPerformanceTierClient { return LocationBasedPerformanceTierClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/logfiles.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/logfiles.go index 43e96e2bbcd2..1b8ab43b790e 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/logfiles.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/logfiles.go @@ -37,7 +37,8 @@ func NewLogFilesClient(subscriptionID string) LogFilesClient { return NewLogFilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client. +// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFilesClient { return LogFilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/mysqlapi/interfaces.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/mysqlapi/interfaces.go index 2ad7af82c238..c7391cf045ee 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/mysqlapi/interfaces.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/mysqlapi/interfaces.go @@ -58,6 +58,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result mysql.VirtualNetworkRulesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result mysql.VirtualNetworkRule, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result mysql.VirtualNetworkRuleListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result mysql.VirtualNetworkRuleListResultIterator, err error) } var _ VirtualNetworkRulesClientAPI = (*mysql.VirtualNetworkRulesClient)(nil) diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/operations.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/operations.go index c08542319a79..1d6fb1eed1b5 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/operations.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/replicas.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/replicas.go index a72baef87eba..feb69b2bd66f 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/replicas.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/replicas.go @@ -37,7 +37,8 @@ func NewReplicasClient(subscriptionID string) ReplicasClient { return NewReplicasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client. +// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicasClientWithBaseURI(baseURI string, subscriptionID string) ReplicasClient { return ReplicasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/serveradministrators.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/serveradministrators.go index 890be04cb44c..b87cd383c525 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/serveradministrators.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/serveradministrators.go @@ -38,7 +38,9 @@ func NewServerAdministratorsClient(subscriptionID string) ServerAdministratorsCl return NewServerAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAdministratorsClientWithBaseURI creates an instance of the ServerAdministratorsClient client. +// NewServerAdministratorsClientWithBaseURI creates an instance of the ServerAdministratorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServerAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAdministratorsClient { return ServerAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/servers.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/servers.go index 825447fd9f74..98f2b9294bec 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/servers.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/servers.go @@ -38,7 +38,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/serversecurityalertpolicies.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/serversecurityalertpolicies.go index 30902aeb3e57..ad7cccf940dd 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/serversecurityalertpolicies.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/serversecurityalertpolicies.go @@ -37,7 +37,9 @@ func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityA return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client. +// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/virtualnetworkrules.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/virtualnetworkrules.go index cf7ef65fcbec..3fc4a5912ed4 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/virtualnetworkrules.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/virtualnetworkrules.go @@ -38,7 +38,9 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/accounts.go b/services/preview/netapp/mgmt/2017-08-15/netapp/accounts.go index 0cd8c9306b97..5125d8c8e369 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/accounts.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/client.go b/services/preview/netapp/mgmt/2017-08-15/netapp/client.go index f8f4585cb7d3..dd6c8708c75b 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/client.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/mounttargets.go b/services/preview/netapp/mgmt/2017-08-15/netapp/mounttargets.go index 98799ffb601c..6ba4a9f1e3bf 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/mounttargets.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/mounttargets.go @@ -36,7 +36,8 @@ func NewMountTargetsClient(subscriptionID string) MountTargetsClient { return NewMountTargetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client. +// NewMountTargetsClientWithBaseURI creates an instance of the MountTargetsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMountTargetsClientWithBaseURI(baseURI string, subscriptionID string) MountTargetsClient { return MountTargetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/operations.go b/services/preview/netapp/mgmt/2017-08-15/netapp/operations.go index 942d8774f4dd..6ba62976aad2 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/operations.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/pools.go b/services/preview/netapp/mgmt/2017-08-15/netapp/pools.go index 952b2983f795..6e6a1746851f 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/pools.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/pools.go @@ -36,7 +36,8 @@ func NewPoolsClient(subscriptionID string) PoolsClient { return NewPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoolsClientWithBaseURI creates an instance of the PoolsClient client. +// 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)} } diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/snapshots.go b/services/preview/netapp/mgmt/2017-08-15/netapp/snapshots.go index f56cf55d231e..ba7f61e10523 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/snapshots.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// 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)} } diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/volumes.go b/services/preview/netapp/mgmt/2017-08-15/netapp/volumes.go index bf7da3deecd4..0ae28e9e255e 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/volumes.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/volumes.go @@ -36,7 +36,8 @@ func NewVolumesClient(subscriptionID string) VolumesClient { return NewVolumesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumesClientWithBaseURI creates an instance of the VolumesClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/applicationgateways.go b/services/preview/network/mgmt/2015-05-01-preview/network/applicationgateways.go index 84c22282b69b..526ae1267243 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/applicationgateways.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/applicationgateways.go @@ -35,7 +35,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/client.go b/services/preview/network/mgmt/2015-05-01-preview/network/client.go index 20af43481527..2aef67ee7ab7 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/client.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitauthorizations.go b/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitauthorizations.go index 3f85dd5fecb5..5fe0164d59aa 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitauthorizations.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitpeerings.go b/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitpeerings.go index a56eaa0a8079..32309fb78810 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitpeerings.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuitpeerings.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuits.go b/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuits.go index 1390c6e49a66..ba91ce77d4fc 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuits.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/expressrouteserviceproviders.go b/services/preview/network/mgmt/2015-05-01-preview/network/expressrouteserviceproviders.go index 8511097e31c9..73621e4c7eee 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/expressrouteserviceproviders.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/interfacesgroup.go b/services/preview/network/mgmt/2015-05-01-preview/network/interfacesgroup.go index f0d13bd6ec41..ef279d9828b9 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/interfacesgroup.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/loadbalancers.go b/services/preview/network/mgmt/2015-05-01-preview/network/loadbalancers.go index 57fa914492d2..8a5d94161482 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/loadbalancers.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/localnetworkgateways.go b/services/preview/network/mgmt/2015-05-01-preview/network/localnetworkgateways.go index 2582ea2940ed..73979e893050 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/localnetworkgateways.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/localnetworkgateways.go @@ -35,7 +35,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/networkapi/interfaces.go b/services/preview/network/mgmt/2015-05-01-preview/network/networkapi/interfaces.go index 6a9f2bf5a66b..b398b462836b 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/networkapi/interfaces.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/networkapi/interfaces.go @@ -35,7 +35,9 @@ type ApplicationGatewaysClientAPI interface { 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) 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) 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) } @@ -48,10 +50,15 @@ type ExpressRouteCircuitsClientAPI interface { 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) 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) (result network.ExpressRouteCircuitsArpTableListResultPage, err error) + ListArpTableComplete(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsArpTableListResultIterator, err error) ListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsRoutesTableListResultPage, err error) + ListRoutesTableComplete(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsRoutesTableListResultIterator, err error) ListStats(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsStatsListResultPage, err error) + ListStatsComplete(ctx context.Context, resourceGroupName string, circuitName string) (result network.ExpressRouteCircuitsStatsListResultIterator, err error) } var _ ExpressRouteCircuitsClientAPI = (*network.ExpressRouteCircuitsClient)(nil) @@ -59,6 +66,7 @@ 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) @@ -69,6 +77,7 @@ type ExpressRouteCircuitPeeringsClientAPI interface { 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) @@ -79,7 +88,9 @@ type LoadBalancersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result network.LoadBalancersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, loadBalancerName 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) } var _ LoadBalancersClientAPI = (*network.LoadBalancersClient)(nil) @@ -90,6 +101,7 @@ type LocalNetworkGatewaysClientAPI interface { 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) } var _ LocalNetworkGatewaysClientAPI = (*network.LocalNetworkGatewaysClient)(nil) @@ -101,9 +113,13 @@ type InterfacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result network.Interface, err error) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName 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) 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) } var _ InterfacesClientAPI = (*network.InterfacesClient)(nil) @@ -114,7 +130,9 @@ type RouteTablesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, routeTableName string) (result network.RouteTablesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, routeTableName 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) } var _ RouteTablesClientAPI = (*network.RouteTablesClient)(nil) @@ -125,7 +143,9 @@ type SecurityGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result network.SecurityGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName 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) } var _ SecurityGroupsClientAPI = (*network.SecurityGroupsClient)(nil) @@ -136,7 +156,9 @@ type PublicIPAddressesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (result network.PublicIPAddressesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, publicIPAddressName 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) } var _ PublicIPAddressesClientAPI = (*network.PublicIPAddressesClient)(nil) @@ -147,6 +169,7 @@ type RoutesClientAPI interface { 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) @@ -157,6 +180,7 @@ type SecurityRulesClientAPI interface { 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) @@ -167,6 +191,7 @@ type ExpressRouteCircuitAuthorizationsClientAPI interface { 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) @@ -177,6 +202,7 @@ type SubnetsClientAPI interface { 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) (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) } var _ SubnetsClientAPI = (*network.SubnetsClient)(nil) @@ -184,6 +210,7 @@ var _ SubnetsClientAPI = (*network.SubnetsClient)(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) @@ -195,6 +222,7 @@ type VirtualNetworkGatewayConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result network.VirtualNetworkGatewayConnection, 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) 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) } @@ -207,6 +235,7 @@ type VirtualNetworkGatewaysClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGatewaysDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result network.VirtualNetworkGateway, err error) List(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result network.VirtualNetworkGatewayListResultIterator, err error) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters network.VirtualNetworkGateway) (result network.VirtualNetworkGatewaysResetFuture, err error) } @@ -218,7 +247,9 @@ type VirtualNetworksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result network.VirtualNetworksDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualNetworkName 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) } var _ VirtualNetworksClientAPI = (*network.VirtualNetworksClient)(nil) diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go b/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go index 5a4830b27511..7a0d3a9782eb 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go @@ -35,7 +35,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/routes.go b/services/preview/network/mgmt/2015-05-01-preview/network/routes.go index 6c4d3ac1a3fe..d870c8f66f0d 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/routes.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/routetables.go b/services/preview/network/mgmt/2015-05-01-preview/network/routetables.go index 9d7b41067f9b..4dea97dd69a8 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/routetables.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/securitygroups.go b/services/preview/network/mgmt/2015-05-01-preview/network/securitygroups.go index 190cf2bb601d..460f52cb5bc8 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/securitygroups.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/securityrules.go b/services/preview/network/mgmt/2015-05-01-preview/network/securityrules.go index 6a40d3025c01..37fe00885603 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/securityrules.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/securityrules.go @@ -36,7 +36,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/subnets.go b/services/preview/network/mgmt/2015-05-01-preview/network/subnets.go index dfea7288df05..924dae2a0987 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/subnets.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/subnets.go @@ -36,7 +36,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/usages.go b/services/preview/network/mgmt/2015-05-01-preview/network/usages.go index 9b0d90a36c7f..a897bcc2a4b3 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/usages.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgatewayconnections.go b/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgatewayconnections.go index 1ed9a4a9b44a..43fee2736be0 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgatewayconnections.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgatewayconnections.go @@ -36,7 +36,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgateways.go b/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgateways.go index 66d5bb1e58f3..ed8718c7dbe2 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgateways.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworkgateways.go @@ -35,7 +35,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// 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)} } diff --git a/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworks.go b/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworks.go index 9a6501b11180..d05fd34e3610 100644 --- a/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworks.go +++ b/services/preview/network/mgmt/2015-05-01-preview/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/client.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/client.go index 2cbc44bf4686..8667a5a68504 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/client.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/client.go @@ -21,7 +21,11 @@ package operationalinsights // Changes may cause incorrect behavior and will be lost if 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 ( @@ -41,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), @@ -49,3 +54,80 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { SubscriptionID: subscriptionID, } } + +// GetAsyncOperationsStatus get the status of an azure asynchronous operation. +// Parameters: +// location - the region name of operation. +// asyncOperationID - the operation Id. +func (client BaseClient) GetAsyncOperationsStatus(ctx context.Context, location string, asyncOperationID string) (result OperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetAsyncOperationsStatus") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetAsyncOperationsStatusPreparer(ctx, location, asyncOperationID) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.BaseClient", "GetAsyncOperationsStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetAsyncOperationsStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.BaseClient", "GetAsyncOperationsStatus", resp, "Failure sending request") + return + } + + result, err = client.GetAsyncOperationsStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.BaseClient", "GetAsyncOperationsStatus", resp, "Failure responding to request") + } + + return +} + +// GetAsyncOperationsStatusPreparer prepares the GetAsyncOperationsStatus request. +func (client BaseClient) GetAsyncOperationsStatusPreparer(ctx context.Context, location string, asyncOperationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "asyncOperationId": autorest.Encode("path", asyncOperationID), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAsyncOperationsStatusSender sends the GetAsyncOperationsStatus request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetAsyncOperationsStatusSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetAsyncOperationsStatusResponder handles the response to the GetAsyncOperationsStatus request. The method always +// closes the http.Response Body. +func (client BaseClient) GetAsyncOperationsStatusResponder(resp *http.Response) (result OperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/datasources.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/datasources.go index 138931189b64..0587e8814ef8 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/datasources.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/datasources.go @@ -36,7 +36,8 @@ func NewDataSourcesClient(subscriptionID string) DataSourcesClient { return NewDataSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataSourcesClientWithBaseURI creates an instance of the DataSourcesClient client. +// NewDataSourcesClientWithBaseURI creates an instance of the DataSourcesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDataSourcesClientWithBaseURI(baseURI string, subscriptionID string) DataSourcesClient { return DataSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/linkedservices.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/linkedservices.go index 256a14d215e8..cec1af699a0c 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/linkedservices.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/linkedservices.go @@ -36,7 +36,8 @@ func NewLinkedServicesClient(subscriptionID string) LinkedServicesClient { return NewLinkedServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedServicesClientWithBaseURI creates an instance of the LinkedServicesClient client. +// NewLinkedServicesClientWithBaseURI creates an instance of the LinkedServicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedServicesClientWithBaseURI(baseURI string, subscriptionID string) LinkedServicesClient { return LinkedServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go index a47383465675..c0739ea4d384 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go @@ -307,6 +307,14 @@ func NewDataSourceListResultPage(getNextPage func(context.Context, DataSourceLis return DataSourceListResultPage{fn: getNextPage} } +// ErrorResponse describes the format of Error response. +type ErrorResponse struct { + // Code - Error code + Code *string `json:"code,omitempty"` + // Message - Error message indicating why the operation failed. + Message *string `json:"message,omitempty"` +} + // IntelligencePack intelligence Pack containing a string name and boolean indicating if it's enabled. type IntelligencePack struct { // Name - The name of the intelligence pack. @@ -654,6 +662,577 @@ func NewOperationListResultPage(getNextPage func(context.Context, OperationListR return OperationListResultPage{fn: getNextPage} } +// OperationStatus the status of operation. +type OperationStatus struct { + autorest.Response `json:"-"` + // ID - The operation Id. + ID *string `json:"id,omitempty"` + // Name - The operation name. + Name *string `json:"name,omitempty"` + // StartTime - The start time of the operation. + StartTime *string `json:"startTime,omitempty"` + // EndTime - The end time of the operation. + EndTime *string `json:"endTime,omitempty"` + // Status - The status of the operation. + Status *string `json:"status,omitempty"` + // Error - The error detail of the operation if any. + Error *ErrorResponse `json:"error,omitempty"` +} + +// PrivateEndpointConnection a private endpoint connection +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Resource properties. + *PrivateEndpointConnectionProperties `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 PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties + } + if pec.Tags != nil { + objectMap["tags"] = pec.Tags + } + 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 + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pec.Tags = tags + } + } + } + + return nil +} + +// PrivateEndpointConnectionListResult a list of private endpoint connections. +type PrivateEndpointConnectionListResult 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(peclr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.peclr) + if err != nil { + return err + } + page.peclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{fn: getNextPage} +} + +// PrivateEndpointConnectionProperties properties of a private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - Private endpoint which the connection belongs to. + PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - Connection state of the private endpoint connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - READ-ONLY; State of the private endpoint connection. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type PrivateEndpointConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) Result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("operationalinsights.PrivateEndpointConnectionsCreateOrUpdateFuture") + 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.CreateOrUpdateResponder(pec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsCreateOrUpdateFuture", "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.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PrivateEndpointConnectionsDeleteFuture) Result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("operationalinsights.PrivateEndpointConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateEndpointProperty private endpoint which the connection belongs to. +type PrivateEndpointProperty struct { + // ID - Resource id of the private endpoint. + ID *string `json:"id,omitempty"` +} + +// PrivateLinkResource a private link resource +type PrivateLinkResource struct { + autorest.Response `json:"-"` + // PrivateLinkResourceProperties - Resource properties. + *PrivateLinkResourceProperties `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 PrivateLinkResource. +func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plr.PrivateLinkResourceProperties != nil { + objectMap["properties"] = plr.PrivateLinkResourceProperties + } + if plr.Tags != nil { + objectMap["tags"] = plr.Tags + } + 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 + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + plr.Tags = tags + } + } + } + + return nil +} + +// 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"` +} + +// 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 +} + +// 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.NextLink == nil || len(to.String(plrlr.NextLink)) < 1 { + 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) + }() + } + next, err := page.fn(ctx, page.plrlr) + if err != nil { + return err + } + page.plrlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *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(getNextPage func(context.Context, PrivateLinkResourceListResult) (PrivateLinkResourceListResult, error)) PrivateLinkResourceListResultPage { + return PrivateLinkResourceListResultPage{fn: getNextPage} +} + +// 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"` +} + +// PrivateLinkServiceConnectionStateProperty state of the private endpoint connection. +type PrivateLinkServiceConnectionStateProperty 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"` +} + // ProxyResource common properties of proxy resource. type ProxyResource struct { // ID - READ-ONLY; Resource ID. diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operationalinsightsapi/interfaces.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operationalinsightsapi/interfaces.go index 19f04a64cf23..b0062bcf3521 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operationalinsightsapi/interfaces.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operationalinsightsapi/interfaces.go @@ -23,6 +23,13 @@ import ( "github.com/Azure/go-autorest/autorest" ) +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + GetAsyncOperationsStatus(ctx context.Context, location string, asyncOperationID string) (result operationalinsights.OperationStatus, err error) +} + +var _ BaseClientAPI = (*operationalinsights.BaseClient)(nil) + // LinkedServicesClientAPI contains the set of methods on the LinkedServicesClient type. type LinkedServicesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, linkedServiceName string, parameters operationalinsights.LinkedService) (result operationalinsights.LinkedService, err error) @@ -39,6 +46,7 @@ type DataSourcesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceName string) (result operationalinsights.DataSource, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, filter string, skiptoken string) (result operationalinsights.DataSourceListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, filter string, skiptoken string) (result operationalinsights.DataSourceListResultIterator, err error) } var _ DataSourcesClientAPI = (*operationalinsights.DataSourcesClient)(nil) @@ -64,6 +72,27 @@ var _ WorkspacesClientAPI = (*operationalinsights.WorkspacesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result operationalinsights.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result operationalinsights.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*operationalinsights.OperationsClient)(nil) + +// PrivateLinkResourcesClientAPI contains the set of methods on the PrivateLinkResourcesClient type. +type PrivateLinkResourcesClientAPI interface { + Get(ctx context.Context, resourceGroupName string, workspaceName string, groupName string) (result operationalinsights.PrivateLinkResource, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result operationalinsights.PrivateLinkResourceListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result operationalinsights.PrivateLinkResourceListResultIterator, err error) +} + +var _ PrivateLinkResourcesClientAPI = (*operationalinsights.PrivateLinkResourcesClient)(nil) + +// PrivateEndpointConnectionsClientAPI contains the set of methods on the PrivateEndpointConnectionsClient type. +type PrivateEndpointConnectionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, parameters operationalinsights.PrivateEndpointConnection) (result operationalinsights.PrivateEndpointConnectionsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (result operationalinsights.PrivateEndpointConnectionsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string) (result operationalinsights.PrivateEndpointConnection, err error) + ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result operationalinsights.PrivateEndpointConnectionListResultPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result operationalinsights.PrivateEndpointConnectionListResultIterator, err error) +} + +var _ PrivateEndpointConnectionsClientAPI = (*operationalinsights.PrivateEndpointConnectionsClient)(nil) diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operations.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operations.go index 3a9ccdfae775..699cbac0e176 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operations.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/privateendpointconnections.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/privateendpointconnections.go new file mode 100644 index 000000000000..b055697a6e58 --- /dev/null +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/privateendpointconnections.go @@ -0,0 +1,436 @@ +package operationalinsights + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateEndpointConnectionsClient is the operational Insights 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)} +} + +// CreateOrUpdate approve or reject a private endpoint connection with a given name. +// Parameters: +// resourceGroupName - the name of the resource group to get. The name is case insensitive. +// workspaceName - name of the Log Analytics Workspace that will contain the datasource +// privateEndpointConnectionName - the name of the private endpoint connection. +func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState.Status", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState.Description", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("operationalinsights.PrivateEndpointConnectionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateEndpointConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (*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 = "2015-11-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.OperationalInsights/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointConnectionsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a private endpoint connection with a given name. +// Parameters: +// resourceGroupName - the name of the resource group to get. The name is case insensitive. +// workspaceName - name of the Log Analytics Workspace that will contain the datasource +// 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.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("operationalinsights.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "Delete", result.Response(), "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 = "2015-11-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.OperationalInsights/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a private endpoint connection. +// Parameters: +// resourceGroupName - the name of the resource group to get. The name is case insensitive. +// workspaceName - name of the Log Analytics Workspace that will contain the datasource +// 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: 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("operationalinsights.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.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, "operationalinsights.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + } + + 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 = "2015-11-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.OperationalInsights/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace gets all private endpoint connections on a workspace. +// Parameters: +// resourceGroupName - the name of the resource group to get. The name is case insensitive. +// workspaceName - name of the Log Analytics Workspace that will contain the datasource +func (client PrivateEndpointConnectionsClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result PrivateEndpointConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.ListByWorkspace") + defer func() { + sc := -1 + if result.peclr.Response.Response != nil { + sc = result.peclr.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("operationalinsights.PrivateEndpointConnectionsClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.peclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.peclr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "ListByWorkspace", resp, "Failure responding to request") + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client PrivateEndpointConnectionsClient) 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 = "2015-11-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.OperationalInsights/workspaces/{workspaceName}/privateEndpointConnections", 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 PrivateEndpointConnectionsClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) ListByWorkspaceResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 PrivateEndpointConnectionsClient) listByWorkspaceNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { + req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "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, "operationalinsights.PrivateEndpointConnectionsClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateEndpointConnectionsClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateEndpointConnectionsClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result PrivateEndpointConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/privatelinkresources.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/privatelinkresources.go new file mode 100644 index 000000000000..b4e922eafc02 --- /dev/null +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/privatelinkresources.go @@ -0,0 +1,254 @@ +package operationalinsights + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateLinkResourcesClient is the operational Insights 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 gets the private link resources that need to be created for a Log Analytics Workspace. +// Parameters: +// resourceGroupName - the name of the resource group to get. The name is case insensitive. +// workspaceName - name of the Log Analytics Workspace that will contain the datasource +// groupName - the name of the private link resource. +func (client PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, groupName 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: 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("operationalinsights.PrivateLinkResourcesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, groupName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.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, "operationalinsights.PrivateLinkResourcesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateLinkResourcesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkResourcesClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, groupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "groupName": autorest.Encode("path", groupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-11-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.OperationalInsights/workspaces/{workspaceName}/privateLinkResources/{groupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace gets the private link resources that need to be created for a Log Analytics Workspace. +// Parameters: +// resourceGroupName - the name of the resource group to get. The name is case insensitive. +// workspaceName - name of the Log Analytics Workspace that will contain the datasource +func (client PrivateLinkResourcesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result PrivateLinkResourceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByWorkspace") + 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: 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("operationalinsights.PrivateLinkResourcesClient", "ListByWorkspace", err.Error()) + } + + result.fn = client.listByWorkspaceNextResults + req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateLinkResourcesClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.plrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateLinkResourcesClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result.plrlr, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateLinkResourcesClient", "ListByWorkspace", resp, "Failure responding to request") + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client PrivateLinkResourcesClient) 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 = "2015-11-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.OperationalInsights/workspaces/{workspaceName}/privateLinkResources", 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 PrivateLinkResourcesClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) ListByWorkspaceResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + 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 PrivateLinkResourcesClient) listByWorkspaceNextResults(ctx context.Context, lastResults PrivateLinkResourceListResult) (result PrivateLinkResourceListResult, err error) { + req, err := lastResults.privateLinkResourceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "operationalinsights.PrivateLinkResourcesClient", "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, "operationalinsights.PrivateLinkResourcesClient", "listByWorkspaceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.PrivateLinkResourcesClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkResourcesClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string) (result PrivateLinkResourceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.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/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go index 9f5a4766d789..8693ff8a5eb5 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go @@ -36,7 +36,8 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. +// 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)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/client.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/client.go index 58e84f8f9339..7cd1ccd9f4b7 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/client.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/clientgroups.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/clientgroups.go index 25bb0093cfca..c414fc4006ae 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/clientgroups.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/clientgroups.go @@ -37,7 +37,8 @@ func NewClientGroupsClient(subscriptionID string) ClientGroupsClient { return NewClientGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientGroupsClientWithBaseURI creates an instance of the ClientGroupsClient client. +// NewClientGroupsClientWithBaseURI creates an instance of the ClientGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClientGroupsClientWithBaseURI(baseURI string, subscriptionID string) ClientGroupsClient { return ClientGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machinegroups.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machinegroups.go index bebd4279ba75..a95f43a5a07d 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machinegroups.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machinegroups.go @@ -37,7 +37,8 @@ func NewMachineGroupsClient(subscriptionID string) MachineGroupsClient { return NewMachineGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineGroupsClientWithBaseURI creates an instance of the MachineGroupsClient client. +// NewMachineGroupsClientWithBaseURI creates an instance of the MachineGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMachineGroupsClientWithBaseURI(baseURI string, subscriptionID string) MachineGroupsClient { return MachineGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machines.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machines.go index 7e0e22f38b13..db9541287351 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machines.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machines.go @@ -37,7 +37,8 @@ func NewMachinesClient(subscriptionID string) MachinesClient { return NewMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client. +// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMachinesClientWithBaseURI(baseURI string, subscriptionID string) MachinesClient { return MachinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/maps.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/maps.go index d695d1289608..7c5e889529af 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/maps.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/maps.go @@ -36,7 +36,8 @@ func NewMapsClient(subscriptionID string) MapsClient { return NewMapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMapsClientWithBaseURI creates an instance of the MapsClient client. +// NewMapsClientWithBaseURI creates an instance of the MapsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMapsClientWithBaseURI(baseURI string, subscriptionID string) MapsClient { return MapsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/ports.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/ports.go index c80cf3e50db5..0cc38ace48c2 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/ports.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/ports.go @@ -37,7 +37,8 @@ func NewPortsClient(subscriptionID string) PortsClient { return NewPortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPortsClientWithBaseURI creates an instance of the PortsClient client. +// NewPortsClientWithBaseURI creates an instance of the PortsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPortsClientWithBaseURI(baseURI string, subscriptionID string) PortsClient { return PortsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/processes.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/processes.go index 3c909f79d606..cf3bd03f42bd 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/processes.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/processes.go @@ -37,7 +37,8 @@ func NewProcessesClient(subscriptionID string) ProcessesClient { return NewProcessesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProcessesClientWithBaseURI creates an instance of the ProcessesClient client. +// NewProcessesClientWithBaseURI creates an instance of the ProcessesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProcessesClientWithBaseURI(baseURI string, subscriptionID string) ProcessesClient { return ProcessesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/servicemapapi/interfaces.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/servicemapapi/interfaces.go index b89d4653ac51..7c1c009426b8 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/servicemapapi/interfaces.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/servicemapapi/interfaces.go @@ -29,10 +29,15 @@ type MachinesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, timestamp *date.Time) (result servicemap.Machine, err error) GetLiveness(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result servicemap.Liveness, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time, top *int32) (result servicemap.MachineCollectionPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time, top *int32) (result servicemap.MachineCollectionIterator, err error) ListConnections(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result servicemap.ConnectionCollectionPage, err error) + ListConnectionsComplete(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result servicemap.ConnectionCollectionIterator, err error) ListMachineGroupMembership(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result servicemap.MachineGroupCollectionPage, err error) + ListMachineGroupMembershipComplete(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result servicemap.MachineGroupCollectionIterator, err error) ListPorts(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result servicemap.PortCollectionPage, err error) + ListPortsComplete(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result servicemap.PortCollectionIterator, err error) ListProcesses(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time) (result servicemap.ProcessCollectionPage, err error) + ListProcessesComplete(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time) (result servicemap.ProcessCollectionIterator, err error) } var _ MachinesClientAPI = (*servicemap.MachinesClient)(nil) @@ -42,7 +47,9 @@ type ProcessesClientAPI interface { Get(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, processName string, timestamp *date.Time) (result servicemap.Process, err error) GetLiveness(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result servicemap.Liveness, err error) ListAcceptingPorts(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result servicemap.PortCollectionPage, err error) + ListAcceptingPortsComplete(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result servicemap.PortCollectionIterator, err error) ListConnections(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result servicemap.ConnectionCollectionPage, err error) + ListConnectionsComplete(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result servicemap.ConnectionCollectionIterator, err error) } var _ ProcessesClientAPI = (*servicemap.ProcessesClient)(nil) @@ -52,7 +59,9 @@ type PortsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result servicemap.Port, err error) GetLiveness(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result servicemap.Liveness, err error) ListAcceptingProcesses(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result servicemap.ProcessCollectionPage, err error) + ListAcceptingProcessesComplete(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result servicemap.ProcessCollectionIterator, err error) ListConnections(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result servicemap.ConnectionCollectionPage, err error) + ListConnectionsComplete(ctx context.Context, resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result servicemap.ConnectionCollectionIterator, err error) } var _ PortsClientAPI = (*servicemap.PortsClient)(nil) @@ -62,6 +71,7 @@ type ClientGroupsClientAPI interface { Get(ctx context.Context, resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time) (result servicemap.ClientGroup, err error) GetMembersCount(ctx context.Context, resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time) (result servicemap.ClientGroupMembersCount, err error) ListMembers(ctx context.Context, resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time, top *int32) (result servicemap.ClientGroupMembersCollectionPage, err error) + ListMembersComplete(ctx context.Context, resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time, top *int32) (result servicemap.ClientGroupMembersCollectionIterator, err error) } var _ ClientGroupsClientAPI = (*servicemap.ClientGroupsClient)(nil) @@ -86,6 +96,7 @@ type MachineGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, workspaceName string, machineGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, workspaceName string, machineGroupName string, startTime *date.Time, endTime *date.Time) (result servicemap.MachineGroup, err error) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, startTime *date.Time, endTime *date.Time) (result servicemap.MachineGroupCollectionPage, err error) + ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, startTime *date.Time, endTime *date.Time) (result servicemap.MachineGroupCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, workspaceName string, machineGroupName string, machineGroup servicemap.MachineGroup) (result servicemap.MachineGroup, err error) } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/summaries.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/summaries.go index dcff5955c37a..1f45e91e8664 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/summaries.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/summaries.go @@ -37,7 +37,8 @@ func NewSummariesClient(subscriptionID string) SummariesClient { return NewSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSummariesClientWithBaseURI creates an instance of the SummariesClient client. +// NewSummariesClientWithBaseURI creates an instance of the SummariesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSummariesClientWithBaseURI(baseURI string, subscriptionID string) SummariesClient { return SummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/client.go b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/client.go index 819be16528c8..1b0d98706b6a 100644 --- a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/client.go +++ b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/client.go @@ -44,7 +44,8 @@ func New(subscriptionID string, providerName string, resourceType string, resour return NewWithBaseURI(DefaultBaseURI, subscriptionID, providerName, resourceType, resourceName) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, providerName string, resourceType string, resourceName string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementassociations.go b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementassociations.go index 0c6de9aed5f5..876b85b4bfb6 100644 --- a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementassociations.go +++ b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementassociations.go @@ -36,7 +36,9 @@ func NewManagementAssociationsClient(subscriptionID string, providerName string, return NewManagementAssociationsClientWithBaseURI(DefaultBaseURI, subscriptionID, providerName, resourceType, resourceName) } -// NewManagementAssociationsClientWithBaseURI creates an instance of the ManagementAssociationsClient client. +// NewManagementAssociationsClientWithBaseURI creates an instance of the ManagementAssociationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewManagementAssociationsClientWithBaseURI(baseURI string, subscriptionID string, providerName string, resourceType string, resourceName string) ManagementAssociationsClient { return ManagementAssociationsClient{NewWithBaseURI(baseURI, subscriptionID, providerName, resourceType, resourceName)} } diff --git a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementconfigurations.go b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementconfigurations.go index 6a67f06f3416..631b60a132da 100644 --- a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementconfigurations.go +++ b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementconfigurations.go @@ -36,7 +36,9 @@ func NewManagementConfigurationsClient(subscriptionID string, providerName strin return NewManagementConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID, providerName, resourceType, resourceName) } -// NewManagementConfigurationsClientWithBaseURI creates an instance of the ManagementConfigurationsClient client. +// NewManagementConfigurationsClientWithBaseURI creates an instance of the ManagementConfigurationsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewManagementConfigurationsClientWithBaseURI(baseURI string, subscriptionID string, providerName string, resourceType string, resourceName string) ManagementConfigurationsClient { return ManagementConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID, providerName, resourceType, resourceName)} } diff --git a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/operations.go b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/operations.go index 60e61ac33aad..f01c9cab79be 100644 --- a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/operations.go +++ b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, providerName string, resourceTyp return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, providerName, resourceType, resourceName) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, providerName string, resourceType string, resourceName string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, providerName, resourceType, resourceName)} } diff --git a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go index fadfadf49b79..a8eb239d430b 100644 --- a/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go +++ b/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go @@ -36,7 +36,8 @@ func NewSolutionsClient(subscriptionID string, providerName string, resourceType return NewSolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, providerName, resourceType, resourceName) } -// NewSolutionsClientWithBaseURI creates an instance of the SolutionsClient client. +// NewSolutionsClientWithBaseURI creates an instance of the SolutionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSolutionsClientWithBaseURI(baseURI string, subscriptionID string, providerName string, resourceType string, resourceName string) SolutionsClient { return SolutionsClient{NewWithBaseURI(baseURI, subscriptionID, providerName, resourceType, resourceName)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/client.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/client.go index bd71733e8b42..d49fa914ae1d 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/client.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/legacypeerings.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/legacypeerings.go index bbb540643822..e8d393d680f1 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/legacypeerings.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/legacypeerings.go @@ -35,7 +35,8 @@ func NewLegacyPeeringsClient(subscriptionID string) LegacyPeeringsClient { return NewLegacyPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLegacyPeeringsClientWithBaseURI creates an instance of the LegacyPeeringsClient client. +// NewLegacyPeeringsClientWithBaseURI creates an instance of the LegacyPeeringsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLegacyPeeringsClientWithBaseURI(baseURI string, subscriptionID string) LegacyPeeringsClient { return LegacyPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/locations.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/locations.go index c77b5576f293..8bc2f5613813 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/locations.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/operations.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/operations.go index 63f06a85cf05..364ec2fff27d 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/operations.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/peerasns.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/peerasns.go index 475bbf87f835..50f1fa2a9f9c 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/peerasns.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/peerasns.go @@ -35,7 +35,8 @@ func NewPeerAsnsClient(subscriptionID string) PeerAsnsClient { return NewPeerAsnsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPeerAsnsClientWithBaseURI creates an instance of the PeerAsnsClient client. +// NewPeerAsnsClientWithBaseURI creates an instance of the PeerAsnsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPeerAsnsClientWithBaseURI(baseURI string, subscriptionID string) PeerAsnsClient { return PeerAsnsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/peeringapi/interfaces.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/peeringapi/interfaces.go index f3c448884e9d..73796b3a632d 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/peeringapi/interfaces.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/peeringapi/interfaces.go @@ -33,6 +33,7 @@ var _ BaseClientAPI = (*peering.BaseClient)(nil) // LegacyPeeringsClientAPI contains the set of methods on the LegacyPeeringsClient type. type LegacyPeeringsClientAPI interface { List(ctx context.Context, peeringLocation string, kind string) (result peering.ListResultPage, err error) + ListComplete(ctx context.Context, peeringLocation string, kind string) (result peering.ListResultIterator, err error) } var _ LegacyPeeringsClientAPI = (*peering.LegacyPeeringsClient)(nil) @@ -40,6 +41,7 @@ var _ LegacyPeeringsClientAPI = (*peering.LegacyPeeringsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result peering.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result peering.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*peering.OperationsClient)(nil) @@ -50,6 +52,7 @@ type PeerAsnsClientAPI interface { Delete(ctx context.Context, peerAsnName string) (result autorest.Response, err error) Get(ctx context.Context, peerAsnName string) (result peering.PeerAsn, err error) ListBySubscription(ctx context.Context) (result peering.PeerAsnListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result peering.PeerAsnListResultIterator, err error) } var _ PeerAsnsClientAPI = (*peering.PeerAsnsClient)(nil) @@ -57,6 +60,7 @@ var _ PeerAsnsClientAPI = (*peering.PeerAsnsClient)(nil) // LocationsClientAPI contains the set of methods on the LocationsClient type. type LocationsClientAPI interface { List(ctx context.Context, kind string, directPeeringType string) (result peering.LocationListResultPage, err error) + ListComplete(ctx context.Context, kind string, directPeeringType string) (result peering.LocationListResultIterator, err error) } var _ LocationsClientAPI = (*peering.LocationsClient)(nil) @@ -67,7 +71,9 @@ type PeeringsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, peeringName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, peeringName string) (result peering.Model, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result peering.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result peering.ListResultIterator, err error) ListBySubscription(ctx context.Context) (result peering.ListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result peering.ListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, peeringName string, tags peering.ResourceTags) (result peering.Model, err error) } @@ -76,6 +82,7 @@ var _ PeeringsClientAPI = (*peering.PeeringsClient)(nil) // ServiceLocationsClientAPI contains the set of methods on the ServiceLocationsClient type. type ServiceLocationsClientAPI interface { List(ctx context.Context) (result peering.ServiceLocationListResultPage, err error) + ListComplete(ctx context.Context) (result peering.ServiceLocationListResultIterator, err error) } var _ ServiceLocationsClientAPI = (*peering.ServiceLocationsClient)(nil) @@ -92,6 +99,7 @@ var _ ServicePrefixesClientAPI = (*peering.ServicePrefixesClient)(nil) // PrefixesClientAPI contains the set of methods on the PrefixesClient type. type PrefixesClientAPI interface { ListByPeeringService(ctx context.Context, resourceGroupName string, peeringServiceName string) (result peering.ServicePrefixListResultPage, err error) + ListByPeeringServiceComplete(ctx context.Context, resourceGroupName string, peeringServiceName string) (result peering.ServicePrefixListResultIterator, err error) } var _ PrefixesClientAPI = (*peering.PrefixesClient)(nil) @@ -99,6 +107,7 @@ var _ PrefixesClientAPI = (*peering.PrefixesClient)(nil) // ServiceProvidersClientAPI contains the set of methods on the ServiceProvidersClient type. type ServiceProvidersClientAPI interface { List(ctx context.Context) (result peering.ServiceProviderListResultPage, err error) + ListComplete(ctx context.Context) (result peering.ServiceProviderListResultIterator, err error) } var _ ServiceProvidersClientAPI = (*peering.ServiceProvidersClient)(nil) @@ -109,7 +118,9 @@ type ServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, peeringServiceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, peeringServiceName string) (result peering.Service, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result peering.ServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result peering.ServiceListResultIterator, err error) ListBySubscription(ctx context.Context) (result peering.ServiceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result peering.ServiceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, peeringServiceName string, tags peering.ResourceTags) (result peering.Service, err error) } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/peerings.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/peerings.go index 06e815d59656..05ad3664750c 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/peerings.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/peerings.go @@ -36,7 +36,8 @@ func NewPeeringsClient(subscriptionID string) PeeringsClient { return NewPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPeeringsClientWithBaseURI creates an instance of the PeeringsClient client. +// NewPeeringsClientWithBaseURI creates an instance of the PeeringsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPeeringsClientWithBaseURI(baseURI string, subscriptionID string) PeeringsClient { return PeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/prefixes.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/prefixes.go index 449f7153a44b..810343faf1ee 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/prefixes.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/prefixes.go @@ -35,7 +35,8 @@ func NewPrefixesClient(subscriptionID string) PrefixesClient { return NewPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrefixesClientWithBaseURI creates an instance of the PrefixesClient client. +// NewPrefixesClientWithBaseURI creates an instance of the PrefixesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PrefixesClient { return PrefixesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/servicelocations.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/servicelocations.go index f20c06d98ee3..61da49c6b2dd 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/servicelocations.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/servicelocations.go @@ -35,7 +35,9 @@ func NewServiceLocationsClient(subscriptionID string) ServiceLocationsClient { return NewServiceLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceLocationsClientWithBaseURI creates an instance of the ServiceLocationsClient client. +// NewServiceLocationsClientWithBaseURI creates an instance of the ServiceLocationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceLocationsClientWithBaseURI(baseURI string, subscriptionID string) ServiceLocationsClient { return ServiceLocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/serviceprefixes.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/serviceprefixes.go index edcabf337f8d..6e64bdfaa279 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/serviceprefixes.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/serviceprefixes.go @@ -35,7 +35,8 @@ func NewServicePrefixesClient(subscriptionID string) ServicePrefixesClient { return NewServicePrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicePrefixesClientWithBaseURI creates an instance of the ServicePrefixesClient client. +// NewServicePrefixesClientWithBaseURI creates an instance of the ServicePrefixesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicePrefixesClientWithBaseURI(baseURI string, subscriptionID string) ServicePrefixesClient { return ServicePrefixesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/serviceproviders.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/serviceproviders.go index 0ab15633390b..dbb847e4eabb 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/serviceproviders.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/serviceproviders.go @@ -35,7 +35,9 @@ func NewServiceProvidersClient(subscriptionID string) ServiceProvidersClient { return NewServiceProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceProvidersClientWithBaseURI creates an instance of the ServiceProvidersClient client. +// NewServiceProvidersClientWithBaseURI creates an instance of the ServiceProvidersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ServiceProvidersClient { return ServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-08-01-preview/peering/services.go b/services/preview/peering/mgmt/2019-08-01-preview/peering/services.go index 65c4f1337d87..bbf963b1ba32 100644 --- a/services/preview/peering/mgmt/2019-08-01-preview/peering/services.go +++ b/services/preview/peering/mgmt/2019-08-01-preview/peering/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/client.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/client.go index 0af85a137871..4baf032dd4e3 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/client.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/legacypeerings.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/legacypeerings.go index b5230ef184ea..03bf7c3cd55a 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/legacypeerings.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/legacypeerings.go @@ -35,7 +35,8 @@ func NewLegacyPeeringsClient(subscriptionID string) LegacyPeeringsClient { return NewLegacyPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLegacyPeeringsClientWithBaseURI creates an instance of the LegacyPeeringsClient client. +// NewLegacyPeeringsClientWithBaseURI creates an instance of the LegacyPeeringsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLegacyPeeringsClientWithBaseURI(baseURI string, subscriptionID string) LegacyPeeringsClient { return LegacyPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/locations.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/locations.go index b9ef1363bcc6..548cdf35fb20 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/locations.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string) LocationsClient { return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/operations.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/operations.go index ae4324c7426a..8d5ad4e0b230 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/operations.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/peerasns.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/peerasns.go index 14a5e258bd16..3088d4dbb816 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/peerasns.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/peerasns.go @@ -35,7 +35,8 @@ func NewPeerAsnsClient(subscriptionID string) PeerAsnsClient { return NewPeerAsnsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPeerAsnsClientWithBaseURI creates an instance of the PeerAsnsClient client. +// NewPeerAsnsClientWithBaseURI creates an instance of the PeerAsnsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPeerAsnsClientWithBaseURI(baseURI string, subscriptionID string) PeerAsnsClient { return PeerAsnsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/peeringapi/interfaces.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/peeringapi/interfaces.go index f88926bfe4eb..c7bd8d52e574 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/peeringapi/interfaces.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/peeringapi/interfaces.go @@ -33,6 +33,7 @@ var _ BaseClientAPI = (*peering.BaseClient)(nil) // LegacyPeeringsClientAPI contains the set of methods on the LegacyPeeringsClient type. type LegacyPeeringsClientAPI interface { List(ctx context.Context, peeringLocation string, kind string) (result peering.ListResultPage, err error) + ListComplete(ctx context.Context, peeringLocation string, kind string) (result peering.ListResultIterator, err error) } var _ LegacyPeeringsClientAPI = (*peering.LegacyPeeringsClient)(nil) @@ -40,6 +41,7 @@ var _ LegacyPeeringsClientAPI = (*peering.LegacyPeeringsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result peering.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result peering.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*peering.OperationsClient)(nil) @@ -50,6 +52,7 @@ type PeerAsnsClientAPI interface { Delete(ctx context.Context, peerAsnName string) (result autorest.Response, err error) Get(ctx context.Context, peerAsnName string) (result peering.PeerAsn, err error) ListBySubscription(ctx context.Context) (result peering.PeerAsnListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result peering.PeerAsnListResultIterator, err error) } var _ PeerAsnsClientAPI = (*peering.PeerAsnsClient)(nil) @@ -57,6 +60,7 @@ var _ PeerAsnsClientAPI = (*peering.PeerAsnsClient)(nil) // LocationsClientAPI contains the set of methods on the LocationsClient type. type LocationsClientAPI interface { List(ctx context.Context, kind string, directPeeringType string) (result peering.LocationListResultPage, err error) + ListComplete(ctx context.Context, kind string, directPeeringType string) (result peering.LocationListResultIterator, err error) } var _ LocationsClientAPI = (*peering.LocationsClient)(nil) @@ -67,7 +71,9 @@ type PeeringsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, peeringName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, peeringName string) (result peering.Model, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result peering.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result peering.ListResultIterator, err error) ListBySubscription(ctx context.Context) (result peering.ListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result peering.ListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, peeringName string, tags peering.ResourceTags) (result peering.Model, err error) } @@ -76,6 +82,7 @@ var _ PeeringsClientAPI = (*peering.PeeringsClient)(nil) // ServiceLocationsClientAPI contains the set of methods on the ServiceLocationsClient type. type ServiceLocationsClientAPI interface { List(ctx context.Context) (result peering.ServiceLocationListResultPage, err error) + ListComplete(ctx context.Context) (result peering.ServiceLocationListResultIterator, err error) } var _ ServiceLocationsClientAPI = (*peering.ServiceLocationsClient)(nil) @@ -86,6 +93,7 @@ type PrefixesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, peeringServiceName string, prefixName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, peeringServiceName string, prefixName string, expand string) (result peering.ServicePrefix, err error) ListByPeeringService(ctx context.Context, resourceGroupName string, peeringServiceName string, expand string) (result peering.ServicePrefixListResultPage, err error) + ListByPeeringServiceComplete(ctx context.Context, resourceGroupName string, peeringServiceName string, expand string) (result peering.ServicePrefixListResultIterator, err error) } var _ PrefixesClientAPI = (*peering.PrefixesClient)(nil) @@ -93,6 +101,7 @@ var _ PrefixesClientAPI = (*peering.PrefixesClient)(nil) // ServiceProvidersClientAPI contains the set of methods on the ServiceProvidersClient type. type ServiceProvidersClientAPI interface { List(ctx context.Context) (result peering.ServiceProviderListResultPage, err error) + ListComplete(ctx context.Context) (result peering.ServiceProviderListResultIterator, err error) } var _ ServiceProvidersClientAPI = (*peering.ServiceProvidersClient)(nil) @@ -103,7 +112,9 @@ type ServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, peeringServiceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, peeringServiceName string) (result peering.Service, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result peering.ServiceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result peering.ServiceListResultIterator, err error) ListBySubscription(ctx context.Context) (result peering.ServiceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result peering.ServiceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, peeringServiceName string, tags peering.ResourceTags) (result peering.Service, err error) } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/peerings.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/peerings.go index c2906422fc11..a98e9e4b4ebd 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/peerings.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/peerings.go @@ -36,7 +36,8 @@ func NewPeeringsClient(subscriptionID string) PeeringsClient { return NewPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPeeringsClientWithBaseURI creates an instance of the PeeringsClient client. +// NewPeeringsClientWithBaseURI creates an instance of the PeeringsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPeeringsClientWithBaseURI(baseURI string, subscriptionID string) PeeringsClient { return PeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/prefixes.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/prefixes.go index 601d96cb54e6..f76cd7a42b64 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/prefixes.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/prefixes.go @@ -35,7 +35,8 @@ func NewPrefixesClient(subscriptionID string) PrefixesClient { return NewPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrefixesClientWithBaseURI creates an instance of the PrefixesClient client. +// NewPrefixesClientWithBaseURI creates an instance of the PrefixesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PrefixesClient { return PrefixesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/servicelocations.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/servicelocations.go index 51bb8bc8f450..4cfd55a7270f 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/servicelocations.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/servicelocations.go @@ -35,7 +35,9 @@ func NewServiceLocationsClient(subscriptionID string) ServiceLocationsClient { return NewServiceLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceLocationsClientWithBaseURI creates an instance of the ServiceLocationsClient client. +// NewServiceLocationsClientWithBaseURI creates an instance of the ServiceLocationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceLocationsClientWithBaseURI(baseURI string, subscriptionID string) ServiceLocationsClient { return ServiceLocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/serviceproviders.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/serviceproviders.go index cc26d5af1164..dfb1a548d27a 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/serviceproviders.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/serviceproviders.go @@ -35,7 +35,9 @@ func NewServiceProvidersClient(subscriptionID string) ServiceProvidersClient { return NewServiceProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceProvidersClientWithBaseURI creates an instance of the ServiceProvidersClient client. +// NewServiceProvidersClientWithBaseURI creates an instance of the ServiceProvidersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ServiceProvidersClient { return ServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/peering/mgmt/2019-09-01-preview/peering/services.go b/services/preview/peering/mgmt/2019-09-01-preview/peering/services.go index 2fb32fda7dc3..c79edeb57b49 100644 --- a/services/preview/peering/mgmt/2019-09-01-preview/peering/services.go +++ b/services/preview/peering/mgmt/2019-09-01-preview/peering/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/client.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/client.go index 4687a8ef8675..dba65fe987a4 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/client.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/operations.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/operations.go index 17210da54f37..06f496c0022a 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/operations.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyevents.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyevents.go index 28c2d9196d15..a611f5be3997 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyevents.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyevents.go @@ -37,7 +37,8 @@ func NewPolicyEventsClient() PolicyEventsClient { return NewPolicyEventsClientWithBaseURI(DefaultBaseURI) } -// NewPolicyEventsClientWithBaseURI creates an instance of the PolicyEventsClient client. +// NewPolicyEventsClientWithBaseURI creates an instance of the PolicyEventsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyEventsClientWithBaseURI(baseURI string) PolicyEventsClient { return PolicyEventsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyinsightsapi/interfaces.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyinsightsapi/interfaces.go index e78a2a7b753a..4f86ebd5641e 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyinsightsapi/interfaces.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyinsightsapi/interfaces.go @@ -26,9 +26,13 @@ import ( // PolicyTrackedResourcesClientAPI contains the set of methods on the PolicyTrackedResourcesClient type. type PolicyTrackedResourcesClientAPI interface { ListQueryResultsForManagementGroup(ctx context.Context, managementGroupName string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsPage, err error) + ListQueryResultsForManagementGroupComplete(ctx context.Context, managementGroupName string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsIterator, err error) ListQueryResultsForResource(ctx context.Context, resourceID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsPage, err error) + ListQueryResultsForResourceComplete(ctx context.Context, resourceID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsIterator, err error) ListQueryResultsForResourceGroup(ctx context.Context, resourceGroupName string, subscriptionID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsPage, err error) + ListQueryResultsForResourceGroupComplete(ctx context.Context, resourceGroupName string, subscriptionID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsIterator, err error) ListQueryResultsForSubscription(ctx context.Context, subscriptionID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsPage, err error) + ListQueryResultsForSubscriptionComplete(ctx context.Context, subscriptionID string, top *int32, filter string) (result policyinsights.PolicyTrackedResourcesQueryResultsIterator, err error) } var _ PolicyTrackedResourcesClientAPI = (*policyinsights.PolicyTrackedResourcesClient)(nil) @@ -52,13 +56,21 @@ type RemediationsClientAPI interface { GetAtResourceGroup(ctx context.Context, subscriptionID string, resourceGroupName string, remediationName string) (result policyinsights.Remediation, err error) GetAtSubscription(ctx context.Context, subscriptionID string, remediationName string) (result policyinsights.Remediation, err error) ListDeploymentsAtManagementGroup(ctx context.Context, managementGroupID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultPage, err error) + ListDeploymentsAtManagementGroupComplete(ctx context.Context, managementGroupID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultIterator, err error) ListDeploymentsAtResource(ctx context.Context, resourceID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultPage, err error) + ListDeploymentsAtResourceComplete(ctx context.Context, resourceID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultIterator, err error) ListDeploymentsAtResourceGroup(ctx context.Context, subscriptionID string, resourceGroupName string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultPage, err error) + ListDeploymentsAtResourceGroupComplete(ctx context.Context, subscriptionID string, resourceGroupName string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultIterator, err error) ListDeploymentsAtSubscription(ctx context.Context, subscriptionID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultPage, err error) + ListDeploymentsAtSubscriptionComplete(ctx context.Context, subscriptionID string, remediationName string, top *int32) (result policyinsights.RemediationDeploymentsListResultIterator, err error) ListForManagementGroup(ctx context.Context, managementGroupID string, top *int32, filter string) (result policyinsights.RemediationListResultPage, err error) + ListForManagementGroupComplete(ctx context.Context, managementGroupID string, top *int32, filter string) (result policyinsights.RemediationListResultIterator, err error) ListForResource(ctx context.Context, resourceID string, top *int32, filter string) (result policyinsights.RemediationListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceID string, top *int32, filter string) (result policyinsights.RemediationListResultIterator, err error) ListForResourceGroup(ctx context.Context, subscriptionID string, resourceGroupName string, top *int32, filter string) (result policyinsights.RemediationListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, subscriptionID string, resourceGroupName string, top *int32, filter string) (result policyinsights.RemediationListResultIterator, err error) ListForSubscription(ctx context.Context, subscriptionID string, top *int32, filter string) (result policyinsights.RemediationListResultPage, err error) + ListForSubscriptionComplete(ctx context.Context, subscriptionID string, top *int32, filter string) (result policyinsights.RemediationListResultIterator, err error) } var _ RemediationsClientAPI = (*policyinsights.RemediationsClient)(nil) diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policystates.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policystates.go index 1d23d206102d..cb17ffbf3350 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policystates.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policystates.go @@ -37,7 +37,8 @@ func NewPolicyStatesClient() PolicyStatesClient { return NewPolicyStatesClientWithBaseURI(DefaultBaseURI) } -// NewPolicyStatesClientWithBaseURI creates an instance of the PolicyStatesClient client. +// NewPolicyStatesClientWithBaseURI creates an instance of the PolicyStatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPolicyStatesClientWithBaseURI(baseURI string) PolicyStatesClient { return PolicyStatesClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policytrackedresources.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policytrackedresources.go index dd5a4ecd9183..558c1215e4f6 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policytrackedresources.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policytrackedresources.go @@ -36,7 +36,9 @@ func NewPolicyTrackedResourcesClient() PolicyTrackedResourcesClient { return NewPolicyTrackedResourcesClientWithBaseURI(DefaultBaseURI) } -// NewPolicyTrackedResourcesClientWithBaseURI creates an instance of the PolicyTrackedResourcesClient client. +// NewPolicyTrackedResourcesClientWithBaseURI creates an instance of the PolicyTrackedResourcesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewPolicyTrackedResourcesClientWithBaseURI(baseURI string) PolicyTrackedResourcesClient { return PolicyTrackedResourcesClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/remediations.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/remediations.go index af8bdb9c2715..3a01eccc2ae2 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/remediations.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/remediations.go @@ -36,7 +36,8 @@ func NewRemediationsClient() RemediationsClient { return NewRemediationsClientWithBaseURI(DefaultBaseURI) } -// NewRemediationsClientWithBaseURI creates an instance of the RemediationsClient client. +// NewRemediationsClientWithBaseURI creates an instance of the RemediationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRemediationsClientWithBaseURI(baseURI string) RemediationsClient { return RemediationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/portal/mgmt/2015-08-01-preview/portal/client.go b/services/preview/portal/mgmt/2015-08-01-preview/portal/client.go index 25a7d065c6e1..e759d06b41f2 100644 --- a/services/preview/portal/mgmt/2015-08-01-preview/portal/client.go +++ b/services/preview/portal/mgmt/2015-08-01-preview/portal/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/portal/mgmt/2015-08-01-preview/portal/dashboards.go b/services/preview/portal/mgmt/2015-08-01-preview/portal/dashboards.go index 665ad9440715..7b1f05d61fcf 100644 --- a/services/preview/portal/mgmt/2015-08-01-preview/portal/dashboards.go +++ b/services/preview/portal/mgmt/2015-08-01-preview/portal/dashboards.go @@ -36,7 +36,8 @@ func NewDashboardsClient(subscriptionID string) DashboardsClient { return NewDashboardsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDashboardsClientWithBaseURI creates an instance of the DashboardsClient client. +// NewDashboardsClientWithBaseURI creates an instance of the DashboardsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDashboardsClientWithBaseURI(baseURI string, subscriptionID string) DashboardsClient { return DashboardsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/portal/mgmt/2015-08-01-preview/portal/operations.go b/services/preview/portal/mgmt/2015-08-01-preview/portal/operations.go index ff98710209f6..59e145d0d901 100644 --- a/services/preview/portal/mgmt/2015-08-01-preview/portal/operations.go +++ b/services/preview/portal/mgmt/2015-08-01-preview/portal/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/portal/mgmt/2015-08-01-preview/portal/portalapi/interfaces.go b/services/preview/portal/mgmt/2015-08-01-preview/portal/portalapi/interfaces.go index c2a893ad5b24..f4658ea50715 100644 --- a/services/preview/portal/mgmt/2015-08-01-preview/portal/portalapi/interfaces.go +++ b/services/preview/portal/mgmt/2015-08-01-preview/portal/portalapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result portal.ResourceProviderOperationListPage, err error) + ListComplete(ctx context.Context) (result portal.ResourceProviderOperationListIterator, err error) } var _ OperationsClientAPI = (*portal.OperationsClient)(nil) @@ -36,7 +37,9 @@ type DashboardsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, dashboardName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, dashboardName string) (result portal.Dashboard, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result portal.DashboardListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result portal.DashboardListResultIterator, err error) ListBySubscription(ctx context.Context) (result portal.DashboardListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result portal.DashboardListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, dashboardName string, dashboard portal.PatchableDashboard) (result portal.Dashboard, err error) } diff --git a/services/preview/portal/mgmt/2018-10-01-preview/portal/client.go b/services/preview/portal/mgmt/2018-10-01-preview/portal/client.go index 25bb87b461d4..bfeb5bd43edd 100644 --- a/services/preview/portal/mgmt/2018-10-01-preview/portal/client.go +++ b/services/preview/portal/mgmt/2018-10-01-preview/portal/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/portal/mgmt/2018-10-01-preview/portal/dashboards.go b/services/preview/portal/mgmt/2018-10-01-preview/portal/dashboards.go index d69078e58e88..055a44ddc92e 100644 --- a/services/preview/portal/mgmt/2018-10-01-preview/portal/dashboards.go +++ b/services/preview/portal/mgmt/2018-10-01-preview/portal/dashboards.go @@ -36,7 +36,8 @@ func NewDashboardsClient(subscriptionID string) DashboardsClient { return NewDashboardsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDashboardsClientWithBaseURI creates an instance of the DashboardsClient client. +// NewDashboardsClientWithBaseURI creates an instance of the DashboardsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDashboardsClientWithBaseURI(baseURI string, subscriptionID string) DashboardsClient { return DashboardsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/portal/mgmt/2018-10-01-preview/portal/operations.go b/services/preview/portal/mgmt/2018-10-01-preview/portal/operations.go index cd80a0013eec..5515068d04a6 100644 --- a/services/preview/portal/mgmt/2018-10-01-preview/portal/operations.go +++ b/services/preview/portal/mgmt/2018-10-01-preview/portal/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/portal/mgmt/2018-10-01-preview/portal/portalapi/interfaces.go b/services/preview/portal/mgmt/2018-10-01-preview/portal/portalapi/interfaces.go index 41bb316b2a9e..ea5d4a3fb3a0 100644 --- a/services/preview/portal/mgmt/2018-10-01-preview/portal/portalapi/interfaces.go +++ b/services/preview/portal/mgmt/2018-10-01-preview/portal/portalapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result portal.ResourceProviderOperationListPage, err error) + ListComplete(ctx context.Context) (result portal.ResourceProviderOperationListIterator, err error) } var _ OperationsClientAPI = (*portal.OperationsClient)(nil) @@ -36,7 +37,9 @@ type DashboardsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, dashboardName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, dashboardName string) (result portal.Dashboard, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result portal.DashboardListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result portal.DashboardListResultIterator, err error) ListBySubscription(ctx context.Context) (result portal.DashboardListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result portal.DashboardListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, dashboardName string, dashboard portal.PatchableDashboard) (result portal.Dashboard, err error) } diff --git a/services/preview/portal/mgmt/2019-01-01-preview/portal/client.go b/services/preview/portal/mgmt/2019-01-01-preview/portal/client.go index b6ef83f251d6..a2e0ee57f9a4 100644 --- a/services/preview/portal/mgmt/2019-01-01-preview/portal/client.go +++ b/services/preview/portal/mgmt/2019-01-01-preview/portal/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/portal/mgmt/2019-01-01-preview/portal/dashboards.go b/services/preview/portal/mgmt/2019-01-01-preview/portal/dashboards.go index 9569cd55b45c..b03220e021a9 100644 --- a/services/preview/portal/mgmt/2019-01-01-preview/portal/dashboards.go +++ b/services/preview/portal/mgmt/2019-01-01-preview/portal/dashboards.go @@ -36,7 +36,8 @@ func NewDashboardsClient(subscriptionID string) DashboardsClient { return NewDashboardsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDashboardsClientWithBaseURI creates an instance of the DashboardsClient client. +// NewDashboardsClientWithBaseURI creates an instance of the DashboardsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDashboardsClientWithBaseURI(baseURI string, subscriptionID string) DashboardsClient { return DashboardsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/portal/mgmt/2019-01-01-preview/portal/operations.go b/services/preview/portal/mgmt/2019-01-01-preview/portal/operations.go index 3a4e8ebe23c9..06b958fa5ff0 100644 --- a/services/preview/portal/mgmt/2019-01-01-preview/portal/operations.go +++ b/services/preview/portal/mgmt/2019-01-01-preview/portal/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/portal/mgmt/2019-01-01-preview/portal/portalapi/interfaces.go b/services/preview/portal/mgmt/2019-01-01-preview/portal/portalapi/interfaces.go index 733d973da782..71bbc6ef2ea5 100644 --- a/services/preview/portal/mgmt/2019-01-01-preview/portal/portalapi/interfaces.go +++ b/services/preview/portal/mgmt/2019-01-01-preview/portal/portalapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result portal.ResourceProviderOperationListPage, err error) + ListComplete(ctx context.Context) (result portal.ResourceProviderOperationListIterator, err error) } var _ OperationsClientAPI = (*portal.OperationsClient)(nil) @@ -36,7 +37,9 @@ type DashboardsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, dashboardName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, dashboardName string) (result portal.Dashboard, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result portal.DashboardListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result portal.DashboardListResultIterator, err error) ListBySubscription(ctx context.Context) (result portal.DashboardListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result portal.DashboardListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, dashboardName string, dashboard portal.PatchableDashboard) (result portal.Dashboard, err error) } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/checknameavailability.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/checknameavailability.go index f934c30007c0..5880f307427d 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/checknameavailability.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/checknameavailability.go @@ -38,7 +38,9 @@ func NewCheckNameAvailabilityClient(subscriptionID string) CheckNameAvailability return NewCheckNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client. +// NewCheckNameAvailabilityClientWithBaseURI creates an instance of the CheckNameAvailabilityClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckNameAvailabilityClient { return CheckNameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/client.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/client.go index 1bbe64b8c1e0..cc417f4142e3 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/client.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/configurations.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/configurations.go index d101d4dc5d72..c5547c39fc0a 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/configurations.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/configurations.go @@ -37,7 +37,8 @@ func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/databases.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/databases.go index 4279974af85a..9526f7cb587f 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/databases.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/databases.go @@ -37,7 +37,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/firewallrules.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/firewallrules.go index 8a6931558be5..69ce5215a737 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/firewallrules.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/firewallrules.go @@ -38,7 +38,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/locationbasedperformancetier.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/locationbasedperformancetier.go index b3d7980f46f7..500b4a1606ec 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/locationbasedperformancetier.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/locationbasedperformancetier.go @@ -38,7 +38,8 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string) LocationBasedP } // NewLocationBasedPerformanceTierClientWithBaseURI creates an instance of the LocationBasedPerformanceTierClient -// 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 NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscriptionID string) LocationBasedPerformanceTierClient { return LocationBasedPerformanceTierClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/logfiles.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/logfiles.go index 580f3ba7138e..fb80a5803a63 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/logfiles.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/logfiles.go @@ -37,7 +37,8 @@ func NewLogFilesClient(subscriptionID string) LogFilesClient { return NewLogFilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client. +// NewLogFilesClientWithBaseURI creates an instance of the LogFilesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFilesClient { return LogFilesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/operations.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/operations.go index 57fce2c8d53d..afee6e28ccee 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/operations.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/postgresqlapi/interfaces.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/postgresqlapi/interfaces.go index 07a979d114e8..e84595961f90 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/postgresqlapi/interfaces.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/postgresqlapi/interfaces.go @@ -58,6 +58,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result postgresql.VirtualNetworkRulesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result postgresql.VirtualNetworkRule, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result postgresql.VirtualNetworkRuleListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result postgresql.VirtualNetworkRuleListResultIterator, err error) } var _ VirtualNetworkRulesClientAPI = (*postgresql.VirtualNetworkRulesClient)(nil) diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/replicas.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/replicas.go index f067265dcd62..ca873a4573e0 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/replicas.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/replicas.go @@ -37,7 +37,8 @@ func NewReplicasClient(subscriptionID string) ReplicasClient { return NewReplicasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client. +// NewReplicasClientWithBaseURI creates an instance of the ReplicasClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicasClientWithBaseURI(baseURI string, subscriptionID string) ReplicasClient { return ReplicasClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serveradministrators.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serveradministrators.go index 21a99463ac44..696660d8308c 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serveradministrators.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serveradministrators.go @@ -38,7 +38,9 @@ func NewServerAdministratorsClient(subscriptionID string) ServerAdministratorsCl return NewServerAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAdministratorsClientWithBaseURI creates an instance of the ServerAdministratorsClient client. +// NewServerAdministratorsClientWithBaseURI creates an instance of the ServerAdministratorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServerAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAdministratorsClient { return ServerAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/servers.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/servers.go index 73fbb1bd824e..b6f91f17ba13 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/servers.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/servers.go @@ -38,7 +38,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serversecurityalertpolicies.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serversecurityalertpolicies.go index 001d4ab75189..2b4a88313ac9 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serversecurityalertpolicies.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serversecurityalertpolicies.go @@ -37,7 +37,9 @@ func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityA return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client. +// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/virtualnetworkrules.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/virtualnetworkrules.go index 927c150e3365..3a47225d1198 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/virtualnetworkrules.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/virtualnetworkrules.go @@ -38,7 +38,9 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/client.go b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/client.go index dbaee4024de2..d2d515680965 100644 --- a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/client.go +++ b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/dpscertificate.go b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/dpscertificate.go index e92f10d52f00..f4c53af0dfa8 100644 --- a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/dpscertificate.go +++ b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/dpscertificate.go @@ -37,7 +37,8 @@ func NewDpsCertificateClient(subscriptionID string) DpsCertificateClient { return NewDpsCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDpsCertificateClientWithBaseURI creates an instance of the DpsCertificateClient client. +// NewDpsCertificateClientWithBaseURI creates an instance of the DpsCertificateClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDpsCertificateClientWithBaseURI(baseURI string, subscriptionID string) DpsCertificateClient { return DpsCertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/dpscertificates.go b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/dpscertificates.go index b3bb65bd21d8..46045cd83982 100644 --- a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/dpscertificates.go +++ b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/dpscertificates.go @@ -35,7 +35,8 @@ func NewDpsCertificatesClient(subscriptionID string) DpsCertificatesClient { return NewDpsCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDpsCertificatesClientWithBaseURI creates an instance of the DpsCertificatesClient client. +// NewDpsCertificatesClientWithBaseURI creates an instance of the DpsCertificatesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDpsCertificatesClientWithBaseURI(baseURI string, subscriptionID string) DpsCertificatesClient { return DpsCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/iotdpsresource.go b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/iotdpsresource.go index e757e4e2d37a..e8ebd1b1f462 100644 --- a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/iotdpsresource.go +++ b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/iotdpsresource.go @@ -36,7 +36,8 @@ func NewIotDpsResourceClient(subscriptionID string) IotDpsResourceClient { return NewIotDpsResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotDpsResourceClientWithBaseURI creates an instance of the IotDpsResourceClient client. +// NewIotDpsResourceClientWithBaseURI creates an instance of the IotDpsResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotDpsResourceClientWithBaseURI(baseURI string, subscriptionID string) IotDpsResourceClient { return IotDpsResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/iothubapi/interfaces.go b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/iothubapi/interfaces.go index e7776e76d435..7f76ea3d2a39 100644 --- a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/iothubapi/interfaces.go +++ b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/iothubapi/interfaces.go @@ -27,6 +27,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result iothub.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result iothub.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*iothub.OperationsClient)(nil) @@ -51,9 +52,13 @@ type IotDpsResourceClientAPI interface { GetKeysForKeyName(ctx context.Context, provisioningServiceName string, keyName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleAccessRightsDescription, err error) GetOperationResult(ctx context.Context, operationID string, resourceGroupName string, provisioningServiceName string, asyncinfo string) (result iothub.AsyncOperationResult, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result iothub.ProvisioningServiceDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result iothub.ProvisioningServiceDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result iothub.ProvisioningServiceDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result iothub.ProvisioningServiceDescriptionListResultIterator, err error) ListKeys(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) ListValidSkus(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.IotDpsSkuDefinitionListResultPage, err error) + ListValidSkusComplete(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.IotDpsSkuDefinitionListResultIterator, err error) } var _ IotDpsResourceClientAPI = (*iothub.IotDpsResourceClient)(nil) diff --git a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/operations.go b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/operations.go index 748f0a0522b6..96ce5d8a65d3 100644 --- a/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/operations.go +++ b/services/preview/provisioningservices/mgmt/2017-08-21-preview/iothub/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/reservations/mgmt/2018-06-01/reservations/client.go b/services/preview/reservations/mgmt/2018-06-01/reservations/client.go index 4313a376b36c..f6d4260830fb 100644 --- a/services/preview/reservations/mgmt/2018-06-01/reservations/client.go +++ b/services/preview/reservations/mgmt/2018-06-01/reservations/client.go @@ -44,7 +44,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/reservations/mgmt/2018-06-01/reservations/operation.go b/services/preview/reservations/mgmt/2018-06-01/reservations/operation.go index 4393ef2dfc9e..89dd9277ce54 100644 --- a/services/preview/reservations/mgmt/2018-06-01/reservations/operation.go +++ b/services/preview/reservations/mgmt/2018-06-01/reservations/operation.go @@ -35,7 +35,8 @@ func NewOperationClient() OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string) OperationClient { return OperationClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/reservations/mgmt/2018-06-01/reservations/order.go b/services/preview/reservations/mgmt/2018-06-01/reservations/order.go index 656e85b7f1ab..9ce984214386 100644 --- a/services/preview/reservations/mgmt/2018-06-01/reservations/order.go +++ b/services/preview/reservations/mgmt/2018-06-01/reservations/order.go @@ -35,7 +35,8 @@ func NewOrderClient() OrderClient { return NewOrderClientWithBaseURI(DefaultBaseURI) } -// NewOrderClientWithBaseURI creates an instance of the OrderClient client. +// NewOrderClientWithBaseURI creates an instance of the OrderClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOrderClientWithBaseURI(baseURI string) OrderClient { return OrderClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/reservations/mgmt/2018-06-01/reservations/reservation.go b/services/preview/reservations/mgmt/2018-06-01/reservations/reservation.go index 55383e481727..850159e6be2e 100644 --- a/services/preview/reservations/mgmt/2018-06-01/reservations/reservation.go +++ b/services/preview/reservations/mgmt/2018-06-01/reservations/reservation.go @@ -35,7 +35,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/preview/reservations/mgmt/2018-06-01/reservations/reservationsapi/interfaces.go b/services/preview/reservations/mgmt/2018-06-01/reservations/reservationsapi/interfaces.go index 2db537e10330..084389ccd066 100644 --- a/services/preview/reservations/mgmt/2018-06-01/reservations/reservationsapi/interfaces.go +++ b/services/preview/reservations/mgmt/2018-06-01/reservations/reservationsapi/interfaces.go @@ -34,6 +34,7 @@ var _ BaseClientAPI = (*reservations.BaseClient)(nil) type OrderClientAPI interface { Get(ctx context.Context, reservationOrderID string) (result reservations.OrderResponse, err error) List(ctx context.Context) (result reservations.OrderListPage, err error) + ListComplete(ctx context.Context) (result reservations.OrderListIterator, err error) } var _ OrderClientAPI = (*reservations.OrderClient)(nil) @@ -42,7 +43,9 @@ var _ OrderClientAPI = (*reservations.OrderClient)(nil) type ClientAPI interface { Get(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.Response, err error) List(ctx context.Context, reservationOrderID string) (result reservations.ListPage, err error) + ListComplete(ctx context.Context, reservationOrderID string) (result reservations.ListIterator, err error) ListRevisions(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.ListPage, err error) + ListRevisionsComplete(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.ListIterator, err error) Merge(ctx context.Context, reservationOrderID string, body reservations.MergeRequest) (result reservations.ReservationMergeFuture, err error) Split(ctx context.Context, reservationOrderID string, body reservations.SplitRequest) (result reservations.SplitFuture, err error) Update(ctx context.Context, reservationOrderID string, reservationID string, parameters reservations.Patch) (result reservations.ReservationUpdateFuture, err error) @@ -53,6 +56,7 @@ var _ ClientAPI = (*reservations.Client)(nil) // OperationClientAPI contains the set of methods on the OperationClient type. type OperationClientAPI interface { List(ctx context.Context) (result reservations.OperationListPage, err error) + ListComplete(ctx context.Context) (result reservations.OperationListIterator, err error) } var _ OperationClientAPI = (*reservations.OperationClient)(nil) diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/client.go b/services/preview/reservations/mgmt/2019-04-01/reservations/client.go index 27662ed4f1de..cea283d7eefb 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/client.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/client.go @@ -44,7 +44,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/operation.go b/services/preview/reservations/mgmt/2019-04-01/reservations/operation.go index 1f8a7fd6ac48..c6ecac5cb406 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/operation.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/operation.go @@ -35,7 +35,8 @@ func NewOperationClient() OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string) OperationClient { return OperationClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/order.go b/services/preview/reservations/mgmt/2019-04-01/reservations/order.go index fae3f04b0d82..4d398076f5ff 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/order.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/order.go @@ -35,7 +35,8 @@ func NewOrderClient() OrderClient { return NewOrderClientWithBaseURI(DefaultBaseURI) } -// NewOrderClientWithBaseURI creates an instance of the OrderClient client. +// NewOrderClientWithBaseURI creates an instance of the OrderClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOrderClientWithBaseURI(baseURI string) OrderClient { return OrderClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go b/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go index fd55c8b35a17..381dc93ecbf7 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go @@ -36,7 +36,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/reservationsapi/interfaces.go b/services/preview/reservations/mgmt/2019-04-01/reservations/reservationsapi/interfaces.go index 35f3341eaf2d..2780bb18ecb7 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/reservationsapi/interfaces.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/reservationsapi/interfaces.go @@ -35,7 +35,9 @@ type ClientAPI interface { AvailableScopes(ctx context.Context, reservationOrderID string, reservationID string, body []string) (result reservations.ReservationAvailableScopesFuture, err error) Get(ctx context.Context, reservationID string, reservationOrderID string, expand string) (result reservations.Response, err error) List(ctx context.Context, reservationOrderID string) (result reservations.ListPage, err error) + ListComplete(ctx context.Context, reservationOrderID string) (result reservations.ListIterator, err error) ListRevisions(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.ListPage, err error) + ListRevisionsComplete(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.ListIterator, err error) Merge(ctx context.Context, reservationOrderID string, body reservations.MergeRequest) (result reservations.ReservationMergeFuture, err error) Split(ctx context.Context, reservationOrderID string, body reservations.SplitRequest) (result reservations.SplitFuture, err error) Update(ctx context.Context, reservationOrderID string, reservationID string, parameters reservations.Patch) (result reservations.ReservationUpdateFuture, err error) @@ -48,6 +50,7 @@ type OrderClientAPI interface { Calculate(ctx context.Context, body reservations.PurchaseRequest) (result reservations.CalculatePriceResponse, err error) Get(ctx context.Context, reservationOrderID string, expand string) (result reservations.OrderResponse, err error) List(ctx context.Context) (result reservations.OrderListPage, err error) + ListComplete(ctx context.Context) (result reservations.OrderListIterator, err error) Purchase(ctx context.Context, reservationOrderID string, body reservations.PurchaseRequest) (result reservations.OrderPurchaseFuture, err error) } @@ -56,6 +59,7 @@ var _ OrderClientAPI = (*reservations.OrderClient)(nil) // OperationClientAPI contains the set of methods on the OperationClient type. type OperationClientAPI interface { List(ctx context.Context) (result reservations.OperationListPage, err error) + ListComplete(ctx context.Context) (result reservations.OperationListIterator, err error) } var _ OperationClientAPI = (*reservations.OperationClient)(nil) diff --git a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/client.go b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/client.go index 628c6b2865ea..29926c34e1bb 100644 --- a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/client.go +++ b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/graphquery.go b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/graphquery.go index 97607a265bfc..033691ad3bc9 100644 --- a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/graphquery.go +++ b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/graphquery.go @@ -36,7 +36,8 @@ func NewGraphQueryClient(subscriptionID string) GraphQueryClient { return NewGraphQueryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGraphQueryClientWithBaseURI creates an instance of the GraphQueryClient client. +// NewGraphQueryClientWithBaseURI creates an instance of the GraphQueryClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGraphQueryClientWithBaseURI(baseURI string, subscriptionID string) GraphQueryClient { return GraphQueryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/operations.go b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/operations.go index f5a453769026..76fedd5b356b 100644 --- a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/operations.go +++ b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/resourcegraphapi/interfaces.go b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/resourcegraphapi/interfaces.go index a717c0430d30..646adbce6bc4 100644 --- a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/resourcegraphapi/interfaces.go +++ b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/resourcegraphapi/interfaces.go @@ -35,6 +35,7 @@ var _ BaseClientAPI = (*resourcegraph.BaseClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result resourcegraph.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result resourcegraph.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*resourcegraph.OperationsClient)(nil) @@ -45,6 +46,7 @@ type GraphQueryClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result resourcegraph.GraphQueryResource, err error) List(ctx context.Context, resourceGroupName string) (result resourcegraph.GraphQueryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string) (result resourcegraph.GraphQueryListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, body resourcegraph.GraphQueryUpdateParameters) (result resourcegraph.GraphQueryResource, err error) } diff --git a/services/preview/resources/mgmt/2015-10-01-preview/policy/assignments.go b/services/preview/resources/mgmt/2015-10-01-preview/policy/assignments.go index 6c07210180ea..b37ef8c8a920 100644 --- a/services/preview/resources/mgmt/2015-10-01-preview/policy/assignments.go +++ b/services/preview/resources/mgmt/2015-10-01-preview/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } diff --git a/services/preview/resources/mgmt/2015-10-01-preview/policy/client.go b/services/preview/resources/mgmt/2015-10-01-preview/policy/client.go index 55d17bcc3b77..7d0bb92f9621 100644 --- a/services/preview/resources/mgmt/2015-10-01-preview/policy/client.go +++ b/services/preview/resources/mgmt/2015-10-01-preview/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/resources/mgmt/2015-10-01-preview/policy/definitions.go b/services/preview/resources/mgmt/2015-10-01-preview/policy/definitions.go index 2ad921ab302a..24d35f790406 100644 --- a/services/preview/resources/mgmt/2015-10-01-preview/policy/definitions.go +++ b/services/preview/resources/mgmt/2015-10-01-preview/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/resources/mgmt/2015-10-01-preview/policy/policyapi/interfaces.go b/services/preview/resources/mgmt/2015-10-01-preview/policy/policyapi/interfaces.go index e1c795cdbdd9..9ba839dcef90 100644 --- a/services/preview/resources/mgmt/2015-10-01-preview/policy/policyapi/interfaces.go +++ b/services/preview/resources/mgmt/2015-10-01-preview/policy/policyapi/interfaces.go @@ -32,8 +32,11 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) @@ -44,6 +47,7 @@ type DefinitionsClientAPI interface { Delete(ctx context.Context, policyDefinitionName string) (result autorest.Response, err error) Get(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context, filter string) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) diff --git a/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliancedefinitions.go b/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliancedefinitions.go index 8fca9c6b58d2..4f878eccbb56 100644 --- a/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliancedefinitions.go +++ b/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliancedefinitions.go @@ -36,7 +36,9 @@ func NewApplianceDefinitionsClient(subscriptionID string) ApplianceDefinitionsCl return NewApplianceDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplianceDefinitionsClientWithBaseURI creates an instance of the ApplianceDefinitionsClient client. +// NewApplianceDefinitionsClientWithBaseURI creates an instance of the ApplianceDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplianceDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ApplianceDefinitionsClient { return ApplianceDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliances.go b/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliances.go index 33ecbe2f27f9..bfc2ccd1015a 100644 --- a/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliances.go +++ b/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/appliances.go @@ -36,7 +36,8 @@ func NewAppliancesClient(subscriptionID string) AppliancesClient { return NewAppliancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppliancesClientWithBaseURI creates an instance of the AppliancesClient client. +// NewAppliancesClientWithBaseURI creates an instance of the AppliancesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppliancesClientWithBaseURI(baseURI string, subscriptionID string) AppliancesClient { return AppliancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/client.go b/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/client.go index 9cb93919a050..34f2213927e7 100644 --- a/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/client.go +++ b/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/managedapplicationsapi/interfaces.go b/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/managedapplicationsapi/interfaces.go index 7de2838138f4..cef421edcf5f 100644 --- a/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/managedapplicationsapi/interfaces.go +++ b/services/preview/resources/mgmt/2016-09-01-preview/managedapplications/managedapplicationsapi/interfaces.go @@ -25,6 +25,7 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { ListOperations(ctx context.Context) (result managedapplications.OperationListResultPage, err error) + ListOperationsComplete(ctx context.Context) (result managedapplications.OperationListResultIterator, err error) } var _ BaseClientAPI = (*managedapplications.BaseClient)(nil) @@ -38,7 +39,9 @@ type AppliancesClientAPI interface { Get(ctx context.Context, resourceGroupName string, applianceName string) (result managedapplications.Appliance, err error) GetByID(ctx context.Context, applianceID string) (result managedapplications.Appliance, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplianceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplianceListResultIterator, err error) ListBySubscription(ctx context.Context) (result managedapplications.ApplianceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result managedapplications.ApplianceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, applianceName string, parameters *managedapplications.Appliance) (result managedapplications.Appliance, err error) UpdateByID(ctx context.Context, applianceID string, parameters *managedapplications.Appliance) (result managedapplications.Appliance, err error) } @@ -54,6 +57,7 @@ type ApplianceDefinitionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, applianceDefinitionName string) (result managedapplications.ApplianceDefinition, err error) GetByID(ctx context.Context, applianceDefinitionID string) (result managedapplications.ApplianceDefinition, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplianceDefinitionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplianceDefinitionListResultIterator, err error) } var _ ApplianceDefinitionsClientAPI = (*managedapplications.ApplianceDefinitionsClient)(nil) diff --git a/services/preview/resources/mgmt/2017-06-01-preview/policy/assignments.go b/services/preview/resources/mgmt/2017-06-01-preview/policy/assignments.go index 3f08aabd299b..f5cb3fe039cb 100644 --- a/services/preview/resources/mgmt/2017-06-01-preview/policy/assignments.go +++ b/services/preview/resources/mgmt/2017-06-01-preview/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } diff --git a/services/preview/resources/mgmt/2017-06-01-preview/policy/client.go b/services/preview/resources/mgmt/2017-06-01-preview/policy/client.go index 34a8575e7a60..78c4c7c75be3 100644 --- a/services/preview/resources/mgmt/2017-06-01-preview/policy/client.go +++ b/services/preview/resources/mgmt/2017-06-01-preview/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/resources/mgmt/2017-06-01-preview/policy/definitions.go b/services/preview/resources/mgmt/2017-06-01-preview/policy/definitions.go index 3a0f4bca7db9..f3698cc7a01d 100644 --- a/services/preview/resources/mgmt/2017-06-01-preview/policy/definitions.go +++ b/services/preview/resources/mgmt/2017-06-01-preview/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/resources/mgmt/2017-06-01-preview/policy/policyapi/interfaces.go b/services/preview/resources/mgmt/2017-06-01-preview/policy/policyapi/interfaces.go index 923dfe2ed0e8..ac9d3d0166ea 100644 --- a/services/preview/resources/mgmt/2017-06-01-preview/policy/policyapi/interfaces.go +++ b/services/preview/resources/mgmt/2017-06-01-preview/policy/policyapi/interfaces.go @@ -32,8 +32,11 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) @@ -48,8 +51,11 @@ type SetDefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result policy.SetDefinition, err error) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result policy.SetDefinition, err error) List(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultIterator, err error) } var _ SetDefinitionsClientAPI = (*policy.SetDefinitionsClient)(nil) @@ -64,8 +70,11 @@ type DefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result policy.Definition, err error) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) diff --git a/services/preview/resources/mgmt/2017-06-01-preview/policy/setdefinitions.go b/services/preview/resources/mgmt/2017-06-01-preview/policy/setdefinitions.go index 6612e2fbeb6f..e003084d3a58 100644 --- a/services/preview/resources/mgmt/2017-06-01-preview/policy/setdefinitions.go +++ b/services/preview/resources/mgmt/2017-06-01-preview/policy/setdefinitions.go @@ -37,7 +37,8 @@ func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient { return NewSetDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client. +// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient { return SetDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/client.go b/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/client.go index 50176c26bad1..2d0800c3c23a 100644 --- a/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/client.go +++ b/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/client.go @@ -45,7 +45,8 @@ func New(groupID uuid.UUID) BaseClient { return NewWithBaseURI(DefaultBaseURI, groupID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, groupID uuid.UUID) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/managementgroups.go b/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/managementgroups.go index 49849c0c6c55..09ef45fa1ff3 100644 --- a/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/managementgroups.go +++ b/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/managementgroups.go @@ -38,7 +38,8 @@ func NewClient(groupID uuid.UUID) Client { return NewClientWithBaseURI(DefaultBaseURI, groupID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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, groupID uuid.UUID) Client { return Client{NewWithBaseURI(baseURI, groupID)} } diff --git a/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/managementgroupsapi/interfaces.go b/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/managementgroupsapi/interfaces.go index b67b7cb2574b..f1e69357243f 100644 --- a/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/managementgroupsapi/interfaces.go +++ b/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/managementgroupsapi/interfaces.go @@ -26,6 +26,7 @@ import ( type ClientAPI interface { Get(ctx context.Context, expand string, recurse *bool) (result managementgroups.WithHierarchy, err error) List(ctx context.Context, skiptoken string) (result managementgroups.ListResultPage, err error) + ListComplete(ctx context.Context, skiptoken string) (result managementgroups.ListResultIterator, err error) } var _ ClientAPI = (*managementgroups.Client)(nil) @@ -33,6 +34,7 @@ var _ ClientAPI = (*managementgroups.Client)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result managementgroups.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result managementgroups.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil) diff --git a/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/operations.go b/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/operations.go index c34e309ee5ad..67f06608013c 100644 --- a/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/operations.go +++ b/services/preview/resources/mgmt/2017-08-31-preview/managementgroups/operations.go @@ -38,7 +38,8 @@ func NewOperationsClient(groupID uuid.UUID) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, groupID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, groupID uuid.UUID) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, groupID)} } diff --git a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/client.go b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/client.go index 8a47980159fb..bdbf161d3c2d 100644 --- a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/client.go +++ b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/client.go @@ -43,7 +43,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/managementgroups.go b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/managementgroups.go index 384ef9fd2bd1..bbfd5ddb9fac 100644 --- a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/managementgroups.go +++ b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/managementgroups.go @@ -37,7 +37,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/managementgroupsapi/interfaces.go b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/managementgroupsapi/interfaces.go index 844f83e3e1d7..d4269f3e9daa 100644 --- a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/managementgroupsapi/interfaces.go +++ b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/managementgroupsapi/interfaces.go @@ -29,6 +29,7 @@ type ClientAPI interface { Delete(ctx context.Context, groupID string, cacheControl string) (result autorest.Response, err error) Get(ctx context.Context, groupID string, expand string, recurse *bool, cacheControl string) (result managementgroups.ManagementGroup, err error) List(ctx context.Context, cacheControl string, skiptoken string) (result managementgroups.ListResultPage, err error) + ListComplete(ctx context.Context, cacheControl string, skiptoken string) (result managementgroups.ListResultIterator, err error) Update(ctx context.Context, groupID string, createManagementGroupRequest managementgroups.CreateManagementGroupRequest, cacheControl string) (result managementgroups.ManagementGroup, err error) } @@ -45,6 +46,7 @@ var _ SubscriptionsClientAPI = (*managementgroups.SubscriptionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result managementgroups.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result managementgroups.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil) diff --git a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/operations.go b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/operations.go index 2ce72402b91f..f1bc0286e778 100644 --- a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/operations.go +++ b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/subscriptions.go b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/subscriptions.go index 1ae19685e09d..68d90ff3d2e3 100644 --- a/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/subscriptions.go +++ b/services/preview/resources/mgmt/2017-11-01-preview/managementgroups/subscriptions.go @@ -37,7 +37,8 @@ func NewSubscriptionsClient() SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/client.go b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/client.go index 1453100d3f59..f153829ebf5a 100644 --- a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/client.go +++ b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/client.go @@ -49,7 +49,8 @@ func New(operationResultID string, skiptoken string) BaseClient { return NewWithBaseURI(DefaultBaseURI, operationResultID, skiptoken) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, operationResultID string, skiptoken string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/entities.go b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/entities.go index b8888df47954..2c8335973172 100644 --- a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/entities.go +++ b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/entities.go @@ -37,7 +37,8 @@ func NewEntitiesClient(operationResultID string, skiptoken string) EntitiesClien return NewEntitiesClientWithBaseURI(DefaultBaseURI, operationResultID, skiptoken) } -// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client. +// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEntitiesClientWithBaseURI(baseURI string, operationResultID string, skiptoken string) EntitiesClient { return EntitiesClient{NewWithBaseURI(baseURI, operationResultID, skiptoken)} } diff --git a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/managementgroups.go b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/managementgroups.go index 1f59297717a6..f88a23f85d0b 100644 --- a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/managementgroups.go +++ b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/managementgroups.go @@ -37,7 +37,8 @@ func NewClient(operationResultID string, skiptoken string) Client { return NewClientWithBaseURI(DefaultBaseURI, operationResultID, skiptoken) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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, operationResultID string, skiptoken string) Client { return Client{NewWithBaseURI(baseURI, operationResultID, skiptoken)} } diff --git a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/managementgroupsapi/interfaces.go b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/managementgroupsapi/interfaces.go index 24d76d3fb8c5..f8f3de111763 100644 --- a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/managementgroupsapi/interfaces.go +++ b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/managementgroupsapi/interfaces.go @@ -36,6 +36,7 @@ type ClientAPI interface { Delete(ctx context.Context, groupID string, cacheControl string) (result managementgroups.DeleteFuture, err error) Get(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (result managementgroups.ManagementGroup, err error) List(ctx context.Context, cacheControl string) (result managementgroups.ListResultPage, err error) + ListComplete(ctx context.Context, cacheControl string) (result managementgroups.ListResultIterator, err error) Update(ctx context.Context, groupID string, patchGroupRequest managementgroups.PatchManagementGroupRequest, cacheControl string) (result managementgroups.ManagementGroup, err error) } @@ -52,6 +53,7 @@ var _ SubscriptionsClientAPI = (*managementgroups.SubscriptionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result managementgroups.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result managementgroups.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil) @@ -59,6 +61,7 @@ var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil) // EntitiesClientAPI contains the set of methods on the EntitiesClient type. type EntitiesClientAPI interface { List(ctx context.Context, groupName string, cacheControl string) (result managementgroups.EntityListResultPage, err error) + ListComplete(ctx context.Context, groupName string, cacheControl string) (result managementgroups.EntityListResultIterator, err error) } var _ EntitiesClientAPI = (*managementgroups.EntitiesClient)(nil) diff --git a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/operations.go b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/operations.go index 8b167583d4a3..ba2b884185f7 100644 --- a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/operations.go +++ b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(operationResultID string, skiptoken string) OperationsC return NewOperationsClientWithBaseURI(DefaultBaseURI, operationResultID, skiptoken) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, operationResultID string, skiptoken string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, operationResultID, skiptoken)} } diff --git a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/subscriptions.go b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/subscriptions.go index 56ee777a21ce..574ea9eeb56f 100644 --- a/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/subscriptions.go +++ b/services/preview/resources/mgmt/2018-01-01-preview/managementgroups/subscriptions.go @@ -37,7 +37,8 @@ func NewSubscriptionsClient(operationResultID string, skiptoken string) Subscrip return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, operationResultID, skiptoken) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string, operationResultID string, skiptoken string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, operationResultID, skiptoken)} } diff --git a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/client.go b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/client.go index ee4e271a6255..81a3ac6e3c6d 100644 --- a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/client.go +++ b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/client.go @@ -45,7 +45,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/entities.go b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/entities.go index 57e159a42cad..09217817ad84 100644 --- a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/entities.go +++ b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/entities.go @@ -37,7 +37,8 @@ func NewEntitiesClient() EntitiesClient { return NewEntitiesClientWithBaseURI(DefaultBaseURI) } -// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client. +// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEntitiesClientWithBaseURI(baseURI string) EntitiesClient { return EntitiesClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go index 1fbbbbcb75f9..edbb45d1a400 100644 --- a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go +++ b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go @@ -36,7 +36,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroupsapi/interfaces.go b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroupsapi/interfaces.go index 62f793a95f0a..9518e928ec97 100644 --- a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroupsapi/interfaces.go +++ b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroupsapi/interfaces.go @@ -38,7 +38,9 @@ type ClientAPI interface { Delete(ctx context.Context, groupID string, cacheControl string) (result managementgroups.DeleteFuture, err error) Get(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (result managementgroups.ManagementGroup, err error) GetDescendants(ctx context.Context, groupID string, skiptoken string, top *int32) (result managementgroups.DescendantListResultPage, err error) + GetDescendantsComplete(ctx context.Context, groupID string, skiptoken string, top *int32) (result managementgroups.DescendantListResultIterator, err error) List(ctx context.Context, cacheControl string, skiptoken string) (result managementgroups.ListResultPage, err error) + ListComplete(ctx context.Context, cacheControl string, skiptoken string) (result managementgroups.ListResultIterator, err error) Update(ctx context.Context, groupID string, patchGroupRequest managementgroups.PatchManagementGroupRequest, cacheControl string) (result managementgroups.ManagementGroup, err error) } @@ -55,6 +57,7 @@ var _ SubscriptionsClientAPI = (*managementgroups.SubscriptionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result managementgroups.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result managementgroups.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil) @@ -62,6 +65,7 @@ var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil) // EntitiesClientAPI contains the set of methods on the EntitiesClient type. type EntitiesClientAPI interface { List(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result managementgroups.EntityListResultPage, err error) + ListComplete(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result managementgroups.EntityListResultIterator, err error) } var _ EntitiesClientAPI = (*managementgroups.EntitiesClient)(nil) diff --git a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/operations.go b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/operations.go index 1eb764b2fe6d..ea0de267567d 100644 --- a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/operations.go +++ b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/subscriptions.go b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/subscriptions.go index dd2309b1e108..e579e15b0fa4 100644 --- a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/subscriptions.go +++ b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/subscriptions.go @@ -37,7 +37,8 @@ func NewSubscriptionsClient() SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/client.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/client.go index 5be449ad0697..dde1db7f17e5 100644 --- a/services/preview/resources/mgmt/2019-11-01/managementgroups/client.go +++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/client.go @@ -45,7 +45,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/entities.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/entities.go index 3e896423ea6d..fe3d0b7e762c 100644 --- a/services/preview/resources/mgmt/2019-11-01/managementgroups/entities.go +++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/entities.go @@ -37,7 +37,8 @@ func NewEntitiesClient() EntitiesClient { return NewEntitiesClientWithBaseURI(DefaultBaseURI) } -// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client. +// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEntitiesClientWithBaseURI(baseURI string) EntitiesClient { return EntitiesClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go index 357f80eaa8a1..e41bb325370a 100644 --- a/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go +++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go @@ -36,7 +36,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroupsapi/interfaces.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroupsapi/interfaces.go index 9a1be3540911..7478ac183fe1 100644 --- a/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroupsapi/interfaces.go +++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroupsapi/interfaces.go @@ -38,7 +38,9 @@ type ClientAPI interface { Delete(ctx context.Context, groupID string, cacheControl string) (result managementgroups.DeleteFuture, err error) Get(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (result managementgroups.ManagementGroup, err error) GetDescendants(ctx context.Context, groupID string, skiptoken string, top *int32) (result managementgroups.DescendantListResultPage, err error) + GetDescendantsComplete(ctx context.Context, groupID string, skiptoken string, top *int32) (result managementgroups.DescendantListResultIterator, err error) List(ctx context.Context, cacheControl string, skiptoken string) (result managementgroups.ListResultPage, err error) + ListComplete(ctx context.Context, cacheControl string, skiptoken string) (result managementgroups.ListResultIterator, err error) Update(ctx context.Context, groupID string, patchGroupRequest managementgroups.PatchManagementGroupRequest, cacheControl string) (result managementgroups.ManagementGroup, err error) } @@ -55,6 +57,7 @@ var _ SubscriptionsClientAPI = (*managementgroups.SubscriptionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result managementgroups.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result managementgroups.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil) @@ -62,6 +65,7 @@ var _ OperationsClientAPI = (*managementgroups.OperationsClient)(nil) // EntitiesClientAPI contains the set of methods on the EntitiesClient type. type EntitiesClientAPI interface { List(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result managementgroups.EntityListResultPage, err error) + ListComplete(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result managementgroups.EntityListResultIterator, err error) } var _ EntitiesClientAPI = (*managementgroups.EntitiesClient)(nil) diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/operations.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/operations.go index 5bebd8a89e72..55731b81c02d 100644 --- a/services/preview/resources/mgmt/2019-11-01/managementgroups/operations.go +++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/subscriptions.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/subscriptions.go index f3cb269d9bf6..a32d6cf97489 100644 --- a/services/preview/resources/mgmt/2019-11-01/managementgroups/subscriptions.go +++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/subscriptions.go @@ -37,7 +37,8 @@ func NewSubscriptionsClient() SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/client.go b/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/client.go index 30c7fa4b9d5c..72adc493478b 100644 --- a/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/client.go +++ b/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/jobcollections.go b/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/jobcollections.go index 0dc4ee638cda..88eee391e9e3 100644 --- a/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/jobcollections.go +++ b/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/jobcollections.go @@ -35,7 +35,8 @@ func NewJobCollectionsClient(subscriptionID string) JobCollectionsClient { return NewJobCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCollectionsClientWithBaseURI creates an instance of the JobCollectionsClient client. +// NewJobCollectionsClientWithBaseURI creates an instance of the JobCollectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobCollectionsClientWithBaseURI(baseURI string, subscriptionID string) JobCollectionsClient { return JobCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/jobs.go b/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/jobs.go index 0ac2c003d745..d6cf80bd76ea 100644 --- a/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/jobs.go +++ b/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/jobs.go @@ -35,7 +35,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/schedulerapi/interfaces.go b/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/schedulerapi/interfaces.go index fb577eaa8202..f0511bc8b979 100644 --- a/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/schedulerapi/interfaces.go +++ b/services/preview/scheduler/mgmt/2014-08-01-preview/scheduler/schedulerapi/interfaces.go @@ -31,7 +31,9 @@ type JobCollectionsClientAPI interface { Enable(ctx context.Context, resourceGroupName string, jobCollectionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, jobCollectionName string) (result scheduler.JobCollectionDefinition, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result scheduler.JobCollectionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result scheduler.JobCollectionListResultIterator, err error) ListBySubscription(ctx context.Context) (result scheduler.JobCollectionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result scheduler.JobCollectionListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, jobCollectionName string, jobCollection scheduler.JobCollectionDefinition) (result scheduler.JobCollectionDefinition, err error) } @@ -43,7 +45,9 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result scheduler.JobDefinition, err error) List(ctx context.Context, resourceGroupName string, jobCollectionName string, top *int32, skip *int32, filter string) (result scheduler.JobListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, jobCollectionName string, top *int32, skip *int32, filter string) (result scheduler.JobListResultIterator, err error) ListJobHistory(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string) (result scheduler.JobHistoryListResultPage, err error) + ListJobHistoryComplete(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string) (result scheduler.JobHistoryListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, job scheduler.JobDefinition) (result scheduler.JobDefinition, err error) Run(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result autorest.Response, err error) } diff --git a/services/preview/security/mgmt/v1.0/security/adaptiveapplicationcontrols.go b/services/preview/security/mgmt/v1.0/security/adaptiveapplicationcontrols.go index 0710d2febfe7..3ac61acc5526 100644 --- a/services/preview/security/mgmt/v1.0/security/adaptiveapplicationcontrols.go +++ b/services/preview/security/mgmt/v1.0/security/adaptiveapplicationcontrols.go @@ -36,7 +36,9 @@ func NewAdaptiveApplicationControlsClient(subscriptionID string, ascLocation str return NewAdaptiveApplicationControlsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAdaptiveApplicationControlsClientWithBaseURI creates an instance of the AdaptiveApplicationControlsClient client. +// NewAdaptiveApplicationControlsClientWithBaseURI creates an instance of the AdaptiveApplicationControlsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAdaptiveApplicationControlsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AdaptiveApplicationControlsClient { return AdaptiveApplicationControlsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/adaptivenetworkhardenings.go b/services/preview/security/mgmt/v1.0/security/adaptivenetworkhardenings.go index 54088237d8b7..ffd421e4b67e 100644 --- a/services/preview/security/mgmt/v1.0/security/adaptivenetworkhardenings.go +++ b/services/preview/security/mgmt/v1.0/security/adaptivenetworkhardenings.go @@ -36,7 +36,9 @@ func NewAdaptiveNetworkHardeningsClient(subscriptionID string, ascLocation strin return NewAdaptiveNetworkHardeningsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAdaptiveNetworkHardeningsClientWithBaseURI creates an instance of the AdaptiveNetworkHardeningsClient client. +// NewAdaptiveNetworkHardeningsClientWithBaseURI creates an instance of the AdaptiveNetworkHardeningsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAdaptiveNetworkHardeningsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AdaptiveNetworkHardeningsClient { return AdaptiveNetworkHardeningsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/advancedthreatprotection.go b/services/preview/security/mgmt/v1.0/security/advancedthreatprotection.go index 7fe28de28f1e..227375e3f00e 100644 --- a/services/preview/security/mgmt/v1.0/security/advancedthreatprotection.go +++ b/services/preview/security/mgmt/v1.0/security/advancedthreatprotection.go @@ -35,7 +35,9 @@ func NewAdvancedThreatProtectionClient(subscriptionID string, ascLocation string return NewAdvancedThreatProtectionClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAdvancedThreatProtectionClientWithBaseURI creates an instance of the AdvancedThreatProtectionClient client. +// NewAdvancedThreatProtectionClientWithBaseURI creates an instance of the AdvancedThreatProtectionClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAdvancedThreatProtectionClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AdvancedThreatProtectionClient { return AdvancedThreatProtectionClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/alerts.go b/services/preview/security/mgmt/v1.0/security/alerts.go index 5934b920847d..8676de54ab1d 100644 --- a/services/preview/security/mgmt/v1.0/security/alerts.go +++ b/services/preview/security/mgmt/v1.0/security/alerts.go @@ -36,7 +36,8 @@ func NewAlertsClient(subscriptionID string, ascLocation string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/allowedconnections.go b/services/preview/security/mgmt/v1.0/security/allowedconnections.go index 74410ff36635..c761a4c3ccce 100644 --- a/services/preview/security/mgmt/v1.0/security/allowedconnections.go +++ b/services/preview/security/mgmt/v1.0/security/allowedconnections.go @@ -36,7 +36,9 @@ func NewAllowedConnectionsClient(subscriptionID string, ascLocation string) Allo return NewAllowedConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAllowedConnectionsClientWithBaseURI creates an instance of the AllowedConnectionsClient client. +// NewAllowedConnectionsClientWithBaseURI creates an instance of the AllowedConnectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAllowedConnectionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AllowedConnectionsClient { return AllowedConnectionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/automations.go b/services/preview/security/mgmt/v1.0/security/automations.go index 605cb35a072d..855f8dd218f2 100644 --- a/services/preview/security/mgmt/v1.0/security/automations.go +++ b/services/preview/security/mgmt/v1.0/security/automations.go @@ -36,7 +36,8 @@ func NewAutomationsClient(subscriptionID string, ascLocation string) Automations return NewAutomationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAutomationsClientWithBaseURI creates an instance of the AutomationsClient client. +// NewAutomationsClientWithBaseURI creates an instance of the AutomationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAutomationsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AutomationsClient { return AutomationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/autoprovisioningsettings.go b/services/preview/security/mgmt/v1.0/security/autoprovisioningsettings.go index 87799c76d1e9..6e3b8c64871e 100644 --- a/services/preview/security/mgmt/v1.0/security/autoprovisioningsettings.go +++ b/services/preview/security/mgmt/v1.0/security/autoprovisioningsettings.go @@ -36,7 +36,9 @@ func NewAutoProvisioningSettingsClient(subscriptionID string, ascLocation string return NewAutoProvisioningSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAutoProvisioningSettingsClientWithBaseURI creates an instance of the AutoProvisioningSettingsClient client. +// NewAutoProvisioningSettingsClientWithBaseURI creates an instance of the AutoProvisioningSettingsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAutoProvisioningSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AutoProvisioningSettingsClient { return AutoProvisioningSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/client.go b/services/preview/security/mgmt/v1.0/security/client.go index c1db0ec1e825..ca26dee802e7 100644 --- a/services/preview/security/mgmt/v1.0/security/client.go +++ b/services/preview/security/mgmt/v1.0/security/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, ascLocation string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, ascLocation string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/security/mgmt/v1.0/security/compliances.go b/services/preview/security/mgmt/v1.0/security/compliances.go index 697c6f0be430..f7b5b7351067 100644 --- a/services/preview/security/mgmt/v1.0/security/compliances.go +++ b/services/preview/security/mgmt/v1.0/security/compliances.go @@ -35,7 +35,8 @@ func NewCompliancesClient(subscriptionID string, ascLocation string) Compliances return NewCompliancesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewCompliancesClientWithBaseURI creates an instance of the CompliancesClient client. +// NewCompliancesClientWithBaseURI creates an instance of the CompliancesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCompliancesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) CompliancesClient { return CompliancesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/contacts.go b/services/preview/security/mgmt/v1.0/security/contacts.go index 91b3b63e4fe2..abb4374767a9 100644 --- a/services/preview/security/mgmt/v1.0/security/contacts.go +++ b/services/preview/security/mgmt/v1.0/security/contacts.go @@ -36,7 +36,8 @@ func NewContactsClient(subscriptionID string, ascLocation string) ContactsClient return NewContactsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewContactsClientWithBaseURI creates an instance of the ContactsClient client. +// NewContactsClientWithBaseURI creates an instance of the ContactsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContactsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) ContactsClient { return ContactsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/devicesecuritygroups.go b/services/preview/security/mgmt/v1.0/security/devicesecuritygroups.go index 4bee8c464456..b22352e75335 100644 --- a/services/preview/security/mgmt/v1.0/security/devicesecuritygroups.go +++ b/services/preview/security/mgmt/v1.0/security/devicesecuritygroups.go @@ -35,7 +35,9 @@ func NewDeviceSecurityGroupsClient(subscriptionID string, ascLocation string) De return NewDeviceSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewDeviceSecurityGroupsClientWithBaseURI creates an instance of the DeviceSecurityGroupsClient client. +// NewDeviceSecurityGroupsClientWithBaseURI creates an instance of the DeviceSecurityGroupsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeviceSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DeviceSecurityGroupsClient { return DeviceSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/discoveredsecuritysolutions.go b/services/preview/security/mgmt/v1.0/security/discoveredsecuritysolutions.go index 5e0d45e1cdcd..f994891f6a74 100644 --- a/services/preview/security/mgmt/v1.0/security/discoveredsecuritysolutions.go +++ b/services/preview/security/mgmt/v1.0/security/discoveredsecuritysolutions.go @@ -36,7 +36,9 @@ func NewDiscoveredSecuritySolutionsClient(subscriptionID string, ascLocation str return NewDiscoveredSecuritySolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewDiscoveredSecuritySolutionsClientWithBaseURI creates an instance of the DiscoveredSecuritySolutionsClient client. +// NewDiscoveredSecuritySolutionsClientWithBaseURI creates an instance of the DiscoveredSecuritySolutionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiscoveredSecuritySolutionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DiscoveredSecuritySolutionsClient { return DiscoveredSecuritySolutionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/externalsecuritysolutions.go b/services/preview/security/mgmt/v1.0/security/externalsecuritysolutions.go index 883f4e529cfd..405d18b2de94 100644 --- a/services/preview/security/mgmt/v1.0/security/externalsecuritysolutions.go +++ b/services/preview/security/mgmt/v1.0/security/externalsecuritysolutions.go @@ -36,7 +36,9 @@ func NewExternalSecuritySolutionsClient(subscriptionID string, ascLocation strin return NewExternalSecuritySolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewExternalSecuritySolutionsClientWithBaseURI creates an instance of the ExternalSecuritySolutionsClient client. +// NewExternalSecuritySolutionsClientWithBaseURI creates an instance of the ExternalSecuritySolutionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewExternalSecuritySolutionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) ExternalSecuritySolutionsClient { return ExternalSecuritySolutionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/informationprotectionpolicies.go b/services/preview/security/mgmt/v1.0/security/informationprotectionpolicies.go index 160668c2d5ff..4202bb463fd3 100644 --- a/services/preview/security/mgmt/v1.0/security/informationprotectionpolicies.go +++ b/services/preview/security/mgmt/v1.0/security/informationprotectionpolicies.go @@ -36,7 +36,8 @@ func NewInformationProtectionPoliciesClient(subscriptionID string, ascLocation s } // NewInformationProtectionPoliciesClientWithBaseURI creates an instance of the InformationProtectionPoliciesClient -// 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 NewInformationProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) InformationProtectionPoliciesClient { return InformationProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/jitnetworkaccesspolicies.go b/services/preview/security/mgmt/v1.0/security/jitnetworkaccesspolicies.go index 0aa96db56670..b5aead1c6d04 100644 --- a/services/preview/security/mgmt/v1.0/security/jitnetworkaccesspolicies.go +++ b/services/preview/security/mgmt/v1.0/security/jitnetworkaccesspolicies.go @@ -36,7 +36,9 @@ func NewJitNetworkAccessPoliciesClient(subscriptionID string, ascLocation string return NewJitNetworkAccessPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewJitNetworkAccessPoliciesClientWithBaseURI creates an instance of the JitNetworkAccessPoliciesClient client. +// NewJitNetworkAccessPoliciesClientWithBaseURI creates an instance of the JitNetworkAccessPoliciesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewJitNetworkAccessPoliciesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) JitNetworkAccessPoliciesClient { return JitNetworkAccessPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/locations.go b/services/preview/security/mgmt/v1.0/security/locations.go index 94917385fe7e..18ecc473ff74 100644 --- a/services/preview/security/mgmt/v1.0/security/locations.go +++ b/services/preview/security/mgmt/v1.0/security/locations.go @@ -36,7 +36,8 @@ func NewLocationsClient(subscriptionID string, ascLocation string) LocationsClie return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/models.go b/services/preview/security/mgmt/v1.0/security/models.go index 49f752621d6a..51f352e9babf 100644 --- a/services/preview/security/mgmt/v1.0/security/models.go +++ b/services/preview/security/mgmt/v1.0/security/models.go @@ -648,17 +648,17 @@ func PossibleSeverityValues() []Severity { type Source string const ( - // SourceAws ... - SourceAws Source = "Aws" // SourceAzure ... SourceAzure Source = "Azure" + // SourceOnPremise ... + SourceOnPremise Source = "OnPremise" // SourceResourceDetails ... SourceResourceDetails Source = "ResourceDetails" ) // PossibleSourceValues returns an array of possible values for the Source const type. func PossibleSourceValues() []Source { - return []Source{SourceAws, SourceAzure, SourceResourceDetails} + return []Source{SourceAzure, SourceOnPremise, SourceResourceDetails} } // SourceSystem enumerates the values for source system. @@ -2553,7 +2553,8 @@ func (aa AutomationAction) AsBasicAutomationAction() (BasicAutomationAction, boo return &aa, true } -// AutomationActionEventHub the target Event Hub to which event data will be exported. +// AutomationActionEventHub the target Event Hub to which event data will be exported. To learn more about +// Security Center continuous export capabilities, visit https://aka.ms/ASCExportLearnMore type AutomationActionEventHub struct { // EventHubResourceID - The target Event Hub Azure Resource ID. EventHubResourceID *string `json:"eventHubResourceId,omitempty"` @@ -2606,7 +2607,8 @@ func (aaeh AutomationActionEventHub) AsBasicAutomationAction() (BasicAutomationA return &aaeh, true } -// AutomationActionLogicApp the logic app action that should be triggered. +// AutomationActionLogicApp the logic app action that should be triggered. To learn more about Security +// Center's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore type AutomationActionLogicApp struct { // LogicAppResourceID - The triggered Logic App Azure Resource ID. This can also reside on other subscriptions, given that you have permissions to trigger the Logic App LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` @@ -2661,7 +2663,8 @@ func (aala AutomationActionLogicApp) AsBasicAutomationAction() (BasicAutomationA // alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the // 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order // to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be -// enabled on that workspace. +// enabled on that workspace. To learn more about Security Center continuous export capabilities, visit +// https://aka.ms/ASCExportLearnMore type AutomationActionWorkspace struct { // WorkspaceResourceID - The fully qualified Log Analytics Workspace Azure Resource ID. WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` @@ -2962,7 +2965,7 @@ type AutomationTriggeringRule struct { PropertyType PropertyType `json:"propertyType,omitempty"` // ExpectedValue - The expected value. ExpectedValue *string `json:"expectedValue,omitempty"` - // Operator - A valid comparer operator to use. Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' + // Operator - A valid comparer operator to use. A case-insensitive comparison will be applied for String PropertyType. Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' Operator Operator `json:"operator,omitempty"` } @@ -3201,51 +3204,11 @@ type AutoProvisioningSettingProperties struct { AutoProvision AutoProvision `json:"autoProvision,omitempty"` } -// AwsResourceDetails details of the resource that was assessed -type AwsResourceDetails struct { - // AccountID - READ-ONLY; AWS account ID - AccountID *string `json:"accountId,omitempty"` - // AwsResourceID - READ-ONLY; AWS resource ID. can be ARN or other - AwsResourceID *string `json:"awsResourceId,omitempty"` - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' - Source Source `json:"source,omitempty"` -} - -// MarshalJSON is the custom marshaler for AwsResourceDetails. -func (ard AwsResourceDetails) MarshalJSON() ([]byte, error) { - ard.Source = SourceAws - objectMap := make(map[string]interface{}) - if ard.Source != "" { - objectMap["source"] = ard.Source - } - return json.Marshal(objectMap) -} - -// AsAzureResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { - return nil, false -} - -// AsAwsResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { - return &ard, true -} - -// AsResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { - return nil, false -} - -// AsBasicResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsBasicResourceDetails() (BasicResourceDetails, bool) { - return &ard, true -} - -// AzureResourceDetails details of the resource that was assessed +// AzureResourceDetails details of the Azure resource that was assessed type AzureResourceDetails struct { - // ID - READ-ONLY; Azure resource ID of the assessed resource + // ID - READ-ONLY; Azure resource Id of the assessed resource ID *string `json:"id,omitempty"` - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' Source Source `json:"source,omitempty"` } @@ -3259,16 +3222,16 @@ func (ard AzureResourceDetails) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. +func (ard AzureResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { + return nil, false +} + // AsAzureResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. func (ard AzureResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { return &ard, true } -// AsAwsResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. -func (ard AzureResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { - return nil, false -} - // AsResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. func (ard AzureResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { return nil, false @@ -5694,6 +5657,62 @@ type Location struct { Location *string `json:"location,omitempty"` } +// OnPremiseResourceDetails details of the On Premise resource that was assessed +type OnPremiseResourceDetails struct { + // WorkspaceID - Azure resource Id of the workspace the machine is attached to + WorkspaceID *string `json:"workspaceId,omitempty"` + // Vmuuid - The unique Id of the machine + Vmuuid *string `json:"vmuuid,omitempty"` + // SourceComputerID - The oms agent Id installed on the machine + SourceComputerID *string `json:"sourceComputerId,omitempty"` + // MachineName - The name of the machine + MachineName *string `json:"machineName,omitempty"` + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' + Source Source `json:"source,omitempty"` +} + +// MarshalJSON is the custom marshaler for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) MarshalJSON() ([]byte, error) { + oprd.Source = SourceOnPremise + objectMap := make(map[string]interface{}) + if oprd.WorkspaceID != nil { + objectMap["workspaceId"] = oprd.WorkspaceID + } + if oprd.Vmuuid != nil { + objectMap["vmuuid"] = oprd.Vmuuid + } + if oprd.SourceComputerID != nil { + objectMap["sourceComputerId"] = oprd.SourceComputerID + } + if oprd.MachineName != nil { + objectMap["machineName"] = oprd.MachineName + } + if oprd.Source != "" { + objectMap["source"] = oprd.Source + } + return json.Marshal(objectMap) +} + +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { + return &oprd, true +} + +// AsAzureResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { + return nil, false +} + +// AsResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { + return nil, false +} + +// AsBasicResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsBasicResourceDetails() (BasicResourceDetails, bool) { + return &oprd, true +} + // Operation possible operation in the REST API of Microsoft.Security type Operation struct { // Name - READ-ONLY; Name of the operation @@ -6848,14 +6867,14 @@ type Resource struct { // BasicResourceDetails details of the resource that was assessed type BasicResourceDetails interface { + AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) AsAzureResourceDetails() (*AzureResourceDetails, bool) - AsAwsResourceDetails() (*AwsResourceDetails, bool) AsResourceDetails() (*ResourceDetails, bool) } // ResourceDetails details of the resource that was assessed type ResourceDetails struct { - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' Source Source `json:"source,omitempty"` } @@ -6867,14 +6886,14 @@ func unmarshalBasicResourceDetails(body []byte) (BasicResourceDetails, error) { } switch m["source"] { + case string(SourceOnPremise): + var oprd OnPremiseResourceDetails + err := json.Unmarshal(body, &oprd) + return oprd, err case string(SourceAzure): var ard AzureResourceDetails err := json.Unmarshal(body, &ard) return ard, err - case string(SourceAws): - var ard AwsResourceDetails - err := json.Unmarshal(body, &ard) - return ard, err default: var rd ResourceDetails err := json.Unmarshal(body, &rd) @@ -6910,13 +6929,13 @@ func (rd ResourceDetails) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsAzureResourceDetails is the BasicResourceDetails implementation for ResourceDetails. -func (rd ResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for ResourceDetails. +func (rd ResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { return nil, false } -// AsAwsResourceDetails is the BasicResourceDetails implementation for ResourceDetails. -func (rd ResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { +// AsAzureResourceDetails is the BasicResourceDetails implementation for ResourceDetails. +func (rd ResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { return nil, false } diff --git a/services/preview/security/mgmt/v1.0/security/operations.go b/services/preview/security/mgmt/v1.0/security/operations.go index 343293875ddf..b4a74214e886 100644 --- a/services/preview/security/mgmt/v1.0/security/operations.go +++ b/services/preview/security/mgmt/v1.0/security/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, ascLocation string) OperationsCl return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, ascLocation string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/pricings.go b/services/preview/security/mgmt/v1.0/security/pricings.go index 800cbf0e76d2..48b62bf50247 100644 --- a/services/preview/security/mgmt/v1.0/security/pricings.go +++ b/services/preview/security/mgmt/v1.0/security/pricings.go @@ -36,7 +36,8 @@ func NewPricingsClient(subscriptionID string, ascLocation string) PricingsClient return NewPricingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewPricingsClientWithBaseURI creates an instance of the PricingsClient client. +// NewPricingsClientWithBaseURI creates an instance of the PricingsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPricingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) PricingsClient { return PricingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/regulatorycomplianceassessments.go b/services/preview/security/mgmt/v1.0/security/regulatorycomplianceassessments.go index c0083af29333..bed3ced573e3 100644 --- a/services/preview/security/mgmt/v1.0/security/regulatorycomplianceassessments.go +++ b/services/preview/security/mgmt/v1.0/security/regulatorycomplianceassessments.go @@ -38,7 +38,8 @@ func NewRegulatoryComplianceAssessmentsClient(subscriptionID string, ascLocation } // NewRegulatoryComplianceAssessmentsClientWithBaseURI creates an instance of the RegulatoryComplianceAssessmentsClient -// 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 NewRegulatoryComplianceAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceAssessmentsClient { return RegulatoryComplianceAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/regulatorycompliancecontrols.go b/services/preview/security/mgmt/v1.0/security/regulatorycompliancecontrols.go index 82cf7d7cff1e..1d590b52a497 100644 --- a/services/preview/security/mgmt/v1.0/security/regulatorycompliancecontrols.go +++ b/services/preview/security/mgmt/v1.0/security/regulatorycompliancecontrols.go @@ -37,7 +37,8 @@ func NewRegulatoryComplianceControlsClient(subscriptionID string, ascLocation st } // NewRegulatoryComplianceControlsClientWithBaseURI creates an instance of the RegulatoryComplianceControlsClient -// 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 NewRegulatoryComplianceControlsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceControlsClient { return RegulatoryComplianceControlsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/regulatorycompliancestandards.go b/services/preview/security/mgmt/v1.0/security/regulatorycompliancestandards.go index bdb1b4d36598..86e2892938b1 100644 --- a/services/preview/security/mgmt/v1.0/security/regulatorycompliancestandards.go +++ b/services/preview/security/mgmt/v1.0/security/regulatorycompliancestandards.go @@ -37,7 +37,8 @@ func NewRegulatoryComplianceStandardsClient(subscriptionID string, ascLocation s } // NewRegulatoryComplianceStandardsClientWithBaseURI creates an instance of the RegulatoryComplianceStandardsClient -// 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 NewRegulatoryComplianceStandardsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceStandardsClient { return RegulatoryComplianceStandardsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go index 9cb2574b8476..9c35c4776471 100644 --- a/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go @@ -29,7 +29,9 @@ type AutomationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationName string) (result security.Automation, err error) List(ctx context.Context) (result security.AutomationListPage, err error) + ListComplete(ctx context.Context) (result security.AutomationListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result security.AutomationListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result security.AutomationListIterator, err error) Validate(ctx context.Context, resourceGroupName string, automationName string, automation security.Automation) (result security.AutomationValidationStatus, err error) } @@ -39,7 +41,9 @@ var _ AutomationsClientAPI = (*security.AutomationsClient)(nil) type SubAssessmentsClientAPI interface { Get(ctx context.Context, scope string, assessmentName string, subAssessmentName string) (result security.SubAssessment, err error) List(ctx context.Context, scope string, assessmentName string) (result security.SubAssessmentListPage, err error) + ListComplete(ctx context.Context, scope string, assessmentName string) (result security.SubAssessmentListIterator, err error) ListAll(ctx context.Context, scope string) (result security.SubAssessmentListPage, err error) + ListAllComplete(ctx context.Context, scope string) (result security.SubAssessmentListIterator, err error) } var _ SubAssessmentsClientAPI = (*security.SubAssessmentsClient)(nil) @@ -48,6 +52,7 @@ var _ SubAssessmentsClientAPI = (*security.SubAssessmentsClient)(nil) type RegulatoryComplianceStandardsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) List(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListPage, err error) + ListComplete(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListIterator, err error) } var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceStandardsClient)(nil) @@ -56,6 +61,7 @@ var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceSt type RegulatoryComplianceControlsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result security.RegulatoryComplianceControl, err error) List(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListPage, err error) + ListComplete(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListIterator, err error) } var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceControlsClient)(nil) @@ -64,6 +70,7 @@ var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceCon type RegulatoryComplianceAssessmentsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result security.RegulatoryComplianceAssessment, err error) List(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListPage, err error) + ListComplete(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListIterator, err error) } var _ RegulatoryComplianceAssessmentsClientAPI = (*security.RegulatoryComplianceAssessmentsClient)(nil) @@ -74,7 +81,9 @@ type PricingsClientAPI interface { GetResourceGroupPricing(ctx context.Context, resourceGroupName string, pricingName string) (result security.Pricing, err error) GetSubscriptionPricing(ctx context.Context, pricingName string) (result security.Pricing, err error) List(ctx context.Context) (result security.PricingListPage, err error) + ListComplete(ctx context.Context) (result security.PricingListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result security.PricingListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result security.PricingListIterator, err error) UpdateSubscriptionPricing(ctx context.Context, pricingName string, pricing security.Pricing) (result security.Pricing, err error) } @@ -86,6 +95,7 @@ type ContactsClientAPI interface { Delete(ctx context.Context, securityContactName string) (result autorest.Response, err error) Get(ctx context.Context, securityContactName string) (result security.Contact, err error) List(ctx context.Context) (result security.ContactListPage, err error) + ListComplete(ctx context.Context) (result security.ContactListIterator, err error) Update(ctx context.Context, securityContactName string, securityContact security.Contact) (result security.Contact, err error) } @@ -97,6 +107,7 @@ type WorkspaceSettingsClientAPI interface { Delete(ctx context.Context, workspaceSettingName string) (result autorest.Response, err error) Get(ctx context.Context, workspaceSettingName string) (result security.WorkspaceSetting, err error) List(ctx context.Context) (result security.WorkspaceSettingListPage, err error) + ListComplete(ctx context.Context) (result security.WorkspaceSettingListIterator, err error) Update(ctx context.Context, workspaceSettingName string, workspaceSetting security.WorkspaceSetting) (result security.WorkspaceSetting, err error) } @@ -107,6 +118,7 @@ type AutoProvisioningSettingsClientAPI interface { Create(ctx context.Context, settingName string, setting security.AutoProvisioningSetting) (result security.AutoProvisioningSetting, err error) Get(ctx context.Context, settingName string) (result security.AutoProvisioningSetting, err error) List(ctx context.Context) (result security.AutoProvisioningSettingListPage, err error) + ListComplete(ctx context.Context) (result security.AutoProvisioningSettingListIterator, err error) } var _ AutoProvisioningSettingsClientAPI = (*security.AutoProvisioningSettingsClient)(nil) @@ -115,6 +127,7 @@ var _ AutoProvisioningSettingsClientAPI = (*security.AutoProvisioningSettingsCli type CompliancesClientAPI interface { Get(ctx context.Context, scope string, complianceName string) (result security.Compliance, err error) List(ctx context.Context, scope string) (result security.ComplianceListPage, err error) + ListComplete(ctx context.Context, scope string) (result security.ComplianceListIterator, err error) } var _ CompliancesClientAPI = (*security.CompliancesClient)(nil) @@ -133,6 +146,7 @@ type DeviceSecurityGroupsClientAPI interface { Delete(ctx context.Context, resourceID string, deviceSecurityGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceID string, deviceSecurityGroupName string) (result security.DeviceSecurityGroup, err error) List(ctx context.Context, resourceID string) (result security.DeviceSecurityGroupListPage, err error) + ListComplete(ctx context.Context, resourceID string) (result security.DeviceSecurityGroupListIterator, err error) } var _ DeviceSecurityGroupsClientAPI = (*security.DeviceSecurityGroupsClient)(nil) @@ -141,6 +155,7 @@ var _ DeviceSecurityGroupsClientAPI = (*security.DeviceSecurityGroupsClient)(nil type SettingsClientAPI interface { Get(ctx context.Context, settingName string) (result security.Setting, err error) List(ctx context.Context) (result security.SettingsListPage, err error) + ListComplete(ctx context.Context) (result security.SettingsListIterator, err error) Update(ctx context.Context, settingName string, setting security.Setting) (result security.Setting, err error) } @@ -151,6 +166,7 @@ type InformationProtectionPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, scope string, informationProtectionPolicyName string) (result security.InformationProtectionPolicy, err error) Get(ctx context.Context, scope string, informationProtectionPolicyName string) (result security.InformationProtectionPolicy, err error) List(ctx context.Context, scope string) (result security.InformationProtectionPolicyListPage, err error) + ListComplete(ctx context.Context, scope string) (result security.InformationProtectionPolicyListIterator, err error) } var _ InformationProtectionPoliciesClientAPI = (*security.InformationProtectionPoliciesClient)(nil) @@ -158,6 +174,7 @@ var _ InformationProtectionPoliciesClientAPI = (*security.InformationProtectionP // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result security.OperationListPage, err error) + ListComplete(ctx context.Context) (result security.OperationListIterator, err error) } var _ OperationsClientAPI = (*security.OperationsClient)(nil) @@ -166,6 +183,7 @@ var _ OperationsClientAPI = (*security.OperationsClient)(nil) type LocationsClientAPI interface { Get(ctx context.Context) (result security.AscLocation, err error) List(ctx context.Context) (result security.AscLocationListPage, err error) + ListComplete(ctx context.Context) (result security.AscLocationListIterator, err error) } var _ LocationsClientAPI = (*security.LocationsClient)(nil) @@ -175,8 +193,11 @@ type TasksClientAPI interface { GetResourceGroupLevelTask(ctx context.Context, resourceGroupName string, taskName string) (result security.Task, err error) GetSubscriptionLevelTask(ctx context.Context, taskName string) (result security.Task, err error) List(ctx context.Context, filter string) (result security.TaskListPage, err error) + ListComplete(ctx context.Context, filter string) (result security.TaskListIterator, err error) ListByHomeRegion(ctx context.Context, filter string) (result security.TaskListPage, err error) + ListByHomeRegionComplete(ctx context.Context, filter string) (result security.TaskListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result security.TaskListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result security.TaskListIterator, err error) UpdateResourceGroupLevelTaskState(ctx context.Context, resourceGroupName string, taskName string, taskUpdateActionType string) (result autorest.Response, err error) UpdateSubscriptionLevelTaskState(ctx context.Context, taskName string, taskUpdateActionType string) (result autorest.Response, err error) } @@ -188,9 +209,13 @@ type AlertsClientAPI interface { GetResourceGroupLevelAlerts(ctx context.Context, alertName string, resourceGroupName string) (result security.Alert, err error) GetSubscriptionLevelAlert(ctx context.Context, alertName string) (result security.Alert, err error) List(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListResourceGroupLevelAlertsByRegionComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListSubscriptionLevelAlertsByRegion(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListSubscriptionLevelAlertsByRegionComplete(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) @@ -203,7 +228,9 @@ var _ AlertsClientAPI = (*security.AlertsClient)(nil) type DiscoveredSecuritySolutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, discoveredSecuritySolutionName string) (result security.DiscoveredSecuritySolution, err error) List(ctx context.Context) (result security.DiscoveredSecuritySolutionListPage, err error) + ListComplete(ctx context.Context) (result security.DiscoveredSecuritySolutionListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.DiscoveredSecuritySolutionListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.DiscoveredSecuritySolutionListIterator, err error) } var _ DiscoveredSecuritySolutionsClientAPI = (*security.DiscoveredSecuritySolutionsClient)(nil) @@ -215,9 +242,13 @@ type JitNetworkAccessPoliciesClientAPI interface { Get(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string) (result security.JitNetworkAccessPolicy, err error) Initiate(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string, body security.JitNetworkAccessPolicyInitiateRequest) (result security.JitNetworkAccessRequest, err error) List(ctx context.Context) (result security.JitNetworkAccessPoliciesListPage, err error) + ListComplete(ctx context.Context) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByRegion(ctx context.Context) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByRegionComplete(ctx context.Context) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByResourceGroupAndRegion(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByResourceGroupAndRegionComplete(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListIterator, err error) } var _ JitNetworkAccessPoliciesClientAPI = (*security.JitNetworkAccessPoliciesClient)(nil) @@ -235,7 +266,9 @@ var _ AdaptiveApplicationControlsClientAPI = (*security.AdaptiveApplicationContr type ExternalSecuritySolutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, externalSecuritySolutionsName string) (result security.ExternalSecuritySolutionModel, err error) List(ctx context.Context) (result security.ExternalSecuritySolutionListPage, err error) + ListComplete(ctx context.Context) (result security.ExternalSecuritySolutionListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.ExternalSecuritySolutionListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.ExternalSecuritySolutionListIterator, err error) } var _ ExternalSecuritySolutionsClientAPI = (*security.ExternalSecuritySolutionsClient)(nil) @@ -244,7 +277,9 @@ var _ ExternalSecuritySolutionsClientAPI = (*security.ExternalSecuritySolutionsC type TopologyClientAPI interface { Get(ctx context.Context, resourceGroupName string, topologyResourceName string) (result security.TopologyResource, err error) List(ctx context.Context) (result security.TopologyListPage, err error) + ListComplete(ctx context.Context) (result security.TopologyListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.TopologyListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.TopologyListIterator, err error) } var _ TopologyClientAPI = (*security.TopologyClient)(nil) @@ -253,7 +288,9 @@ var _ TopologyClientAPI = (*security.TopologyClient)(nil) type AllowedConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, connectionType security.ConnectionType) (result security.AllowedConnectionsResource, err error) List(ctx context.Context) (result security.AllowedConnectionsListPage, err error) + ListComplete(ctx context.Context) (result security.AllowedConnectionsListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.AllowedConnectionsListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.AllowedConnectionsListIterator, err error) } var _ AllowedConnectionsClientAPI = (*security.AllowedConnectionsClient)(nil) @@ -263,6 +300,7 @@ type AdaptiveNetworkHardeningsClientAPI interface { Enforce(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, adaptiveNetworkHardeningResourceName string, body security.AdaptiveNetworkHardeningEnforceRequest) (result security.AdaptiveNetworkHardeningsEnforceFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, adaptiveNetworkHardeningResourceName string) (result security.AdaptiveNetworkHardening, err error) ListByExtendedResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result security.AdaptiveNetworkHardeningsListPage, err error) + ListByExtendedResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result security.AdaptiveNetworkHardeningsListIterator, err error) } var _ AdaptiveNetworkHardeningsClientAPI = (*security.AdaptiveNetworkHardeningsClient)(nil) diff --git a/services/preview/security/mgmt/v1.0/security/settings.go b/services/preview/security/mgmt/v1.0/security/settings.go index 6f63dd02c69d..971bf2b94b1a 100644 --- a/services/preview/security/mgmt/v1.0/security/settings.go +++ b/services/preview/security/mgmt/v1.0/security/settings.go @@ -36,7 +36,8 @@ func NewSettingsClient(subscriptionID string, ascLocation string) SettingsClient return NewSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewSettingsClientWithBaseURI creates an instance of the SettingsClient client. +// NewSettingsClientWithBaseURI creates an instance of the SettingsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SettingsClient { return SettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/subassessments.go b/services/preview/security/mgmt/v1.0/security/subassessments.go index 4fa19d8e398d..82430e79385f 100644 --- a/services/preview/security/mgmt/v1.0/security/subassessments.go +++ b/services/preview/security/mgmt/v1.0/security/subassessments.go @@ -35,7 +35,8 @@ func NewSubAssessmentsClient(subscriptionID string, ascLocation string) SubAsses return NewSubAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewSubAssessmentsClientWithBaseURI creates an instance of the SubAssessmentsClient client. +// NewSubAssessmentsClientWithBaseURI creates an instance of the SubAssessmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SubAssessmentsClient { return SubAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/tasks.go b/services/preview/security/mgmt/v1.0/security/tasks.go index bad83545919f..bc6628d115d3 100644 --- a/services/preview/security/mgmt/v1.0/security/tasks.go +++ b/services/preview/security/mgmt/v1.0/security/tasks.go @@ -36,7 +36,8 @@ func NewTasksClient(subscriptionID string, ascLocation string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/topology.go b/services/preview/security/mgmt/v1.0/security/topology.go index d0f4f75946f7..efb4716fa9a4 100644 --- a/services/preview/security/mgmt/v1.0/security/topology.go +++ b/services/preview/security/mgmt/v1.0/security/topology.go @@ -36,7 +36,8 @@ func NewTopologyClient(subscriptionID string, ascLocation string) TopologyClient return NewTopologyClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewTopologyClientWithBaseURI creates an instance of the TopologyClient client. +// NewTopologyClientWithBaseURI creates an instance of the TopologyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopologyClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) TopologyClient { return TopologyClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v1.0/security/workspacesettings.go b/services/preview/security/mgmt/v1.0/security/workspacesettings.go index f684aa865117..7165e8698a55 100644 --- a/services/preview/security/mgmt/v1.0/security/workspacesettings.go +++ b/services/preview/security/mgmt/v1.0/security/workspacesettings.go @@ -36,7 +36,9 @@ func NewWorkspaceSettingsClient(subscriptionID string, ascLocation string) Works return NewWorkspaceSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewWorkspaceSettingsClientWithBaseURI creates an instance of the WorkspaceSettingsClient client. +// NewWorkspaceSettingsClientWithBaseURI creates an instance of the WorkspaceSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkspaceSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) WorkspaceSettingsClient { return WorkspaceSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/adaptiveapplicationcontrols.go b/services/preview/security/mgmt/v2.0/security/adaptiveapplicationcontrols.go index 0710d2febfe7..3ac61acc5526 100644 --- a/services/preview/security/mgmt/v2.0/security/adaptiveapplicationcontrols.go +++ b/services/preview/security/mgmt/v2.0/security/adaptiveapplicationcontrols.go @@ -36,7 +36,9 @@ func NewAdaptiveApplicationControlsClient(subscriptionID string, ascLocation str return NewAdaptiveApplicationControlsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAdaptiveApplicationControlsClientWithBaseURI creates an instance of the AdaptiveApplicationControlsClient client. +// NewAdaptiveApplicationControlsClientWithBaseURI creates an instance of the AdaptiveApplicationControlsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAdaptiveApplicationControlsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AdaptiveApplicationControlsClient { return AdaptiveApplicationControlsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/adaptivenetworkhardenings.go b/services/preview/security/mgmt/v2.0/security/adaptivenetworkhardenings.go index 54088237d8b7..ffd421e4b67e 100644 --- a/services/preview/security/mgmt/v2.0/security/adaptivenetworkhardenings.go +++ b/services/preview/security/mgmt/v2.0/security/adaptivenetworkhardenings.go @@ -36,7 +36,9 @@ func NewAdaptiveNetworkHardeningsClient(subscriptionID string, ascLocation strin return NewAdaptiveNetworkHardeningsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAdaptiveNetworkHardeningsClientWithBaseURI creates an instance of the AdaptiveNetworkHardeningsClient client. +// NewAdaptiveNetworkHardeningsClientWithBaseURI creates an instance of the AdaptiveNetworkHardeningsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAdaptiveNetworkHardeningsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AdaptiveNetworkHardeningsClient { return AdaptiveNetworkHardeningsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/advancedthreatprotection.go b/services/preview/security/mgmt/v2.0/security/advancedthreatprotection.go index 7fe28de28f1e..227375e3f00e 100644 --- a/services/preview/security/mgmt/v2.0/security/advancedthreatprotection.go +++ b/services/preview/security/mgmt/v2.0/security/advancedthreatprotection.go @@ -35,7 +35,9 @@ func NewAdvancedThreatProtectionClient(subscriptionID string, ascLocation string return NewAdvancedThreatProtectionClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAdvancedThreatProtectionClientWithBaseURI creates an instance of the AdvancedThreatProtectionClient client. +// NewAdvancedThreatProtectionClientWithBaseURI creates an instance of the AdvancedThreatProtectionClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAdvancedThreatProtectionClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AdvancedThreatProtectionClient { return AdvancedThreatProtectionClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/alerts.go b/services/preview/security/mgmt/v2.0/security/alerts.go index c7f9d8aab297..ab1902b95caf 100644 --- a/services/preview/security/mgmt/v2.0/security/alerts.go +++ b/services/preview/security/mgmt/v2.0/security/alerts.go @@ -36,7 +36,8 @@ func NewAlertsClient(subscriptionID string, ascLocation string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/allowedconnections.go b/services/preview/security/mgmt/v2.0/security/allowedconnections.go index 74410ff36635..c761a4c3ccce 100644 --- a/services/preview/security/mgmt/v2.0/security/allowedconnections.go +++ b/services/preview/security/mgmt/v2.0/security/allowedconnections.go @@ -36,7 +36,9 @@ func NewAllowedConnectionsClient(subscriptionID string, ascLocation string) Allo return NewAllowedConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAllowedConnectionsClientWithBaseURI creates an instance of the AllowedConnectionsClient client. +// NewAllowedConnectionsClientWithBaseURI creates an instance of the AllowedConnectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAllowedConnectionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AllowedConnectionsClient { return AllowedConnectionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/automations.go b/services/preview/security/mgmt/v2.0/security/automations.go index 605cb35a072d..855f8dd218f2 100644 --- a/services/preview/security/mgmt/v2.0/security/automations.go +++ b/services/preview/security/mgmt/v2.0/security/automations.go @@ -36,7 +36,8 @@ func NewAutomationsClient(subscriptionID string, ascLocation string) Automations return NewAutomationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAutomationsClientWithBaseURI creates an instance of the AutomationsClient client. +// NewAutomationsClientWithBaseURI creates an instance of the AutomationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAutomationsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AutomationsClient { return AutomationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/autoprovisioningsettings.go b/services/preview/security/mgmt/v2.0/security/autoprovisioningsettings.go index 87799c76d1e9..6e3b8c64871e 100644 --- a/services/preview/security/mgmt/v2.0/security/autoprovisioningsettings.go +++ b/services/preview/security/mgmt/v2.0/security/autoprovisioningsettings.go @@ -36,7 +36,9 @@ func NewAutoProvisioningSettingsClient(subscriptionID string, ascLocation string return NewAutoProvisioningSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAutoProvisioningSettingsClientWithBaseURI creates an instance of the AutoProvisioningSettingsClient client. +// NewAutoProvisioningSettingsClientWithBaseURI creates an instance of the AutoProvisioningSettingsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAutoProvisioningSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AutoProvisioningSettingsClient { return AutoProvisioningSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/client.go b/services/preview/security/mgmt/v2.0/security/client.go index c1db0ec1e825..ca26dee802e7 100644 --- a/services/preview/security/mgmt/v2.0/security/client.go +++ b/services/preview/security/mgmt/v2.0/security/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, ascLocation string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, ascLocation string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/security/mgmt/v2.0/security/compliances.go b/services/preview/security/mgmt/v2.0/security/compliances.go index 697c6f0be430..f7b5b7351067 100644 --- a/services/preview/security/mgmt/v2.0/security/compliances.go +++ b/services/preview/security/mgmt/v2.0/security/compliances.go @@ -35,7 +35,8 @@ func NewCompliancesClient(subscriptionID string, ascLocation string) Compliances return NewCompliancesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewCompliancesClientWithBaseURI creates an instance of the CompliancesClient client. +// NewCompliancesClientWithBaseURI creates an instance of the CompliancesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCompliancesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) CompliancesClient { return CompliancesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/contacts.go b/services/preview/security/mgmt/v2.0/security/contacts.go index 91b3b63e4fe2..abb4374767a9 100644 --- a/services/preview/security/mgmt/v2.0/security/contacts.go +++ b/services/preview/security/mgmt/v2.0/security/contacts.go @@ -36,7 +36,8 @@ func NewContactsClient(subscriptionID string, ascLocation string) ContactsClient return NewContactsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewContactsClientWithBaseURI creates an instance of the ContactsClient client. +// NewContactsClientWithBaseURI creates an instance of the ContactsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContactsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) ContactsClient { return ContactsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/devicesecuritygroups.go b/services/preview/security/mgmt/v2.0/security/devicesecuritygroups.go index 4bee8c464456..b22352e75335 100644 --- a/services/preview/security/mgmt/v2.0/security/devicesecuritygroups.go +++ b/services/preview/security/mgmt/v2.0/security/devicesecuritygroups.go @@ -35,7 +35,9 @@ func NewDeviceSecurityGroupsClient(subscriptionID string, ascLocation string) De return NewDeviceSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewDeviceSecurityGroupsClientWithBaseURI creates an instance of the DeviceSecurityGroupsClient client. +// NewDeviceSecurityGroupsClientWithBaseURI creates an instance of the DeviceSecurityGroupsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeviceSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DeviceSecurityGroupsClient { return DeviceSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/discoveredsecuritysolutions.go b/services/preview/security/mgmt/v2.0/security/discoveredsecuritysolutions.go index 5e0d45e1cdcd..f994891f6a74 100644 --- a/services/preview/security/mgmt/v2.0/security/discoveredsecuritysolutions.go +++ b/services/preview/security/mgmt/v2.0/security/discoveredsecuritysolutions.go @@ -36,7 +36,9 @@ func NewDiscoveredSecuritySolutionsClient(subscriptionID string, ascLocation str return NewDiscoveredSecuritySolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewDiscoveredSecuritySolutionsClientWithBaseURI creates an instance of the DiscoveredSecuritySolutionsClient client. +// NewDiscoveredSecuritySolutionsClientWithBaseURI creates an instance of the DiscoveredSecuritySolutionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiscoveredSecuritySolutionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DiscoveredSecuritySolutionsClient { return DiscoveredSecuritySolutionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/externalsecuritysolutions.go b/services/preview/security/mgmt/v2.0/security/externalsecuritysolutions.go index 883f4e529cfd..405d18b2de94 100644 --- a/services/preview/security/mgmt/v2.0/security/externalsecuritysolutions.go +++ b/services/preview/security/mgmt/v2.0/security/externalsecuritysolutions.go @@ -36,7 +36,9 @@ func NewExternalSecuritySolutionsClient(subscriptionID string, ascLocation strin return NewExternalSecuritySolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewExternalSecuritySolutionsClientWithBaseURI creates an instance of the ExternalSecuritySolutionsClient client. +// NewExternalSecuritySolutionsClientWithBaseURI creates an instance of the ExternalSecuritySolutionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewExternalSecuritySolutionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) ExternalSecuritySolutionsClient { return ExternalSecuritySolutionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/informationprotectionpolicies.go b/services/preview/security/mgmt/v2.0/security/informationprotectionpolicies.go index 160668c2d5ff..4202bb463fd3 100644 --- a/services/preview/security/mgmt/v2.0/security/informationprotectionpolicies.go +++ b/services/preview/security/mgmt/v2.0/security/informationprotectionpolicies.go @@ -36,7 +36,8 @@ func NewInformationProtectionPoliciesClient(subscriptionID string, ascLocation s } // NewInformationProtectionPoliciesClientWithBaseURI creates an instance of the InformationProtectionPoliciesClient -// 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 NewInformationProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) InformationProtectionPoliciesClient { return InformationProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/iotsecuritysolution.go b/services/preview/security/mgmt/v2.0/security/iotsecuritysolution.go index 73b1112f75c2..80f967d62f69 100644 --- a/services/preview/security/mgmt/v2.0/security/iotsecuritysolution.go +++ b/services/preview/security/mgmt/v2.0/security/iotsecuritysolution.go @@ -36,7 +36,9 @@ func NewIotSecuritySolutionClient(subscriptionID string, ascLocation string) Iot return NewIotSecuritySolutionClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewIotSecuritySolutionClientWithBaseURI creates an instance of the IotSecuritySolutionClient client. +// NewIotSecuritySolutionClientWithBaseURI creates an instance of the IotSecuritySolutionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIotSecuritySolutionClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotSecuritySolutionClient { return IotSecuritySolutionClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutions.go b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutions.go index 14fbfd273a72..98681454ca4d 100644 --- a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutions.go +++ b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutions.go @@ -36,7 +36,9 @@ func NewIoTSecuritySolutionsClient(subscriptionID string, ascLocation string) Io return NewIoTSecuritySolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewIoTSecuritySolutionsClientWithBaseURI creates an instance of the IoTSecuritySolutionsClient client. +// NewIoTSecuritySolutionsClientWithBaseURI creates an instance of the IoTSecuritySolutionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIoTSecuritySolutionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IoTSecuritySolutionsClient { return IoTSecuritySolutionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalytics.go b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalytics.go index d242868be31b..72324033ee66 100644 --- a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalytics.go +++ b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalytics.go @@ -37,7 +37,8 @@ func NewIoTSecuritySolutionsAnalyticsClient(subscriptionID string, ascLocation s } // NewIoTSecuritySolutionsAnalyticsClientWithBaseURI creates an instance of the IoTSecuritySolutionsAnalyticsClient -// 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 NewIoTSecuritySolutionsAnalyticsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IoTSecuritySolutionsAnalyticsClient { return IoTSecuritySolutionsAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsaggregatedalert.go b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsaggregatedalert.go index 07196e670723..1efa578cd047 100644 --- a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsaggregatedalert.go +++ b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsaggregatedalert.go @@ -39,7 +39,8 @@ func NewIoTSecuritySolutionsAnalyticsAggregatedAlertClient(subscriptionID string } // NewIoTSecuritySolutionsAnalyticsAggregatedAlertClientWithBaseURI creates an instance of the -// IoTSecuritySolutionsAnalyticsAggregatedAlertClient client. +// IoTSecuritySolutionsAnalyticsAggregatedAlertClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIoTSecuritySolutionsAnalyticsAggregatedAlertClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IoTSecuritySolutionsAnalyticsAggregatedAlertClient { return IoTSecuritySolutionsAnalyticsAggregatedAlertClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsaggregatedalerts.go b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsaggregatedalerts.go index 0e295e14f36b..764ef803ecf5 100644 --- a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsaggregatedalerts.go +++ b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsaggregatedalerts.go @@ -39,7 +39,8 @@ func NewIoTSecuritySolutionsAnalyticsAggregatedAlertsClient(subscriptionID strin } // NewIoTSecuritySolutionsAnalyticsAggregatedAlertsClientWithBaseURI creates an instance of the -// IoTSecuritySolutionsAnalyticsAggregatedAlertsClient client. +// IoTSecuritySolutionsAnalyticsAggregatedAlertsClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIoTSecuritySolutionsAnalyticsAggregatedAlertsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IoTSecuritySolutionsAnalyticsAggregatedAlertsClient { return IoTSecuritySolutionsAnalyticsAggregatedAlertsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsrecommendation.go b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsrecommendation.go index ff3fad682371..a5dad9ffd5fb 100644 --- a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsrecommendation.go +++ b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsrecommendation.go @@ -39,7 +39,8 @@ func NewIoTSecuritySolutionsAnalyticsRecommendationClient(subscriptionID string, } // NewIoTSecuritySolutionsAnalyticsRecommendationClientWithBaseURI creates an instance of the -// IoTSecuritySolutionsAnalyticsRecommendationClient client. +// IoTSecuritySolutionsAnalyticsRecommendationClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIoTSecuritySolutionsAnalyticsRecommendationClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IoTSecuritySolutionsAnalyticsRecommendationClient { return IoTSecuritySolutionsAnalyticsRecommendationClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsrecommendations.go b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsrecommendations.go index fbda8ca7f69e..15da82d8bece 100644 --- a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsrecommendations.go +++ b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsanalyticsrecommendations.go @@ -39,7 +39,8 @@ func NewIoTSecuritySolutionsAnalyticsRecommendationsClient(subscriptionID string } // NewIoTSecuritySolutionsAnalyticsRecommendationsClientWithBaseURI creates an instance of the -// IoTSecuritySolutionsAnalyticsRecommendationsClient client. +// IoTSecuritySolutionsAnalyticsRecommendationsClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIoTSecuritySolutionsAnalyticsRecommendationsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IoTSecuritySolutionsAnalyticsRecommendationsClient { return IoTSecuritySolutionsAnalyticsRecommendationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsresourcegroup.go b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsresourcegroup.go index 71faba118a1e..e3302568a42b 100644 --- a/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsresourcegroup.go +++ b/services/preview/security/mgmt/v2.0/security/iotsecuritysolutionsresourcegroup.go @@ -39,7 +39,8 @@ func NewIoTSecuritySolutionsResourceGroupClient(subscriptionID string, ascLocati } // NewIoTSecuritySolutionsResourceGroupClientWithBaseURI creates an instance of the -// IoTSecuritySolutionsResourceGroupClient client. +// IoTSecuritySolutionsResourceGroupClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIoTSecuritySolutionsResourceGroupClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IoTSecuritySolutionsResourceGroupClient { return IoTSecuritySolutionsResourceGroupClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/jitnetworkaccesspolicies.go b/services/preview/security/mgmt/v2.0/security/jitnetworkaccesspolicies.go index 0aa96db56670..b5aead1c6d04 100644 --- a/services/preview/security/mgmt/v2.0/security/jitnetworkaccesspolicies.go +++ b/services/preview/security/mgmt/v2.0/security/jitnetworkaccesspolicies.go @@ -36,7 +36,9 @@ func NewJitNetworkAccessPoliciesClient(subscriptionID string, ascLocation string return NewJitNetworkAccessPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewJitNetworkAccessPoliciesClientWithBaseURI creates an instance of the JitNetworkAccessPoliciesClient client. +// NewJitNetworkAccessPoliciesClientWithBaseURI creates an instance of the JitNetworkAccessPoliciesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewJitNetworkAccessPoliciesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) JitNetworkAccessPoliciesClient { return JitNetworkAccessPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/locations.go b/services/preview/security/mgmt/v2.0/security/locations.go index 94917385fe7e..18ecc473ff74 100644 --- a/services/preview/security/mgmt/v2.0/security/locations.go +++ b/services/preview/security/mgmt/v2.0/security/locations.go @@ -36,7 +36,8 @@ func NewLocationsClient(subscriptionID string, ascLocation string) LocationsClie return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/models.go b/services/preview/security/mgmt/v2.0/security/models.go index a0ddbe702991..288455ea3f5d 100644 --- a/services/preview/security/mgmt/v2.0/security/models.go +++ b/services/preview/security/mgmt/v2.0/security/models.go @@ -759,17 +759,17 @@ func PossibleSolutionStatusValues() []SolutionStatus { type Source string const ( - // SourceAws ... - SourceAws Source = "Aws" // SourceAzure ... SourceAzure Source = "Azure" + // SourceOnPremise ... + SourceOnPremise Source = "OnPremise" // SourceResourceDetails ... SourceResourceDetails Source = "ResourceDetails" ) // PossibleSourceValues returns an array of possible values for the Source const type. func PossibleSourceValues() []Source { - return []Source{SourceAws, SourceAzure, SourceResourceDetails} + return []Source{SourceAzure, SourceOnPremise, SourceResourceDetails} } // SourceSystem enumerates the values for source system. @@ -2664,7 +2664,8 @@ func (aa AutomationAction) AsBasicAutomationAction() (BasicAutomationAction, boo return &aa, true } -// AutomationActionEventHub the target Event Hub to which event data will be exported. +// AutomationActionEventHub the target Event Hub to which event data will be exported. To learn more about +// Security Center continuous export capabilities, visit https://aka.ms/ASCExportLearnMore type AutomationActionEventHub struct { // EventHubResourceID - The target Event Hub Azure Resource ID. EventHubResourceID *string `json:"eventHubResourceId,omitempty"` @@ -2717,7 +2718,8 @@ func (aaeh AutomationActionEventHub) AsBasicAutomationAction() (BasicAutomationA return &aaeh, true } -// AutomationActionLogicApp the logic app action that should be triggered. +// AutomationActionLogicApp the logic app action that should be triggered. To learn more about Security +// Center's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore type AutomationActionLogicApp struct { // LogicAppResourceID - The triggered Logic App Azure Resource ID. This can also reside on other subscriptions, given that you have permissions to trigger the Logic App LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` @@ -2772,7 +2774,8 @@ func (aala AutomationActionLogicApp) AsBasicAutomationAction() (BasicAutomationA // alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the // 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order // to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be -// enabled on that workspace. +// enabled on that workspace. To learn more about Security Center continuous export capabilities, visit +// https://aka.ms/ASCExportLearnMore type AutomationActionWorkspace struct { // WorkspaceResourceID - The fully qualified Log Analytics Workspace Azure Resource ID. WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` @@ -3073,7 +3076,7 @@ type AutomationTriggeringRule struct { PropertyType PropertyType `json:"propertyType,omitempty"` // ExpectedValue - The expected value. ExpectedValue *string `json:"expectedValue,omitempty"` - // Operator - A valid comparer operator to use. Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' + // Operator - A valid comparer operator to use. A case-insensitive comparison will be applied for String PropertyType. Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' Operator Operator `json:"operator,omitempty"` } @@ -3312,51 +3315,11 @@ type AutoProvisioningSettingProperties struct { AutoProvision AutoProvision `json:"autoProvision,omitempty"` } -// AwsResourceDetails details of the resource that was assessed -type AwsResourceDetails struct { - // AccountID - READ-ONLY; AWS account ID - AccountID *string `json:"accountId,omitempty"` - // AwsResourceID - READ-ONLY; AWS resource ID. can be ARN or other - AwsResourceID *string `json:"awsResourceId,omitempty"` - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' - Source Source `json:"source,omitempty"` -} - -// MarshalJSON is the custom marshaler for AwsResourceDetails. -func (ard AwsResourceDetails) MarshalJSON() ([]byte, error) { - ard.Source = SourceAws - objectMap := make(map[string]interface{}) - if ard.Source != "" { - objectMap["source"] = ard.Source - } - return json.Marshal(objectMap) -} - -// AsAzureResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { - return nil, false -} - -// AsAwsResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { - return &ard, true -} - -// AsResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { - return nil, false -} - -// AsBasicResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsBasicResourceDetails() (BasicResourceDetails, bool) { - return &ard, true -} - -// AzureResourceDetails details of the resource that was assessed +// AzureResourceDetails details of the Azure resource that was assessed type AzureResourceDetails struct { - // ID - READ-ONLY; Azure resource ID of the assessed resource + // ID - READ-ONLY; Azure resource Id of the assessed resource ID *string `json:"id,omitempty"` - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' Source Source `json:"source,omitempty"` } @@ -3370,16 +3333,16 @@ func (ard AzureResourceDetails) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. +func (ard AzureResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { + return nil, false +} + // AsAzureResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. func (ard AzureResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { return &ard, true } -// AsAwsResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. -func (ard AzureResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { - return nil, false -} - // AsResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. func (ard AzureResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { return nil, false @@ -6765,6 +6728,62 @@ type Location struct { Location *string `json:"location,omitempty"` } +// OnPremiseResourceDetails details of the On Premise resource that was assessed +type OnPremiseResourceDetails struct { + // WorkspaceID - Azure resource Id of the workspace the machine is attached to + WorkspaceID *string `json:"workspaceId,omitempty"` + // Vmuuid - The unique Id of the machine + Vmuuid *string `json:"vmuuid,omitempty"` + // SourceComputerID - The oms agent Id installed on the machine + SourceComputerID *string `json:"sourceComputerId,omitempty"` + // MachineName - The name of the machine + MachineName *string `json:"machineName,omitempty"` + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' + Source Source `json:"source,omitempty"` +} + +// MarshalJSON is the custom marshaler for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) MarshalJSON() ([]byte, error) { + oprd.Source = SourceOnPremise + objectMap := make(map[string]interface{}) + if oprd.WorkspaceID != nil { + objectMap["workspaceId"] = oprd.WorkspaceID + } + if oprd.Vmuuid != nil { + objectMap["vmuuid"] = oprd.Vmuuid + } + if oprd.SourceComputerID != nil { + objectMap["sourceComputerId"] = oprd.SourceComputerID + } + if oprd.MachineName != nil { + objectMap["machineName"] = oprd.MachineName + } + if oprd.Source != "" { + objectMap["source"] = oprd.Source + } + return json.Marshal(objectMap) +} + +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { + return &oprd, true +} + +// AsAzureResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { + return nil, false +} + +// AsResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { + return nil, false +} + +// AsBasicResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsBasicResourceDetails() (BasicResourceDetails, bool) { + return &oprd, true +} + // Operation possible operation in the REST API of Microsoft.Security type Operation struct { // Name - READ-ONLY; Name of the operation @@ -7794,14 +7813,14 @@ type Resource struct { // BasicResourceDetails details of the resource that was assessed type BasicResourceDetails interface { + AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) AsAzureResourceDetails() (*AzureResourceDetails, bool) - AsAwsResourceDetails() (*AwsResourceDetails, bool) AsResourceDetails() (*ResourceDetails, bool) } // ResourceDetails details of the resource that was assessed type ResourceDetails struct { - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' Source Source `json:"source,omitempty"` } @@ -7813,14 +7832,14 @@ func unmarshalBasicResourceDetails(body []byte) (BasicResourceDetails, error) { } switch m["source"] { + case string(SourceOnPremise): + var oprd OnPremiseResourceDetails + err := json.Unmarshal(body, &oprd) + return oprd, err case string(SourceAzure): var ard AzureResourceDetails err := json.Unmarshal(body, &ard) return ard, err - case string(SourceAws): - var ard AwsResourceDetails - err := json.Unmarshal(body, &ard) - return ard, err default: var rd ResourceDetails err := json.Unmarshal(body, &rd) @@ -7856,13 +7875,13 @@ func (rd ResourceDetails) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsAzureResourceDetails is the BasicResourceDetails implementation for ResourceDetails. -func (rd ResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for ResourceDetails. +func (rd ResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { return nil, false } -// AsAwsResourceDetails is the BasicResourceDetails implementation for ResourceDetails. -func (rd ResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { +// AsAzureResourceDetails is the BasicResourceDetails implementation for ResourceDetails. +func (rd ResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { return nil, false } diff --git a/services/preview/security/mgmt/v2.0/security/operations.go b/services/preview/security/mgmt/v2.0/security/operations.go index 343293875ddf..b4a74214e886 100644 --- a/services/preview/security/mgmt/v2.0/security/operations.go +++ b/services/preview/security/mgmt/v2.0/security/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, ascLocation string) OperationsCl return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, ascLocation string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/pricings.go b/services/preview/security/mgmt/v2.0/security/pricings.go index d43a4ac71fb5..fff068706738 100644 --- a/services/preview/security/mgmt/v2.0/security/pricings.go +++ b/services/preview/security/mgmt/v2.0/security/pricings.go @@ -36,7 +36,8 @@ func NewPricingsClient(subscriptionID string, ascLocation string) PricingsClient return NewPricingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewPricingsClientWithBaseURI creates an instance of the PricingsClient client. +// NewPricingsClientWithBaseURI creates an instance of the PricingsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPricingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) PricingsClient { return PricingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/regulatorycomplianceassessments.go b/services/preview/security/mgmt/v2.0/security/regulatorycomplianceassessments.go index c0083af29333..bed3ced573e3 100644 --- a/services/preview/security/mgmt/v2.0/security/regulatorycomplianceassessments.go +++ b/services/preview/security/mgmt/v2.0/security/regulatorycomplianceassessments.go @@ -38,7 +38,8 @@ func NewRegulatoryComplianceAssessmentsClient(subscriptionID string, ascLocation } // NewRegulatoryComplianceAssessmentsClientWithBaseURI creates an instance of the RegulatoryComplianceAssessmentsClient -// 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 NewRegulatoryComplianceAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceAssessmentsClient { return RegulatoryComplianceAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/regulatorycompliancecontrols.go b/services/preview/security/mgmt/v2.0/security/regulatorycompliancecontrols.go index 82cf7d7cff1e..1d590b52a497 100644 --- a/services/preview/security/mgmt/v2.0/security/regulatorycompliancecontrols.go +++ b/services/preview/security/mgmt/v2.0/security/regulatorycompliancecontrols.go @@ -37,7 +37,8 @@ func NewRegulatoryComplianceControlsClient(subscriptionID string, ascLocation st } // NewRegulatoryComplianceControlsClientWithBaseURI creates an instance of the RegulatoryComplianceControlsClient -// 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 NewRegulatoryComplianceControlsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceControlsClient { return RegulatoryComplianceControlsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/regulatorycompliancestandards.go b/services/preview/security/mgmt/v2.0/security/regulatorycompliancestandards.go index bdb1b4d36598..86e2892938b1 100644 --- a/services/preview/security/mgmt/v2.0/security/regulatorycompliancestandards.go +++ b/services/preview/security/mgmt/v2.0/security/regulatorycompliancestandards.go @@ -37,7 +37,8 @@ func NewRegulatoryComplianceStandardsClient(subscriptionID string, ascLocation s } // NewRegulatoryComplianceStandardsClientWithBaseURI creates an instance of the RegulatoryComplianceStandardsClient -// 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 NewRegulatoryComplianceStandardsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceStandardsClient { return RegulatoryComplianceStandardsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go index aae9e052ab7e..8ff4675042ab 100644 --- a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go @@ -29,7 +29,9 @@ type AutomationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationName string) (result security.Automation, err error) List(ctx context.Context) (result security.AutomationListPage, err error) + ListComplete(ctx context.Context) (result security.AutomationListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result security.AutomationListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result security.AutomationListIterator, err error) Validate(ctx context.Context, resourceGroupName string, automationName string, automation security.Automation) (result security.AutomationValidationStatus, err error) } @@ -39,7 +41,9 @@ var _ AutomationsClientAPI = (*security.AutomationsClient)(nil) type SubAssessmentsClientAPI interface { Get(ctx context.Context, scope string, assessmentName string, subAssessmentName string) (result security.SubAssessment, err error) List(ctx context.Context, scope string, assessmentName string) (result security.SubAssessmentListPage, err error) + ListComplete(ctx context.Context, scope string, assessmentName string) (result security.SubAssessmentListIterator, err error) ListAll(ctx context.Context, scope string) (result security.SubAssessmentListPage, err error) + ListAllComplete(ctx context.Context, scope string) (result security.SubAssessmentListIterator, err error) } var _ SubAssessmentsClientAPI = (*security.SubAssessmentsClient)(nil) @@ -48,6 +52,7 @@ var _ SubAssessmentsClientAPI = (*security.SubAssessmentsClient)(nil) type RegulatoryComplianceStandardsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) List(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListPage, err error) + ListComplete(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListIterator, err error) } var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceStandardsClient)(nil) @@ -56,6 +61,7 @@ var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceSt type RegulatoryComplianceControlsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result security.RegulatoryComplianceControl, err error) List(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListPage, err error) + ListComplete(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListIterator, err error) } var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceControlsClient)(nil) @@ -64,6 +70,7 @@ var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceCon type RegulatoryComplianceAssessmentsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result security.RegulatoryComplianceAssessment, err error) List(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListPage, err error) + ListComplete(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListIterator, err error) } var _ RegulatoryComplianceAssessmentsClientAPI = (*security.RegulatoryComplianceAssessmentsClient)(nil) @@ -83,6 +90,7 @@ type ContactsClientAPI interface { Delete(ctx context.Context, securityContactName string) (result autorest.Response, err error) Get(ctx context.Context, securityContactName string) (result security.Contact, err error) List(ctx context.Context) (result security.ContactListPage, err error) + ListComplete(ctx context.Context) (result security.ContactListIterator, err error) Update(ctx context.Context, securityContactName string, securityContact security.Contact) (result security.Contact, err error) } @@ -94,6 +102,7 @@ type WorkspaceSettingsClientAPI interface { Delete(ctx context.Context, workspaceSettingName string) (result autorest.Response, err error) Get(ctx context.Context, workspaceSettingName string) (result security.WorkspaceSetting, err error) List(ctx context.Context) (result security.WorkspaceSettingListPage, err error) + ListComplete(ctx context.Context) (result security.WorkspaceSettingListIterator, err error) Update(ctx context.Context, workspaceSettingName string, workspaceSetting security.WorkspaceSetting) (result security.WorkspaceSetting, err error) } @@ -104,6 +113,7 @@ type AutoProvisioningSettingsClientAPI interface { Create(ctx context.Context, settingName string, setting security.AutoProvisioningSetting) (result security.AutoProvisioningSetting, err error) Get(ctx context.Context, settingName string) (result security.AutoProvisioningSetting, err error) List(ctx context.Context) (result security.AutoProvisioningSettingListPage, err error) + ListComplete(ctx context.Context) (result security.AutoProvisioningSettingListIterator, err error) } var _ AutoProvisioningSettingsClientAPI = (*security.AutoProvisioningSettingsClient)(nil) @@ -112,6 +122,7 @@ var _ AutoProvisioningSettingsClientAPI = (*security.AutoProvisioningSettingsCli type CompliancesClientAPI interface { Get(ctx context.Context, scope string, complianceName string) (result security.Compliance, err error) List(ctx context.Context, scope string) (result security.ComplianceListPage, err error) + ListComplete(ctx context.Context, scope string) (result security.ComplianceListIterator, err error) } var _ CompliancesClientAPI = (*security.CompliancesClient)(nil) @@ -130,6 +141,7 @@ type DeviceSecurityGroupsClientAPI interface { Delete(ctx context.Context, resourceID string, deviceSecurityGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceID string, deviceSecurityGroupName string) (result security.DeviceSecurityGroup, err error) List(ctx context.Context, resourceID string) (result security.DeviceSecurityGroupListPage, err error) + ListComplete(ctx context.Context, resourceID string) (result security.DeviceSecurityGroupListIterator, err error) } var _ DeviceSecurityGroupsClientAPI = (*security.DeviceSecurityGroupsClient)(nil) @@ -138,6 +150,7 @@ var _ DeviceSecurityGroupsClientAPI = (*security.DeviceSecurityGroupsClient)(nil type SettingsClientAPI interface { Get(ctx context.Context, settingName string) (result security.Setting, err error) List(ctx context.Context) (result security.SettingsListPage, err error) + ListComplete(ctx context.Context) (result security.SettingsListIterator, err error) Update(ctx context.Context, settingName string, setting security.Setting) (result security.Setting, err error) } @@ -148,6 +161,7 @@ type InformationProtectionPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, scope string, informationProtectionPolicyName string) (result security.InformationProtectionPolicy, err error) Get(ctx context.Context, scope string, informationProtectionPolicyName string) (result security.InformationProtectionPolicy, err error) List(ctx context.Context, scope string) (result security.InformationProtectionPolicyListPage, err error) + ListComplete(ctx context.Context, scope string) (result security.InformationProtectionPolicyListIterator, err error) } var _ InformationProtectionPoliciesClientAPI = (*security.InformationProtectionPoliciesClient)(nil) @@ -155,6 +169,7 @@ var _ InformationProtectionPoliciesClientAPI = (*security.InformationProtectionP // IoTSecuritySolutionsClientAPI contains the set of methods on the IoTSecuritySolutionsClient type. type IoTSecuritySolutionsClientAPI interface { List(ctx context.Context, filter string) (result security.IoTSecuritySolutionsListPage, err error) + ListComplete(ctx context.Context, filter string) (result security.IoTSecuritySolutionsListIterator, err error) } var _ IoTSecuritySolutionsClientAPI = (*security.IoTSecuritySolutionsClient)(nil) @@ -162,6 +177,7 @@ var _ IoTSecuritySolutionsClientAPI = (*security.IoTSecuritySolutionsClient)(nil // IoTSecuritySolutionsResourceGroupClientAPI contains the set of methods on the IoTSecuritySolutionsResourceGroupClient type. type IoTSecuritySolutionsResourceGroupClientAPI interface { List(ctx context.Context, resourceGroupName string, filter string) (result security.IoTSecuritySolutionsListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, filter string) (result security.IoTSecuritySolutionsListIterator, err error) } var _ IoTSecuritySolutionsResourceGroupClientAPI = (*security.IoTSecuritySolutionsResourceGroupClient)(nil) @@ -187,6 +203,7 @@ var _ IoTSecuritySolutionsAnalyticsClientAPI = (*security.IoTSecuritySolutionsAn // IoTSecuritySolutionsAnalyticsAggregatedAlertsClientAPI contains the set of methods on the IoTSecuritySolutionsAnalyticsAggregatedAlertsClient type. type IoTSecuritySolutionsAnalyticsAggregatedAlertsClientAPI interface { List(ctx context.Context, resourceGroupName string, solutionName string, top *int32) (result security.IoTSecurityAggregatedAlertListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, solutionName string, top *int32) (result security.IoTSecurityAggregatedAlertListIterator, err error) } var _ IoTSecuritySolutionsAnalyticsAggregatedAlertsClientAPI = (*security.IoTSecuritySolutionsAnalyticsAggregatedAlertsClient)(nil) @@ -209,6 +226,7 @@ var _ IoTSecuritySolutionsAnalyticsRecommendationClientAPI = (*security.IoTSecur // IoTSecuritySolutionsAnalyticsRecommendationsClientAPI contains the set of methods on the IoTSecuritySolutionsAnalyticsRecommendationsClient type. type IoTSecuritySolutionsAnalyticsRecommendationsClientAPI interface { List(ctx context.Context, resourceGroupName string, solutionName string, top *int32) (result security.IoTSecurityAggregatedRecommendationListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, solutionName string, top *int32) (result security.IoTSecurityAggregatedRecommendationListIterator, err error) } var _ IoTSecuritySolutionsAnalyticsRecommendationsClientAPI = (*security.IoTSecuritySolutionsAnalyticsRecommendationsClient)(nil) @@ -216,6 +234,7 @@ var _ IoTSecuritySolutionsAnalyticsRecommendationsClientAPI = (*security.IoTSecu // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result security.OperationListPage, err error) + ListComplete(ctx context.Context) (result security.OperationListIterator, err error) } var _ OperationsClientAPI = (*security.OperationsClient)(nil) @@ -224,6 +243,7 @@ var _ OperationsClientAPI = (*security.OperationsClient)(nil) type LocationsClientAPI interface { Get(ctx context.Context) (result security.AscLocation, err error) List(ctx context.Context) (result security.AscLocationListPage, err error) + ListComplete(ctx context.Context) (result security.AscLocationListIterator, err error) } var _ LocationsClientAPI = (*security.LocationsClient)(nil) @@ -233,8 +253,11 @@ type TasksClientAPI interface { GetResourceGroupLevelTask(ctx context.Context, resourceGroupName string, taskName string) (result security.Task, err error) GetSubscriptionLevelTask(ctx context.Context, taskName string) (result security.Task, err error) List(ctx context.Context, filter string) (result security.TaskListPage, err error) + ListComplete(ctx context.Context, filter string) (result security.TaskListIterator, err error) ListByHomeRegion(ctx context.Context, filter string) (result security.TaskListPage, err error) + ListByHomeRegionComplete(ctx context.Context, filter string) (result security.TaskListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result security.TaskListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result security.TaskListIterator, err error) UpdateResourceGroupLevelTaskState(ctx context.Context, resourceGroupName string, taskName string, taskUpdateActionType string) (result autorest.Response, err error) UpdateSubscriptionLevelTaskState(ctx context.Context, taskName string, taskUpdateActionType string) (result autorest.Response, err error) } @@ -246,9 +269,13 @@ type AlertsClientAPI interface { GetResourceGroupLevelAlerts(ctx context.Context, alertName string, resourceGroupName string) (result security.Alert, err error) GetSubscriptionLevelAlert(ctx context.Context, alertName string) (result security.Alert, err error) List(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListResourceGroupLevelAlertsByRegionComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListSubscriptionLevelAlertsByRegion(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListSubscriptionLevelAlertsByRegionComplete(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) @@ -261,7 +288,9 @@ var _ AlertsClientAPI = (*security.AlertsClient)(nil) type DiscoveredSecuritySolutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, discoveredSecuritySolutionName string) (result security.DiscoveredSecuritySolution, err error) List(ctx context.Context) (result security.DiscoveredSecuritySolutionListPage, err error) + ListComplete(ctx context.Context) (result security.DiscoveredSecuritySolutionListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.DiscoveredSecuritySolutionListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.DiscoveredSecuritySolutionListIterator, err error) } var _ DiscoveredSecuritySolutionsClientAPI = (*security.DiscoveredSecuritySolutionsClient)(nil) @@ -273,9 +302,13 @@ type JitNetworkAccessPoliciesClientAPI interface { Get(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string) (result security.JitNetworkAccessPolicy, err error) Initiate(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string, body security.JitNetworkAccessPolicyInitiateRequest) (result security.JitNetworkAccessRequest, err error) List(ctx context.Context) (result security.JitNetworkAccessPoliciesListPage, err error) + ListComplete(ctx context.Context) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByRegion(ctx context.Context) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByRegionComplete(ctx context.Context) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByResourceGroupAndRegion(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByResourceGroupAndRegionComplete(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListIterator, err error) } var _ JitNetworkAccessPoliciesClientAPI = (*security.JitNetworkAccessPoliciesClient)(nil) @@ -293,7 +326,9 @@ var _ AdaptiveApplicationControlsClientAPI = (*security.AdaptiveApplicationContr type ExternalSecuritySolutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, externalSecuritySolutionsName string) (result security.ExternalSecuritySolutionModel, err error) List(ctx context.Context) (result security.ExternalSecuritySolutionListPage, err error) + ListComplete(ctx context.Context) (result security.ExternalSecuritySolutionListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.ExternalSecuritySolutionListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.ExternalSecuritySolutionListIterator, err error) } var _ ExternalSecuritySolutionsClientAPI = (*security.ExternalSecuritySolutionsClient)(nil) @@ -302,7 +337,9 @@ var _ ExternalSecuritySolutionsClientAPI = (*security.ExternalSecuritySolutionsC type TopologyClientAPI interface { Get(ctx context.Context, resourceGroupName string, topologyResourceName string) (result security.TopologyResource, err error) List(ctx context.Context) (result security.TopologyListPage, err error) + ListComplete(ctx context.Context) (result security.TopologyListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.TopologyListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.TopologyListIterator, err error) } var _ TopologyClientAPI = (*security.TopologyClient)(nil) @@ -311,7 +348,9 @@ var _ TopologyClientAPI = (*security.TopologyClient)(nil) type AllowedConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, connectionType security.ConnectionType) (result security.AllowedConnectionsResource, err error) List(ctx context.Context) (result security.AllowedConnectionsListPage, err error) + ListComplete(ctx context.Context) (result security.AllowedConnectionsListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.AllowedConnectionsListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.AllowedConnectionsListIterator, err error) } var _ AllowedConnectionsClientAPI = (*security.AllowedConnectionsClient)(nil) @@ -321,6 +360,7 @@ type AdaptiveNetworkHardeningsClientAPI interface { Enforce(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, adaptiveNetworkHardeningResourceName string, body security.AdaptiveNetworkHardeningEnforceRequest) (result security.AdaptiveNetworkHardeningsEnforceFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, adaptiveNetworkHardeningResourceName string) (result security.AdaptiveNetworkHardening, err error) ListByExtendedResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result security.AdaptiveNetworkHardeningsListPage, err error) + ListByExtendedResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result security.AdaptiveNetworkHardeningsListIterator, err error) } var _ AdaptiveNetworkHardeningsClientAPI = (*security.AdaptiveNetworkHardeningsClient)(nil) diff --git a/services/preview/security/mgmt/v2.0/security/settings.go b/services/preview/security/mgmt/v2.0/security/settings.go index 6f63dd02c69d..971bf2b94b1a 100644 --- a/services/preview/security/mgmt/v2.0/security/settings.go +++ b/services/preview/security/mgmt/v2.0/security/settings.go @@ -36,7 +36,8 @@ func NewSettingsClient(subscriptionID string, ascLocation string) SettingsClient return NewSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewSettingsClientWithBaseURI creates an instance of the SettingsClient client. +// NewSettingsClientWithBaseURI creates an instance of the SettingsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SettingsClient { return SettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/subassessments.go b/services/preview/security/mgmt/v2.0/security/subassessments.go index 4fa19d8e398d..82430e79385f 100644 --- a/services/preview/security/mgmt/v2.0/security/subassessments.go +++ b/services/preview/security/mgmt/v2.0/security/subassessments.go @@ -35,7 +35,8 @@ func NewSubAssessmentsClient(subscriptionID string, ascLocation string) SubAsses return NewSubAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewSubAssessmentsClientWithBaseURI creates an instance of the SubAssessmentsClient client. +// NewSubAssessmentsClientWithBaseURI creates an instance of the SubAssessmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SubAssessmentsClient { return SubAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/tasks.go b/services/preview/security/mgmt/v2.0/security/tasks.go index bad83545919f..bc6628d115d3 100644 --- a/services/preview/security/mgmt/v2.0/security/tasks.go +++ b/services/preview/security/mgmt/v2.0/security/tasks.go @@ -36,7 +36,8 @@ func NewTasksClient(subscriptionID string, ascLocation string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/topology.go b/services/preview/security/mgmt/v2.0/security/topology.go index d0f4f75946f7..efb4716fa9a4 100644 --- a/services/preview/security/mgmt/v2.0/security/topology.go +++ b/services/preview/security/mgmt/v2.0/security/topology.go @@ -36,7 +36,8 @@ func NewTopologyClient(subscriptionID string, ascLocation string) TopologyClient return NewTopologyClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewTopologyClientWithBaseURI creates an instance of the TopologyClient client. +// NewTopologyClientWithBaseURI creates an instance of the TopologyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopologyClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) TopologyClient { return TopologyClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v2.0/security/workspacesettings.go b/services/preview/security/mgmt/v2.0/security/workspacesettings.go index f684aa865117..7165e8698a55 100644 --- a/services/preview/security/mgmt/v2.0/security/workspacesettings.go +++ b/services/preview/security/mgmt/v2.0/security/workspacesettings.go @@ -36,7 +36,9 @@ func NewWorkspaceSettingsClient(subscriptionID string, ascLocation string) Works return NewWorkspaceSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewWorkspaceSettingsClientWithBaseURI creates an instance of the WorkspaceSettingsClient client. +// NewWorkspaceSettingsClientWithBaseURI creates an instance of the WorkspaceSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkspaceSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) WorkspaceSettingsClient { return WorkspaceSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/adaptiveapplicationcontrols.go b/services/preview/security/mgmt/v3.0/security/adaptiveapplicationcontrols.go index 0710d2febfe7..3ac61acc5526 100644 --- a/services/preview/security/mgmt/v3.0/security/adaptiveapplicationcontrols.go +++ b/services/preview/security/mgmt/v3.0/security/adaptiveapplicationcontrols.go @@ -36,7 +36,9 @@ func NewAdaptiveApplicationControlsClient(subscriptionID string, ascLocation str return NewAdaptiveApplicationControlsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAdaptiveApplicationControlsClientWithBaseURI creates an instance of the AdaptiveApplicationControlsClient client. +// NewAdaptiveApplicationControlsClientWithBaseURI creates an instance of the AdaptiveApplicationControlsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAdaptiveApplicationControlsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AdaptiveApplicationControlsClient { return AdaptiveApplicationControlsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/advancedthreatprotection.go b/services/preview/security/mgmt/v3.0/security/advancedthreatprotection.go index 7fe28de28f1e..227375e3f00e 100644 --- a/services/preview/security/mgmt/v3.0/security/advancedthreatprotection.go +++ b/services/preview/security/mgmt/v3.0/security/advancedthreatprotection.go @@ -35,7 +35,9 @@ func NewAdvancedThreatProtectionClient(subscriptionID string, ascLocation string return NewAdvancedThreatProtectionClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAdvancedThreatProtectionClientWithBaseURI creates an instance of the AdvancedThreatProtectionClient client. +// NewAdvancedThreatProtectionClientWithBaseURI creates an instance of the AdvancedThreatProtectionClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAdvancedThreatProtectionClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AdvancedThreatProtectionClient { return AdvancedThreatProtectionClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/alerts.go b/services/preview/security/mgmt/v3.0/security/alerts.go index c7f9d8aab297..ab1902b95caf 100644 --- a/services/preview/security/mgmt/v3.0/security/alerts.go +++ b/services/preview/security/mgmt/v3.0/security/alerts.go @@ -36,7 +36,8 @@ func NewAlertsClient(subscriptionID string, ascLocation string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/allowedconnections.go b/services/preview/security/mgmt/v3.0/security/allowedconnections.go index 74410ff36635..c761a4c3ccce 100644 --- a/services/preview/security/mgmt/v3.0/security/allowedconnections.go +++ b/services/preview/security/mgmt/v3.0/security/allowedconnections.go @@ -36,7 +36,9 @@ func NewAllowedConnectionsClient(subscriptionID string, ascLocation string) Allo return NewAllowedConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAllowedConnectionsClientWithBaseURI creates an instance of the AllowedConnectionsClient client. +// NewAllowedConnectionsClientWithBaseURI creates an instance of the AllowedConnectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAllowedConnectionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AllowedConnectionsClient { return AllowedConnectionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/assessments.go b/services/preview/security/mgmt/v3.0/security/assessments.go new file mode 100644 index 000000000000..8743d85a7e85 --- /dev/null +++ b/services/preview/security/mgmt/v3.0/security/assessments.go @@ -0,0 +1,401 @@ +package security + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AssessmentsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider +type AssessmentsClient struct { + BaseClient +} + +// NewAssessmentsClient creates an instance of the AssessmentsClient client. +func NewAssessmentsClient(subscriptionID string, ascLocation string) AssessmentsClient { + return NewAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) +} + +// NewAssessmentsClientWithBaseURI creates an instance of the AssessmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AssessmentsClient { + return AssessmentsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} +} + +// CreateOrUpdate create a security assessment on your resource. An assessment metadata that describes this assessment +// must be predefined with the same name before inserting the assessment result +// Parameters: +// resourceID - the identifier of the resource. +// assessmentName - the Assessment Key - Unique key for the assessment type +// assessment - calculated assessment on a pre-defined assessment metadata +func (client AssessmentsClient) CreateOrUpdate(ctx context.Context, resourceID string, assessmentName string, assessment Assessment) (result Assessment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsClient.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: assessment, + Constraints: []validation.Constraint{{Target: "assessment.AssessmentProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "assessment.AssessmentProperties.ResourceDetails", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "assessment.AssessmentProperties.Status", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("security.AssessmentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceID, assessmentName, assessment) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AssessmentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceID string, assessmentName string, assessment Assessment) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "assessmentName": autorest.Encode("path", assessmentName), + "resourceId": autorest.Encode("path", resourceID), + } + + const APIVersion = "2019-01-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("/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", pathParameters), + autorest.WithJSON(assessment), + 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 AssessmentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AssessmentsClient) CreateOrUpdateResponder(resp *http.Response) (result Assessment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a security assessment on your resource. An assessment metadata that describes this assessment must be +// predefined with the same name before inserting the assessment result +// Parameters: +// resourceID - the identifier of the resource. +// assessmentName - the Assessment Key - Unique key for the assessment type +func (client AssessmentsClient) Delete(ctx context.Context, resourceID string, assessmentName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceID, assessmentName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AssessmentsClient) DeletePreparer(ctx context.Context, resourceID string, assessmentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "assessmentName": autorest.Encode("path", assessmentName), + "resourceId": autorest.Encode("path", resourceID), + } + + const APIVersion = "2019-01-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", 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 AssessmentsClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AssessmentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a security assessment on your scanned resource +// Parameters: +// resourceID - the identifier of the resource. +// assessmentName - the Assessment Key - Unique key for the assessment type +// expand - oData expand. Optional. +func (client AssessmentsClient) Get(ctx context.Context, resourceID string, assessmentName string, expand ExpandEnum) (result Assessment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsClient.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, resourceID, assessmentName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AssessmentsClient) GetPreparer(ctx context.Context, resourceID string, assessmentName string, expand ExpandEnum) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "assessmentName": autorest.Encode("path", assessmentName), + "resourceId": autorest.Encode("path", resourceID), + } + + const APIVersion = "2019-01-01-preview" + 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("/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client AssessmentsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AssessmentsClient) GetResponder(resp *http.Response) (result Assessment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get security assessments on all your scanned resources inside a scope +// Parameters: +// scope - scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or +// management group (/providers/Microsoft.Management/managementGroups/mgName). +func (client AssessmentsClient) List(ctx context.Context, scope string) (result AssessmentListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsClient.List") + defer func() { + sc := -1 + if result.al.Response.Response != nil { + sc = result.al.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, scope) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "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, "security.AssessmentsClient", "List", resp, "Failure sending request") + return + } + + result.al, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AssessmentsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "scope": autorest.Encode("path", scope), + } + + const APIVersion = "2019-01-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{scope}/providers/Microsoft.Security/assessments", 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 AssessmentsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AssessmentsClient) ListResponder(resp *http.Response) (result AssessmentList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client AssessmentsClient) listNextResults(ctx context.Context, lastResults AssessmentList) (result AssessmentList, err error) { + req, err := lastResults.assessmentListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "security.AssessmentsClient", "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, "security.AssessmentsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AssessmentsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AssessmentsClient) ListComplete(ctx context.Context, scope string) (result AssessmentListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentsClient.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, scope) + return +} diff --git a/services/preview/security/mgmt/v3.0/security/assessmentsmetadata.go b/services/preview/security/mgmt/v3.0/security/assessmentsmetadata.go index 86370dbcd2a6..7cceb0291042 100644 --- a/services/preview/security/mgmt/v3.0/security/assessmentsmetadata.go +++ b/services/preview/security/mgmt/v3.0/security/assessmentsmetadata.go @@ -35,7 +35,9 @@ func NewAssessmentsMetadataClient(subscriptionID string, ascLocation string) Ass return NewAssessmentsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAssessmentsMetadataClientWithBaseURI creates an instance of the AssessmentsMetadataClient client. +// NewAssessmentsMetadataClientWithBaseURI creates an instance of the AssessmentsMetadataClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAssessmentsMetadataClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AssessmentsMetadataClient { return AssessmentsMetadataClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/assessmentsmetadatasubscription.go b/services/preview/security/mgmt/v3.0/security/assessmentsmetadatasubscription.go index 6196ed904798..9f7b9b2fe377 100644 --- a/services/preview/security/mgmt/v3.0/security/assessmentsmetadatasubscription.go +++ b/services/preview/security/mgmt/v3.0/security/assessmentsmetadatasubscription.go @@ -38,7 +38,8 @@ func NewAssessmentsMetadataSubscriptionClient(subscriptionID string, ascLocation } // NewAssessmentsMetadataSubscriptionClientWithBaseURI creates an instance of the AssessmentsMetadataSubscriptionClient -// 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 NewAssessmentsMetadataSubscriptionClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AssessmentsMetadataSubscriptionClient { return AssessmentsMetadataSubscriptionClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/automations.go b/services/preview/security/mgmt/v3.0/security/automations.go index 605cb35a072d..855f8dd218f2 100644 --- a/services/preview/security/mgmt/v3.0/security/automations.go +++ b/services/preview/security/mgmt/v3.0/security/automations.go @@ -36,7 +36,8 @@ func NewAutomationsClient(subscriptionID string, ascLocation string) Automations return NewAutomationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAutomationsClientWithBaseURI creates an instance of the AutomationsClient client. +// NewAutomationsClientWithBaseURI creates an instance of the AutomationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAutomationsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AutomationsClient { return AutomationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/autoprovisioningsettings.go b/services/preview/security/mgmt/v3.0/security/autoprovisioningsettings.go index 87799c76d1e9..6e3b8c64871e 100644 --- a/services/preview/security/mgmt/v3.0/security/autoprovisioningsettings.go +++ b/services/preview/security/mgmt/v3.0/security/autoprovisioningsettings.go @@ -36,7 +36,9 @@ func NewAutoProvisioningSettingsClient(subscriptionID string, ascLocation string return NewAutoProvisioningSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewAutoProvisioningSettingsClientWithBaseURI creates an instance of the AutoProvisioningSettingsClient client. +// NewAutoProvisioningSettingsClientWithBaseURI creates an instance of the AutoProvisioningSettingsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAutoProvisioningSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AutoProvisioningSettingsClient { return AutoProvisioningSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/client.go b/services/preview/security/mgmt/v3.0/security/client.go index c1db0ec1e825..ca26dee802e7 100644 --- a/services/preview/security/mgmt/v3.0/security/client.go +++ b/services/preview/security/mgmt/v3.0/security/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, ascLocation string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, ascLocation string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/security/mgmt/v3.0/security/complianceresults.go b/services/preview/security/mgmt/v3.0/security/complianceresults.go index 0b4c8fa92e3e..273d0cd13578 100644 --- a/services/preview/security/mgmt/v3.0/security/complianceresults.go +++ b/services/preview/security/mgmt/v3.0/security/complianceresults.go @@ -35,7 +35,9 @@ func NewComplianceResultsClient(subscriptionID string, ascLocation string) Compl return NewComplianceResultsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewComplianceResultsClientWithBaseURI creates an instance of the ComplianceResultsClient client. +// NewComplianceResultsClientWithBaseURI creates an instance of the ComplianceResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewComplianceResultsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) ComplianceResultsClient { return ComplianceResultsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/compliances.go b/services/preview/security/mgmt/v3.0/security/compliances.go index 697c6f0be430..f7b5b7351067 100644 --- a/services/preview/security/mgmt/v3.0/security/compliances.go +++ b/services/preview/security/mgmt/v3.0/security/compliances.go @@ -35,7 +35,8 @@ func NewCompliancesClient(subscriptionID string, ascLocation string) Compliances return NewCompliancesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewCompliancesClientWithBaseURI creates an instance of the CompliancesClient client. +// NewCompliancesClientWithBaseURI creates an instance of the CompliancesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCompliancesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) CompliancesClient { return CompliancesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/contacts.go b/services/preview/security/mgmt/v3.0/security/contacts.go index 91b3b63e4fe2..abb4374767a9 100644 --- a/services/preview/security/mgmt/v3.0/security/contacts.go +++ b/services/preview/security/mgmt/v3.0/security/contacts.go @@ -36,7 +36,8 @@ func NewContactsClient(subscriptionID string, ascLocation string) ContactsClient return NewContactsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewContactsClientWithBaseURI creates an instance of the ContactsClient client. +// NewContactsClientWithBaseURI creates an instance of the ContactsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewContactsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) ContactsClient { return ContactsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/devicesecuritygroups.go b/services/preview/security/mgmt/v3.0/security/devicesecuritygroups.go index 00a09f9bf766..ca98116aa12e 100644 --- a/services/preview/security/mgmt/v3.0/security/devicesecuritygroups.go +++ b/services/preview/security/mgmt/v3.0/security/devicesecuritygroups.go @@ -35,7 +35,9 @@ func NewDeviceSecurityGroupsClient(subscriptionID string, ascLocation string) De return NewDeviceSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewDeviceSecurityGroupsClientWithBaseURI creates an instance of the DeviceSecurityGroupsClient client. +// NewDeviceSecurityGroupsClientWithBaseURI creates an instance of the DeviceSecurityGroupsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeviceSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DeviceSecurityGroupsClient { return DeviceSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/discoveredsecuritysolutions.go b/services/preview/security/mgmt/v3.0/security/discoveredsecuritysolutions.go index 5e0d45e1cdcd..f994891f6a74 100644 --- a/services/preview/security/mgmt/v3.0/security/discoveredsecuritysolutions.go +++ b/services/preview/security/mgmt/v3.0/security/discoveredsecuritysolutions.go @@ -36,7 +36,9 @@ func NewDiscoveredSecuritySolutionsClient(subscriptionID string, ascLocation str return NewDiscoveredSecuritySolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewDiscoveredSecuritySolutionsClientWithBaseURI creates an instance of the DiscoveredSecuritySolutionsClient client. +// NewDiscoveredSecuritySolutionsClientWithBaseURI creates an instance of the DiscoveredSecuritySolutionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiscoveredSecuritySolutionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) DiscoveredSecuritySolutionsClient { return DiscoveredSecuritySolutionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/externalsecuritysolutions.go b/services/preview/security/mgmt/v3.0/security/externalsecuritysolutions.go index 883f4e529cfd..405d18b2de94 100644 --- a/services/preview/security/mgmt/v3.0/security/externalsecuritysolutions.go +++ b/services/preview/security/mgmt/v3.0/security/externalsecuritysolutions.go @@ -36,7 +36,9 @@ func NewExternalSecuritySolutionsClient(subscriptionID string, ascLocation strin return NewExternalSecuritySolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewExternalSecuritySolutionsClientWithBaseURI creates an instance of the ExternalSecuritySolutionsClient client. +// NewExternalSecuritySolutionsClientWithBaseURI creates an instance of the ExternalSecuritySolutionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewExternalSecuritySolutionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) ExternalSecuritySolutionsClient { return ExternalSecuritySolutionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/informationprotectionpolicies.go b/services/preview/security/mgmt/v3.0/security/informationprotectionpolicies.go index 160668c2d5ff..4202bb463fd3 100644 --- a/services/preview/security/mgmt/v3.0/security/informationprotectionpolicies.go +++ b/services/preview/security/mgmt/v3.0/security/informationprotectionpolicies.go @@ -36,7 +36,8 @@ func NewInformationProtectionPoliciesClient(subscriptionID string, ascLocation s } // NewInformationProtectionPoliciesClientWithBaseURI creates an instance of the InformationProtectionPoliciesClient -// 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 NewInformationProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) InformationProtectionPoliciesClient { return InformationProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/iotsecuritysolution.go b/services/preview/security/mgmt/v3.0/security/iotsecuritysolution.go index 10b731aa211f..ac144796e9a2 100644 --- a/services/preview/security/mgmt/v3.0/security/iotsecuritysolution.go +++ b/services/preview/security/mgmt/v3.0/security/iotsecuritysolution.go @@ -36,7 +36,9 @@ func NewIotSecuritySolutionClient(subscriptionID string, ascLocation string) Iot return NewIotSecuritySolutionClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewIotSecuritySolutionClientWithBaseURI creates an instance of the IotSecuritySolutionClient client. +// NewIotSecuritySolutionClientWithBaseURI creates an instance of the IotSecuritySolutionClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewIotSecuritySolutionClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotSecuritySolutionClient { return IotSecuritySolutionClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionanalytics.go b/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionanalytics.go index 85c4adbf8b00..689654cfbe0a 100644 --- a/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionanalytics.go +++ b/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionanalytics.go @@ -37,7 +37,8 @@ func NewIotSecuritySolutionAnalyticsClient(subscriptionID string, ascLocation st } // NewIotSecuritySolutionAnalyticsClientWithBaseURI creates an instance of the IotSecuritySolutionAnalyticsClient -// 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 NewIotSecuritySolutionAnalyticsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotSecuritySolutionAnalyticsClient { return IotSecuritySolutionAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionsanalyticsaggregatedalert.go b/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionsanalyticsaggregatedalert.go index b84aaf8df622..043fd6171430 100644 --- a/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionsanalyticsaggregatedalert.go +++ b/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionsanalyticsaggregatedalert.go @@ -39,7 +39,8 @@ func NewIotSecuritySolutionsAnalyticsAggregatedAlertClient(subscriptionID string } // NewIotSecuritySolutionsAnalyticsAggregatedAlertClientWithBaseURI creates an instance of the -// IotSecuritySolutionsAnalyticsAggregatedAlertClient client. +// IotSecuritySolutionsAnalyticsAggregatedAlertClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotSecuritySolutionsAnalyticsAggregatedAlertClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotSecuritySolutionsAnalyticsAggregatedAlertClient { return IotSecuritySolutionsAnalyticsAggregatedAlertClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionsanalyticsrecommendation.go b/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionsanalyticsrecommendation.go index e48bacc087da..b2e227faa2bf 100644 --- a/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionsanalyticsrecommendation.go +++ b/services/preview/security/mgmt/v3.0/security/iotsecuritysolutionsanalyticsrecommendation.go @@ -39,7 +39,8 @@ func NewIotSecuritySolutionsAnalyticsRecommendationClient(subscriptionID string, } // NewIotSecuritySolutionsAnalyticsRecommendationClientWithBaseURI creates an instance of the -// IotSecuritySolutionsAnalyticsRecommendationClient client. +// IotSecuritySolutionsAnalyticsRecommendationClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotSecuritySolutionsAnalyticsRecommendationClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) IotSecuritySolutionsAnalyticsRecommendationClient { return IotSecuritySolutionsAnalyticsRecommendationClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/jitnetworkaccesspolicies.go b/services/preview/security/mgmt/v3.0/security/jitnetworkaccesspolicies.go index 0aa96db56670..b5aead1c6d04 100644 --- a/services/preview/security/mgmt/v3.0/security/jitnetworkaccesspolicies.go +++ b/services/preview/security/mgmt/v3.0/security/jitnetworkaccesspolicies.go @@ -36,7 +36,9 @@ func NewJitNetworkAccessPoliciesClient(subscriptionID string, ascLocation string return NewJitNetworkAccessPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewJitNetworkAccessPoliciesClientWithBaseURI creates an instance of the JitNetworkAccessPoliciesClient client. +// NewJitNetworkAccessPoliciesClientWithBaseURI creates an instance of the JitNetworkAccessPoliciesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewJitNetworkAccessPoliciesClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) JitNetworkAccessPoliciesClient { return JitNetworkAccessPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/locations.go b/services/preview/security/mgmt/v3.0/security/locations.go index 94917385fe7e..18ecc473ff74 100644 --- a/services/preview/security/mgmt/v3.0/security/locations.go +++ b/services/preview/security/mgmt/v3.0/security/locations.go @@ -36,7 +36,8 @@ func NewLocationsClient(subscriptionID string, ascLocation string) LocationsClie return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/models.go b/services/preview/security/mgmt/v3.0/security/models.go index b0387bb0f382..dca78bb964d7 100644 --- a/services/preview/security/mgmt/v3.0/security/models.go +++ b/services/preview/security/mgmt/v3.0/security/models.go @@ -133,6 +133,23 @@ func PossibleAssessedResourceTypeValues() []AssessedResourceType { return []AssessedResourceType{AssessedResourceTypeAdditionalData, AssessedResourceTypeContainerRegistryVulnerability, AssessedResourceTypeServerVulnerabilityAssessment, AssessedResourceTypeSQLServerVulnerability} } +// AssessmentStatusCode enumerates the values for assessment status code. +type AssessmentStatusCode string + +const ( + // Healthy The resource is healthy + Healthy AssessmentStatusCode = "Healthy" + // NotApplicable Assessment for this resource did not happen + NotApplicable AssessmentStatusCode = "NotApplicable" + // Unhealthy The resource has a security issue that needs to be addressed + Unhealthy AssessmentStatusCode = "Unhealthy" +) + +// PossibleAssessmentStatusCodeValues returns an array of possible values for the AssessmentStatusCode const type. +func PossibleAssessmentStatusCodeValues() []AssessmentStatusCode { + return []AssessmentStatusCode{Healthy, NotApplicable, Unhealthy} +} + // AssessmentType enumerates the values for assessment type. type AssessmentType string @@ -362,6 +379,21 @@ func PossibleExecutableValues() []Executable { return []Executable{ExecutableAudit, ExecutableEnforce, ExecutableNone} } +// ExpandEnum enumerates the values for expand enum. +type ExpandEnum string + +const ( + // Links All links associated with an assessment + Links ExpandEnum = "links" + // Metadata Assessment metadata + Metadata ExpandEnum = "metadata" +) + +// PossibleExpandEnumValues returns an array of possible values for the ExpandEnum const type. +func PossibleExpandEnumValues() []ExpandEnum { + return []ExpandEnum{Links, Metadata} +} + // ExportData enumerates the values for export data. type ExportData string @@ -757,19 +789,19 @@ func PossibleReportedSeverityValues() []ReportedSeverity { type ResourceStatus string const ( - // Healthy This assessment on the resource is healthy - Healthy ResourceStatus = "Healthy" - // NotApplicable This assessment is not applicable to this resource - NotApplicable ResourceStatus = "NotApplicable" - // NotHealthy This assessment on the resource is not healthy - NotHealthy ResourceStatus = "NotHealthy" - // OffByPolicy This assessment is turned off by policy on this subscription - OffByPolicy ResourceStatus = "OffByPolicy" + // ResourceStatusHealthy This assessment on the resource is healthy + ResourceStatusHealthy ResourceStatus = "Healthy" + // ResourceStatusNotApplicable This assessment is not applicable to this resource + ResourceStatusNotApplicable ResourceStatus = "NotApplicable" + // ResourceStatusNotHealthy This assessment on the resource is not healthy + ResourceStatusNotHealthy ResourceStatus = "NotHealthy" + // ResourceStatusOffByPolicy This assessment is turned off by policy on this subscription + ResourceStatusOffByPolicy ResourceStatus = "OffByPolicy" ) // PossibleResourceStatusValues returns an array of possible values for the ResourceStatus const type. func PossibleResourceStatusValues() []ResourceStatus { - return []ResourceStatus{Healthy, NotApplicable, NotHealthy, OffByPolicy} + return []ResourceStatus{ResourceStatusHealthy, ResourceStatusNotApplicable, ResourceStatusNotHealthy, ResourceStatusOffByPolicy} } // Script enumerates the values for script. @@ -840,17 +872,17 @@ func PossibleSolutionStatusValues() []SolutionStatus { type Source string const ( - // SourceAws ... - SourceAws Source = "Aws" // SourceAzure ... SourceAzure Source = "Azure" + // SourceOnPremise ... + SourceOnPremise Source = "OnPremise" // SourceResourceDetails ... SourceResourceDetails Source = "ResourceDetails" ) // PossibleSourceValues returns an array of possible values for the Source const type. func PossibleSourceValues() []Source { - return []Source{SourceAws, SourceAzure, SourceResourceDetails} + return []Source{SourceAzure, SourceOnPremise, SourceResourceDetails} } // SourceSystem enumerates the values for source system. @@ -2160,6 +2192,230 @@ func NewAscLocationListPage(getNextPage func(context.Context, AscLocationList) ( return AscLocationListPage{fn: getNextPage} } +// Assessment security assessment on a resource +type Assessment struct { + autorest.Response `json:"-"` + *AssessmentProperties `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 Assessment. +func (a Assessment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if a.AssessmentProperties != nil { + objectMap["properties"] = a.AssessmentProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Assessment struct. +func (a *Assessment) UnmarshalJSON(body []byte) error { + var m map[string]*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 assessmentProperties AssessmentProperties + err = json.Unmarshal(*v, &assessmentProperties) + if err != nil { + return err + } + a.AssessmentProperties = &assessmentProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + a.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + a.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + a.Type = &typeVar + } + } + } + + return nil +} + +// AssessmentLinks links relevant to the assessment +type AssessmentLinks struct { + // AzurePortalURI - READ-ONLY; Link to assessment in Azure Portal + AzurePortalURI *string `json:"azurePortalUri,omitempty"` +} + +// AssessmentList page of a security assessments list +type AssessmentList struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Collection of security assessments in this page + Value *[]Assessment `json:"value,omitempty"` + // NextLink - READ-ONLY; The URI to fetch the next page. + NextLink *string `json:"nextLink,omitempty"` +} + +// AssessmentListIterator provides access to a complete listing of Assessment values. +type AssessmentListIterator struct { + i int + page AssessmentListPage +} + +// 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 *AssessmentListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentListIterator.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 *AssessmentListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AssessmentListIterator) 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 AssessmentListIterator) Response() AssessmentList { + 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 AssessmentListIterator) Value() Assessment { + if !iter.page.NotDone() { + return Assessment{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AssessmentListIterator type. +func NewAssessmentListIterator(page AssessmentListPage) AssessmentListIterator { + return AssessmentListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (al AssessmentList) IsEmpty() bool { + return al.Value == nil || len(*al.Value) == 0 +} + +// assessmentListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (al AssessmentList) assessmentListPreparer(ctx context.Context) (*http.Request, error) { + if al.NextLink == nil || len(to.String(al.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(al.NextLink))) +} + +// AssessmentListPage contains a page of Assessment values. +type AssessmentListPage struct { + fn func(context.Context, AssessmentList) (AssessmentList, error) + al AssessmentList +} + +// 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 *AssessmentListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssessmentListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.al) + if err != nil { + return err + } + page.al = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AssessmentListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AssessmentListPage) NotDone() bool { + return !page.al.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AssessmentListPage) Response() AssessmentList { + return page.al +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AssessmentListPage) Values() []Assessment { + if page.al.IsEmpty() { + return nil + } + return *page.al.Value +} + +// Creates a new instance of the AssessmentListPage type. +func NewAssessmentListPage(getNextPage func(context.Context, AssessmentList) (AssessmentList, error)) AssessmentListPage { + return AssessmentListPage{fn: getNextPage} +} + // AssessmentMetadata security assessment metadata type AssessmentMetadata struct { autorest.Response `json:"-"` @@ -2402,6 +2658,102 @@ type AssessmentMetadataProperties struct { AssessmentType AssessmentType `json:"assessmentType,omitempty"` } +// AssessmentProperties describes properties of an assessment. +type AssessmentProperties struct { + ResourceDetails BasicResourceDetails `json:"resourceDetails,omitempty"` + // DisplayName - READ-ONLY; User friendly display name of the assessment + DisplayName *string `json:"displayName,omitempty"` + Status *AssessmentStatus `json:"status,omitempty"` + // AdditionalData - Additional data regarding the assessment + AdditionalData map[string]*string `json:"additionalData"` + Links *AssessmentLinks `json:"links,omitempty"` +} + +// MarshalJSON is the custom marshaler for AssessmentProperties. +func (ap AssessmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["resourceDetails"] = ap.ResourceDetails + if ap.Status != nil { + objectMap["status"] = ap.Status + } + if ap.AdditionalData != nil { + objectMap["additionalData"] = ap.AdditionalData + } + if ap.Links != nil { + objectMap["links"] = ap.Links + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AssessmentProperties struct. +func (ap *AssessmentProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "resourceDetails": + if v != nil { + resourceDetails, err := unmarshalBasicResourceDetails(*v) + if err != nil { + return err + } + ap.ResourceDetails = resourceDetails + } + case "displayName": + if v != nil { + var displayName string + err = json.Unmarshal(*v, &displayName) + if err != nil { + return err + } + ap.DisplayName = &displayName + } + case "status": + if v != nil { + var status AssessmentStatus + err = json.Unmarshal(*v, &status) + if err != nil { + return err + } + ap.Status = &status + } + case "additionalData": + if v != nil { + var additionalData map[string]*string + err = json.Unmarshal(*v, &additionalData) + if err != nil { + return err + } + ap.AdditionalData = additionalData + } + case "links": + if v != nil { + var links AssessmentLinks + err = json.Unmarshal(*v, &links) + if err != nil { + return err + } + ap.Links = &links + } + } + } + + return nil +} + +// AssessmentStatus the result of the assessment +type AssessmentStatus struct { + // Code - Programmatic code for the status of the assessment. Possible values include: 'Healthy', 'Unhealthy', 'NotApplicable' + Code AssessmentStatusCode `json:"code,omitempty"` + // Cause - Programmatic code for the cause of the assessment status + Cause *string `json:"cause,omitempty"` + // Description - Human readable description of the assessment status + Description *string `json:"description,omitempty"` +} + // AtaExternalSecuritySolution represents an ATA security solution which sends logs to an OMS workspace type AtaExternalSecuritySolution struct { Properties *AtaSolutionProperties `json:"properties,omitempty"` @@ -2769,7 +3121,8 @@ func (aa AutomationAction) AsBasicAutomationAction() (BasicAutomationAction, boo return &aa, true } -// AutomationActionEventHub the target Event Hub to which event data will be exported. +// AutomationActionEventHub the target Event Hub to which event data will be exported. To learn more about +// Security Center continuous export capabilities, visit https://aka.ms/ASCExportLearnMore type AutomationActionEventHub struct { // EventHubResourceID - The target Event Hub Azure Resource ID. EventHubResourceID *string `json:"eventHubResourceId,omitempty"` @@ -2822,7 +3175,8 @@ func (aaeh AutomationActionEventHub) AsBasicAutomationAction() (BasicAutomationA return &aaeh, true } -// AutomationActionLogicApp the logic app action that should be triggered. +// AutomationActionLogicApp the logic app action that should be triggered. To learn more about Security +// Center's Workflow Automation capabilities, visit https://aka.ms/ASCWorkflowAutomationLearnMore type AutomationActionLogicApp struct { // LogicAppResourceID - The triggered Logic App Azure Resource ID. This can also reside on other subscriptions, given that you have permissions to trigger the Logic App LogicAppResourceID *string `json:"logicAppResourceId,omitempty"` @@ -2877,7 +3231,8 @@ func (aala AutomationActionLogicApp) AsBasicAutomationAction() (BasicAutomationA // alerts data will reside in the 'SecurityAlert' table and the assessments data will reside in the // 'SecurityRecommendation' table (under the 'Security'/'SecurityCenterFree' solutions). Note that in order // to view the data in the workspace, the Security Center Log Analytics free/standard solution needs to be -// enabled on that workspace. +// enabled on that workspace. To learn more about Security Center continuous export capabilities, visit +// https://aka.ms/ASCExportLearnMore type AutomationActionWorkspace struct { // WorkspaceResourceID - The fully qualified Log Analytics Workspace Azure Resource ID. WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` @@ -3178,7 +3533,7 @@ type AutomationTriggeringRule struct { PropertyType PropertyType `json:"propertyType,omitempty"` // ExpectedValue - The expected value. ExpectedValue *string `json:"expectedValue,omitempty"` - // Operator - A valid comparer operator to use. Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' + // Operator - A valid comparer operator to use. A case-insensitive comparison will be applied for String PropertyType. Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqualTo', 'LesserThan', 'LesserThanOrEqualTo', 'NotEquals', 'Contains', 'StartsWith', 'EndsWith' Operator Operator `json:"operator,omitempty"` } @@ -3417,51 +3772,11 @@ type AutoProvisioningSettingProperties struct { AutoProvision AutoProvision `json:"autoProvision,omitempty"` } -// AwsResourceDetails details of the resource that was assessed -type AwsResourceDetails struct { - // AccountID - READ-ONLY; AWS account ID - AccountID *string `json:"accountId,omitempty"` - // AwsResourceID - READ-ONLY; AWS resource ID. can be ARN or other - AwsResourceID *string `json:"awsResourceId,omitempty"` - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' - Source Source `json:"source,omitempty"` -} - -// MarshalJSON is the custom marshaler for AwsResourceDetails. -func (ard AwsResourceDetails) MarshalJSON() ([]byte, error) { - ard.Source = SourceAws - objectMap := make(map[string]interface{}) - if ard.Source != "" { - objectMap["source"] = ard.Source - } - return json.Marshal(objectMap) -} - -// AsAzureResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { - return nil, false -} - -// AsAwsResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { - return &ard, true -} - -// AsResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { - return nil, false -} - -// AsBasicResourceDetails is the BasicResourceDetails implementation for AwsResourceDetails. -func (ard AwsResourceDetails) AsBasicResourceDetails() (BasicResourceDetails, bool) { - return &ard, true -} - -// AzureResourceDetails details of the resource that was assessed +// AzureResourceDetails details of the Azure resource that was assessed type AzureResourceDetails struct { - // ID - READ-ONLY; Azure resource ID of the assessed resource + // ID - READ-ONLY; Azure resource Id of the assessed resource ID *string `json:"id,omitempty"` - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' Source Source `json:"source,omitempty"` } @@ -3475,16 +3790,16 @@ func (ard AzureResourceDetails) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. +func (ard AzureResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { + return nil, false +} + // AsAzureResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. func (ard AzureResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { return &ard, true } -// AsAwsResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. -func (ard AzureResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { - return nil, false -} - // AsResourceDetails is the BasicResourceDetails implementation for AzureResourceDetails. func (ard AzureResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { return nil, false @@ -4167,7 +4482,7 @@ func NewComplianceResultListPage(getNextPage func(context.Context, ComplianceRes // ComplianceResultProperties compliance result data type ComplianceResultProperties struct { - // ResourceStatus - READ-ONLY; The status of the resource regarding a single assessment. Possible values include: 'Healthy', 'NotApplicable', 'OffByPolicy', 'NotHealthy' + // ResourceStatus - READ-ONLY; The status of the resource regarding a single assessment. Possible values include: 'ResourceStatusHealthy', 'ResourceStatusNotApplicable', 'ResourceStatusOffByPolicy', 'ResourceStatusNotHealthy' ResourceStatus ResourceStatus `json:"resourceStatus,omitempty"` } @@ -7078,6 +7393,62 @@ type Location struct { Location *string `json:"location,omitempty"` } +// OnPremiseResourceDetails details of the On Premise resource that was assessed +type OnPremiseResourceDetails struct { + // WorkspaceID - Azure resource Id of the workspace the machine is attached to + WorkspaceID *string `json:"workspaceId,omitempty"` + // Vmuuid - The unique Id of the machine + Vmuuid *string `json:"vmuuid,omitempty"` + // SourceComputerID - The oms agent Id installed on the machine + SourceComputerID *string `json:"sourceComputerId,omitempty"` + // MachineName - The name of the machine + MachineName *string `json:"machineName,omitempty"` + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' + Source Source `json:"source,omitempty"` +} + +// MarshalJSON is the custom marshaler for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) MarshalJSON() ([]byte, error) { + oprd.Source = SourceOnPremise + objectMap := make(map[string]interface{}) + if oprd.WorkspaceID != nil { + objectMap["workspaceId"] = oprd.WorkspaceID + } + if oprd.Vmuuid != nil { + objectMap["vmuuid"] = oprd.Vmuuid + } + if oprd.SourceComputerID != nil { + objectMap["sourceComputerId"] = oprd.SourceComputerID + } + if oprd.MachineName != nil { + objectMap["machineName"] = oprd.MachineName + } + if oprd.Source != "" { + objectMap["source"] = oprd.Source + } + return json.Marshal(objectMap) +} + +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { + return &oprd, true +} + +// AsAzureResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { + return nil, false +} + +// AsResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsResourceDetails() (*ResourceDetails, bool) { + return nil, false +} + +// AsBasicResourceDetails is the BasicResourceDetails implementation for OnPremiseResourceDetails. +func (oprd OnPremiseResourceDetails) AsBasicResourceDetails() (BasicResourceDetails, bool) { + return &oprd, true +} + // Operation possible operation in the REST API of Microsoft.Security type Operation struct { // Name - READ-ONLY; Name of the operation @@ -8107,14 +8478,14 @@ type Resource struct { // BasicResourceDetails details of the resource that was assessed type BasicResourceDetails interface { + AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) AsAzureResourceDetails() (*AzureResourceDetails, bool) - AsAwsResourceDetails() (*AwsResourceDetails, bool) AsResourceDetails() (*ResourceDetails, bool) } // ResourceDetails details of the resource that was assessed type ResourceDetails struct { - // Source - Possible values include: 'SourceResourceDetails', 'SourceAzure', 'SourceAws' + // Source - Possible values include: 'SourceResourceDetails', 'SourceOnPremise', 'SourceAzure' Source Source `json:"source,omitempty"` } @@ -8126,14 +8497,14 @@ func unmarshalBasicResourceDetails(body []byte) (BasicResourceDetails, error) { } switch m["source"] { + case string(SourceOnPremise): + var oprd OnPremiseResourceDetails + err := json.Unmarshal(body, &oprd) + return oprd, err case string(SourceAzure): var ard AzureResourceDetails err := json.Unmarshal(body, &ard) return ard, err - case string(SourceAws): - var ard AwsResourceDetails - err := json.Unmarshal(body, &ard) - return ard, err default: var rd ResourceDetails err := json.Unmarshal(body, &rd) @@ -8169,13 +8540,13 @@ func (rd ResourceDetails) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsAzureResourceDetails is the BasicResourceDetails implementation for ResourceDetails. -func (rd ResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { +// AsOnPremiseResourceDetails is the BasicResourceDetails implementation for ResourceDetails. +func (rd ResourceDetails) AsOnPremiseResourceDetails() (*OnPremiseResourceDetails, bool) { return nil, false } -// AsAwsResourceDetails is the BasicResourceDetails implementation for ResourceDetails. -func (rd ResourceDetails) AsAwsResourceDetails() (*AwsResourceDetails, bool) { +// AsAzureResourceDetails is the BasicResourceDetails implementation for ResourceDetails. +func (rd ResourceDetails) AsAzureResourceDetails() (*AzureResourceDetails, bool) { return nil, false } diff --git a/services/preview/security/mgmt/v3.0/security/operations.go b/services/preview/security/mgmt/v3.0/security/operations.go index 343293875ddf..b4a74214e886 100644 --- a/services/preview/security/mgmt/v3.0/security/operations.go +++ b/services/preview/security/mgmt/v3.0/security/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, ascLocation string) OperationsCl return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, ascLocation string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/pricings.go b/services/preview/security/mgmt/v3.0/security/pricings.go index d43a4ac71fb5..fff068706738 100644 --- a/services/preview/security/mgmt/v3.0/security/pricings.go +++ b/services/preview/security/mgmt/v3.0/security/pricings.go @@ -36,7 +36,8 @@ func NewPricingsClient(subscriptionID string, ascLocation string) PricingsClient return NewPricingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewPricingsClientWithBaseURI creates an instance of the PricingsClient client. +// NewPricingsClientWithBaseURI creates an instance of the PricingsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPricingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) PricingsClient { return PricingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/regulatorycomplianceassessments.go b/services/preview/security/mgmt/v3.0/security/regulatorycomplianceassessments.go index c0083af29333..bed3ced573e3 100644 --- a/services/preview/security/mgmt/v3.0/security/regulatorycomplianceassessments.go +++ b/services/preview/security/mgmt/v3.0/security/regulatorycomplianceassessments.go @@ -38,7 +38,8 @@ func NewRegulatoryComplianceAssessmentsClient(subscriptionID string, ascLocation } // NewRegulatoryComplianceAssessmentsClientWithBaseURI creates an instance of the RegulatoryComplianceAssessmentsClient -// 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 NewRegulatoryComplianceAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceAssessmentsClient { return RegulatoryComplianceAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/regulatorycompliancecontrols.go b/services/preview/security/mgmt/v3.0/security/regulatorycompliancecontrols.go index 82cf7d7cff1e..1d590b52a497 100644 --- a/services/preview/security/mgmt/v3.0/security/regulatorycompliancecontrols.go +++ b/services/preview/security/mgmt/v3.0/security/regulatorycompliancecontrols.go @@ -37,7 +37,8 @@ func NewRegulatoryComplianceControlsClient(subscriptionID string, ascLocation st } // NewRegulatoryComplianceControlsClientWithBaseURI creates an instance of the RegulatoryComplianceControlsClient -// 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 NewRegulatoryComplianceControlsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceControlsClient { return RegulatoryComplianceControlsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/regulatorycompliancestandards.go b/services/preview/security/mgmt/v3.0/security/regulatorycompliancestandards.go index bdb1b4d36598..86e2892938b1 100644 --- a/services/preview/security/mgmt/v3.0/security/regulatorycompliancestandards.go +++ b/services/preview/security/mgmt/v3.0/security/regulatorycompliancestandards.go @@ -37,7 +37,8 @@ func NewRegulatoryComplianceStandardsClient(subscriptionID string, ascLocation s } // NewRegulatoryComplianceStandardsClientWithBaseURI creates an instance of the RegulatoryComplianceStandardsClient -// 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 NewRegulatoryComplianceStandardsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) RegulatoryComplianceStandardsClient { return RegulatoryComplianceStandardsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go index bbf35bd7838e..05aee44e38c7 100644 --- a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go @@ -27,6 +27,7 @@ import ( type ComplianceResultsClientAPI interface { Get(ctx context.Context, resourceID string, complianceResultName string) (result security.ComplianceResult, err error) List(ctx context.Context, scope string) (result security.ComplianceResultListPage, err error) + ListComplete(ctx context.Context, scope string) (result security.ComplianceResultListIterator, err error) } var _ ComplianceResultsClientAPI = (*security.ComplianceResultsClient)(nil) @@ -45,9 +46,13 @@ type AlertsClientAPI interface { GetResourceGroupLevelAlerts(ctx context.Context, alertName string, resourceGroupName string) (result security.Alert, err error) GetSubscriptionLevelAlert(ctx context.Context, alertName string) (result security.Alert, err error) List(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListComplete(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListResourceGroupLevelAlertsByRegionComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) ListSubscriptionLevelAlertsByRegion(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) + ListSubscriptionLevelAlertsByRegionComplete(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListIterator, err error) UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) @@ -60,6 +65,7 @@ var _ AlertsClientAPI = (*security.AlertsClient)(nil) type SettingsClientAPI interface { Get(ctx context.Context, settingName string) (result security.Setting, err error) List(ctx context.Context) (result security.SettingsListPage, err error) + ListComplete(ctx context.Context) (result security.SettingsListIterator, err error) Update(ctx context.Context, settingName string, setting security.Setting) (result security.Setting, err error) } @@ -71,6 +77,7 @@ type DeviceSecurityGroupsClientAPI interface { Delete(ctx context.Context, resourceID string, deviceSecurityGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceID string, deviceSecurityGroupName string) (result security.DeviceSecurityGroup, err error) List(ctx context.Context, resourceID string) (result security.DeviceSecurityGroupListPage, err error) + ListComplete(ctx context.Context, resourceID string) (result security.DeviceSecurityGroupListIterator, err error) } var _ DeviceSecurityGroupsClientAPI = (*security.DeviceSecurityGroupsClient)(nil) @@ -81,7 +88,9 @@ type IotSecuritySolutionClientAPI interface { Delete(ctx context.Context, resourceGroupName string, solutionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, solutionName string) (result security.IoTSecuritySolutionModel, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result security.IoTSecuritySolutionsListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result security.IoTSecuritySolutionsListIterator, err error) ListBySubscription(ctx context.Context, filter string) (result security.IoTSecuritySolutionsListPage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string) (result security.IoTSecuritySolutionsListIterator, err error) Update(ctx context.Context, resourceGroupName string, solutionName string, updateIotSecuritySolutionData security.UpdateIotSecuritySolutionData) (result security.IoTSecuritySolutionModel, err error) } @@ -100,6 +109,7 @@ type IotSecuritySolutionsAnalyticsAggregatedAlertClientAPI interface { Dismiss(ctx context.Context, resourceGroupName string, solutionName string, aggregatedAlertName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, solutionName string, aggregatedAlertName string) (result security.IoTSecurityAggregatedAlert, err error) List(ctx context.Context, resourceGroupName string, solutionName string, top *int32) (result security.IoTSecurityAggregatedAlertListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, solutionName string, top *int32) (result security.IoTSecurityAggregatedAlertListIterator, err error) } var _ IotSecuritySolutionsAnalyticsAggregatedAlertClientAPI = (*security.IotSecuritySolutionsAnalyticsAggregatedAlertClient)(nil) @@ -108,6 +118,7 @@ var _ IotSecuritySolutionsAnalyticsAggregatedAlertClientAPI = (*security.IotSecu type IotSecuritySolutionsAnalyticsRecommendationClientAPI interface { Get(ctx context.Context, resourceGroupName string, solutionName string, aggregatedRecommendationName string) (result security.IoTSecurityAggregatedRecommendation, err error) List(ctx context.Context, resourceGroupName string, solutionName string, top *int32) (result security.IoTSecurityAggregatedRecommendationListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, solutionName string, top *int32) (result security.IoTSecurityAggregatedRecommendationListIterator, err error) } var _ IotSecuritySolutionsAnalyticsRecommendationClientAPI = (*security.IotSecuritySolutionsAnalyticsRecommendationClient)(nil) @@ -116,7 +127,9 @@ var _ IotSecuritySolutionsAnalyticsRecommendationClientAPI = (*security.IotSecur type AllowedConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, connectionType security.ConnectionType) (result security.AllowedConnectionsResource, err error) List(ctx context.Context) (result security.AllowedConnectionsListPage, err error) + ListComplete(ctx context.Context) (result security.AllowedConnectionsListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.AllowedConnectionsListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.AllowedConnectionsListIterator, err error) } var _ AllowedConnectionsClientAPI = (*security.AllowedConnectionsClient)(nil) @@ -125,7 +138,9 @@ var _ AllowedConnectionsClientAPI = (*security.AllowedConnectionsClient)(nil) type DiscoveredSecuritySolutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, discoveredSecuritySolutionName string) (result security.DiscoveredSecuritySolution, err error) List(ctx context.Context) (result security.DiscoveredSecuritySolutionListPage, err error) + ListComplete(ctx context.Context) (result security.DiscoveredSecuritySolutionListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.DiscoveredSecuritySolutionListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.DiscoveredSecuritySolutionListIterator, err error) } var _ DiscoveredSecuritySolutionsClientAPI = (*security.DiscoveredSecuritySolutionsClient)(nil) @@ -134,7 +149,9 @@ var _ DiscoveredSecuritySolutionsClientAPI = (*security.DiscoveredSecuritySoluti type ExternalSecuritySolutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, externalSecuritySolutionsName string) (result security.ExternalSecuritySolutionModel, err error) List(ctx context.Context) (result security.ExternalSecuritySolutionListPage, err error) + ListComplete(ctx context.Context) (result security.ExternalSecuritySolutionListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.ExternalSecuritySolutionListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.ExternalSecuritySolutionListIterator, err error) } var _ ExternalSecuritySolutionsClientAPI = (*security.ExternalSecuritySolutionsClient)(nil) @@ -146,9 +163,13 @@ type JitNetworkAccessPoliciesClientAPI interface { Get(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string) (result security.JitNetworkAccessPolicy, err error) Initiate(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string, body security.JitNetworkAccessPolicyInitiateRequest) (result security.JitNetworkAccessRequest, err error) List(ctx context.Context) (result security.JitNetworkAccessPoliciesListPage, err error) + ListComplete(ctx context.Context) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByRegion(ctx context.Context) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByRegionComplete(ctx context.Context) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListIterator, err error) ListByResourceGroupAndRegion(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListPage, err error) + ListByResourceGroupAndRegionComplete(ctx context.Context, resourceGroupName string) (result security.JitNetworkAccessPoliciesListIterator, err error) } var _ JitNetworkAccessPoliciesClientAPI = (*security.JitNetworkAccessPoliciesClient)(nil) @@ -166,6 +187,7 @@ var _ AdaptiveApplicationControlsClientAPI = (*security.AdaptiveApplicationContr type LocationsClientAPI interface { Get(ctx context.Context) (result security.AscLocation, err error) List(ctx context.Context) (result security.AscLocationListPage, err error) + ListComplete(ctx context.Context) (result security.AscLocationListIterator, err error) } var _ LocationsClientAPI = (*security.LocationsClient)(nil) @@ -173,6 +195,7 @@ var _ LocationsClientAPI = (*security.LocationsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result security.OperationListPage, err error) + ListComplete(ctx context.Context) (result security.OperationListIterator, err error) } var _ OperationsClientAPI = (*security.OperationsClient)(nil) @@ -182,8 +205,11 @@ type TasksClientAPI interface { GetResourceGroupLevelTask(ctx context.Context, resourceGroupName string, taskName string) (result security.Task, err error) GetSubscriptionLevelTask(ctx context.Context, taskName string) (result security.Task, err error) List(ctx context.Context, filter string) (result security.TaskListPage, err error) + ListComplete(ctx context.Context, filter string) (result security.TaskListIterator, err error) ListByHomeRegion(ctx context.Context, filter string) (result security.TaskListPage, err error) + ListByHomeRegionComplete(ctx context.Context, filter string) (result security.TaskListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result security.TaskListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result security.TaskListIterator, err error) UpdateResourceGroupLevelTaskState(ctx context.Context, resourceGroupName string, taskName string, taskUpdateActionType string) (result autorest.Response, err error) UpdateSubscriptionLevelTaskState(ctx context.Context, taskName string, taskUpdateActionType string) (result autorest.Response, err error) } @@ -194,7 +220,9 @@ var _ TasksClientAPI = (*security.TasksClient)(nil) type TopologyClientAPI interface { Get(ctx context.Context, resourceGroupName string, topologyResourceName string) (result security.TopologyResource, err error) List(ctx context.Context) (result security.TopologyListPage, err error) + ListComplete(ctx context.Context) (result security.TopologyListIterator, err error) ListByHomeRegion(ctx context.Context) (result security.TopologyListPage, err error) + ListByHomeRegionComplete(ctx context.Context) (result security.TopologyListIterator, err error) } var _ TopologyClientAPI = (*security.TopologyClient)(nil) @@ -212,6 +240,7 @@ type AutoProvisioningSettingsClientAPI interface { Create(ctx context.Context, settingName string, setting security.AutoProvisioningSetting) (result security.AutoProvisioningSetting, err error) Get(ctx context.Context, settingName string) (result security.AutoProvisioningSetting, err error) List(ctx context.Context) (result security.AutoProvisioningSettingListPage, err error) + ListComplete(ctx context.Context) (result security.AutoProvisioningSettingListIterator, err error) } var _ AutoProvisioningSettingsClientAPI = (*security.AutoProvisioningSettingsClient)(nil) @@ -220,6 +249,7 @@ var _ AutoProvisioningSettingsClientAPI = (*security.AutoProvisioningSettingsCli type CompliancesClientAPI interface { Get(ctx context.Context, scope string, complianceName string) (result security.Compliance, err error) List(ctx context.Context, scope string) (result security.ComplianceListPage, err error) + ListComplete(ctx context.Context, scope string) (result security.ComplianceListIterator, err error) } var _ CompliancesClientAPI = (*security.CompliancesClient)(nil) @@ -229,6 +259,7 @@ type InformationProtectionPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, scope string, informationProtectionPolicyName string) (result security.InformationProtectionPolicy, err error) Get(ctx context.Context, scope string, informationProtectionPolicyName string) (result security.InformationProtectionPolicy, err error) List(ctx context.Context, scope string) (result security.InformationProtectionPolicyListPage, err error) + ListComplete(ctx context.Context, scope string) (result security.InformationProtectionPolicyListIterator, err error) } var _ InformationProtectionPoliciesClientAPI = (*security.InformationProtectionPoliciesClient)(nil) @@ -239,6 +270,7 @@ type ContactsClientAPI interface { Delete(ctx context.Context, securityContactName string) (result autorest.Response, err error) Get(ctx context.Context, securityContactName string) (result security.Contact, err error) List(ctx context.Context) (result security.ContactListPage, err error) + ListComplete(ctx context.Context) (result security.ContactListIterator, err error) Update(ctx context.Context, securityContactName string, securityContact security.Contact) (result security.Contact, err error) } @@ -250,6 +282,7 @@ type WorkspaceSettingsClientAPI interface { Delete(ctx context.Context, workspaceSettingName string) (result autorest.Response, err error) Get(ctx context.Context, workspaceSettingName string) (result security.WorkspaceSetting, err error) List(ctx context.Context) (result security.WorkspaceSettingListPage, err error) + ListComplete(ctx context.Context) (result security.WorkspaceSettingListIterator, err error) Update(ctx context.Context, workspaceSettingName string, workspaceSetting security.WorkspaceSetting) (result security.WorkspaceSetting, err error) } @@ -259,6 +292,7 @@ var _ WorkspaceSettingsClientAPI = (*security.WorkspaceSettingsClient)(nil) type RegulatoryComplianceStandardsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string) (result security.RegulatoryComplianceStandard, err error) List(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListPage, err error) + ListComplete(ctx context.Context, filter string) (result security.RegulatoryComplianceStandardListIterator, err error) } var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceStandardsClient)(nil) @@ -267,6 +301,7 @@ var _ RegulatoryComplianceStandardsClientAPI = (*security.RegulatoryComplianceSt type RegulatoryComplianceControlsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string) (result security.RegulatoryComplianceControl, err error) List(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListPage, err error) + ListComplete(ctx context.Context, regulatoryComplianceStandardName string, filter string) (result security.RegulatoryComplianceControlListIterator, err error) } var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceControlsClient)(nil) @@ -275,6 +310,7 @@ var _ RegulatoryComplianceControlsClientAPI = (*security.RegulatoryComplianceCon type RegulatoryComplianceAssessmentsClientAPI interface { Get(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, regulatoryComplianceAssessmentName string) (result security.RegulatoryComplianceAssessment, err error) List(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListPage, err error) + ListComplete(ctx context.Context, regulatoryComplianceStandardName string, regulatoryComplianceControlName string, filter string) (result security.RegulatoryComplianceAssessmentListIterator, err error) } var _ RegulatoryComplianceAssessmentsClientAPI = (*security.RegulatoryComplianceAssessmentsClient)(nil) @@ -293,7 +329,9 @@ var _ ServerVulnerabilityAssessmentClientAPI = (*security.ServerVulnerabilityAss type SubAssessmentsClientAPI interface { Get(ctx context.Context, scope string, assessmentName string, subAssessmentName string) (result security.SubAssessment, err error) List(ctx context.Context, scope string, assessmentName string) (result security.SubAssessmentListPage, err error) + ListComplete(ctx context.Context, scope string, assessmentName string) (result security.SubAssessmentListIterator, err error) ListAll(ctx context.Context, scope string) (result security.SubAssessmentListPage, err error) + ListAllComplete(ctx context.Context, scope string) (result security.SubAssessmentListIterator, err error) } var _ SubAssessmentsClientAPI = (*security.SubAssessmentsClient)(nil) @@ -304,7 +342,9 @@ type AutomationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, automationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, automationName string) (result security.Automation, err error) List(ctx context.Context) (result security.AutomationListPage, err error) + ListComplete(ctx context.Context) (result security.AutomationListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result security.AutomationListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result security.AutomationListIterator, err error) Validate(ctx context.Context, resourceGroupName string, automationName string, automation security.Automation) (result security.AutomationValidationStatus, err error) } @@ -314,6 +354,7 @@ var _ AutomationsClientAPI = (*security.AutomationsClient)(nil) type AssessmentsMetadataClientAPI interface { Get(ctx context.Context, assessmentMetadataName string) (result security.AssessmentMetadata, err error) List(ctx context.Context) (result security.AssessmentMetadataListPage, err error) + ListComplete(ctx context.Context) (result security.AssessmentMetadataListIterator, err error) } var _ AssessmentsMetadataClientAPI = (*security.AssessmentsMetadataClient)(nil) @@ -324,6 +365,18 @@ type AssessmentsMetadataSubscriptionClientAPI interface { Delete(ctx context.Context, assessmentMetadataName string) (result autorest.Response, err error) Get(ctx context.Context, assessmentMetadataName string) (result security.AssessmentMetadata, err error) List(ctx context.Context) (result security.AssessmentMetadataListPage, err error) + ListComplete(ctx context.Context) (result security.AssessmentMetadataListIterator, err error) } var _ AssessmentsMetadataSubscriptionClientAPI = (*security.AssessmentsMetadataSubscriptionClient)(nil) + +// AssessmentsClientAPI contains the set of methods on the AssessmentsClient type. +type AssessmentsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceID string, assessmentName string, assessment security.Assessment) (result security.Assessment, err error) + Delete(ctx context.Context, resourceID string, assessmentName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceID string, assessmentName string, expand security.ExpandEnum) (result security.Assessment, err error) + List(ctx context.Context, scope string) (result security.AssessmentListPage, err error) + ListComplete(ctx context.Context, scope string) (result security.AssessmentListIterator, err error) +} + +var _ AssessmentsClientAPI = (*security.AssessmentsClient)(nil) diff --git a/services/preview/security/mgmt/v3.0/security/servervulnerabilityassessment.go b/services/preview/security/mgmt/v3.0/security/servervulnerabilityassessment.go index bbd93be29353..adeed1509332 100644 --- a/services/preview/security/mgmt/v3.0/security/servervulnerabilityassessment.go +++ b/services/preview/security/mgmt/v3.0/security/servervulnerabilityassessment.go @@ -37,7 +37,8 @@ func NewServerVulnerabilityAssessmentClient(subscriptionID string, ascLocation s } // NewServerVulnerabilityAssessmentClientWithBaseURI creates an instance of the ServerVulnerabilityAssessmentClient -// 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 NewServerVulnerabilityAssessmentClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) ServerVulnerabilityAssessmentClient { return ServerVulnerabilityAssessmentClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/settings.go b/services/preview/security/mgmt/v3.0/security/settings.go index f47560051ba8..fdf82f2225d5 100644 --- a/services/preview/security/mgmt/v3.0/security/settings.go +++ b/services/preview/security/mgmt/v3.0/security/settings.go @@ -36,7 +36,8 @@ func NewSettingsClient(subscriptionID string, ascLocation string) SettingsClient return NewSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewSettingsClientWithBaseURI creates an instance of the SettingsClient client. +// NewSettingsClientWithBaseURI creates an instance of the SettingsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SettingsClient { return SettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/subassessments.go b/services/preview/security/mgmt/v3.0/security/subassessments.go index 4fa19d8e398d..82430e79385f 100644 --- a/services/preview/security/mgmt/v3.0/security/subassessments.go +++ b/services/preview/security/mgmt/v3.0/security/subassessments.go @@ -35,7 +35,8 @@ func NewSubAssessmentsClient(subscriptionID string, ascLocation string) SubAsses return NewSubAssessmentsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewSubAssessmentsClientWithBaseURI creates an instance of the SubAssessmentsClient client. +// NewSubAssessmentsClientWithBaseURI creates an instance of the SubAssessmentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubAssessmentsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) SubAssessmentsClient { return SubAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/tasks.go b/services/preview/security/mgmt/v3.0/security/tasks.go index bad83545919f..bc6628d115d3 100644 --- a/services/preview/security/mgmt/v3.0/security/tasks.go +++ b/services/preview/security/mgmt/v3.0/security/tasks.go @@ -36,7 +36,8 @@ func NewTasksClient(subscriptionID string, ascLocation string) TasksClient { return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewTasksClientWithBaseURI creates an instance of the TasksClient client. +// NewTasksClientWithBaseURI creates an instance of the TasksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTasksClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) TasksClient { return TasksClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/topology.go b/services/preview/security/mgmt/v3.0/security/topology.go index d0f4f75946f7..efb4716fa9a4 100644 --- a/services/preview/security/mgmt/v3.0/security/topology.go +++ b/services/preview/security/mgmt/v3.0/security/topology.go @@ -36,7 +36,8 @@ func NewTopologyClient(subscriptionID string, ascLocation string) TopologyClient return NewTopologyClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewTopologyClientWithBaseURI creates an instance of the TopologyClient client. +// NewTopologyClientWithBaseURI creates an instance of the TopologyClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopologyClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) TopologyClient { return TopologyClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/security/mgmt/v3.0/security/workspacesettings.go b/services/preview/security/mgmt/v3.0/security/workspacesettings.go index f684aa865117..7165e8698a55 100644 --- a/services/preview/security/mgmt/v3.0/security/workspacesettings.go +++ b/services/preview/security/mgmt/v3.0/security/workspacesettings.go @@ -36,7 +36,9 @@ func NewWorkspaceSettingsClient(subscriptionID string, ascLocation string) Works return NewWorkspaceSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation) } -// NewWorkspaceSettingsClientWithBaseURI creates an instance of the WorkspaceSettingsClient client. +// NewWorkspaceSettingsClientWithBaseURI creates an instance of the WorkspaceSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkspaceSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) WorkspaceSettingsClient { return WorkspaceSettingsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/actions.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/actions.go index 0ad572d2f774..9867a92dc197 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/actions.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/actions.go @@ -36,7 +36,8 @@ func NewActionsClient(subscriptionID string) ActionsClient { return NewActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionsClientWithBaseURI creates an instance of the ActionsClient client. +// 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)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/alertrules.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/alertrules.go index b63ac2177cbe..46269c19a903 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/alertrules.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/alertrules.go @@ -36,7 +36,8 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. +// 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)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/alertruletemplates.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/alertruletemplates.go index c9d00301a65b..455be45eb50e 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/alertruletemplates.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/alertruletemplates.go @@ -36,7 +36,9 @@ func NewAlertRuleTemplatesClient(subscriptionID string) AlertRuleTemplatesClient return NewAlertRuleTemplatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleTemplatesClientWithBaseURI creates an instance of the AlertRuleTemplatesClient client. +// 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)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarkrelations.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarkrelations.go index ffd332f7403e..05601f32d8ff 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarkrelations.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarkrelations.go @@ -36,7 +36,9 @@ func NewBookmarkRelationsClient(subscriptionID string) BookmarkRelationsClient { return NewBookmarkRelationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBookmarkRelationsClientWithBaseURI creates an instance of the BookmarkRelationsClient client. +// NewBookmarkRelationsClientWithBaseURI creates an instance of the BookmarkRelationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewBookmarkRelationsClientWithBaseURI(baseURI string, subscriptionID string) BookmarkRelationsClient { return BookmarkRelationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarks.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarks.go index 5b3213d2123d..febbeeb20e05 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarks.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarks.go @@ -36,7 +36,8 @@ func NewBookmarksClient(subscriptionID string) BookmarksClient { return NewBookmarksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBookmarksClientWithBaseURI creates an instance of the BookmarksClient client. +// 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)} } @@ -73,12 +74,8 @@ func (client BookmarksClient) CreateOrUpdate(ctx context.Context, resourceGroupN {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}, + Chain: []validation.Constraint{{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}, diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/casecomments.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/casecomments.go index 897d9d02fa33..b88cc9656f51 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/casecomments.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/casecomments.go @@ -36,7 +36,8 @@ func NewCaseCommentsClient(subscriptionID string) CaseCommentsClient { return NewCaseCommentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCaseCommentsClientWithBaseURI creates an instance of the CaseCommentsClient client. +// NewCaseCommentsClientWithBaseURI creates an instance of the CaseCommentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCaseCommentsClientWithBaseURI(baseURI string, subscriptionID string) CaseCommentsClient { return CaseCommentsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -74,10 +75,7 @@ func (client CaseCommentsClient) CreateComment(ctx context.Context, resourceGrou {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: caseComment, Constraints: []validation.Constraint{{Target: "caseComment.CaseCommentProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "caseComment.CaseCommentProperties.Message", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "caseComment.CaseCommentProperties.UserInfo", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "caseComment.CaseCommentProperties.UserInfo.ObjectID", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { + Chain: []validation.Constraint{{Target: "caseComment.CaseCommentProperties.Message", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("securityinsight.CaseCommentsClient", "CreateComment", err.Error()) } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/caserelations.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/caserelations.go index 1c20302d892a..b7ad0a6da639 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/caserelations.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/caserelations.go @@ -36,7 +36,8 @@ func NewCaseRelationsClient(subscriptionID string) CaseRelationsClient { return NewCaseRelationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCaseRelationsClientWithBaseURI creates an instance of the CaseRelationsClient client. +// NewCaseRelationsClientWithBaseURI creates an instance of the CaseRelationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCaseRelationsClientWithBaseURI(baseURI string, subscriptionID string) CaseRelationsClient { return CaseRelationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/cases.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/cases.go index 7b2b21a07030..3add52949613 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/cases.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/cases.go @@ -36,7 +36,8 @@ func NewCasesClient(subscriptionID string) CasesClient { return NewCasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCasesClientWithBaseURI creates an instance of the CasesClient client. +// NewCasesClientWithBaseURI creates an instance of the CasesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCasesClientWithBaseURI(baseURI string, subscriptionID string) CasesClient { return CasesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -73,9 +74,7 @@ func (client CasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName {Target: "workspaceName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: caseParameter, Constraints: []validation.Constraint{{Target: "caseParameter.CaseProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "caseParameter.CaseProperties.Owner", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "caseParameter.CaseProperties.Owner.ObjectID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "caseParameter.CaseProperties.StartTimeUtc", Name: validation.Null, Rule: true, Chain: nil}, + Chain: []validation.Constraint{{Target: "caseParameter.CaseProperties.StartTimeUtc", Name: validation.Null, Rule: true, Chain: nil}, {Target: "caseParameter.CaseProperties.Title", Name: validation.Null, Rule: true, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("securityinsight.CasesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/casesaggregations.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/casesaggregations.go index dfa8e3776ea5..0f5e446b3416 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/casesaggregations.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/casesaggregations.go @@ -36,7 +36,9 @@ func NewCasesAggregationsClient(subscriptionID string) CasesAggregationsClient { return NewCasesAggregationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCasesAggregationsClientWithBaseURI creates an instance of the CasesAggregationsClient client. +// NewCasesAggregationsClientWithBaseURI creates an instance of the CasesAggregationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCasesAggregationsClientWithBaseURI(baseURI string, subscriptionID string) CasesAggregationsClient { return CasesAggregationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/client.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/client.go index 48159b7dbcaf..59aefbb9aad1 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/client.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/client.go @@ -21,7 +21,12 @@ package securityinsight // Changes may cause incorrect behavior and will be lost if 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 ( @@ -41,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), @@ -49,3 +55,100 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { SubscriptionID: subscriptionID, } } + +// ListDataConnectorRequirements get requirements state for a data connector type. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// workspaceName - the name of the workspace. +// operationalInsightsResourceProvider - the namespace of workspaces resource provider- +// Microsoft.OperationalInsights. +// dataConnectorsCheckRequirements - the parameters for requirements check message +func (client BaseClient) ListDataConnectorRequirements(ctx context.Context, resourceGroupName string, workspaceName string, operationalInsightsResourceProvider string, dataConnectorsCheckRequirements DataConnectorsCheckRequirements) (result DataConnectorRequirementsState, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListDataConnectorRequirements") + defer func() { + 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.BaseClient", "ListDataConnectorRequirements", err.Error()) + } + + req, err := client.ListDataConnectorRequirementsPreparer(ctx, resourceGroupName, workspaceName, operationalInsightsResourceProvider, dataConnectorsCheckRequirements) + if err != nil { + err = autorest.NewErrorWithError(err, "securityinsight.BaseClient", "ListDataConnectorRequirements", nil, "Failure preparing request") + return + } + + resp, err := client.ListDataConnectorRequirementsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "securityinsight.BaseClient", "ListDataConnectorRequirements", resp, "Failure sending request") + return + } + + result, err = client.ListDataConnectorRequirementsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "securityinsight.BaseClient", "ListDataConnectorRequirements", resp, "Failure responding to request") + } + + return +} + +// ListDataConnectorRequirementsPreparer prepares the ListDataConnectorRequirements request. +func (client BaseClient) ListDataConnectorRequirementsPreparer(ctx context.Context, resourceGroupName string, workspaceName string, operationalInsightsResourceProvider string, dataConnectorsCheckRequirements DataConnectorsCheckRequirements) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationalInsightsResourceProvider": autorest.Encode("path", operationalInsightsResourceProvider), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2019-01-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/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements", pathParameters), + autorest.WithJSON(dataConnectorsCheckRequirements), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListDataConnectorRequirementsSender sends the ListDataConnectorRequirements request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ListDataConnectorRequirementsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListDataConnectorRequirementsResponder handles the response to the ListDataConnectorRequirements request. The method always +// closes the http.Response Body. +func (client BaseClient) ListDataConnectorRequirementsResponder(resp *http.Response) (result DataConnectorRequirementsState, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/comments.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/comments.go index c9d4578f02c0..be5fd653e8f1 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/comments.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/comments.go @@ -36,7 +36,8 @@ func NewCommentsClient(subscriptionID string) CommentsClient { return NewCommentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCommentsClientWithBaseURI creates an instance of the CommentsClient client. +// NewCommentsClientWithBaseURI creates an instance of the CommentsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCommentsClientWithBaseURI(baseURI string, subscriptionID string) CommentsClient { return CommentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/dataconnectors.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/dataconnectors.go index 748dc662b1f0..a464869f6233 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/dataconnectors.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/dataconnectors.go @@ -36,7 +36,8 @@ func NewDataConnectorsClient(subscriptionID string) DataConnectorsClient { return NewDataConnectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataConnectorsClientWithBaseURI creates an instance of the DataConnectorsClient client. +// 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)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/entities.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/entities.go index f0e21ffe611a..d3f59f42ea9c 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/entities.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/entities.go @@ -36,7 +36,8 @@ func NewEntitiesClient(subscriptionID string) EntitiesClient { return NewEntitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client. +// NewEntitiesClientWithBaseURI creates an instance of the EntitiesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEntitiesClientWithBaseURI(baseURI string, subscriptionID string) EntitiesClient { return EntitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/entityqueries.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/entityqueries.go index d22b112dfacd..e474b6600e1d 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/entityqueries.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/entityqueries.go @@ -36,7 +36,8 @@ func NewEntityQueriesClient(subscriptionID string) EntityQueriesClient { return NewEntityQueriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEntityQueriesClientWithBaseURI creates an instance of the EntityQueriesClient client. +// NewEntityQueriesClientWithBaseURI creates an instance of the EntityQueriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEntityQueriesClientWithBaseURI(baseURI string, subscriptionID string) EntityQueriesClient { return EntityQueriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go index aefecbfc34e6..66a1ae79c619 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go @@ -31,19 +31,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight" -// AggregationsKind enumerates the values for aggregations kind. -type AggregationsKind string - -const ( - // AggregationsKindCasesAggregation ... - AggregationsKindCasesAggregation AggregationsKind = "CasesAggregation" -) - -// PossibleAggregationsKindValues returns an array of possible values for the AggregationsKind const type. -func PossibleAggregationsKindValues() []AggregationsKind { - return []AggregationsKind{AggregationsKindCasesAggregation} -} - // AlertRuleKind enumerates the values for alert rule kind. type AlertRuleKind string @@ -235,6 +222,21 @@ func PossibleConfidenceScoreStatusValues() []ConfidenceScoreStatus { return []ConfidenceScoreStatus{Final, InProcess, NotApplicable, NotFinal} } +// DataConnectorAuthorizationState enumerates the values for data connector authorization state. +type DataConnectorAuthorizationState string + +const ( + // Invalid ... + Invalid DataConnectorAuthorizationState = "Invalid" + // Valid ... + Valid DataConnectorAuthorizationState = "Valid" +) + +// PossibleDataConnectorAuthorizationStateValues returns an array of possible values for the DataConnectorAuthorizationState const type. +func PossibleDataConnectorAuthorizationStateValues() []DataConnectorAuthorizationState { + return []DataConnectorAuthorizationState{Invalid, Valid} +} + // DataConnectorKind enumerates the values for data connector kind. type DataConnectorKind string @@ -262,6 +264,23 @@ func PossibleDataConnectorKindValues() []DataConnectorKind { return []DataConnectorKind{DataConnectorKindAmazonWebServicesCloudTrail, DataConnectorKindAzureActiveDirectory, DataConnectorKindAzureAdvancedThreatProtection, DataConnectorKindAzureSecurityCenter, DataConnectorKindMicrosoftCloudAppSecurity, DataConnectorKindMicrosoftDefenderAdvancedThreatProtection, DataConnectorKindOffice365, DataConnectorKindThreatIntelligence} } +// DataConnectorLicenseState enumerates the values for data connector license state. +type DataConnectorLicenseState string + +const ( + // DataConnectorLicenseStateInvalid ... + DataConnectorLicenseStateInvalid DataConnectorLicenseState = "Invalid" + // DataConnectorLicenseStateUnknown ... + DataConnectorLicenseStateUnknown DataConnectorLicenseState = "Unknown" + // DataConnectorLicenseStateValid ... + DataConnectorLicenseStateValid DataConnectorLicenseState = "Valid" +) + +// PossibleDataConnectorLicenseStateValues returns an array of possible values for the DataConnectorLicenseState const type. +func PossibleDataConnectorLicenseStateValues() []DataConnectorLicenseState { + return []DataConnectorLicenseState{DataConnectorLicenseStateInvalid, DataConnectorLicenseStateUnknown, DataConnectorLicenseStateValid} +} + // DataTypeState enumerates the values for data type state. type DataTypeState string @@ -329,6 +348,8 @@ const ( EntityKindFileHash EntityKind = "FileHash" // EntityKindHost Entity represents host in the system. EntityKindHost EntityKind = "Host" + // EntityKindIoTDevice Entity represents IoT device in the system. + EntityKindIoTDevice EntityKind = "IoTDevice" // EntityKindIP Entity represents ip in the system. EntityKindIP EntityKind = "Ip" // EntityKindMalware Entity represents malware in the system. @@ -349,7 +370,7 @@ const ( // PossibleEntityKindValues returns an array of possible values for the EntityKind const type. func PossibleEntityKindValues() []EntityKind { - return []EntityKind{EntityKindAccount, EntityKindAzureResource, EntityKindBookmark, EntityKindCloudApplication, EntityKindDNSResolution, EntityKindFile, EntityKindFileHash, EntityKindHost, EntityKindIP, EntityKindMalware, EntityKindProcess, EntityKindRegistryKey, EntityKindRegistryValue, EntityKindSecurityAlert, EntityKindSecurityGroup, EntityKindURL} + return []EntityKind{EntityKindAccount, EntityKindAzureResource, EntityKindBookmark, EntityKindCloudApplication, EntityKindDNSResolution, EntityKindFile, EntityKindFileHash, EntityKindHost, EntityKindIoTDevice, EntityKindIP, EntityKindMalware, EntityKindProcess, EntityKindRegistryKey, EntityKindRegistryValue, EntityKindSecurityAlert, EntityKindSecurityGroup, EntityKindURL} } // EntityType enumerates the values for entity type. @@ -372,6 +393,8 @@ const ( EntityTypeHost EntityType = "Host" // EntityTypeHuntingBookmark Entity represents HuntingBookmark in the system. EntityTypeHuntingBookmark EntityType = "HuntingBookmark" + // EntityTypeIoTDevice Entity represents IoT device in the system. + EntityTypeIoTDevice EntityType = "IoTDevice" // EntityTypeIP Entity represents ip in the system. EntityTypeIP EntityType = "IP" // EntityTypeMalware Entity represents malware in the system. @@ -392,7 +415,7 @@ const ( // PossibleEntityTypeValues returns an array of possible values for the EntityType const type. func PossibleEntityTypeValues() []EntityType { - return []EntityType{EntityTypeAccount, EntityTypeAzureResource, EntityTypeCloudApplication, EntityTypeDNS, EntityTypeFile, EntityTypeFileHash, EntityTypeHost, EntityTypeHuntingBookmark, EntityTypeIP, EntityTypeMalware, EntityTypeProcess, EntityTypeRegistryKey, EntityTypeRegistryValue, EntityTypeSecurityAlert, EntityTypeSecurityGroup, EntityTypeURL} + return []EntityType{EntityTypeAccount, EntityTypeAzureResource, EntityTypeCloudApplication, EntityTypeDNS, EntityTypeFile, EntityTypeFileHash, EntityTypeHost, EntityTypeHuntingBookmark, EntityTypeIoTDevice, EntityTypeIP, EntityTypeMalware, EntityTypeProcess, EntityTypeRegistryKey, EntityTypeRegistryValue, EntityTypeSecurityAlert, EntityTypeSecurityGroup, EntityTypeURL} } // FileHashAlgorithm enumerates the values for file hash algorithm. @@ -617,6 +640,8 @@ const ( KindFileHash KindBasicEntity = "FileHash" // KindHost ... KindHost KindBasicEntity = "Host" + // KindIoTDevice ... + KindIoTDevice KindBasicEntity = "IoTDevice" // KindIP ... KindIP KindBasicEntity = "Ip" // KindMalware ... @@ -637,7 +662,7 @@ const ( // PossibleKindBasicEntityValues returns an array of possible values for the KindBasicEntity const type. func PossibleKindBasicEntityValues() []KindBasicEntity { - return []KindBasicEntity{KindAccount, KindAzureResource, KindCloudApplication, KindDNSResolution, KindEntity, KindFile, KindFileHash, KindHost, KindIP, KindMalware, KindProcess, KindRegistryKey, KindRegistryValue, KindSecurityAlert, KindSecurityGroup, KindURL} + return []KindBasicEntity{KindAccount, KindAzureResource, KindCloudApplication, KindDNSResolution, KindEntity, KindFile, KindFileHash, KindHost, KindIoTDevice, KindIP, KindMalware, KindProcess, KindRegistryKey, KindRegistryValue, KindSecurityAlert, KindSecurityGroup, KindURL} } // KindBasicSettings enumerates the values for kind basic settings. @@ -864,6 +889,12 @@ func PossibleTriggerOperatorValues() []TriggerOperator { return []TriggerOperator{Equal, GreaterThan, LessThan, NotEqual} } +// AADCheckRequirements AAD (Azure Active Directory) requirements check properties. +type AADCheckRequirements struct { + // TenantID - The tenant id to connect to, and get the data from. + TenantID *string `json:"tenantId,omitempty"` +} + // AADDataConnector represents AAD (Azure Active Directory) data connector. type AADDataConnector struct { // AADDataConnectorProperties - AAD (Azure Active Directory) data connector properties. @@ -1023,6 +1054,12 @@ type AADDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` } +// AATPCheckRequirements AATP (Azure Advanced Threat Protection) requirements check properties. +type AATPCheckRequirements struct { + // TenantID - The tenant id to connect to, and get the data from. + TenantID *string `json:"tenantId,omitempty"` +} + // AATPDataConnector represents AATP (Azure Advanced Threat Protection) data connector. type AATPDataConnector struct { // AATPDataConnectorProperties - AATP (Azure Advanced Threat Protection) data connector properties. @@ -1192,7 +1229,7 @@ type AccountEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -1284,6 +1321,11 @@ func (ae AccountEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for AccountEntity. +func (ae AccountEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for AccountEntity. func (ae AccountEntity) AsEntity() (*Entity, bool) { return nil, false @@ -1390,6 +1432,12 @@ func (aep AccountEntityProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// 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 @@ -1480,6 +1528,8 @@ func (ar *ActionRequest) UnmarshalJSON(body []byte) error { 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. @@ -1573,6 +1623,8 @@ func (ar *ActionResponse) UnmarshalJSON(body []byte) error { 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. @@ -1802,10 +1854,10 @@ func (a Aggregations) AsBasicAggregations() (BasicAggregations, bool) { return &a, true } -// AggregationsKind1 describes an Azure resource with kind. -type AggregationsKind1 struct { - // Kind - The kind of the setting. Possible values include: 'AggregationsKindCasesAggregation' - Kind AggregationsKind `json:"kind,omitempty"` +// AggregationsKind describes an Azure resource with kind. +type AggregationsKind struct { + // Kind - The kind of the setting + Kind *string `json:"kind,omitempty"` } // AggregationsModel ... @@ -2458,6 +2510,14 @@ type AlertsDataTypeOfDataConnectorAlerts struct { State DataTypeState `json:"state,omitempty"` } +// ASCCheckRequirements ASC (Azure Security Center) requirements check properties. +type ASCCheckRequirements struct { + // SubscriptionID - The subscription id to connect to, and get the data from. + SubscriptionID *string `json:"subscriptionId,omitempty"` + // Kind - The kind of the data connector. Possible values include: 'DataConnectorKindAzureActiveDirectory', 'DataConnectorKindAzureSecurityCenter', 'DataConnectorKindMicrosoftCloudAppSecurity', 'DataConnectorKindThreatIntelligence', 'DataConnectorKindOffice365', 'DataConnectorKindAmazonWebServicesCloudTrail', 'DataConnectorKindAzureAdvancedThreatProtection', 'DataConnectorKindMicrosoftDefenderAdvancedThreatProtection' + Kind DataConnectorKind `json:"kind,omitempty"` +} + // ASCDataConnector represents ASC (Azure Security Center) data connector. type ASCDataConnector struct { // ASCDataConnectorProperties - ASC (Azure Security Center) data connector properties. @@ -2617,6 +2677,12 @@ type ASCDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` } +// AwsCloudTrailCheckRequirements amazon Web Services CloudTrail requirements check properties. +type AwsCloudTrailCheckRequirements struct { + // Kind - The kind of the data connector. Possible values include: 'DataConnectorKindAzureActiveDirectory', 'DataConnectorKindAzureSecurityCenter', 'DataConnectorKindMicrosoftCloudAppSecurity', 'DataConnectorKindThreatIntelligence', 'DataConnectorKindOffice365', 'DataConnectorKindAmazonWebServicesCloudTrail', 'DataConnectorKindAzureAdvancedThreatProtection', 'DataConnectorKindMicrosoftDefenderAdvancedThreatProtection' + Kind DataConnectorKind `json:"kind,omitempty"` +} + // AwsCloudTrailDataConnector represents Amazon Web Services CloudTrail data connector. type AwsCloudTrailDataConnector struct { // AwsCloudTrailDataConnectorProperties - Amazon Web Services CloudTrail data connector properties. @@ -2799,7 +2865,7 @@ type AzureResourceEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -2891,6 +2957,11 @@ func (are AzureResourceEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for AzureResourceEntity. +func (are AzureResourceEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for AzureResourceEntity. func (are AzureResourceEntity) AsEntity() (*Entity, bool) { return nil, false @@ -4392,7 +4463,7 @@ type CloudApplicationEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -4484,6 +4555,11 @@ func (cae CloudApplicationEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for CloudApplicationEntity. +func (cae CloudApplicationEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for CloudApplicationEntity. func (cae CloudApplicationEntity) AsEntity() (*Entity, bool) { return nil, false @@ -4984,6 +5060,21 @@ func (dcm *DataConnectorModel) UnmarshalJSON(body []byte) error { return nil } +// DataConnectorRequirementsState data connector requirements status. +type DataConnectorRequirementsState struct { + autorest.Response `json:"-"` + // AuthorizationState - Authorization state for this connector. Possible values include: 'Valid', 'Invalid' + AuthorizationState DataConnectorAuthorizationState `json:"authorizationState,omitempty"` + // LicenseState - License state for this connector. Possible values include: 'DataConnectorLicenseStateValid', 'DataConnectorLicenseStateInvalid', 'DataConnectorLicenseStateUnknown' + LicenseState DataConnectorLicenseState `json:"licenseState,omitempty"` +} + +// DataConnectorsCheckRequirements data connector requirements properties. +type DataConnectorsCheckRequirements struct { + // Kind - The kind of the data connector. Possible values include: 'DataConnectorKindAzureActiveDirectory', 'DataConnectorKindAzureSecurityCenter', 'DataConnectorKindMicrosoftCloudAppSecurity', 'DataConnectorKindThreatIntelligence', 'DataConnectorKindOffice365', 'DataConnectorKindAmazonWebServicesCloudTrail', 'DataConnectorKindAzureAdvancedThreatProtection', 'DataConnectorKindMicrosoftDefenderAdvancedThreatProtection' + Kind DataConnectorKind `json:"kind,omitempty"` +} + // DataConnectorStatus alert rule template data connector status type DataConnectorStatus struct { // ConnectorID - the connector id @@ -5026,7 +5117,7 @@ type DNSEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -5118,6 +5209,11 @@ func (de DNSEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for DNSEntity. +func (de DNSEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for DNSEntity. func (de DNSEntity) AsEntity() (*Entity, bool) { return nil, false @@ -5227,6 +5323,7 @@ type BasicEntity interface { AsSecurityAlert() (*SecurityAlert, bool) AsSecurityGroupEntity() (*SecurityGroupEntity, bool) AsURLEntity() (*URLEntity, bool) + AsIoTDeviceEntity() (*IoTDeviceEntity, bool) AsEntity() (*Entity, bool) } @@ -5239,7 +5336,7 @@ type Entity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -5311,6 +5408,10 @@ func unmarshalBasicEntity(body []byte) (BasicEntity, error) { var ue URLEntity err := json.Unmarshal(body, &ue) return ue, err + case string(KindIoTDevice): + var itde IoTDeviceEntity + err := json.Unmarshal(body, &itde) + return itde, err default: var e Entity err := json.Unmarshal(body, &e) @@ -5421,6 +5522,11 @@ func (e Entity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for Entity. +func (e Entity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for Entity. func (e Entity) AsEntity() (*Entity, bool) { return &e, true @@ -5495,7 +5601,7 @@ func (eer *EntityExpandResponseValue) UnmarshalJSON(body []byte) error { // EntityKind1 describes an entity with kind. type EntityKind1 struct { - // Kind - The kind of the entity. Possible values include: 'EntityKindAccount', 'EntityKindHost', 'EntityKindFile', 'EntityKindAzureResource', 'EntityKindCloudApplication', 'EntityKindDNSResolution', 'EntityKindFileHash', 'EntityKindIP', 'EntityKindMalware', 'EntityKindProcess', 'EntityKindRegistryKey', 'EntityKindRegistryValue', 'EntityKindSecurityGroup', 'EntityKindURL', 'EntityKindSecurityAlert', 'EntityKindBookmark' + // Kind - The kind of the entity. Possible values include: 'EntityKindAccount', 'EntityKindHost', 'EntityKindFile', 'EntityKindAzureResource', 'EntityKindCloudApplication', 'EntityKindDNSResolution', 'EntityKindFileHash', 'EntityKindIP', 'EntityKindMalware', 'EntityKindProcess', 'EntityKindRegistryKey', 'EntityKindRegistryValue', 'EntityKindSecurityGroup', 'EntityKindURL', 'EntityKindIoTDevice', 'EntityKindSecurityAlert', 'EntityKindBookmark' Kind EntityKind `json:"kind,omitempty"` } @@ -5919,7 +6025,7 @@ type EntityQueryProperties struct { DataSources *[]string `json:"dataSources,omitempty"` // DisplayName - The query display name DisplayName *string `json:"displayName,omitempty"` - // InputEntityType - The type of the query's source entity. Possible values include: 'EntityTypeAccount', 'EntityTypeHost', 'EntityTypeFile', 'EntityTypeAzureResource', 'EntityTypeCloudApplication', 'EntityTypeDNS', 'EntityTypeFileHash', 'EntityTypeIP', 'EntityTypeMalware', 'EntityTypeProcess', 'EntityTypeRegistryKey', 'EntityTypeRegistryValue', 'EntityTypeSecurityGroup', 'EntityTypeURL', 'EntityTypeSecurityAlert', 'EntityTypeHuntingBookmark' + // InputEntityType - The type of the query's source entity. Possible values include: 'EntityTypeAccount', 'EntityTypeHost', 'EntityTypeFile', 'EntityTypeAzureResource', 'EntityTypeCloudApplication', 'EntityTypeDNS', 'EntityTypeFileHash', 'EntityTypeIP', 'EntityTypeMalware', 'EntityTypeProcess', 'EntityTypeRegistryKey', 'EntityTypeRegistryValue', 'EntityTypeSecurityGroup', 'EntityTypeURL', 'EntityTypeIoTDevice', 'EntityTypeSecurityAlert', 'EntityTypeHuntingBookmark' InputEntityType EntityType `json:"inputEntityType,omitempty"` // InputFields - List of the fields of the source entity that are required to run the query InputFields *[]string `json:"inputFields,omitempty"` @@ -5937,7 +6043,7 @@ type ExpansionResultAggregation struct { Count *int32 `json:"count,omitempty"` // DisplayName - The display name of the aggregation by type. DisplayName *string `json:"displayName,omitempty"` - // EntityKind - The kind of the aggregated entity. Possible values include: 'EntityKindAccount', 'EntityKindHost', 'EntityKindFile', 'EntityKindAzureResource', 'EntityKindCloudApplication', 'EntityKindDNSResolution', 'EntityKindFileHash', 'EntityKindIP', 'EntityKindMalware', 'EntityKindProcess', 'EntityKindRegistryKey', 'EntityKindRegistryValue', 'EntityKindSecurityGroup', 'EntityKindURL', 'EntityKindSecurityAlert', 'EntityKindBookmark' + // EntityKind - The kind of the aggregated entity. Possible values include: 'EntityKindAccount', 'EntityKindHost', 'EntityKindFile', 'EntityKindAzureResource', 'EntityKindCloudApplication', 'EntityKindDNSResolution', 'EntityKindFileHash', 'EntityKindIP', 'EntityKindMalware', 'EntityKindProcess', 'EntityKindRegistryKey', 'EntityKindRegistryValue', 'EntityKindSecurityGroup', 'EntityKindURL', 'EntityKindIoTDevice', 'EntityKindSecurityAlert', 'EntityKindBookmark' EntityKind EntityKind `json:"entityKind,omitempty"` } @@ -5957,7 +6063,7 @@ type FileEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -6049,6 +6155,11 @@ func (fe FileEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for FileEntity. +func (fe FileEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for FileEntity. func (fe FileEntity) AsEntity() (*Entity, bool) { return nil, false @@ -6151,7 +6262,7 @@ type FileHashEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -6243,6 +6354,11 @@ func (fhe FileHashEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for FileHashEntity. +func (fhe FileHashEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for FileHashEntity. func (fhe FileHashEntity) AsEntity() (*Entity, bool) { return nil, false @@ -6635,7 +6751,7 @@ type HostEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -6727,6 +6843,11 @@ func (he HostEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for HostEntity. +func (he HostEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for HostEntity. func (he HostEntity) AsEntity() (*Entity, bool) { return nil, false @@ -6844,6 +6965,213 @@ type IncidentInfo struct { RelationName *string `json:"relationName,omitempty"` } +// IoTDeviceEntity represents an IoT device entity. +type IoTDeviceEntity struct { + // IoTDeviceEntityProperties - IoTDevice entity properties + *IoTDeviceEntityProperties `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"` + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' + Kind KindBasicEntity `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for IoTDeviceEntity. +func (itde IoTDeviceEntity) MarshalJSON() ([]byte, error) { + itde.Kind = KindIoTDevice + objectMap := make(map[string]interface{}) + if itde.IoTDeviceEntityProperties != nil { + objectMap["properties"] = itde.IoTDeviceEntityProperties + } + if itde.Kind != "" { + objectMap["kind"] = itde.Kind + } + return json.Marshal(objectMap) +} + +// AsAccountEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsAccountEntity() (*AccountEntity, bool) { + return nil, false +} + +// AsAzureResourceEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsAzureResourceEntity() (*AzureResourceEntity, bool) { + return nil, false +} + +// AsCloudApplicationEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsCloudApplicationEntity() (*CloudApplicationEntity, bool) { + return nil, false +} + +// AsDNSEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsDNSEntity() (*DNSEntity, bool) { + return nil, false +} + +// AsFileEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsFileEntity() (*FileEntity, bool) { + return nil, false +} + +// AsFileHashEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsFileHashEntity() (*FileHashEntity, bool) { + return nil, false +} + +// AsHostEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsHostEntity() (*HostEntity, bool) { + return nil, false +} + +// AsIPEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsIPEntity() (*IPEntity, bool) { + return nil, false +} + +// AsMalwareEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsMalwareEntity() (*MalwareEntity, bool) { + return nil, false +} + +// AsProcessEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsProcessEntity() (*ProcessEntity, bool) { + return nil, false +} + +// AsRegistryKeyEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsRegistryKeyEntity() (*RegistryKeyEntity, bool) { + return nil, false +} + +// AsRegistryValueEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsRegistryValueEntity() (*RegistryValueEntity, bool) { + return nil, false +} + +// AsSecurityAlert is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsSecurityAlert() (*SecurityAlert, bool) { + return nil, false +} + +// AsSecurityGroupEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsSecurityGroupEntity() (*SecurityGroupEntity, bool) { + return nil, false +} + +// AsURLEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsURLEntity() (*URLEntity, bool) { + return nil, false +} + +// AsIoTDeviceEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return &itde, true +} + +// AsEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsEntity() (*Entity, bool) { + return nil, false +} + +// AsBasicEntity is the BasicEntity implementation for IoTDeviceEntity. +func (itde IoTDeviceEntity) AsBasicEntity() (BasicEntity, bool) { + return &itde, true +} + +// UnmarshalJSON is the custom unmarshaler for IoTDeviceEntity struct. +func (itde *IoTDeviceEntity) UnmarshalJSON(body []byte) error { + var m map[string]*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 ioTDeviceEntityProperties IoTDeviceEntityProperties + err = json.Unmarshal(*v, &ioTDeviceEntityProperties) + if err != nil { + return err + } + itde.IoTDeviceEntityProperties = &ioTDeviceEntityProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + itde.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + itde.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + itde.Type = &typeVar + } + case "kind": + if v != nil { + var kind KindBasicEntity + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + itde.Kind = kind + } + } + } + + return nil +} + +// IoTDeviceEntityProperties ioTDevice entity property bag. +type IoTDeviceEntityProperties struct { + // DeviceID - READ-ONLY; The ID of the IoT Device in the IoT Hub + DeviceID *string `json:"deviceId,omitempty"` + // IotSecurityAgentID - READ-ONLY; The ID of the security agent running on the device + IotSecurityAgentID *uuid.UUID `json:"iotSecurityAgentId,omitempty"` + // DeviceType - READ-ONLY; The type of the device + DeviceType *string `json:"deviceType,omitempty"` + // Vendor - READ-ONLY; The vendor of the device + Vendor *string `json:"vendor,omitempty"` + // EdgeID - READ-ONLY; The ID of the edge device + EdgeID *string `json:"edgeId,omitempty"` + // IotHubEntityID - READ-ONLY; The AzureResource entity id of the IoT Hub + IotHubEntityID *string `json:"iotHubEntityId,omitempty"` + // HostEntityID - READ-ONLY; The Host entity id of this device + HostEntityID *string `json:"hostEntityId,omitempty"` + // ThreatIntelligence - READ-ONLY; A list of TI contexts attached to the IoTDevice entity. + ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` + // AdditionalData - READ-ONLY; A bag of custom fields that should be part of the entity and will be presented to the user. + AdditionalData map[string]interface{} `json:"additionalData"` + // FriendlyName - READ-ONLY; The graph item display name which is a short humanly readable description of the graph item instance. This property is optional and might be system generated. + FriendlyName *string `json:"friendlyName,omitempty"` +} + +// MarshalJSON is the custom marshaler for IoTDeviceEntityProperties. +func (itdep IoTDeviceEntityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // IPEntity represents an ip entity. type IPEntity struct { // IPEntityProperties - Ip entity properties @@ -6854,7 +7182,7 @@ type IPEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -6946,6 +7274,11 @@ func (ie IPEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for IPEntity. +func (ie IPEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for IPEntity. func (ie IPEntity) AsEntity() (*Entity, bool) { return nil, false @@ -7049,7 +7382,7 @@ type MalwareEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -7141,6 +7474,11 @@ func (me MalwareEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for MalwareEntity. +func (me MalwareEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for MalwareEntity. func (me MalwareEntity) AsEntity() (*Entity, bool) { return nil, false @@ -7233,6 +7571,12 @@ func (mep MalwareEntityProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// MCASCheckRequirements MCAS (Microsoft Cloud App Security) requirements check properties. +type MCASCheckRequirements struct { + // TenantID - The tenant id to connect to, and get the data from. + TenantID *string `json:"tenantId,omitempty"` +} + // MCASDataConnector represents MCAS (Microsoft Cloud App Security) data connector. type MCASDataConnector struct { // MCASDataConnectorProperties - MCAS (Microsoft Cloud App Security) data connector properties. @@ -7407,6 +7751,13 @@ type MCASDataConnectorProperties struct { TenantID *string `json:"tenantId,omitempty"` } +// MDATPCheckRequirements MDATP (Microsoft Defender Advanced Threat Protection) requirements check +// properties. +type MDATPCheckRequirements struct { + // TenantID - The tenant id to connect to, and get the data from. + TenantID *string `json:"tenantId,omitempty"` +} + // MDATPDataConnector represents MDATP (Microsoft Defender Advanced Threat Protection) data connector. type MDATPDataConnector struct { // MDATPDataConnectorProperties - MDATP (Microsoft Defender Advanced Threat Protection) data connector properties. @@ -8447,7 +8798,7 @@ type ProcessEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -8539,6 +8890,11 @@ func (peVar ProcessEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for ProcessEntity. +func (peVar ProcessEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for ProcessEntity. func (peVar ProcessEntity) AsEntity() (*Entity, bool) { return nil, false @@ -8654,7 +9010,7 @@ type RegistryKeyEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -8746,6 +9102,11 @@ func (rke RegistryKeyEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for RegistryKeyEntity. +func (rke RegistryKeyEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for RegistryKeyEntity. func (rke RegistryKeyEntity) AsEntity() (*Entity, bool) { return nil, false @@ -8844,7 +9205,7 @@ type RegistryValueEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -8936,6 +9297,11 @@ func (rve RegistryValueEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for RegistryValueEntity. +func (rve RegistryValueEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for RegistryValueEntity. func (rve RegistryValueEntity) AsEntity() (*Entity, bool) { return nil, false @@ -9524,7 +9890,7 @@ type SecurityAlert struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -9616,6 +9982,11 @@ func (sa SecurityAlert) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for SecurityAlert. +func (sa SecurityAlert) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for SecurityAlert. func (sa SecurityAlert) AsEntity() (*Entity, bool) { return nil, false @@ -9763,7 +10134,7 @@ type SecurityGroupEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -9855,6 +10226,11 @@ func (sge SecurityGroupEntity) AsURLEntity() (*URLEntity, bool) { return nil, false } +// AsIoTDeviceEntity is the BasicEntity implementation for SecurityGroupEntity. +func (sge SecurityGroupEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for SecurityGroupEntity. func (sge SecurityGroupEntity) AsEntity() (*Entity, bool) { return nil, false @@ -10080,6 +10456,12 @@ type ThreatIntelligence struct { ThreatType *string `json:"threatType,omitempty"` } +// TICheckRequirements TI (Threat Intelligence) requirements check properties. +type TICheckRequirements struct { + // TenantID - The tenant id to connect to, and get the data from. + TenantID *string `json:"tenantId,omitempty"` +} + // TIDataConnector represents threat intelligence data connector. type TIDataConnector struct { // TIDataConnectorProperties - TI (Threat Intelligence) data connector properties. @@ -10519,7 +10901,7 @@ type URLEntity struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL' + // Kind - Possible values include: 'KindEntity', 'KindAccount', 'KindAzureResource', 'KindCloudApplication', 'KindDNSResolution', 'KindFile', 'KindFileHash', 'KindHost', 'KindIP', 'KindMalware', 'KindProcess', 'KindRegistryKey', 'KindRegistryValue', 'KindSecurityAlert', 'KindSecurityGroup', 'KindURL', 'KindIoTDevice' Kind KindBasicEntity `json:"kind,omitempty"` } @@ -10611,6 +10993,11 @@ func (ue URLEntity) AsURLEntity() (*URLEntity, bool) { return &ue, true } +// AsIoTDeviceEntity is the BasicEntity implementation for URLEntity. +func (ue URLEntity) AsIoTDeviceEntity() (*IoTDeviceEntity, bool) { + return nil, false +} + // AsEntity is the BasicEntity implementation for URLEntity. func (ue URLEntity) AsEntity() (*Entity, bool) { return nil, false diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/officeconsents.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/officeconsents.go index 852e0dca5a12..a61d046d56f7 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/officeconsents.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/officeconsents.go @@ -36,7 +36,8 @@ func NewOfficeConsentsClient(subscriptionID string) OfficeConsentsClient { return NewOfficeConsentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOfficeConsentsClientWithBaseURI creates an instance of the OfficeConsentsClient client. +// NewOfficeConsentsClientWithBaseURI creates an instance of the OfficeConsentsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOfficeConsentsClientWithBaseURI(baseURI string, subscriptionID string) OfficeConsentsClient { return OfficeConsentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/operations.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/operations.go index 5a94187d3256..0d1667bade73 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/operations.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/productsettings.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/productsettings.go index ab18494d3ab0..52a40ad1a5d2 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/productsettings.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/productsettings.go @@ -36,7 +36,8 @@ func NewProductSettingsClient(subscriptionID string) ProductSettingsClient { return NewProductSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProductSettingsClientWithBaseURI creates an instance of the ProductSettingsClient client. +// NewProductSettingsClientWithBaseURI creates an instance of the ProductSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProductSettingsClientWithBaseURI(baseURI string, subscriptionID string) ProductSettingsClient { return ProductSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/securityinsightapi/interfaces.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/securityinsightapi/interfaces.go index 9eb55b18db40..374637a85817 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/securityinsightapi/interfaces.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/securityinsightapi/interfaces.go @@ -23,9 +23,17 @@ import ( "github.com/Azure/go-autorest/autorest" ) +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + ListDataConnectorRequirements(ctx context.Context, resourceGroupName string, workspaceName string, operationalInsightsResourceProvider string, dataConnectorsCheckRequirements securityinsight.DataConnectorsCheckRequirements) (result securityinsight.DataConnectorRequirementsState, err error) +} + +var _ BaseClientAPI = (*securityinsight.BaseClient)(nil) + // 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) @@ -39,6 +47,7 @@ type AlertRulesClientAPI interface { Get(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, ruleID string) (result securityinsight.AlertRuleModel, err error) GetAction(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, ruleID string, actionID string) (result securityinsight.ActionResponse, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.AlertRulesListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.AlertRulesListIterator, err error) } var _ AlertRulesClientAPI = (*securityinsight.AlertRulesClient)(nil) @@ -46,6 +55,7 @@ var _ AlertRulesClientAPI = (*securityinsight.AlertRulesClient)(nil) // ActionsClientAPI contains the set of methods on the ActionsClient type. type ActionsClientAPI interface { ListByAlertRule(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, ruleID string) (result securityinsight.ActionsListPage, err error) + ListByAlertRuleComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, ruleID string) (result securityinsight.ActionsListIterator, err error) } var _ ActionsClientAPI = (*securityinsight.ActionsClient)(nil) @@ -54,6 +64,7 @@ var _ ActionsClientAPI = (*securityinsight.ActionsClient)(nil) type AlertRuleTemplatesClientAPI interface { Get(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, alertRuleTemplateID string) (result securityinsight.AlertRuleTemplateModel, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.AlertRuleTemplatesListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.AlertRuleTemplatesListIterator, err error) } var _ AlertRuleTemplatesClientAPI = (*securityinsight.AlertRuleTemplatesClient)(nil) @@ -65,6 +76,7 @@ type CasesClientAPI interface { Get(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string) (result securityinsight.Case, err error) GetComment(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, caseCommentID string) (result securityinsight.CaseComment, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.CaseListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.CaseListIterator, err error) } var _ CasesClientAPI = (*securityinsight.CasesClient)(nil) @@ -72,6 +84,7 @@ var _ CasesClientAPI = (*securityinsight.CasesClient)(nil) // CommentsClientAPI contains the set of methods on the CommentsClient type. type CommentsClientAPI interface { ListByCase(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.CaseCommentListPage, err error) + ListByCaseComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.CaseCommentListIterator, err error) } var _ CommentsClientAPI = (*securityinsight.CommentsClient)(nil) @@ -89,6 +102,7 @@ type BookmarksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, bookmarkID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, bookmarkID string) (result securityinsight.Bookmark, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.BookmarkListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.BookmarkListIterator, err error) } var _ BookmarksClientAPI = (*securityinsight.BookmarksClient)(nil) @@ -99,6 +113,7 @@ type CaseRelationsClientAPI interface { DeleteRelation(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, relationName string) (result autorest.Response, err error) GetRelation(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, relationName string) (result securityinsight.CaseRelation, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.CaseRelationListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, caseID string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.CaseRelationListIterator, err error) } var _ CaseRelationsClientAPI = (*securityinsight.CaseRelationsClient)(nil) @@ -109,6 +124,7 @@ type BookmarkRelationsClientAPI interface { DeleteRelation(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, bookmarkID string, relationName string) (result autorest.Response, err error) GetRelation(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, bookmarkID string, relationName string) (result securityinsight.BookmarkRelation, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, bookmarkID string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.BookmarkRelationListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, bookmarkID string, filter string, orderby string, top *int32, skipToken string) (result securityinsight.BookmarkRelationListIterator, err error) } var _ BookmarkRelationsClientAPI = (*securityinsight.BookmarkRelationsClient)(nil) @@ -119,6 +135,7 @@ type DataConnectorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, dataConnectorID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, dataConnectorID string) (result securityinsight.DataConnectorModel, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.DataConnectorListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.DataConnectorListIterator, err error) } var _ DataConnectorsClientAPI = (*securityinsight.DataConnectorsClient)(nil) @@ -128,6 +145,7 @@ type EntitiesClientAPI interface { Expand(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, entityID string, parameters securityinsight.EntityExpandParameters) (result securityinsight.EntityExpandResponse, err error) Get(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, entityID string) (result securityinsight.EntityModel, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.EntityListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.EntityListIterator, err error) } var _ EntitiesClientAPI = (*securityinsight.EntitiesClient)(nil) @@ -137,6 +155,7 @@ type OfficeConsentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, consentID string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, consentID string) (result securityinsight.OfficeConsent, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.OfficeConsentListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.OfficeConsentListIterator, err error) } var _ OfficeConsentsClientAPI = (*securityinsight.OfficeConsentsClient)(nil) @@ -160,6 +179,7 @@ var _ CasesAggregationsClientAPI = (*securityinsight.CasesAggregationsClient)(ni type EntityQueriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string, entityQueryID string) (result securityinsight.EntityQuery, err error) List(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.EntityQueryListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, operationalInsightsResourceProvider string, workspaceName string) (result securityinsight.EntityQueryListIterator, err error) } var _ EntityQueriesClientAPI = (*securityinsight.EntityQueriesClient)(nil) diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/client.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/client.go index 556b67aad391..c06c9c68d67a 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/client.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/namespaces.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/namespaces.go index 497563b850a2..062640e6dff1 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/namespaces.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/namespaces.go @@ -37,7 +37,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/operations.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/operations.go index 837fd2ceba51..d6c5d3ae19ea 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/operations.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/servicebusapi/interfaces.go b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/servicebusapi/interfaces.go index 68ac8845e36a..3bf7e9432adf 100644 --- a/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/servicebusapi/interfaces.go +++ b/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus/servicebusapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result servicebus.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result servicebus.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicebus.OperationsClient)(nil) @@ -44,9 +45,13 @@ type NamespacesClientAPI interface { GetNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.NetworkRuleSet, err error) GetVirtualNetworkRule(ctx context.Context, resourceGroupName string, namespaceName string, virtualNetworkRuleName string) (result servicebus.VirtualNetworkRule, err error) List(ctx context.Context) (result servicebus.SBNamespaceListResultPage, err error) + ListComplete(ctx context.Context) (result servicebus.SBNamespaceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicebus.SBNamespaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicebus.SBNamespaceListResultIterator, err error) ListIPFilterRules(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.IPFilterRuleListResultPage, err error) + ListIPFilterRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.IPFilterRuleListResultIterator, err error) ListVirtualNetworkRules(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.VirtualNetworkRuleListResultPage, err error) + ListVirtualNetworkRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.VirtualNetworkRuleListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters servicebus.SBNamespaceUpdateParameters) (result servicebus.SBNamespace, err error) } diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/client.go b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/client.go index ec52e83011de..f4ad9b76067f 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/client.go +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go index ad582f7b9ca5..c46dfe5f90cf 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient() ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusterversions.go b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusterversions.go index 03d03e36e52e..6e0fc39f711d 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusterversions.go +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusterversions.go @@ -35,7 +35,8 @@ func NewClusterVersionsClient() ClusterVersionsClient { return NewClusterVersionsClientWithBaseURI(DefaultBaseURI) } -// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client. +// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClusterVersionsClientWithBaseURI(baseURI string) ClusterVersionsClient { return ClusterVersionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/operations.go b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/operations.go index c3671febb225..ac9f926987e0 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/operations.go +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/servicefabricapi/interfaces.go b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/servicefabricapi/interfaces.go index 2eb7a1fbed02..4548c2c61b1c 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/servicefabricapi/interfaces.go +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/servicefabricapi/interfaces.go @@ -48,6 +48,7 @@ var _ ClusterVersionsClientAPI = (*servicefabric.ClusterVersionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context, APIVersion string) (result servicefabric.OperationListResultPage, err error) + ListComplete(ctx context.Context, APIVersion string) (result servicefabric.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicefabric.OperationsClient)(nil) diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applications.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applications.go index 6fa4e1a8c9a5..27217409b762 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applications.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applications.go @@ -35,7 +35,8 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypes.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypes.go index 6e7d97a9a721..b115e0d21376 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypes.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypes.go @@ -35,7 +35,9 @@ func NewApplicationTypesClient(subscriptionID string) ApplicationTypesClient { return NewApplicationTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationTypesClientWithBaseURI creates an instance of the ApplicationTypesClient client. +// NewApplicationTypesClientWithBaseURI creates an instance of the ApplicationTypesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationTypesClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypesClient { return ApplicationTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypeversions.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypeversions.go index b9a1c3476dc9..45fda1e80862 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypeversions.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/applicationtypeversions.go @@ -36,7 +36,9 @@ func NewApplicationTypeVersionsClient(subscriptionID string) ApplicationTypeVers return NewApplicationTypeVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationTypeVersionsClientWithBaseURI creates an instance of the ApplicationTypeVersionsClient client. +// NewApplicationTypeVersionsClientWithBaseURI creates an instance of the ApplicationTypeVersionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewApplicationTypeVersionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypeVersionsClient { return ApplicationTypeVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/client.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/client.go index 0563316480f8..4d463f7cea4e 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/client.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go index 595076949907..c2084921609d 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusterversions.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusterversions.go index 4bf841f027bc..4cbb1cfe41c0 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusterversions.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusterversions.go @@ -35,7 +35,8 @@ func NewClusterVersionsClient(subscriptionID string) ClusterVersionsClient { return NewClusterVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client. +// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClusterVersionsClientWithBaseURI(baseURI string, subscriptionID string) ClusterVersionsClient { return ClusterVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/operations.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/operations.go index 82ccc3f0bf26..0ec579653c3a 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/operations.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/servicefabricapi/interfaces.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/servicefabricapi/interfaces.go index de94bcef3706..63c5c896a938 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/servicefabricapi/interfaces.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/servicefabricapi/interfaces.go @@ -48,6 +48,7 @@ var _ ClusterVersionsClientAPI = (*servicefabric.ClusterVersionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context, APIVersion string) (result servicefabric.OperationListResultPage, err error) + ListComplete(ctx context.Context, APIVersion string) (result servicefabric.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicefabric.OperationsClient)(nil) diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/services.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/services.go index 7295ca94514c..b668d82529c6 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/services.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/services.go @@ -35,7 +35,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/application.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/application.go index d35d2c5230b5..982c970ec420 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/application.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/client.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/client.go index b854fb79d46e..5099d12f0c80 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/client.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/codepackage.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/codepackage.go index 3d4f6551edb6..8fdb1712b861 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/codepackage.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/codepackage.go @@ -35,7 +35,8 @@ func NewCodePackageClient(subscriptionID string) CodePackageClient { return NewCodePackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCodePackageClientWithBaseURI creates an instance of the CodePackageClient client. +// NewCodePackageClientWithBaseURI creates an instance of the CodePackageClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCodePackageClientWithBaseURI(baseURI string, subscriptionID string) CodePackageClient { return CodePackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/network.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/network.go index 2822606c307f..9d4c9205e985 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/network.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/network.go @@ -36,7 +36,8 @@ func NewNetworkClient(subscriptionID string) NetworkClient { return NewNetworkClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNetworkClientWithBaseURI creates an instance of the NetworkClient client. +// NewNetworkClientWithBaseURI creates an instance of the NetworkClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNetworkClientWithBaseURI(baseURI string, subscriptionID string) NetworkClient { return NetworkClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/operations.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/operations.go index 2f297b7e97ee..86e7915ab797 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/operations.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/replica.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/replica.go index 80ac7e885676..a5bc9b4a14b0 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/replica.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/replica.go @@ -35,7 +35,8 @@ func NewReplicaClient(subscriptionID string) ReplicaClient { return NewReplicaClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicaClientWithBaseURI creates an instance of the ReplicaClient client. +// NewReplicaClientWithBaseURI creates an instance of the ReplicaClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicaClientWithBaseURI(baseURI string, subscriptionID string) ReplicaClient { return ReplicaClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/service.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/service.go index 36128bbafc57..775f8289b4a2 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/service.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/service.go @@ -35,7 +35,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/servicefabricmeshapi/interfaces.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/servicefabricmeshapi/interfaces.go index c8bd946cf0ac..f17d582953a4 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/servicefabricmeshapi/interfaces.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/servicefabricmeshapi/interfaces.go @@ -29,7 +29,9 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, applicationName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, applicationName string) (result servicefabricmesh.ApplicationResourceDescription, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabricmesh.ApplicationResourceDescriptionListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabricmesh.ApplicationResourceDescriptionListIterator, err error) ListBySubscription(ctx context.Context) (result servicefabricmesh.ApplicationResourceDescriptionListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicefabricmesh.ApplicationResourceDescriptionListIterator, err error) } var _ ApplicationClientAPI = (*servicefabricmesh.ApplicationClient)(nil) @@ -38,6 +40,7 @@ var _ ApplicationClientAPI = (*servicefabricmesh.ApplicationClient)(nil) type ServiceClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationName string, serviceName string) (result servicefabricmesh.ServiceResourceDescription, err error) ListByApplicationName(ctx context.Context, resourceGroupName string, applicationName string) (result servicefabricmesh.ServiceListPage, err error) + ListByApplicationNameComplete(ctx context.Context, resourceGroupName string, applicationName string) (result servicefabricmesh.ServiceListIterator, err error) } var _ ServiceClientAPI = (*servicefabricmesh.ServiceClient)(nil) @@ -46,6 +49,7 @@ var _ ServiceClientAPI = (*servicefabricmesh.ServiceClient)(nil) type ReplicaClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationName string, serviceName string, replicaName string) (result servicefabricmesh.ServiceReplicaDescription, err error) ListByServiceName(ctx context.Context, resourceGroupName string, applicationName string, serviceName string) (result servicefabricmesh.ServiceReplicaListPage, err error) + ListByServiceNameComplete(ctx context.Context, resourceGroupName string, applicationName string, serviceName string) (result servicefabricmesh.ServiceReplicaListIterator, err error) } var _ ReplicaClientAPI = (*servicefabricmesh.ReplicaClient)(nil) @@ -60,6 +64,7 @@ var _ CodePackageClientAPI = (*servicefabricmesh.CodePackageClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result servicefabricmesh.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result servicefabricmesh.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicefabricmesh.OperationsClient)(nil) @@ -70,7 +75,9 @@ type NetworkClientAPI interface { Delete(ctx context.Context, resourceGroupName string, networkName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, networkName string) (result servicefabricmesh.NetworkResourceDescription, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabricmesh.NetworkResourceDescriptionListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabricmesh.NetworkResourceDescriptionListIterator, err error) ListBySubscription(ctx context.Context) (result servicefabricmesh.NetworkResourceDescriptionListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicefabricmesh.NetworkResourceDescriptionListIterator, err error) } var _ NetworkClientAPI = (*servicefabricmesh.NetworkClient)(nil) @@ -81,7 +88,9 @@ type VolumeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, volumeName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, volumeName string) (result servicefabricmesh.VolumeResourceDescription, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabricmesh.VolumeResourceDescriptionListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabricmesh.VolumeResourceDescriptionListIterator, err error) ListBySubscription(ctx context.Context) (result servicefabricmesh.VolumeResourceDescriptionListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicefabricmesh.VolumeResourceDescriptionListIterator, err error) } var _ VolumeClientAPI = (*servicefabricmesh.VolumeClient)(nil) diff --git a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/volume.go b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/volume.go index bbae64bf7a4f..525b895ce8eb 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/volume.go +++ b/services/preview/servicefabricmesh/mgmt/2018-07-01-preview/servicefabricmesh/volume.go @@ -36,7 +36,8 @@ func NewVolumeClient(subscriptionID string) VolumeClient { return NewVolumeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumeClientWithBaseURI creates an instance of the VolumeClient client. +// NewVolumeClientWithBaseURI creates an instance of the VolumeClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVolumeClientWithBaseURI(baseURI string, subscriptionID string) VolumeClient { return VolumeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/application.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/application.go index d774788bb69d..718d00b85398 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/application.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/application.go @@ -36,7 +36,8 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/client.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/client.go index 97bb7384a102..f89e6dab6267 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/client.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/codepackage.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/codepackage.go index 361ead320792..7ee1d5c2c4b4 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/codepackage.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/codepackage.go @@ -35,7 +35,8 @@ func NewCodePackageClient(subscriptionID string) CodePackageClient { return NewCodePackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCodePackageClientWithBaseURI creates an instance of the CodePackageClient client. +// NewCodePackageClientWithBaseURI creates an instance of the CodePackageClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCodePackageClientWithBaseURI(baseURI string, subscriptionID string) CodePackageClient { return CodePackageClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/gateway.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/gateway.go index f97b4aeeb823..e5297cd878c6 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/gateway.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/gateway.go @@ -36,7 +36,8 @@ func NewGatewayClient(subscriptionID string) GatewayClient { return NewGatewayClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGatewayClientWithBaseURI creates an instance of the GatewayClient client. +// NewGatewayClientWithBaseURI creates an instance of the GatewayClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGatewayClientWithBaseURI(baseURI string, subscriptionID string) GatewayClient { return GatewayClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/network.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/network.go index 92edecd8da01..b8a248adb4be 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/network.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/network.go @@ -36,7 +36,8 @@ func NewNetworkClient(subscriptionID string) NetworkClient { return NewNetworkClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNetworkClientWithBaseURI creates an instance of the NetworkClient client. +// NewNetworkClientWithBaseURI creates an instance of the NetworkClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNetworkClientWithBaseURI(baseURI string, subscriptionID string) NetworkClient { return NetworkClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/operations.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/operations.go index d8242706f4eb..b94b8070ac2d 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/operations.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/secret.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/secret.go index 44ae92205a74..bbe458013850 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/secret.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/secret.go @@ -36,7 +36,8 @@ func NewSecretClient(subscriptionID string) SecretClient { return NewSecretClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecretClientWithBaseURI creates an instance of the SecretClient client. +// NewSecretClientWithBaseURI creates an instance of the SecretClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecretClientWithBaseURI(baseURI string, subscriptionID string) SecretClient { return SecretClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/secretvalue.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/secretvalue.go index 42cc43e3d131..afec7a627a53 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/secretvalue.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/secretvalue.go @@ -36,7 +36,8 @@ func NewSecretValueClient(subscriptionID string) SecretValueClient { return NewSecretValueClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecretValueClientWithBaseURI creates an instance of the SecretValueClient client. +// NewSecretValueClientWithBaseURI creates an instance of the SecretValueClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecretValueClientWithBaseURI(baseURI string, subscriptionID string) SecretValueClient { return SecretValueClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/service.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/service.go index 10ca49d4970f..c04294b042ab 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/service.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/service.go @@ -35,7 +35,8 @@ func NewServiceClient(subscriptionID string) ServiceClient { return NewServiceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceClientWithBaseURI creates an instance of the ServiceClient client. +// NewServiceClientWithBaseURI creates an instance of the ServiceClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceClient { return ServiceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/servicefabricmeshapi/interfaces.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/servicefabricmeshapi/interfaces.go index be03d2b4a215..fa8632e69eeb 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/servicefabricmeshapi/interfaces.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/servicefabricmeshapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result servicefabricmesh.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result servicefabricmesh.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicefabricmesh.OperationsClient)(nil) @@ -36,7 +37,9 @@ type SecretClientAPI interface { Delete(ctx context.Context, resourceGroupName string, secretResourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, secretResourceName string) (result servicefabricmesh.SecretResourceDescription, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabricmesh.SecretResourceDescriptionListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabricmesh.SecretResourceDescriptionListIterator, err error) ListBySubscription(ctx context.Context) (result servicefabricmesh.SecretResourceDescriptionListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicefabricmesh.SecretResourceDescriptionListIterator, err error) } var _ SecretClientAPI = (*servicefabricmesh.SecretClient)(nil) @@ -47,6 +50,7 @@ type SecretValueClientAPI interface { Delete(ctx context.Context, resourceGroupName string, secretResourceName string, secretValueResourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, secretResourceName string, secretValueResourceName string) (result servicefabricmesh.SecretValueResourceDescription, err error) List(ctx context.Context, resourceGroupName string, secretResourceName string) (result servicefabricmesh.SecretValueResourceDescriptionListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, secretResourceName string) (result servicefabricmesh.SecretValueResourceDescriptionListIterator, err error) ListValue(ctx context.Context, resourceGroupName string, secretResourceName string, secretValueResourceName string) (result servicefabricmesh.SecretValue, err error) } @@ -58,7 +62,9 @@ type VolumeClientAPI interface { Delete(ctx context.Context, resourceGroupName string, volumeResourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, volumeResourceName string) (result servicefabricmesh.VolumeResourceDescription, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabricmesh.VolumeResourceDescriptionListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabricmesh.VolumeResourceDescriptionListIterator, err error) ListBySubscription(ctx context.Context) (result servicefabricmesh.VolumeResourceDescriptionListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicefabricmesh.VolumeResourceDescriptionListIterator, err error) } var _ VolumeClientAPI = (*servicefabricmesh.VolumeClient)(nil) @@ -69,7 +75,9 @@ type NetworkClientAPI interface { Delete(ctx context.Context, resourceGroupName string, networkResourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, networkResourceName string) (result servicefabricmesh.NetworkResourceDescription, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabricmesh.NetworkResourceDescriptionListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabricmesh.NetworkResourceDescriptionListIterator, err error) ListBySubscription(ctx context.Context) (result servicefabricmesh.NetworkResourceDescriptionListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicefabricmesh.NetworkResourceDescriptionListIterator, err error) } var _ NetworkClientAPI = (*servicefabricmesh.NetworkClient)(nil) @@ -80,7 +88,9 @@ type GatewayClientAPI interface { Delete(ctx context.Context, resourceGroupName string, gatewayResourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, gatewayResourceName string) (result servicefabricmesh.GatewayResourceDescription, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabricmesh.GatewayResourceDescriptionListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabricmesh.GatewayResourceDescriptionListIterator, err error) ListBySubscription(ctx context.Context) (result servicefabricmesh.GatewayResourceDescriptionListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicefabricmesh.GatewayResourceDescriptionListIterator, err error) } var _ GatewayClientAPI = (*servicefabricmesh.GatewayClient)(nil) @@ -91,7 +101,9 @@ type ApplicationClientAPI interface { Delete(ctx context.Context, resourceGroupName string, applicationResourceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, applicationResourceName string) (result servicefabricmesh.ApplicationResourceDescription, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabricmesh.ApplicationResourceDescriptionListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabricmesh.ApplicationResourceDescriptionListIterator, err error) ListBySubscription(ctx context.Context) (result servicefabricmesh.ApplicationResourceDescriptionListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicefabricmesh.ApplicationResourceDescriptionListIterator, err error) } var _ ApplicationClientAPI = (*servicefabricmesh.ApplicationClient)(nil) @@ -100,6 +112,7 @@ var _ ApplicationClientAPI = (*servicefabricmesh.ApplicationClient)(nil) type ServiceClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationResourceName string, serviceResourceName string) (result servicefabricmesh.ServiceResourceDescription, err error) List(ctx context.Context, resourceGroupName string, applicationResourceName string) (result servicefabricmesh.ServiceResourceDescriptionListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, applicationResourceName string) (result servicefabricmesh.ServiceResourceDescriptionListIterator, err error) } var _ ServiceClientAPI = (*servicefabricmesh.ServiceClient)(nil) @@ -108,6 +121,7 @@ var _ ServiceClientAPI = (*servicefabricmesh.ServiceClient)(nil) type ServiceReplicaClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationResourceName string, serviceResourceName string, replicaName string) (result servicefabricmesh.ServiceReplicaDescription, err error) List(ctx context.Context, resourceGroupName string, applicationResourceName string, serviceResourceName string) (result servicefabricmesh.ServiceReplicaDescriptionListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, applicationResourceName string, serviceResourceName string) (result servicefabricmesh.ServiceReplicaDescriptionListIterator, err error) } var _ ServiceReplicaClientAPI = (*servicefabricmesh.ServiceReplicaClient)(nil) diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/servicereplica.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/servicereplica.go index 42e16f242339..43af9ed15dbc 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/servicereplica.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/servicereplica.go @@ -35,7 +35,8 @@ func NewServiceReplicaClient(subscriptionID string) ServiceReplicaClient { return NewServiceReplicaClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceReplicaClientWithBaseURI creates an instance of the ServiceReplicaClient client. +// NewServiceReplicaClientWithBaseURI creates an instance of the ServiceReplicaClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceReplicaClientWithBaseURI(baseURI string, subscriptionID string) ServiceReplicaClient { return ServiceReplicaClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/volume.go b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/volume.go index 1327a7d20894..ae156a83bf9f 100644 --- a/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/volume.go +++ b/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh/volume.go @@ -36,7 +36,8 @@ func NewVolumeClient(subscriptionID string) VolumeClient { return NewVolumeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumeClientWithBaseURI creates an instance of the VolumeClient client. +// NewVolumeClientWithBaseURI creates an instance of the VolumeClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVolumeClientWithBaseURI(baseURI string, subscriptionID string) VolumeClient { return VolumeClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/client.go b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/client.go index fbe50010d092..b9311079e4a4 100644 --- a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/client.go +++ b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/operations.go b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/operations.go index 13d6a709a5ef..bb675aef67a2 100644 --- a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/operations.go +++ b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go index 10027573e9ae..01e23a38eaaf 100644 --- a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go +++ b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalrapi/interfaces.go b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalrapi/interfaces.go index fa3fdc1b062c..c29eec66c5bc 100644 --- a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalrapi/interfaces.go +++ b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalrapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result signalr.OperationListPage, err error) + ListComplete(ctx context.Context) (result signalr.OperationListIterator, err error) } var _ OperationsClientAPI = (*signalr.OperationsClient)(nil) @@ -36,7 +37,9 @@ type ClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result signalr.DeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result signalr.ResourceType, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result signalr.ResourceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result signalr.ResourceListIterator, err error) ListBySubscription(ctx context.Context) (result signalr.ResourceListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result signalr.ResourceListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result signalr.Keys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, resourceName string, parameters *signalr.RegenerateKeyParameters) (result signalr.RegenerateKeyFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters *signalr.UpdateParameters) (result signalr.UpdateFuture, err error) @@ -47,6 +50,7 @@ var _ ClientAPI = (*signalr.Client)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result signalr.UsageListPage, err error) + ListComplete(ctx context.Context, location string) (result signalr.UsageListIterator, err error) } var _ UsagesClientAPI = (*signalr.UsagesClient)(nil) diff --git a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/usages.go b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/usages.go index d1c781dd71f8..55462d0546a8 100644 --- a/services/preview/signalr/mgmt/2018-03-01-preview/signalr/usages.go +++ b/services/preview/signalr/mgmt/2018-03-01-preview/signalr/usages.go @@ -35,7 +35,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/client.go b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/client.go index 28bc14de2b19..bd75c5121e9f 100644 --- a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/client.go +++ b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/hybridusebenefit.go b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/hybridusebenefit.go index 58727c34e2f7..4ed8c0ad6a9c 100644 --- a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/hybridusebenefit.go +++ b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/hybridusebenefit.go @@ -37,7 +37,9 @@ func NewHybridUseBenefitClient(subscriptionID string) HybridUseBenefitClient { return NewHybridUseBenefitClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridUseBenefitClientWithBaseURI creates an instance of the HybridUseBenefitClient client. +// NewHybridUseBenefitClientWithBaseURI creates an instance of the HybridUseBenefitClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewHybridUseBenefitClientWithBaseURI(baseURI string, subscriptionID string) HybridUseBenefitClient { return HybridUseBenefitClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/hybridusebenefitrevision.go b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/hybridusebenefitrevision.go index ad9256684789..b04b1dcb9ebb 100644 --- a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/hybridusebenefitrevision.go +++ b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/hybridusebenefitrevision.go @@ -36,7 +36,9 @@ func NewHybridUseBenefitRevisionClient(subscriptionID string) HybridUseBenefitRe return NewHybridUseBenefitRevisionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridUseBenefitRevisionClientWithBaseURI creates an instance of the HybridUseBenefitRevisionClient client. +// NewHybridUseBenefitRevisionClientWithBaseURI creates an instance of the HybridUseBenefitRevisionClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewHybridUseBenefitRevisionClientWithBaseURI(baseURI string, subscriptionID string) HybridUseBenefitRevisionClient { return HybridUseBenefitRevisionClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/operations.go b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/operations.go index f89b9e14afc0..c14dbf2f992b 100644 --- a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/operations.go +++ b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/softwareplan.go b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/softwareplan.go index cefc2c552305..fbe452f8c86d 100644 --- a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/softwareplan.go +++ b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/softwareplan.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/softwareplanapi/interfaces.go b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/softwareplanapi/interfaces.go index 0de523401203..bbcbd2d208fa 100644 --- a/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/softwareplanapi/interfaces.go +++ b/services/preview/softwareplan/mgmt/2019-06-01-preview/softwareplan/softwareplanapi/interfaces.go @@ -36,6 +36,7 @@ type HybridUseBenefitClientAPI interface { Delete(ctx context.Context, scope string, planID string) (result autorest.Response, err error) Get(ctx context.Context, scope string, planID string) (result softwareplan.HybridUseBenefitModel, err error) List(ctx context.Context, scope string, filter string) (result softwareplan.HybridUseBenefitListResultPage, err error) + ListComplete(ctx context.Context, scope string, filter string) (result softwareplan.HybridUseBenefitListResultIterator, err error) Update(ctx context.Context, scope string, planID string, body softwareplan.HybridUseBenefitModel) (result softwareplan.HybridUseBenefitModel, err error) } @@ -44,6 +45,7 @@ var _ HybridUseBenefitClientAPI = (*softwareplan.HybridUseBenefitClient)(nil) // HybridUseBenefitRevisionClientAPI contains the set of methods on the HybridUseBenefitRevisionClient type. type HybridUseBenefitRevisionClientAPI interface { List(ctx context.Context, scope string, planID string) (result softwareplan.HybridUseBenefitListResultPage, err error) + ListComplete(ctx context.Context, scope string, planID string) (result softwareplan.HybridUseBenefitListResultIterator, err error) } var _ HybridUseBenefitRevisionClientAPI = (*softwareplan.HybridUseBenefitRevisionClient)(nil) @@ -51,6 +53,7 @@ var _ HybridUseBenefitRevisionClientAPI = (*softwareplan.HybridUseBenefitRevisio // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context, scope string) (result softwareplan.OperationListPage, err error) + ListComplete(ctx context.Context, scope string) (result softwareplan.OperationListIterator, err error) } var _ OperationsClientAPI = (*softwareplan.OperationsClient)(nil) diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go index d106b0595037..751ba63cf95b 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go @@ -39,7 +39,8 @@ func NewBackupLongTermRetentionPoliciesClient(subscriptionID string) BackupLongT } // NewBackupLongTermRetentionPoliciesClientWithBaseURI creates an instance of the BackupLongTermRetentionPoliciesClient -// 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 NewBackupLongTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionPoliciesClient { return BackupLongTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go index da3db554f53d..a37ef6abdb4b 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go @@ -39,7 +39,8 @@ func NewBackupLongTermRetentionVaultsClient(subscriptionID string) BackupLongTer } // NewBackupLongTermRetentionVaultsClientWithBaseURI creates an instance of the BackupLongTermRetentionVaultsClient -// 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 NewBackupLongTermRetentionVaultsClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionVaultsClient { return BackupLongTermRetentionVaultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/capabilities.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/capabilities.go index 056fc1b92105..d1c2b06c2560 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/capabilities.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/capabilities.go @@ -37,7 +37,8 @@ func NewCapabilitiesClient(subscriptionID string) CapabilitiesClient { return NewCapabilitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client. +// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) CapabilitiesClient { return CapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/client.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/client.go index 40ec57b36bab..06af8e714eca 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/client.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseblobauditingpolicies.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseblobauditingpolicies.go index eced7d5753e0..713c8a9ea86c 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseblobauditingpolicies.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseblobauditingpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseBlobAuditingPoliciesClient(subscriptionID string) DatabaseBlobAu } // NewDatabaseBlobAuditingPoliciesClientWithBaseURI creates an instance of the DatabaseBlobAuditingPoliciesClient -// 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 NewDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseBlobAuditingPoliciesClient { return DatabaseBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go index 36b2bc57c791..aaeec74277dd 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/databasethreatdetectionpolicies.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/databasethreatdetectionpolicies.go index 9c858036755f..ca44eccd7da2 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/databasethreatdetectionpolicies.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/databasethreatdetectionpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseThreatDetectionPoliciesClient(subscriptionID string) DatabaseThr } // NewDatabaseThreatDetectionPoliciesClientWithBaseURI creates an instance of the DatabaseThreatDetectionPoliciesClient -// 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 NewDatabaseThreatDetectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseThreatDetectionPoliciesClient { return DatabaseThreatDetectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseusages.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseusages.go index 45f0a1e730a4..d3601a4bfdc9 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseusages.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseusages.go @@ -37,7 +37,8 @@ func NewDatabaseUsagesClient(subscriptionID string) DatabaseUsagesClient { return NewDatabaseUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client. +// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseUsagesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseUsagesClient { return DatabaseUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingpolicies.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingpolicies.go index 65303d3d345a..51c2a48ad0f0 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingpolicies.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingpolicies.go @@ -37,7 +37,9 @@ func NewDataMaskingPoliciesClient(subscriptionID string) DataMaskingPoliciesClie return NewDataMaskingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataMaskingPoliciesClientWithBaseURI creates an instance of the DataMaskingPoliciesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingrules.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingrules.go index d7a6ff263792..8472a5ff846d 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingrules.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingrules.go @@ -38,7 +38,9 @@ func NewDataMaskingRulesClient(subscriptionID string) DataMaskingRulesClient { return NewDataMaskingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataMaskingRulesClientWithBaseURI creates an instance of the DataMaskingRulesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpoolactivities.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpoolactivities.go index 94df73d2fff9..268b2ee5c392 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpoolactivities.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpoolactivities.go @@ -37,7 +37,9 @@ func NewElasticPoolActivitiesClient(subscriptionID string) ElasticPoolActivities return NewElasticPoolActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client. +// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewElasticPoolActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolActivitiesClient { return ElasticPoolActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpooldatabaseactivities.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpooldatabaseactivities.go index dd0e955db87f..70e005ff32d2 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpooldatabaseactivities.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpooldatabaseactivities.go @@ -38,7 +38,8 @@ func NewElasticPoolDatabaseActivitiesClient(subscriptionID string) ElasticPoolDa } // NewElasticPoolDatabaseActivitiesClientWithBaseURI creates an instance of the ElasticPoolDatabaseActivitiesClient -// 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 NewElasticPoolDatabaseActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolDatabaseActivitiesClient { return ElasticPoolDatabaseActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go index 8b2ff84aad84..82445b7580b5 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go @@ -37,7 +37,8 @@ func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client. +// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go index 4bf6cc3947ab..ba987a7746f4 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go @@ -37,7 +37,9 @@ func NewEncryptionProtectorsClient(subscriptionID string) EncryptionProtectorsCl return NewEncryptionProtectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEncryptionProtectorsClientWithBaseURI creates an instance of the EncryptionProtectorsClient client. +// NewEncryptionProtectorsClientWithBaseURI creates an instance of the EncryptionProtectorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEncryptionProtectorsClientWithBaseURI(baseURI string, subscriptionID string) EncryptionProtectorsClient { return EncryptionProtectorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go index ea286e1e6aff..62cbc1c9a8ee 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go @@ -38,7 +38,8 @@ func NewFailoverGroupsClient(subscriptionID string) FailoverGroupsClient { return NewFailoverGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFailoverGroupsClientWithBaseURI creates an instance of the FailoverGroupsClient client. +// NewFailoverGroupsClientWithBaseURI creates an instance of the FailoverGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFailoverGroupsClientWithBaseURI(baseURI string, subscriptionID string) FailoverGroupsClient { return FailoverGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/firewallrules.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/firewallrules.go index daa8a1f832c7..7d80bda73e1d 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/firewallrules.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/firewallrules.go @@ -38,7 +38,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/geobackuppolicies.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/geobackuppolicies.go index 28e35d715a1b..9c0118335e54 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/geobackuppolicies.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/geobackuppolicies.go @@ -38,7 +38,9 @@ func NewGeoBackupPoliciesClient(subscriptionID string) GeoBackupPoliciesClient { return NewGeoBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client. +// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGeoBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) GeoBackupPoliciesClient { return GeoBackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go index ffdde71d15ef..37ad04ec7ef9 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go @@ -38,7 +38,9 @@ func NewManagedInstancesClient(subscriptionID string) ManagedInstancesClient { return NewManagedInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client. +// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedInstancesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstancesClient { return ManagedInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/operations.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/operations.go index bd0657225fde..a23318d8d8b4 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/operations.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/recoverabledatabases.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/recoverabledatabases.go index bfa9b2425b97..d900e5223ef5 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/recoverabledatabases.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/recoverabledatabases.go @@ -37,7 +37,9 @@ func NewRecoverableDatabasesClient(subscriptionID string) RecoverableDatabasesCl return NewRecoverableDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client. +// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRecoverableDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RecoverableDatabasesClient { return RecoverableDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/replicationlinks.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/replicationlinks.go index 4122dbff6cef..c810a1a2db59 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/replicationlinks.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/replicationlinks.go @@ -37,7 +37,9 @@ func NewReplicationLinksClient(subscriptionID string) ReplicationLinksClient { return NewReplicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client. +// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ReplicationLinksClient { return ReplicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/restorabledroppeddatabases.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/restorabledroppeddatabases.go index ee9433fcd23a..9916f42cfd6d 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/restorabledroppeddatabases.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/restorabledroppeddatabases.go @@ -37,7 +37,9 @@ func NewRestorableDroppedDatabasesClient(subscriptionID string) RestorableDroppe return NewRestorableDroppedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client. +// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewRestorableDroppedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedDatabasesClient { return RestorableDroppedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/restorepoints.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/restorepoints.go index a261a52b7584..c696a59b7597 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/restorepoints.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/restorepoints.go @@ -37,7 +37,8 @@ func NewRestorePointsClient(subscriptionID string) RestorePointsClient { return NewRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestorePointsClientWithBaseURI creates an instance of the RestorePointsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/serverazureadadministrators.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/serverazureadadministrators.go index 8f68bc664109..62b81a3b9412 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/serverazureadadministrators.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/serverazureadadministrators.go @@ -38,7 +38,9 @@ func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAd return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client. +// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/servercommunicationlinks.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/servercommunicationlinks.go index 8c89241fa93f..7e91bbed9296 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/servercommunicationlinks.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/servercommunicationlinks.go @@ -38,7 +38,9 @@ func NewServerCommunicationLinksClient(subscriptionID string) ServerCommunicatio return NewServerCommunicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client. +// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerCommunicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServerCommunicationLinksClient { return ServerCommunicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/serverconnectionpolicies.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/serverconnectionpolicies.go index 281669c15993..dae81775e782 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/serverconnectionpolicies.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/serverconnectionpolicies.go @@ -37,7 +37,9 @@ func NewServerConnectionPoliciesClient(subscriptionID string) ServerConnectionPo return NewServerConnectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client. +// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerConnectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerConnectionPoliciesClient { return ServerConnectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/serverkeys.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/serverkeys.go index 9e9e38abbe15..7d82b1c150a1 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/serverkeys.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/serverkeys.go @@ -37,7 +37,8 @@ func NewServerKeysClient(subscriptionID string) ServerKeysClient { return NewServerKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerKeysClientWithBaseURI creates an instance of the ServerKeysClient client. +// NewServerKeysClientWithBaseURI creates an instance of the ServerKeysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerKeysClientWithBaseURI(baseURI string, subscriptionID string) ServerKeysClient { return ServerKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/servers.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/servers.go index 388a123d7685..7f91eefcf153 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/servers.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/servers.go @@ -38,7 +38,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/serverusages.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/serverusages.go index 65f3fd8d5b43..7175e98a49b9 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/serverusages.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/serverusages.go @@ -37,7 +37,8 @@ func NewServerUsagesClient(subscriptionID string) ServerUsagesClient { return NewServerUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client. +// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerUsagesClientWithBaseURI(baseURI string, subscriptionID string) ServerUsagesClient { return ServerUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/serviceobjectives.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/serviceobjectives.go index 971180b812c7..e61e6e009f18 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/serviceobjectives.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/serviceobjectives.go @@ -37,7 +37,9 @@ func NewServiceObjectivesClient(subscriptionID string) ServiceObjectivesClient { return NewServiceObjectivesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client. +// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceObjectivesClientWithBaseURI(baseURI string, subscriptionID string) ServiceObjectivesClient { return ServiceObjectivesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/servicetieradvisors.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/servicetieradvisors.go index 8fc1f2d7ae8a..a13cd33d4476 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/servicetieradvisors.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/servicetieradvisors.go @@ -37,7 +37,9 @@ func NewServiceTierAdvisorsClient(subscriptionID string) ServiceTierAdvisorsClie return NewServiceTierAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client. +// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceTierAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTierAdvisorsClient { return ServiceTierAdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/sqlapi/interfaces.go index af86076ce67b..526a55f093fe 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/sqlapi/interfaces.go @@ -71,7 +71,9 @@ type ServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.Server, err error) List(ctx context.Context) (result sql.ServerListResultPage, err error) + ListComplete(ctx context.Context) (result sql.ServerListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.ServerListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.ServerListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerUpdate) (result sql.ServersUpdateFuture, err error) } @@ -265,6 +267,7 @@ type DatabaseBlobAuditingPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.DatabaseBlobAuditingPolicy) (result sql.DatabaseBlobAuditingPolicy, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicyListResultIterator, err error) } var _ DatabaseBlobAuditingPoliciesClientAPI = (*sql.DatabaseBlobAuditingPoliciesClient)(nil) @@ -274,6 +277,7 @@ type EncryptionProtectorsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.EncryptionProtector) (result sql.EncryptionProtectorsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtector, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorListResultIterator, err error) Revalidate(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorsRevalidateFuture, err error) } @@ -287,6 +291,7 @@ type FailoverGroupsClientAPI interface { ForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result sql.FailoverGroupsForceFailoverAllowDataLossFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result sql.FailoverGroup, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.FailoverGroupListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.FailoverGroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters sql.FailoverGroupUpdate) (result sql.FailoverGroupsUpdateFuture, err error) } @@ -298,7 +303,9 @@ type ManagedInstancesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstancesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstance, err error) List(ctx context.Context) (result sql.ManagedInstanceListResultPage, err error) + ListComplete(ctx context.Context) (result sql.ManagedInstanceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.ManagedInstanceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.ManagedInstanceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedInstanceUpdate) (result sql.ManagedInstancesUpdateFuture, err error) } @@ -307,6 +314,7 @@ var _ ManagedInstancesClientAPI = (*sql.ManagedInstancesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result sql.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result sql.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*sql.OperationsClient)(nil) @@ -317,6 +325,7 @@ type ServerKeysClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, keyName string) (result sql.ServerKeysDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, keyName string) (result sql.ServerKey, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerKeyListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerKeyListResultIterator, err error) } var _ ServerKeysClientAPI = (*sql.ServerKeysClient)(nil) @@ -328,7 +337,9 @@ type SyncAgentsClientAPI interface { GenerateKey(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentKeyProperties, err error) Get(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgent, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.SyncAgentListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.SyncAgentListResultIterator, err error) ListLinkedDatabases(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentLinkedDatabaseListResultPage, err error) + ListLinkedDatabasesComplete(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentLinkedDatabaseListResultIterator, err error) } var _ SyncAgentsClientAPI = (*sql.SyncAgentsClient)(nil) @@ -340,9 +351,13 @@ type SyncGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroup, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultIterator, err error) ListHubSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) + ListHubSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) ListLogs(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultPage, err error) + ListLogsComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultIterator, err error) ListSyncDatabaseIds(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultPage, err error) + ListSyncDatabaseIdsComplete(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultIterator, err error) RefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsRefreshHubSchemaFuture, err error) TriggerSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters sql.SyncGroup) (result sql.SyncGroupsUpdateFuture, err error) @@ -356,7 +371,9 @@ type SyncMembersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMember, err error) ListBySyncGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultPage, err error) + ListBySyncGroupComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultIterator, err error) ListMemberSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) + ListMemberSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) RefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersRefreshMemberSchemaFuture, err error) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters sql.SyncMember) (result sql.SyncMembersUpdateFuture, err error) } @@ -367,6 +384,7 @@ var _ SyncMembersClientAPI = (*sql.SyncMembersClient)(nil) type SubscriptionUsagesClientAPI interface { Get(ctx context.Context, locationName string, usageName string) (result sql.SubscriptionUsage, err error) ListByLocation(ctx context.Context, locationName string) (result sql.SubscriptionUsageListResultPage, err error) + ListByLocationComplete(ctx context.Context, locationName string) (result sql.SubscriptionUsageListResultIterator, err error) } var _ SubscriptionUsagesClientAPI = (*sql.SubscriptionUsagesClient)(nil) @@ -376,7 +394,9 @@ type VirtualClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualClusterName string) (result sql.VirtualClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualClusterName string) (result sql.VirtualCluster, err error) List(ctx context.Context) (result sql.VirtualClusterListResultPage, err error) + ListComplete(ctx context.Context) (result sql.VirtualClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.VirtualClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.VirtualClusterListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters sql.VirtualClusterUpdate) (result sql.VirtualClustersUpdateFuture, err error) } @@ -388,6 +408,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result sql.VirtualNetworkRulesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result sql.VirtualNetworkRule, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.VirtualNetworkRuleListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.VirtualNetworkRuleListResultIterator, err error) } var _ VirtualNetworkRulesClientAPI = (*sql.VirtualNetworkRulesClient)(nil) diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/subscriptionusages.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/subscriptionusages.go index 05a7a1840a7a..41fecbf44921 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/subscriptionusages.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/subscriptionusages.go @@ -37,7 +37,9 @@ func NewSubscriptionUsagesClient(subscriptionID string) SubscriptionUsagesClient return NewSubscriptionUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionUsagesClientWithBaseURI creates an instance of the SubscriptionUsagesClient client. +// NewSubscriptionUsagesClientWithBaseURI creates an instance of the SubscriptionUsagesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSubscriptionUsagesClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionUsagesClient { return SubscriptionUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/syncagents.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/syncagents.go index 83d69dca7838..e9fdec8d491e 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/syncagents.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/syncagents.go @@ -37,7 +37,8 @@ func NewSyncAgentsClient(subscriptionID string) SyncAgentsClient { return NewSyncAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncAgentsClientWithBaseURI creates an instance of the SyncAgentsClient client. +// NewSyncAgentsClientWithBaseURI creates an instance of the SyncAgentsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncAgentsClientWithBaseURI(baseURI string, subscriptionID string) SyncAgentsClient { return SyncAgentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/syncgroups.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/syncgroups.go index f16c28c30198..028160474fd6 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/syncgroups.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/syncgroups.go @@ -37,7 +37,8 @@ func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client. +// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/syncmembers.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/syncmembers.go index 3bf30d6226c7..bbbfb3ff45ee 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/syncmembers.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/syncmembers.go @@ -37,7 +37,8 @@ func NewSyncMembersClient(subscriptionID string) SyncMembersClient { return NewSyncMembersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncMembersClientWithBaseURI creates an instance of the SyncMembersClient client. +// NewSyncMembersClientWithBaseURI creates an instance of the SyncMembersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncMembersClientWithBaseURI(baseURI string, subscriptionID string) SyncMembersClient { return SyncMembersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/transparentdataencryptionactivities.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/transparentdataencryptionactivities.go index 2c8c003fc3b7..e9602baf8ad9 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/transparentdataencryptionactivities.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/transparentdataencryptionactivities.go @@ -39,7 +39,8 @@ func NewTransparentDataEncryptionActivitiesClient(subscriptionID string) Transpa } // NewTransparentDataEncryptionActivitiesClientWithBaseURI creates an instance of the -// TransparentDataEncryptionActivitiesClient client. +// TransparentDataEncryptionActivitiesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransparentDataEncryptionActivitiesClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionActivitiesClient { return TransparentDataEncryptionActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/transparentdataencryptions.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/transparentdataencryptions.go index 7ea3bdf24a6e..e293d89b6926 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/transparentdataencryptions.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/transparentdataencryptions.go @@ -37,7 +37,9 @@ func NewTransparentDataEncryptionsClient(subscriptionID string) TransparentDataE return NewTransparentDataEncryptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client. +// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewTransparentDataEncryptionsClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionsClient { return TransparentDataEncryptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualclusters.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualclusters.go index ffea75716e96..d05656d80762 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualclusters.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualclusters.go @@ -37,7 +37,8 @@ func NewVirtualClustersClient(subscriptionID string) VirtualClustersClient { return NewVirtualClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualClustersClientWithBaseURI creates an instance of the VirtualClustersClient client. +// NewVirtualClustersClientWithBaseURI creates an instance of the VirtualClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualClustersClientWithBaseURI(baseURI string, subscriptionID string) VirtualClustersClient { return VirtualClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualnetworkrules.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualnetworkrules.go index 492473c92165..752cb9e7aab8 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualnetworkrules.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/virtualnetworkrules.go @@ -38,7 +38,9 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionpolicies.go index d106b0595037..751ba63cf95b 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionpolicies.go @@ -39,7 +39,8 @@ func NewBackupLongTermRetentionPoliciesClient(subscriptionID string) BackupLongT } // NewBackupLongTermRetentionPoliciesClientWithBaseURI creates an instance of the BackupLongTermRetentionPoliciesClient -// 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 NewBackupLongTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionPoliciesClient { return BackupLongTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionvaults.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionvaults.go index da3db554f53d..a37ef6abdb4b 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionvaults.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/backuplongtermretentionvaults.go @@ -39,7 +39,8 @@ func NewBackupLongTermRetentionVaultsClient(subscriptionID string) BackupLongTer } // NewBackupLongTermRetentionVaultsClientWithBaseURI creates an instance of the BackupLongTermRetentionVaultsClient -// 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 NewBackupLongTermRetentionVaultsClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionVaultsClient { return BackupLongTermRetentionVaultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/capabilities.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/capabilities.go index c5718dd09fbe..c605e5b3383f 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/capabilities.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/capabilities.go @@ -37,7 +37,8 @@ func NewCapabilitiesClient(subscriptionID string) CapabilitiesClient { return NewCapabilitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client. +// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) CapabilitiesClient { return CapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/client.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/client.go index 40ec57b36bab..06af8e714eca 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/client.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseautomatictuning.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseautomatictuning.go index 2b7edb2d0e14..e3edd2c05525 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseautomatictuning.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseautomatictuning.go @@ -37,7 +37,9 @@ func NewDatabaseAutomaticTuningClient(subscriptionID string) DatabaseAutomaticTu return NewDatabaseAutomaticTuningClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseAutomaticTuningClientWithBaseURI creates an instance of the DatabaseAutomaticTuningClient client. +// NewDatabaseAutomaticTuningClientWithBaseURI creates an instance of the DatabaseAutomaticTuningClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDatabaseAutomaticTuningClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAutomaticTuningClient { return DatabaseAutomaticTuningClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseblobauditingpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseblobauditingpolicies.go index 8e61953bbeae..97fb47ea18ff 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseblobauditingpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseblobauditingpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseBlobAuditingPoliciesClient(subscriptionID string) DatabaseBlobAu } // NewDatabaseBlobAuditingPoliciesClientWithBaseURI creates an instance of the DatabaseBlobAuditingPoliciesClient -// 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 NewDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseBlobAuditingPoliciesClient { return DatabaseBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseoperations.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseoperations.go index b9960bcb12e8..22d8d10d9828 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseoperations.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseoperations.go @@ -38,7 +38,9 @@ func NewDatabaseOperationsClient(subscriptionID string) DatabaseOperationsClient return NewDatabaseOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseOperationsClientWithBaseURI creates an instance of the DatabaseOperationsClient client. +// NewDatabaseOperationsClientWithBaseURI creates an instance of the DatabaseOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDatabaseOperationsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseOperationsClient { return DatabaseOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go index 327d066b6f53..a706209fc4c6 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/databasethreatdetectionpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/databasethreatdetectionpolicies.go index 9c858036755f..ca44eccd7da2 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/databasethreatdetectionpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/databasethreatdetectionpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseThreatDetectionPoliciesClient(subscriptionID string) DatabaseThr } // NewDatabaseThreatDetectionPoliciesClientWithBaseURI creates an instance of the DatabaseThreatDetectionPoliciesClient -// 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 NewDatabaseThreatDetectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseThreatDetectionPoliciesClient { return DatabaseThreatDetectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseusages.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseusages.go index 45f0a1e730a4..d3601a4bfdc9 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseusages.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/databaseusages.go @@ -37,7 +37,8 @@ func NewDatabaseUsagesClient(subscriptionID string) DatabaseUsagesClient { return NewDatabaseUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client. +// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseUsagesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseUsagesClient { return DatabaseUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go index c4de2c1ee8e8..473577af45b2 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessmentrulebaselines.go @@ -40,7 +40,8 @@ func NewDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string } // NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI creates an instance of the -// DatabaseVulnerabilityAssessmentRuleBaselinesClient client. +// DatabaseVulnerabilityAssessmentRuleBaselinesClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentRuleBaselinesClient { return DatabaseVulnerabilityAssessmentRuleBaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go index e953704645ce..80fa889069b7 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/databasevulnerabilityassessments.go @@ -38,7 +38,8 @@ func NewDatabaseVulnerabilityAssessmentsClient(subscriptionID string) DatabaseVu } // NewDatabaseVulnerabilityAssessmentsClientWithBaseURI creates an instance of the -// DatabaseVulnerabilityAssessmentsClient client. +// DatabaseVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentsClient { return DatabaseVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingpolicies.go index 65303d3d345a..51c2a48ad0f0 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingpolicies.go @@ -37,7 +37,9 @@ func NewDataMaskingPoliciesClient(subscriptionID string) DataMaskingPoliciesClie return NewDataMaskingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataMaskingPoliciesClientWithBaseURI creates an instance of the DataMaskingPoliciesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingrules.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingrules.go index d7a6ff263792..8472a5ff846d 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingrules.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/datamaskingrules.go @@ -38,7 +38,9 @@ func NewDataMaskingRulesClient(subscriptionID string) DataMaskingRulesClient { return NewDataMaskingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataMaskingRulesClientWithBaseURI creates an instance of the DataMaskingRulesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/datawarehouseuseractivities.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/datawarehouseuseractivities.go index 3f4ba5338dcf..40088d983e26 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/datawarehouseuseractivities.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/datawarehouseuseractivities.go @@ -37,7 +37,9 @@ func NewDataWarehouseUserActivitiesClient(subscriptionID string) DataWarehouseUs return NewDataWarehouseUserActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataWarehouseUserActivitiesClientWithBaseURI creates an instance of the DataWarehouseUserActivitiesClient client. +// NewDataWarehouseUserActivitiesClientWithBaseURI creates an instance of the DataWarehouseUserActivitiesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDataWarehouseUserActivitiesClientWithBaseURI(baseURI string, subscriptionID string) DataWarehouseUserActivitiesClient { return DataWarehouseUserActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpoolactivities.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpoolactivities.go index 94df73d2fff9..268b2ee5c392 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpoolactivities.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpoolactivities.go @@ -37,7 +37,9 @@ func NewElasticPoolActivitiesClient(subscriptionID string) ElasticPoolActivities return NewElasticPoolActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client. +// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewElasticPoolActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolActivitiesClient { return ElasticPoolActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpooldatabaseactivities.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpooldatabaseactivities.go index dd0e955db87f..70e005ff32d2 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpooldatabaseactivities.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpooldatabaseactivities.go @@ -38,7 +38,8 @@ func NewElasticPoolDatabaseActivitiesClient(subscriptionID string) ElasticPoolDa } // NewElasticPoolDatabaseActivitiesClientWithBaseURI creates an instance of the ElasticPoolDatabaseActivitiesClient -// 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 NewElasticPoolDatabaseActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolDatabaseActivitiesClient { return ElasticPoolDatabaseActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go index 8b2ff84aad84..82445b7580b5 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/elasticpools.go @@ -37,7 +37,8 @@ func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client. +// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go index 4bf6cc3947ab..ba987a7746f4 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/encryptionprotectors.go @@ -37,7 +37,9 @@ func NewEncryptionProtectorsClient(subscriptionID string) EncryptionProtectorsCl return NewEncryptionProtectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEncryptionProtectorsClientWithBaseURI creates an instance of the EncryptionProtectorsClient client. +// NewEncryptionProtectorsClientWithBaseURI creates an instance of the EncryptionProtectorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEncryptionProtectorsClientWithBaseURI(baseURI string, subscriptionID string) EncryptionProtectorsClient { return EncryptionProtectorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/extendeddatabaseblobauditingpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/extendeddatabaseblobauditingpolicies.go index 7c174fe2ad37..d33f275fa4a4 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/extendeddatabaseblobauditingpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/extendeddatabaseblobauditingpolicies.go @@ -39,7 +39,8 @@ func NewExtendedDatabaseBlobAuditingPoliciesClient(subscriptionID string) Extend } // NewExtendedDatabaseBlobAuditingPoliciesClientWithBaseURI creates an instance of the -// ExtendedDatabaseBlobAuditingPoliciesClient client. +// ExtendedDatabaseBlobAuditingPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExtendedDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ExtendedDatabaseBlobAuditingPoliciesClient { return ExtendedDatabaseBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/extendedserverblobauditingpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/extendedserverblobauditingpolicies.go index 1d8245d7a1a7..9dbd15204013 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/extendedserverblobauditingpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/extendedserverblobauditingpolicies.go @@ -39,7 +39,8 @@ func NewExtendedServerBlobAuditingPoliciesClient(subscriptionID string) Extended } // NewExtendedServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the -// ExtendedServerBlobAuditingPoliciesClient client. +// ExtendedServerBlobAuditingPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExtendedServerBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ExtendedServerBlobAuditingPoliciesClient { return ExtendedServerBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go index ea286e1e6aff..62cbc1c9a8ee 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/failovergroups.go @@ -38,7 +38,8 @@ func NewFailoverGroupsClient(subscriptionID string) FailoverGroupsClient { return NewFailoverGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFailoverGroupsClientWithBaseURI creates an instance of the FailoverGroupsClient client. +// NewFailoverGroupsClientWithBaseURI creates an instance of the FailoverGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFailoverGroupsClientWithBaseURI(baseURI string, subscriptionID string) FailoverGroupsClient { return FailoverGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/firewallrules.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/firewallrules.go index daa8a1f832c7..7d80bda73e1d 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/firewallrules.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/firewallrules.go @@ -38,7 +38,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/geobackuppolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/geobackuppolicies.go index 28e35d715a1b..9c0118335e54 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/geobackuppolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/geobackuppolicies.go @@ -38,7 +38,9 @@ func NewGeoBackupPoliciesClient(subscriptionID string) GeoBackupPoliciesClient { return NewGeoBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client. +// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGeoBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) GeoBackupPoliciesClient { return GeoBackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go index ee60e7d85f2e..912a207472e4 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobagents.go @@ -38,7 +38,8 @@ func NewJobAgentsClient(subscriptionID string) JobAgentsClient { return NewJobAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobAgentsClientWithBaseURI creates an instance of the JobAgentsClient client. +// NewJobAgentsClientWithBaseURI creates an instance of the JobAgentsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobAgentsClientWithBaseURI(baseURI string, subscriptionID string) JobAgentsClient { return JobAgentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go index 684e3d528af6..a8ce2efc4979 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobcredentials.go @@ -38,7 +38,8 @@ func NewJobCredentialsClient(subscriptionID string) JobCredentialsClient { return NewJobCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCredentialsClientWithBaseURI creates an instance of the JobCredentialsClient client. +// NewJobCredentialsClientWithBaseURI creates an instance of the JobCredentialsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobCredentialsClientWithBaseURI(baseURI string, subscriptionID string) JobCredentialsClient { return JobCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go index eb0535c6f24a..8f19405b686d 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobexecutions.go @@ -39,7 +39,8 @@ func NewJobExecutionsClient(subscriptionID string) JobExecutionsClient { return NewJobExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobExecutionsClientWithBaseURI creates an instance of the JobExecutionsClient client. +// NewJobExecutionsClientWithBaseURI creates an instance of the JobExecutionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobExecutionsClient { return JobExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go index 2112eef5585f..9e8d9d9298d0 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobs.go @@ -37,7 +37,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go index 1e12c6aa765c..d488e2718e31 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobstepexecutions.go @@ -39,7 +39,9 @@ func NewJobStepExecutionsClient(subscriptionID string) JobStepExecutionsClient { return NewJobStepExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStepExecutionsClientWithBaseURI creates an instance of the JobStepExecutionsClient client. +// NewJobStepExecutionsClientWithBaseURI creates an instance of the JobStepExecutionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewJobStepExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobStepExecutionsClient { return JobStepExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go index 15abd56ff2fe..98f9a8d5e252 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobsteps.go @@ -38,7 +38,8 @@ func NewJobStepsClient(subscriptionID string) JobStepsClient { return NewJobStepsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStepsClientWithBaseURI creates an instance of the JobStepsClient client. +// NewJobStepsClientWithBaseURI creates an instance of the JobStepsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobStepsClientWithBaseURI(baseURI string, subscriptionID string) JobStepsClient { return JobStepsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go index 726a66db0835..1b5c7e8e95fa 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetexecutions.go @@ -39,7 +39,9 @@ func NewJobTargetExecutionsClient(subscriptionID string) JobTargetExecutionsClie return NewJobTargetExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobTargetExecutionsClientWithBaseURI creates an instance of the JobTargetExecutionsClient client. +// NewJobTargetExecutionsClientWithBaseURI creates an instance of the JobTargetExecutionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewJobTargetExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobTargetExecutionsClient { return JobTargetExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go index 662b16e9dfb3..3e53d6ed2663 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobtargetgroups.go @@ -38,7 +38,8 @@ func NewJobTargetGroupsClient(subscriptionID string) JobTargetGroupsClient { return NewJobTargetGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobTargetGroupsClientWithBaseURI creates an instance of the JobTargetGroupsClient client. +// NewJobTargetGroupsClientWithBaseURI creates an instance of the JobTargetGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobTargetGroupsClientWithBaseURI(baseURI string, subscriptionID string) JobTargetGroupsClient { return JobTargetGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go index 9b81112ab2a0..03043db426dc 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/jobversions.go @@ -37,7 +37,8 @@ func NewJobVersionsClient(subscriptionID string) JobVersionsClient { return NewJobVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobVersionsClientWithBaseURI creates an instance of the JobVersionsClient client. +// NewJobVersionsClientWithBaseURI creates an instance of the JobVersionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobVersionsClientWithBaseURI(baseURI string, subscriptionID string) JobVersionsClient { return JobVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/managedbackupshorttermretentionpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/managedbackupshorttermretentionpolicies.go index dec37cea9ef0..2a3960558010 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/managedbackupshorttermretentionpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/managedbackupshorttermretentionpolicies.go @@ -39,7 +39,8 @@ func NewManagedBackupShortTermRetentionPoliciesClient(subscriptionID string) Man } // NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI creates an instance of the -// ManagedBackupShortTermRetentionPoliciesClient client. +// ManagedBackupShortTermRetentionPoliciesClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagedBackupShortTermRetentionPoliciesClient { return ManagedBackupShortTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go index 89418cc07632..b29b60531f08 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/manageddatabases.go @@ -39,7 +39,9 @@ func NewManagedDatabasesClient(subscriptionID string) ManagedDatabasesClient { return NewManagedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedDatabasesClientWithBaseURI creates an instance of the ManagedDatabasesClient client. +// NewManagedDatabasesClientWithBaseURI creates an instance of the ManagedDatabasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabasesClient { return ManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go index abf17916beb0..ac8811583b86 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go @@ -39,7 +39,8 @@ func NewManagedInstanceAdministratorsClient(subscriptionID string) ManagedInstan } // NewManagedInstanceAdministratorsClientWithBaseURI creates an instance of the ManagedInstanceAdministratorsClient -// 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 NewManagedInstanceAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceAdministratorsClient { return ManagedInstanceAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go index ffdde71d15ef..37ad04ec7ef9 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstances.go @@ -38,7 +38,9 @@ func NewManagedInstancesClient(subscriptionID string) ManagedInstancesClient { return NewManagedInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client. +// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedInstancesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstancesClient { return ManagedInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go index 651614bc4e39..51d48577a512 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go @@ -1010,6 +1010,27 @@ func PossibleSecurityAlertPolicyUseServerDefaultValues() []SecurityAlertPolicyUs return []SecurityAlertPolicyUseServerDefault{SecurityAlertPolicyUseServerDefaultDisabled, SecurityAlertPolicyUseServerDefaultEnabled} } +// 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 @@ -10846,6 +10867,8 @@ type SensitivityLabelProperties struct { 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"` } // Server an Azure SQL Database server. diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/operations.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/operations.go index bd0657225fde..a23318d8d8b4 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/operations.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/recoverabledatabases.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/recoverabledatabases.go index bfa9b2425b97..d900e5223ef5 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/recoverabledatabases.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/recoverabledatabases.go @@ -37,7 +37,9 @@ func NewRecoverableDatabasesClient(subscriptionID string) RecoverableDatabasesCl return NewRecoverableDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client. +// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRecoverableDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RecoverableDatabasesClient { return RecoverableDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go index 4122dbff6cef..c810a1a2db59 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/replicationlinks.go @@ -37,7 +37,9 @@ func NewReplicationLinksClient(subscriptionID string) ReplicationLinksClient { return NewReplicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client. +// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ReplicationLinksClient { return ReplicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppeddatabases.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppeddatabases.go index ee9433fcd23a..9916f42cfd6d 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppeddatabases.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppeddatabases.go @@ -37,7 +37,9 @@ func NewRestorableDroppedDatabasesClient(subscriptionID string) RestorableDroppe return NewRestorableDroppedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client. +// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewRestorableDroppedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedDatabasesClient { return RestorableDroppedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppedmanageddatabases.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppedmanageddatabases.go index b9bd15b1a36b..10498c314f10 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppedmanageddatabases.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/restorabledroppedmanageddatabases.go @@ -39,7 +39,8 @@ func NewRestorableDroppedManagedDatabasesClient(subscriptionID string) Restorabl } // NewRestorableDroppedManagedDatabasesClientWithBaseURI creates an instance of the -// RestorableDroppedManagedDatabasesClient client. +// RestorableDroppedManagedDatabasesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRestorableDroppedManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedManagedDatabasesClient { return RestorableDroppedManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go index 8ae3d7ba5caf..a3a3ce863fd8 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/restorepoints.go @@ -38,7 +38,8 @@ func NewRestorePointsClient(subscriptionID string) RestorePointsClient { return NewRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestorePointsClientWithBaseURI creates an instance of the RestorePointsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/sensitivitylabels.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/sensitivitylabels.go index a267ca01c530..f8c02ca0bf26 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/sensitivitylabels.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/sensitivitylabels.go @@ -37,7 +37,9 @@ func NewSensitivityLabelsClient(subscriptionID string) SensitivityLabelsClient { return NewSensitivityLabelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSensitivityLabelsClientWithBaseURI creates an instance of the SensitivityLabelsClient client. +// NewSensitivityLabelsClientWithBaseURI creates an instance of the SensitivityLabelsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) SensitivityLabelsClient { return SensitivityLabelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverautomatictuning.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverautomatictuning.go index 00e40cce10dd..1d5ec39718a6 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverautomatictuning.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverautomatictuning.go @@ -37,7 +37,9 @@ func NewServerAutomaticTuningClient(subscriptionID string) ServerAutomaticTuning return NewServerAutomaticTuningClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAutomaticTuningClientWithBaseURI creates an instance of the ServerAutomaticTuningClient client. +// NewServerAutomaticTuningClientWithBaseURI creates an instance of the ServerAutomaticTuningClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewServerAutomaticTuningClientWithBaseURI(baseURI string, subscriptionID string) ServerAutomaticTuningClient { return ServerAutomaticTuningClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go index 8f68bc664109..62b81a3b9412 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverazureadadministrators.go @@ -38,7 +38,9 @@ func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAd return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client. +// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverblobauditingpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverblobauditingpolicies.go index 48d2fde5ed0d..92c013234551 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverblobauditingpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverblobauditingpolicies.go @@ -37,7 +37,9 @@ func NewServerBlobAuditingPoliciesClient(subscriptionID string) ServerBlobAuditi return NewServerBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the ServerBlobAuditingPoliciesClient client. +// NewServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the ServerBlobAuditingPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerBlobAuditingPoliciesClient { return ServerBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go index 8c89241fa93f..7e91bbed9296 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/servercommunicationlinks.go @@ -38,7 +38,9 @@ func NewServerCommunicationLinksClient(subscriptionID string) ServerCommunicatio return NewServerCommunicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client. +// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerCommunicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServerCommunicationLinksClient { return ServerCommunicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverconnectionpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverconnectionpolicies.go index 281669c15993..dae81775e782 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverconnectionpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverconnectionpolicies.go @@ -37,7 +37,9 @@ func NewServerConnectionPoliciesClient(subscriptionID string) ServerConnectionPo return NewServerConnectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client. +// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerConnectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerConnectionPoliciesClient { return ServerConnectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go index 51074322a772..2c9a38959a27 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverdnsaliases.go @@ -37,7 +37,9 @@ func NewServerDNSAliasesClient(subscriptionID string) ServerDNSAliasesClient { return NewServerDNSAliasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerDNSAliasesClientWithBaseURI creates an instance of the ServerDNSAliasesClient client. +// NewServerDNSAliasesClientWithBaseURI creates an instance of the ServerDNSAliasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServerDNSAliasesClientWithBaseURI(baseURI string, subscriptionID string) ServerDNSAliasesClient { return ServerDNSAliasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go index 9e9e38abbe15..7d82b1c150a1 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverkeys.go @@ -37,7 +37,8 @@ func NewServerKeysClient(subscriptionID string) ServerKeysClient { return NewServerKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerKeysClientWithBaseURI creates an instance of the ServerKeysClient client. +// NewServerKeysClientWithBaseURI creates an instance of the ServerKeysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerKeysClientWithBaseURI(baseURI string, subscriptionID string) ServerKeysClient { return ServerKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go index 388a123d7685..7f91eefcf153 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/servers.go @@ -38,7 +38,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serversecurityalertpolicies.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serversecurityalertpolicies.go index 89d98348b85a..8da5e466569e 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serversecurityalertpolicies.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serversecurityalertpolicies.go @@ -37,7 +37,9 @@ func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityA return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client. +// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverusages.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverusages.go index 65f3fd8d5b43..7175e98a49b9 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serverusages.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serverusages.go @@ -37,7 +37,8 @@ func NewServerUsagesClient(subscriptionID string) ServerUsagesClient { return NewServerUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client. +// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerUsagesClientWithBaseURI(baseURI string, subscriptionID string) ServerUsagesClient { return ServerUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/serviceobjectives.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/serviceobjectives.go index 971180b812c7..e61e6e009f18 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/serviceobjectives.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/serviceobjectives.go @@ -37,7 +37,9 @@ func NewServiceObjectivesClient(subscriptionID string) ServiceObjectivesClient { return NewServiceObjectivesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client. +// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceObjectivesClientWithBaseURI(baseURI string, subscriptionID string) ServiceObjectivesClient { return ServiceObjectivesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/servicetieradvisors.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/servicetieradvisors.go index 8fc1f2d7ae8a..a13cd33d4476 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/servicetieradvisors.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/servicetieradvisors.go @@ -37,7 +37,9 @@ func NewServiceTierAdvisorsClient(subscriptionID string) ServiceTierAdvisorsClie return NewServiceTierAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client. +// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceTierAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTierAdvisorsClient { return ServiceTierAdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/sqlapi/interfaces.go index d604ea456065..6b3628be8be0 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/sqlapi/interfaces.go @@ -73,7 +73,9 @@ type ServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.Server, err error) List(ctx context.Context) (result sql.ServerListResultPage, err error) + ListComplete(ctx context.Context) (result sql.ServerListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.ServerListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.ServerListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerUpdate) (result sql.ServersUpdateFuture, err error) } @@ -269,6 +271,7 @@ type EncryptionProtectorsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.EncryptionProtector) (result sql.EncryptionProtectorsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtector, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorListResultIterator, err error) Revalidate(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorsRevalidateFuture, err error) } @@ -282,6 +285,7 @@ type FailoverGroupsClientAPI interface { ForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result sql.FailoverGroupsForceFailoverAllowDataLossFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result sql.FailoverGroup, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.FailoverGroupListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.FailoverGroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters sql.FailoverGroupUpdate) (result sql.FailoverGroupsUpdateFuture, err error) } @@ -293,7 +297,9 @@ type ManagedInstancesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstancesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstance, err error) List(ctx context.Context) (result sql.ManagedInstanceListResultPage, err error) + ListComplete(ctx context.Context) (result sql.ManagedInstanceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.ManagedInstanceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.ManagedInstanceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedInstanceUpdate) (result sql.ManagedInstancesUpdateFuture, err error) } @@ -302,6 +308,7 @@ var _ ManagedInstancesClientAPI = (*sql.ManagedInstancesClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result sql.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result sql.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*sql.OperationsClient)(nil) @@ -312,6 +319,7 @@ type ServerKeysClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, keyName string) (result sql.ServerKeysDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, keyName string) (result sql.ServerKey, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerKeyListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerKeyListResultIterator, err error) } var _ ServerKeysClientAPI = (*sql.ServerKeysClient)(nil) @@ -323,7 +331,9 @@ type SyncAgentsClientAPI interface { GenerateKey(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentKeyProperties, err error) Get(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgent, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.SyncAgentListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.SyncAgentListResultIterator, err error) ListLinkedDatabases(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentLinkedDatabaseListResultPage, err error) + ListLinkedDatabasesComplete(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentLinkedDatabaseListResultIterator, err error) } var _ SyncAgentsClientAPI = (*sql.SyncAgentsClient)(nil) @@ -335,9 +345,13 @@ type SyncGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroup, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultIterator, err error) ListHubSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) + ListHubSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) ListLogs(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultPage, err error) + ListLogsComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultIterator, err error) ListSyncDatabaseIds(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultPage, err error) + ListSyncDatabaseIdsComplete(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultIterator, err error) RefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsRefreshHubSchemaFuture, err error) TriggerSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters sql.SyncGroup) (result sql.SyncGroupsUpdateFuture, err error) @@ -351,7 +365,9 @@ type SyncMembersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMember, err error) ListBySyncGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultPage, err error) + ListBySyncGroupComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultIterator, err error) ListMemberSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) + ListMemberSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) RefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersRefreshMemberSchemaFuture, err error) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters sql.SyncMember) (result sql.SyncMembersUpdateFuture, err error) } @@ -362,6 +378,7 @@ var _ SyncMembersClientAPI = (*sql.SyncMembersClient)(nil) type SubscriptionUsagesClientAPI interface { Get(ctx context.Context, locationName string, usageName string) (result sql.SubscriptionUsage, err error) ListByLocation(ctx context.Context, locationName string) (result sql.SubscriptionUsageListResultPage, err error) + ListByLocationComplete(ctx context.Context, locationName string) (result sql.SubscriptionUsageListResultIterator, err error) } var _ SubscriptionUsagesClientAPI = (*sql.SubscriptionUsagesClient)(nil) @@ -371,7 +388,9 @@ type VirtualClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualClusterName string) (result sql.VirtualClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualClusterName string) (result sql.VirtualCluster, err error) List(ctx context.Context) (result sql.VirtualClusterListResultPage, err error) + ListComplete(ctx context.Context) (result sql.VirtualClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.VirtualClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.VirtualClusterListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters sql.VirtualClusterUpdate) (result sql.VirtualClustersUpdateFuture, err error) } @@ -398,6 +417,7 @@ type ServerBlobAuditingPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerBlobAuditingPolicy) (result sql.ServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerBlobAuditingPolicy, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerBlobAuditingPolicyListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerBlobAuditingPolicyListResultIterator, err error) } var _ ServerBlobAuditingPoliciesClientAPI = (*sql.ServerBlobAuditingPoliciesClient)(nil) @@ -407,6 +427,7 @@ type DatabaseBlobAuditingPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.DatabaseBlobAuditingPolicy) (result sql.DatabaseBlobAuditingPolicy, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicyListResultIterator, err error) } var _ DatabaseBlobAuditingPoliciesClientAPI = (*sql.DatabaseBlobAuditingPoliciesClient)(nil) @@ -426,6 +447,7 @@ type DatabaseVulnerabilityAssessmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseVulnerabilityAssessment, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseVulnerabilityAssessmentListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseVulnerabilityAssessmentListResultIterator, err error) } var _ DatabaseVulnerabilityAssessmentsClientAPI = (*sql.DatabaseVulnerabilityAssessmentsClient)(nil) @@ -436,6 +458,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result sql.VirtualNetworkRulesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result sql.VirtualNetworkRule, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.VirtualNetworkRuleListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.VirtualNetworkRuleListResultIterator, err error) } var _ VirtualNetworkRulesClientAPI = (*sql.VirtualNetworkRulesClient)(nil) @@ -444,6 +467,7 @@ var _ VirtualNetworkRulesClientAPI = (*sql.VirtualNetworkRulesClient)(nil) type DatabaseOperationsClientAPI interface { Cancel(ctx context.Context, resourceGroupName string, serverName string, databaseName string, operationID uuid.UUID) (result autorest.Response, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseOperationListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseOperationListResultIterator, err error) } var _ DatabaseOperationsClientAPI = (*sql.DatabaseOperationsClient)(nil) @@ -461,6 +485,7 @@ type JobAgentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobAgentsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobAgent, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.JobAgentListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.JobAgentListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters sql.JobAgentUpdate) (result sql.JobAgentsUpdateFuture, err error) } @@ -472,6 +497,7 @@ type JobCredentialsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (result sql.JobCredential, err error) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobCredentialListResultPage, err error) + ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobCredentialListResultIterator, err error) } var _ JobCredentialsClientAPI = (*sql.JobCredentialsClient)(nil) @@ -483,7 +509,9 @@ type JobExecutionsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result sql.JobExecutionsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result sql.JobExecution, err error) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) } var _ JobExecutionsClientAPI = (*sql.JobExecutionsClient)(nil) @@ -494,6 +522,7 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.Job, err error) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobListResultPage, err error) + ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobListResultIterator, err error) } var _ JobsClientAPI = (*sql.JobsClient)(nil) @@ -502,6 +531,7 @@ var _ JobsClientAPI = (*sql.JobsClient)(nil) type JobStepExecutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string) (result sql.JobExecution, err error) ListByJobExecution(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByJobExecutionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) } var _ JobStepExecutionsClientAPI = (*sql.JobStepExecutionsClient)(nil) @@ -513,7 +543,9 @@ type JobStepsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (result sql.JobStep, err error) GetByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string) (result sql.JobStep, err error) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.JobStepListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.JobStepListResultIterator, err error) ListByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result sql.JobStepListResultPage, err error) + ListByVersionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result sql.JobStepListResultIterator, err error) } var _ JobStepsClientAPI = (*sql.JobStepsClient)(nil) @@ -522,7 +554,9 @@ var _ JobStepsClientAPI = (*sql.JobStepsClient)(nil) type JobTargetExecutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, targetID uuid.UUID) (result sql.JobExecution, err error) ListByJobExecution(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByJobExecutionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) ListByStep(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByStepComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) } var _ JobTargetExecutionsClientAPI = (*sql.JobTargetExecutionsClient)(nil) @@ -533,6 +567,7 @@ type JobTargetGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (result sql.JobTargetGroup, err error) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobTargetGroupListResultPage, err error) + ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobTargetGroupListResultIterator, err error) } var _ JobTargetGroupsClientAPI = (*sql.JobTargetGroupsClient)(nil) @@ -541,6 +576,7 @@ var _ JobTargetGroupsClientAPI = (*sql.JobTargetGroupsClient)(nil) type JobVersionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result sql.JobVersion, err error) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.JobVersionListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.JobVersionListResultIterator, err error) } var _ JobVersionsClientAPI = (*sql.JobVersionsClient)(nil) @@ -550,6 +586,7 @@ type ManagedBackupShortTermRetentionPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.ManagedBackupShortTermRetentionPolicy) (result sql.ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedBackupShortTermRetentionPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedBackupShortTermRetentionPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedBackupShortTermRetentionPolicyListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.ManagedBackupShortTermRetentionPolicy) (result sql.ManagedBackupShortTermRetentionPoliciesUpdateFuture, err error) } @@ -562,6 +599,7 @@ type ManagedDatabasesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabasesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabase, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedDatabaseListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedDatabaseListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.ManagedDatabaseUpdate) (result sql.ManagedDatabasesUpdateFuture, err error) } @@ -575,7 +613,9 @@ type SensitivityLabelsClientAPI interface { EnableRecommendation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource sql.SensitivityLabelSource) (result sql.SensitivityLabel, err error) ListCurrentByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result sql.SensitivityLabelListResultPage, err error) + ListCurrentByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result sql.SensitivityLabelListResultIterator, err error) ListRecommendedByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result sql.SensitivityLabelListResultPage, err error) + ListRecommendedByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result sql.SensitivityLabelListResultIterator, err error) } var _ SensitivityLabelsClientAPI = (*sql.SensitivityLabelsClient)(nil) @@ -586,6 +626,7 @@ type ManagedInstanceAdministratorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministratorsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministrator, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministratorListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministratorListResultIterator, err error) } var _ ManagedInstanceAdministratorsClientAPI = (*sql.ManagedInstanceAdministratorsClient)(nil) @@ -605,6 +646,7 @@ type ServerDNSAliasesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (result sql.ServerDNSAliasesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (result sql.ServerDNSAlias, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerDNSAliasListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerDNSAliasListResultIterator, err error) } var _ ServerDNSAliasesClientAPI = (*sql.ServerDNSAliasesClient)(nil) @@ -614,6 +656,7 @@ type ServerSecurityAlertPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerSecurityAlertPolicy) (result sql.ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerSecurityAlertPolicy, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.LogicalServerSecurityAlertPolicyListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.LogicalServerSecurityAlertPolicyListResultIterator, err error) } var _ ServerSecurityAlertPoliciesClientAPI = (*sql.ServerSecurityAlertPoliciesClient)(nil) @@ -622,6 +665,7 @@ var _ ServerSecurityAlertPoliciesClientAPI = (*sql.ServerSecurityAlertPoliciesCl type RestorableDroppedManagedDatabasesClientAPI interface { Get(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string) (result sql.RestorableDroppedManagedDatabase, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.RestorableDroppedManagedDatabaseListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.RestorableDroppedManagedDatabaseListResultIterator, err error) } var _ RestorableDroppedManagedDatabasesClientAPI = (*sql.RestorableDroppedManagedDatabasesClient)(nil) diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/subscriptionusages.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/subscriptionusages.go index 05a7a1840a7a..41fecbf44921 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/subscriptionusages.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/subscriptionusages.go @@ -37,7 +37,9 @@ func NewSubscriptionUsagesClient(subscriptionID string) SubscriptionUsagesClient return NewSubscriptionUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionUsagesClientWithBaseURI creates an instance of the SubscriptionUsagesClient client. +// NewSubscriptionUsagesClientWithBaseURI creates an instance of the SubscriptionUsagesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSubscriptionUsagesClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionUsagesClient { return SubscriptionUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go index 83d69dca7838..e9fdec8d491e 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/syncagents.go @@ -37,7 +37,8 @@ func NewSyncAgentsClient(subscriptionID string) SyncAgentsClient { return NewSyncAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncAgentsClientWithBaseURI creates an instance of the SyncAgentsClient client. +// NewSyncAgentsClientWithBaseURI creates an instance of the SyncAgentsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncAgentsClientWithBaseURI(baseURI string, subscriptionID string) SyncAgentsClient { return SyncAgentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go index f16c28c30198..028160474fd6 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/syncgroups.go @@ -37,7 +37,8 @@ func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client. +// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go index 3bf30d6226c7..bbbfb3ff45ee 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/syncmembers.go @@ -37,7 +37,8 @@ func NewSyncMembersClient(subscriptionID string) SyncMembersClient { return NewSyncMembersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncMembersClientWithBaseURI creates an instance of the SyncMembersClient client. +// NewSyncMembersClientWithBaseURI creates an instance of the SyncMembersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncMembersClientWithBaseURI(baseURI string, subscriptionID string) SyncMembersClient { return SyncMembersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptionactivities.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptionactivities.go index 2c8c003fc3b7..e9602baf8ad9 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptionactivities.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptionactivities.go @@ -39,7 +39,8 @@ func NewTransparentDataEncryptionActivitiesClient(subscriptionID string) Transpa } // NewTransparentDataEncryptionActivitiesClientWithBaseURI creates an instance of the -// TransparentDataEncryptionActivitiesClient client. +// TransparentDataEncryptionActivitiesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransparentDataEncryptionActivitiesClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionActivitiesClient { return TransparentDataEncryptionActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptions.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptions.go index 7ea3bdf24a6e..e293d89b6926 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptions.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/transparentdataencryptions.go @@ -37,7 +37,9 @@ func NewTransparentDataEncryptionsClient(subscriptionID string) TransparentDataE return NewTransparentDataEncryptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client. +// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewTransparentDataEncryptionsClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionsClient { return TransparentDataEncryptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualclusters.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualclusters.go index ffea75716e96..d05656d80762 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualclusters.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualclusters.go @@ -37,7 +37,8 @@ func NewVirtualClustersClient(subscriptionID string) VirtualClustersClient { return NewVirtualClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualClustersClientWithBaseURI creates an instance of the VirtualClustersClient client. +// NewVirtualClustersClientWithBaseURI creates an instance of the VirtualClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualClustersClientWithBaseURI(baseURI string, subscriptionID string) VirtualClustersClient { return VirtualClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go index 492473c92165..752cb9e7aab8 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/virtualnetworkrules.go @@ -38,7 +38,9 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/backupshorttermretentionpolicies.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/backupshorttermretentionpolicies.go index 1ac1fa8642cd..2571c204e6c0 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/backupshorttermretentionpolicies.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/backupshorttermretentionpolicies.go @@ -38,7 +38,8 @@ func NewBackupShortTermRetentionPoliciesClient(subscriptionID string) BackupShor } // NewBackupShortTermRetentionPoliciesClientWithBaseURI creates an instance of the -// BackupShortTermRetentionPoliciesClient client. +// BackupShortTermRetentionPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupShortTermRetentionPoliciesClient { return BackupShortTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/capabilities.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/capabilities.go index 964106affd24..d3a5dd127174 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/capabilities.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/capabilities.go @@ -37,7 +37,8 @@ func NewCapabilitiesClient(subscriptionID string) CapabilitiesClient { return NewCapabilitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client. +// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) CapabilitiesClient { return CapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/client.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/client.go index e912a0c72d6b..d2080b5de5cf 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/client.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/databaseoperations.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/databaseoperations.go index c7d3384f8718..da6fd68c6eba 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/databaseoperations.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/databaseoperations.go @@ -38,7 +38,9 @@ func NewDatabaseOperationsClient(subscriptionID string) DatabaseOperationsClient return NewDatabaseOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseOperationsClientWithBaseURI creates an instance of the DatabaseOperationsClient client. +// NewDatabaseOperationsClientWithBaseURI creates an instance of the DatabaseOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDatabaseOperationsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseOperationsClient { return DatabaseOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/databases.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/databases.go index 63aa8f48fae8..05118432cbdd 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/databases.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/databasevulnerabilityassessmentscans.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/databasevulnerabilityassessmentscans.go index c373cd98d049..ecaf6595bc18 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/databasevulnerabilityassessmentscans.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/databasevulnerabilityassessmentscans.go @@ -39,7 +39,8 @@ func NewDatabaseVulnerabilityAssessmentScansClient(subscriptionID string) Databa } // NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI creates an instance of the -// DatabaseVulnerabilityAssessmentScansClient client. +// DatabaseVulnerabilityAssessmentScansClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentScansClient { return DatabaseVulnerabilityAssessmentScansClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpooloperations.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpooloperations.go index c1decafe82ff..35ad09217228 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpooloperations.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpooloperations.go @@ -38,7 +38,9 @@ func NewElasticPoolOperationsClient(subscriptionID string) ElasticPoolOperations return NewElasticPoolOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolOperationsClientWithBaseURI creates an instance of the ElasticPoolOperationsClient client. +// NewElasticPoolOperationsClientWithBaseURI creates an instance of the ElasticPoolOperationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewElasticPoolOperationsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolOperationsClient { return ElasticPoolOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpools.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpools.go index 89704e8be608..4c0891950a45 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpools.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/elasticpools.go @@ -38,7 +38,8 @@ func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client. +// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/instancefailovergroups.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/instancefailovergroups.go index aa0e99af9af5..aab655b0d69f 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/instancefailovergroups.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/instancefailovergroups.go @@ -38,7 +38,9 @@ func NewInstanceFailoverGroupsClient(subscriptionID string) InstanceFailoverGrou return NewInstanceFailoverGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInstanceFailoverGroupsClientWithBaseURI creates an instance of the InstanceFailoverGroupsClient client. +// NewInstanceFailoverGroupsClientWithBaseURI creates an instance of the InstanceFailoverGroupsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewInstanceFailoverGroupsClientWithBaseURI(baseURI string, subscriptionID string) InstanceFailoverGroupsClient { return InstanceFailoverGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessmentrulebaselines.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessmentrulebaselines.go index 1cb0954cae8a..573895309fcc 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessmentrulebaselines.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessmentrulebaselines.go @@ -40,7 +40,8 @@ func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID } // NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI creates an instance of the -// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient client. +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient client using a custom endpoint. Use this when interacting +// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient { return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessments.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessments.go index 404c29a8c123..229a9b0fb8bc 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessments.go @@ -39,7 +39,8 @@ func NewManagedDatabaseVulnerabilityAssessmentsClient(subscriptionID string) Man } // NewManagedDatabaseVulnerabilityAssessmentsClientWithBaseURI creates an instance of the -// ManagedDatabaseVulnerabilityAssessmentsClient client. +// ManagedDatabaseVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseVulnerabilityAssessmentsClient { return ManagedDatabaseVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessmentscans.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessmentscans.go index 029bf35400a3..e4856dc47f19 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessmentscans.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/manageddatabasevulnerabilityassessmentscans.go @@ -39,7 +39,8 @@ func NewManagedDatabaseVulnerabilityAssessmentScansClient(subscriptionID string) } // NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI creates an instance of the -// ManagedDatabaseVulnerabilityAssessmentScansClient client. +// ManagedDatabaseVulnerabilityAssessmentScansClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseVulnerabilityAssessmentScansClient { return ManagedDatabaseVulnerabilityAssessmentScansClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstanceencryptionprotectors.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstanceencryptionprotectors.go index 4f0f12f184f1..70ec2b8e956e 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstanceencryptionprotectors.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstanceencryptionprotectors.go @@ -39,7 +39,8 @@ func NewManagedInstanceEncryptionProtectorsClient(subscriptionID string) Managed } // NewManagedInstanceEncryptionProtectorsClientWithBaseURI creates an instance of the -// ManagedInstanceEncryptionProtectorsClient client. +// ManagedInstanceEncryptionProtectorsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedInstanceEncryptionProtectorsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceEncryptionProtectorsClient { return ManagedInstanceEncryptionProtectorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstancekeys.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstancekeys.go index 479e108d62a3..cbdc5556a1a4 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstancekeys.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstancekeys.go @@ -37,7 +37,9 @@ func NewManagedInstanceKeysClient(subscriptionID string) ManagedInstanceKeysClie return NewManagedInstanceKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedInstanceKeysClientWithBaseURI creates an instance of the ManagedInstanceKeysClient client. +// NewManagedInstanceKeysClientWithBaseURI creates an instance of the ManagedInstanceKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedInstanceKeysClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceKeysClient { return ManagedInstanceKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstancetdecertificates.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstancetdecertificates.go index 90e474de06a2..b11d4ca0c3a4 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstancetdecertificates.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/managedinstancetdecertificates.go @@ -39,7 +39,8 @@ func NewManagedInstanceTdeCertificatesClient(subscriptionID string) ManagedInsta } // NewManagedInstanceTdeCertificatesClientWithBaseURI creates an instance of the ManagedInstanceTdeCertificatesClient -// 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 NewManagedInstanceTdeCertificatesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceTdeCertificatesClient { return ManagedInstanceTdeCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/recoverablemanageddatabases.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/recoverablemanageddatabases.go index 8a2200979761..2db981e8dfb0 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/recoverablemanageddatabases.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/recoverablemanageddatabases.go @@ -37,7 +37,9 @@ func NewRecoverableManagedDatabasesClient(subscriptionID string) RecoverableMana return NewRecoverableManagedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoverableManagedDatabasesClientWithBaseURI creates an instance of the RecoverableManagedDatabasesClient client. +// NewRecoverableManagedDatabasesClientWithBaseURI creates an instance of the RecoverableManagedDatabasesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewRecoverableManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RecoverableManagedDatabasesClient { return RecoverableManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/sqlapi/interfaces.go index 9b696e175f46..2c6ea1c3a0ac 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/sqlapi/interfaces.go @@ -28,6 +28,7 @@ import ( type DatabaseOperationsClientAPI interface { Cancel(ctx context.Context, resourceGroupName string, serverName string, databaseName string, operationID uuid.UUID) (result autorest.Response, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseOperationListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseOperationListResultIterator, err error) } var _ DatabaseOperationsClientAPI = (*sql.DatabaseOperationsClient)(nil) @@ -36,6 +37,7 @@ var _ DatabaseOperationsClientAPI = (*sql.DatabaseOperationsClient)(nil) type ElasticPoolOperationsClientAPI interface { Cancel(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, operationID uuid.UUID) (result autorest.Response, err error) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.ElasticPoolOperationListResultPage, err error) + ListByElasticPoolComplete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.ElasticPoolOperationListResultIterator, err error) } var _ ElasticPoolOperationsClientAPI = (*sql.ElasticPoolOperationsClient)(nil) @@ -46,6 +48,7 @@ type DatabaseVulnerabilityAssessmentScansClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (result sql.VulnerabilityAssessmentScanRecord, err error) InitiateScan(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (result sql.DatabaseVulnerabilityAssessmentScansInitiateScanFuture, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.VulnerabilityAssessmentScanRecordListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.VulnerabilityAssessmentScanRecordListResultIterator, err error) } var _ DatabaseVulnerabilityAssessmentScansClientAPI = (*sql.DatabaseVulnerabilityAssessmentScansClient)(nil) @@ -65,6 +68,7 @@ type ManagedDatabaseVulnerabilityAssessmentScansClientAPI interface { Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, scanID string) (result sql.VulnerabilityAssessmentScanRecord, err error) InitiateScan(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, scanID string) (result sql.ManagedDatabaseVulnerabilityAssessmentScansInitiateScanFuture, err error) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.VulnerabilityAssessmentScanRecordListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.VulnerabilityAssessmentScanRecordListResultIterator, err error) } var _ ManagedDatabaseVulnerabilityAssessmentScansClientAPI = (*sql.ManagedDatabaseVulnerabilityAssessmentScansClient)(nil) @@ -75,6 +79,7 @@ type ManagedDatabaseVulnerabilityAssessmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.DatabaseVulnerabilityAssessment, err error) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.DatabaseVulnerabilityAssessmentListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.DatabaseVulnerabilityAssessmentListResultIterator, err error) } var _ ManagedDatabaseVulnerabilityAssessmentsClientAPI = (*sql.ManagedDatabaseVulnerabilityAssessmentsClient)(nil) @@ -92,7 +97,9 @@ type DatabasesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabasesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.Database, err error) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.DatabaseListResultPage, err error) + ListByElasticPoolComplete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.DatabaseListResultIterator, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.DatabaseListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.DatabaseListResultIterator, err error) Pause(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabasesPauseFuture, err error) Rename(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.ResourceMoveDefinition) (result autorest.Response, err error) Resume(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabasesResumeFuture, err error) @@ -108,6 +115,7 @@ type ElasticPoolsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.ElasticPoolsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.ElasticPool, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string, skip *int32) (result sql.ElasticPoolListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, skip *int32) (result sql.ElasticPoolListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters sql.ElasticPoolUpdate) (result sql.ElasticPoolsUpdateFuture, err error) } @@ -121,6 +129,7 @@ type InstanceFailoverGroupsClientAPI interface { ForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string) (result sql.InstanceFailoverGroupsForceFailoverAllowDataLossFuture, err error) Get(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string) (result sql.InstanceFailoverGroup, err error) ListByLocation(ctx context.Context, resourceGroupName string, locationName string) (result sql.InstanceFailoverGroupListResultPage, err error) + ListByLocationComplete(ctx context.Context, resourceGroupName string, locationName string) (result sql.InstanceFailoverGroupListResultIterator, err error) } var _ InstanceFailoverGroupsClientAPI = (*sql.InstanceFailoverGroupsClient)(nil) @@ -130,6 +139,7 @@ type BackupShortTermRetentionPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.BackupShortTermRetentionPolicy) (result sql.BackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.BackupShortTermRetentionPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.BackupShortTermRetentionPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.BackupShortTermRetentionPolicyListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.BackupShortTermRetentionPolicy) (result sql.BackupShortTermRetentionPoliciesUpdateFuture, err error) } @@ -155,6 +165,7 @@ type ManagedInstanceKeysClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string) (result sql.ManagedInstanceKeysDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string) (result sql.ManagedInstanceKey, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string, filter string) (result sql.ManagedInstanceKeyListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, filter string) (result sql.ManagedInstanceKeyListResultIterator, err error) } var _ ManagedInstanceKeysClientAPI = (*sql.ManagedInstanceKeysClient)(nil) @@ -164,6 +175,7 @@ type ManagedInstanceEncryptionProtectorsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedInstanceEncryptionProtector) (result sql.ManagedInstanceEncryptionProtectorsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceEncryptionProtector, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceEncryptionProtectorListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceEncryptionProtectorListResultIterator, err error) Revalidate(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceEncryptionProtectorsRevalidateFuture, err error) } @@ -173,6 +185,7 @@ var _ ManagedInstanceEncryptionProtectorsClientAPI = (*sql.ManagedInstanceEncryp type RecoverableManagedDatabasesClientAPI interface { Get(ctx context.Context, resourceGroupName string, managedInstanceName string, recoverableDatabaseName string) (result sql.RecoverableManagedDatabase, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.RecoverableManagedDatabaseListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.RecoverableManagedDatabaseListResultIterator, err error) } var _ RecoverableManagedDatabasesClientAPI = (*sql.RecoverableManagedDatabasesClient)(nil) diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/tdecertificates.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/tdecertificates.go index 0b0d20cbae93..99079e1d61a4 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/tdecertificates.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/tdecertificates.go @@ -38,7 +38,8 @@ func NewTdeCertificatesClient(subscriptionID string) TdeCertificatesClient { return NewTdeCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTdeCertificatesClientWithBaseURI creates an instance of the TdeCertificatesClient client. +// NewTdeCertificatesClientWithBaseURI creates an instance of the TdeCertificatesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTdeCertificatesClientWithBaseURI(baseURI string, subscriptionID string) TdeCertificatesClient { return TdeCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/client.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/client.go index f394454f7f5d..65a81a72ae94 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/client.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go index 6e99278108ed..80be40b6f330 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/databases.go @@ -37,7 +37,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/databasesecurityalertpolicies.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/databasesecurityalertpolicies.go index 03008139fd77..e6b704540f41 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/databasesecurityalertpolicies.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/databasesecurityalertpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseSecurityAlertPoliciesClient(subscriptionID string) DatabaseSecur } // NewDatabaseSecurityAlertPoliciesClientWithBaseURI creates an instance of the DatabaseSecurityAlertPoliciesClient -// 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 NewDatabaseSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseSecurityAlertPoliciesClient { return DatabaseSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/elasticpools.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/elasticpools.go index 6ff36ef5de7e..c78b67442476 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/elasticpools.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/elasticpools.go @@ -37,7 +37,8 @@ func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client. +// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/instancepools.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/instancepools.go index 5e6cddb41eec..c0b1a99a5a2e 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/instancepools.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/instancepools.go @@ -38,7 +38,8 @@ func NewInstancePoolsClient(subscriptionID string) InstancePoolsClient { return NewInstancePoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInstancePoolsClientWithBaseURI creates an instance of the InstancePoolsClient client. +// NewInstancePoolsClientWithBaseURI creates an instance of the InstancePoolsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInstancePoolsClientWithBaseURI(baseURI string, subscriptionID string) InstancePoolsClient { return InstancePoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabaserestoredetails.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabaserestoredetails.go index 727b63bb9028..ae1721400c1f 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabaserestoredetails.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabaserestoredetails.go @@ -38,7 +38,8 @@ func NewManagedDatabaseRestoreDetailsClient(subscriptionID string) ManagedDataba } // NewManagedDatabaseRestoreDetailsClientWithBaseURI creates an instance of the ManagedDatabaseRestoreDetailsClient -// 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 NewManagedDatabaseRestoreDetailsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseRestoreDetailsClient { return ManagedDatabaseRestoreDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabases.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabases.go index 76430e3bd4dc..51cd4e9ee001 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabases.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabases.go @@ -38,7 +38,9 @@ func NewManagedDatabasesClient(subscriptionID string) ManagedDatabasesClient { return NewManagedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedDatabasesClientWithBaseURI creates an instance of the ManagedDatabasesClient client. +// NewManagedDatabasesClientWithBaseURI creates an instance of the ManagedDatabasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabasesClient { return ManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabasesensitivitylabels.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabasesensitivitylabels.go index 657a41c92c88..f5578a2be247 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabasesensitivitylabels.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/manageddatabasesensitivitylabels.go @@ -38,7 +38,8 @@ func NewManagedDatabaseSensitivityLabelsClient(subscriptionID string) ManagedDat } // NewManagedDatabaseSensitivityLabelsClientWithBaseURI creates an instance of the -// ManagedDatabaseSensitivityLabelsClient client. +// ManagedDatabaseSensitivityLabelsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseSensitivityLabelsClient { return ManagedDatabaseSensitivityLabelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go index 36385f858806..c4dfe9ad5038 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go @@ -37,7 +37,9 @@ func NewManagedInstanceOperationsClient(subscriptionID string) ManagedInstanceOp return NewManagedInstanceOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedInstanceOperationsClientWithBaseURI creates an instance of the ManagedInstanceOperationsClient client. +// NewManagedInstanceOperationsClientWithBaseURI creates an instance of the ManagedInstanceOperationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewManagedInstanceOperationsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceOperationsClient { return ManagedInstanceOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstances.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstances.go index 3fa203132a2c..b2177ae091bf 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstances.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstances.go @@ -38,7 +38,9 @@ func NewManagedInstancesClient(subscriptionID string) ManagedInstancesClient { return NewManagedInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client. +// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedInstancesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstancesClient { return ManagedInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancevulnerabilityassessments.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancevulnerabilityassessments.go index 240ad4f3d491..75d0a54b3562 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstancevulnerabilityassessments.go @@ -40,7 +40,8 @@ func NewManagedInstanceVulnerabilityAssessmentsClient(subscriptionID string) Man } // NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI creates an instance of the -// ManagedInstanceVulnerabilityAssessmentsClient client. +// ManagedInstanceVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceVulnerabilityAssessmentsClient { return ManagedInstanceVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go index 5df7559689a6..6b9fd1914b99 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go @@ -221,6 +221,27 @@ func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState { return []SecurityAlertPolicyState{SecurityAlertPolicyStateDisabled, SecurityAlertPolicyStateEnabled, SecurityAlertPolicyStateNew} } +// SensitivityLabelRank enumerates the values for sensitivity label rank. +type SensitivityLabelRank string + +const ( + // Critical ... + Critical SensitivityLabelRank = "Critical" + // High ... + High SensitivityLabelRank = "High" + // Low ... + Low SensitivityLabelRank = "Low" + // Medium ... + Medium SensitivityLabelRank = "Medium" + // None ... + None SensitivityLabelRank = "None" +) + +// PossibleSensitivityLabelRankValues returns an array of possible values for the SensitivityLabelRank const type. +func PossibleSensitivityLabelRankValues() []SensitivityLabelRank { + return []SensitivityLabelRank{Critical, High, Low, Medium, None} +} + // SensitivityLabelSource enumerates the values for sensitivity label source. type SensitivityLabelSource string @@ -3111,6 +3132,8 @@ type SensitivityLabelProperties struct { 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: 'None', 'Low', 'Medium', 'High', 'Critical' + Rank SensitivityLabelRank `json:"rank,omitempty"` } // ServerAzureADAdministrator azure Active Directory administrator. diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/privateendpointconnections.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/privateendpointconnections.go index 1113d763dd5f..1342e646d541 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/privateendpointconnections.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/privateendpointconnections.go @@ -38,7 +38,9 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointC return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go index 86bac5697df3..b6b30c96d92d 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go @@ -38,7 +38,9 @@ func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAd return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client. +// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/servervulnerabilityassessments.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/servervulnerabilityassessments.go index 9496d7ee7833..8bc7e622d5e3 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/servervulnerabilityassessments.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/servervulnerabilityassessments.go @@ -39,7 +39,8 @@ func NewServerVulnerabilityAssessmentsClient(subscriptionID string) ServerVulner } // NewServerVulnerabilityAssessmentsClientWithBaseURI creates an instance of the ServerVulnerabilityAssessmentsClient -// 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 NewServerVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) ServerVulnerabilityAssessmentsClient { return ServerVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go index 75484c3546bf..a3d00451ee61 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go @@ -28,6 +28,7 @@ type DatabaseSecurityAlertPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.DatabaseSecurityAlertPolicy) (result sql.DatabaseSecurityAlertPolicy, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseSecurityAlertPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseSecurityAlertListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseSecurityAlertListResultIterator, err error) } var _ DatabaseSecurityAlertPoliciesClientAPI = (*sql.DatabaseSecurityAlertPoliciesClient)(nil) @@ -40,7 +41,9 @@ type ManagedDatabaseSensitivityLabelsClientAPI interface { EnableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource sql.SensitivityLabelSource) (result sql.SensitivityLabel, err error) ListCurrentByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, filter string) (result sql.SensitivityLabelListResultPage, err error) + ListCurrentByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, filter string) (result sql.SensitivityLabelListResultIterator, err error) ListRecommendedByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result sql.SensitivityLabelListResultPage, err error) + ListRecommendedByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result sql.SensitivityLabelListResultIterator, err error) } var _ ManagedDatabaseSensitivityLabelsClientAPI = (*sql.ManagedDatabaseSensitivityLabelsClient)(nil) @@ -51,6 +54,7 @@ type ManagedInstanceVulnerabilityAssessmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceVulnerabilityAssessment, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceVulnerabilityAssessmentListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceVulnerabilityAssessmentListResultIterator, err error) } var _ ManagedInstanceVulnerabilityAssessmentsClientAPI = (*sql.ManagedInstanceVulnerabilityAssessmentsClient)(nil) @@ -58,6 +62,7 @@ var _ ManagedInstanceVulnerabilityAssessmentsClientAPI = (*sql.ManagedInstanceVu // ManagedInstanceOperationsClientAPI contains the set of methods on the ManagedInstanceOperationsClient type. type ManagedInstanceOperationsClientAPI interface { ListByManagedInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceOperationListResultPage, err error) + ListByManagedInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceOperationListResultIterator, err error) } var _ ManagedInstanceOperationsClientAPI = (*sql.ManagedInstanceOperationsClient)(nil) @@ -68,6 +73,7 @@ type ServerVulnerabilityAssessmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerVulnerabilityAssessment, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerVulnerabilityAssessmentListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerVulnerabilityAssessmentListResultIterator, err error) } var _ ServerVulnerabilityAssessmentsClientAPI = (*sql.ServerVulnerabilityAssessmentsClient)(nil) @@ -78,7 +84,9 @@ type InstancePoolsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, instancePoolName string) (result sql.InstancePoolsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, instancePoolName string) (result sql.InstancePool, err error) List(ctx context.Context) (result sql.InstancePoolListResultPage, err error) + ListComplete(ctx context.Context) (result sql.InstancePoolListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.InstancePoolListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.InstancePoolListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, instancePoolName string, parameters sql.InstancePoolUpdate) (result sql.InstancePoolsUpdateFuture, err error) } @@ -87,6 +95,7 @@ var _ InstancePoolsClientAPI = (*sql.InstancePoolsClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { ListByInstancePool(ctx context.Context, resourceGroupName string, instancePoolName string, expandChildren *bool) (result sql.UsageListResultPage, err error) + ListByInstancePoolComplete(ctx context.Context, resourceGroupName string, instancePoolName string, expandChildren *bool) (result sql.UsageListResultIterator, err error) } var _ UsagesClientAPI = (*sql.UsagesClient)(nil) @@ -97,8 +106,11 @@ type ManagedInstancesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstancesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstance, err error) List(ctx context.Context) (result sql.ManagedInstanceListResultPage, err error) + ListComplete(ctx context.Context) (result sql.ManagedInstanceListResultIterator, err error) ListByInstancePool(ctx context.Context, resourceGroupName string, instancePoolName string) (result sql.ManagedInstanceListResultPage, err error) + ListByInstancePoolComplete(ctx context.Context, resourceGroupName string, instancePoolName string) (result sql.ManagedInstanceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.ManagedInstanceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.ManagedInstanceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedInstanceUpdate) (result sql.ManagedInstancesUpdateFuture, err error) } @@ -118,6 +130,7 @@ type ManagedDatabasesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabasesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabase, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedDatabaseListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedDatabaseListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.ManagedDatabaseUpdate) (result sql.ManagedDatabasesUpdateFuture, err error) } @@ -143,6 +156,7 @@ type PrivateEndpointConnectionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result sql.PrivateEndpointConnectionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result sql.PrivateEndpointConnection, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.PrivateEndpointConnectionListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.PrivateEndpointConnectionListResultIterator, err error) } var _ PrivateEndpointConnectionsClientAPI = (*sql.PrivateEndpointConnectionsClient)(nil) @@ -153,6 +167,7 @@ type ServerAzureADAdministratorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministratorsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministrator, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.AdministratorListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.AdministratorListResultIterator, err error) } var _ ServerAzureADAdministratorsClientAPI = (*sql.ServerAzureADAdministratorsClient)(nil) diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/usages.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/usages.go index 86f2d3b92500..d11b978910e8 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/usages.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/usages.go @@ -37,7 +37,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/backuplongtermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/backuplongtermretentionpolicies.go index d8a96b77ac01..fa12452097e9 100644 --- a/services/preview/sql/mgmt/v3.0/sql/backuplongtermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/backuplongtermretentionpolicies.go @@ -38,7 +38,8 @@ func NewBackupLongTermRetentionPoliciesClient(subscriptionID string) BackupLongT } // NewBackupLongTermRetentionPoliciesClientWithBaseURI creates an instance of the BackupLongTermRetentionPoliciesClient -// 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 NewBackupLongTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionPoliciesClient { return BackupLongTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/backupshorttermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/backupshorttermretentionpolicies.go index 1ac1fa8642cd..2571c204e6c0 100644 --- a/services/preview/sql/mgmt/v3.0/sql/backupshorttermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/backupshorttermretentionpolicies.go @@ -38,7 +38,8 @@ func NewBackupShortTermRetentionPoliciesClient(subscriptionID string) BackupShor } // NewBackupShortTermRetentionPoliciesClientWithBaseURI creates an instance of the -// BackupShortTermRetentionPoliciesClient client. +// BackupShortTermRetentionPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupShortTermRetentionPoliciesClient { return BackupShortTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/capabilities.go b/services/preview/sql/mgmt/v3.0/sql/capabilities.go index 18f2ca74ed1f..45a89a6ece01 100644 --- a/services/preview/sql/mgmt/v3.0/sql/capabilities.go +++ b/services/preview/sql/mgmt/v3.0/sql/capabilities.go @@ -37,7 +37,8 @@ func NewCapabilitiesClient(subscriptionID string) CapabilitiesClient { return NewCapabilitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client. +// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) CapabilitiesClient { return CapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/client.go b/services/preview/sql/mgmt/v3.0/sql/client.go index 40ec57b36bab..06af8e714eca 100644 --- a/services/preview/sql/mgmt/v3.0/sql/client.go +++ b/services/preview/sql/mgmt/v3.0/sql/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/sql/mgmt/v3.0/sql/databaseautomatictuning.go b/services/preview/sql/mgmt/v3.0/sql/databaseautomatictuning.go index 2b7edb2d0e14..e3edd2c05525 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databaseautomatictuning.go +++ b/services/preview/sql/mgmt/v3.0/sql/databaseautomatictuning.go @@ -37,7 +37,9 @@ func NewDatabaseAutomaticTuningClient(subscriptionID string) DatabaseAutomaticTu return NewDatabaseAutomaticTuningClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseAutomaticTuningClientWithBaseURI creates an instance of the DatabaseAutomaticTuningClient client. +// NewDatabaseAutomaticTuningClientWithBaseURI creates an instance of the DatabaseAutomaticTuningClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDatabaseAutomaticTuningClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAutomaticTuningClient { return DatabaseAutomaticTuningClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/databaseblobauditingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/databaseblobauditingpolicies.go index 8e61953bbeae..97fb47ea18ff 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databaseblobauditingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/databaseblobauditingpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseBlobAuditingPoliciesClient(subscriptionID string) DatabaseBlobAu } // NewDatabaseBlobAuditingPoliciesClientWithBaseURI creates an instance of the DatabaseBlobAuditingPoliciesClient -// 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 NewDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseBlobAuditingPoliciesClient { return DatabaseBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/databaseoperations.go b/services/preview/sql/mgmt/v3.0/sql/databaseoperations.go index c7d3384f8718..da6fd68c6eba 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databaseoperations.go +++ b/services/preview/sql/mgmt/v3.0/sql/databaseoperations.go @@ -38,7 +38,9 @@ func NewDatabaseOperationsClient(subscriptionID string) DatabaseOperationsClient return NewDatabaseOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseOperationsClientWithBaseURI creates an instance of the DatabaseOperationsClient client. +// NewDatabaseOperationsClientWithBaseURI creates an instance of the DatabaseOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDatabaseOperationsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseOperationsClient { return DatabaseOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/databases.go b/services/preview/sql/mgmt/v3.0/sql/databases.go index 48bee2fb3190..7e18947a96a8 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databases.go +++ b/services/preview/sql/mgmt/v3.0/sql/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/databasethreatdetectionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/databasethreatdetectionpolicies.go index 9c858036755f..ca44eccd7da2 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databasethreatdetectionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/databasethreatdetectionpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseThreatDetectionPoliciesClient(subscriptionID string) DatabaseThr } // NewDatabaseThreatDetectionPoliciesClientWithBaseURI creates an instance of the DatabaseThreatDetectionPoliciesClient -// 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 NewDatabaseThreatDetectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseThreatDetectionPoliciesClient { return DatabaseThreatDetectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/databaseusages.go b/services/preview/sql/mgmt/v3.0/sql/databaseusages.go index 45f0a1e730a4..d3601a4bfdc9 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databaseusages.go +++ b/services/preview/sql/mgmt/v3.0/sql/databaseusages.go @@ -37,7 +37,8 @@ func NewDatabaseUsagesClient(subscriptionID string) DatabaseUsagesClient { return NewDatabaseUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client. +// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseUsagesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseUsagesClient { return DatabaseUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentrulebaselines.go b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentrulebaselines.go index c4de2c1ee8e8..473577af45b2 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentrulebaselines.go +++ b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentrulebaselines.go @@ -40,7 +40,8 @@ func NewDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string } // NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI creates an instance of the -// DatabaseVulnerabilityAssessmentRuleBaselinesClient client. +// DatabaseVulnerabilityAssessmentRuleBaselinesClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentRuleBaselinesClient { return DatabaseVulnerabilityAssessmentRuleBaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessments.go b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessments.go index e953704645ce..80fa889069b7 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessments.go @@ -38,7 +38,8 @@ func NewDatabaseVulnerabilityAssessmentsClient(subscriptionID string) DatabaseVu } // NewDatabaseVulnerabilityAssessmentsClientWithBaseURI creates an instance of the -// DatabaseVulnerabilityAssessmentsClient client. +// DatabaseVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentsClient { return DatabaseVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentscans.go b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentscans.go index c373cd98d049..ecaf6595bc18 100644 --- a/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentscans.go +++ b/services/preview/sql/mgmt/v3.0/sql/databasevulnerabilityassessmentscans.go @@ -39,7 +39,8 @@ func NewDatabaseVulnerabilityAssessmentScansClient(subscriptionID string) Databa } // NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI creates an instance of the -// DatabaseVulnerabilityAssessmentScansClient client. +// DatabaseVulnerabilityAssessmentScansClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(baseURI string, subscriptionID string) DatabaseVulnerabilityAssessmentScansClient { return DatabaseVulnerabilityAssessmentScansClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/datamaskingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/datamaskingpolicies.go index 65303d3d345a..51c2a48ad0f0 100644 --- a/services/preview/sql/mgmt/v3.0/sql/datamaskingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/datamaskingpolicies.go @@ -37,7 +37,9 @@ func NewDataMaskingPoliciesClient(subscriptionID string) DataMaskingPoliciesClie return NewDataMaskingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataMaskingPoliciesClientWithBaseURI creates an instance of the DataMaskingPoliciesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/datamaskingrules.go b/services/preview/sql/mgmt/v3.0/sql/datamaskingrules.go index d7a6ff263792..8472a5ff846d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/datamaskingrules.go +++ b/services/preview/sql/mgmt/v3.0/sql/datamaskingrules.go @@ -38,7 +38,9 @@ func NewDataMaskingRulesClient(subscriptionID string) DataMaskingRulesClient { return NewDataMaskingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataMaskingRulesClientWithBaseURI creates an instance of the DataMaskingRulesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/elasticpoolactivities.go b/services/preview/sql/mgmt/v3.0/sql/elasticpoolactivities.go index 94df73d2fff9..268b2ee5c392 100644 --- a/services/preview/sql/mgmt/v3.0/sql/elasticpoolactivities.go +++ b/services/preview/sql/mgmt/v3.0/sql/elasticpoolactivities.go @@ -37,7 +37,9 @@ func NewElasticPoolActivitiesClient(subscriptionID string) ElasticPoolActivities return NewElasticPoolActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client. +// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewElasticPoolActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolActivitiesClient { return ElasticPoolActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/elasticpooldatabaseactivities.go b/services/preview/sql/mgmt/v3.0/sql/elasticpooldatabaseactivities.go index dd0e955db87f..70e005ff32d2 100644 --- a/services/preview/sql/mgmt/v3.0/sql/elasticpooldatabaseactivities.go +++ b/services/preview/sql/mgmt/v3.0/sql/elasticpooldatabaseactivities.go @@ -38,7 +38,8 @@ func NewElasticPoolDatabaseActivitiesClient(subscriptionID string) ElasticPoolDa } // NewElasticPoolDatabaseActivitiesClientWithBaseURI creates an instance of the ElasticPoolDatabaseActivitiesClient -// 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 NewElasticPoolDatabaseActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolDatabaseActivitiesClient { return ElasticPoolDatabaseActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/elasticpooloperations.go b/services/preview/sql/mgmt/v3.0/sql/elasticpooloperations.go index c1decafe82ff..35ad09217228 100644 --- a/services/preview/sql/mgmt/v3.0/sql/elasticpooloperations.go +++ b/services/preview/sql/mgmt/v3.0/sql/elasticpooloperations.go @@ -38,7 +38,9 @@ func NewElasticPoolOperationsClient(subscriptionID string) ElasticPoolOperations return NewElasticPoolOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolOperationsClientWithBaseURI creates an instance of the ElasticPoolOperationsClient client. +// NewElasticPoolOperationsClientWithBaseURI creates an instance of the ElasticPoolOperationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewElasticPoolOperationsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolOperationsClient { return ElasticPoolOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/elasticpools.go b/services/preview/sql/mgmt/v3.0/sql/elasticpools.go index 6504d43ea8af..140e7bb1d246 100644 --- a/services/preview/sql/mgmt/v3.0/sql/elasticpools.go +++ b/services/preview/sql/mgmt/v3.0/sql/elasticpools.go @@ -38,7 +38,8 @@ func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client. +// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/encryptionprotectors.go b/services/preview/sql/mgmt/v3.0/sql/encryptionprotectors.go index 4bf6cc3947ab..ba987a7746f4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/encryptionprotectors.go +++ b/services/preview/sql/mgmt/v3.0/sql/encryptionprotectors.go @@ -37,7 +37,9 @@ func NewEncryptionProtectorsClient(subscriptionID string) EncryptionProtectorsCl return NewEncryptionProtectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEncryptionProtectorsClientWithBaseURI creates an instance of the EncryptionProtectorsClient client. +// NewEncryptionProtectorsClientWithBaseURI creates an instance of the EncryptionProtectorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewEncryptionProtectorsClientWithBaseURI(baseURI string, subscriptionID string) EncryptionProtectorsClient { return EncryptionProtectorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/extendeddatabaseblobauditingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/extendeddatabaseblobauditingpolicies.go index 7c174fe2ad37..d33f275fa4a4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/extendeddatabaseblobauditingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/extendeddatabaseblobauditingpolicies.go @@ -39,7 +39,8 @@ func NewExtendedDatabaseBlobAuditingPoliciesClient(subscriptionID string) Extend } // NewExtendedDatabaseBlobAuditingPoliciesClientWithBaseURI creates an instance of the -// ExtendedDatabaseBlobAuditingPoliciesClient client. +// ExtendedDatabaseBlobAuditingPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExtendedDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ExtendedDatabaseBlobAuditingPoliciesClient { return ExtendedDatabaseBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/extendedserverblobauditingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/extendedserverblobauditingpolicies.go index 1d8245d7a1a7..9dbd15204013 100644 --- a/services/preview/sql/mgmt/v3.0/sql/extendedserverblobauditingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/extendedserverblobauditingpolicies.go @@ -39,7 +39,8 @@ func NewExtendedServerBlobAuditingPoliciesClient(subscriptionID string) Extended } // NewExtendedServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the -// ExtendedServerBlobAuditingPoliciesClient client. +// ExtendedServerBlobAuditingPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExtendedServerBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ExtendedServerBlobAuditingPoliciesClient { return ExtendedServerBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/failovergroups.go b/services/preview/sql/mgmt/v3.0/sql/failovergroups.go index ea286e1e6aff..62cbc1c9a8ee 100644 --- a/services/preview/sql/mgmt/v3.0/sql/failovergroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/failovergroups.go @@ -38,7 +38,8 @@ func NewFailoverGroupsClient(subscriptionID string) FailoverGroupsClient { return NewFailoverGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFailoverGroupsClientWithBaseURI creates an instance of the FailoverGroupsClient client. +// NewFailoverGroupsClientWithBaseURI creates an instance of the FailoverGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFailoverGroupsClientWithBaseURI(baseURI string, subscriptionID string) FailoverGroupsClient { return FailoverGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/firewallrules.go b/services/preview/sql/mgmt/v3.0/sql/firewallrules.go index daa8a1f832c7..7d80bda73e1d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/firewallrules.go +++ b/services/preview/sql/mgmt/v3.0/sql/firewallrules.go @@ -38,7 +38,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/geobackuppolicies.go b/services/preview/sql/mgmt/v3.0/sql/geobackuppolicies.go index 28e35d715a1b..9c0118335e54 100644 --- a/services/preview/sql/mgmt/v3.0/sql/geobackuppolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/geobackuppolicies.go @@ -38,7 +38,9 @@ func NewGeoBackupPoliciesClient(subscriptionID string) GeoBackupPoliciesClient { return NewGeoBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client. +// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGeoBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) GeoBackupPoliciesClient { return GeoBackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/instancefailovergroups.go b/services/preview/sql/mgmt/v3.0/sql/instancefailovergroups.go index aa0e99af9af5..aab655b0d69f 100644 --- a/services/preview/sql/mgmt/v3.0/sql/instancefailovergroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/instancefailovergroups.go @@ -38,7 +38,9 @@ func NewInstanceFailoverGroupsClient(subscriptionID string) InstanceFailoverGrou return NewInstanceFailoverGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInstanceFailoverGroupsClientWithBaseURI creates an instance of the InstanceFailoverGroupsClient client. +// NewInstanceFailoverGroupsClientWithBaseURI creates an instance of the InstanceFailoverGroupsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewInstanceFailoverGroupsClientWithBaseURI(baseURI string, subscriptionID string) InstanceFailoverGroupsClient { return InstanceFailoverGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/instancepools.go b/services/preview/sql/mgmt/v3.0/sql/instancepools.go index 5e6cddb41eec..c0b1a99a5a2e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/instancepools.go +++ b/services/preview/sql/mgmt/v3.0/sql/instancepools.go @@ -38,7 +38,8 @@ func NewInstancePoolsClient(subscriptionID string) InstancePoolsClient { return NewInstancePoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInstancePoolsClientWithBaseURI creates an instance of the InstancePoolsClient client. +// NewInstancePoolsClientWithBaseURI creates an instance of the InstancePoolsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInstancePoolsClientWithBaseURI(baseURI string, subscriptionID string) InstancePoolsClient { return InstancePoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobagents.go b/services/preview/sql/mgmt/v3.0/sql/jobagents.go index ee60e7d85f2e..912a207472e4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobagents.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobagents.go @@ -38,7 +38,8 @@ func NewJobAgentsClient(subscriptionID string) JobAgentsClient { return NewJobAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobAgentsClientWithBaseURI creates an instance of the JobAgentsClient client. +// NewJobAgentsClientWithBaseURI creates an instance of the JobAgentsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobAgentsClientWithBaseURI(baseURI string, subscriptionID string) JobAgentsClient { return JobAgentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobcredentials.go b/services/preview/sql/mgmt/v3.0/sql/jobcredentials.go index 684e3d528af6..a8ce2efc4979 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobcredentials.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobcredentials.go @@ -38,7 +38,8 @@ func NewJobCredentialsClient(subscriptionID string) JobCredentialsClient { return NewJobCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCredentialsClientWithBaseURI creates an instance of the JobCredentialsClient client. +// NewJobCredentialsClientWithBaseURI creates an instance of the JobCredentialsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobCredentialsClientWithBaseURI(baseURI string, subscriptionID string) JobCredentialsClient { return JobCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobexecutions.go b/services/preview/sql/mgmt/v3.0/sql/jobexecutions.go index eb0535c6f24a..8f19405b686d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobexecutions.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobexecutions.go @@ -39,7 +39,8 @@ func NewJobExecutionsClient(subscriptionID string) JobExecutionsClient { return NewJobExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobExecutionsClientWithBaseURI creates an instance of the JobExecutionsClient client. +// NewJobExecutionsClientWithBaseURI creates an instance of the JobExecutionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobExecutionsClient { return JobExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobs.go b/services/preview/sql/mgmt/v3.0/sql/jobs.go index 2112eef5585f..9e8d9d9298d0 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobs.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobs.go @@ -37,7 +37,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobstepexecutions.go b/services/preview/sql/mgmt/v3.0/sql/jobstepexecutions.go index 1e12c6aa765c..d488e2718e31 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobstepexecutions.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobstepexecutions.go @@ -39,7 +39,9 @@ func NewJobStepExecutionsClient(subscriptionID string) JobStepExecutionsClient { return NewJobStepExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStepExecutionsClientWithBaseURI creates an instance of the JobStepExecutionsClient client. +// NewJobStepExecutionsClientWithBaseURI creates an instance of the JobStepExecutionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewJobStepExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobStepExecutionsClient { return JobStepExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobsteps.go b/services/preview/sql/mgmt/v3.0/sql/jobsteps.go index 15abd56ff2fe..98f9a8d5e252 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobsteps.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobsteps.go @@ -38,7 +38,8 @@ func NewJobStepsClient(subscriptionID string) JobStepsClient { return NewJobStepsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStepsClientWithBaseURI creates an instance of the JobStepsClient client. +// NewJobStepsClientWithBaseURI creates an instance of the JobStepsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobStepsClientWithBaseURI(baseURI string, subscriptionID string) JobStepsClient { return JobStepsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobtargetexecutions.go b/services/preview/sql/mgmt/v3.0/sql/jobtargetexecutions.go index 726a66db0835..1b5c7e8e95fa 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobtargetexecutions.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobtargetexecutions.go @@ -39,7 +39,9 @@ func NewJobTargetExecutionsClient(subscriptionID string) JobTargetExecutionsClie return NewJobTargetExecutionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobTargetExecutionsClientWithBaseURI creates an instance of the JobTargetExecutionsClient client. +// NewJobTargetExecutionsClientWithBaseURI creates an instance of the JobTargetExecutionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewJobTargetExecutionsClientWithBaseURI(baseURI string, subscriptionID string) JobTargetExecutionsClient { return JobTargetExecutionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobtargetgroups.go b/services/preview/sql/mgmt/v3.0/sql/jobtargetgroups.go index 662b16e9dfb3..3e53d6ed2663 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobtargetgroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobtargetgroups.go @@ -38,7 +38,8 @@ func NewJobTargetGroupsClient(subscriptionID string) JobTargetGroupsClient { return NewJobTargetGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobTargetGroupsClientWithBaseURI creates an instance of the JobTargetGroupsClient client. +// NewJobTargetGroupsClientWithBaseURI creates an instance of the JobTargetGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobTargetGroupsClientWithBaseURI(baseURI string, subscriptionID string) JobTargetGroupsClient { return JobTargetGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/jobversions.go b/services/preview/sql/mgmt/v3.0/sql/jobversions.go index 9b81112ab2a0..03043db426dc 100644 --- a/services/preview/sql/mgmt/v3.0/sql/jobversions.go +++ b/services/preview/sql/mgmt/v3.0/sql/jobversions.go @@ -37,7 +37,8 @@ func NewJobVersionsClient(subscriptionID string) JobVersionsClient { return NewJobVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobVersionsClientWithBaseURI creates an instance of the JobVersionsClient client. +// NewJobVersionsClientWithBaseURI creates an instance of the JobVersionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobVersionsClientWithBaseURI(baseURI string, subscriptionID string) JobVersionsClient { return JobVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/longtermretentionbackups.go b/services/preview/sql/mgmt/v3.0/sql/longtermretentionbackups.go index bdd82ec29414..938b18bab080 100644 --- a/services/preview/sql/mgmt/v3.0/sql/longtermretentionbackups.go +++ b/services/preview/sql/mgmt/v3.0/sql/longtermretentionbackups.go @@ -37,7 +37,9 @@ func NewLongTermRetentionBackupsClient(subscriptionID string) LongTermRetentionB return NewLongTermRetentionBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLongTermRetentionBackupsClientWithBaseURI creates an instance of the LongTermRetentionBackupsClient client. +// NewLongTermRetentionBackupsClientWithBaseURI creates an instance of the LongTermRetentionBackupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewLongTermRetentionBackupsClientWithBaseURI(baseURI string, subscriptionID string) LongTermRetentionBackupsClient { return LongTermRetentionBackupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedbackupshorttermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/managedbackupshorttermretentionpolicies.go index dec37cea9ef0..2a3960558010 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedbackupshorttermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedbackupshorttermretentionpolicies.go @@ -39,7 +39,8 @@ func NewManagedBackupShortTermRetentionPoliciesClient(subscriptionID string) Man } // NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI creates an instance of the -// ManagedBackupShortTermRetentionPoliciesClient client. +// ManagedBackupShortTermRetentionPoliciesClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagedBackupShortTermRetentionPoliciesClient { return ManagedBackupShortTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabaserestoredetails.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabaserestoredetails.go index 727b63bb9028..ae1721400c1f 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabaserestoredetails.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabaserestoredetails.go @@ -38,7 +38,8 @@ func NewManagedDatabaseRestoreDetailsClient(subscriptionID string) ManagedDataba } // NewManagedDatabaseRestoreDetailsClientWithBaseURI creates an instance of the ManagedDatabaseRestoreDetailsClient -// 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 NewManagedDatabaseRestoreDetailsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseRestoreDetailsClient { return ManagedDatabaseRestoreDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabases.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabases.go index 76430e3bd4dc..51cd4e9ee001 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabases.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabases.go @@ -38,7 +38,9 @@ func NewManagedDatabasesClient(subscriptionID string) ManagedDatabasesClient { return NewManagedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedDatabasesClientWithBaseURI creates an instance of the ManagedDatabasesClient client. +// NewManagedDatabasesClientWithBaseURI creates an instance of the ManagedDatabasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabasesClient { return ManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasesecurityalertpolicies.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasesecurityalertpolicies.go index 8fc35a56c94f..8eb20488ed5d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasesecurityalertpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasesecurityalertpolicies.go @@ -39,7 +39,8 @@ func NewManagedDatabaseSecurityAlertPoliciesClient(subscriptionID string) Manage } // NewManagedDatabaseSecurityAlertPoliciesClientWithBaseURI creates an instance of the -// ManagedDatabaseSecurityAlertPoliciesClient client. +// ManagedDatabaseSecurityAlertPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseSecurityAlertPoliciesClient { return ManagedDatabaseSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasesensitivitylabels.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasesensitivitylabels.go index 657a41c92c88..f5578a2be247 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasesensitivitylabels.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasesensitivitylabels.go @@ -38,7 +38,8 @@ func NewManagedDatabaseSensitivityLabelsClient(subscriptionID string) ManagedDat } // NewManagedDatabaseSensitivityLabelsClientWithBaseURI creates an instance of the -// ManagedDatabaseSensitivityLabelsClient client. +// ManagedDatabaseSensitivityLabelsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseSensitivityLabelsClient { return ManagedDatabaseSensitivityLabelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentrulebaselines.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentrulebaselines.go index 1cb0954cae8a..573895309fcc 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentrulebaselines.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentrulebaselines.go @@ -40,7 +40,8 @@ func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID } // NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI creates an instance of the -// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient client. +// ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient client using a custom endpoint. Use this when interacting +// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient { return ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessments.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessments.go index 404c29a8c123..229a9b0fb8bc 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessments.go @@ -39,7 +39,8 @@ func NewManagedDatabaseVulnerabilityAssessmentsClient(subscriptionID string) Man } // NewManagedDatabaseVulnerabilityAssessmentsClientWithBaseURI creates an instance of the -// ManagedDatabaseVulnerabilityAssessmentsClient client. +// ManagedDatabaseVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseVulnerabilityAssessmentsClient { return ManagedDatabaseVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentscans.go b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentscans.go index 029bf35400a3..e4856dc47f19 100644 --- a/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentscans.go +++ b/services/preview/sql/mgmt/v3.0/sql/manageddatabasevulnerabilityassessmentscans.go @@ -39,7 +39,8 @@ func NewManagedDatabaseVulnerabilityAssessmentScansClient(subscriptionID string) } // NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI creates an instance of the -// ManagedDatabaseVulnerabilityAssessmentScansClient client. +// ManagedDatabaseVulnerabilityAssessmentScansClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI(baseURI string, subscriptionID string) ManagedDatabaseVulnerabilityAssessmentScansClient { return ManagedDatabaseVulnerabilityAssessmentScansClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstanceadministrators.go b/services/preview/sql/mgmt/v3.0/sql/managedinstanceadministrators.go index abf17916beb0..ac8811583b86 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstanceadministrators.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstanceadministrators.go @@ -39,7 +39,8 @@ func NewManagedInstanceAdministratorsClient(subscriptionID string) ManagedInstan } // NewManagedInstanceAdministratorsClientWithBaseURI creates an instance of the ManagedInstanceAdministratorsClient -// 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 NewManagedInstanceAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceAdministratorsClient { return ManagedInstanceAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstanceencryptionprotectors.go b/services/preview/sql/mgmt/v3.0/sql/managedinstanceencryptionprotectors.go index 4f0f12f184f1..70ec2b8e956e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstanceencryptionprotectors.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstanceencryptionprotectors.go @@ -39,7 +39,8 @@ func NewManagedInstanceEncryptionProtectorsClient(subscriptionID string) Managed } // NewManagedInstanceEncryptionProtectorsClientWithBaseURI creates an instance of the -// ManagedInstanceEncryptionProtectorsClient client. +// ManagedInstanceEncryptionProtectorsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedInstanceEncryptionProtectorsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceEncryptionProtectorsClient { return ManagedInstanceEncryptionProtectorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstancekeys.go b/services/preview/sql/mgmt/v3.0/sql/managedinstancekeys.go index 479e108d62a3..cbdc5556a1a4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstancekeys.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstancekeys.go @@ -37,7 +37,9 @@ func NewManagedInstanceKeysClient(subscriptionID string) ManagedInstanceKeysClie return NewManagedInstanceKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedInstanceKeysClientWithBaseURI creates an instance of the ManagedInstanceKeysClient client. +// NewManagedInstanceKeysClientWithBaseURI creates an instance of the ManagedInstanceKeysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedInstanceKeysClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceKeysClient { return ManagedInstanceKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstances.go b/services/preview/sql/mgmt/v3.0/sql/managedinstances.go index 3fa203132a2c..b2177ae091bf 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstances.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstances.go @@ -38,7 +38,9 @@ func NewManagedInstancesClient(subscriptionID string) ManagedInstancesClient { return NewManagedInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client. +// NewManagedInstancesClientWithBaseURI creates an instance of the ManagedInstancesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagedInstancesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstancesClient { return ManagedInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstancetdecertificates.go b/services/preview/sql/mgmt/v3.0/sql/managedinstancetdecertificates.go index 90e474de06a2..b11d4ca0c3a4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstancetdecertificates.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstancetdecertificates.go @@ -39,7 +39,8 @@ func NewManagedInstanceTdeCertificatesClient(subscriptionID string) ManagedInsta } // NewManagedInstanceTdeCertificatesClientWithBaseURI creates an instance of the ManagedInstanceTdeCertificatesClient -// 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 NewManagedInstanceTdeCertificatesClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceTdeCertificatesClient { return ManagedInstanceTdeCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedinstancevulnerabilityassessments.go b/services/preview/sql/mgmt/v3.0/sql/managedinstancevulnerabilityassessments.go index 240ad4f3d491..75d0a54b3562 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedinstancevulnerabilityassessments.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedinstancevulnerabilityassessments.go @@ -40,7 +40,8 @@ func NewManagedInstanceVulnerabilityAssessmentsClient(subscriptionID string) Man } // NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI creates an instance of the -// ManagedInstanceVulnerabilityAssessmentsClient client. +// ManagedInstanceVulnerabilityAssessmentsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceVulnerabilityAssessmentsClient { return ManagedInstanceVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies.go index c73f3a87446d..e224d9e64c9d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedrestorabledroppeddatabasebackupshorttermretentionpolicies.go @@ -39,7 +39,8 @@ func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient(s } // NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientWithBaseURI creates an instance of the -// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient client. +// ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient { return ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/managedserversecurityalertpolicies.go b/services/preview/sql/mgmt/v3.0/sql/managedserversecurityalertpolicies.go index 15bdbf9f6162..ac80958efe27 100644 --- a/services/preview/sql/mgmt/v3.0/sql/managedserversecurityalertpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/managedserversecurityalertpolicies.go @@ -39,7 +39,8 @@ func NewManagedServerSecurityAlertPoliciesClient(subscriptionID string) ManagedS } // NewManagedServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the -// ManagedServerSecurityAlertPoliciesClient client. +// ManagedServerSecurityAlertPoliciesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagedServerSecurityAlertPoliciesClient { return ManagedServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/models.go b/services/preview/sql/mgmt/v3.0/sql/models.go index 90e639369cd5..4f4887ab6a8f 100644 --- a/services/preview/sql/mgmt/v3.0/sql/models.go +++ b/services/preview/sql/mgmt/v3.0/sql/models.go @@ -1207,6 +1207,27 @@ func PossibleSecurityAlertPolicyUseServerDefaultValues() []SecurityAlertPolicyUs return []SecurityAlertPolicyUseServerDefault{SecurityAlertPolicyUseServerDefaultDisabled, SecurityAlertPolicyUseServerDefaultEnabled} } +// 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 @@ -15644,6 +15665,8 @@ type SensitivityLabelProperties struct { 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"` } // Server an Azure SQL Database server. diff --git a/services/preview/sql/mgmt/v3.0/sql/operations.go b/services/preview/sql/mgmt/v3.0/sql/operations.go index bd0657225fde..a23318d8d8b4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/operations.go +++ b/services/preview/sql/mgmt/v3.0/sql/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/privateendpointconnections.go b/services/preview/sql/mgmt/v3.0/sql/privateendpointconnections.go index 1113d763dd5f..1342e646d541 100644 --- a/services/preview/sql/mgmt/v3.0/sql/privateendpointconnections.go +++ b/services/preview/sql/mgmt/v3.0/sql/privateendpointconnections.go @@ -38,7 +38,9 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointC return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/privatelinkresources.go b/services/preview/sql/mgmt/v3.0/sql/privatelinkresources.go index c528eb552e25..bc1320f64496 100644 --- a/services/preview/sql/mgmt/v3.0/sql/privatelinkresources.go +++ b/services/preview/sql/mgmt/v3.0/sql/privatelinkresources.go @@ -37,7 +37,9 @@ func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesCl return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/recommendedelasticpools.go b/services/preview/sql/mgmt/v3.0/sql/recommendedelasticpools.go index bc6f306fc31f..5aba17530b46 100644 --- a/services/preview/sql/mgmt/v3.0/sql/recommendedelasticpools.go +++ b/services/preview/sql/mgmt/v3.0/sql/recommendedelasticpools.go @@ -37,7 +37,9 @@ func NewRecommendedElasticPoolsClient(subscriptionID string) RecommendedElasticP return NewRecommendedElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendedElasticPoolsClientWithBaseURI creates an instance of the RecommendedElasticPoolsClient client. +// NewRecommendedElasticPoolsClientWithBaseURI creates an instance of the RecommendedElasticPoolsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRecommendedElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) RecommendedElasticPoolsClient { return RecommendedElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/recoverabledatabases.go b/services/preview/sql/mgmt/v3.0/sql/recoverabledatabases.go index bfa9b2425b97..d900e5223ef5 100644 --- a/services/preview/sql/mgmt/v3.0/sql/recoverabledatabases.go +++ b/services/preview/sql/mgmt/v3.0/sql/recoverabledatabases.go @@ -37,7 +37,9 @@ func NewRecoverableDatabasesClient(subscriptionID string) RecoverableDatabasesCl return NewRecoverableDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client. +// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRecoverableDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RecoverableDatabasesClient { return RecoverableDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/recoverablemanageddatabases.go b/services/preview/sql/mgmt/v3.0/sql/recoverablemanageddatabases.go index 8a2200979761..2db981e8dfb0 100644 --- a/services/preview/sql/mgmt/v3.0/sql/recoverablemanageddatabases.go +++ b/services/preview/sql/mgmt/v3.0/sql/recoverablemanageddatabases.go @@ -37,7 +37,9 @@ func NewRecoverableManagedDatabasesClient(subscriptionID string) RecoverableMana return NewRecoverableManagedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoverableManagedDatabasesClientWithBaseURI creates an instance of the RecoverableManagedDatabasesClient client. +// NewRecoverableManagedDatabasesClientWithBaseURI creates an instance of the RecoverableManagedDatabasesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewRecoverableManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RecoverableManagedDatabasesClient { return RecoverableManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/replicationlinks.go b/services/preview/sql/mgmt/v3.0/sql/replicationlinks.go index 4122dbff6cef..c810a1a2db59 100644 --- a/services/preview/sql/mgmt/v3.0/sql/replicationlinks.go +++ b/services/preview/sql/mgmt/v3.0/sql/replicationlinks.go @@ -37,7 +37,9 @@ func NewReplicationLinksClient(subscriptionID string) ReplicationLinksClient { return NewReplicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client. +// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ReplicationLinksClient { return ReplicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/restorabledroppeddatabases.go b/services/preview/sql/mgmt/v3.0/sql/restorabledroppeddatabases.go index ee9433fcd23a..9916f42cfd6d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/restorabledroppeddatabases.go +++ b/services/preview/sql/mgmt/v3.0/sql/restorabledroppeddatabases.go @@ -37,7 +37,9 @@ func NewRestorableDroppedDatabasesClient(subscriptionID string) RestorableDroppe return NewRestorableDroppedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client. +// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewRestorableDroppedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedDatabasesClient { return RestorableDroppedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/restorabledroppedmanageddatabases.go b/services/preview/sql/mgmt/v3.0/sql/restorabledroppedmanageddatabases.go index b9bd15b1a36b..10498c314f10 100644 --- a/services/preview/sql/mgmt/v3.0/sql/restorabledroppedmanageddatabases.go +++ b/services/preview/sql/mgmt/v3.0/sql/restorabledroppedmanageddatabases.go @@ -39,7 +39,8 @@ func NewRestorableDroppedManagedDatabasesClient(subscriptionID string) Restorabl } // NewRestorableDroppedManagedDatabasesClientWithBaseURI creates an instance of the -// RestorableDroppedManagedDatabasesClient client. +// RestorableDroppedManagedDatabasesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRestorableDroppedManagedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedManagedDatabasesClient { return RestorableDroppedManagedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/restorepoints.go b/services/preview/sql/mgmt/v3.0/sql/restorepoints.go index 8ae3d7ba5caf..a3a3ce863fd8 100644 --- a/services/preview/sql/mgmt/v3.0/sql/restorepoints.go +++ b/services/preview/sql/mgmt/v3.0/sql/restorepoints.go @@ -38,7 +38,8 @@ func NewRestorePointsClient(subscriptionID string) RestorePointsClient { return NewRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestorePointsClientWithBaseURI creates an instance of the RestorePointsClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/sensitivitylabels.go b/services/preview/sql/mgmt/v3.0/sql/sensitivitylabels.go index a267ca01c530..f8c02ca0bf26 100644 --- a/services/preview/sql/mgmt/v3.0/sql/sensitivitylabels.go +++ b/services/preview/sql/mgmt/v3.0/sql/sensitivitylabels.go @@ -37,7 +37,9 @@ func NewSensitivityLabelsClient(subscriptionID string) SensitivityLabelsClient { return NewSensitivityLabelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSensitivityLabelsClientWithBaseURI creates an instance of the SensitivityLabelsClient client. +// NewSensitivityLabelsClientWithBaseURI creates an instance of the SensitivityLabelsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSensitivityLabelsClientWithBaseURI(baseURI string, subscriptionID string) SensitivityLabelsClient { return SensitivityLabelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serverautomatictuning.go b/services/preview/sql/mgmt/v3.0/sql/serverautomatictuning.go index 00e40cce10dd..1d5ec39718a6 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverautomatictuning.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverautomatictuning.go @@ -37,7 +37,9 @@ func NewServerAutomaticTuningClient(subscriptionID string) ServerAutomaticTuning return NewServerAutomaticTuningClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAutomaticTuningClientWithBaseURI creates an instance of the ServerAutomaticTuningClient client. +// NewServerAutomaticTuningClientWithBaseURI creates an instance of the ServerAutomaticTuningClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewServerAutomaticTuningClientWithBaseURI(baseURI string, subscriptionID string) ServerAutomaticTuningClient { return ServerAutomaticTuningClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go b/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go index 86bac5697df3..b6b30c96d92d 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go @@ -38,7 +38,9 @@ func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAd return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client. +// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serverblobauditingpolicies.go b/services/preview/sql/mgmt/v3.0/sql/serverblobauditingpolicies.go index 48d2fde5ed0d..92c013234551 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverblobauditingpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverblobauditingpolicies.go @@ -37,7 +37,9 @@ func NewServerBlobAuditingPoliciesClient(subscriptionID string) ServerBlobAuditi return NewServerBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the ServerBlobAuditingPoliciesClient client. +// NewServerBlobAuditingPoliciesClientWithBaseURI creates an instance of the ServerBlobAuditingPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerBlobAuditingPoliciesClient { return ServerBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/servercommunicationlinks.go b/services/preview/sql/mgmt/v3.0/sql/servercommunicationlinks.go index 8c89241fa93f..7e91bbed9296 100644 --- a/services/preview/sql/mgmt/v3.0/sql/servercommunicationlinks.go +++ b/services/preview/sql/mgmt/v3.0/sql/servercommunicationlinks.go @@ -38,7 +38,9 @@ func NewServerCommunicationLinksClient(subscriptionID string) ServerCommunicatio return NewServerCommunicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client. +// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerCommunicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServerCommunicationLinksClient { return ServerCommunicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serverconnectionpolicies.go b/services/preview/sql/mgmt/v3.0/sql/serverconnectionpolicies.go index 281669c15993..dae81775e782 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverconnectionpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverconnectionpolicies.go @@ -37,7 +37,9 @@ func NewServerConnectionPoliciesClient(subscriptionID string) ServerConnectionPo return NewServerConnectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client. +// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerConnectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerConnectionPoliciesClient { return ServerConnectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serverdnsaliases.go b/services/preview/sql/mgmt/v3.0/sql/serverdnsaliases.go index 51074322a772..2c9a38959a27 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverdnsaliases.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverdnsaliases.go @@ -37,7 +37,9 @@ func NewServerDNSAliasesClient(subscriptionID string) ServerDNSAliasesClient { return NewServerDNSAliasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerDNSAliasesClientWithBaseURI creates an instance of the ServerDNSAliasesClient client. +// NewServerDNSAliasesClientWithBaseURI creates an instance of the ServerDNSAliasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServerDNSAliasesClientWithBaseURI(baseURI string, subscriptionID string) ServerDNSAliasesClient { return ServerDNSAliasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serverkeys.go b/services/preview/sql/mgmt/v3.0/sql/serverkeys.go index 9e9e38abbe15..7d82b1c150a1 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverkeys.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverkeys.go @@ -37,7 +37,8 @@ func NewServerKeysClient(subscriptionID string) ServerKeysClient { return NewServerKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerKeysClientWithBaseURI creates an instance of the ServerKeysClient client. +// NewServerKeysClientWithBaseURI creates an instance of the ServerKeysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerKeysClientWithBaseURI(baseURI string, subscriptionID string) ServerKeysClient { return ServerKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/servers.go b/services/preview/sql/mgmt/v3.0/sql/servers.go index 388a123d7685..7f91eefcf153 100644 --- a/services/preview/sql/mgmt/v3.0/sql/servers.go +++ b/services/preview/sql/mgmt/v3.0/sql/servers.go @@ -38,7 +38,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serversecurityalertpolicies.go b/services/preview/sql/mgmt/v3.0/sql/serversecurityalertpolicies.go index 89d98348b85a..8da5e466569e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serversecurityalertpolicies.go +++ b/services/preview/sql/mgmt/v3.0/sql/serversecurityalertpolicies.go @@ -37,7 +37,9 @@ func NewServerSecurityAlertPoliciesClient(subscriptionID string) ServerSecurityA return NewServerSecurityAlertPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client. +// NewServerSecurityAlertPoliciesClientWithBaseURI creates an instance of the ServerSecurityAlertPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerSecurityAlertPoliciesClient { return ServerSecurityAlertPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serverusages.go b/services/preview/sql/mgmt/v3.0/sql/serverusages.go index 65f3fd8d5b43..7175e98a49b9 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverusages.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverusages.go @@ -37,7 +37,8 @@ func NewServerUsagesClient(subscriptionID string) ServerUsagesClient { return NewServerUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client. +// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerUsagesClientWithBaseURI(baseURI string, subscriptionID string) ServerUsagesClient { return ServerUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/servervulnerabilityassessments.go b/services/preview/sql/mgmt/v3.0/sql/servervulnerabilityassessments.go index 9496d7ee7833..8bc7e622d5e3 100644 --- a/services/preview/sql/mgmt/v3.0/sql/servervulnerabilityassessments.go +++ b/services/preview/sql/mgmt/v3.0/sql/servervulnerabilityassessments.go @@ -39,7 +39,8 @@ func NewServerVulnerabilityAssessmentsClient(subscriptionID string) ServerVulner } // NewServerVulnerabilityAssessmentsClientWithBaseURI creates an instance of the ServerVulnerabilityAssessmentsClient -// 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 NewServerVulnerabilityAssessmentsClientWithBaseURI(baseURI string, subscriptionID string) ServerVulnerabilityAssessmentsClient { return ServerVulnerabilityAssessmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/serviceobjectives.go b/services/preview/sql/mgmt/v3.0/sql/serviceobjectives.go index 971180b812c7..e61e6e009f18 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serviceobjectives.go +++ b/services/preview/sql/mgmt/v3.0/sql/serviceobjectives.go @@ -37,7 +37,9 @@ func NewServiceObjectivesClient(subscriptionID string) ServiceObjectivesClient { return NewServiceObjectivesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client. +// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceObjectivesClientWithBaseURI(baseURI string, subscriptionID string) ServiceObjectivesClient { return ServiceObjectivesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/servicetieradvisors.go b/services/preview/sql/mgmt/v3.0/sql/servicetieradvisors.go index 8fc1f2d7ae8a..a13cd33d4476 100644 --- a/services/preview/sql/mgmt/v3.0/sql/servicetieradvisors.go +++ b/services/preview/sql/mgmt/v3.0/sql/servicetieradvisors.go @@ -37,7 +37,9 @@ func NewServiceTierAdvisorsClient(subscriptionID string) ServiceTierAdvisorsClie return NewServiceTierAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client. +// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceTierAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTierAdvisorsClient { return ServiceTierAdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go index 16571c46a476..70e2b181222f 100644 --- a/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go @@ -48,7 +48,9 @@ type ServersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.Server, err error) List(ctx context.Context) (result sql.ServerListResultPage, err error) + ListComplete(ctx context.Context) (result sql.ServerListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.ServerListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.ServerListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerUpdate) (result sql.ServersUpdateFuture, err error) } @@ -115,7 +117,9 @@ type DatabasesClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.Database, err error) Import(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ImportRequest) (result sql.DatabasesImportFuture, err error) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.DatabaseListResultPage, err error) + ListByElasticPoolComplete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.DatabaseListResultIterator, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.DatabaseListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.DatabaseListResultIterator, err error) ListMetricDefinitions(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.MetricDefinitionListResult, err error) ListMetrics(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result sql.MetricListResult, err error) Pause(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabasesPauseFuture, err error) @@ -134,6 +138,7 @@ type ElasticPoolsClientAPI interface { Failover(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.ElasticPoolsFailoverFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.ElasticPool, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string, skip *int32) (result sql.ElasticPoolListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string, skip *int32) (result sql.ElasticPoolListResultIterator, err error) ListMetricDefinitions(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.MetricDefinitionListResult, err error) ListMetrics(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, filter string) (result sql.MetricListResult, err error) Update(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters sql.ElasticPoolUpdate) (result sql.ElasticPoolsUpdateFuture, err error) @@ -243,6 +248,7 @@ type EncryptionProtectorsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.EncryptionProtector) (result sql.EncryptionProtectorsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtector, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorListResultIterator, err error) Revalidate(ctx context.Context, resourceGroupName string, serverName string) (result sql.EncryptionProtectorsRevalidateFuture, err error) } @@ -256,6 +262,7 @@ type FailoverGroupsClientAPI interface { ForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result sql.FailoverGroupsForceFailoverAllowDataLossFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result sql.FailoverGroup, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.FailoverGroupListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.FailoverGroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters sql.FailoverGroupUpdate) (result sql.FailoverGroupsUpdateFuture, err error) } @@ -264,6 +271,7 @@ var _ FailoverGroupsClientAPI = (*sql.FailoverGroupsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result sql.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result sql.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*sql.OperationsClient)(nil) @@ -274,6 +282,7 @@ type ServerKeysClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, keyName string) (result sql.ServerKeysDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, keyName string) (result sql.ServerKey, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerKeyListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerKeyListResultIterator, err error) } var _ ServerKeysClientAPI = (*sql.ServerKeysClient)(nil) @@ -285,7 +294,9 @@ type SyncAgentsClientAPI interface { GenerateKey(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentKeyProperties, err error) Get(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgent, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.SyncAgentListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.SyncAgentListResultIterator, err error) ListLinkedDatabases(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentLinkedDatabaseListResultPage, err error) + ListLinkedDatabasesComplete(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string) (result sql.SyncAgentLinkedDatabaseListResultIterator, err error) } var _ SyncAgentsClientAPI = (*sql.SyncAgentsClient)(nil) @@ -297,9 +308,13 @@ type SyncGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroup, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.SyncGroupListResultIterator, err error) ListHubSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) + ListHubSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) ListLogs(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultPage, err error) + ListLogsComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result sql.SyncGroupLogListResultIterator, err error) ListSyncDatabaseIds(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultPage, err error) + ListSyncDatabaseIdsComplete(ctx context.Context, locationName string) (result sql.SyncDatabaseIDListResultIterator, err error) RefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncGroupsRefreshHubSchemaFuture, err error) TriggerSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters sql.SyncGroup) (result sql.SyncGroupsUpdateFuture, err error) @@ -313,7 +328,9 @@ type SyncMembersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMember, err error) ListBySyncGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultPage, err error) + ListBySyncGroupComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result sql.SyncMemberListResultIterator, err error) ListMemberSchemas(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultPage, err error) + ListMemberSchemasComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncFullSchemaPropertiesListResultIterator, err error) RefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result sql.SyncMembersRefreshMemberSchemaFuture, err error) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters sql.SyncMember) (result sql.SyncMembersUpdateFuture, err error) } @@ -324,6 +341,7 @@ var _ SyncMembersClientAPI = (*sql.SyncMembersClient)(nil) type SubscriptionUsagesClientAPI interface { Get(ctx context.Context, locationName string, usageName string) (result sql.SubscriptionUsage, err error) ListByLocation(ctx context.Context, locationName string) (result sql.SubscriptionUsageListResultPage, err error) + ListByLocationComplete(ctx context.Context, locationName string) (result sql.SubscriptionUsageListResultIterator, err error) } var _ SubscriptionUsagesClientAPI = (*sql.SubscriptionUsagesClient)(nil) @@ -333,7 +351,9 @@ type VirtualClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualClusterName string) (result sql.VirtualClustersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualClusterName string) (result sql.VirtualCluster, err error) List(ctx context.Context) (result sql.VirtualClusterListResultPage, err error) + ListComplete(ctx context.Context) (result sql.VirtualClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.VirtualClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.VirtualClusterListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters sql.VirtualClusterUpdate) (result sql.VirtualClustersUpdateFuture, err error) } @@ -345,6 +365,7 @@ type VirtualNetworkRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result sql.VirtualNetworkRulesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result sql.VirtualNetworkRule, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.VirtualNetworkRuleListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.VirtualNetworkRuleListResultIterator, err error) } var _ VirtualNetworkRulesClientAPI = (*sql.VirtualNetworkRulesClient)(nil) @@ -370,6 +391,7 @@ type ServerBlobAuditingPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerBlobAuditingPolicy) (result sql.ServerBlobAuditingPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerBlobAuditingPolicy, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerBlobAuditingPolicyListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerBlobAuditingPolicyListResultIterator, err error) } var _ ServerBlobAuditingPoliciesClientAPI = (*sql.ServerBlobAuditingPoliciesClient)(nil) @@ -379,6 +401,7 @@ type DatabaseBlobAuditingPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.DatabaseBlobAuditingPolicy) (result sql.DatabaseBlobAuditingPolicy, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseBlobAuditingPolicyListResultIterator, err error) } var _ DatabaseBlobAuditingPoliciesClientAPI = (*sql.DatabaseBlobAuditingPoliciesClient)(nil) @@ -398,6 +421,7 @@ type DatabaseVulnerabilityAssessmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseVulnerabilityAssessment, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseVulnerabilityAssessmentListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseVulnerabilityAssessmentListResultIterator, err error) } var _ DatabaseVulnerabilityAssessmentsClientAPI = (*sql.DatabaseVulnerabilityAssessmentsClient)(nil) @@ -408,6 +432,7 @@ type JobAgentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobAgentsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobAgent, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.JobAgentListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.JobAgentListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters sql.JobAgentUpdate) (result sql.JobAgentsUpdateFuture, err error) } @@ -419,6 +444,7 @@ type JobCredentialsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string) (result sql.JobCredential, err error) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobCredentialListResultPage, err error) + ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobCredentialListResultIterator, err error) } var _ JobCredentialsClientAPI = (*sql.JobCredentialsClient)(nil) @@ -430,7 +456,9 @@ type JobExecutionsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result sql.JobExecutionsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID) (result sql.JobExecution, err error) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) } var _ JobExecutionsClientAPI = (*sql.JobExecutionsClient)(nil) @@ -441,6 +469,7 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.Job, err error) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobListResultPage, err error) + ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobListResultIterator, err error) } var _ JobsClientAPI = (*sql.JobsClient)(nil) @@ -449,6 +478,7 @@ var _ JobsClientAPI = (*sql.JobsClient)(nil) type JobStepExecutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string) (result sql.JobExecution, err error) ListByJobExecution(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByJobExecutionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) } var _ JobStepExecutionsClientAPI = (*sql.JobStepExecutionsClient)(nil) @@ -460,7 +490,9 @@ type JobStepsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) (result sql.JobStep, err error) GetByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string) (result sql.JobStep, err error) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.JobStepListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.JobStepListResultIterator, err error) ListByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result sql.JobStepListResultPage, err error) + ListByVersionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result sql.JobStepListResultIterator, err error) } var _ JobStepsClientAPI = (*sql.JobStepsClient)(nil) @@ -469,7 +501,9 @@ var _ JobStepsClientAPI = (*sql.JobStepsClient)(nil) type JobTargetExecutionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, targetID uuid.UUID) (result sql.JobExecution, err error) ListByJobExecution(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByJobExecutionComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) ListByStep(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultPage, err error) + ListByStepComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID uuid.UUID, stepName string, createTimeMin *date.Time, createTimeMax *date.Time, endTimeMin *date.Time, endTimeMax *date.Time, isActive *bool, skip *int32, top *int32) (result sql.JobExecutionListResultIterator, err error) } var _ JobTargetExecutionsClientAPI = (*sql.JobTargetExecutionsClient)(nil) @@ -480,6 +514,7 @@ type JobTargetGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) (result sql.JobTargetGroup, err error) ListByAgent(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobTargetGroupListResultPage, err error) + ListByAgentComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string) (result sql.JobTargetGroupListResultIterator, err error) } var _ JobTargetGroupsClientAPI = (*sql.JobTargetGroupsClient)(nil) @@ -488,6 +523,7 @@ var _ JobTargetGroupsClientAPI = (*sql.JobTargetGroupsClient)(nil) type JobVersionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32) (result sql.JobVersion, err error) ListByJob(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.JobVersionListResultPage, err error) + ListByJobComplete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string) (result sql.JobVersionListResultIterator, err error) } var _ JobVersionsClientAPI = (*sql.JobVersionsClient)(nil) @@ -499,11 +535,17 @@ type LongTermRetentionBackupsClientAPI interface { Get(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string) (result sql.LongTermRetentionBackup, err error) GetByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string) (result sql.LongTermRetentionBackup, err error) ListByDatabase(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultIterator, err error) ListByLocation(ctx context.Context, locationName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultPage, err error) + ListByLocationComplete(ctx context.Context, locationName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultIterator, err error) ListByResourceGroupDatabase(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultPage, err error) + ListByResourceGroupDatabaseComplete(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultIterator, err error) ListByResourceGroupLocation(ctx context.Context, resourceGroupName string, locationName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultPage, err error) + ListByResourceGroupLocationComplete(ctx context.Context, resourceGroupName string, locationName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultIterator, err error) ListByResourceGroupServer(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultPage, err error) + ListByResourceGroupServerComplete(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultIterator, err error) ListByServer(ctx context.Context, locationName string, longTermRetentionServerName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultPage, err error) + ListByServerComplete(ctx context.Context, locationName string, longTermRetentionServerName string, onlyLatestPerDatabase *bool, databaseState sql.LongTermRetentionDatabaseState) (result sql.LongTermRetentionBackupListResultIterator, err error) } var _ LongTermRetentionBackupsClientAPI = (*sql.LongTermRetentionBackupsClient)(nil) @@ -522,6 +564,7 @@ type ManagedBackupShortTermRetentionPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.ManagedBackupShortTermRetentionPolicy) (result sql.ManagedBackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedBackupShortTermRetentionPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedBackupShortTermRetentionPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedBackupShortTermRetentionPolicyListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.ManagedBackupShortTermRetentionPolicy) (result sql.ManagedBackupShortTermRetentionPoliciesUpdateFuture, err error) } @@ -532,6 +575,7 @@ type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientAPI i CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, parameters sql.ManagedBackupShortTermRetentionPolicy) (result sql.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string) (result sql.ManagedBackupShortTermRetentionPolicy, err error) ListByRestorableDroppedDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string) (result sql.ManagedBackupShortTermRetentionPolicyListResultPage, err error) + ListByRestorableDroppedDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string) (result sql.ManagedBackupShortTermRetentionPolicyListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, parameters sql.ManagedBackupShortTermRetentionPolicy) (result sql.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateFuture, err error) } @@ -552,6 +596,7 @@ type ServerDNSAliasesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (result sql.ServerDNSAliasesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, DNSAliasName string) (result sql.ServerDNSAlias, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerDNSAliasListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerDNSAliasListResultIterator, err error) } var _ ServerDNSAliasesClientAPI = (*sql.ServerDNSAliasesClient)(nil) @@ -561,6 +606,7 @@ type ServerSecurityAlertPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerSecurityAlertPolicy) (result sql.ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerSecurityAlertPolicy, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.LogicalServerSecurityAlertPolicyListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.LogicalServerSecurityAlertPolicyListResultIterator, err error) } var _ ServerSecurityAlertPoliciesClientAPI = (*sql.ServerSecurityAlertPoliciesClient)(nil) @@ -569,6 +615,7 @@ var _ ServerSecurityAlertPoliciesClientAPI = (*sql.ServerSecurityAlertPoliciesCl type RestorableDroppedManagedDatabasesClientAPI interface { Get(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string) (result sql.RestorableDroppedManagedDatabase, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.RestorableDroppedManagedDatabaseListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.RestorableDroppedManagedDatabaseListResultIterator, err error) } var _ RestorableDroppedManagedDatabasesClientAPI = (*sql.RestorableDroppedManagedDatabasesClient)(nil) @@ -588,6 +635,7 @@ type ManagedDatabaseSecurityAlertPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.ManagedDatabaseSecurityAlertPolicy) (result sql.ManagedDatabaseSecurityAlertPolicy, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabaseSecurityAlertPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabaseSecurityAlertPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabaseSecurityAlertPolicyListResultIterator, err error) } var _ ManagedDatabaseSecurityAlertPoliciesClientAPI = (*sql.ManagedDatabaseSecurityAlertPoliciesClient)(nil) @@ -597,6 +645,7 @@ type ManagedServerSecurityAlertPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedServerSecurityAlertPolicy) (result sql.ManagedServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedServerSecurityAlertPolicy, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedServerSecurityAlertPolicyListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedServerSecurityAlertPolicyListResultIterator, err error) } var _ ManagedServerSecurityAlertPoliciesClientAPI = (*sql.ManagedServerSecurityAlertPoliciesClient)(nil) @@ -609,7 +658,9 @@ type SensitivityLabelsClientAPI interface { EnableRecommendation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource sql.SensitivityLabelSource) (result sql.SensitivityLabel, err error) ListCurrentByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result sql.SensitivityLabelListResultPage, err error) + ListCurrentByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result sql.SensitivityLabelListResultIterator, err error) ListRecommendedByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result sql.SensitivityLabelListResultPage, err error) + ListRecommendedByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result sql.SensitivityLabelListResultIterator, err error) } var _ SensitivityLabelsClientAPI = (*sql.SensitivityLabelsClient)(nil) @@ -620,6 +671,7 @@ type ManagedInstanceAdministratorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministratorsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministrator, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministratorListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministratorListResultIterator, err error) } var _ ManagedInstanceAdministratorsClientAPI = (*sql.ManagedInstanceAdministratorsClient)(nil) @@ -628,6 +680,7 @@ var _ ManagedInstanceAdministratorsClientAPI = (*sql.ManagedInstanceAdministrato type DatabaseOperationsClientAPI interface { Cancel(ctx context.Context, resourceGroupName string, serverName string, databaseName string, operationID uuid.UUID) (result autorest.Response, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseOperationListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.DatabaseOperationListResultIterator, err error) } var _ DatabaseOperationsClientAPI = (*sql.DatabaseOperationsClient)(nil) @@ -636,6 +689,7 @@ var _ DatabaseOperationsClientAPI = (*sql.DatabaseOperationsClient)(nil) type ElasticPoolOperationsClientAPI interface { Cancel(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, operationID uuid.UUID) (result autorest.Response, err error) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.ElasticPoolOperationListResultPage, err error) + ListByElasticPoolComplete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result sql.ElasticPoolOperationListResultIterator, err error) } var _ ElasticPoolOperationsClientAPI = (*sql.ElasticPoolOperationsClient)(nil) @@ -646,6 +700,7 @@ type DatabaseVulnerabilityAssessmentScansClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (result sql.VulnerabilityAssessmentScanRecord, err error) InitiateScan(ctx context.Context, resourceGroupName string, serverName string, databaseName string, scanID string) (result sql.DatabaseVulnerabilityAssessmentScansInitiateScanFuture, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.VulnerabilityAssessmentScanRecordListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.VulnerabilityAssessmentScanRecordListResultIterator, err error) } var _ DatabaseVulnerabilityAssessmentScansClientAPI = (*sql.DatabaseVulnerabilityAssessmentScansClient)(nil) @@ -665,6 +720,7 @@ type ManagedDatabaseVulnerabilityAssessmentScansClientAPI interface { Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, scanID string) (result sql.VulnerabilityAssessmentScanRecord, err error) InitiateScan(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, scanID string) (result sql.ManagedDatabaseVulnerabilityAssessmentScansInitiateScanFuture, err error) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.VulnerabilityAssessmentScanRecordListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.VulnerabilityAssessmentScanRecordListResultIterator, err error) } var _ ManagedDatabaseVulnerabilityAssessmentScansClientAPI = (*sql.ManagedDatabaseVulnerabilityAssessmentScansClient)(nil) @@ -675,6 +731,7 @@ type ManagedDatabaseVulnerabilityAssessmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.DatabaseVulnerabilityAssessment, err error) ListByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.DatabaseVulnerabilityAssessmentListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.DatabaseVulnerabilityAssessmentListResultIterator, err error) } var _ ManagedDatabaseVulnerabilityAssessmentsClientAPI = (*sql.ManagedDatabaseVulnerabilityAssessmentsClient)(nil) @@ -687,6 +744,7 @@ type InstanceFailoverGroupsClientAPI interface { ForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string) (result sql.InstanceFailoverGroupsForceFailoverAllowDataLossFuture, err error) Get(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string) (result sql.InstanceFailoverGroup, err error) ListByLocation(ctx context.Context, resourceGroupName string, locationName string) (result sql.InstanceFailoverGroupListResultPage, err error) + ListByLocationComplete(ctx context.Context, resourceGroupName string, locationName string) (result sql.InstanceFailoverGroupListResultIterator, err error) } var _ InstanceFailoverGroupsClientAPI = (*sql.InstanceFailoverGroupsClient)(nil) @@ -696,6 +754,7 @@ type BackupShortTermRetentionPoliciesClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.BackupShortTermRetentionPolicy) (result sql.BackupShortTermRetentionPoliciesCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.BackupShortTermRetentionPolicy, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.BackupShortTermRetentionPolicyListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.BackupShortTermRetentionPolicyListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters sql.BackupShortTermRetentionPolicy) (result sql.BackupShortTermRetentionPoliciesUpdateFuture, err error) } @@ -721,6 +780,7 @@ type ManagedInstanceKeysClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string) (result sql.ManagedInstanceKeysDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string) (result sql.ManagedInstanceKey, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string, filter string) (result sql.ManagedInstanceKeyListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, filter string) (result sql.ManagedInstanceKeyListResultIterator, err error) } var _ ManagedInstanceKeysClientAPI = (*sql.ManagedInstanceKeysClient)(nil) @@ -730,6 +790,7 @@ type ManagedInstanceEncryptionProtectorsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedInstanceEncryptionProtector) (result sql.ManagedInstanceEncryptionProtectorsCreateOrUpdateFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceEncryptionProtector, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceEncryptionProtectorListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceEncryptionProtectorListResultIterator, err error) Revalidate(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceEncryptionProtectorsRevalidateFuture, err error) } @@ -739,6 +800,7 @@ var _ ManagedInstanceEncryptionProtectorsClientAPI = (*sql.ManagedInstanceEncryp type RecoverableManagedDatabasesClientAPI interface { Get(ctx context.Context, resourceGroupName string, managedInstanceName string, recoverableDatabaseName string) (result sql.RecoverableManagedDatabase, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.RecoverableManagedDatabaseListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.RecoverableManagedDatabaseListResultIterator, err error) } var _ RecoverableManagedDatabasesClientAPI = (*sql.RecoverableManagedDatabasesClient)(nil) @@ -749,6 +811,7 @@ type ManagedInstanceVulnerabilityAssessmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceVulnerabilityAssessment, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceVulnerabilityAssessmentListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceVulnerabilityAssessmentListResultIterator, err error) } var _ ManagedInstanceVulnerabilityAssessmentsClientAPI = (*sql.ManagedInstanceVulnerabilityAssessmentsClient)(nil) @@ -759,6 +822,7 @@ type ServerVulnerabilityAssessmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerVulnerabilityAssessment, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerVulnerabilityAssessmentListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerVulnerabilityAssessmentListResultIterator, err error) } var _ ServerVulnerabilityAssessmentsClientAPI = (*sql.ServerVulnerabilityAssessmentsClient)(nil) @@ -771,7 +835,9 @@ type ManagedDatabaseSensitivityLabelsClientAPI interface { EnableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource sql.SensitivityLabelSource) (result sql.SensitivityLabel, err error) ListCurrentByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, filter string) (result sql.SensitivityLabelListResultPage, err error) + ListCurrentByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, filter string) (result sql.SensitivityLabelListResultIterator, err error) ListRecommendedByDatabase(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result sql.SensitivityLabelListResultPage, err error) + ListRecommendedByDatabaseComplete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, includeDisabledRecommendations *bool, skipToken string, filter string) (result sql.SensitivityLabelListResultIterator, err error) } var _ ManagedDatabaseSensitivityLabelsClientAPI = (*sql.ManagedDatabaseSensitivityLabelsClient)(nil) @@ -782,7 +848,9 @@ type InstancePoolsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, instancePoolName string) (result sql.InstancePoolsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, instancePoolName string) (result sql.InstancePool, err error) List(ctx context.Context) (result sql.InstancePoolListResultPage, err error) + ListComplete(ctx context.Context) (result sql.InstancePoolListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.InstancePoolListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.InstancePoolListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, instancePoolName string, parameters sql.InstancePoolUpdate) (result sql.InstancePoolsUpdateFuture, err error) } @@ -791,6 +859,7 @@ var _ InstancePoolsClientAPI = (*sql.InstancePoolsClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { ListByInstancePool(ctx context.Context, resourceGroupName string, instancePoolName string, expandChildren *bool) (result sql.UsageListResultPage, err error) + ListByInstancePoolComplete(ctx context.Context, resourceGroupName string, instancePoolName string, expandChildren *bool) (result sql.UsageListResultIterator, err error) } var _ UsagesClientAPI = (*sql.UsagesClient)(nil) @@ -801,8 +870,11 @@ type ManagedInstancesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstancesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstance, err error) List(ctx context.Context) (result sql.ManagedInstanceListResultPage, err error) + ListComplete(ctx context.Context) (result sql.ManagedInstanceListResultIterator, err error) ListByInstancePool(ctx context.Context, resourceGroupName string, instancePoolName string) (result sql.ManagedInstanceListResultPage, err error) + ListByInstancePoolComplete(ctx context.Context, resourceGroupName string, instancePoolName string) (result sql.ManagedInstanceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sql.ManagedInstanceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sql.ManagedInstanceListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedInstanceUpdate) (result sql.ManagedInstancesUpdateFuture, err error) } @@ -822,6 +894,7 @@ type ManagedDatabasesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabasesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string) (result sql.ManagedDatabase, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedDatabaseListResultPage, err error) + ListByInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedDatabaseListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters sql.ManagedDatabaseUpdate) (result sql.ManagedDatabasesUpdateFuture, err error) } @@ -833,6 +906,7 @@ type PrivateEndpointConnectionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result sql.PrivateEndpointConnectionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string) (result sql.PrivateEndpointConnection, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.PrivateEndpointConnectionListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.PrivateEndpointConnectionListResultIterator, err error) } var _ PrivateEndpointConnectionsClientAPI = (*sql.PrivateEndpointConnectionsClient)(nil) @@ -841,6 +915,7 @@ var _ PrivateEndpointConnectionsClientAPI = (*sql.PrivateEndpointConnectionsClie type PrivateLinkResourcesClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, groupName string) (result sql.PrivateLinkResource, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.PrivateLinkResourceListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.PrivateLinkResourceListResultIterator, err error) } var _ PrivateLinkResourcesClientAPI = (*sql.PrivateLinkResourcesClient)(nil) @@ -851,6 +926,7 @@ type ServerAzureADAdministratorsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministratorsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministrator, err error) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.AdministratorListResultPage, err error) + ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result sql.AdministratorListResultIterator, err error) } var _ ServerAzureADAdministratorsClientAPI = (*sql.ServerAzureADAdministratorsClient)(nil) @@ -868,6 +944,7 @@ type WorkloadGroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result sql.WorkloadGroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result sql.WorkloadGroup, err error) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.WorkloadGroupListResultPage, err error) + ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.WorkloadGroupListResultIterator, err error) } var _ WorkloadGroupsClientAPI = (*sql.WorkloadGroupsClient)(nil) @@ -878,6 +955,7 @@ type WorkloadClassifiersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) (result sql.WorkloadClassifiersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) (result sql.WorkloadClassifier, err error) ListByWorkloadGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result sql.WorkloadClassifierListResultPage, err error) + ListByWorkloadGroupComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result sql.WorkloadClassifierListResultIterator, err error) } var _ WorkloadClassifiersClientAPI = (*sql.WorkloadClassifiersClient)(nil) diff --git a/services/preview/sql/mgmt/v3.0/sql/subscriptionusages.go b/services/preview/sql/mgmt/v3.0/sql/subscriptionusages.go index 05a7a1840a7a..41fecbf44921 100644 --- a/services/preview/sql/mgmt/v3.0/sql/subscriptionusages.go +++ b/services/preview/sql/mgmt/v3.0/sql/subscriptionusages.go @@ -37,7 +37,9 @@ func NewSubscriptionUsagesClient(subscriptionID string) SubscriptionUsagesClient return NewSubscriptionUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionUsagesClientWithBaseURI creates an instance of the SubscriptionUsagesClient client. +// NewSubscriptionUsagesClientWithBaseURI creates an instance of the SubscriptionUsagesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSubscriptionUsagesClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionUsagesClient { return SubscriptionUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/syncagents.go b/services/preview/sql/mgmt/v3.0/sql/syncagents.go index 83d69dca7838..e9fdec8d491e 100644 --- a/services/preview/sql/mgmt/v3.0/sql/syncagents.go +++ b/services/preview/sql/mgmt/v3.0/sql/syncagents.go @@ -37,7 +37,8 @@ func NewSyncAgentsClient(subscriptionID string) SyncAgentsClient { return NewSyncAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncAgentsClientWithBaseURI creates an instance of the SyncAgentsClient client. +// NewSyncAgentsClientWithBaseURI creates an instance of the SyncAgentsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncAgentsClientWithBaseURI(baseURI string, subscriptionID string) SyncAgentsClient { return SyncAgentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/syncgroups.go b/services/preview/sql/mgmt/v3.0/sql/syncgroups.go index f16c28c30198..028160474fd6 100644 --- a/services/preview/sql/mgmt/v3.0/sql/syncgroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/syncgroups.go @@ -37,7 +37,8 @@ func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client. +// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/syncmembers.go b/services/preview/sql/mgmt/v3.0/sql/syncmembers.go index 3bf30d6226c7..bbbfb3ff45ee 100644 --- a/services/preview/sql/mgmt/v3.0/sql/syncmembers.go +++ b/services/preview/sql/mgmt/v3.0/sql/syncmembers.go @@ -37,7 +37,8 @@ func NewSyncMembersClient(subscriptionID string) SyncMembersClient { return NewSyncMembersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncMembersClientWithBaseURI creates an instance of the SyncMembersClient client. +// NewSyncMembersClientWithBaseURI creates an instance of the SyncMembersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncMembersClientWithBaseURI(baseURI string, subscriptionID string) SyncMembersClient { return SyncMembersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/tdecertificates.go b/services/preview/sql/mgmt/v3.0/sql/tdecertificates.go index 0b0d20cbae93..99079e1d61a4 100644 --- a/services/preview/sql/mgmt/v3.0/sql/tdecertificates.go +++ b/services/preview/sql/mgmt/v3.0/sql/tdecertificates.go @@ -38,7 +38,8 @@ func NewTdeCertificatesClient(subscriptionID string) TdeCertificatesClient { return NewTdeCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTdeCertificatesClientWithBaseURI creates an instance of the TdeCertificatesClient client. +// NewTdeCertificatesClientWithBaseURI creates an instance of the TdeCertificatesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTdeCertificatesClientWithBaseURI(baseURI string, subscriptionID string) TdeCertificatesClient { return TdeCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptionactivities.go b/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptionactivities.go index 2c8c003fc3b7..e9602baf8ad9 100644 --- a/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptionactivities.go +++ b/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptionactivities.go @@ -39,7 +39,8 @@ func NewTransparentDataEncryptionActivitiesClient(subscriptionID string) Transpa } // NewTransparentDataEncryptionActivitiesClientWithBaseURI creates an instance of the -// TransparentDataEncryptionActivitiesClient client. +// TransparentDataEncryptionActivitiesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransparentDataEncryptionActivitiesClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionActivitiesClient { return TransparentDataEncryptionActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptions.go b/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptions.go index 7ea3bdf24a6e..e293d89b6926 100644 --- a/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptions.go +++ b/services/preview/sql/mgmt/v3.0/sql/transparentdataencryptions.go @@ -37,7 +37,9 @@ func NewTransparentDataEncryptionsClient(subscriptionID string) TransparentDataE return NewTransparentDataEncryptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client. +// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewTransparentDataEncryptionsClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionsClient { return TransparentDataEncryptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/usages.go b/services/preview/sql/mgmt/v3.0/sql/usages.go index 86f2d3b92500..d11b978910e8 100644 --- a/services/preview/sql/mgmt/v3.0/sql/usages.go +++ b/services/preview/sql/mgmt/v3.0/sql/usages.go @@ -37,7 +37,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/virtualclusters.go b/services/preview/sql/mgmt/v3.0/sql/virtualclusters.go index ffea75716e96..d05656d80762 100644 --- a/services/preview/sql/mgmt/v3.0/sql/virtualclusters.go +++ b/services/preview/sql/mgmt/v3.0/sql/virtualclusters.go @@ -37,7 +37,8 @@ func NewVirtualClustersClient(subscriptionID string) VirtualClustersClient { return NewVirtualClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualClustersClientWithBaseURI creates an instance of the VirtualClustersClient client. +// NewVirtualClustersClientWithBaseURI creates an instance of the VirtualClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualClustersClientWithBaseURI(baseURI string, subscriptionID string) VirtualClustersClient { return VirtualClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/virtualnetworkrules.go b/services/preview/sql/mgmt/v3.0/sql/virtualnetworkrules.go index 492473c92165..752cb9e7aab8 100644 --- a/services/preview/sql/mgmt/v3.0/sql/virtualnetworkrules.go +++ b/services/preview/sql/mgmt/v3.0/sql/virtualnetworkrules.go @@ -38,7 +38,9 @@ func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClie return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go b/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go index fefa2e77b2d2..cf30eedc397c 100644 --- a/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go +++ b/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go @@ -38,7 +38,9 @@ func NewWorkloadClassifiersClient(subscriptionID string) WorkloadClassifiersClie return NewWorkloadClassifiersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkloadClassifiersClientWithBaseURI creates an instance of the WorkloadClassifiersClient client. +// NewWorkloadClassifiersClientWithBaseURI creates an instance of the WorkloadClassifiersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewWorkloadClassifiersClientWithBaseURI(baseURI string, subscriptionID string) WorkloadClassifiersClient { return WorkloadClassifiersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go b/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go index 8c8abf00ffe6..497c2a77b902 100644 --- a/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go +++ b/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go @@ -38,7 +38,8 @@ func NewWorkloadGroupsClient(subscriptionID string) WorkloadGroupsClient { return NewWorkloadGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkloadGroupsClientWithBaseURI creates an instance of the WorkloadGroupsClient client. +// NewWorkloadGroupsClientWithBaseURI creates an instance of the WorkloadGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkloadGroupsClientWithBaseURI(baseURI string, subscriptionID string) WorkloadGroupsClient { return WorkloadGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/availabilitygrouplisteners.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/availabilitygrouplisteners.go index 48fc1369f2fc..c39fda38d4f6 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/availabilitygrouplisteners.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/availabilitygrouplisteners.go @@ -38,7 +38,9 @@ func NewAvailabilityGroupListenersClient(subscriptionID string) AvailabilityGrou return NewAvailabilityGroupListenersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilityGroupListenersClientWithBaseURI creates an instance of the AvailabilityGroupListenersClient client. +// NewAvailabilityGroupListenersClientWithBaseURI creates an instance of the AvailabilityGroupListenersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAvailabilityGroupListenersClientWithBaseURI(baseURI string, subscriptionID string) AvailabilityGroupListenersClient { return AvailabilityGroupListenersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/client.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/client.go index ac724706736b..5966df261a9a 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/client.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/groups.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/groups.go index 9b19e711f80c..c6d2e3f67ae0 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/groups.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/groups.go @@ -37,7 +37,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/operations.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/operations.go index a5743ddd8019..25023be25ec7 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/operations.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachineapi/interfaces.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachineapi/interfaces.go index 65cee379b0d0..50e04e360fba 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachineapi/interfaces.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachineapi/interfaces.go @@ -28,6 +28,7 @@ type AvailabilityGroupListenersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string, availabilityGroupListenerName string) (result sqlvirtualmachine.AvailabilityGroupListenersDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string, availabilityGroupListenerName string) (result sqlvirtualmachine.AvailabilityGroupListener, err error) ListByGroup(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string) (result sqlvirtualmachine.AvailabilityGroupListenerListResultPage, err error) + ListByGroupComplete(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string) (result sqlvirtualmachine.AvailabilityGroupListenerListResultIterator, err error) } var _ AvailabilityGroupListenersClientAPI = (*sqlvirtualmachine.AvailabilityGroupListenersClient)(nil) @@ -35,6 +36,7 @@ var _ AvailabilityGroupListenersClientAPI = (*sqlvirtualmachine.AvailabilityGrou // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result sqlvirtualmachine.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result sqlvirtualmachine.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*sqlvirtualmachine.OperationsClient)(nil) @@ -45,7 +47,9 @@ type GroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string) (result sqlvirtualmachine.GroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string) (result sqlvirtualmachine.Group, err error) List(ctx context.Context) (result sqlvirtualmachine.GroupListResultPage, err error) + ListComplete(ctx context.Context) (result sqlvirtualmachine.GroupListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sqlvirtualmachine.GroupListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sqlvirtualmachine.GroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string, parameters sqlvirtualmachine.GroupUpdate) (result sqlvirtualmachine.GroupsUpdateFuture, err error) } @@ -57,8 +61,11 @@ type SQLVirtualMachinesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, SQLVirtualMachineName string) (result sqlvirtualmachine.SQLVirtualMachinesDeleteFutureType, err error) Get(ctx context.Context, resourceGroupName string, SQLVirtualMachineName string, expand string) (result sqlvirtualmachine.SQLVirtualMachine, err error) List(ctx context.Context) (result sqlvirtualmachine.ListResultPage, err error) + ListComplete(ctx context.Context) (result sqlvirtualmachine.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result sqlvirtualmachine.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result sqlvirtualmachine.ListResultIterator, err error) ListBySQLVMGroup(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string) (result sqlvirtualmachine.ListResultPage, err error) + ListBySQLVMGroupComplete(ctx context.Context, resourceGroupName string, SQLVirtualMachineGroupName string) (result sqlvirtualmachine.ListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, SQLVirtualMachineName string, parameters sqlvirtualmachine.Update) (result sqlvirtualmachine.SQLVirtualMachinesUpdateFutureType, err error) } diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachines.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachines.go index 67d4e85ecac2..73f1a9647b0a 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachines.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/sqlvirtualmachines.go @@ -38,7 +38,9 @@ func NewSQLVirtualMachinesClient(subscriptionID string) SQLVirtualMachinesClient return NewSQLVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSQLVirtualMachinesClientWithBaseURI creates an instance of the SQLVirtualMachinesClient client. +// NewSQLVirtualMachinesClientWithBaseURI creates an instance of the SQLVirtualMachinesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSQLVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) SQLVirtualMachinesClient { return SQLVirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/storage/mgmt/2015-05-01-preview/storage/accounts.go b/services/preview/storage/mgmt/2015-05-01-preview/storage/accounts.go index aaef4ee8560f..334aa2761510 100644 --- a/services/preview/storage/mgmt/2015-05-01-preview/storage/accounts.go +++ b/services/preview/storage/mgmt/2015-05-01-preview/storage/accounts.go @@ -35,7 +35,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/storage/mgmt/2015-05-01-preview/storage/client.go b/services/preview/storage/mgmt/2015-05-01-preview/storage/client.go index fae01bddfa74..4001962c50be 100644 --- a/services/preview/storage/mgmt/2015-05-01-preview/storage/client.go +++ b/services/preview/storage/mgmt/2015-05-01-preview/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/storage/mgmt/2015-05-01-preview/storage/storageapi/interfaces.go b/services/preview/storage/mgmt/2015-05-01-preview/storage/storageapi/interfaces.go index 7175f7d682e3..044f9060105d 100644 --- a/services/preview/storage/mgmt/2015-05-01-preview/storage/storageapi/interfaces.go +++ b/services/preview/storage/mgmt/2015-05-01-preview/storage/storageapi/interfaces.go @@ -30,7 +30,9 @@ type AccountsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) GetProperties(ctx context.Context, resourceGroupName string, accountName string) (result storage.Account, err error) List(ctx context.Context) (result storage.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result storage.AccountListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result storage.AccountListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result storage.AccountListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result storage.AccountKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, regenerateKey storage.AccountRegenerateKeyParameters) (result storage.AccountKeys, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters storage.AccountUpdateParameters) (result storage.Account, err error) diff --git a/services/preview/storage/mgmt/2015-05-01-preview/storage/usage.go b/services/preview/storage/mgmt/2015-05-01-preview/storage/usage.go index 21c3e7739487..c4e6bd2c323c 100644 --- a/services/preview/storage/mgmt/2015-05-01-preview/storage/usage.go +++ b/services/preview/storage/mgmt/2015-05-01-preview/storage/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/preview/storage/mgmt/2018-03-01-preview/storage/accounts.go b/services/preview/storage/mgmt/2018-03-01-preview/storage/accounts.go index 5b751060226b..20504fdfeaa3 100644 --- a/services/preview/storage/mgmt/2018-03-01-preview/storage/accounts.go +++ b/services/preview/storage/mgmt/2018-03-01-preview/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go b/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go index 7d6a2716d2b6..87236cb4e443 100644 --- a/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go +++ b/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go @@ -36,7 +36,8 @@ func NewBlobContainersClient(subscriptionID string) BlobContainersClient { return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client. +// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient { return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/storage/mgmt/2018-03-01-preview/storage/client.go b/services/preview/storage/mgmt/2018-03-01-preview/storage/client.go index e3479249802f..e07c3fa66f8e 100644 --- a/services/preview/storage/mgmt/2018-03-01-preview/storage/client.go +++ b/services/preview/storage/mgmt/2018-03-01-preview/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/storage/mgmt/2018-03-01-preview/storage/operations.go b/services/preview/storage/mgmt/2018-03-01-preview/storage/operations.go index 2ff4d401c29e..d75c490d9e68 100644 --- a/services/preview/storage/mgmt/2018-03-01-preview/storage/operations.go +++ b/services/preview/storage/mgmt/2018-03-01-preview/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/storage/mgmt/2018-03-01-preview/storage/skus.go b/services/preview/storage/mgmt/2018-03-01-preview/storage/skus.go index 5a3bff8b8613..83b21ac70923 100644 --- a/services/preview/storage/mgmt/2018-03-01-preview/storage/skus.go +++ b/services/preview/storage/mgmt/2018-03-01-preview/storage/skus.go @@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/storage/mgmt/2018-03-01-preview/storage/usages.go b/services/preview/storage/mgmt/2018-03-01-preview/storage/usages.go index 2e50f1e53a0c..50f89ce43ed9 100644 --- a/services/preview/storage/mgmt/2018-03-01-preview/storage/usages.go +++ b/services/preview/storage/mgmt/2018-03-01-preview/storage/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/caches.go b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/caches.go index d0f8741fd623..4f0fc4815c15 100644 --- a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/caches.go +++ b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/caches.go @@ -37,7 +37,8 @@ func NewCachesClient(subscriptionID string) CachesClient { return NewCachesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCachesClientWithBaseURI creates an instance of the CachesClient client. +// NewCachesClientWithBaseURI creates an instance of the CachesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCachesClientWithBaseURI(baseURI string, subscriptionID string) CachesClient { return CachesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/client.go b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/client.go index 1a9233396c35..c821a183eccd 100644 --- a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/client.go +++ b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/operations.go b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/operations.go index 56a2449617fb..be2ed3241143 100644 --- a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/operations.go +++ b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/skus.go b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/skus.go index 4bc65998a2a0..a2a8e92a0d49 100644 --- a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/skus.go +++ b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/skus.go @@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/storagecacheapi/interfaces.go b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/storagecacheapi/interfaces.go index 08b703df369e..62325a7208de 100644 --- a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/storagecacheapi/interfaces.go +++ b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/storagecacheapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result storagecache.APIOperationListResultPage, err error) + ListComplete(ctx context.Context) (result storagecache.APIOperationListResultIterator, err error) } var _ OperationsClientAPI = (*storagecache.OperationsClient)(nil) @@ -32,6 +33,7 @@ var _ OperationsClientAPI = (*storagecache.OperationsClient)(nil) // SkusClientAPI contains the set of methods on the SkusClient type. type SkusClientAPI interface { List(ctx context.Context) (result storagecache.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context) (result storagecache.ResourceSkusResultIterator, err error) } var _ SkusClientAPI = (*storagecache.SkusClient)(nil) @@ -39,6 +41,7 @@ var _ SkusClientAPI = (*storagecache.SkusClient)(nil) // UsageModelsClientAPI contains the set of methods on the UsageModelsClient type. type UsageModelsClientAPI interface { List(ctx context.Context) (result storagecache.UsageModelsResultPage, err error) + ListComplete(ctx context.Context) (result storagecache.UsageModelsResultIterator, err error) } var _ UsageModelsClientAPI = (*storagecache.UsageModelsClient)(nil) @@ -50,7 +53,9 @@ type CachesClientAPI interface { Flush(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.CachesFlushFuture, err error) Get(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.Cache, err error) List(ctx context.Context) (result storagecache.CachesListResultPage, err error) + ListComplete(ctx context.Context) (result storagecache.CachesListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result storagecache.CachesListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result storagecache.CachesListResultIterator, err error) Start(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.CachesStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.CachesStopFuture, err error) Update(ctx context.Context, resourceGroupName string, cacheName string, cache *storagecache.Cache) (result storagecache.Cache, err error) @@ -65,6 +70,7 @@ type StorageTargetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string) (result storagecache.StorageTargetsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string) (result storagecache.StorageTarget, err error) ListByCache(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.StorageTargetsResultPage, err error) + ListByCacheComplete(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.StorageTargetsResultIterator, err error) Update(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, storagetarget *storagecache.StorageTarget) (result storagecache.StorageTarget, err error) } diff --git a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/storagetargets.go b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/storagetargets.go index 18ef27d16dd5..1f83c4efed28 100644 --- a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/storagetargets.go +++ b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/storagetargets.go @@ -38,7 +38,8 @@ func NewStorageTargetsClient(subscriptionID string) StorageTargetsClient { return NewStorageTargetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageTargetsClientWithBaseURI creates an instance of the StorageTargetsClient client. +// NewStorageTargetsClientWithBaseURI creates an instance of the StorageTargetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStorageTargetsClientWithBaseURI(baseURI string, subscriptionID string) StorageTargetsClient { return StorageTargetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/usagemodels.go b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/usagemodels.go index 7a6eb3ab86f8..0c543377fc05 100644 --- a/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/usagemodels.go +++ b/services/preview/storagecache/mgmt/2019-08-01-preview/storagecache/usagemodels.go @@ -36,7 +36,8 @@ func NewUsageModelsClient(subscriptionID string) UsageModelsClient { return NewUsageModelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageModelsClientWithBaseURI creates an instance of the UsageModelsClient client. +// NewUsageModelsClientWithBaseURI creates an instance of the UsageModelsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageModelsClientWithBaseURI(baseURI string, subscriptionID string) UsageModelsClient { return UsageModelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/client.go b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/client.go index 96a9a19383cd..4fe0bdfcf87d 100644 --- a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/client.go +++ b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/client.go @@ -41,7 +41,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitions.go b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitions.go index 55e37cc5477c..1340f14e2f4a 100644 --- a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitions.go +++ b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitions.go @@ -37,7 +37,8 @@ func NewDefinitionsClient() DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitionsoperationmetadata.go b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitionsoperationmetadata.go index f14df59c45c1..50f21eb7a489 100644 --- a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitionsoperationmetadata.go +++ b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/definitionsoperationmetadata.go @@ -37,7 +37,8 @@ func NewDefinitionsOperationMetadataClient() DefinitionsOperationMetadataClient } // NewDefinitionsOperationMetadataClientWithBaseURI creates an instance of the DefinitionsOperationMetadataClient -// 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 NewDefinitionsOperationMetadataClientWithBaseURI(baseURI string) DefinitionsOperationMetadataClient { return DefinitionsOperationMetadataClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/subscriptionapi/interfaces.go b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/subscriptionapi/interfaces.go index 8c936dd39d2b..00909a985b02 100644 --- a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/subscriptionapi/interfaces.go +++ b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/subscriptionapi/interfaces.go @@ -26,6 +26,7 @@ import ( // DefinitionsOperationMetadataClientAPI contains the set of methods on the DefinitionsOperationMetadataClient type. type DefinitionsOperationMetadataClientAPI interface { List(ctx context.Context) (result subscription.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result subscription.OperationListResultIterator, err error) } var _ DefinitionsOperationMetadataClientAPI = (*subscription.DefinitionsOperationMetadataClient)(nil) @@ -36,6 +37,7 @@ type DefinitionsClientAPI interface { Get(ctx context.Context, subscriptionDefinitionName string) (result subscription.Definition, err error) GetOperationStatus(ctx context.Context, operationID uuid.UUID) (result subscription.Definition, err error) List(ctx context.Context) (result subscription.DefinitionListPage, err error) + ListComplete(ctx context.Context) (result subscription.DefinitionListIterator, err error) } var _ DefinitionsClientAPI = (*subscription.DefinitionsClient)(nil) diff --git a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/client.go b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/client.go index 55a35f760e12..bd8a7cab6791 100644 --- a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/client.go +++ b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/factory.go b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/factory.go index abdf7837ab9e..e22a790d2232 100644 --- a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/factory.go +++ b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/factory.go @@ -35,7 +35,8 @@ func NewFactoryClient() FactoryClient { return NewFactoryClientWithBaseURI(DefaultBaseURI) } -// NewFactoryClientWithBaseURI creates an instance of the FactoryClient client. +// NewFactoryClientWithBaseURI creates an instance of the FactoryClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFactoryClientWithBaseURI(baseURI string) FactoryClient { return FactoryClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/operations.go b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/operations.go index 5163b5ef878e..1abbb24c7234 100644 --- a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/operations.go +++ b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptionapi/interfaces.go b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptionapi/interfaces.go index 0dcc6ed61329..68f40be54860 100644 --- a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptionapi/interfaces.go +++ b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptionapi/interfaces.go @@ -40,6 +40,7 @@ var _ FactoryClientAPI = (*subscription.FactoryClient)(nil) type SubscriptionsClientAPI interface { Get(ctx context.Context, subscriptionID string) (result subscription.Model, err error) List(ctx context.Context) (result subscription.ListResultPage, err error) + ListComplete(ctx context.Context) (result subscription.ListResultIterator, err error) ListLocations(ctx context.Context, subscriptionID string) (result subscription.LocationListResult, err error) } @@ -48,6 +49,7 @@ var _ SubscriptionsClientAPI = (*subscription.SubscriptionsClient)(nil) // TenantsClientAPI contains the set of methods on the TenantsClient type. type TenantsClientAPI interface { List(ctx context.Context) (result subscription.TenantListResultPage, err error) + ListComplete(ctx context.Context) (result subscription.TenantListResultIterator, err error) } var _ TenantsClientAPI = (*subscription.TenantsClient)(nil) diff --git a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptions.go b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptions.go index 26d6dbe354ad..4b7acd673b40 100644 --- a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptions.go +++ b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptions.go @@ -35,7 +35,8 @@ func NewSubscriptionsClient() SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/tenants.go b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/tenants.go index 81b5181e80d6..c26db3e076d5 100644 --- a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/tenants.go +++ b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/tenants.go @@ -35,7 +35,8 @@ func NewTenantsClient() TenantsClient { return NewTenantsClientWithBaseURI(DefaultBaseURI) } -// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client. +// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantsClientWithBaseURI(baseURI string) TenantsClient { return TenantsClient{NewWithBaseURI(baseURI)} } diff --git a/services/preview/support/mgmt/2019-05-01-preview/support/client.go b/services/preview/support/mgmt/2019-05-01-preview/support/client.go new file mode 100644 index 000000000000..469f9ec4725e --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/client.go @@ -0,0 +1,52 @@ +// Package support implements the Azure ARM Support service API version 2019-05-01-preview. +// +// Microsoft Azure Support Resource Provider. +package support + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Support + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Support. +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/support/mgmt/2019-05-01-preview/support/communications.go b/services/preview/support/mgmt/2019-05-01-preview/support/communications.go new file mode 100644 index 000000000000..6370749ec401 --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/communications.go @@ -0,0 +1,430 @@ +package support + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CommunicationsClient is the microsoft Azure Support Resource Provider. +type CommunicationsClient struct { + BaseClient +} + +// NewCommunicationsClient creates an instance of the CommunicationsClient client. +func NewCommunicationsClient(subscriptionID string) CommunicationsClient { + return NewCommunicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCommunicationsClientWithBaseURI creates an instance of the CommunicationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewCommunicationsClientWithBaseURI(baseURI string, subscriptionID string) CommunicationsClient { + return CommunicationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability check the availability of a resource name. This API should to be used to check the uniqueness +// of the name for adding a new communication to the support ticket. +// Parameters: +// supportTicketName - support ticket name +// checkNameAvailabilityInput - input to check +func (client CommunicationsClient) CheckNameAvailability(ctx context.Context, supportTicketName string, checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunicationsClient.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: checkNameAvailabilityInput, + Constraints: []validation.Constraint{{Target: "checkNameAvailabilityInput.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("support.CommunicationsClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, supportTicketName, checkNameAvailabilityInput) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client CommunicationsClient) CheckNameAvailabilityPreparer(ctx context.Context, supportTicketName string, checkNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "supportTicketName": autorest.Encode("path", supportTicketName), + } + + const APIVersion = "2019-05-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.Support/supportTickets/{supportTicketName}/checkNameAvailability", pathParameters), + autorest.WithJSON(checkNameAvailabilityInput), + 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 CommunicationsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client CommunicationsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityOutput, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Create adds a new customer communication to an Azure support ticket. Adding attachments are not currently supported +// via the API.
To add a file to a support ticket, visit the Manage +// support ticket page in the Azure portal, select the support ticket, and use the file upload control to add a new +// file. +// Parameters: +// supportTicketName - support ticket name +// communicationName - communication name +// createCommunicationParameters - communication object +func (client CommunicationsClient) Create(ctx context.Context, supportTicketName string, communicationName string, createCommunicationParameters CommunicationDetails) (result CommunicationsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunicationsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: createCommunicationParameters, + Constraints: []validation.Constraint{{Target: "createCommunicationParameters.CommunicationDetailsProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createCommunicationParameters.CommunicationDetailsProperties.Subject", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createCommunicationParameters.CommunicationDetailsProperties.Body", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("support.CommunicationsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, supportTicketName, communicationName, createCommunicationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client CommunicationsClient) CreatePreparer(ctx context.Context, supportTicketName string, communicationName string, createCommunicationParameters CommunicationDetails) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "communicationName": autorest.Encode("path", communicationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "supportTicketName": autorest.Encode("path", supportTicketName), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + createCommunicationParameters.ID = nil + createCommunicationParameters.Name = nil + createCommunicationParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}", pathParameters), + autorest.WithJSON(createCommunicationParameters), + 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 CommunicationsClient) CreateSender(req *http.Request) (future CommunicationsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client CommunicationsClient) CreateResponder(resp *http.Response) (result CommunicationDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get returns details of a specific communication in a support ticket. +// Parameters: +// supportTicketName - support ticket name +// communicationName - communication name +func (client CommunicationsClient) Get(ctx context.Context, supportTicketName string, communicationName string) (result CommunicationDetails, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunicationsClient.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, supportTicketName, communicationName) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client CommunicationsClient) GetPreparer(ctx context.Context, supportTicketName string, communicationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "communicationName": autorest.Encode("path", communicationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "supportTicketName": autorest.Encode("path", supportTicketName), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client CommunicationsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CommunicationsClient) GetResponder(resp *http.Response) (result CommunicationDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all communications (attachments not included) for a support ticket.

You can also filter +// support ticket communications by CreatedDate�or CommunicationType using the $filter parameter. The +// only type of communication supported today is Web. Output will be a paged result with nextLink, using +// which you can retrieve the next set of Communication results.

Support ticket data is available for 12 +// months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an +// error. +// Parameters: +// supportTicketName - support ticket name +// top - the number of values to return in the collection. Default is 10 and max is 10. +// filter - the filter to apply on the operation. You can filter by communicationType and createdDate +// properties. CommunicationType supports Equals ('eq') operator and createdDate supports Greater Than ('gt') +// and Greater Than or Equals ('ge') operators. You may combine the CommunicationType and CreatedDate filters +// by Logical And ('and') operator. +func (client CommunicationsClient) List(ctx context.Context, supportTicketName string, top *int32, filter string) (result CommunicationsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunicationsClient.List") + defer func() { + sc := -1 + if result.clr.Response.Response != nil { + sc = result.clr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, supportTicketName, top, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.clr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "List", resp, "Failure sending request") + return + } + + result.clr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client CommunicationsClient) ListPreparer(ctx context.Context, supportTicketName string, top *int32, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "supportTicketName": autorest.Encode("path", supportTicketName), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications", 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 CommunicationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client CommunicationsClient) ListResponder(resp *http.Response) (result CommunicationsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client CommunicationsClient) listNextResults(ctx context.Context, lastResults CommunicationsListResult) (result CommunicationsListResult, err error) { + req, err := lastResults.communicationsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "support.CommunicationsClient", "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, "support.CommunicationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client CommunicationsClient) ListComplete(ctx context.Context, supportTicketName string, top *int32, filter string) (result CommunicationsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunicationsClient.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, supportTicketName, top, filter) + return +} diff --git a/services/preview/support/mgmt/2019-05-01-preview/support/models.go b/services/preview/support/mgmt/2019-05-01-preview/support/models.go new file mode 100644 index 000000000000..152d38129fbb --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/models.go @@ -0,0 +1,1008 @@ +package support + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/support/mgmt/2019-05-01-preview/support" + +// CommunicationDirection enumerates the values for communication direction. +type CommunicationDirection string + +const ( + // Inbound ... + Inbound CommunicationDirection = "inbound" + // Outbound ... + Outbound CommunicationDirection = "outbound" +) + +// PossibleCommunicationDirectionValues returns an array of possible values for the CommunicationDirection const type. +func PossibleCommunicationDirectionValues() []CommunicationDirection { + return []CommunicationDirection{Inbound, Outbound} +} + +// CommunicationType enumerates the values for communication type. +type CommunicationType string + +const ( + // Phone ... + Phone CommunicationType = "phone" + // Web ... + Web CommunicationType = "web" +) + +// PossibleCommunicationTypeValues returns an array of possible values for the CommunicationType const type. +func PossibleCommunicationTypeValues() []CommunicationType { + return []CommunicationType{Phone, Web} +} + +// PreferredContactMethod enumerates the values for preferred contact method. +type PreferredContactMethod string + +const ( + // PreferredContactMethodEmail ... + PreferredContactMethodEmail PreferredContactMethod = "email" + // PreferredContactMethodPhone ... + PreferredContactMethodPhone PreferredContactMethod = "phone" +) + +// PossiblePreferredContactMethodValues returns an array of possible values for the PreferredContactMethod const type. +func PossiblePreferredContactMethodValues() []PreferredContactMethod { + return []PreferredContactMethod{PreferredContactMethodEmail, PreferredContactMethodPhone} +} + +// SeverityLevel enumerates the values for severity level. +type SeverityLevel string + +const ( + // Critical ... + Critical SeverityLevel = "critical" + // Minimal ... + Minimal SeverityLevel = "minimal" + // Moderate ... + Moderate SeverityLevel = "moderate" +) + +// PossibleSeverityLevelValues returns an array of possible values for the SeverityLevel const type. +func PossibleSeverityLevelValues() []SeverityLevel { + return []SeverityLevel{Critical, Minimal, Moderate} +} + +// Type enumerates the values for type. +type Type string + +const ( + // MicrosoftSupportcommunications ... + MicrosoftSupportcommunications Type = "Microsoft.Support/communications" + // MicrosoftSupportsupportTickets ... + MicrosoftSupportsupportTickets Type = "Microsoft.Support/supportTickets" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{MicrosoftSupportcommunications, MicrosoftSupportsupportTickets} +} + +// CheckNameAvailabilityInput input of CheckNameAvailability API. +type CheckNameAvailabilityInput struct { + // Name - The resource name to validate + Name *string `json:"name,omitempty"` + // Type - The type of resource. Possible values include: 'MicrosoftSupportsupportTickets', 'MicrosoftSupportcommunications' + Type Type `json:"type,omitempty"` +} + +// CheckNameAvailabilityOutput output of check name availability API. +type CheckNameAvailabilityOutput struct { + autorest.Response `json:"-"` + // NameAvailable - READ-ONLY; Indicates whether the name is available. + NameAvailable *bool `json:"nameAvailable,omitempty"` + // Reason - READ-ONLY; The reason why the name is not available. + Reason *string `json:"reason,omitempty"` + // Message - READ-ONLY; The detailed error message describing why the name is not available. + Message *string `json:"message,omitempty"` +} + +// CommunicationDetails object that represents Communication resource +type CommunicationDetails struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the resource + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the resource 'Microsoft.Support/communications' + Type *string `json:"type,omitempty"` + // CommunicationDetailsProperties - Properties of the resource + *CommunicationDetailsProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CommunicationDetails. +func (cd CommunicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cd.CommunicationDetailsProperties != nil { + objectMap["properties"] = cd.CommunicationDetailsProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CommunicationDetails struct. +func (cd *CommunicationDetails) UnmarshalJSON(body []byte) error { + 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 + } + cd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cd.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cd.Type = &typeVar + } + case "properties": + if v != nil { + var communicationDetailsProperties CommunicationDetailsProperties + err = json.Unmarshal(*v, &communicationDetailsProperties) + if err != nil { + return err + } + cd.CommunicationDetailsProperties = &communicationDetailsProperties + } + } + } + + return nil +} + +// CommunicationDetailsProperties describes the properties of a communication resource. +type CommunicationDetailsProperties struct { + // CommunicationType - READ-ONLY; Communication type. Possible values include: 'Web', 'Phone' + CommunicationType CommunicationType `json:"communicationType,omitempty"` + // CommunicationDirection - READ-ONLY; Direction of communication. Possible values include: 'Inbound', 'Outbound' + CommunicationDirection CommunicationDirection `json:"communicationDirection,omitempty"` + // Sender - Email address of the sender + Sender *string `json:"sender,omitempty"` + // Subject - Subject of the communication + Subject *string `json:"subject,omitempty"` + // Body - Body of the communication + Body *string `json:"body,omitempty"` + // CreatedDate - READ-ONLY; Time in UTC (ISO 8601 format) when the communication was created. + CreatedDate *date.Time `json:"createdDate,omitempty"` +} + +// CommunicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CommunicationsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CommunicationsCreateFuture) Result(client CommunicationsClient) (cd CommunicationDetails, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("support.CommunicationsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cd.Response.Response, err = future.GetResult(sender); err == nil && cd.Response.Response.StatusCode != http.StatusNoContent { + cd, err = client.CreateResponder(cd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "support.CommunicationsCreateFuture", "Result", cd.Response.Response, "Failure responding to request") + } + } + return +} + +// CommunicationsListResult collection of Communication resources. +type CommunicationsListResult struct { + autorest.Response `json:"-"` + // Value - List of Communication resources. + Value *[]CommunicationDetails `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of Communication resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// CommunicationsListResultIterator provides access to a complete listing of CommunicationDetails values. +type CommunicationsListResultIterator struct { + i int + page CommunicationsListResultPage +} + +// 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 *CommunicationsListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunicationsListResultIterator.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 *CommunicationsListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CommunicationsListResultIterator) 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 CommunicationsListResultIterator) Response() CommunicationsListResult { + 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 CommunicationsListResultIterator) Value() CommunicationDetails { + if !iter.page.NotDone() { + return CommunicationDetails{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CommunicationsListResultIterator type. +func NewCommunicationsListResultIterator(page CommunicationsListResultPage) CommunicationsListResultIterator { + return CommunicationsListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (clr CommunicationsListResult) IsEmpty() bool { + return clr.Value == nil || len(*clr.Value) == 0 +} + +// communicationsListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (clr CommunicationsListResult) communicationsListResultPreparer(ctx context.Context) (*http.Request, error) { + if clr.NextLink == nil || len(to.String(clr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(clr.NextLink))) +} + +// CommunicationsListResultPage contains a page of CommunicationDetails values. +type CommunicationsListResultPage struct { + fn func(context.Context, CommunicationsListResult) (CommunicationsListResult, error) + clr CommunicationsListResult +} + +// 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 *CommunicationsListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunicationsListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.clr) + if err != nil { + return err + } + page.clr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *CommunicationsListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CommunicationsListResultPage) NotDone() bool { + return !page.clr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CommunicationsListResultPage) Response() CommunicationsListResult { + return page.clr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CommunicationsListResultPage) Values() []CommunicationDetails { + if page.clr.IsEmpty() { + return nil + } + return *page.clr.Value +} + +// Creates a new instance of the CommunicationsListResultPage type. +func NewCommunicationsListResultPage(getNextPage func(context.Context, CommunicationsListResult) (CommunicationsListResult, error)) CommunicationsListResultPage { + return CommunicationsListResultPage{fn: getNextPage} +} + +// ContactProfile contact information associated with support ticket. +type ContactProfile struct { + // FirstName - First name. + FirstName *string `json:"firstName,omitempty"` + // LastName - Last name. + LastName *string `json:"lastName,omitempty"` + // PreferredContactMethod - Preferred contact method. Possible values include: 'PreferredContactMethodEmail', 'PreferredContactMethodPhone' + PreferredContactMethod PreferredContactMethod `json:"preferredContactMethod,omitempty"` + // PrimaryEmailAddress - Primary email address. + PrimaryEmailAddress *string `json:"primaryEmailAddress,omitempty"` + // AdditionalEmailAddresses - Additional email addresses listed will be copied on any correspondence about the support ticket. + AdditionalEmailAddresses *[]string `json:"additionalEmailAddresses,omitempty"` + // PhoneNumber - Phone number. This is required if preferred contact method is phone. + PhoneNumber *string `json:"phoneNumber,omitempty"` + // PreferredTimeZone - Time zone of the user. This is the name of the time zone from Microsoft Time Zone Index Values. + PreferredTimeZone *string `json:"preferredTimeZone,omitempty"` + // Country - Country of the user. This is the ISO 3166-1 alpha-3 code. + Country *string `json:"country,omitempty"` + // PreferredSupportLanguage - Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket. Learn more at Azure Severity and responsiveness. Use the standard language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for German. + PreferredSupportLanguage *string `json:"preferredSupportLanguage,omitempty"` +} + +// Engineer support engineer information. +type Engineer struct { + // EmailAddress - READ-ONLY; Email address of the Azure Support engineer assigned to the support ticket. + EmailAddress *string `json:"emailAddress,omitempty"` +} + +// ExceptionResponse the api error. +type ExceptionResponse struct { + // Error - The api error details. + Error *ServiceError `json:"error,omitempty"` +} + +// Operation the operation supported by Microsoft Support RP. +type Operation struct { + // Name - READ-ONLY; Operation name: {provider}/{resource}/{operation} + Name *string `json:"name,omitempty"` + // Display - The object that describes the operation. + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay the object that describes the operation. +type OperationDisplay struct { + // Description - READ-ONLY; The description of the operation + Description *string `json:"description,omitempty"` + // Operation - READ-ONLY; The action that users can perform, based on their permission level + Operation *string `json:"operation,omitempty"` + // Provider - READ-ONLY; Service provider: Microsoft Support + Provider *string `json:"provider,omitempty"` + // Resource - READ-ONLY; Resource on which the operation is performed + Resource *string `json:"resource,omitempty"` +} + +// OperationsListResult the list of operations supported by Microsoft Support resource provider. +type OperationsListResult struct { + autorest.Response `json:"-"` + // Value - The list of operations supported by Microsoft Support resource provider. + Value *[]Operation `json:"value,omitempty"` +} + +// ProblemClassification problemClassification resource object +type ProblemClassification struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the resource + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the resource 'Microsoft.Support/problemClassification' + Type *string `json:"type,omitempty"` + // ProblemClassificationProperties - Properties of the resource + *ProblemClassificationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProblemClassification. +func (pc ProblemClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pc.ProblemClassificationProperties != nil { + objectMap["properties"] = pc.ProblemClassificationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProblemClassification struct. +func (pc *ProblemClassification) UnmarshalJSON(body []byte) error { + 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 + } + pc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pc.Type = &typeVar + } + case "properties": + if v != nil { + var problemClassificationProperties ProblemClassificationProperties + err = json.Unmarshal(*v, &problemClassificationProperties) + if err != nil { + return err + } + pc.ProblemClassificationProperties = &problemClassificationProperties + } + } + } + + return nil +} + +// ProblemClassificationProperties details about a problem classification available for an Azure service +type ProblemClassificationProperties struct { + // DisplayName - Localized name of problem classification. + DisplayName *string `json:"displayName,omitempty"` +} + +// ProblemClassificationsListResult collection of ProblemClassification resources +type ProblemClassificationsListResult struct { + autorest.Response `json:"-"` + // Value - List of ProblemClassification resources + Value *[]ProblemClassification `json:"value,omitempty"` +} + +// QuotaChangeRequest this property is required for providing the region and new quota limits +type QuotaChangeRequest struct { + // Region - Region for which the quota increase request is being made. + Region *string `json:"region,omitempty"` + // Payload - Payload of the quota increase request. + Payload *string `json:"payload,omitempty"` +} + +// QuotaTicketDetails additional set of information required for quota increase support ticket for certain +// quota types, e.g.: Virtual machine cores. Get complete details about Quota payload support request along +// with examples at Support quota +// request. +type QuotaTicketDetails struct { + // QuotaChangeRequestSubType - Required for certain quota types when there is a sub type that you are requesting quota increase for. Example: Batch + QuotaChangeRequestSubType *string `json:"quotaChangeRequestSubType,omitempty"` + // QuotaChangeRequestVersion - Quota change request version + QuotaChangeRequestVersion *string `json:"quotaChangeRequestVersion,omitempty"` + // QuotaChangeRequests - This property is required for providing the region and new quota limits. + QuotaChangeRequests *[]QuotaChangeRequest `json:"quotaChangeRequests,omitempty"` +} + +// Service object that represents a Service resource. +type Service struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the resource + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the resource 'Microsoft.Support/services' + Type *string `json:"type,omitempty"` + // ServiceProperties - Properties of the resource + *ServiceProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Service. +func (s Service) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if s.ServiceProperties != nil { + objectMap["properties"] = s.ServiceProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Service struct. +func (s *Service) UnmarshalJSON(body []byte) error { + 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 + } + 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 serviceProperties ServiceProperties + err = json.Unmarshal(*v, &serviceProperties) + if err != nil { + return err + } + s.ServiceProperties = &serviceProperties + } + } + } + + return nil +} + +// ServiceError the api error details. +type ServiceError struct { + // Code - The error code. + Code *string `json:"code,omitempty"` + // Message - The error message. + Message *string `json:"message,omitempty"` + // Target - The target of the error. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The list of error details. + Details *[]ServiceErrorDetail `json:"details,omitempty"` +} + +// ServiceErrorDetail the error details. +type ServiceErrorDetail struct { + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` + // Target - The target of the error. + Target *string `json:"target,omitempty"` +} + +// ServiceLevelAgreement service Level Agreement details for a support ticket. +type ServiceLevelAgreement struct { + // StartTime - READ-ONLY; Time in UTC (ISO 8601 format) when service level agreement starts. + StartTime *date.Time `json:"startTime,omitempty"` + // ExpirationTime - READ-ONLY; Time in UTC (ISO 8601 format) when service level agreement expires. + ExpirationTime *date.Time `json:"expirationTime,omitempty"` + // SLAMinutes - READ-ONLY; Service Level Agreement in minutes + SLAMinutes *int32 `json:"slaMinutes,omitempty"` +} + +// ServiceProperties details about Azure service available for support ticket creation +type ServiceProperties struct { + // DisplayName - Localized name of Azure service + DisplayName *string `json:"displayName,omitempty"` +} + +// ServicesListResult collection of Service resources. +type ServicesListResult struct { + autorest.Response `json:"-"` + // Value - List of Service resources + Value *[]Service `json:"value,omitempty"` +} + +// TechnicalTicketDetails additional information for technical support ticket. +type TechnicalTicketDetails struct { + // ResourceID - This is the resource id of the Azure service resource (For example: A virtual machine resource or an HDInsight resource) for which the support ticket is created. + ResourceID *string `json:"resourceId,omitempty"` +} + +// TicketDetails object that represents SupportTicketDetails resource +type TicketDetails struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the resource + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the resource 'Microsoft.Support/supportTickets' + Type *string `json:"type,omitempty"` + // TicketDetailsProperties - Properties of the resource + *TicketDetailsProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for TicketDetails. +func (td TicketDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if td.TicketDetailsProperties != nil { + objectMap["properties"] = td.TicketDetailsProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TicketDetails struct. +func (td *TicketDetails) UnmarshalJSON(body []byte) error { + 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 + } + td.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + td.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + td.Type = &typeVar + } + case "properties": + if v != nil { + var ticketDetailsProperties TicketDetailsProperties + err = json.Unmarshal(*v, &ticketDetailsProperties) + if err != nil { + return err + } + td.TicketDetailsProperties = &ticketDetailsProperties + } + } + } + + return nil +} + +// TicketDetailsProperties describes the properties of a support ticket. +type TicketDetailsProperties struct { + // SupportTicketID - System generated support ticket id that is unique. + SupportTicketID *string `json:"supportTicketId,omitempty"` + // Description - Detailed description of the question or issue. + Description *string `json:"description,omitempty"` + // ProblemClassificationID - Each Azure service has its own set of issue category called problem classification that corresponds to the type of problem you're experiencing. This parameter is the resource id of ProblemClassification resource. + ProblemClassificationID *string `json:"problemClassificationId,omitempty"` + // ProblemClassificationDisplayName - READ-ONLY; Localized name of problem classification. + ProblemClassificationDisplayName *string `json:"problemClassificationDisplayName,omitempty"` + // Severity - A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Possible values include: 'Minimal', 'Moderate', 'Critical' + Severity SeverityLevel `json:"severity,omitempty"` + // EnrollmentID - READ-ONLY; Enrollment ID associated with the support ticket. + EnrollmentID *string `json:"enrollmentId,omitempty"` + // ProductionOutage - READ-ONLY; Indicates if this issue is a production outage. + ProductionOutage *bool `json:"productionOutage,omitempty"` + // Require24X7Response - Indicates if this requires a 24x7 response from Azure. + Require24X7Response *bool `json:"require24X7Response,omitempty"` + // ContactDetails - Contact information of the user requesting to create a support ticket. + ContactDetails *ContactProfile `json:"contactDetails,omitempty"` + // ServiceLevelAgreement - Service Level Agreement information for this support ticket. + ServiceLevelAgreement *ServiceLevelAgreement `json:"serviceLevelAgreement,omitempty"` + // SupportEngineer - Information about support engineer working on this support ticket. + SupportEngineer *Engineer `json:"supportEngineer,omitempty"` + // SupportPlanType - READ-ONLY; Support plan type associated with the support ticket. + SupportPlanType *string `json:"supportPlanType,omitempty"` + // Title - Title of the support ticket. + Title *string `json:"title,omitempty"` + // ProblemStartTime - Time in UTC (ISO 8601 format) when the problem started. + ProblemStartTime *date.Time `json:"problemStartTime,omitempty"` + // ServiceID - This is the resource id of the Azure service resource associated with the support ticket. + ServiceID *string `json:"serviceId,omitempty"` + // ServiceDisplayName - READ-ONLY; Localized name of Azure service. + ServiceDisplayName *string `json:"serviceDisplayName,omitempty"` + // Status - READ-ONLY; Status of the support ticket. + Status *string `json:"status,omitempty"` + // CreatedDate - READ-ONLY; Time in UTC (ISO 8601 format) when support ticket was created. + CreatedDate *date.Time `json:"createdDate,omitempty"` + // ModifiedDate - READ-ONLY; Time in UTC (ISO 8601 format) when support ticket was last modified. + ModifiedDate *date.Time `json:"modifiedDate,omitempty"` + // TechnicalTicketDetails - Additional ticket details associated with a technical support ticket request. + TechnicalTicketDetails *TechnicalTicketDetails `json:"technicalTicketDetails,omitempty"` + // QuotaTicketDetails - Additional ticket details associated with a quota support ticket request. + QuotaTicketDetails *QuotaTicketDetails `json:"quotaTicketDetails,omitempty"` +} + +// TicketsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type TicketsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *TicketsCreateFuture) Result(client TicketsClient) (td TicketDetails, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("support.TicketsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if td.Response.Response, err = future.GetResult(sender); err == nil && td.Response.Response.StatusCode != http.StatusNoContent { + td, err = client.CreateResponder(td.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsCreateFuture", "Result", td.Response.Response, "Failure responding to request") + } + } + return +} + +// TicketsListResult object that represents a collection of SupportTicket resources. +type TicketsListResult struct { + autorest.Response `json:"-"` + // Value - List of SupportTicket resources. + Value *[]TicketDetails `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of SupportTicket resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// TicketsListResultIterator provides access to a complete listing of TicketDetails values. +type TicketsListResultIterator struct { + i int + page TicketsListResultPage +} + +// 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 *TicketsListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TicketsListResultIterator.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 *TicketsListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TicketsListResultIterator) 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 TicketsListResultIterator) Response() TicketsListResult { + 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 TicketsListResultIterator) Value() TicketDetails { + if !iter.page.NotDone() { + return TicketDetails{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TicketsListResultIterator type. +func NewTicketsListResultIterator(page TicketsListResultPage) TicketsListResultIterator { + return TicketsListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (tlr TicketsListResult) IsEmpty() bool { + return tlr.Value == nil || len(*tlr.Value) == 0 +} + +// ticketsListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (tlr TicketsListResult) ticketsListResultPreparer(ctx context.Context) (*http.Request, error) { + if tlr.NextLink == nil || len(to.String(tlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(tlr.NextLink))) +} + +// TicketsListResultPage contains a page of TicketDetails values. +type TicketsListResultPage struct { + fn func(context.Context, TicketsListResult) (TicketsListResult, error) + tlr TicketsListResult +} + +// 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 *TicketsListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TicketsListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.tlr) + if err != nil { + return err + } + page.tlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *TicketsListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TicketsListResultPage) NotDone() bool { + return !page.tlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page TicketsListResultPage) Response() TicketsListResult { + return page.tlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TicketsListResultPage) Values() []TicketDetails { + if page.tlr.IsEmpty() { + return nil + } + return *page.tlr.Value +} + +// Creates a new instance of the TicketsListResultPage type. +func NewTicketsListResultPage(getNextPage func(context.Context, TicketsListResult) (TicketsListResult, error)) TicketsListResultPage { + return TicketsListResultPage{fn: getNextPage} +} + +// UpdateContactProfile contact information associated with the support ticket. +type UpdateContactProfile struct { + // FirstName - First name + FirstName *string `json:"firstName,omitempty"` + // LastName - Last name + LastName *string `json:"lastName,omitempty"` + // PreferredContactMethod - Preferred contact method. Possible values include: 'PreferredContactMethodEmail', 'PreferredContactMethodPhone' + PreferredContactMethod PreferredContactMethod `json:"preferredContactMethod,omitempty"` + // PrimaryEmailAddress - Primary email address + PrimaryEmailAddress *string `json:"primaryEmailAddress,omitempty"` + // AdditionalEmailAddresses - Email addresses listed will be copied on any correspondence about the support ticket + AdditionalEmailAddresses *[]string `json:"additionalEmailAddresses,omitempty"` + // PhoneNumber - Phone number. This is required if preferred contact method is phone. + PhoneNumber *string `json:"phoneNumber,omitempty"` + // PreferredTimeZone - Time zone of the user. This is the name of the time zone from Microsoft Time Zone Index Values. + PreferredTimeZone *string `json:"preferredTimeZone,omitempty"` + // Country - Country of the user. This is the ISO 3166-1 alpha-3 code. + Country *string `json:"country,omitempty"` + // PreferredSupportLanguage - Preferred language of support from Azure. Support languages vary based on the severity you choose for your support ticket. Learn more at Azure Severity and responsiveness. Use the standard language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for German. + PreferredSupportLanguage *string `json:"preferredSupportLanguage,omitempty"` +} + +// UpdateSupportTicket updates severity and contact details in the support ticket. +type UpdateSupportTicket struct { + // Severity - Severity level. Possible values include: 'Minimal', 'Moderate', 'Critical' + Severity SeverityLevel `json:"severity,omitempty"` + // ContactDetails - Contact details to be updated on the support ticket. + ContactDetails *UpdateContactProfile `json:"contactDetails,omitempty"` +} diff --git a/services/preview/support/mgmt/2019-05-01-preview/support/operations.go b/services/preview/support/mgmt/2019-05-01-preview/support/operations.go new file mode 100644 index 000000000000..56b2ea58ec25 --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/operations.go @@ -0,0 +1,110 @@ +package support + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the microsoft Azure Support Resource Provider. +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 this lists all the available Microsoft Support REST API operations. +func (client OperationsClient) List(ctx context.Context) (result OperationsListResult, 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, "support.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, "support.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Support/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/support/mgmt/2019-05-01-preview/support/problemclassifications.go b/services/preview/support/mgmt/2019-05-01-preview/support/problemclassifications.go new file mode 100644 index 000000000000..20eb3478210e --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/problemclassifications.go @@ -0,0 +1,195 @@ +package support + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProblemClassificationsClient is the microsoft Azure Support Resource Provider. +type ProblemClassificationsClient struct { + BaseClient +} + +// NewProblemClassificationsClient creates an instance of the ProblemClassificationsClient client. +func NewProblemClassificationsClient(subscriptionID string) ProblemClassificationsClient { + return NewProblemClassificationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProblemClassificationsClientWithBaseURI creates an instance of the ProblemClassificationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewProblemClassificationsClientWithBaseURI(baseURI string, subscriptionID string) ProblemClassificationsClient { + return ProblemClassificationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the details of a specific problem classification for a specific Azure service. +// Parameters: +// serviceName - name of Azure service available for support. +// problemClassificationName - name of problem classification. +func (client ProblemClassificationsClient) Get(ctx context.Context, serviceName string, problemClassificationName string) (result ProblemClassification, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProblemClassificationsClient.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, serviceName, problemClassificationName) + if err != nil { + err = autorest.NewErrorWithError(err, "support.ProblemClassificationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.ProblemClassificationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.ProblemClassificationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProblemClassificationsClient) GetPreparer(ctx context.Context, serviceName string, problemClassificationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "problemClassificationName": autorest.Encode("path", problemClassificationName), + "serviceName": autorest.Encode("path", serviceName), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/providers/Microsoft.Support/services/{serviceName}/problemClassifications/{problemClassificationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProblemClassificationsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProblemClassificationsClient) GetResponder(resp *http.Response) (result ProblemClassification, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the problem classifications (categories) available for a specific Azure service.

Always use +// the service and problem classifications obtained programmatically. This practice ensures that you always have the +// most recent set of service and problem classification Ids. +// Parameters: +// serviceName - name of Azure service for which the problem classifications need to be retrieved. +func (client ProblemClassificationsClient) List(ctx context.Context, serviceName string) (result ProblemClassificationsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProblemClassificationsClient.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, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "support.ProblemClassificationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.ProblemClassificationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.ProblemClassificationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProblemClassificationsClient) ListPreparer(ctx context.Context, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceName": autorest.Encode("path", serviceName), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/providers/Microsoft.Support/services/{serviceName}/problemClassifications", 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 ProblemClassificationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProblemClassificationsClient) ListResponder(resp *http.Response) (result ProblemClassificationsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/support/mgmt/2019-05-01-preview/support/services.go b/services/preview/support/mgmt/2019-05-01-preview/support/services.go new file mode 100644 index 000000000000..2e9dfd5821fd --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/services.go @@ -0,0 +1,194 @@ +package support + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ServicesClient is the microsoft Azure Support Resource Provider. +type ServicesClient struct { + BaseClient +} + +// NewServicesClient creates an instance of the ServicesClient client. +func NewServicesClient(subscriptionID string) ServicesClient { + return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { + return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a specific Azure service for support ticket creation. +// Parameters: +// serviceName - name of Azure service +func (client ServicesClient) Get(ctx context.Context, serviceName string) (result Service, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.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, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "support.ServicesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.ServicesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.ServicesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServicesClient) GetPreparer(ctx context.Context, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceName": autorest.Encode("path", serviceName), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/providers/Microsoft.Support/services/{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 ServicesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServicesClient) GetResponder(resp *http.Response) (result Service, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the Azure services available for support ticket creation. Here are the Service Ids for **Billing**, +// **Subscription Management**, and **Service and subscription limits (Quotas)** issues:
Issue +// typeService +// Id
Billing'/providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc'
Subscription +// Management'/providers/Microsoft.Support/services/f3dc5421-79ef-1efa-41a5-42bf3cbb52c6'
Quota'/providers/Microsoft.Support/services/06bfd9d3-516b-d5c6-5802-169c800dec89'
+//

For **Technical** issues, select the Service Id that maps to the Azure service/product as displayed in +// the **Services** drop-down list on the Azure portal's New support request +// page.

Always use the service and it's corresponding problem classification(s) obtained programmatically +// for support ticket creation. This practice ensures that you always have the most recent set of service and problem +// classification Ids. +func (client ServicesClient) List(ctx context.Context) (result ServicesListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.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, "support.ServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.ServicesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.ServicesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ServicesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Support/services"), + 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 ServicesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServicesClient) ListResponder(resp *http.Response) (result ServicesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/support/mgmt/2019-05-01-preview/support/supportapi/interfaces.go b/services/preview/support/mgmt/2019-05-01-preview/support/supportapi/interfaces.go new file mode 100644 index 000000000000..185016f69cd6 --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/supportapi/interfaces.go @@ -0,0 +1,69 @@ +package supportapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/support/mgmt/2019-05-01-preview/support" +) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result support.OperationsListResult, err error) +} + +var _ OperationsClientAPI = (*support.OperationsClient)(nil) + +// ServicesClientAPI contains the set of methods on the ServicesClient type. +type ServicesClientAPI interface { + Get(ctx context.Context, serviceName string) (result support.Service, err error) + List(ctx context.Context) (result support.ServicesListResult, err error) +} + +var _ ServicesClientAPI = (*support.ServicesClient)(nil) + +// ProblemClassificationsClientAPI contains the set of methods on the ProblemClassificationsClient type. +type ProblemClassificationsClientAPI interface { + Get(ctx context.Context, serviceName string, problemClassificationName string) (result support.ProblemClassification, err error) + List(ctx context.Context, serviceName string) (result support.ProblemClassificationsListResult, err error) +} + +var _ ProblemClassificationsClientAPI = (*support.ProblemClassificationsClient)(nil) + +// TicketsClientAPI contains the set of methods on the TicketsClient type. +type TicketsClientAPI interface { + CheckNameAvailability(ctx context.Context, checkNameAvailabilityInput support.CheckNameAvailabilityInput) (result support.CheckNameAvailabilityOutput, err error) + Create(ctx context.Context, supportTicketName string, createSupportTicketParameters support.TicketDetails) (result support.TicketsCreateFuture, err error) + Get(ctx context.Context, supportTicketName string) (result support.TicketDetails, err error) + List(ctx context.Context, top *int32, filter string) (result support.TicketsListResultPage, err error) + ListComplete(ctx context.Context, top *int32, filter string) (result support.TicketsListResultIterator, err error) + Update(ctx context.Context, supportTicketName string, updateSupportTicket support.UpdateSupportTicket) (result support.TicketDetails, err error) +} + +var _ TicketsClientAPI = (*support.TicketsClient)(nil) + +// CommunicationsClientAPI contains the set of methods on the CommunicationsClient type. +type CommunicationsClientAPI interface { + CheckNameAvailability(ctx context.Context, supportTicketName string, checkNameAvailabilityInput support.CheckNameAvailabilityInput) (result support.CheckNameAvailabilityOutput, err error) + Create(ctx context.Context, supportTicketName string, communicationName string, createCommunicationParameters support.CommunicationDetails) (result support.CommunicationsCreateFuture, err error) + Get(ctx context.Context, supportTicketName string, communicationName string) (result support.CommunicationDetails, err error) + List(ctx context.Context, supportTicketName string, top *int32, filter string) (result support.CommunicationsListResultPage, err error) + ListComplete(ctx context.Context, supportTicketName string, top *int32, filter string) (result support.CommunicationsListResultIterator, err error) +} + +var _ CommunicationsClientAPI = (*support.CommunicationsClient)(nil) diff --git a/services/preview/support/mgmt/2019-05-01-preview/support/tickets.go b/services/preview/support/mgmt/2019-05-01-preview/support/tickets.go new file mode 100644 index 000000000000..68aca7ea9cfe --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/tickets.go @@ -0,0 +1,517 @@ +package support + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TicketsClient is the microsoft Azure Support Resource Provider. +type TicketsClient struct { + BaseClient +} + +// NewTicketsClient creates an instance of the TicketsClient client. +func NewTicketsClient(subscriptionID string) TicketsClient { + return NewTicketsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTicketsClientWithBaseURI creates an instance of the TicketsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewTicketsClientWithBaseURI(baseURI string, subscriptionID string) TicketsClient { + return TicketsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability check the availability of a resource name. This API should to be used to check the uniqueness +// of the name for support ticket creation for the selected subscription. +// Parameters: +// checkNameAvailabilityInput - input to check. +func (client TicketsClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TicketsClient.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: checkNameAvailabilityInput, + Constraints: []validation.Constraint{{Target: "checkNameAvailabilityInput.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("support.TicketsClient", "CheckNameAvailability", err.Error()) + } + + req, err := client.CheckNameAvailabilityPreparer(ctx, checkNameAvailabilityInput) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.TicketsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client TicketsClient) CheckNameAvailabilityPreparer(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-05-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.Support/checkNameAvailability", pathParameters), + autorest.WithJSON(checkNameAvailabilityInput), + 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 TicketsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client TicketsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityOutput, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Create creates a new support ticket for Quota increase, Technical, Billing, and Subscription Management issues for +// the specified subscription.

A paid technical support plan is required to create a support ticket using +// this API. Learn more

Use the Services API to map the right +// Service Id to the issue type. For example: For billing tickets set *serviceId* to +// *'/providers/Microsoft.Support/services/517f2da6-78fd-0498-4e22-ad26996b1dfc'*.
For Technical issues, the +// Service id will map to the Azure service you want to raise a support ticket for.

Always call the Services +// and ProblemClassifications API to get the most recent set of services and problem categories required for support +// ticket creation. +// Parameters: +// supportTicketName - support ticket name. +// createSupportTicketParameters - support ticket request payload. +func (client TicketsClient) Create(ctx context.Context, supportTicketName string, createSupportTicketParameters TicketDetails) (result TicketsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TicketsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: createSupportTicketParameters, + Constraints: []validation.Constraint{{Target: "createSupportTicketParameters.TicketDetailsProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createSupportTicketParameters.TicketDetailsProperties.Description", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.ProblemClassificationID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.ContactDetails", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "createSupportTicketParameters.TicketDetailsProperties.ContactDetails.FirstName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.ContactDetails.LastName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.ContactDetails.PrimaryEmailAddress", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.ContactDetails.PreferredTimeZone", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.ContactDetails.Country", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.ContactDetails.PreferredSupportLanguage", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.Title", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createSupportTicketParameters.TicketDetailsProperties.ServiceID", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("support.TicketsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, supportTicketName, createSupportTicketParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client TicketsClient) CreatePreparer(ctx context.Context, supportTicketName string, createSupportTicketParameters TicketDetails) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "supportTicketName": autorest.Encode("path", supportTicketName), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + createSupportTicketParameters.ID = nil + createSupportTicketParameters.Name = nil + createSupportTicketParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}", pathParameters), + autorest.WithJSON(createSupportTicketParameters), + 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 TicketsClient) CreateSender(req *http.Request) (future TicketsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client TicketsClient) CreateResponder(resp *http.Response) (result TicketDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets details for a specific support ticket in an Azure subscription.

Support ticket data is available +// for 12 months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause +// an error. +// Parameters: +// supportTicketName - support ticket name +func (client TicketsClient) Get(ctx context.Context, supportTicketName string) (result TicketDetails, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TicketsClient.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, supportTicketName) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.TicketsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client TicketsClient) GetPreparer(ctx context.Context, supportTicketName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "supportTicketName": autorest.Encode("path", supportTicketName), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client TicketsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client TicketsClient) GetResponder(resp *http.Response) (result TicketDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the support tickets for an Azure subscription.

You can also filter the support tickets by +// Status or CreatedDate using the $filter parameter. Output will be a paged result with nextLink, +// using which you can retrieve the next set of support tickets.

Support ticket data is available for 12 +// months after ticket creation. If a ticket was created more than 12 months ago, a request for data might cause an +// error. +// Parameters: +// top - the number of values to return in the collection. Default is 25 and max is 100. +// filter - the filter to apply on the operation. We support 'odata v4.0' filter semantics. Learn more
Status +// filter can only be used with 'eq' operator. For CreatedDate filter, the supported operators are 'gt' +// and 'ge'. When using both filters, combine them using the logical 'AND'. +func (client TicketsClient) List(ctx context.Context, top *int32, filter string) (result TicketsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TicketsClient.List") + defer func() { + sc := -1 + if result.tlr.Response.Response != nil { + sc = result.tlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, top, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.tlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.TicketsClient", "List", resp, "Failure sending request") + return + } + + result.tlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client TicketsClient) ListPreparer(ctx context.Context, top *int32, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets", 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 TicketsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client TicketsClient) ListResponder(resp *http.Response) (result TicketsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client TicketsClient) listNextResults(ctx context.Context, lastResults TicketsListResult) (result TicketsListResult, err error) { + req, err := lastResults.ticketsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "support.TicketsClient", "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, "support.TicketsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client TicketsClient) ListComplete(ctx context.Context, top *int32, filter string) (result TicketsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TicketsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, top, filter) + return +} + +// Update this API allows you to update the severity level or your contact information in the support ticket. +//

Note: The severity levels cannot be changed if a support ticket is actively being worked upon by an Azure +// support engineer. In such a case, contact your support engineer to request severity update by adding a new +// communication using the Communications API. +// Parameters: +// supportTicketName - support ticket name +// updateSupportTicket - updateSupportTicket object +func (client TicketsClient) Update(ctx context.Context, supportTicketName string, updateSupportTicket UpdateSupportTicket) (result TicketDetails, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TicketsClient.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, supportTicketName, updateSupportTicket) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "support.TicketsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "support.TicketsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client TicketsClient) UpdatePreparer(ctx context.Context, supportTicketName string, updateSupportTicket UpdateSupportTicket) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "supportTicketName": autorest.Encode("path", supportTicketName), + } + + const APIVersion = "2019-05-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}/providers/Microsoft.Support/supportTickets/{supportTicketName}", pathParameters), + autorest.WithJSON(updateSupportTicket), + 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 TicketsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client TicketsClient) UpdateResponder(resp *http.Response) (result TicketDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/support/mgmt/2019-05-01-preview/support/version.go b/services/preview/support/mgmt/2019-05-01-preview/support/version.go new file mode 100644 index 000000000000..0962b9a95823 --- /dev/null +++ b/services/preview/support/mgmt/2019-05-01-preview/support/version.go @@ -0,0 +1,30 @@ +package support + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " support/2019-05-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/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/accesspolicies.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/accesspolicies.go index 47bdb4a7eb43..fe6de87afa6b 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/accesspolicies.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/accesspolicies.go @@ -36,7 +36,8 @@ func NewAccessPoliciesClient(subscriptionID string) AccessPoliciesClient { return NewAccessPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccessPoliciesClientWithBaseURI creates an instance of the AccessPoliciesClient client. +// NewAccessPoliciesClientWithBaseURI creates an instance of the AccessPoliciesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccessPoliciesClientWithBaseURI(baseURI string, subscriptionID string) AccessPoliciesClient { return AccessPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/client.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/client.go index b8f0c51df84d..de07462c1acb 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/client.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go index fdda60049e0d..701ad170a5e7 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go @@ -36,7 +36,8 @@ func NewEnvironmentsClient(subscriptionID string) EnvironmentsClient { return NewEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client. +// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) EnvironmentsClient { return EnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/eventsources.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/eventsources.go index 1be9113b4094..89b77ddf304c 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/eventsources.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/eventsources.go @@ -36,7 +36,8 @@ func NewEventSourcesClient(subscriptionID string) EventSourcesClient { return NewEventSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSourcesClientWithBaseURI creates an instance of the EventSourcesClient client. +// NewEventSourcesClientWithBaseURI creates an instance of the EventSourcesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventSourcesClientWithBaseURI(baseURI string, subscriptionID string) EventSourcesClient { return EventSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/operations.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/operations.go index d6c8b79ba3ab..87a030ab8dcb 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/operations.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/referencedatasets.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/referencedatasets.go index 3c8907ffc313..cbc6e03dcd8e 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/referencedatasets.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/referencedatasets.go @@ -36,7 +36,9 @@ func NewReferenceDataSetsClient(subscriptionID string) ReferenceDataSetsClient { return NewReferenceDataSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReferenceDataSetsClientWithBaseURI creates an instance of the ReferenceDataSetsClient client. +// NewReferenceDataSetsClientWithBaseURI creates an instance of the ReferenceDataSetsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReferenceDataSetsClientWithBaseURI(baseURI string, subscriptionID string) ReferenceDataSetsClient { return ReferenceDataSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go index 44958618d532..872645533c21 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result timeseriesinsights.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result timeseriesinsights.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*timeseriesinsights.OperationsClient)(nil) diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/accesspolicies.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/accesspolicies.go index 1be7bd388fb6..10fc432f1e4f 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/accesspolicies.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/accesspolicies.go @@ -36,7 +36,8 @@ func NewAccessPoliciesClient(subscriptionID string) AccessPoliciesClient { return NewAccessPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccessPoliciesClientWithBaseURI creates an instance of the AccessPoliciesClient client. +// NewAccessPoliciesClientWithBaseURI creates an instance of the AccessPoliciesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccessPoliciesClientWithBaseURI(baseURI string, subscriptionID string) AccessPoliciesClient { return AccessPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/client.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/client.go index 6c9ee7e14e07..4cfd9b369b81 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/client.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go index 0b32fb932fde..110881e1211f 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go @@ -36,7 +36,8 @@ func NewEnvironmentsClient(subscriptionID string) EnvironmentsClient { return NewEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client. +// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) EnvironmentsClient { return EnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/eventsources.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/eventsources.go index 33fb97dd10a6..d62d38de4eab 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/eventsources.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/eventsources.go @@ -36,7 +36,8 @@ func NewEventSourcesClient(subscriptionID string) EventSourcesClient { return NewEventSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventSourcesClientWithBaseURI creates an instance of the EventSourcesClient client. +// NewEventSourcesClientWithBaseURI creates an instance of the EventSourcesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventSourcesClientWithBaseURI(baseURI string, subscriptionID string) EventSourcesClient { return EventSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/operations.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/operations.go index 42bb92d87905..e9c59b906387 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/operations.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/referencedatasets.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/referencedatasets.go index d4947354d9f0..5e3b98861443 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/referencedatasets.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/referencedatasets.go @@ -36,7 +36,9 @@ func NewReferenceDataSetsClient(subscriptionID string) ReferenceDataSetsClient { return NewReferenceDataSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReferenceDataSetsClientWithBaseURI creates an instance of the ReferenceDataSetsClient client. +// NewReferenceDataSetsClientWithBaseURI creates an instance of the ReferenceDataSetsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReferenceDataSetsClientWithBaseURI(baseURI string, subscriptionID string) ReferenceDataSetsClient { return ReferenceDataSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go index 66a97d23eb30..33fbc2136231 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/timeseriesinsightsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result timeseriesinsights.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result timeseriesinsights.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*timeseriesinsights.OperationsClient)(nil) diff --git a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/client.go b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/client.go index 950ec82bbac0..905ae519d25f 100644 --- a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/client.go +++ b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/endpoints.go b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/endpoints.go index 8fd56d390429..05d6e7f6ad56 100644 --- a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/endpoints.go +++ b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/endpoints.go @@ -35,7 +35,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/geographichierarchies.go b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/geographichierarchies.go index c1426b5a7823..b2b53316ecd7 100644 --- a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/geographichierarchies.go +++ b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/geographichierarchies.go @@ -35,7 +35,9 @@ func NewGeographicHierarchiesClient(subscriptionID string) GeographicHierarchies return NewGeographicHierarchiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client. +// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewGeographicHierarchiesClientWithBaseURI(baseURI string, subscriptionID string) GeographicHierarchiesClient { return GeographicHierarchiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/heatmap.go b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/heatmap.go index da8862c29cc3..4da6a0ce8a4c 100644 --- a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/heatmap.go +++ b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/heatmap.go @@ -36,7 +36,8 @@ func NewHeatMapClient(subscriptionID string) HeatMapClient { return NewHeatMapClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client. +// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewHeatMapClientWithBaseURI(baseURI string, subscriptionID string) HeatMapClient { return HeatMapClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/profiles.go b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/profiles.go index 4877970c711f..c845dda4f763 100644 --- a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/profiles.go +++ b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/usermetricskeys.go b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/usermetricskeys.go index 35c284d3f2d0..aaa153f486dc 100644 --- a/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/usermetricskeys.go +++ b/services/preview/trafficmanager/mgmt/2017-09-01-preview/trafficmanager/usermetricskeys.go @@ -35,7 +35,8 @@ func NewUserMetricsKeysClient(subscriptionID string) UserMetricsKeysClient { return NewUserMetricsKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserMetricsKeysClientWithBaseURI creates an instance of the UserMetricsKeysClient client. +// NewUserMetricsKeysClientWithBaseURI creates an instance of the UserMetricsKeysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserMetricsKeysClientWithBaseURI(baseURI string, subscriptionID string) UserMetricsKeysClient { return UserMetricsKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/client.go b/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/client.go index 49f0f00ef0f6..e64a12f62e0e 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/client.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/operations.go b/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/operations.go index 6300dfe5e074..91172626880d 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/operations.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go b/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go index 009812469b62..21f715e1a834 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go @@ -29,8 +29,11 @@ type VirtualMachineImageTemplateClientAPI interface { Get(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.ImageTemplate, err error) GetRunOutput(ctx context.Context, resourceGroupName string, imageTemplateName string, runOutputName string) (result virtualmachineimagebuilder.RunOutput, err error) List(ctx context.Context) (result virtualmachineimagebuilder.ImageTemplateListResultPage, err error) + ListComplete(ctx context.Context) (result virtualmachineimagebuilder.ImageTemplateListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result virtualmachineimagebuilder.ImageTemplateListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result virtualmachineimagebuilder.ImageTemplateListResultIterator, err error) ListRunOutputs(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.RunOutputCollectionPage, err error) + ListRunOutputsComplete(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.RunOutputCollectionIterator, err error) Run(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.VirtualMachineImageTemplateRunFuture, err error) Update(ctx context.Context, parameters virtualmachineimagebuilder.ImageTemplateUpdateParameters, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.ImageTemplate, err error) } @@ -40,6 +43,7 @@ var _ VirtualMachineImageTemplateClientAPI = (*virtualmachineimagebuilder.Virtua // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result virtualmachineimagebuilder.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result virtualmachineimagebuilder.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*virtualmachineimagebuilder.OperationsClient)(nil) diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplate.go b/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplate.go index 160f0eb058e6..ab1656cae7e7 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplate.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2018-02-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplate.go @@ -36,7 +36,9 @@ func NewVirtualMachineImageTemplateClient(subscriptionID string) VirtualMachineI return NewVirtualMachineImageTemplateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImageTemplateClientWithBaseURI creates an instance of the VirtualMachineImageTemplateClient client. +// NewVirtualMachineImageTemplateClientWithBaseURI creates an instance of the VirtualMachineImageTemplateClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewVirtualMachineImageTemplateClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImageTemplateClient { return VirtualMachineImageTemplateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/client.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/client.go index bee46ec97dd2..02e553b137ed 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/client.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/operations.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/operations.go index 706a2c671fcb..5a1135d2e45a 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/operations.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go index 2082ac1d0277..9c1bded40c57 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go @@ -29,8 +29,11 @@ type VirtualMachineImageTemplatesClientAPI interface { Get(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.ImageTemplate, err error) GetRunOutput(ctx context.Context, resourceGroupName string, imageTemplateName string, runOutputName string) (result virtualmachineimagebuilder.RunOutput, err error) List(ctx context.Context) (result virtualmachineimagebuilder.ImageTemplateListResultPage, err error) + ListComplete(ctx context.Context) (result virtualmachineimagebuilder.ImageTemplateListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result virtualmachineimagebuilder.ImageTemplateListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result virtualmachineimagebuilder.ImageTemplateListResultIterator, err error) ListRunOutputs(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.RunOutputCollectionPage, err error) + ListRunOutputsComplete(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.RunOutputCollectionIterator, err error) Run(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.VirtualMachineImageTemplatesRunFuture, err error) Update(ctx context.Context, parameters virtualmachineimagebuilder.ImageTemplateUpdateParameters, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.ImageTemplate, err error) } @@ -40,6 +43,7 @@ var _ VirtualMachineImageTemplatesClientAPI = (*virtualmachineimagebuilder.Virtu // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result virtualmachineimagebuilder.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result virtualmachineimagebuilder.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*virtualmachineimagebuilder.OperationsClient)(nil) diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go index 6d8d18e9cf44..d4273dc490f4 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-02-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go @@ -37,7 +37,8 @@ func NewVirtualMachineImageTemplatesClient(subscriptionID string) VirtualMachine } // NewVirtualMachineImageTemplatesClientWithBaseURI creates an instance of the VirtualMachineImageTemplatesClient -// 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 NewVirtualMachineImageTemplatesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImageTemplatesClient { return VirtualMachineImageTemplatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/client.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/client.go index a2d82137ee8d..ce4f96dd480b 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/client.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/operations.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/operations.go index 089d05dd67f8..8af2e532f16a 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/operations.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go index d62acdc6a254..9e215c6e51ff 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagebuilderapi/interfaces.go @@ -29,8 +29,11 @@ type VirtualMachineImageTemplatesClientAPI interface { Get(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.ImageTemplate, err error) GetRunOutput(ctx context.Context, resourceGroupName string, imageTemplateName string, runOutputName string) (result virtualmachineimagebuilder.RunOutput, err error) List(ctx context.Context) (result virtualmachineimagebuilder.ImageTemplateListResultPage, err error) + ListComplete(ctx context.Context) (result virtualmachineimagebuilder.ImageTemplateListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result virtualmachineimagebuilder.ImageTemplateListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result virtualmachineimagebuilder.ImageTemplateListResultIterator, err error) ListRunOutputs(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.RunOutputCollectionPage, err error) + ListRunOutputsComplete(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.RunOutputCollectionIterator, err error) Run(ctx context.Context, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.VirtualMachineImageTemplatesRunFuture, err error) Update(ctx context.Context, parameters virtualmachineimagebuilder.ImageTemplateUpdateParameters, resourceGroupName string, imageTemplateName string) (result virtualmachineimagebuilder.VirtualMachineImageTemplatesUpdateFuture, err error) } @@ -40,6 +43,7 @@ var _ VirtualMachineImageTemplatesClientAPI = (*virtualmachineimagebuilder.Virtu // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result virtualmachineimagebuilder.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result virtualmachineimagebuilder.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*virtualmachineimagebuilder.OperationsClient)(nil) diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go index c1fa130572ad..5e25d012383a 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go @@ -37,7 +37,8 @@ func NewVirtualMachineImageTemplatesClient(subscriptionID string) VirtualMachine } // NewVirtualMachineImageTemplatesClientWithBaseURI creates an instance of the VirtualMachineImageTemplatesClient -// 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 NewVirtualMachineImageTemplatesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImageTemplatesClient { return VirtualMachineImageTemplatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/accounts.go b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/accounts.go index a0311b50196c..9b830ba5fa9f 100644 --- a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/accounts.go +++ b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/accounts.go @@ -38,7 +38,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/client.go b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/client.go index b6b56218229f..41dbb5edac34 100644 --- a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/client.go +++ b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/client.go @@ -44,7 +44,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/extensions.go b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/extensions.go index f494e7ec7588..4c8d00f90171 100644 --- a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/extensions.go +++ b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/extensions.go @@ -38,7 +38,8 @@ func NewExtensionsClient(subscriptionID string) ExtensionsClient { return NewExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExtensionsClientWithBaseURI creates an instance of the ExtensionsClient client. +// NewExtensionsClientWithBaseURI creates an instance of the ExtensionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExtensionsClientWithBaseURI(baseURI string, subscriptionID string) ExtensionsClient { return ExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/operations.go b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/operations.go index 15705bb8e678..35c22325b1e7 100644 --- a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/operations.go +++ b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/operations.go @@ -38,7 +38,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/projects.go b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/projects.go index a1798c3be8ed..a9d5c40fa24a 100644 --- a/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/projects.go +++ b/services/preview/visualstudio/mgmt/2014-04-01-preview/visualstudio/projects.go @@ -39,7 +39,8 @@ func NewProjectsClient(subscriptionID string) ProjectsClient { return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string) ProjectsClient { return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/certificateorders.go b/services/preview/web/mgmt/2015-08-01-preview/web/certificateorders.go index 4f0f9447c3f9..327f5e6068b8 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/certificateorders.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/certificateorders.go @@ -35,7 +35,9 @@ func NewCertificateOrdersClient(subscriptionID string) CertificateOrdersClient { return NewCertificateOrdersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateOrdersClientWithBaseURI creates an instance of the CertificateOrdersClient client. +// NewCertificateOrdersClientWithBaseURI creates an instance of the CertificateOrdersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewCertificateOrdersClientWithBaseURI(baseURI string, subscriptionID string) CertificateOrdersClient { return CertificateOrdersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/certificates.go b/services/preview/web/mgmt/2015-08-01-preview/web/certificates.go index 85d53b5babdd..9c025b983211 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/certificates.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/certificates.go @@ -35,7 +35,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/classicmobileservices.go b/services/preview/web/mgmt/2015-08-01-preview/web/classicmobileservices.go index ffd10d947807..8242932138fa 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/classicmobileservices.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/classicmobileservices.go @@ -35,7 +35,9 @@ func NewClassicMobileServicesClient(subscriptionID string) ClassicMobileServices return NewClassicMobileServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClassicMobileServicesClientWithBaseURI creates an instance of the ClassicMobileServicesClient client. +// NewClassicMobileServicesClientWithBaseURI creates an instance of the ClassicMobileServicesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewClassicMobileServicesClientWithBaseURI(baseURI string, subscriptionID string) ClassicMobileServicesClient { return ClassicMobileServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/client.go b/services/preview/web/mgmt/2015-08-01-preview/web/client.go index e0d77526c035..2de1769b5a78 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/client.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/connections.go b/services/preview/web/mgmt/2015-08-01-preview/web/connections.go index 46618358b2b5..54528e891ede 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/connections.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/connections.go @@ -35,7 +35,8 @@ func NewConnectionsClient(subscriptionID string) ConnectionsClient { return NewConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionsClientWithBaseURI creates an instance of the ConnectionsClient client. +// NewConnectionsClientWithBaseURI creates an instance of the ConnectionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionsClient { return ConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/domains.go b/services/preview/web/mgmt/2015-08-01-preview/web/domains.go index bacf0f132837..a33c2dc8209f 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/domains.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/domains.go @@ -35,7 +35,8 @@ func NewDomainsClient(subscriptionID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, subscriptionID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/global.go b/services/preview/web/mgmt/2015-08-01-preview/web/global.go index b2b8b463a7ae..197a9959dd80 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/global.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/global.go @@ -35,7 +35,8 @@ func NewGlobalClient(subscriptionID string) GlobalClient { return NewGlobalClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalClientWithBaseURI creates an instance of the GlobalClient client. +// NewGlobalClientWithBaseURI creates an instance of the GlobalClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGlobalClientWithBaseURI(baseURI string, subscriptionID string) GlobalClient { return GlobalClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/globalcertificateorder.go b/services/preview/web/mgmt/2015-08-01-preview/web/globalcertificateorder.go index 17601b9fc12a..e71618cc764f 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/globalcertificateorder.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/globalcertificateorder.go @@ -35,7 +35,9 @@ func NewGlobalCertificateOrderClient(subscriptionID string) GlobalCertificateOrd return NewGlobalCertificateOrderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalCertificateOrderClientWithBaseURI creates an instance of the GlobalCertificateOrderClient client. +// NewGlobalCertificateOrderClientWithBaseURI creates an instance of the GlobalCertificateOrderClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewGlobalCertificateOrderClientWithBaseURI(baseURI string, subscriptionID string) GlobalCertificateOrderClient { return GlobalCertificateOrderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/globaldomainregistration.go b/services/preview/web/mgmt/2015-08-01-preview/web/globaldomainregistration.go index ca7119e13b52..27a1a1f36d63 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/globaldomainregistration.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/globaldomainregistration.go @@ -35,7 +35,9 @@ func NewGlobalDomainRegistrationClient(subscriptionID string) GlobalDomainRegist return NewGlobalDomainRegistrationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalDomainRegistrationClientWithBaseURI creates an instance of the GlobalDomainRegistrationClient client. +// NewGlobalDomainRegistrationClientWithBaseURI creates an instance of the GlobalDomainRegistrationClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewGlobalDomainRegistrationClientWithBaseURI(baseURI string, subscriptionID string) GlobalDomainRegistrationClient { return GlobalDomainRegistrationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/globalresourcegroups.go b/services/preview/web/mgmt/2015-08-01-preview/web/globalresourcegroups.go index acbdcd04f4d7..224b542b9510 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/globalresourcegroups.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/globalresourcegroups.go @@ -35,7 +35,9 @@ func NewGlobalResourceGroupsClient(subscriptionID string) GlobalResourceGroupsCl return NewGlobalResourceGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalResourceGroupsClientWithBaseURI creates an instance of the GlobalResourceGroupsClient client. +// NewGlobalResourceGroupsClientWithBaseURI creates an instance of the GlobalResourceGroupsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGlobalResourceGroupsClientWithBaseURI(baseURI string, subscriptionID string) GlobalResourceGroupsClient { return GlobalResourceGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/hostingenvironments.go b/services/preview/web/mgmt/2015-08-01-preview/web/hostingenvironments.go index 5e5ec797b7b1..4543cf429619 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/hostingenvironments.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/hostingenvironments.go @@ -35,7 +35,9 @@ func NewHostingEnvironmentsClient(subscriptionID string) HostingEnvironmentsClie return NewHostingEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHostingEnvironmentsClientWithBaseURI creates an instance of the HostingEnvironmentsClient client. +// NewHostingEnvironmentsClientWithBaseURI creates an instance of the HostingEnvironmentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewHostingEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) HostingEnvironmentsClient { return HostingEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/managedapis.go b/services/preview/web/mgmt/2015-08-01-preview/web/managedapis.go index 1f6b86cf3ed0..bc50689f3ba3 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/managedapis.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/managedapis.go @@ -35,7 +35,8 @@ func NewManagedApisClient(subscriptionID string) ManagedApisClient { return NewManagedApisClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedApisClientWithBaseURI creates an instance of the ManagedApisClient client. +// NewManagedApisClientWithBaseURI creates an instance of the ManagedApisClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagedApisClientWithBaseURI(baseURI string, subscriptionID string) ManagedApisClient { return ManagedApisClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/managedhostingenvironments.go b/services/preview/web/mgmt/2015-08-01-preview/web/managedhostingenvironments.go index fd2d8393b41a..91b1f1e7436a 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/managedhostingenvironments.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/managedhostingenvironments.go @@ -35,7 +35,9 @@ func NewManagedHostingEnvironmentsClient(subscriptionID string) ManagedHostingEn return NewManagedHostingEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagedHostingEnvironmentsClientWithBaseURI creates an instance of the ManagedHostingEnvironmentsClient client. +// NewManagedHostingEnvironmentsClientWithBaseURI creates an instance of the ManagedHostingEnvironmentsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewManagedHostingEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) ManagedHostingEnvironmentsClient { return ManagedHostingEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/provider.go b/services/preview/web/mgmt/2015-08-01-preview/web/provider.go index 874e021f78e2..449cb6a941ae 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/provider.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/provider.go @@ -35,7 +35,8 @@ func NewProviderClient(subscriptionID string) ProviderClient { return NewProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderClientWithBaseURI creates an instance of the ProviderClient client. +// NewProviderClientWithBaseURI creates an instance of the ProviderClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProviderClientWithBaseURI(baseURI string, subscriptionID string) ProviderClient { return ProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/recommendations.go b/services/preview/web/mgmt/2015-08-01-preview/web/recommendations.go index fa0ead5f1823..fb559506af94 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/recommendations.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/recommendations.go @@ -35,7 +35,8 @@ func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/serverfarms.go b/services/preview/web/mgmt/2015-08-01-preview/web/serverfarms.go index 883dfdf2c3cb..d5ea2a17c6a9 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/serverfarms.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/serverfarms.go @@ -35,7 +35,8 @@ func NewServerFarmsClient(subscriptionID string) ServerFarmsClient { return NewServerFarmsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerFarmsClientWithBaseURI creates an instance of the ServerFarmsClient client. +// NewServerFarmsClientWithBaseURI creates an instance of the ServerFarmsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerFarmsClientWithBaseURI(baseURI string, subscriptionID string) ServerFarmsClient { return ServerFarmsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/sites.go b/services/preview/web/mgmt/2015-08-01-preview/web/sites.go index 9d999b8b4aa5..1d5342fe940f 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/sites.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/sites.go @@ -35,7 +35,8 @@ func NewSitesClient(subscriptionID string) SitesClient { return NewSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSitesClientWithBaseURI creates an instance of the SitesClient client. +// NewSitesClientWithBaseURI creates an instance of the SitesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSitesClientWithBaseURI(baseURI string, subscriptionID string) SitesClient { return SitesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/topleveldomains.go b/services/preview/web/mgmt/2015-08-01-preview/web/topleveldomains.go index 07d5cfd8c545..a47ed73a8900 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/topleveldomains.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/topleveldomains.go @@ -35,7 +35,8 @@ func NewTopLevelDomainsClient(subscriptionID string) TopLevelDomainsClient { return NewTopLevelDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client. +// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopLevelDomainsClientWithBaseURI(baseURI string, subscriptionID string) TopLevelDomainsClient { return TopLevelDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/usage.go b/services/preview/web/mgmt/2015-08-01-preview/web/usage.go index 2e9309e9ea61..f04386a1318a 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/usage.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/preview/web/mgmt/2015-08-01-preview/web/webapi/interfaces.go b/services/preview/web/mgmt/2015-08-01-preview/web/webapi/interfaces.go index 04d39f715541..371be6e83ea1 100644 --- a/services/preview/web/mgmt/2015-08-01-preview/web/webapi/interfaces.go +++ b/services/preview/web/mgmt/2015-08-01-preview/web/webapi/interfaces.go @@ -32,7 +32,9 @@ type CertificateOrdersClientAPI interface { GetCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string) (result web.CertificateOrderCertificate, err error) GetCertificateOrder(ctx context.Context, resourceGroupName string, name string) (result web.CertificateOrder, err error) GetCertificateOrders(ctx context.Context, resourceGroupName string) (result web.CertificateOrderCollectionPage, err error) + GetCertificateOrdersComplete(ctx context.Context, resourceGroupName string) (result web.CertificateOrderCollectionIterator, err error) GetCertificates(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.CertificateOrderCertificateCollectionPage, err error) + GetCertificatesComplete(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.CertificateOrderCertificateCollectionIterator, err error) ReissueCertificateOrder(ctx context.Context, resourceGroupName string, name string, reissueCertificateOrderRequest web.ReissueCertificateOrderRequest) (result web.SetObject, err error) RenewCertificateOrder(ctx context.Context, resourceGroupName string, name string, renewCertificateOrderRequest web.RenewCertificateOrderRequest) (result web.SetObject, err error) ResendCertificateEmail(ctx context.Context, resourceGroupName string, name string) (result web.SetObject, err error) @@ -53,6 +55,7 @@ type CertificatesClientAPI interface { DeleteCsr(ctx context.Context, resourceGroupName string, name string) (result web.SetObject, err error) GetCertificate(ctx context.Context, resourceGroupName string, name string) (result web.Certificate, err error) GetCertificates(ctx context.Context, resourceGroupName string) (result web.CertificateCollectionPage, err error) + GetCertificatesComplete(ctx context.Context, resourceGroupName string) (result web.CertificateCollectionIterator, err error) GetCsr(ctx context.Context, resourceGroupName string, name string) (result web.Csr, err error) GetCsrs(ctx context.Context, resourceGroupName string) (result web.ListCsr, err error) UpdateCertificate(ctx context.Context, resourceGroupName string, name string, certificateEnvelope web.Certificate) (result web.Certificate, err error) @@ -66,6 +69,7 @@ type ClassicMobileServicesClientAPI interface { DeleteClassicMobileService(ctx context.Context, resourceGroupName string, name string) (result web.SetObject, err error) GetClassicMobileService(ctx context.Context, resourceGroupName string, name string) (result web.ClassicMobileService, err error) GetClassicMobileServices(ctx context.Context, resourceGroupName string) (result web.ClassicMobileServiceCollectionPage, err error) + GetClassicMobileServicesComplete(ctx context.Context, resourceGroupName string) (result web.ClassicMobileServiceCollectionIterator, err error) } var _ ClassicMobileServicesClientAPI = (*web.ClassicMobileServicesClient)(nil) @@ -77,6 +81,7 @@ type DomainsClientAPI interface { GetDomain(ctx context.Context, resourceGroupName string, domainName string) (result web.Domain, err error) GetDomainOperation(ctx context.Context, resourceGroupName string, domainName string, operationID string) (result web.Domain, err error) GetDomains(ctx context.Context, resourceGroupName string) (result web.DomainCollectionPage, err error) + GetDomainsComplete(ctx context.Context, resourceGroupName string) (result web.DomainCollectionIterator, err error) UpdateDomain(ctx context.Context, resourceGroupName string, domainName string, domain web.Domain) (result web.Domain, err error) } @@ -86,12 +91,19 @@ var _ DomainsClientAPI = (*web.DomainsClient)(nil) type GlobalClientAPI interface { CheckNameAvailability(ctx context.Context, request web.ResourceNameAvailabilityRequest) (result web.ResourceNameAvailability, err error) GetAllCertificates(ctx context.Context) (result web.CertificateCollectionPage, err error) + GetAllCertificatesComplete(ctx context.Context) (result web.CertificateCollectionIterator, err error) GetAllClassicMobileServices(ctx context.Context) (result web.ClassicMobileServiceCollectionPage, err error) + GetAllClassicMobileServicesComplete(ctx context.Context) (result web.ClassicMobileServiceCollectionIterator, err error) GetAllHostingEnvironments(ctx context.Context) (result web.HostingEnvironmentCollectionPage, err error) + GetAllHostingEnvironmentsComplete(ctx context.Context) (result web.HostingEnvironmentCollectionIterator, err error) GetAllManagedHostingEnvironments(ctx context.Context) (result web.ManagedHostingEnvironmentCollectionPage, err error) + GetAllManagedHostingEnvironmentsComplete(ctx context.Context) (result web.ManagedHostingEnvironmentCollectionIterator, err error) GetAllServerFarms(ctx context.Context, detailed *bool) (result web.ServerFarmCollectionPage, err error) + GetAllServerFarmsComplete(ctx context.Context, detailed *bool) (result web.ServerFarmCollectionIterator, err error) GetAllSites(ctx context.Context) (result web.SiteCollectionPage, err error) + GetAllSitesComplete(ctx context.Context) (result web.SiteCollectionIterator, err error) GetSubscriptionGeoRegions(ctx context.Context, sku string, linuxWorkersEnabled *bool) (result web.GeoRegionCollectionPage, err error) + GetSubscriptionGeoRegionsComplete(ctx context.Context, sku string, linuxWorkersEnabled *bool) (result web.GeoRegionCollectionIterator, err error) GetSubscriptionPublishingCredentials(ctx context.Context) (result web.User, err error) IsHostingEnvironmentNameAvailable(ctx context.Context, name string) (result web.SetObject, err error) IsHostingEnvironmentWithLegacyNameAvailable(ctx context.Context, name string) (result web.SetObject, err error) @@ -104,6 +116,7 @@ var _ GlobalClientAPI = (*web.GlobalClient)(nil) // GlobalCertificateOrderClientAPI contains the set of methods on the GlobalCertificateOrderClient type. type GlobalCertificateOrderClientAPI interface { GetAllCertificateOrders(ctx context.Context) (result web.CertificateOrderCollectionPage, err error) + GetAllCertificateOrdersComplete(ctx context.Context) (result web.CertificateOrderCollectionIterator, err error) ValidateCertificatePurchaseInformation(ctx context.Context, certificateOrder web.CertificateOrder) (result web.SetObject, err error) } @@ -113,8 +126,10 @@ var _ GlobalCertificateOrderClientAPI = (*web.GlobalCertificateOrderClient)(nil) type GlobalDomainRegistrationClientAPI interface { CheckDomainAvailability(ctx context.Context, identifier web.NameIdentifier) (result web.DomainAvailablilityCheckResult, err error) GetAllDomains(ctx context.Context) (result web.DomainCollectionPage, err error) + GetAllDomainsComplete(ctx context.Context) (result web.DomainCollectionIterator, err error) GetDomainControlCenterSsoRequest(ctx context.Context) (result web.DomainControlCenterSsoRequest, err error) ListDomainRecommendations(ctx context.Context, parameters web.DomainRecommendationSearchParameters) (result web.NameIdentifierCollectionPage, err error) + ListDomainRecommendationsComplete(ctx context.Context, parameters web.DomainRecommendationSearchParameters) (result web.NameIdentifierCollectionIterator, err error) ValidateDomainPurchaseInformation(ctx context.Context, domainRegistrationInput web.DomainRegistrationInput) (result web.SetObject, err error) } @@ -135,37 +150,56 @@ type HostingEnvironmentsClientAPI interface { DeleteHostingEnvironment(ctx context.Context, resourceGroupName string, name string, forceDelete *bool) (result web.HostingEnvironmentsDeleteHostingEnvironmentFuture, err error) GetHostingEnvironment(ctx context.Context, resourceGroupName string, name string) (result web.HostingEnvironment, err error) GetHostingEnvironmentCapacities(ctx context.Context, resourceGroupName string, name string) (result web.StampCapacityCollectionPage, err error) + GetHostingEnvironmentCapacitiesComplete(ctx context.Context, resourceGroupName string, name string) (result web.StampCapacityCollectionIterator, err error) GetHostingEnvironmentDiagnostics(ctx context.Context, resourceGroupName string, name string) (result web.ListHostingEnvironmentDiagnostics, err error) GetHostingEnvironmentDiagnosticsItem(ctx context.Context, resourceGroupName string, name string, diagnosticsName string) (result web.HostingEnvironmentDiagnostics, err error) GetHostingEnvironmentMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinition, err error) GetHostingEnvironmentMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + GetHostingEnvironmentMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) GetHostingEnvironmentMultiRoleMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinitionCollectionPage, err error) + GetHostingEnvironmentMultiRoleMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinitionCollectionIterator, err error) GetHostingEnvironmentMultiRoleMetrics(ctx context.Context, resourceGroupName string, name string, startTime string, endTime string, timeGrain string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + GetHostingEnvironmentMultiRoleMetricsComplete(ctx context.Context, resourceGroupName string, name string, startTime string, endTime string, timeGrain string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) GetHostingEnvironmentMultiRoleUsages(ctx context.Context, resourceGroupName string, name string) (result web.UsageCollectionPage, err error) + GetHostingEnvironmentMultiRoleUsagesComplete(ctx context.Context, resourceGroupName string, name string) (result web.UsageCollectionIterator, err error) GetHostingEnvironmentOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result web.SetObject, err error) GetHostingEnvironmentOperations(ctx context.Context, resourceGroupName string, name string) (result web.SetObject, err error) GetHostingEnvironments(ctx context.Context, resourceGroupName string) (result web.HostingEnvironmentCollectionPage, err error) + GetHostingEnvironmentsComplete(ctx context.Context, resourceGroupName string) (result web.HostingEnvironmentCollectionIterator, err error) GetHostingEnvironmentServerFarms(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmCollectionPage, err error) + GetHostingEnvironmentServerFarmsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmCollectionIterator, err error) GetHostingEnvironmentSites(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.SiteCollectionPage, err error) + GetHostingEnvironmentSitesComplete(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.SiteCollectionIterator, err error) GetHostingEnvironmentUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + GetHostingEnvironmentUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) GetHostingEnvironmentVips(ctx context.Context, resourceGroupName string, name string) (result web.AddressResponse, err error) GetHostingEnvironmentWebHostingPlans(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmCollectionPage, err error) + GetHostingEnvironmentWebHostingPlansComplete(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmCollectionIterator, err error) GetHostingEnvironmentWebWorkerMetricDefinitions(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.MetricDefinitionCollectionPage, err error) + GetHostingEnvironmentWebWorkerMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.MetricDefinitionCollectionIterator, err error) GetHostingEnvironmentWebWorkerMetrics(ctx context.Context, resourceGroupName string, name string, workerPoolName string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + GetHostingEnvironmentWebWorkerMetricsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) GetHostingEnvironmentWebWorkerUsages(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.UsageCollectionPage, err error) + GetHostingEnvironmentWebWorkerUsagesComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.UsageCollectionIterator, err error) GetMultiRolePool(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPool, err error) GetMultiRolePoolInstanceMetricDefinitions(ctx context.Context, resourceGroupName string, name string, instance string) (result web.SetObject, err error) GetMultiRolePoolInstanceMetrics(ctx context.Context, resourceGroupName string, name string, instance string, details *bool) (result web.SetObject, err error) GetMultiRolePools(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionPage, err error) + GetMultiRolePoolsComplete(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionIterator, err error) GetMultiRolePoolSkus(ctx context.Context, resourceGroupName string, name string) (result web.SkuInfoCollectionPage, err error) + GetMultiRolePoolSkusComplete(ctx context.Context, resourceGroupName string, name string) (result web.SkuInfoCollectionIterator, err error) GetWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.WorkerPool, err error) GetWorkerPoolInstanceMetricDefinitions(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string) (result web.SetObject, err error) GetWorkerPoolInstanceMetrics(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string, details *bool, filter string) (result web.SetObject, err error) GetWorkerPools(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionPage, err error) + GetWorkerPoolsComplete(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionIterator, err error) GetWorkerPoolSkus(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.SkuInfoCollectionPage, err error) + GetWorkerPoolSkusComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.SkuInfoCollectionIterator, err error) RebootHostingEnvironment(ctx context.Context, resourceGroupName string, name string) (result web.SetObject, err error) ResumeHostingEnvironment(ctx context.Context, resourceGroupName string, name string) (result web.HostingEnvironmentsResumeHostingEnvironmentFuture, err error) + ResumeHostingEnvironmentComplete(ctx context.Context, resourceGroupName string, name string) (result web.HostingEnvironmentsResumeHostingEnvironmentAllFuture, err error) SuspendHostingEnvironment(ctx context.Context, resourceGroupName string, name string) (result web.HostingEnvironmentsSuspendHostingEnvironmentFuture, err error) + SuspendHostingEnvironmentComplete(ctx context.Context, resourceGroupName string, name string) (result web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture, err error) } var _ HostingEnvironmentsClientAPI = (*web.HostingEnvironmentsClient)(nil) @@ -177,10 +211,14 @@ type ManagedHostingEnvironmentsClientAPI interface { GetManagedHostingEnvironment(ctx context.Context, resourceGroupName string, name string) (result web.ManagedHostingEnvironment, err error) GetManagedHostingEnvironmentOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result web.SetObject, err error) GetManagedHostingEnvironments(ctx context.Context, resourceGroupName string) (result web.HostingEnvironmentCollectionPage, err error) + GetManagedHostingEnvironmentsComplete(ctx context.Context, resourceGroupName string) (result web.HostingEnvironmentCollectionIterator, err error) GetManagedHostingEnvironmentServerFarms(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmCollectionPage, err error) + GetManagedHostingEnvironmentServerFarmsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmCollectionIterator, err error) GetManagedHostingEnvironmentSites(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.SiteCollectionPage, err error) + GetManagedHostingEnvironmentSitesComplete(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.SiteCollectionIterator, err error) GetManagedHostingEnvironmentVips(ctx context.Context, resourceGroupName string, name string) (result web.AddressResponse, err error) GetManagedHostingEnvironmentWebHostingPlans(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmCollectionPage, err error) + GetManagedHostingEnvironmentWebHostingPlansComplete(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmCollectionIterator, err error) } var _ ManagedHostingEnvironmentsClientAPI = (*web.ManagedHostingEnvironmentsClient)(nil) @@ -190,6 +228,7 @@ type ProviderClientAPI interface { GetPublishingUser(ctx context.Context) (result web.User, err error) GetSourceControl(ctx context.Context, sourceControlType string) (result web.SourceControl, err error) GetSourceControls(ctx context.Context) (result web.SourceControlCollectionPage, err error) + GetSourceControlsComplete(ctx context.Context) (result web.SourceControlCollectionIterator, err error) UpdatePublishingUser(ctx context.Context, requestMessage web.User) (result web.User, err error) UpdateSourceControl(ctx context.Context, sourceControlType string, requestMessage web.SourceControl) (result web.SourceControl, err error) } @@ -216,10 +255,14 @@ type ServerFarmsClientAPI interface { GetRoutesForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.ListVnetRoute, err error) GetServerFarm(ctx context.Context, resourceGroupName string, name string) (result web.ServerFarmWithRichSku, err error) GetServerFarmMetricDefintions(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinitionCollectionPage, err error) + GetServerFarmMetricDefintionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinitionCollectionIterator, err error) GetServerFarmMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + GetServerFarmMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) GetServerFarmOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result web.ServerFarmWithRichSku, err error) GetServerFarms(ctx context.Context, resourceGroupName string) (result web.ServerFarmCollectionPage, err error) + GetServerFarmsComplete(ctx context.Context, resourceGroupName string) (result web.ServerFarmCollectionIterator, err error) GetServerFarmSites(ctx context.Context, resourceGroupName string, name string, skipToken string, filter string, top string) (result web.SiteCollectionPage, err error) + GetServerFarmSitesComplete(ctx context.Context, resourceGroupName string, name string, skipToken string, filter string, top string) (result web.SiteCollectionIterator, err error) GetServerFarmVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result web.VnetGateway, err error) GetVnetFromServerFarm(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.VnetInfo, err error) GetVnetsForServerFarm(ctx context.Context, resourceGroupName string, name string) (result web.ListVnetInfo, err error) @@ -280,14 +323,19 @@ type SitesClientAPI interface { GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result web.SetObject, err error) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SetObject, err error) GetDeletedSites(ctx context.Context, resourceGroupName string, propertiesToInclude string, includeSiteTypes string) (result web.DeletedSiteCollectionPage, err error) + GetDeletedSitesComplete(ctx context.Context, resourceGroupName string, propertiesToInclude string, includeSiteTypes string) (result web.DeletedSiteCollectionIterator, err error) GetDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result web.Deployment, err error) GetDeployments(ctx context.Context, resourceGroupName string, name string) (result web.DeploymentCollectionPage, err error) + GetDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result web.DeploymentCollectionIterator, err error) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result web.Deployment, err error) GetDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionPage, err error) + GetDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionIterator, err error) GetInstanceDeployment(ctx context.Context, resourceGroupName string, name string, ID string, instanceID string) (result web.Deployment, err error) GetInstanceDeployments(ctx context.Context, resourceGroupName string, name string, instanceID string) (result web.DeploymentCollectionPage, err error) + GetInstanceDeploymentsComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result web.DeploymentCollectionIterator, err error) GetInstanceDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string, instanceID string) (result web.Deployment, err error) GetInstanceDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result web.DeploymentCollectionPage, err error) + GetInstanceDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result web.DeploymentCollectionIterator, err error) GetSite(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.Site, err error) GetSiteBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result web.BackupRequest, err error) GetSiteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupRequest, err error) @@ -299,16 +347,24 @@ type SitesClientAPI interface { GetSiteConfigSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfig, err error) GetSiteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result web.HostNameBinding, err error) GetSiteHostNameBindings(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionPage, err error) + GetSiteHostNameBindingsComplete(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionIterator, err error) GetSiteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result web.HostNameBinding, err error) GetSiteHostNameBindingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionPage, err error) + GetSiteHostNameBindingsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionIterator, err error) GetSiteInstanceIdentifiers(ctx context.Context, resourceGroupName string, name string) (result web.SiteInstanceCollectionPage, err error) + GetSiteInstanceIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteInstanceCollectionIterator, err error) GetSiteInstanceIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteInstanceCollectionPage, err error) + GetSiteInstanceIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteInstanceCollectionIterator, err error) GetSiteLogsConfig(ctx context.Context, resourceGroupName string, name string) (result web.SiteLogsConfig, err error) GetSiteLogsConfigSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteLogsConfig, err error) GetSiteMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinitionCollectionPage, err error) + GetSiteMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinitionCollectionIterator, err error) GetSiteMetricDefinitionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.MetricDefinitionCollectionPage, err error) + GetSiteMetricDefinitionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.MetricDefinitionCollectionIterator, err error) GetSiteMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + GetSiteMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) GetSiteMetricsSlot(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + GetSiteMetricsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) GetSiteNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string) (result web.NetworkFeatures, err error) GetSiteNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string) (result web.NetworkFeatures, err error) GetSiteOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result web.SetObject, err error) @@ -318,14 +374,18 @@ type SitesClientAPI interface { GetSiteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result web.RelayServiceConnectionEntity, err error) GetSiteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result web.RelayServiceConnectionEntity, err error) GetSites(ctx context.Context, resourceGroupName string, propertiesToInclude string, includeSiteTypes string, includeSlots *bool) (result web.SiteCollectionPage, err error) + GetSitesComplete(ctx context.Context, resourceGroupName string, propertiesToInclude string, includeSiteTypes string, includeSlots *bool) (result web.SiteCollectionIterator, err error) GetSiteSlot(ctx context.Context, resourceGroupName string, name string, slot string, propertiesToInclude string) (result web.Site, err error) GetSiteSlots(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.SiteCollectionPage, err error) + GetSiteSlotsComplete(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.SiteCollectionIterator, err error) GetSiteSnapshots(ctx context.Context, resourceGroupName string, name string) (result web.SetObject, err error) GetSiteSnapshotsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SetObject, err error) GetSiteSourceControl(ctx context.Context, resourceGroupName string, name string) (result web.SiteSourceControl, err error) GetSiteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteSourceControl, err error) GetSiteUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + GetSiteUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) GetSiteUsagesSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + GetSiteUsagesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) GetSiteVNETConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.VnetInfo, err error) GetSiteVNETConnections(ctx context.Context, resourceGroupName string, name string) (result web.ListVnetInfo, err error) GetSiteVNETConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result web.VnetInfo, err error) @@ -334,7 +394,9 @@ type SitesClientAPI interface { GetSiteVnetGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result web.SetObject, err error) GetSlotConfigNames(ctx context.Context, resourceGroupName string, name string) (result web.SlotConfigNamesResource, err error) GetSlotsDifferencesFromProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.SlotDifferenceCollectionPage, err error) + GetSlotsDifferencesFromProductionComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.SlotDifferenceCollectionIterator, err error) GetSlotsDifferencesSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.SlotDifferenceCollectionPage, err error) + GetSlotsDifferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.SlotDifferenceCollectionIterator, err error) IsSiteCloneable(ctx context.Context, resourceGroupName string, name string) (result web.SiteCloneability, err error) IsSiteCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteCloneability, err error) ListSiteAppSettings(ctx context.Context, resourceGroupName string, name string) (result web.StringDictionary, err error) @@ -342,7 +404,9 @@ type SitesClientAPI interface { ListSiteAuthSettings(ctx context.Context, resourceGroupName string, name string) (result web.SiteAuthSettings, err error) ListSiteAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteAuthSettings, err error) ListSiteBackups(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionPage, err error) + ListSiteBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionIterator, err error) ListSiteBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionPage, err error) + ListSiteBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionIterator, err error) ListSiteConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result web.ConnectionStringDictionary, err error) ListSiteConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ConnectionStringDictionary, err error) ListSiteMetadata(ctx context.Context, resourceGroupName string, name string) (result web.StringDictionary, err error) @@ -401,8 +465,10 @@ var _ SitesClientAPI = (*web.SitesClient)(nil) // TopLevelDomainsClientAPI contains the set of methods on the TopLevelDomainsClient type. type TopLevelDomainsClientAPI interface { GetGetTopLevelDomains(ctx context.Context) (result web.TopLevelDomainCollectionPage, err error) + GetGetTopLevelDomainsComplete(ctx context.Context) (result web.TopLevelDomainCollectionIterator, err error) GetTopLevelDomain(ctx context.Context, name string) (result web.TopLevelDomain, err error) ListTopLevelDomainAgreements(ctx context.Context, name string, agreementOption web.TopLevelDomainAgreementOption) (result web.TldLegalAgreementCollectionPage, err error) + ListTopLevelDomainAgreementsComplete(ctx context.Context, name string, agreementOption web.TopLevelDomainAgreementOption) (result web.TldLegalAgreementCollectionIterator, err error) } var _ TopLevelDomainsClientAPI = (*web.TopLevelDomainsClient)(nil) @@ -418,6 +484,7 @@ var _ UsageClientAPI = (*web.UsageClient)(nil) type ManagedApisClientAPI interface { Get(ctx context.Context, location string, APIName string, export *bool) (result web.APIEntity, err error) List(ctx context.Context, location string) (result web.ApisCollectionPage, err error) + ListComplete(ctx context.Context, location string) (result web.ApisCollectionIterator, err error) } var _ ManagedApisClientAPI = (*web.ManagedApisClient)(nil) @@ -429,6 +496,7 @@ type ConnectionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, connectionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, connectionName string) (result web.Connection, err error) List(ctx context.Context, resourceGroupName string, top *int32, filter string) (result web.ConnectionCollectionPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, top *int32, filter string) (result web.ConnectionCollectionIterator, err error) ListConnectionKeys(ctx context.Context, resourceGroupName string, connectionName string, content web.ListConnectionKeysInput) (result web.ConnectionSecrets, err error) ListConsentLinks(ctx context.Context, resourceGroupName string, connectionName string, content web.ConsentLinkInput) (result web.ConsentLinkPayload, err error) } diff --git a/services/preview/windowsesu/2019-09-16-preview/windowsesu/client.go b/services/preview/windowsesu/2019-09-16-preview/windowsesu/client.go index a905cd7e3db0..85c67701e237 100644 --- a/services/preview/windowsesu/2019-09-16-preview/windowsesu/client.go +++ b/services/preview/windowsesu/2019-09-16-preview/windowsesu/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/windowsesu/2019-09-16-preview/windowsesu/multipleactivationkeys.go b/services/preview/windowsesu/2019-09-16-preview/windowsesu/multipleactivationkeys.go index d1101144dac4..77707ed5e4f0 100644 --- a/services/preview/windowsesu/2019-09-16-preview/windowsesu/multipleactivationkeys.go +++ b/services/preview/windowsesu/2019-09-16-preview/windowsesu/multipleactivationkeys.go @@ -37,7 +37,9 @@ func NewMultipleActivationKeysClient(subscriptionID string) MultipleActivationKe return NewMultipleActivationKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMultipleActivationKeysClientWithBaseURI creates an instance of the MultipleActivationKeysClient client. +// NewMultipleActivationKeysClientWithBaseURI creates an instance of the MultipleActivationKeysClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMultipleActivationKeysClientWithBaseURI(baseURI string, subscriptionID string) MultipleActivationKeysClient { return MultipleActivationKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/windowsesu/2019-09-16-preview/windowsesu/operations.go b/services/preview/windowsesu/2019-09-16-preview/windowsesu/operations.go index 1232a45422b1..0440a3b6dc74 100644 --- a/services/preview/windowsesu/2019-09-16-preview/windowsesu/operations.go +++ b/services/preview/windowsesu/2019-09-16-preview/windowsesu/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/windowsesu/2019-09-16-preview/windowsesu/windowsesuapi/interfaces.go b/services/preview/windowsesu/2019-09-16-preview/windowsesu/windowsesuapi/interfaces.go index d8a8c39b99c6..e17ef9bb8902 100644 --- a/services/preview/windowsesu/2019-09-16-preview/windowsesu/windowsesuapi/interfaces.go +++ b/services/preview/windowsesu/2019-09-16-preview/windowsesu/windowsesuapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result windowsesu.OperationListPage, err error) + ListComplete(ctx context.Context) (result windowsesu.OperationListIterator, err error) } var _ OperationsClientAPI = (*windowsesu.OperationsClient)(nil) @@ -36,7 +37,9 @@ type MultipleActivationKeysClientAPI interface { Delete(ctx context.Context, resourceGroupName string, multipleActivationKeyName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, multipleActivationKeyName string) (result windowsesu.MultipleActivationKey, err error) List(ctx context.Context) (result windowsesu.MultipleActivationKeyListPage, err error) + ListComplete(ctx context.Context) (result windowsesu.MultipleActivationKeyListIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result windowsesu.MultipleActivationKeyListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result windowsesu.MultipleActivationKeyListIterator, err error) Update(ctx context.Context, resourceGroupName string, multipleActivationKeyName string, multipleActivationKey windowsesu.MultipleActivationKeyUpdate) (result windowsesu.MultipleActivationKey, err error) } diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/client.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/client.go index 6e227c00c72a..aa56e4656f46 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/client.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/components.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/components.go index 4b20b331987b..e7cfbd75ffc1 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/components.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/components.go @@ -37,7 +37,8 @@ func NewComponentsClient(subscriptionID string) ComponentsClient { return NewComponentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewComponentsClientWithBaseURI creates an instance of the ComponentsClient client. +// NewComponentsClientWithBaseURI creates an instance of the ComponentsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewComponentsClientWithBaseURI(baseURI string, subscriptionID string) ComponentsClient { return ComponentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/componentssummary.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/componentssummary.go index ec84f2c61c5a..60be9c1b82dc 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/componentssummary.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/componentssummary.go @@ -36,7 +36,9 @@ func NewComponentsSummaryClient(subscriptionID string) ComponentsSummaryClient { return NewComponentsSummaryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewComponentsSummaryClientWithBaseURI creates an instance of the ComponentsSummaryClient client. +// NewComponentsSummaryClientWithBaseURI creates an instance of the ComponentsSummaryClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewComponentsSummaryClientWithBaseURI(baseURI string, subscriptionID string) ComponentsSummaryClient { return ComponentsSummaryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitorinstances.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitorinstances.go index 9d9776beba98..daf92a1dc5aa 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitorinstances.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitorinstances.go @@ -37,7 +37,9 @@ func NewMonitorInstancesClient(subscriptionID string) MonitorInstancesClient { return NewMonitorInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMonitorInstancesClientWithBaseURI creates an instance of the MonitorInstancesClient client. +// NewMonitorInstancesClientWithBaseURI creates an instance of the MonitorInstancesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMonitorInstancesClientWithBaseURI(baseURI string, subscriptionID string) MonitorInstancesClient { return MonitorInstancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitorinstancessummary.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitorinstancessummary.go index f11847f21bbd..166446a861de 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitorinstancessummary.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitorinstancessummary.go @@ -36,7 +36,9 @@ func NewMonitorInstancesSummaryClient(subscriptionID string) MonitorInstancesSum return NewMonitorInstancesSummaryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMonitorInstancesSummaryClientWithBaseURI creates an instance of the MonitorInstancesSummaryClient client. +// NewMonitorInstancesSummaryClientWithBaseURI creates an instance of the MonitorInstancesSummaryClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMonitorInstancesSummaryClientWithBaseURI(baseURI string, subscriptionID string) MonitorInstancesSummaryClient { return MonitorInstancesSummaryClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitors.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitors.go index 98814f1cb861..e45c03003b40 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitors.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/monitors.go @@ -36,7 +36,8 @@ func NewMonitorsClient(subscriptionID string) MonitorsClient { return NewMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMonitorsClientWithBaseURI creates an instance of the MonitorsClient client. +// NewMonitorsClientWithBaseURI creates an instance of the MonitorsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMonitorsClientWithBaseURI(baseURI string, subscriptionID string) MonitorsClient { return MonitorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/notificationsettings.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/notificationsettings.go index 3b36946fee4b..da2f45d7db9b 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/notificationsettings.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/notificationsettings.go @@ -36,7 +36,9 @@ func NewNotificationSettingsClient(subscriptionID string) NotificationSettingsCl return NewNotificationSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationSettingsClientWithBaseURI creates an instance of the NotificationSettingsClient client. +// NewNotificationSettingsClientWithBaseURI creates an instance of the NotificationSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewNotificationSettingsClientWithBaseURI(baseURI string, subscriptionID string) NotificationSettingsClient { return NotificationSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/operations.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/operations.go index 1fdcf82f419e..4850aa96272c 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/operations.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/workloadmonitorapi/interfaces.go b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/workloadmonitorapi/interfaces.go index 7485472f8533..3b9711017ab0 100644 --- a/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/workloadmonitorapi/interfaces.go +++ b/services/preview/workloadmonitor/mgmt/2018-08-31-preview/workloadmonitor/workloadmonitorapi/interfaces.go @@ -27,6 +27,7 @@ import ( type MonitorsClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, monitorID string) (result workloadmonitor.Monitor, err error) ListByResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, filter string, skiptoken string) (result workloadmonitor.MonitorsCollectionPage, err error) + ListByResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, filter string, skiptoken string) (result workloadmonitor.MonitorsCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, monitorID string, body workloadmonitor.Monitor) (result workloadmonitor.Monitor, err error) } @@ -36,6 +37,7 @@ var _ MonitorsClientAPI = (*workloadmonitor.MonitorsClient)(nil) type ComponentsClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, componentID uuid.UUID, selectParameter string, expand string) (result workloadmonitor.Component, err error) ListByResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, selectParameter string, filter string, apply string, orderby string, expand string, top string, skiptoken string) (result workloadmonitor.ComponentsCollectionPage, err error) + ListByResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, selectParameter string, filter string, apply string, orderby string, expand string, top string, skiptoken string) (result workloadmonitor.ComponentsCollectionIterator, err error) } var _ ComponentsClientAPI = (*workloadmonitor.ComponentsClient)(nil) @@ -44,6 +46,7 @@ var _ ComponentsClientAPI = (*workloadmonitor.ComponentsClient)(nil) type MonitorInstancesClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, monitorInstanceID uuid.UUID, selectParameter string, expand string) (result workloadmonitor.MonitorInstance, err error) ListByResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, selectParameter string, filter string, apply string, orderby string, expand string, top string, skiptoken string) (result workloadmonitor.MonitorInstancesCollectionPage, err error) + ListByResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, selectParameter string, filter string, apply string, orderby string, expand string, top string, skiptoken string) (result workloadmonitor.MonitorInstancesCollectionIterator, err error) } var _ MonitorInstancesClientAPI = (*workloadmonitor.MonitorInstancesClient)(nil) @@ -52,6 +55,7 @@ var _ MonitorInstancesClientAPI = (*workloadmonitor.MonitorInstancesClient)(nil) type NotificationSettingsClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string) (result workloadmonitor.NotificationSetting, err error) ListByResource(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, skiptoken string) (result workloadmonitor.NotificationSettingsCollectionPage, err error) + ListByResourceComplete(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, skiptoken string) (result workloadmonitor.NotificationSettingsCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, resourceNamespace string, resourceType string, resourceName string, body workloadmonitor.NotificationSetting) (result workloadmonitor.NotificationSetting, err error) } @@ -60,6 +64,7 @@ var _ NotificationSettingsClientAPI = (*workloadmonitor.NotificationSettingsClie // ComponentsSummaryClientAPI contains the set of methods on the ComponentsSummaryClient type. type ComponentsSummaryClientAPI interface { List(ctx context.Context, selectParameter string, filter string, apply string, orderby string, expand string, top string, skiptoken string) (result workloadmonitor.ComponentsCollectionPage, err error) + ListComplete(ctx context.Context, selectParameter string, filter string, apply string, orderby string, expand string, top string, skiptoken string) (result workloadmonitor.ComponentsCollectionIterator, err error) } var _ ComponentsSummaryClientAPI = (*workloadmonitor.ComponentsSummaryClient)(nil) @@ -67,6 +72,7 @@ var _ ComponentsSummaryClientAPI = (*workloadmonitor.ComponentsSummaryClient)(ni // MonitorInstancesSummaryClientAPI contains the set of methods on the MonitorInstancesSummaryClient type. type MonitorInstancesSummaryClientAPI interface { List(ctx context.Context, selectParameter string, filter string, apply string, orderby string, expand string, top string, skiptoken string) (result workloadmonitor.MonitorInstancesCollectionPage, err error) + ListComplete(ctx context.Context, selectParameter string, filter string, apply string, orderby string, expand string, top string, skiptoken string) (result workloadmonitor.MonitorInstancesCollectionIterator, err error) } var _ MonitorInstancesSummaryClientAPI = (*workloadmonitor.MonitorInstancesSummaryClient)(nil) @@ -74,6 +80,7 @@ var _ MonitorInstancesSummaryClientAPI = (*workloadmonitor.MonitorInstancesSumma // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context, skiptoken string) (result workloadmonitor.OperationListResultPage, err error) + ListComplete(ctx context.Context, skiptoken string) (result workloadmonitor.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*workloadmonitor.OperationsClient)(nil) diff --git a/services/privatedns/mgmt/2018-09-01/privatedns/client.go b/services/privatedns/mgmt/2018-09-01/privatedns/client.go index 3a72459cd346..25bc56eb9c66 100644 --- a/services/privatedns/mgmt/2018-09-01/privatedns/client.go +++ b/services/privatedns/mgmt/2018-09-01/privatedns/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/privatedns/mgmt/2018-09-01/privatedns/privatednsapi/interfaces.go b/services/privatedns/mgmt/2018-09-01/privatedns/privatednsapi/interfaces.go index d64759915dc1..2d25ce0711a6 100644 --- a/services/privatedns/mgmt/2018-09-01/privatedns/privatednsapi/interfaces.go +++ b/services/privatedns/mgmt/2018-09-01/privatedns/privatednsapi/interfaces.go @@ -29,7 +29,9 @@ type PrivateZonesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, privateZoneName string, ifMatch string) (result privatedns.PrivateZonesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, privateZoneName string) (result privatedns.PrivateZone, err error) List(ctx context.Context, top *int32) (result privatedns.PrivateZoneListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result privatedns.PrivateZoneListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result privatedns.PrivateZoneListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result privatedns.PrivateZoneListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, privateZoneName string, parameters privatedns.PrivateZone, ifMatch string) (result privatedns.PrivateZonesUpdateFuture, err error) } @@ -41,6 +43,7 @@ type VirtualNetworkLinksClientAPI interface { Delete(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string, ifMatch string) (result privatedns.VirtualNetworkLinksDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string) (result privatedns.VirtualNetworkLink, err error) List(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32) (result privatedns.VirtualNetworkLinkListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32) (result privatedns.VirtualNetworkLinkListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string, parameters privatedns.VirtualNetworkLink, ifMatch string) (result privatedns.VirtualNetworkLinksUpdateFuture, err error) } @@ -52,7 +55,9 @@ type RecordSetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, privateZoneName string, recordType privatedns.RecordType, relativeRecordSetName string, ifMatch string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, privateZoneName string, recordType privatedns.RecordType, relativeRecordSetName string) (result privatedns.RecordSet, err error) List(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32, recordsetnamesuffix string) (result privatedns.RecordSetListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32, recordsetnamesuffix string) (result privatedns.RecordSetListResultIterator, err error) ListByType(ctx context.Context, resourceGroupName string, privateZoneName string, recordType privatedns.RecordType, top *int32, recordsetnamesuffix string) (result privatedns.RecordSetListResultPage, err error) + ListByTypeComplete(ctx context.Context, resourceGroupName string, privateZoneName string, recordType privatedns.RecordType, top *int32, recordsetnamesuffix string) (result privatedns.RecordSetListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, privateZoneName string, recordType privatedns.RecordType, relativeRecordSetName string, parameters privatedns.RecordSet, ifMatch string) (result privatedns.RecordSet, err error) } diff --git a/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go b/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go index d5f21fae56c6..1f0faf2c454e 100644 --- a/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go +++ b/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go @@ -35,7 +35,8 @@ func NewPrivateZonesClient(subscriptionID string) PrivateZonesClient { return NewPrivateZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateZonesClientWithBaseURI creates an instance of the PrivateZonesClient client. +// NewPrivateZonesClientWithBaseURI creates an instance of the PrivateZonesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPrivateZonesClientWithBaseURI(baseURI string, subscriptionID string) PrivateZonesClient { return PrivateZonesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/privatedns/mgmt/2018-09-01/privatedns/recordsets.go b/services/privatedns/mgmt/2018-09-01/privatedns/recordsets.go index cfc5aa630e48..cfa0bda9d7d1 100644 --- a/services/privatedns/mgmt/2018-09-01/privatedns/recordsets.go +++ b/services/privatedns/mgmt/2018-09-01/privatedns/recordsets.go @@ -35,7 +35,8 @@ func NewRecordSetsClient(subscriptionID string) RecordSetsClient { return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client. +// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go b/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go index dfa7de0dff2f..10f0c5af8833 100644 --- a/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go +++ b/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go @@ -35,7 +35,9 @@ func NewVirtualNetworkLinksClient(subscriptionID string) VirtualNetworkLinksClie return NewVirtualNetworkLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkLinksClientWithBaseURI creates an instance of the VirtualNetworkLinksClient client. +// NewVirtualNetworkLinksClientWithBaseURI creates an instance of the VirtualNetworkLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkLinksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkLinksClient { return VirtualNetworkLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/client.go b/services/provisioningservices/mgmt/2017-11-15/iothub/client.go index a8a25380925f..c8884aa7401c 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/client.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/dpscertificate.go b/services/provisioningservices/mgmt/2017-11-15/iothub/dpscertificate.go index 3e74b3050c56..67b333b307ed 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/dpscertificate.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/dpscertificate.go @@ -37,7 +37,8 @@ func NewDpsCertificateClient(subscriptionID string) DpsCertificateClient { return NewDpsCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDpsCertificateClientWithBaseURI creates an instance of the DpsCertificateClient client. +// NewDpsCertificateClientWithBaseURI creates an instance of the DpsCertificateClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDpsCertificateClientWithBaseURI(baseURI string, subscriptionID string) DpsCertificateClient { return DpsCertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go b/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go index 85938686ffa7..33b148806480 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/iotdpsresource.go @@ -36,7 +36,8 @@ func NewIotDpsResourceClient(subscriptionID string) IotDpsResourceClient { return NewIotDpsResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotDpsResourceClientWithBaseURI creates an instance of the IotDpsResourceClient client. +// NewIotDpsResourceClientWithBaseURI creates an instance of the IotDpsResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotDpsResourceClientWithBaseURI(baseURI string, subscriptionID string) IotDpsResourceClient { return IotDpsResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/iothubapi/interfaces.go b/services/provisioningservices/mgmt/2017-11-15/iothub/iothubapi/interfaces.go index e836bd68a2b4..b2a8c96c4a4a 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/iothubapi/interfaces.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/iothubapi/interfaces.go @@ -27,6 +27,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result iothub.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result iothub.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*iothub.OperationsClient)(nil) @@ -51,10 +52,14 @@ type IotDpsResourceClientAPI interface { Get(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.ProvisioningServiceDescription, err error) GetOperationResult(ctx context.Context, operationID string, resourceGroupName string, provisioningServiceName string, asyncinfo string) (result iothub.AsyncOperationResult, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result iothub.ProvisioningServiceDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result iothub.ProvisioningServiceDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result iothub.ProvisioningServiceDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result iothub.ProvisioningServiceDescriptionListResultIterator, err error) ListKeys(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) ListKeysForKeyName(ctx context.Context, provisioningServiceName string, keyName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleAccessRightsDescription, err error) ListValidSkus(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.IotDpsSkuDefinitionListResultPage, err error) + ListValidSkusComplete(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.IotDpsSkuDefinitionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, provisioningServiceName string, provisioningServiceTags iothub.TagsResource) (result iothub.IotDpsResourceUpdateFuture, err error) } diff --git a/services/provisioningservices/mgmt/2017-11-15/iothub/operations.go b/services/provisioningservices/mgmt/2017-11-15/iothub/operations.go index bf08ded39142..66c4b5170968 100644 --- a/services/provisioningservices/mgmt/2017-11-15/iothub/operations.go +++ b/services/provisioningservices/mgmt/2017-11-15/iothub/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/provisioningservices/mgmt/2018-01-22/iothub/client.go b/services/provisioningservices/mgmt/2018-01-22/iothub/client.go index 02b6a1d164f9..251181885f85 100644 --- a/services/provisioningservices/mgmt/2018-01-22/iothub/client.go +++ b/services/provisioningservices/mgmt/2018-01-22/iothub/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/provisioningservices/mgmt/2018-01-22/iothub/dpscertificate.go b/services/provisioningservices/mgmt/2018-01-22/iothub/dpscertificate.go index 46dedab42faa..f1583a8f9f6e 100644 --- a/services/provisioningservices/mgmt/2018-01-22/iothub/dpscertificate.go +++ b/services/provisioningservices/mgmt/2018-01-22/iothub/dpscertificate.go @@ -37,7 +37,8 @@ func NewDpsCertificateClient(subscriptionID string) DpsCertificateClient { return NewDpsCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDpsCertificateClientWithBaseURI creates an instance of the DpsCertificateClient client. +// NewDpsCertificateClientWithBaseURI creates an instance of the DpsCertificateClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDpsCertificateClientWithBaseURI(baseURI string, subscriptionID string) DpsCertificateClient { return DpsCertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/provisioningservices/mgmt/2018-01-22/iothub/iotdpsresource.go b/services/provisioningservices/mgmt/2018-01-22/iothub/iotdpsresource.go index 6234a8a0766f..b477f3d37a7f 100644 --- a/services/provisioningservices/mgmt/2018-01-22/iothub/iotdpsresource.go +++ b/services/provisioningservices/mgmt/2018-01-22/iothub/iotdpsresource.go @@ -36,7 +36,8 @@ func NewIotDpsResourceClient(subscriptionID string) IotDpsResourceClient { return NewIotDpsResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIotDpsResourceClientWithBaseURI creates an instance of the IotDpsResourceClient client. +// NewIotDpsResourceClientWithBaseURI creates an instance of the IotDpsResourceClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIotDpsResourceClientWithBaseURI(baseURI string, subscriptionID string) IotDpsResourceClient { return IotDpsResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/provisioningservices/mgmt/2018-01-22/iothub/iothubapi/interfaces.go b/services/provisioningservices/mgmt/2018-01-22/iothub/iothubapi/interfaces.go index 2d2f910c0a8a..555cfb3498df 100644 --- a/services/provisioningservices/mgmt/2018-01-22/iothub/iothubapi/interfaces.go +++ b/services/provisioningservices/mgmt/2018-01-22/iothub/iothubapi/interfaces.go @@ -27,6 +27,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result iothub.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result iothub.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*iothub.OperationsClient)(nil) @@ -51,10 +52,14 @@ type IotDpsResourceClientAPI interface { Get(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.ProvisioningServiceDescription, err error) GetOperationResult(ctx context.Context, operationID string, resourceGroupName string, provisioningServiceName string, asyncinfo string) (result iothub.AsyncOperationResult, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result iothub.ProvisioningServiceDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result iothub.ProvisioningServiceDescriptionListResultIterator, err error) ListBySubscription(ctx context.Context) (result iothub.ProvisioningServiceDescriptionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result iothub.ProvisioningServiceDescriptionListResultIterator, err error) ListKeys(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleListResultPage, err error) + ListKeysComplete(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleListResultIterator, err error) ListKeysForKeyName(ctx context.Context, provisioningServiceName string, keyName string, resourceGroupName string) (result iothub.SharedAccessSignatureAuthorizationRuleAccessRightsDescription, err error) ListValidSkus(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.IotDpsSkuDefinitionListResultPage, err error) + ListValidSkusComplete(ctx context.Context, provisioningServiceName string, resourceGroupName string) (result iothub.IotDpsSkuDefinitionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, provisioningServiceName string, provisioningServiceTags iothub.TagsResource) (result iothub.IotDpsResourceUpdateFuture, err error) } diff --git a/services/provisioningservices/mgmt/2018-01-22/iothub/operations.go b/services/provisioningservices/mgmt/2018-01-22/iothub/operations.go index 5fdd69a14174..95d33025bb41 100644 --- a/services/provisioningservices/mgmt/2018-01-22/iothub/operations.go +++ b/services/provisioningservices/mgmt/2018-01-22/iothub/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/backupapi/interfaces.go b/services/recoveryservices/mgmt/2016-06-01/backup/backupapi/interfaces.go index 830e4cf62968..38503cf36c07 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/backupapi/interfaces.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/backupapi/interfaces.go @@ -121,6 +121,7 @@ type ProtectedItemsClientAPI interface { Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string) (result autorest.Response, err error) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.ProtectedItemResource, err error) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectedItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectedItemResourceListIterator, err error) } var _ ProtectedItemsClientAPI = (*backup.ProtectedItemsClient)(nil) @@ -128,6 +129,7 @@ var _ ProtectedItemsClientAPI = (*backup.ProtectedItemsClient)(nil) // ProtectableItemsClientAPI contains the set of methods on the ProtectableItemsClient type. type ProtectableItemsClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListIterator, err error) } var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) @@ -150,6 +152,7 @@ var _ JobOperationResultsClientAPI = (*backup.JobOperationResultsClient)(nil) type JobsClientAPI interface { Export(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result autorest.Response, err error) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.JobResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.JobResourceListIterator, err error) } var _ JobsClientAPI = (*backup.JobsClient)(nil) @@ -185,6 +188,7 @@ var _ OperationResultsClientAPI = (*backup.OperationResultsClient)(nil) // EnginesClientAPI contains the set of methods on the EnginesClient type. type EnginesClientAPI interface { Get(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListPage, err error) + GetComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListIterator, err error) } var _ EnginesClientAPI = (*backup.EnginesClient)(nil) diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/backups.go b/services/recoveryservices/mgmt/2016-06-01/backup/backups.go index 52e131599379..cfb30c19cc76 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/backups.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/backups.go @@ -35,7 +35,8 @@ func NewBackupsClient(subscriptionID string) BackupsClient { return NewBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupsClientWithBaseURI creates an instance of the BackupsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/client.go b/services/recoveryservices/mgmt/2016-06-01/backup/client.go index 368e7dd02114..ed8404645edc 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/client.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/engines.go b/services/recoveryservices/mgmt/2016-06-01/backup/engines.go index 533df8592111..b31192f79ce5 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/engines.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/engines.go @@ -35,7 +35,8 @@ func NewEnginesClient(subscriptionID string) EnginesClient { return NewEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client. +// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnginesClientWithBaseURI(baseURI string, subscriptionID string) EnginesClient { return EnginesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/exportjobsoperationresults.go b/services/recoveryservices/mgmt/2016-06-01/backup/exportjobsoperationresults.go index 12424d8713aa..85b51089e162 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/exportjobsoperationresults.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/exportjobsoperationresults.go @@ -35,7 +35,9 @@ func NewExportJobsOperationResultsClient(subscriptionID string) ExportJobsOperat return NewExportJobsOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the ExportJobsOperationResultsClient client. +// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the ExportJobsOperationResultsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewExportJobsOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsOperationResultsClient { return ExportJobsOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/itemlevelrecoveryconnections.go b/services/recoveryservices/mgmt/2016-06-01/backup/itemlevelrecoveryconnections.go index df59215ad771..391312c0d4f5 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/itemlevelrecoveryconnections.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/itemlevelrecoveryconnections.go @@ -36,7 +36,8 @@ func NewItemLevelRecoveryConnectionsClient(subscriptionID string) ItemLevelRecov } // NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the ItemLevelRecoveryConnectionsClient -// 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 NewItemLevelRecoveryConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ItemLevelRecoveryConnectionsClient { return ItemLevelRecoveryConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/jobcancellations.go b/services/recoveryservices/mgmt/2016-06-01/backup/jobcancellations.go index ac2a8f853a16..295a25a34853 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/jobcancellations.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/jobcancellations.go @@ -35,7 +35,9 @@ func NewJobCancellationsClient(subscriptionID string) JobCancellationsClient { return NewJobCancellationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCancellationsClientWithBaseURI creates an instance of the JobCancellationsClient client. +// NewJobCancellationsClientWithBaseURI creates an instance of the JobCancellationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewJobCancellationsClientWithBaseURI(baseURI string, subscriptionID string) JobCancellationsClient { return JobCancellationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/jobdetails.go b/services/recoveryservices/mgmt/2016-06-01/backup/jobdetails.go index f9761255f21c..8eda6dac3d0f 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/jobdetails.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/jobdetails.go @@ -35,7 +35,8 @@ func NewJobDetailsClient(subscriptionID string) JobDetailsClient { return NewJobDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient client. +// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobDetailsClientWithBaseURI(baseURI string, subscriptionID string) JobDetailsClient { return JobDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/joboperationresults.go b/services/recoveryservices/mgmt/2016-06-01/backup/joboperationresults.go index 790fbca69bd5..334c3f98a37d 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/joboperationresults.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/joboperationresults.go @@ -35,7 +35,9 @@ func NewJobOperationResultsClient(subscriptionID string) JobOperationResultsClie return NewJobOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobOperationResultsClientWithBaseURI creates an instance of the JobOperationResultsClient client. +// NewJobOperationResultsClientWithBaseURI creates an instance of the JobOperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewJobOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) JobOperationResultsClient { return JobOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/jobs.go b/services/recoveryservices/mgmt/2016-06-01/backup/jobs.go index faa52601e34f..c274e2b49ddf 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/jobs.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/jobs.go @@ -35,7 +35,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/operationresults.go b/services/recoveryservices/mgmt/2016-06-01/backup/operationresults.go index ef8f7550a1cb..2934e5bf68ae 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/operationresults.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/operationresults.go @@ -35,7 +35,9 @@ func NewOperationResultsClient(subscriptionID string) OperationResultsClient { return NewOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client. +// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) OperationResultsClient { return OperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/operationstatuses.go b/services/recoveryservices/mgmt/2016-06-01/backup/operationstatuses.go index d65f482e45fc..7d4794d1ee66 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/operationstatuses.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/operationstatuses.go @@ -35,7 +35,9 @@ func NewOperationStatusesClient(subscriptionID string) OperationStatusesClient { return NewOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client. +// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusesClient { return OperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protectableitems.go b/services/recoveryservices/mgmt/2016-06-01/backup/protectableitems.go index b82d4aec26f2..aba1781243c9 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protectableitems.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protectableitems.go @@ -35,7 +35,9 @@ func NewProtectableItemsClient(subscriptionID string) ProtectableItemsClient { return NewProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client. +// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectableItemsClient { return ProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protecteditemoperationresults.go b/services/recoveryservices/mgmt/2016-06-01/backup/protecteditemoperationresults.go index a1d7584f5d63..718a39d2664d 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protecteditemoperationresults.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protecteditemoperationresults.go @@ -36,7 +36,8 @@ func NewProtectedItemOperationResultsClient(subscriptionID string) ProtectedItem } // NewProtectedItemOperationResultsClientWithBaseURI creates an instance of the ProtectedItemOperationResultsClient -// 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 NewProtectedItemOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationResultsClient { return ProtectedItemOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protecteditemoperationstatuses.go b/services/recoveryservices/mgmt/2016-06-01/backup/protecteditemoperationstatuses.go index 8d8ae8689472..f659bfcf5daa 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protecteditemoperationstatuses.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protecteditemoperationstatuses.go @@ -36,7 +36,8 @@ func NewProtectedItemOperationStatusesClient(subscriptionID string) ProtectedIte } // NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of the ProtectedItemOperationStatusesClient -// 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 NewProtectedItemOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationStatusesClient { return ProtectedItemOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protecteditems.go b/services/recoveryservices/mgmt/2016-06-01/backup/protecteditems.go index 511eec0d350f..00728575563d 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protecteditems.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protecteditems.go @@ -35,7 +35,8 @@ func NewProtectedItemsClient(subscriptionID string) ProtectedItemsClient { return NewProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectedItemsClientWithBaseURI creates an instance of the ProtectedItemsClient client. +// NewProtectedItemsClientWithBaseURI creates an instance of the ProtectedItemsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemsClient { return ProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontaineroperationresults.go b/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontaineroperationresults.go index cb5ecf7edc78..6cbca6583b4e 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontaineroperationresults.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontaineroperationresults.go @@ -37,7 +37,8 @@ func NewProtectionContainerOperationResultsClient(subscriptionID string) Protect } // NewProtectionContainerOperationResultsClientWithBaseURI creates an instance of the -// ProtectionContainerOperationResultsClient client. +// ProtectionContainerOperationResultsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionContainerOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerOperationResultsClient { return ProtectionContainerOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontainerrefreshoperationresults.go b/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontainerrefreshoperationresults.go index 69f82d00cef3..10015f58e0c1 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontainerrefreshoperationresults.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontainerrefreshoperationresults.go @@ -37,7 +37,8 @@ func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string) } // NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an instance of the -// ProtectionContainerRefreshOperationResultsClient client. +// ProtectionContainerRefreshOperationResultsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionContainerRefreshOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerRefreshOperationResultsClient { return ProtectionContainerRefreshOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontainers.go b/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontainers.go index 174c877b9c82..88cee588bfb9 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontainers.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protectioncontainers.go @@ -35,7 +35,9 @@ func NewProtectionContainersClient(subscriptionID string) ProtectionContainersCl return NewProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client. +// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersClient { return ProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicies.go b/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicies.go index 094e38c96ebb..619c609455a5 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicies.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicies.go @@ -35,7 +35,9 @@ func NewProtectionPoliciesClient(subscriptionID string) ProtectionPoliciesClient return NewProtectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client. +// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPoliciesClient { return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicyoperationresults.go b/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicyoperationresults.go index 700d6dd8fffb..fb70af9e6aad 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicyoperationresults.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicyoperationresults.go @@ -36,7 +36,8 @@ func NewProtectionPolicyOperationResultsClient(subscriptionID string) Protection } // NewProtectionPolicyOperationResultsClientWithBaseURI creates an instance of the -// ProtectionPolicyOperationResultsClient client. +// ProtectionPolicyOperationResultsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionPolicyOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationResultsClient { return ProtectionPolicyOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicyoperationstatuses.go b/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicyoperationstatuses.go index cef01e97e4e9..834e056423ee 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicyoperationstatuses.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/protectionpolicyoperationstatuses.go @@ -37,7 +37,8 @@ func NewProtectionPolicyOperationStatusesClient(subscriptionID string) Protectio } // NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the -// ProtectionPolicyOperationStatusesClient client. +// ProtectionPolicyOperationStatusesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient { return ProtectionPolicyOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/recoverypoints.go b/services/recoveryservices/mgmt/2016-06-01/backup/recoverypoints.go index 274f2f09af07..ecfd3a45b9e9 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/recoverypoints.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/recoverypoints.go @@ -35,7 +35,8 @@ func NewRecoveryPointsClient(subscriptionID string) RecoveryPointsClient { return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/backup/restores.go b/services/recoveryservices/mgmt/2016-06-01/backup/restores.go index eb2b3f1906a2..62bbe01f2a38 100644 --- a/services/recoveryservices/mgmt/2016-06-01/backup/restores.go +++ b/services/recoveryservices/mgmt/2016-06-01/backup/restores.go @@ -35,7 +35,8 @@ func NewRestoresClient(subscriptionID string) RestoresClient { return NewRestoresClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestoresClientWithBaseURI creates an instance of the RestoresClient client. +// NewRestoresClientWithBaseURI creates an instance of the RestoresClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRestoresClientWithBaseURI(baseURI string, subscriptionID string) RestoresClient { return RestoresClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/client.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/client.go index 221b1dd05edb..d30f3f68bab6 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/client.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/operations.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/operations.go index 2077471f78d1..2954d5d7db8c 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/operations.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/recoveryservices.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/recoveryservices.go index cdc21d952566..c81b4705417f 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/recoveryservices.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/recoveryservices.go @@ -35,7 +35,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/recoveryservicesapi/interfaces.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/recoveryservicesapi/interfaces.go index da3ddf452ea3..7b0a84b1efda 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/recoveryservicesapi/interfaces.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/recoveryservicesapi/interfaces.go @@ -57,7 +57,9 @@ type VaultsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, vaultName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, vaultName string) (result recoveryservices.Vault, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result recoveryservices.VaultListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result recoveryservices.VaultListIterator, err error) ListBySubscriptionID(ctx context.Context) (result recoveryservices.VaultListPage, err error) + ListBySubscriptionIDComplete(ctx context.Context) (result recoveryservices.VaultListIterator, err error) Update(ctx context.Context, resourceGroupName string, vaultName string, vault recoveryservices.PatchVault) (result recoveryservices.Vault, err error) } @@ -66,6 +68,7 @@ var _ VaultsClientAPI = (*recoveryservices.VaultsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result recoveryservices.ClientDiscoveryResponsePage, err error) + ListComplete(ctx context.Context) (result recoveryservices.ClientDiscoveryResponseIterator, err error) } var _ OperationsClientAPI = (*recoveryservices.OperationsClient)(nil) diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/registeredidentities.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/registeredidentities.go index c778fd207bbf..fec0713c63b9 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/registeredidentities.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/registeredidentities.go @@ -35,7 +35,9 @@ func NewRegisteredIdentitiesClient(subscriptionID string) RegisteredIdentitiesCl return NewRegisteredIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegisteredIdentitiesClientWithBaseURI creates an instance of the RegisteredIdentitiesClient client. +// NewRegisteredIdentitiesClientWithBaseURI creates an instance of the RegisteredIdentitiesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRegisteredIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) RegisteredIdentitiesClient { return RegisteredIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/replicationusages.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/replicationusages.go index 8a3a75307887..cb5febb3085f 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/replicationusages.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/replicationusages.go @@ -35,7 +35,9 @@ func NewReplicationUsagesClient(subscriptionID string) ReplicationUsagesClient { return NewReplicationUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationUsagesClientWithBaseURI creates an instance of the ReplicationUsagesClient client. +// NewReplicationUsagesClientWithBaseURI creates an instance of the ReplicationUsagesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationUsagesClientWithBaseURI(baseURI string, subscriptionID string) ReplicationUsagesClient { return ReplicationUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/usages.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/usages.go index e77d1f4f7aac..723df869587b 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/usages.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/usages.go @@ -35,7 +35,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultcertificates.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultcertificates.go index d5d2969891c9..d8433ad41946 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultcertificates.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultcertificates.go @@ -35,7 +35,9 @@ func NewVaultCertificatesClient(subscriptionID string) VaultCertificatesClient { return NewVaultCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVaultCertificatesClientWithBaseURI creates an instance of the VaultCertificatesClient client. +// NewVaultCertificatesClientWithBaseURI creates an instance of the VaultCertificatesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVaultCertificatesClientWithBaseURI(baseURI string, subscriptionID string) VaultCertificatesClient { return VaultCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultextendedinfo.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultextendedinfo.go index 87ca3ab5f5f4..2949cbc41f91 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultextendedinfo.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaultextendedinfo.go @@ -35,7 +35,9 @@ func NewVaultExtendedInfoClient(subscriptionID string) VaultExtendedInfoClient { return NewVaultExtendedInfoClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVaultExtendedInfoClientWithBaseURI creates an instance of the VaultExtendedInfoClient client. +// NewVaultExtendedInfoClientWithBaseURI creates an instance of the VaultExtendedInfoClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVaultExtendedInfoClientWithBaseURI(baseURI string, subscriptionID string) VaultExtendedInfoClient { return VaultExtendedInfoClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaults.go b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaults.go index 4ceb3b11b769..05e16b9ebb42 100644 --- a/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaults.go +++ b/services/recoveryservices/mgmt/2016-06-01/recoveryservices/vaults.go @@ -35,7 +35,8 @@ func NewVaultsClient(subscriptionID string) VaultsClient { return NewVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVaultsClientWithBaseURI creates an instance of the VaultsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/client.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/client.go index 1345422fcfcc..77eea2fd2b58 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/client.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string, resourceGroupName string, resourceName string) B return NewWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, resourceGroupName string, resourceName string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/operations.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/operations.go index 7e566309fe9e..288263b0ad4f 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/operations.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, resourceGroupName string, resour return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, resourceGroupName string, resourceName string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/recoverypoints.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/recoverypoints.go index e215fec5cda2..c8faf6613388 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/recoverypoints.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/recoverypoints.go @@ -35,7 +35,8 @@ func NewRecoveryPointsClient(subscriptionID string, resourceGroupName string, re return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client. +// 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, resourceGroupName string, resourceName string) RecoveryPointsClient { return RecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationalertsettings.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationalertsettings.go index 9853eba6acb4..5c8f2308b519 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationalertsettings.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationalertsettings.go @@ -35,7 +35,9 @@ func NewReplicationAlertSettingsClient(subscriptionID string, resourceGroupName return NewReplicationAlertSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationAlertSettingsClientWithBaseURI creates an instance of the ReplicationAlertSettingsClient client. +// NewReplicationAlertSettingsClientWithBaseURI creates an instance of the ReplicationAlertSettingsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationAlertSettingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationAlertSettingsClient { return ReplicationAlertSettingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationevents.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationevents.go index 47cec8b5530b..d9a3db2c257e 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationevents.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationevents.go @@ -35,7 +35,9 @@ func NewReplicationEventsClient(subscriptionID string, resourceGroupName string, return NewReplicationEventsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationEventsClientWithBaseURI creates an instance of the ReplicationEventsClient client. +// NewReplicationEventsClientWithBaseURI creates an instance of the ReplicationEventsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationEventsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationEventsClient { return ReplicationEventsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationfabrics.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationfabrics.go index 2f061127af32..33874f8f09d8 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationfabrics.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationfabrics.go @@ -35,7 +35,9 @@ func NewReplicationFabricsClient(subscriptionID string, resourceGroupName string return NewReplicationFabricsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationFabricsClientWithBaseURI creates an instance of the ReplicationFabricsClient client. +// NewReplicationFabricsClientWithBaseURI creates an instance of the ReplicationFabricsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationFabricsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationFabricsClient { return ReplicationFabricsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationjobs.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationjobs.go index 3eb5ac941ce6..34a80511c182 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationjobs.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationjobs.go @@ -35,7 +35,8 @@ func NewReplicationJobsClient(subscriptionID string, resourceGroupName string, r return NewReplicationJobsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationJobsClientWithBaseURI creates an instance of the ReplicationJobsClient client. +// NewReplicationJobsClientWithBaseURI creates an instance of the ReplicationJobsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationJobsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationJobsClient { return ReplicationJobsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationlogicalnetworks.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationlogicalnetworks.go index 2fe418f96ca6..7c462cfa702d 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationlogicalnetworks.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationlogicalnetworks.go @@ -36,7 +36,9 @@ func NewReplicationLogicalNetworksClient(subscriptionID string, resourceGroupNam return NewReplicationLogicalNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationLogicalNetworksClientWithBaseURI creates an instance of the ReplicationLogicalNetworksClient client. +// NewReplicationLogicalNetworksClientWithBaseURI creates an instance of the ReplicationLogicalNetworksClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationLogicalNetworksClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationLogicalNetworksClient { return ReplicationLogicalNetworksClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworkmappings.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworkmappings.go index ba7e21caf5f9..5fff16d524ab 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworkmappings.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworkmappings.go @@ -36,7 +36,9 @@ func NewReplicationNetworkMappingsClient(subscriptionID string, resourceGroupNam return NewReplicationNetworkMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationNetworkMappingsClientWithBaseURI creates an instance of the ReplicationNetworkMappingsClient client. +// NewReplicationNetworkMappingsClientWithBaseURI creates an instance of the ReplicationNetworkMappingsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationNetworkMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworkMappingsClient { return ReplicationNetworkMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworks.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworks.go index 66b75fa02357..81160ab1f10a 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworks.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationnetworks.go @@ -35,7 +35,9 @@ func NewReplicationNetworksClient(subscriptionID string, resourceGroupName strin return NewReplicationNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationNetworksClientWithBaseURI creates an instance of the ReplicationNetworksClient client. +// NewReplicationNetworksClientWithBaseURI creates an instance of the ReplicationNetworksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationNetworksClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworksClient { return ReplicationNetworksClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationpolicies.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationpolicies.go index 39610737a0e0..753252ca3847 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationpolicies.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationpolicies.go @@ -35,7 +35,9 @@ func NewReplicationPoliciesClient(subscriptionID string, resourceGroupName strin return NewReplicationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationPoliciesClientWithBaseURI creates an instance of the ReplicationPoliciesClient client. +// NewReplicationPoliciesClientWithBaseURI creates an instance of the ReplicationPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationPoliciesClient { return ReplicationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectableitems.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectableitems.go index c767f73b5668..d20115b0533f 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectableitems.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectableitems.go @@ -36,7 +36,9 @@ func NewReplicationProtectableItemsClient(subscriptionID string, resourceGroupNa return NewReplicationProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationProtectableItemsClientWithBaseURI creates an instance of the ReplicationProtectableItemsClient client. +// NewReplicationProtectableItemsClientWithBaseURI creates an instance of the ReplicationProtectableItemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectableItemsClient { return ReplicationProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotecteditems.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotecteditems.go index cc1c03761a61..f9c5920ac8e5 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotecteditems.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotecteditems.go @@ -36,7 +36,9 @@ func NewReplicationProtectedItemsClient(subscriptionID string, resourceGroupName return NewReplicationProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationProtectedItemsClientWithBaseURI creates an instance of the ReplicationProtectedItemsClient client. +// NewReplicationProtectedItemsClientWithBaseURI creates an instance of the ReplicationProtectedItemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectedItemsClient { return ReplicationProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainermappings.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainermappings.go index 1ba111c45048..a8096a297e5f 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainermappings.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainermappings.go @@ -38,7 +38,8 @@ func NewReplicationProtectionContainerMappingsClient(subscriptionID string, reso } // NewReplicationProtectionContainerMappingsClientWithBaseURI creates an instance of the -// ReplicationProtectionContainerMappingsClient client. +// ReplicationProtectionContainerMappingsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationProtectionContainerMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainerMappingsClient { return ReplicationProtectionContainerMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainers.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainers.go index d73d939b820f..b02ff30b5d89 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainers.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationprotectioncontainers.go @@ -37,7 +37,8 @@ func NewReplicationProtectionContainersClient(subscriptionID string, resourceGro } // NewReplicationProtectionContainersClientWithBaseURI creates an instance of the ReplicationProtectionContainersClient -// 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 NewReplicationProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainersClient { return ReplicationProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryplans.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryplans.go index 2cc864e9f2ba..cfe028fd5362 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryplans.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryplans.go @@ -36,7 +36,9 @@ func NewReplicationRecoveryPlansClient(subscriptionID string, resourceGroupName return NewReplicationRecoveryPlansClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationRecoveryPlansClientWithBaseURI creates an instance of the ReplicationRecoveryPlansClient client. +// NewReplicationRecoveryPlansClientWithBaseURI creates an instance of the ReplicationRecoveryPlansClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationRecoveryPlansClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryPlansClient { return ReplicationRecoveryPlansClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryservicesproviders.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryservicesproviders.go index 804d6be4a45e..cb1e9179788f 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryservicesproviders.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationrecoveryservicesproviders.go @@ -38,7 +38,8 @@ func NewReplicationRecoveryServicesProvidersClient(subscriptionID string, resour } // NewReplicationRecoveryServicesProvidersClientWithBaseURI creates an instance of the -// ReplicationRecoveryServicesProvidersClient client. +// ReplicationRecoveryServicesProvidersClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationRecoveryServicesProvidersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryServicesProvidersClient { return ReplicationRecoveryServicesProvidersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassificationmappings.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassificationmappings.go index b39db79f31b5..3e4ec36d1175 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassificationmappings.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassificationmappings.go @@ -38,7 +38,8 @@ func NewReplicationStorageClassificationMappingsClient(subscriptionID string, re } // NewReplicationStorageClassificationMappingsClientWithBaseURI creates an instance of the -// ReplicationStorageClassificationMappingsClient client. +// ReplicationStorageClassificationMappingsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationStorageClassificationMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationMappingsClient { return ReplicationStorageClassificationMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassifications.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassifications.go index e650b5f99a68..d97293d07f15 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassifications.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationstorageclassifications.go @@ -38,7 +38,8 @@ func NewReplicationStorageClassificationsClient(subscriptionID string, resourceG } // NewReplicationStorageClassificationsClientWithBaseURI creates an instance of the -// ReplicationStorageClassificationsClient client. +// ReplicationStorageClassificationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationStorageClassificationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationsClient { return ReplicationStorageClassificationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvaulthealth.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvaulthealth.go index 0e90821c0886..3db923b460e0 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvaulthealth.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvaulthealth.go @@ -35,7 +35,9 @@ func NewReplicationVaultHealthClient(subscriptionID string, resourceGroupName st return NewReplicationVaultHealthClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationVaultHealthClientWithBaseURI creates an instance of the ReplicationVaultHealthClient client. +// NewReplicationVaultHealthClientWithBaseURI creates an instance of the ReplicationVaultHealthClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReplicationVaultHealthClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { return ReplicationVaultHealthClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvcenters.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvcenters.go index 2e8a72d8164d..fb87ffa1071d 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvcenters.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/replicationvcenters.go @@ -35,7 +35,9 @@ func NewReplicationvCentersClient(subscriptionID string, resourceGroupName strin return NewReplicationvCentersClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationvCentersClientWithBaseURI creates an instance of the ReplicationvCentersClient client. +// NewReplicationvCentersClientWithBaseURI creates an instance of the ReplicationvCentersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationvCentersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationvCentersClient { return ReplicationvCentersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2016-08-10/siterecovery/siterecoveryapi/interfaces.go b/services/recoveryservices/mgmt/2016-08-10/siterecovery/siterecoveryapi/interfaces.go index 91bd7f3e86bd..a4c6a26de821 100644 --- a/services/recoveryservices/mgmt/2016-08-10/siterecovery/siterecoveryapi/interfaces.go +++ b/services/recoveryservices/mgmt/2016-08-10/siterecovery/siterecoveryapi/interfaces.go @@ -37,7 +37,9 @@ type ReplicationProtectedItemsClientAPI interface { FailoverCommit(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsFailoverCommitFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItem, err error) List(ctx context.Context, skipToken string, filter string) (result siterecovery.ReplicationProtectedItemCollectionPage, err error) + ListComplete(ctx context.Context, skipToken string, filter string) (result siterecovery.ReplicationProtectedItemCollectionIterator, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ReplicationProtectedItemCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ReplicationProtectedItemCollectionIterator, err error) PlannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput siterecovery.PlannedFailoverInput) (result siterecovery.ReplicationProtectedItemsPlannedFailoverFuture, err error) Purge(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsPurgeFuture, err error) RepairReplication(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsRepairReplicationFuture, err error) @@ -57,7 +59,9 @@ type ReplicationNetworkMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result siterecovery.ReplicationNetworkMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result siterecovery.NetworkMapping, err error) List(ctx context.Context) (result siterecovery.NetworkMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.NetworkMappingCollectionIterator, err error) ListByReplicationNetworks(ctx context.Context, fabricName string, networkName string) (result siterecovery.NetworkMappingCollectionPage, err error) + ListByReplicationNetworksComplete(ctx context.Context, fabricName string, networkName string) (result siterecovery.NetworkMappingCollectionIterator, err error) Update(ctx context.Context, fabricName string, networkName string, networkMappingName string, input siterecovery.UpdateNetworkMappingInput) (result siterecovery.ReplicationNetworkMappingsUpdateFuture, err error) } @@ -70,6 +74,7 @@ type ReplicationFabricsClientAPI interface { Delete(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsDeleteFuture, err error) Get(ctx context.Context, fabricName string) (result siterecovery.Fabric, err error) List(ctx context.Context) (result siterecovery.FabricCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.FabricCollectionIterator, err error) MigrateToAad(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsMigrateToAadFuture, err error) Purge(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsPurgeFuture, err error) ReassociateGateway(ctx context.Context, fabricName string, failoverProcessServerRequest siterecovery.FailoverProcessServerRequest) (result siterecovery.ReplicationFabricsReassociateGatewayFuture, err error) @@ -84,7 +89,9 @@ type ReplicationvCentersClientAPI interface { Delete(ctx context.Context, fabricName string, vCenterName string) (result siterecovery.ReplicationvCentersDeleteFuture, err error) Get(ctx context.Context, fabricName string, vCenterName string) (result siterecovery.VCenter, err error) List(ctx context.Context) (result siterecovery.VCenterCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.VCenterCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.VCenterCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.VCenterCollectionIterator, err error) Update(ctx context.Context, fabricName string, vCenterName string, updateVCenterRequest siterecovery.UpdateVCenterRequest) (result siterecovery.ReplicationvCentersUpdateFuture, err error) } @@ -96,7 +103,9 @@ type ReplicationStorageClassificationMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result siterecovery.ReplicationStorageClassificationMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result siterecovery.StorageClassificationMapping, err error) List(ctx context.Context) (result siterecovery.StorageClassificationMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.StorageClassificationMappingCollectionIterator, err error) ListByReplicationStorageClassifications(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassificationMappingCollectionPage, err error) + ListByReplicationStorageClassificationsComplete(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassificationMappingCollectionIterator, err error) } var _ ReplicationStorageClassificationMappingsClientAPI = (*siterecovery.ReplicationStorageClassificationMappingsClient)(nil) @@ -105,7 +114,9 @@ var _ ReplicationStorageClassificationMappingsClientAPI = (*siterecovery.Replica type ReplicationStorageClassificationsClientAPI interface { Get(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassification, err error) List(ctx context.Context) (result siterecovery.StorageClassificationCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.StorageClassificationCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.StorageClassificationCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.StorageClassificationCollectionIterator, err error) } var _ ReplicationStorageClassificationsClientAPI = (*siterecovery.ReplicationStorageClassificationsClient)(nil) @@ -115,7 +126,9 @@ type ReplicationRecoveryServicesProvidersClientAPI interface { Delete(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture, err error) Get(ctx context.Context, fabricName string, providerName string) (result siterecovery.RecoveryServicesProvider, err error) List(ctx context.Context) (result siterecovery.RecoveryServicesProviderCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.RecoveryServicesProviderCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.RecoveryServicesProviderCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.RecoveryServicesProviderCollectionIterator, err error) Purge(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture, err error) RefreshProvider(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) } @@ -126,6 +139,7 @@ var _ ReplicationRecoveryServicesProvidersClientAPI = (*siterecovery.Replication type RecoveryPointsClientAPI interface { Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string) (result siterecovery.RecoveryPoint, err error) ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.RecoveryPointCollectionPage, err error) + ListByReplicationProtectedItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.RecoveryPointCollectionIterator, err error) } var _ RecoveryPointsClientAPI = (*siterecovery.RecoveryPointsClient)(nil) @@ -137,6 +151,7 @@ type ReplicationRecoveryPlansClientAPI interface { FailoverCommit(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansFailoverCommitFuture, err error) Get(ctx context.Context, recoveryPlanName string) (result siterecovery.RecoveryPlan, err error) List(ctx context.Context) (result siterecovery.RecoveryPlanCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.RecoveryPlanCollectionIterator, err error) PlannedFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanPlannedFailoverInput) (result siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture, err error) Reprotect(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansReprotectFuture, err error) TestFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanTestFailoverInput) (result siterecovery.ReplicationRecoveryPlansTestFailoverFuture, err error) @@ -154,7 +169,9 @@ type ReplicationProtectionContainersClientAPI interface { DiscoverProtectableItem(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest siterecovery.DiscoverProtectableItemRequest) (result siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainer, err error) List(ctx context.Context) (result siterecovery.ProtectionContainerCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.ProtectionContainerCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.ProtectionContainerCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.ProtectionContainerCollectionIterator, err error) SwitchProtection(ctx context.Context, fabricName string, protectionContainerName string, switchInput siterecovery.SwitchProtectionInput) (result siterecovery.ReplicationProtectionContainersSwitchProtectionFuture, err error) } @@ -166,7 +183,9 @@ type ReplicationProtectionContainerMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput siterecovery.RemoveProtectionContainerMappingInput) (result siterecovery.ReplicationProtectionContainerMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result siterecovery.ProtectionContainerMapping, err error) List(ctx context.Context) (result siterecovery.ProtectionContainerMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.ProtectionContainerMappingCollectionIterator, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainerMappingCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainerMappingCollectionIterator, err error) Purge(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result siterecovery.ReplicationProtectionContainerMappingsPurgeFuture, err error) } @@ -176,6 +195,7 @@ var _ ReplicationProtectionContainerMappingsClientAPI = (*siterecovery.Replicati type ReplicationProtectableItemsClientAPI interface { Get(ctx context.Context, fabricName string, protectionContainerName string, protectableItemName string) (result siterecovery.ProtectableItem, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectableItemCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectableItemCollectionIterator, err error) } var _ ReplicationProtectableItemsClientAPI = (*siterecovery.ReplicationProtectableItemsClient)(nil) @@ -186,6 +206,7 @@ type ReplicationPoliciesClientAPI interface { Delete(ctx context.Context, policyName string) (result siterecovery.ReplicationPoliciesDeleteFuture, err error) Get(ctx context.Context, policyName string) (result siterecovery.Policy, err error) List(ctx context.Context) (result siterecovery.PolicyCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.PolicyCollectionIterator, err error) Update(ctx context.Context, policyName string, input siterecovery.UpdatePolicyInput) (result siterecovery.ReplicationPoliciesUpdateFuture, err error) } @@ -194,6 +215,7 @@ var _ ReplicationPoliciesClientAPI = (*siterecovery.ReplicationPoliciesClient)(n // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result siterecovery.OperationsDiscoveryCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.OperationsDiscoveryCollectionIterator, err error) } var _ OperationsClientAPI = (*siterecovery.OperationsClient)(nil) @@ -202,7 +224,9 @@ var _ OperationsClientAPI = (*siterecovery.OperationsClient)(nil) type ReplicationNetworksClientAPI interface { Get(ctx context.Context, fabricName string, networkName string) (result siterecovery.Network, err error) List(ctx context.Context) (result siterecovery.NetworkCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.NetworkCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.NetworkCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.NetworkCollectionIterator, err error) } var _ ReplicationNetworksClientAPI = (*siterecovery.ReplicationNetworksClient)(nil) @@ -211,6 +235,7 @@ var _ ReplicationNetworksClientAPI = (*siterecovery.ReplicationNetworksClient)(n type ReplicationLogicalNetworksClientAPI interface { Get(ctx context.Context, fabricName string, logicalNetworkName string) (result siterecovery.LogicalNetwork, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.LogicalNetworkCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.LogicalNetworkCollectionIterator, err error) } var _ ReplicationLogicalNetworksClientAPI = (*siterecovery.ReplicationLogicalNetworksClient)(nil) @@ -221,6 +246,7 @@ type ReplicationJobsClientAPI interface { Export(ctx context.Context, jobQueryParameter siterecovery.JobQueryParameter) (result siterecovery.ReplicationJobsExportFuture, err error) Get(ctx context.Context, jobName string) (result siterecovery.Job, err error) List(ctx context.Context, filter string) (result siterecovery.JobCollectionPage, err error) + ListComplete(ctx context.Context, filter string) (result siterecovery.JobCollectionIterator, err error) Restart(ctx context.Context, jobName string) (result siterecovery.ReplicationJobsRestartFuture, err error) Resume(ctx context.Context, jobName string, resumeJobParams siterecovery.ResumeJobParams) (result siterecovery.ReplicationJobsResumeFuture, err error) } @@ -231,6 +257,7 @@ var _ ReplicationJobsClientAPI = (*siterecovery.ReplicationJobsClient)(nil) type ReplicationEventsClientAPI interface { Get(ctx context.Context, eventName string) (result siterecovery.Event, err error) List(ctx context.Context, filter string) (result siterecovery.EventCollectionPage, err error) + ListComplete(ctx context.Context, filter string) (result siterecovery.EventCollectionIterator, err error) } var _ ReplicationEventsClientAPI = (*siterecovery.ReplicationEventsClient)(nil) @@ -240,6 +267,7 @@ type ReplicationAlertSettingsClientAPI interface { Create(ctx context.Context, alertSettingName string, request siterecovery.ConfigureAlertRequest) (result siterecovery.Alert, err error) Get(ctx context.Context, alertSettingName string) (result siterecovery.Alert, err error) List(ctx context.Context) (result siterecovery.AlertCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.AlertCollectionIterator, err error) } var _ ReplicationAlertSettingsClientAPI = (*siterecovery.ReplicationAlertSettingsClient)(nil) diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/backupapi/interfaces.go b/services/recoveryservices/mgmt/2016-12-01/backup/backupapi/interfaces.go index 151f504f7d2a..25d881efd18e 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/backupapi/interfaces.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/backupapi/interfaces.go @@ -27,6 +27,7 @@ import ( type EnginesClientAPI interface { Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result backup.EngineBaseResource, err error) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListIterator, err error) } var _ EnginesClientAPI = (*backup.EnginesClient)(nil) @@ -41,6 +42,7 @@ var _ ProtectionContainerRefreshOperationResultsClientAPI = (*backup.ProtectionC // ProtectableContainersClientAPI contains the set of methods on the ProtectableContainersClient type. type ProtectableContainersClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListIterator, err error) } var _ ProtectableContainersClientAPI = (*backup.ProtectableContainersClient)(nil) @@ -59,6 +61,7 @@ var _ ProtectionContainersClientAPI = (*backup.ProtectionContainersClient)(nil) // WorkloadItemsClientAPI contains the set of methods on the WorkloadItemsClient type. type WorkloadItemsClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListIterator, err error) } var _ WorkloadItemsClientAPI = (*backup.WorkloadItemsClient)(nil) @@ -123,6 +126,7 @@ var _ ProtectionPolicyOperationStatusesClientAPI = (*backup.ProtectionPolicyOper // ProtectableItemsClientAPI contains the set of methods on the ProtectableItemsClient type. type ProtectableItemsClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListIterator, err error) } var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) @@ -130,6 +134,7 @@ var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) // ProtectionContainersGroupClientAPI contains the set of methods on the ProtectionContainersGroupClient type. type ProtectionContainersGroupClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListIterator, err error) } var _ ProtectionContainersGroupClientAPI = (*backup.ProtectionContainersGroupClient)(nil) diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/backups.go b/services/recoveryservices/mgmt/2016-12-01/backup/backups.go index a8efbd3c56ba..2a389bc1f90f 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/backups.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/backups.go @@ -35,7 +35,8 @@ func NewBackupsClient(subscriptionID string) BackupsClient { return NewBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupsClientWithBaseURI creates an instance of the BackupsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/client.go b/services/recoveryservices/mgmt/2016-12-01/backup/client.go index fb9c2765dc84..3c1348186fa1 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/client.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/engines.go b/services/recoveryservices/mgmt/2016-12-01/backup/engines.go index b12a52d19b6c..fc9aa41d61e5 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/engines.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/engines.go @@ -35,7 +35,8 @@ func NewEnginesClient(subscriptionID string) EnginesClient { return NewEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client. +// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnginesClientWithBaseURI(baseURI string, subscriptionID string) EnginesClient { return EnginesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/itemlevelrecoveryconnections.go b/services/recoveryservices/mgmt/2016-12-01/backup/itemlevelrecoveryconnections.go index bfde3e76ee52..d6ba8b5e4037 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/itemlevelrecoveryconnections.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/itemlevelrecoveryconnections.go @@ -36,7 +36,8 @@ func NewItemLevelRecoveryConnectionsClient(subscriptionID string) ItemLevelRecov } // NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the ItemLevelRecoveryConnectionsClient -// 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 NewItemLevelRecoveryConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ItemLevelRecoveryConnectionsClient { return ItemLevelRecoveryConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/operationresults.go b/services/recoveryservices/mgmt/2016-12-01/backup/operationresults.go index e82ace5af78d..4b9e75433bb0 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/operationresults.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/operationresults.go @@ -35,7 +35,9 @@ func NewOperationResultsClient(subscriptionID string) OperationResultsClient { return NewOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client. +// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) OperationResultsClient { return OperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/operationstatuses.go b/services/recoveryservices/mgmt/2016-12-01/backup/operationstatuses.go index b5c7ef6eebff..c8c1b383eb8e 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/operationstatuses.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/operationstatuses.go @@ -35,7 +35,9 @@ func NewOperationStatusesClient(subscriptionID string) OperationStatusesClient { return NewOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client. +// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusesClient { return OperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protectablecontainers.go b/services/recoveryservices/mgmt/2016-12-01/backup/protectablecontainers.go index 0467090aa353..6340a1c1fd61 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protectablecontainers.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protectablecontainers.go @@ -35,7 +35,9 @@ func NewProtectableContainersClient(subscriptionID string) ProtectableContainers return NewProtectableContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectableContainersClientWithBaseURI creates an instance of the ProtectableContainersClient client. +// NewProtectableContainersClientWithBaseURI creates an instance of the ProtectableContainersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewProtectableContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectableContainersClient { return ProtectableContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protectableitems.go b/services/recoveryservices/mgmt/2016-12-01/backup/protectableitems.go index 18b8d7f3f683..137522a855fb 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protectableitems.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protectableitems.go @@ -35,7 +35,9 @@ func NewProtectableItemsClient(subscriptionID string) ProtectableItemsClient { return NewProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client. +// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectableItemsClient { return ProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protecteditemoperationstatuses.go b/services/recoveryservices/mgmt/2016-12-01/backup/protecteditemoperationstatuses.go index 5f5153a60b4f..2c488d23be42 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protecteditemoperationstatuses.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protecteditemoperationstatuses.go @@ -36,7 +36,8 @@ func NewProtectedItemOperationStatusesClient(subscriptionID string) ProtectedIte } // NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of the ProtectedItemOperationStatusesClient -// 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 NewProtectedItemOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationStatusesClient { return ProtectedItemOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontaineroperationresults.go b/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontaineroperationresults.go index 7509f1f533a5..6e8533cf1194 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontaineroperationresults.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontaineroperationresults.go @@ -37,7 +37,8 @@ func NewProtectionContainerOperationResultsClient(subscriptionID string) Protect } // NewProtectionContainerOperationResultsClientWithBaseURI creates an instance of the -// ProtectionContainerOperationResultsClient client. +// ProtectionContainerOperationResultsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionContainerOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerOperationResultsClient { return ProtectionContainerOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainerrefreshoperationresults.go b/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainerrefreshoperationresults.go index 423b836635c3..5fde7c63f5c0 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainerrefreshoperationresults.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainerrefreshoperationresults.go @@ -37,7 +37,8 @@ func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string) } // NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an instance of the -// ProtectionContainerRefreshOperationResultsClient client. +// ProtectionContainerRefreshOperationResultsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionContainerRefreshOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerRefreshOperationResultsClient { return ProtectionContainerRefreshOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainers.go b/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainers.go index 60649b4cbfc0..7c40fe0d2cc9 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainers.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainers.go @@ -35,7 +35,9 @@ func NewProtectionContainersClient(subscriptionID string) ProtectionContainersCl return NewProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client. +// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersClient { return ProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainersgroup.go b/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainersgroup.go index 5895c5e0db01..7d6de9dcfcea 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainersgroup.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protectioncontainersgroup.go @@ -35,7 +35,9 @@ func NewProtectionContainersGroupClient(subscriptionID string) ProtectionContain return NewProtectionContainersGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainersGroupClientWithBaseURI creates an instance of the ProtectionContainersGroupClient client. +// NewProtectionContainersGroupClientWithBaseURI creates an instance of the ProtectionContainersGroupClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProtectionContainersGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersGroupClient { return ProtectionContainersGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protectionpolicies.go b/services/recoveryservices/mgmt/2016-12-01/backup/protectionpolicies.go index 91701ff371aa..7dcff62aaa8e 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protectionpolicies.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protectionpolicies.go @@ -35,7 +35,9 @@ func NewProtectionPoliciesClient(subscriptionID string) ProtectionPoliciesClient return NewProtectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client. +// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPoliciesClient { return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/protectionpolicyoperationstatuses.go b/services/recoveryservices/mgmt/2016-12-01/backup/protectionpolicyoperationstatuses.go index ac06686b3816..e22d4d8ed8be 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/protectionpolicyoperationstatuses.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/protectionpolicyoperationstatuses.go @@ -37,7 +37,8 @@ func NewProtectionPolicyOperationStatusesClient(subscriptionID string) Protectio } // NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the -// ProtectionPolicyOperationStatusesClient client. +// ProtectionPolicyOperationStatusesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient { return ProtectionPolicyOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/resourcestorageconfigs.go b/services/recoveryservices/mgmt/2016-12-01/backup/resourcestorageconfigs.go index ef3d82a86cd9..cdbfd329774b 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/resourcestorageconfigs.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/resourcestorageconfigs.go @@ -35,7 +35,9 @@ func NewResourceStorageConfigsClient(subscriptionID string) ResourceStorageConfi return NewResourceStorageConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceStorageConfigsClientWithBaseURI creates an instance of the ResourceStorageConfigsClient client. +// NewResourceStorageConfigsClientWithBaseURI creates an instance of the ResourceStorageConfigsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceStorageConfigsClientWithBaseURI(baseURI string, subscriptionID string) ResourceStorageConfigsClient { return ResourceStorageConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/securitypins.go b/services/recoveryservices/mgmt/2016-12-01/backup/securitypins.go index 281905c96c53..c34b255d99fd 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/securitypins.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/securitypins.go @@ -35,7 +35,8 @@ func NewSecurityPINsClient(subscriptionID string) SecurityPINsClient { return NewSecurityPINsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client. +// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecurityPINsClientWithBaseURI(baseURI string, subscriptionID string) SecurityPINsClient { return SecurityPINsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2016-12-01/backup/workloaditems.go b/services/recoveryservices/mgmt/2016-12-01/backup/workloaditems.go index 8523e8ce4bb6..b5585cf4ea5f 100644 --- a/services/recoveryservices/mgmt/2016-12-01/backup/workloaditems.go +++ b/services/recoveryservices/mgmt/2016-12-01/backup/workloaditems.go @@ -35,7 +35,8 @@ func NewWorkloadItemsClient(subscriptionID string) WorkloadItemsClient { return NewWorkloadItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkloadItemsClientWithBaseURI creates an instance of the WorkloadItemsClient client. +// NewWorkloadItemsClientWithBaseURI creates an instance of the WorkloadItemsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkloadItemsClientWithBaseURI(baseURI string, subscriptionID string) WorkloadItemsClient { return WorkloadItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/backupapi/interfaces.go b/services/recoveryservices/mgmt/2017-07-01/backup/backupapi/interfaces.go index 4eb6d9d38497..484e58e47913 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/backupapi/interfaces.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/backupapi/interfaces.go @@ -50,6 +50,7 @@ var _ FeatureSupportClientAPI = (*backup.FeatureSupportClient)(nil) // ProtectionIntentGroupClientAPI contains the set of methods on the ProtectionIntentGroupClient type. type ProtectionIntentGroupClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectionIntentResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectionIntentResourceListIterator, err error) } var _ ProtectionIntentGroupClientAPI = (*backup.ProtectionIntentGroupClient)(nil) @@ -65,6 +66,7 @@ var _ UsageSummariesClientAPI = (*backup.UsageSummariesClient)(nil) type EnginesClientAPI interface { Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result backup.EngineBaseResource, err error) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListIterator, err error) } var _ EnginesClientAPI = (*backup.EnginesClient)(nil) @@ -79,6 +81,7 @@ var _ ProtectionContainerRefreshOperationResultsClientAPI = (*backup.ProtectionC // ProtectableContainersClientAPI contains the set of methods on the ProtectableContainersClient type. type ProtectableContainersClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListIterator, err error) } var _ ProtectableContainersClientAPI = (*backup.ProtectableContainersClient)(nil) @@ -97,6 +100,7 @@ var _ ProtectionContainersClientAPI = (*backup.ProtectionContainersClient)(nil) // WorkloadItemsClientAPI contains the set of methods on the WorkloadItemsClient type. type WorkloadItemsClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListIterator, err error) } var _ WorkloadItemsClientAPI = (*backup.WorkloadItemsClient)(nil) @@ -161,6 +165,7 @@ var _ ProtectionPolicyOperationStatusesClientAPI = (*backup.ProtectionPolicyOper // ProtectableItemsClientAPI contains the set of methods on the ProtectableItemsClient type. type ProtectableItemsClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListIterator, err error) } var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) @@ -168,6 +173,7 @@ var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) // ProtectionContainersGroupClientAPI contains the set of methods on the ProtectionContainersGroupClient type. type ProtectionContainersGroupClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListIterator, err error) } var _ ProtectionContainersGroupClientAPI = (*backup.ProtectionContainersGroupClient)(nil) @@ -191,6 +197,7 @@ var _ ResourceStorageConfigsClientAPI = (*backup.ResourceStorageConfigsClient)(n // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result backup.ClientDiscoveryResponsePage, err error) + ListComplete(ctx context.Context) (result backup.ClientDiscoveryResponseIterator, err error) } var _ OperationsClientAPI = (*backup.OperationsClient)(nil) diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/backups.go b/services/recoveryservices/mgmt/2017-07-01/backup/backups.go index a8efbd3c56ba..2a389bc1f90f 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/backups.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/backups.go @@ -35,7 +35,8 @@ func NewBackupsClient(subscriptionID string) BackupsClient { return NewBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupsClientWithBaseURI creates an instance of the BackupsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/client.go b/services/recoveryservices/mgmt/2017-07-01/backup/client.go index 46ea059ebaf8..ee93a5b9b32b 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/client.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/engines.go b/services/recoveryservices/mgmt/2017-07-01/backup/engines.go index b12a52d19b6c..fc9aa41d61e5 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/engines.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/engines.go @@ -35,7 +35,8 @@ func NewEnginesClient(subscriptionID string) EnginesClient { return NewEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client. +// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnginesClientWithBaseURI(baseURI string, subscriptionID string) EnginesClient { return EnginesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/featuresupport.go b/services/recoveryservices/mgmt/2017-07-01/backup/featuresupport.go index 6f7d732b6e93..92881d841fd9 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/featuresupport.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/featuresupport.go @@ -35,7 +35,8 @@ func NewFeatureSupportClient(subscriptionID string) FeatureSupportClient { return NewFeatureSupportClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFeatureSupportClientWithBaseURI creates an instance of the FeatureSupportClient client. +// NewFeatureSupportClientWithBaseURI creates an instance of the FeatureSupportClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFeatureSupportClientWithBaseURI(baseURI string, subscriptionID string) FeatureSupportClient { return FeatureSupportClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/itemlevelrecoveryconnections.go b/services/recoveryservices/mgmt/2017-07-01/backup/itemlevelrecoveryconnections.go index bfde3e76ee52..d6ba8b5e4037 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/itemlevelrecoveryconnections.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/itemlevelrecoveryconnections.go @@ -36,7 +36,8 @@ func NewItemLevelRecoveryConnectionsClient(subscriptionID string) ItemLevelRecov } // NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the ItemLevelRecoveryConnectionsClient -// 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 NewItemLevelRecoveryConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ItemLevelRecoveryConnectionsClient { return ItemLevelRecoveryConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/operationresults.go b/services/recoveryservices/mgmt/2017-07-01/backup/operationresults.go index e82ace5af78d..4b9e75433bb0 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/operationresults.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/operationresults.go @@ -35,7 +35,9 @@ func NewOperationResultsClient(subscriptionID string) OperationResultsClient { return NewOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client. +// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) OperationResultsClient { return OperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/operations.go b/services/recoveryservices/mgmt/2017-07-01/backup/operations.go index 53f59482812e..188a37bf8c15 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/operations.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/operationstatuses.go b/services/recoveryservices/mgmt/2017-07-01/backup/operationstatuses.go index b5c7ef6eebff..c8c1b383eb8e 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/operationstatuses.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/operationstatuses.go @@ -35,7 +35,9 @@ func NewOperationStatusesClient(subscriptionID string) OperationStatusesClient { return NewOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client. +// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusesClient { return OperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectablecontainers.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectablecontainers.go index 0467090aa353..6340a1c1fd61 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectablecontainers.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectablecontainers.go @@ -35,7 +35,9 @@ func NewProtectableContainersClient(subscriptionID string) ProtectableContainers return NewProtectableContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectableContainersClientWithBaseURI creates an instance of the ProtectableContainersClient client. +// NewProtectableContainersClientWithBaseURI creates an instance of the ProtectableContainersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewProtectableContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectableContainersClient { return ProtectableContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectableitems.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectableitems.go index 18b8d7f3f683..137522a855fb 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectableitems.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectableitems.go @@ -35,7 +35,9 @@ func NewProtectableItemsClient(subscriptionID string) ProtectableItemsClient { return NewProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client. +// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectableItemsClient { return ProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protecteditemoperationstatuses.go b/services/recoveryservices/mgmt/2017-07-01/backup/protecteditemoperationstatuses.go index 5f5153a60b4f..2c488d23be42 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protecteditemoperationstatuses.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protecteditemoperationstatuses.go @@ -36,7 +36,8 @@ func NewProtectedItemOperationStatusesClient(subscriptionID string) ProtectedIte } // NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of the ProtectedItemOperationStatusesClient -// 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 NewProtectedItemOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationStatusesClient { return ProtectedItemOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontaineroperationresults.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontaineroperationresults.go index 7509f1f533a5..6e8533cf1194 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontaineroperationresults.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontaineroperationresults.go @@ -37,7 +37,8 @@ func NewProtectionContainerOperationResultsClient(subscriptionID string) Protect } // NewProtectionContainerOperationResultsClientWithBaseURI creates an instance of the -// ProtectionContainerOperationResultsClient client. +// ProtectionContainerOperationResultsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionContainerOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerOperationResultsClient { return ProtectionContainerOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainerrefreshoperationresults.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainerrefreshoperationresults.go index 423b836635c3..5fde7c63f5c0 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainerrefreshoperationresults.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainerrefreshoperationresults.go @@ -37,7 +37,8 @@ func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string) } // NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an instance of the -// ProtectionContainerRefreshOperationResultsClient client. +// ProtectionContainerRefreshOperationResultsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionContainerRefreshOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerRefreshOperationResultsClient { return ProtectionContainerRefreshOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainers.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainers.go index 60649b4cbfc0..7c40fe0d2cc9 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainers.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainers.go @@ -35,7 +35,9 @@ func NewProtectionContainersClient(subscriptionID string) ProtectionContainersCl return NewProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client. +// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersClient { return ProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainersgroup.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainersgroup.go index 5895c5e0db01..7d6de9dcfcea 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainersgroup.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectioncontainersgroup.go @@ -35,7 +35,9 @@ func NewProtectionContainersGroupClient(subscriptionID string) ProtectionContain return NewProtectionContainersGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainersGroupClientWithBaseURI creates an instance of the ProtectionContainersGroupClient client. +// NewProtectionContainersGroupClientWithBaseURI creates an instance of the ProtectionContainersGroupClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProtectionContainersGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersGroupClient { return ProtectionContainersGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectionintent.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectionintent.go index b7bdac33115b..13ebf02ea8fc 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectionintent.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectionintent.go @@ -35,7 +35,9 @@ func NewProtectionIntentClient(subscriptionID string) ProtectionIntentClient { return NewProtectionIntentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionIntentClientWithBaseURI creates an instance of the ProtectionIntentClient client. +// NewProtectionIntentClientWithBaseURI creates an instance of the ProtectionIntentClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionIntentClientWithBaseURI(baseURI string, subscriptionID string) ProtectionIntentClient { return ProtectionIntentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectionintentgroup.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectionintentgroup.go index a94ebda293ae..8dd9d8768722 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectionintentgroup.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectionintentgroup.go @@ -35,7 +35,9 @@ func NewProtectionIntentGroupClient(subscriptionID string) ProtectionIntentGroup return NewProtectionIntentGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionIntentGroupClientWithBaseURI creates an instance of the ProtectionIntentGroupClient client. +// NewProtectionIntentGroupClientWithBaseURI creates an instance of the ProtectionIntentGroupClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewProtectionIntentGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionIntentGroupClient { return ProtectionIntentGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicies.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicies.go index 91701ff371aa..7dcff62aaa8e 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicies.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicies.go @@ -35,7 +35,9 @@ func NewProtectionPoliciesClient(subscriptionID string) ProtectionPoliciesClient return NewProtectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client. +// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPoliciesClient { return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicyoperationstatuses.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicyoperationstatuses.go index ac06686b3816..e22d4d8ed8be 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicyoperationstatuses.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicyoperationstatuses.go @@ -37,7 +37,8 @@ func NewProtectionPolicyOperationStatusesClient(subscriptionID string) Protectio } // NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the -// ProtectionPolicyOperationStatusesClient client. +// ProtectionPolicyOperationStatusesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient { return ProtectionPolicyOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/resourcestorageconfigs.go b/services/recoveryservices/mgmt/2017-07-01/backup/resourcestorageconfigs.go index ef3d82a86cd9..cdbfd329774b 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/resourcestorageconfigs.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/resourcestorageconfigs.go @@ -35,7 +35,9 @@ func NewResourceStorageConfigsClient(subscriptionID string) ResourceStorageConfi return NewResourceStorageConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceStorageConfigsClientWithBaseURI creates an instance of the ResourceStorageConfigsClient client. +// NewResourceStorageConfigsClientWithBaseURI creates an instance of the ResourceStorageConfigsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceStorageConfigsClientWithBaseURI(baseURI string, subscriptionID string) ResourceStorageConfigsClient { return ResourceStorageConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/securitypins.go b/services/recoveryservices/mgmt/2017-07-01/backup/securitypins.go index 281905c96c53..c34b255d99fd 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/securitypins.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/securitypins.go @@ -35,7 +35,8 @@ func NewSecurityPINsClient(subscriptionID string) SecurityPINsClient { return NewSecurityPINsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client. +// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecurityPINsClientWithBaseURI(baseURI string, subscriptionID string) SecurityPINsClient { return SecurityPINsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/status.go b/services/recoveryservices/mgmt/2017-07-01/backup/status.go index 65843f448fc1..c0cf0a6839a1 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/status.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/status.go @@ -35,7 +35,8 @@ func NewStatusClient(subscriptionID string) StatusClient { return NewStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStatusClientWithBaseURI creates an instance of the StatusClient client. +// NewStatusClientWithBaseURI creates an instance of the StatusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStatusClientWithBaseURI(baseURI string, subscriptionID string) StatusClient { return StatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/usagesummaries.go b/services/recoveryservices/mgmt/2017-07-01/backup/usagesummaries.go index f671a15223ae..6f8638ddb749 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/usagesummaries.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/usagesummaries.go @@ -35,7 +35,8 @@ func NewUsageSummariesClient(subscriptionID string) UsageSummariesClient { return NewUsageSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageSummariesClientWithBaseURI creates an instance of the UsageSummariesClient client. +// NewUsageSummariesClientWithBaseURI creates an instance of the UsageSummariesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageSummariesClientWithBaseURI(baseURI string, subscriptionID string) UsageSummariesClient { return UsageSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/workloaditems.go b/services/recoveryservices/mgmt/2017-07-01/backup/workloaditems.go index 8523e8ce4bb6..b5585cf4ea5f 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/workloaditems.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/workloaditems.go @@ -35,7 +35,8 @@ func NewWorkloadItemsClient(subscriptionID string) WorkloadItemsClient { return NewWorkloadItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkloadItemsClientWithBaseURI creates an instance of the WorkloadItemsClient client. +// NewWorkloadItemsClientWithBaseURI creates an instance of the WorkloadItemsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkloadItemsClientWithBaseURI(baseURI string, subscriptionID string) WorkloadItemsClient { return WorkloadItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/client.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/client.go index 678a90d93661..652a55ddb391 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/client.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string, resourceGroupName string, resourceName string) B return NewWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, resourceGroupName string, resourceName string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/migrationrecoverypoints.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/migrationrecoverypoints.go index 9c2f6fc62670..98f89db1690a 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/migrationrecoverypoints.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/migrationrecoverypoints.go @@ -35,7 +35,9 @@ func NewMigrationRecoveryPointsClient(subscriptionID string, resourceGroupName s return NewMigrationRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewMigrationRecoveryPointsClientWithBaseURI creates an instance of the MigrationRecoveryPointsClient client. +// NewMigrationRecoveryPointsClientWithBaseURI creates an instance of the MigrationRecoveryPointsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMigrationRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) MigrationRecoveryPointsClient { return MigrationRecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/models.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/models.go index 8f2635a4d12d..6900e14a7fb5 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/models.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/models.go @@ -148,23 +148,6 @@ func PossibleDiskAccountTypeValues() []DiskAccountType { return []DiskAccountType{PremiumLRS, StandardLRS, StandardSSDLRS} } -// DiskType enumerates the values for disk type. -type DiskType string - -const ( - // DiskTypePremiumLRS ... - DiskTypePremiumLRS DiskType = "Premium_LRS" - // DiskTypeStandardLRS ... - DiskTypeStandardLRS DiskType = "Standard_LRS" - // DiskTypeStandardSSDLRS ... - DiskTypeStandardSSDLRS DiskType = "StandardSSD_LRS" -) - -// PossibleDiskTypeValues returns an array of possible values for the DiskType const type. -func PossibleDiskTypeValues() []DiskType { - return []DiskType{DiskTypePremiumLRS, DiskTypeStandardLRS, DiskTypeStandardSSDLRS} -} - // EthernetAddressType enumerates the values for ethernet address type. type EthernetAddressType string @@ -374,11 +357,13 @@ const ( InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails InstanceTypeBasicEventProviderSpecificDetails = "HyperVReplicaBaseEventDetails" // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2 ... InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2 InstanceTypeBasicEventProviderSpecificDetails = "InMageAzureV2" + // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt ... + InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt InstanceTypeBasicEventProviderSpecificDetails = "VMwareCbt" ) // PossibleInstanceTypeBasicEventProviderSpecificDetailsValues returns an array of possible values for the InstanceTypeBasicEventProviderSpecificDetails const type. func PossibleInstanceTypeBasicEventProviderSpecificDetailsValues() []InstanceTypeBasicEventProviderSpecificDetails { - return []InstanceTypeBasicEventProviderSpecificDetails{InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2} + return []InstanceTypeBasicEventProviderSpecificDetails{InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt} } // InstanceTypeBasicEventSpecificDetails enumerates the values for instance type basic event specific details. @@ -747,13 +732,13 @@ const ( InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = "A2A" // InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput ... InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = "ReplicationProviderSpecificContainerCreationInput" - // InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero ... - InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = "6c7da455-506f-43ff-a16a-8eb101aebb70" + // InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt ... + InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = "VMwareCbt" ) // PossibleInstanceTypeBasicReplicationProviderSpecificContainerCreationInputValues returns an array of possible values for the InstanceTypeBasicReplicationProviderSpecificContainerCreationInput const type. func PossibleInstanceTypeBasicReplicationProviderSpecificContainerCreationInputValues() []InstanceTypeBasicReplicationProviderSpecificContainerCreationInput { - return []InstanceTypeBasicReplicationProviderSpecificContainerCreationInput{InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A, InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput, InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero} + return []InstanceTypeBasicReplicationProviderSpecificContainerCreationInput{InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A, InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput, InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt} } // InstanceTypeBasicReplicationProviderSpecificContainerMappingInput enumerates the values for instance type @@ -818,6 +803,22 @@ func PossibleInstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingI return []InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput{InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A, InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput} } +// InstanceTypeBasicResyncProviderSpecificInput enumerates the values for instance type basic resync provider +// specific input. +type InstanceTypeBasicResyncProviderSpecificInput string + +const ( + // InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput ... + InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput InstanceTypeBasicResyncProviderSpecificInput = "ResyncProviderSpecificInput" + // InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt ... + InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt InstanceTypeBasicResyncProviderSpecificInput = "VMwareCbt" +) + +// PossibleInstanceTypeBasicResyncProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicResyncProviderSpecificInput const type. +func PossibleInstanceTypeBasicResyncProviderSpecificInputValues() []InstanceTypeBasicResyncProviderSpecificInput { + return []InstanceTypeBasicResyncProviderSpecificInput{InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput, InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt} +} + // InstanceTypeBasicReverseReplicationProviderSpecificInput enumerates the values for instance type basic // reverse replication provider specific input. type InstanceTypeBasicReverseReplicationProviderSpecificInput string @@ -962,6 +963,8 @@ const ( DisableMigration MigrationItemOperation = "DisableMigration" // Migrate ... Migrate MigrationItemOperation = "Migrate" + // StartResync ... + StartResync MigrationItemOperation = "StartResync" // TestMigrate ... TestMigrate MigrationItemOperation = "TestMigrate" // TestMigrateCleanup ... @@ -970,7 +973,7 @@ const ( // PossibleMigrationItemOperationValues returns an array of possible values for the MigrationItemOperation const type. func PossibleMigrationItemOperationValues() []MigrationItemOperation { - return []MigrationItemOperation{DisableMigration, Migrate, TestMigrate, TestMigrateCleanup} + return []MigrationItemOperation{DisableMigration, Migrate, StartResync, TestMigrate, TestMigrateCleanup} } // MigrationRecoveryPointType enumerates the values for migration recovery point type. @@ -1100,6 +1103,25 @@ func PossiblePresenceStatusValues() []PresenceStatus { return []PresenceStatus{NotPresent, Present, Unknown} } +// ProtectionHealth enumerates the values for protection health. +type ProtectionHealth string + +const ( + // ProtectionHealthCritical ... + ProtectionHealthCritical ProtectionHealth = "Critical" + // ProtectionHealthNone ... + ProtectionHealthNone ProtectionHealth = "None" + // ProtectionHealthNormal ... + ProtectionHealthNormal ProtectionHealth = "Normal" + // ProtectionHealthWarning ... + ProtectionHealthWarning ProtectionHealth = "Warning" +) + +// PossibleProtectionHealthValues returns an array of possible values for the ProtectionHealth const type. +func PossibleProtectionHealthValues() []ProtectionHealth { + return []ProtectionHealth{ProtectionHealthCritical, ProtectionHealthNone, ProtectionHealthNormal, ProtectionHealthWarning} +} + // RecoveryPlanActionLocation enumerates the values for recovery plan action location. type RecoveryPlanActionLocation string @@ -1201,6 +1223,23 @@ func PossibleReplicationProtectedItemOperationValues() []ReplicationProtectedIte return []ReplicationProtectedItemOperation{ReplicationProtectedItemOperationChangePit, ReplicationProtectedItemOperationCommit, ReplicationProtectedItemOperationCompleteMigration, ReplicationProtectedItemOperationDisableProtection, ReplicationProtectedItemOperationFailback, ReplicationProtectedItemOperationFinalizeFailback, ReplicationProtectedItemOperationPlannedFailover, ReplicationProtectedItemOperationRepairReplication, ReplicationProtectedItemOperationReverseReplicate, ReplicationProtectedItemOperationSwitchProtection, ReplicationProtectedItemOperationTestFailover, ReplicationProtectedItemOperationTestFailoverCleanup, ReplicationProtectedItemOperationUnplannedFailover} } +// ResyncState enumerates the values for resync state. +type ResyncState string + +const ( + // ResyncStateNone ... + ResyncStateNone ResyncState = "None" + // ResyncStatePreparedForResynchronization ... + ResyncStatePreparedForResynchronization ResyncState = "PreparedForResynchronization" + // ResyncStateStartedResynchronization ... + ResyncStateStartedResynchronization ResyncState = "StartedResynchronization" +) + +// PossibleResyncStateValues returns an array of possible values for the ResyncState const type. +func PossibleResyncStateValues() []ResyncState { + return []ResyncState{ResyncStateNone, ResyncStatePreparedForResynchronization, ResyncStateStartedResynchronization} +} + // RpInMageRecoveryPointType enumerates the values for rp in mage recovery point type. type RpInMageRecoveryPointType string @@ -1331,7 +1370,7 @@ func (aarpi A2AApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecifi // A2AContainerCreationInput a2A cloud creation input. type A2AContainerCreationInput struct { - // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero' + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` } @@ -1526,7 +1565,7 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // RemoteFabricLocation - Remote fabric location. RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"` - // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` } @@ -1588,6 +1627,11 @@ func (aed A2AEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDet return nil, false } +// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { + return nil, false +} + // AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. func (aed A2AEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { return nil, false @@ -4582,6 +4626,8 @@ type EventProperties struct { EventType *string `json:"eventType,omitempty"` // AffectedObjectFriendlyName - The friendly name of the source of the event on which it is raised (for example, VM, VMM etc). AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` + // AffectedObjectCorrelationID - READ-ONLY; The affected object correlationId for the event. + AffectedObjectCorrelationID *string `json:"affectedObjectCorrelationId,omitempty"` // Severity - The severity of the event. Severity *string `json:"severity,omitempty"` // TimeOfOccurrence - The time of occurrence of the event. @@ -4641,6 +4687,15 @@ func (ep *EventProperties) UnmarshalJSON(body []byte) error { } ep.AffectedObjectFriendlyName = &affectedObjectFriendlyName } + case "affectedObjectCorrelationId": + if v != nil { + var affectedObjectCorrelationID string + err = json.Unmarshal(*v, &affectedObjectCorrelationID) + if err != nil { + return err + } + ep.AffectedObjectCorrelationID = &affectedObjectCorrelationID + } case "severity": if v != nil { var severity string @@ -4707,12 +4762,13 @@ type BasicEventProviderSpecificDetails interface { AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) + AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) } // EventProviderSpecificDetails model class for provider specific details for an event. type EventProviderSpecificDetails struct { - // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` } @@ -4748,6 +4804,10 @@ func unmarshalBasicEventProviderSpecificDetails(body []byte) (BasicEventProvider var imaved InMageAzureV2EventDetails err := json.Unmarshal(body, &imaved) return imaved, err + case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt): + var vmced VMwareCbtEventDetails + err := json.Unmarshal(body, &vmced) + return vmced, err default: var epsd EventProviderSpecificDetails err := json.Unmarshal(body, &epsd) @@ -4813,6 +4873,11 @@ func (epsd EventProviderSpecificDetails) AsInMageAzureV2EventDetails() (*InMageA return nil, false } +// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { + return nil, false +} + // AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. func (epsd EventProviderSpecificDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { return &epsd, true @@ -4835,6 +4900,8 @@ type EventQueryParameter struct { FabricName *string `json:"fabricName,omitempty"` // AffectedObjectFriendlyName - The affected object name of the events to be queried. AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` + // AffectedObjectCorrelationID - READ-ONLY; The affected object correlationId for the events to be queried. + AffectedObjectCorrelationID *string `json:"affectedObjectCorrelationId,omitempty"` // StartTime - The start time of the time range within which the events are to be queried. StartTime *date.Time `json:"startTime,omitempty"` // EndTime - The end time of the time range within which the events are to be queried. @@ -6012,7 +6079,7 @@ type HyperVReplica2012EventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // RemoteFabricName - The remote fabric name. RemoteFabricName *string `json:"remoteFabricName,omitempty"` - // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` } @@ -6068,6 +6135,11 @@ func (hvr2ed HyperVReplica2012EventDetails) AsInMageAzureV2EventDetails() (*InMa return nil, false } +// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { + return nil, false +} + // AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. func (hvr2ed HyperVReplica2012EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { return nil, false @@ -6088,7 +6160,7 @@ type HyperVReplica2012R2EventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // RemoteFabricName - The remote fabric name. RemoteFabricName *string `json:"remoteFabricName,omitempty"` - // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` } @@ -6144,6 +6216,11 @@ func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageAzureV2EventDetails() (*In return nil, false } +// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { + return nil, false +} + // AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. func (hvr2ed HyperVReplica2012R2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { return nil, false @@ -6340,7 +6417,7 @@ type HyperVReplicaAzureEventDetails struct { FabricName *string `json:"fabricName,omitempty"` // RemoteContainerName - The remote container name. RemoteContainerName *string `json:"remoteContainerName,omitempty"` - // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` } @@ -6393,6 +6470,11 @@ func (hvraed HyperVReplicaAzureEventDetails) AsInMageAzureV2EventDetails() (*InM return nil, false } +// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { + return nil, false +} + // AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. func (hvraed HyperVReplicaAzureEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { return nil, false @@ -7056,7 +7138,7 @@ type HyperVReplicaBaseEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // RemoteFabricName - The remote fabric name. RemoteFabricName *string `json:"remoteFabricName,omitempty"` - // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` } @@ -7112,6 +7194,11 @@ func (hvrbed HyperVReplicaBaseEventDetails) AsInMageAzureV2EventDetails() (*InMa return nil, false } +// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { + return nil, false +} + // AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. func (hvrbed HyperVReplicaBaseEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { return nil, false @@ -8464,7 +8551,7 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // SiteName - VMware Site name. SiteName *string `json:"siteName,omitempty"` - // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` } @@ -8529,6 +8616,11 @@ func (imaved InMageAzureV2EventDetails) AsInMageAzureV2EventDetails() (*InMageAz return &imaved, true } +// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { + return nil, false +} + // AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. func (imaved InMageAzureV2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { return nil, false @@ -11426,24 +11518,28 @@ type MigrationItemProperties struct { PolicyID *string `json:"policyId,omitempty"` // PolicyFriendlyName - READ-ONLY; The name of policy governing this item. PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` - // RecoveryServicesProviderID - READ-ONLY; The recovery services provider ARM Id. - RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` // MigrationState - READ-ONLY; The migration status. Possible values include: 'MigrationStateNone', 'MigrationStateEnableMigrationInProgress', 'MigrationStateEnableMigrationFailed', 'MigrationStateDisableMigrationInProgress', 'MigrationStateDisableMigrationFailed', 'MigrationStateInitialSeedingInProgress', 'MigrationStateInitialSeedingFailed', 'MigrationStateReplicating', 'MigrationStateMigrationInProgress', 'MigrationStateMigrationSucceeded', 'MigrationStateMigrationFailed' MigrationState MigrationState `json:"migrationState,omitempty"` // MigrationStateDescription - READ-ONLY; The migration state description. MigrationStateDescription *string `json:"migrationStateDescription,omitempty"` + // LastTestMigrationTime - READ-ONLY; The last test migration time. + LastTestMigrationTime *date.Time `json:"lastTestMigrationTime,omitempty"` + // LastTestMigrationStatus - READ-ONLY; The status of the last test migration. + LastTestMigrationStatus *string `json:"lastTestMigrationStatus,omitempty"` // TestMigrateState - READ-ONLY; The test migrate state. Possible values include: 'TestMigrationStateNone', 'TestMigrationStateTestMigrationInProgress', 'TestMigrationStateTestMigrationSucceeded', 'TestMigrationStateTestMigrationFailed', 'TestMigrationStateTestMigrationCleanupInProgress' TestMigrateState TestMigrationState `json:"testMigrateState,omitempty"` // TestMigrateStateDescription - READ-ONLY; The test migrate state description. TestMigrateStateDescription *string `json:"testMigrateStateDescription,omitempty"` - // Health - READ-ONLY; The consolidated health. - Health *string `json:"health,omitempty"` + // Health - READ-ONLY; The consolidated health. Possible values include: 'ProtectionHealthNone', 'ProtectionHealthNormal', 'ProtectionHealthWarning', 'ProtectionHealthCritical' + Health ProtectionHealth `json:"health,omitempty"` // HealthErrors - READ-ONLY; The list of health errors. HealthErrors *[]HealthError `json:"healthErrors,omitempty"` // AllowedOperations - READ-ONLY; The allowed operations on the migration item, based on the current migration state of the item. AllowedOperations *[]MigrationItemOperation `json:"allowedOperations,omitempty"` // CurrentJob - READ-ONLY; The current job details. CurrentJob *CurrentJobDetails `json:"currentJob,omitempty"` + // EventCorrelationID - READ-ONLY; The correlation Id for events associated with this migration item. + EventCorrelationID *string `json:"eventCorrelationId,omitempty"` // ProviderSpecificDetails - The migration provider custom settings. ProviderSpecificDetails BasicMigrationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"` } @@ -11484,15 +11580,6 @@ func (mip *MigrationItemProperties) UnmarshalJSON(body []byte) error { } mip.PolicyFriendlyName = &policyFriendlyName } - case "recoveryServicesProviderId": - if v != nil { - var recoveryServicesProviderID string - err = json.Unmarshal(*v, &recoveryServicesProviderID) - if err != nil { - return err - } - mip.RecoveryServicesProviderID = &recoveryServicesProviderID - } case "migrationState": if v != nil { var migrationState MigrationState @@ -11511,6 +11598,24 @@ func (mip *MigrationItemProperties) UnmarshalJSON(body []byte) error { } mip.MigrationStateDescription = &migrationStateDescription } + case "lastTestMigrationTime": + if v != nil { + var lastTestMigrationTime date.Time + err = json.Unmarshal(*v, &lastTestMigrationTime) + if err != nil { + return err + } + mip.LastTestMigrationTime = &lastTestMigrationTime + } + case "lastTestMigrationStatus": + if v != nil { + var lastTestMigrationStatus string + err = json.Unmarshal(*v, &lastTestMigrationStatus) + if err != nil { + return err + } + mip.LastTestMigrationStatus = &lastTestMigrationStatus + } case "testMigrateState": if v != nil { var testMigrateState TestMigrationState @@ -11531,12 +11636,12 @@ func (mip *MigrationItemProperties) UnmarshalJSON(body []byte) error { } case "health": if v != nil { - var health string + var health ProtectionHealth err = json.Unmarshal(*v, &health) if err != nil { return err } - mip.Health = &health + mip.Health = health } case "healthErrors": if v != nil { @@ -11565,6 +11670,15 @@ func (mip *MigrationItemProperties) UnmarshalJSON(body []byte) error { } mip.CurrentJob = ¤tJob } + case "eventCorrelationId": + if v != nil { + var eventCorrelationID string + err = json.Unmarshal(*v, &eventCorrelationID) + if err != nil { + return err + } + mip.EventCorrelationID = &eventCorrelationID + } case "providerSpecificDetails": if v != nil { providerSpecificDetails, err := unmarshalBasicMigrationProviderSpecificSettings(*v) @@ -16485,6 +16599,35 @@ func (future *ReplicationMigrationItemsMigrateFuture) Result(client ReplicationM return } +// ReplicationMigrationItemsResyncFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationMigrationItemsResyncFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationMigrationItemsResyncFuture) Result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsResyncFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsResyncFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { + mi, err = client.ResyncResponder(mi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsResyncFuture", "Result", mi.Response.Response, "Failure responding to request") + } + } + return +} + // ReplicationMigrationItemsTestMigrateCleanupFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type ReplicationMigrationItemsTestMigrateCleanupFuture struct { @@ -17805,7 +17948,7 @@ type BasicReplicationProviderSpecificContainerCreationInput interface { // ReplicationProviderSpecificContainerCreationInput provider specific input for container creation operation. type ReplicationProviderSpecificContainerCreationInput struct { - // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero' + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` } @@ -17821,7 +17964,7 @@ func unmarshalBasicReplicationProviderSpecificContainerCreationInput(body []byte var acci A2AContainerCreationInput err := json.Unmarshal(body, &acci) return acci, err - case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero): + case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt): var vmccci VMwareCbtContainerCreationInput err := json.Unmarshal(body, &vmccci) return vmccci, err @@ -18713,6 +18856,23 @@ type ResourceHealthSummary struct { ResourceCount *int32 `json:"resourceCount,omitempty"` // Issues - The list of summary of health errors across the resources under the container. Issues *[]HealthErrorSummary `json:"issues,omitempty"` + // CategorizedResourceCounts - The categorized resource counts. + CategorizedResourceCounts map[string]*int32 `json:"categorizedResourceCounts"` +} + +// MarshalJSON is the custom marshaler for ResourceHealthSummary. +func (RHS ResourceHealthSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if RHS.ResourceCount != nil { + objectMap["resourceCount"] = RHS.ResourceCount + } + if RHS.Issues != nil { + objectMap["issues"] = RHS.Issues + } + if RHS.CategorizedResourceCounts != nil { + objectMap["categorizedResourceCounts"] = RHS.CategorizedResourceCounts + } + return json.Marshal(objectMap) } // ResumeJobParams resume job params. @@ -18727,6 +18887,115 @@ type ResumeJobParamsProperties struct { Comments *string `json:"comments,omitempty"` } +// ResyncInput resync input. +type ResyncInput struct { + // Properties - Resync input properties. + Properties *ResyncInputProperties `json:"properties,omitempty"` +} + +// ResyncInputProperties resync input properties. +type ResyncInputProperties struct { + // ProviderSpecificDetails - The provider specific details. + ProviderSpecificDetails BasicResyncProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ResyncInputProperties struct. +func (rip *ResyncInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicResyncProviderSpecificInput(*v) + if err != nil { + return err + } + rip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicResyncProviderSpecificInput resync provider specific input. +type BasicResyncProviderSpecificInput interface { + AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool) + AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool) +} + +// ResyncProviderSpecificInput resync provider specific input. +type ResyncProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput', 'InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicResyncProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicResyncProviderSpecificInput(body []byte) (BasicResyncProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt): + var vmcri VMwareCbtResyncInput + err := json.Unmarshal(body, &vmcri) + return vmcri, err + default: + var rpsi ResyncProviderSpecificInput + err := json.Unmarshal(body, &rpsi) + return rpsi, err + } +} +func unmarshalBasicResyncProviderSpecificInputArray(body []byte) ([]BasicResyncProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpsiArray := make([]BasicResyncProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpsi, err := unmarshalBasicResyncProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + rpsiArray[index] = rpsi + } + return rpsiArray, nil +} + +// MarshalJSON is the custom marshaler for ResyncProviderSpecificInput. +func (rpsi ResyncProviderSpecificInput) MarshalJSON() ([]byte, error) { + rpsi.InstanceType = InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput + objectMap := make(map[string]interface{}) + if rpsi.InstanceType != "" { + objectMap["instanceType"] = rpsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtResyncInput is the BasicResyncProviderSpecificInput implementation for ResyncProviderSpecificInput. +func (rpsi ResyncProviderSpecificInput) AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool) { + return nil, false +} + +// AsResyncProviderSpecificInput is the BasicResyncProviderSpecificInput implementation for ResyncProviderSpecificInput. +func (rpsi ResyncProviderSpecificInput) AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool) { + return &rpsi, true +} + +// AsBasicResyncProviderSpecificInput is the BasicResyncProviderSpecificInput implementation for ResyncProviderSpecificInput. +func (rpsi ResyncProviderSpecificInput) AsBasicResyncProviderSpecificInput() (BasicResyncProviderSpecificInput, bool) { + return &rpsi, true +} + // RetentionVolume the retention details of the MT. type RetentionVolume struct { // VolumeName - The volume name. @@ -21589,13 +21858,13 @@ func (vnutd VMNicUpdatesTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDeta // VMwareCbtContainerCreationInput vMwareCbt container creation input. type VMwareCbtContainerCreationInput struct { - // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero' + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` } // MarshalJSON is the custom marshaler for VMwareCbtContainerCreationInput. func (vmccci VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { - vmccci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero + vmccci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeVMwareCbt objectMap := make(map[string]interface{}) if vmccci.InstanceType != "" { objectMap["instanceType"] = vmccci.InstanceType @@ -21729,6 +21998,8 @@ type VMwareCbtEnableMigrationInput struct { TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` // TargetBootDiagnosticsStorageAccountID - The target boot diagnostics storage account ARM Id. TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` + // PerformAutoResync - A value indicating whether auto resync is to be done. + PerformAutoResync *string `json:"performAutoResync,omitempty"` // InstanceType - Possible values include: 'InstanceTypeEnableMigrationProviderSpecificInput', 'InstanceTypeVMwareCbt' InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"` } @@ -21773,6 +22044,9 @@ func (vmcemi VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { if vmcemi.TargetBootDiagnosticsStorageAccountID != nil { objectMap["targetBootDiagnosticsStorageAccountId"] = vmcemi.TargetBootDiagnosticsStorageAccountID } + if vmcemi.PerformAutoResync != nil { + objectMap["performAutoResync"] = vmcemi.PerformAutoResync + } if vmcemi.InstanceType != "" { objectMap["instanceType"] = vmcemi.InstanceType } @@ -21794,6 +22068,69 @@ func (vmcemi VMwareCbtEnableMigrationInput) AsBasicEnableMigrationProviderSpecif return &vmcemi, true } +// VMwareCbtEventDetails event details for VMwareCbt provider. +type VMwareCbtEventDetails struct { + // MigrationItemName - READ-ONLY; The migration item name. + MigrationItemName *string `json:"migrationItemName,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { + vmced.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmced.InstanceType != "" { + objectMap["instanceType"] = vmced.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false +} + +// AsVMwareCbtEventDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsVMwareCbtEventDetails() (*VMwareCbtEventDetails, bool) { + return &vmced, true +} + +// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for VMwareCbtEventDetails. +func (vmced VMwareCbtEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { + return &vmced, true +} + // VMwareCbtMigrateInput vMwareCbt specific migrate input. type VMwareCbtMigrateInput struct { // PerformShutdown - A value indicating whether VM is to be shutdown. @@ -21830,7 +22167,7 @@ func (vmcmi VMwareCbtMigrateInput) AsBasicMigrateProviderSpecificInput() (BasicM return &vmcmi, true } -// VMwareCbtMigrationDetails vMwareCbt provider specific settings +// VMwareCbtMigrationDetails vMwareCbt provider specific settings. type VMwareCbtMigrationDetails struct { // VmwareMachineID - READ-ONLY; The ARM Id of the VM discovered in VMware. VmwareMachineID *string `json:"vmwareMachineId,omitempty"` @@ -21864,6 +22201,18 @@ type VMwareCbtMigrationDetails struct { MigrationRecoveryPointID *string `json:"migrationRecoveryPointId,omitempty"` // LastRecoveryPointReceived - READ-ONLY; The last recovery point received time. LastRecoveryPointReceived *date.Time `json:"lastRecoveryPointReceived,omitempty"` + // LastRecoveryPointID - READ-ONLY; The last recovery point Id. + LastRecoveryPointID *string `json:"lastRecoveryPointId,omitempty"` + // InitialSeedingProgressPercentage - READ-ONLY; The initial seeding progress percentage. + InitialSeedingProgressPercentage *int32 `json:"initialSeedingProgressPercentage,omitempty"` + // MigrationProgressPercentage - READ-ONLY; The migration progress percentage. + MigrationProgressPercentage *int32 `json:"migrationProgressPercentage,omitempty"` + // ResyncProgressPercentage - READ-ONLY; The resync progress percentage. + ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` + // ResyncState - READ-ONLY; The resync state. Possible values include: 'ResyncStateNone', 'ResyncStatePreparedForResynchronization', 'ResyncStateStartedResynchronization' + ResyncState ResyncState `json:"resyncState,omitempty"` + // PerformAutoResync - A value indicating whether auto resync is to be done. + PerformAutoResync *string `json:"performAutoResync,omitempty"` // InstanceType - Possible values include: 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings', 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"` } @@ -21899,6 +22248,9 @@ func (vmcmd VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { if vmcmd.VMNics != nil { objectMap["vmNics"] = vmcmd.VMNics } + if vmcmd.PerformAutoResync != nil { + objectMap["performAutoResync"] = vmcmd.PerformAutoResync + } if vmcmd.InstanceType != "" { objectMap["instanceType"] = vmcmd.InstanceType } @@ -22143,8 +22495,8 @@ type VMwareCbtProtectedDiskDetails struct { SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"` // TargetManagedDiskID - READ-ONLY; The ARM Id of the target managed disk. TargetManagedDiskID *string `json:"targetManagedDiskId,omitempty"` - // DiskType - The disk type. Possible values include: 'DiskTypeStandardLRS', 'DiskTypePremiumLRS', 'DiskTypeStandardSSDLRS' - DiskType DiskType `json:"diskType,omitempty"` + // DiskType - The disk type. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS' + DiskType DiskAccountType `json:"diskType,omitempty"` } // VMwareCbtProtectionContainerMappingDetails vMwareCbt provider specific container mapping details. @@ -22195,6 +22547,42 @@ func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsBasicProtectionConta return &vmcpcmd, true } +// VMwareCbtResyncInput vMwareCbt specific resync input. +type VMwareCbtResyncInput struct { + // SkipCbtReset - A value indicating whether CBT is to be reset. + SkipCbtReset *string `json:"skipCbtReset,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicResyncProviderSpecificInputInstanceTypeResyncProviderSpecificInput', 'InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicResyncProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtResyncInput. +func (vmcri VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { + vmcri.InstanceType = InstanceTypeBasicResyncProviderSpecificInputInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmcri.SkipCbtReset != nil { + objectMap["skipCbtReset"] = vmcri.SkipCbtReset + } + if vmcri.InstanceType != "" { + objectMap["instanceType"] = vmcri.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtResyncInput is the BasicResyncProviderSpecificInput implementation for VMwareCbtResyncInput. +func (vmcri VMwareCbtResyncInput) AsVMwareCbtResyncInput() (*VMwareCbtResyncInput, bool) { + return &vmcri, true +} + +// AsResyncProviderSpecificInput is the BasicResyncProviderSpecificInput implementation for VMwareCbtResyncInput. +func (vmcri VMwareCbtResyncInput) AsResyncProviderSpecificInput() (*ResyncProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicResyncProviderSpecificInput is the BasicResyncProviderSpecificInput implementation for VMwareCbtResyncInput. +func (vmcri VMwareCbtResyncInput) AsBasicResyncProviderSpecificInput() (BasicResyncProviderSpecificInput, bool) { + return &vmcri, true +} + // VMwareCbtTestMigrateInput vMwareCbt specific test migrate input. type VMwareCbtTestMigrateInput struct { // RecoveryPointID - The recovery point Id. @@ -22254,6 +22642,8 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // LicenseType - The license type. Possible values include: 'LicenseTypeNotSpecified', 'LicenseTypeNoLicenseType', 'LicenseTypeWindowsServer' LicenseType LicenseType `json:"licenseType,omitempty"` + // PerformAutoResync - A value indicating whether auto resync is to be done. + PerformAutoResync *string `json:"performAutoResync,omitempty"` // InstanceType - Possible values include: 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput', 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt' InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"` } @@ -22286,6 +22676,9 @@ func (vmcumii VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { if vmcumii.LicenseType != "" { objectMap["licenseType"] = vmcumii.LicenseType } + if vmcumii.PerformAutoResync != nil { + objectMap["performAutoResync"] = vmcumii.PerformAutoResync + } if vmcumii.InstanceType != "" { objectMap["instanceType"] = vmcumii.InstanceType } @@ -22522,6 +22915,8 @@ func (vmd VMwareDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDeta type VMwareV2FabricCreationInput struct { // VmwareSiteID - The ARM Id of the VMware site. VmwareSiteID *string `json:"vmwareSiteId,omitempty"` + // PhysicalSiteID - The ARM Id of the physical site. + PhysicalSiteID *string `json:"physicalSiteId,omitempty"` // MigrationSolutionID - The ARM Id of the migration solution. MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' @@ -22535,6 +22930,9 @@ func (vmvfci VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { if vmvfci.VmwareSiteID != nil { objectMap["vmwareSiteId"] = vmvfci.VmwareSiteID } + if vmvfci.PhysicalSiteID != nil { + objectMap["physicalSiteId"] = vmvfci.PhysicalSiteID + } if vmvfci.MigrationSolutionID != nil { objectMap["migrationSolutionId"] = vmvfci.MigrationSolutionID } @@ -22568,10 +22966,14 @@ func (vmvfci VMwareV2FabricCreationInput) AsBasicFabricSpecificCreationInput() ( type VMwareV2FabricSpecificDetails struct { // VmwareSiteID - READ-ONLY; The ARM Id of the VMware site. VmwareSiteID *string `json:"vmwareSiteId,omitempty"` + // PhysicalSiteID - READ-ONLY; The ARM Id of the physical site. + PhysicalSiteID *string `json:"physicalSiteId,omitempty"` // MigrationSolutionID - READ-ONLY; The Migration solution ARM Id. MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` // ServiceEndpoint - READ-ONLY; The service endpoint. ServiceEndpoint *string `json:"serviceEndpoint,omitempty"` + // ServiceResourceID - READ-ONLY; The service resource Id. + ServiceResourceID *string `json:"serviceResourceId,omitempty"` // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/operations.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/operations.go index 059030a8705e..8b208199e8eb 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/operations.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, resourceGroupName string, resour return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, resourceGroupName string, resourceName string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/recoverypoints.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/recoverypoints.go index 817626e54f27..b6d2e98382b0 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/recoverypoints.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/recoverypoints.go @@ -35,7 +35,8 @@ func NewRecoveryPointsClient(subscriptionID string, resourceGroupName string, re return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client. +// 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, resourceGroupName string, resourceName string) RecoveryPointsClient { return RecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationalertsettings.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationalertsettings.go index 3a4068b30bf7..429e8817b2c9 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationalertsettings.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationalertsettings.go @@ -35,7 +35,9 @@ func NewReplicationAlertSettingsClient(subscriptionID string, resourceGroupName return NewReplicationAlertSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationAlertSettingsClientWithBaseURI creates an instance of the ReplicationAlertSettingsClient client. +// NewReplicationAlertSettingsClientWithBaseURI creates an instance of the ReplicationAlertSettingsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationAlertSettingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationAlertSettingsClient { return ReplicationAlertSettingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationevents.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationevents.go index 01e2adfaaf89..06246c937469 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationevents.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationevents.go @@ -35,7 +35,9 @@ func NewReplicationEventsClient(subscriptionID string, resourceGroupName string, return NewReplicationEventsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationEventsClientWithBaseURI creates an instance of the ReplicationEventsClient client. +// NewReplicationEventsClientWithBaseURI creates an instance of the ReplicationEventsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationEventsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationEventsClient { return ReplicationEventsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationfabrics.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationfabrics.go index 0452ce5eacf4..63d689ae22c1 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationfabrics.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationfabrics.go @@ -35,7 +35,9 @@ func NewReplicationFabricsClient(subscriptionID string, resourceGroupName string return NewReplicationFabricsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationFabricsClientWithBaseURI creates an instance of the ReplicationFabricsClient client. +// NewReplicationFabricsClientWithBaseURI creates an instance of the ReplicationFabricsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationFabricsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationFabricsClient { return ReplicationFabricsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationjobs.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationjobs.go index f03ff318e56a..a04d610f44a2 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationjobs.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationjobs.go @@ -35,7 +35,8 @@ func NewReplicationJobsClient(subscriptionID string, resourceGroupName string, r return NewReplicationJobsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationJobsClientWithBaseURI creates an instance of the ReplicationJobsClient client. +// NewReplicationJobsClientWithBaseURI creates an instance of the ReplicationJobsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationJobsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationJobsClient { return ReplicationJobsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationlogicalnetworks.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationlogicalnetworks.go index 4396d291df9c..286f9b88114b 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationlogicalnetworks.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationlogicalnetworks.go @@ -36,7 +36,9 @@ func NewReplicationLogicalNetworksClient(subscriptionID string, resourceGroupNam return NewReplicationLogicalNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationLogicalNetworksClientWithBaseURI creates an instance of the ReplicationLogicalNetworksClient client. +// NewReplicationLogicalNetworksClientWithBaseURI creates an instance of the ReplicationLogicalNetworksClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationLogicalNetworksClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationLogicalNetworksClient { return ReplicationLogicalNetworksClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationmigrationitems.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationmigrationitems.go index 435539833e95..721b1c8afd9d 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationmigrationitems.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationmigrationitems.go @@ -36,7 +36,9 @@ func NewReplicationMigrationItemsClient(subscriptionID string, resourceGroupName return NewReplicationMigrationItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationMigrationItemsClientWithBaseURI creates an instance of the ReplicationMigrationItemsClient client. +// NewReplicationMigrationItemsClientWithBaseURI creates an instance of the ReplicationMigrationItemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationMigrationItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationMigrationItemsClient { return ReplicationMigrationItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } @@ -628,6 +630,97 @@ func (client ReplicationMigrationItemsClient) MigrateResponder(resp *http.Respon return } +// Resync the operation to resynchronize replication of an ASR migration item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +// input - resync input. +func (client ReplicationMigrationItemsClient) Resync(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input ResyncInput) (result ReplicationMigrationItemsResyncFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.Resync") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: input, + Constraints: []validation.Constraint{{Target: "input.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "input.Properties.ProviderSpecificDetails", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationMigrationItemsClient", "Resync", err.Error()) + } + + req, err := client.ResyncPreparer(ctx, fabricName, protectionContainerName, migrationItemName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Resync", nil, "Failure preparing request") + return + } + + result, err = client.ResyncSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Resync", result.Response(), "Failure sending request") + return + } + + return +} + +// ResyncPreparer prepares the Resync request. +func (client ReplicationMigrationItemsClient) ResyncPreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input ResyncInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-01-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resync", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResyncSender sends the Resync request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) ResyncSender(req *http.Request) (future ReplicationMigrationItemsResyncFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ResyncResponder handles the response to the Resync request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) ResyncResponder(resp *http.Response) (result MigrationItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // TestMigrate the operation to initiate test migration of the item. // Parameters: // fabricName - fabric name. @@ -738,7 +831,10 @@ func (client ReplicationMigrationItemsClient) TestMigrateCleanup(ctx context.Con } if err := validation.Validate([]validation.Validation{ {TargetValue: testMigrateCleanupInput, - Constraints: []validation.Constraint{{Target: "testMigrateCleanupInput.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "testMigrateCleanupInput.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "testMigrateCleanupInput.Properties.Comments", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "testMigrateCleanupInput.Properties.Comments", Name: validation.MaxLength, Rule: 1024, Chain: nil}}}, + }}}}}); err != nil { return result, validation.NewError("siterecovery.ReplicationMigrationItemsClient", "TestMigrateCleanup", err.Error()) } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworkmappings.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworkmappings.go index ec6701b0c3ac..7e71d67bb2d1 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworkmappings.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworkmappings.go @@ -36,7 +36,9 @@ func NewReplicationNetworkMappingsClient(subscriptionID string, resourceGroupNam return NewReplicationNetworkMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationNetworkMappingsClientWithBaseURI creates an instance of the ReplicationNetworkMappingsClient client. +// NewReplicationNetworkMappingsClientWithBaseURI creates an instance of the ReplicationNetworkMappingsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationNetworkMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworkMappingsClient { return ReplicationNetworkMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworks.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworks.go index f1b80a2f8417..0f5d482d060c 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworks.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationnetworks.go @@ -35,7 +35,9 @@ func NewReplicationNetworksClient(subscriptionID string, resourceGroupName strin return NewReplicationNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationNetworksClientWithBaseURI creates an instance of the ReplicationNetworksClient client. +// NewReplicationNetworksClientWithBaseURI creates an instance of the ReplicationNetworksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationNetworksClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworksClient { return ReplicationNetworksClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationpolicies.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationpolicies.go index a30ff0118131..6fdf43775eb1 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationpolicies.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationpolicies.go @@ -35,7 +35,9 @@ func NewReplicationPoliciesClient(subscriptionID string, resourceGroupName strin return NewReplicationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationPoliciesClientWithBaseURI creates an instance of the ReplicationPoliciesClient client. +// NewReplicationPoliciesClientWithBaseURI creates an instance of the ReplicationPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationPoliciesClient { return ReplicationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectableitems.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectableitems.go index c57d89a18272..c7f24e7410c9 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectableitems.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectableitems.go @@ -36,7 +36,9 @@ func NewReplicationProtectableItemsClient(subscriptionID string, resourceGroupNa return NewReplicationProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationProtectableItemsClientWithBaseURI creates an instance of the ReplicationProtectableItemsClient client. +// NewReplicationProtectableItemsClientWithBaseURI creates an instance of the ReplicationProtectableItemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectableItemsClient { return ReplicationProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotecteditems.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotecteditems.go index 86a5afbb357a..5df58bb52af6 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotecteditems.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotecteditems.go @@ -36,7 +36,9 @@ func NewReplicationProtectedItemsClient(subscriptionID string, resourceGroupName return NewReplicationProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationProtectedItemsClientWithBaseURI creates an instance of the ReplicationProtectedItemsClient client. +// NewReplicationProtectedItemsClientWithBaseURI creates an instance of the ReplicationProtectedItemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectedItemsClient { return ReplicationProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainermappings.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainermappings.go index ffc0c718531f..89c861d5df01 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainermappings.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainermappings.go @@ -38,7 +38,8 @@ func NewReplicationProtectionContainerMappingsClient(subscriptionID string, reso } // NewReplicationProtectionContainerMappingsClientWithBaseURI creates an instance of the -// ReplicationProtectionContainerMappingsClient client. +// ReplicationProtectionContainerMappingsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationProtectionContainerMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainerMappingsClient { return ReplicationProtectionContainerMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainers.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainers.go index c72beb44ac1a..de76639fd814 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainers.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationprotectioncontainers.go @@ -37,7 +37,8 @@ func NewReplicationProtectionContainersClient(subscriptionID string, resourceGro } // NewReplicationProtectionContainersClientWithBaseURI creates an instance of the ReplicationProtectionContainersClient -// 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 NewReplicationProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainersClient { return ReplicationProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryplans.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryplans.go index 56da9d58e992..dd0877e2c0f3 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryplans.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryplans.go @@ -36,7 +36,9 @@ func NewReplicationRecoveryPlansClient(subscriptionID string, resourceGroupName return NewReplicationRecoveryPlansClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationRecoveryPlansClientWithBaseURI creates an instance of the ReplicationRecoveryPlansClient client. +// NewReplicationRecoveryPlansClientWithBaseURI creates an instance of the ReplicationRecoveryPlansClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationRecoveryPlansClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryPlansClient { return ReplicationRecoveryPlansClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryservicesproviders.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryservicesproviders.go index 7567f7732a59..5ad379d77730 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryservicesproviders.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationrecoveryservicesproviders.go @@ -39,7 +39,8 @@ func NewReplicationRecoveryServicesProvidersClient(subscriptionID string, resour } // NewReplicationRecoveryServicesProvidersClientWithBaseURI creates an instance of the -// ReplicationRecoveryServicesProvidersClient client. +// ReplicationRecoveryServicesProvidersClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationRecoveryServicesProvidersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryServicesProvidersClient { return ReplicationRecoveryServicesProvidersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassificationmappings.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassificationmappings.go index 0ae22c9011b5..7931874b7dbc 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassificationmappings.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassificationmappings.go @@ -38,7 +38,8 @@ func NewReplicationStorageClassificationMappingsClient(subscriptionID string, re } // NewReplicationStorageClassificationMappingsClientWithBaseURI creates an instance of the -// ReplicationStorageClassificationMappingsClient client. +// ReplicationStorageClassificationMappingsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationStorageClassificationMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationMappingsClient { return ReplicationStorageClassificationMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassifications.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassifications.go index a952053c336a..0fcf81418e28 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassifications.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationstorageclassifications.go @@ -38,7 +38,8 @@ func NewReplicationStorageClassificationsClient(subscriptionID string, resourceG } // NewReplicationStorageClassificationsClientWithBaseURI creates an instance of the -// ReplicationStorageClassificationsClient client. +// ReplicationStorageClassificationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationStorageClassificationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationsClient { return ReplicationStorageClassificationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvaulthealth.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvaulthealth.go index d31f3a232d12..294f2e739e19 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvaulthealth.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvaulthealth.go @@ -35,7 +35,9 @@ func NewReplicationVaultHealthClient(subscriptionID string, resourceGroupName st return NewReplicationVaultHealthClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationVaultHealthClientWithBaseURI creates an instance of the ReplicationVaultHealthClient client. +// NewReplicationVaultHealthClientWithBaseURI creates an instance of the ReplicationVaultHealthClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReplicationVaultHealthClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { return ReplicationVaultHealthClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvcenters.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvcenters.go index 8126cfb15cec..469c5d4c8a04 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvcenters.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/replicationvcenters.go @@ -35,7 +35,9 @@ func NewReplicationvCentersClient(subscriptionID string, resourceGroupName strin return NewReplicationvCentersClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationvCentersClientWithBaseURI creates an instance of the ReplicationvCentersClient client. +// NewReplicationvCentersClientWithBaseURI creates an instance of the ReplicationvCentersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationvCentersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationvCentersClient { return ReplicationvCentersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/siterecoveryapi/interfaces.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/siterecoveryapi/interfaces.go index 06dfdf2909a4..529d7d37b96c 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/siterecoveryapi/interfaces.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/siterecoveryapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result siterecovery.OperationsDiscoveryCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.OperationsDiscoveryCollectionIterator, err error) } var _ OperationsClientAPI = (*siterecovery.OperationsClient)(nil) @@ -34,6 +35,7 @@ type ReplicationAlertSettingsClientAPI interface { Create(ctx context.Context, alertSettingName string, request siterecovery.ConfigureAlertRequest) (result siterecovery.Alert, err error) Get(ctx context.Context, alertSettingName string) (result siterecovery.Alert, err error) List(ctx context.Context) (result siterecovery.AlertCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.AlertCollectionIterator, err error) } var _ ReplicationAlertSettingsClientAPI = (*siterecovery.ReplicationAlertSettingsClient)(nil) @@ -42,6 +44,7 @@ var _ ReplicationAlertSettingsClientAPI = (*siterecovery.ReplicationAlertSetting type ReplicationEventsClientAPI interface { Get(ctx context.Context, eventName string) (result siterecovery.Event, err error) List(ctx context.Context, filter string) (result siterecovery.EventCollectionPage, err error) + ListComplete(ctx context.Context, filter string) (result siterecovery.EventCollectionIterator, err error) } var _ ReplicationEventsClientAPI = (*siterecovery.ReplicationEventsClient)(nil) @@ -53,6 +56,7 @@ type ReplicationFabricsClientAPI interface { Delete(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsDeleteFuture, err error) Get(ctx context.Context, fabricName string) (result siterecovery.Fabric, err error) List(ctx context.Context) (result siterecovery.FabricCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.FabricCollectionIterator, err error) MigrateToAad(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsMigrateToAadFuture, err error) Purge(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsPurgeFuture, err error) ReassociateGateway(ctx context.Context, fabricName string, failoverProcessServerRequest siterecovery.FailoverProcessServerRequest) (result siterecovery.ReplicationFabricsReassociateGatewayFuture, err error) @@ -65,6 +69,7 @@ var _ ReplicationFabricsClientAPI = (*siterecovery.ReplicationFabricsClient)(nil type ReplicationLogicalNetworksClientAPI interface { Get(ctx context.Context, fabricName string, logicalNetworkName string) (result siterecovery.LogicalNetwork, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.LogicalNetworkCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.LogicalNetworkCollectionIterator, err error) } var _ ReplicationLogicalNetworksClientAPI = (*siterecovery.ReplicationLogicalNetworksClient)(nil) @@ -73,7 +78,9 @@ var _ ReplicationLogicalNetworksClientAPI = (*siterecovery.ReplicationLogicalNet type ReplicationNetworksClientAPI interface { Get(ctx context.Context, fabricName string, networkName string) (result siterecovery.Network, err error) List(ctx context.Context) (result siterecovery.NetworkCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.NetworkCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.NetworkCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.NetworkCollectionIterator, err error) } var _ ReplicationNetworksClientAPI = (*siterecovery.ReplicationNetworksClient)(nil) @@ -84,7 +91,9 @@ type ReplicationNetworkMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result siterecovery.ReplicationNetworkMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result siterecovery.NetworkMapping, err error) List(ctx context.Context) (result siterecovery.NetworkMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.NetworkMappingCollectionIterator, err error) ListByReplicationNetworks(ctx context.Context, fabricName string, networkName string) (result siterecovery.NetworkMappingCollectionPage, err error) + ListByReplicationNetworksComplete(ctx context.Context, fabricName string, networkName string) (result siterecovery.NetworkMappingCollectionIterator, err error) Update(ctx context.Context, fabricName string, networkName string, networkMappingName string, input siterecovery.UpdateNetworkMappingInput) (result siterecovery.ReplicationNetworkMappingsUpdateFuture, err error) } @@ -97,7 +106,9 @@ type ReplicationProtectionContainersClientAPI interface { DiscoverProtectableItem(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest siterecovery.DiscoverProtectableItemRequest) (result siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainer, err error) List(ctx context.Context) (result siterecovery.ProtectionContainerCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.ProtectionContainerCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.ProtectionContainerCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.ProtectionContainerCollectionIterator, err error) SwitchProtection(ctx context.Context, fabricName string, protectionContainerName string, switchInput siterecovery.SwitchProtectionInput) (result siterecovery.ReplicationProtectionContainersSwitchProtectionFuture, err error) } @@ -109,8 +120,11 @@ type ReplicationMigrationItemsClientAPI interface { Delete(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, deleteOption string) (result siterecovery.ReplicationMigrationItemsDeleteFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result siterecovery.MigrationItem, err error) List(ctx context.Context, skipToken string, filter string) (result siterecovery.MigrationItemCollectionPage, err error) + ListComplete(ctx context.Context, skipToken string, filter string) (result siterecovery.MigrationItemCollectionIterator, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.MigrationItemCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.MigrationItemCollectionIterator, err error) Migrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrateInput siterecovery.MigrateInput) (result siterecovery.ReplicationMigrationItemsMigrateFuture, err error) + Resync(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input siterecovery.ResyncInput) (result siterecovery.ReplicationMigrationItemsResyncFuture, err error) TestMigrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput siterecovery.TestMigrateInput) (result siterecovery.ReplicationMigrationItemsTestMigrateFuture, err error) TestMigrateCleanup(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput siterecovery.TestMigrateCleanupInput) (result siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture, err error) Update(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input siterecovery.UpdateMigrationItemInput) (result siterecovery.ReplicationMigrationItemsUpdateFuture, err error) @@ -122,6 +136,7 @@ var _ ReplicationMigrationItemsClientAPI = (*siterecovery.ReplicationMigrationIt type MigrationRecoveryPointsClientAPI interface { Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string) (result siterecovery.MigrationRecoveryPoint, err error) ListByReplicationMigrationItems(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result siterecovery.MigrationRecoveryPointCollectionPage, err error) + ListByReplicationMigrationItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result siterecovery.MigrationRecoveryPointCollectionIterator, err error) } var _ MigrationRecoveryPointsClientAPI = (*siterecovery.MigrationRecoveryPointsClient)(nil) @@ -130,6 +145,7 @@ var _ MigrationRecoveryPointsClientAPI = (*siterecovery.MigrationRecoveryPointsC type ReplicationProtectableItemsClientAPI interface { Get(ctx context.Context, fabricName string, protectionContainerName string, protectableItemName string) (result siterecovery.ProtectableItem, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result siterecovery.ProtectableItemCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result siterecovery.ProtectableItemCollectionIterator, err error) } var _ ReplicationProtectableItemsClientAPI = (*siterecovery.ReplicationProtectableItemsClient)(nil) @@ -142,7 +158,9 @@ type ReplicationProtectedItemsClientAPI interface { FailoverCommit(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsFailoverCommitFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItem, err error) List(ctx context.Context, skipToken string, filter string) (result siterecovery.ReplicationProtectedItemCollectionPage, err error) + ListComplete(ctx context.Context, skipToken string, filter string) (result siterecovery.ReplicationProtectedItemCollectionIterator, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ReplicationProtectedItemCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ReplicationProtectedItemCollectionIterator, err error) PlannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput siterecovery.PlannedFailoverInput) (result siterecovery.ReplicationProtectedItemsPlannedFailoverFuture, err error) Purge(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsPurgeFuture, err error) RepairReplication(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsRepairReplicationFuture, err error) @@ -160,6 +178,7 @@ var _ ReplicationProtectedItemsClientAPI = (*siterecovery.ReplicationProtectedIt type RecoveryPointsClientAPI interface { Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string) (result siterecovery.RecoveryPoint, err error) ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.RecoveryPointCollectionPage, err error) + ListByReplicationProtectedItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.RecoveryPointCollectionIterator, err error) } var _ RecoveryPointsClientAPI = (*siterecovery.RecoveryPointsClient)(nil) @@ -167,6 +186,7 @@ var _ RecoveryPointsClientAPI = (*siterecovery.RecoveryPointsClient)(nil) // TargetComputeSizesClientAPI contains the set of methods on the TargetComputeSizesClient type. type TargetComputeSizesClientAPI interface { ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.TargetComputeSizeCollectionPage, err error) + ListByReplicationProtectedItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.TargetComputeSizeCollectionIterator, err error) } var _ TargetComputeSizesClientAPI = (*siterecovery.TargetComputeSizesClient)(nil) @@ -177,7 +197,9 @@ type ReplicationProtectionContainerMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput siterecovery.RemoveProtectionContainerMappingInput) (result siterecovery.ReplicationProtectionContainerMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result siterecovery.ProtectionContainerMapping, err error) List(ctx context.Context) (result siterecovery.ProtectionContainerMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.ProtectionContainerMappingCollectionIterator, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainerMappingCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainerMappingCollectionIterator, err error) Purge(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result siterecovery.ReplicationProtectionContainerMappingsPurgeFuture, err error) Update(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, updateInput siterecovery.UpdateProtectionContainerMappingInput) (result siterecovery.ReplicationProtectionContainerMappingsUpdateFuture, err error) } @@ -190,7 +212,9 @@ type ReplicationRecoveryServicesProvidersClientAPI interface { Delete(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture, err error) Get(ctx context.Context, fabricName string, providerName string) (result siterecovery.RecoveryServicesProvider, err error) List(ctx context.Context) (result siterecovery.RecoveryServicesProviderCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.RecoveryServicesProviderCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.RecoveryServicesProviderCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.RecoveryServicesProviderCollectionIterator, err error) Purge(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture, err error) RefreshProvider(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) } @@ -201,7 +225,9 @@ var _ ReplicationRecoveryServicesProvidersClientAPI = (*siterecovery.Replication type ReplicationStorageClassificationsClientAPI interface { Get(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassification, err error) List(ctx context.Context) (result siterecovery.StorageClassificationCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.StorageClassificationCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.StorageClassificationCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.StorageClassificationCollectionIterator, err error) } var _ ReplicationStorageClassificationsClientAPI = (*siterecovery.ReplicationStorageClassificationsClient)(nil) @@ -212,7 +238,9 @@ type ReplicationStorageClassificationMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result siterecovery.ReplicationStorageClassificationMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result siterecovery.StorageClassificationMapping, err error) List(ctx context.Context) (result siterecovery.StorageClassificationMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.StorageClassificationMappingCollectionIterator, err error) ListByReplicationStorageClassifications(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassificationMappingCollectionPage, err error) + ListByReplicationStorageClassificationsComplete(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassificationMappingCollectionIterator, err error) } var _ ReplicationStorageClassificationMappingsClientAPI = (*siterecovery.ReplicationStorageClassificationMappingsClient)(nil) @@ -223,7 +251,9 @@ type ReplicationvCentersClientAPI interface { Delete(ctx context.Context, fabricName string, vCenterName string) (result siterecovery.ReplicationvCentersDeleteFuture, err error) Get(ctx context.Context, fabricName string, vCenterName string) (result siterecovery.VCenter, err error) List(ctx context.Context) (result siterecovery.VCenterCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.VCenterCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.VCenterCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.VCenterCollectionIterator, err error) Update(ctx context.Context, fabricName string, vCenterName string, updateVCenterRequest siterecovery.UpdateVCenterRequest) (result siterecovery.ReplicationvCentersUpdateFuture, err error) } @@ -235,6 +265,7 @@ type ReplicationJobsClientAPI interface { Export(ctx context.Context, jobQueryParameter siterecovery.JobQueryParameter) (result siterecovery.ReplicationJobsExportFuture, err error) Get(ctx context.Context, jobName string) (result siterecovery.Job, err error) List(ctx context.Context, filter string) (result siterecovery.JobCollectionPage, err error) + ListComplete(ctx context.Context, filter string) (result siterecovery.JobCollectionIterator, err error) Restart(ctx context.Context, jobName string) (result siterecovery.ReplicationJobsRestartFuture, err error) Resume(ctx context.Context, jobName string, resumeJobParams siterecovery.ResumeJobParams) (result siterecovery.ReplicationJobsResumeFuture, err error) } @@ -247,6 +278,7 @@ type ReplicationPoliciesClientAPI interface { Delete(ctx context.Context, policyName string) (result siterecovery.ReplicationPoliciesDeleteFuture, err error) Get(ctx context.Context, policyName string) (result siterecovery.Policy, err error) List(ctx context.Context) (result siterecovery.PolicyCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.PolicyCollectionIterator, err error) Update(ctx context.Context, policyName string, input siterecovery.UpdatePolicyInput) (result siterecovery.ReplicationPoliciesUpdateFuture, err error) } @@ -259,6 +291,7 @@ type ReplicationRecoveryPlansClientAPI interface { FailoverCommit(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansFailoverCommitFuture, err error) Get(ctx context.Context, recoveryPlanName string) (result siterecovery.RecoveryPlan, err error) List(ctx context.Context) (result siterecovery.RecoveryPlanCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.RecoveryPlanCollectionIterator, err error) PlannedFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanPlannedFailoverInput) (result siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture, err error) Reprotect(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansReprotectFuture, err error) TestFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanTestFailoverInput) (result siterecovery.ReplicationRecoveryPlansTestFailoverFuture, err error) diff --git a/services/recoveryservices/mgmt/2018-01-10/siterecovery/targetcomputesizes.go b/services/recoveryservices/mgmt/2018-01-10/siterecovery/targetcomputesizes.go index 8e6c0f48d39b..6cf4e838d440 100644 --- a/services/recoveryservices/mgmt/2018-01-10/siterecovery/targetcomputesizes.go +++ b/services/recoveryservices/mgmt/2018-01-10/siterecovery/targetcomputesizes.go @@ -35,7 +35,9 @@ func NewTargetComputeSizesClient(subscriptionID string, resourceGroupName string return NewTargetComputeSizesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewTargetComputeSizesClientWithBaseURI creates an instance of the TargetComputeSizesClient client. +// NewTargetComputeSizesClientWithBaseURI creates an instance of the TargetComputeSizesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTargetComputeSizesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) TargetComputeSizesClient { return TargetComputeSizesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/client.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/client.go index 1ff58ed82bb0..05a81c1c6578 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/client.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/client.go @@ -43,7 +43,8 @@ func New(subscriptionID string, resourceGroupName string, resourceName string) B return NewWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, resourceGroupName string, resourceName string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/migrationrecoverypoints.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/migrationrecoverypoints.go index 172562674c72..96967f6a1fc7 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/migrationrecoverypoints.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/migrationrecoverypoints.go @@ -35,7 +35,9 @@ func NewMigrationRecoveryPointsClient(subscriptionID string, resourceGroupName s return NewMigrationRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewMigrationRecoveryPointsClientWithBaseURI creates an instance of the MigrationRecoveryPointsClient client. +// NewMigrationRecoveryPointsClientWithBaseURI creates an instance of the MigrationRecoveryPointsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewMigrationRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) MigrationRecoveryPointsClient { return MigrationRecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go index 265bfd6726c3..df3c8cb20087 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go @@ -745,6 +745,22 @@ func PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues() []InstanceTypeBa return []InstanceTypeBasicRecoveryPlanActionDetails{InstanceTypeAutomationRunbookActionDetails, InstanceTypeManualActionDetails, InstanceTypeRecoveryPlanActionDetails, InstanceTypeScriptActionDetails} } +// InstanceTypeBasicRecoveryPlanProviderSpecificDetails enumerates the values for instance type basic recovery +// plan provider specific details. +type InstanceTypeBasicRecoveryPlanProviderSpecificDetails string + +const ( + // InstanceTypeRecoveryPlanA2ADetails ... + InstanceTypeRecoveryPlanA2ADetails InstanceTypeBasicRecoveryPlanProviderSpecificDetails = "RecoveryPlanA2ADetails" + // InstanceTypeRecoveryPlanProviderSpecificDetails ... + InstanceTypeRecoveryPlanProviderSpecificDetails InstanceTypeBasicRecoveryPlanProviderSpecificDetails = "RecoveryPlanProviderSpecificDetails" +) + +// PossibleInstanceTypeBasicRecoveryPlanProviderSpecificDetailsValues returns an array of possible values for the InstanceTypeBasicRecoveryPlanProviderSpecificDetails const type. +func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificDetailsValues() []InstanceTypeBasicRecoveryPlanProviderSpecificDetails { + return []InstanceTypeBasicRecoveryPlanProviderSpecificDetails{InstanceTypeRecoveryPlanA2ADetails, InstanceTypeRecoveryPlanProviderSpecificDetails} +} + // InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput enumerates the values for instance type basic // recovery plan provider specific failover input. type InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput string @@ -769,6 +785,22 @@ func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() return []InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput{InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput} } +// InstanceTypeBasicRecoveryPlanProviderSpecificInput enumerates the values for instance type basic recovery +// plan provider specific input. +type InstanceTypeBasicRecoveryPlanProviderSpecificInput string + +const ( + // InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A ... + InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A InstanceTypeBasicRecoveryPlanProviderSpecificInput = "A2A" + // InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput ... + InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput InstanceTypeBasicRecoveryPlanProviderSpecificInput = "RecoveryPlanProviderSpecificInput" +) + +// PossibleInstanceTypeBasicRecoveryPlanProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicRecoveryPlanProviderSpecificInput const type. +func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificInputValues() []InstanceTypeBasicRecoveryPlanProviderSpecificInput { + return []InstanceTypeBasicRecoveryPlanProviderSpecificInput{InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A, InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput} +} + // InstanceTypeBasicRemoveDisksProviderSpecificInput enumerates the values for instance type basic remove disks // provider specific input. type InstanceTypeBasicRemoveDisksProviderSpecificInput string @@ -2057,6 +2089,10 @@ type A2AProtectedManagedDiskDetails struct { KeyIdentifier *string `json:"keyIdentifier,omitempty"` // KekKeyVaultArmID - The KeyVault resource id for key (KEK). KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"` + // FailoverDiskName - The failover name for the managed disk. + FailoverDiskName *string `json:"failoverDiskName,omitempty"` + // TfoDiskName - The test failover name for the managed disk. + TfoDiskName *string `json:"tfoDiskName,omitempty"` } // A2AProtectionContainerMappingDetails a2A provider specific settings. @@ -2244,6 +2280,8 @@ type A2AReplicationDetails struct { RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"` // SelectedRecoveryAzureNetworkID - The recovery virtual network. SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + // SelectedTfoAzureNetworkID - The test failover virtual network. + SelectedTfoAzureNetworkID *string `json:"selectedTfoAzureNetworkId,omitempty"` // VMNics - The virtual machine nic details. VMNics *[]VMNicDetails `json:"vmNics,omitempty"` // VMSyncedConfigDetails - The synced configuration details. @@ -2276,6 +2314,8 @@ type A2AReplicationDetails struct { RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` // VMEncryptionType - READ-ONLY; The encryption type of the VM. Possible values include: 'NotEncrypted', 'OnePassEncrypted', 'TwoPassEncrypted' VMEncryptionType VMEncryptionType `json:"vmEncryptionType,omitempty"` + // TfoAzureVMName - The test failover VM name. + TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` } @@ -2338,6 +2378,9 @@ func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) { if ard.SelectedRecoveryAzureNetworkID != nil { objectMap["selectedRecoveryAzureNetworkId"] = ard.SelectedRecoveryAzureNetworkID } + if ard.SelectedTfoAzureNetworkID != nil { + objectMap["selectedTfoAzureNetworkId"] = ard.SelectedTfoAzureNetworkID + } if ard.VMNics != nil { objectMap["vmNics"] = ard.VMNics } @@ -2383,6 +2426,9 @@ func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) { if ard.RecoveryAvailabilityZone != nil { objectMap["recoveryAvailabilityZone"] = ard.RecoveryAvailabilityZone } + if ard.TfoAzureVMName != nil { + objectMap["tfoAzureVMName"] = ard.TfoAzureVMName + } if ard.InstanceType != "" { objectMap["instanceType"] = ard.InstanceType } @@ -2645,6 +2691,8 @@ type A2AUpdateReplicationProtectedItemInput struct { RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` // DiskEncryptionInfo - The recovery os disk encryption information. DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` + // TfoAzureVMName - The user given name for test failover VM. + TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` } @@ -2668,6 +2716,9 @@ func (aurpii A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, erro if aurpii.DiskEncryptionInfo != nil { objectMap["diskEncryptionInfo"] = aurpii.DiskEncryptionInfo } + if aurpii.TfoAzureVMName != nil { + objectMap["tfoAzureVMName"] = aurpii.TfoAzureVMName + } if aurpii.InstanceType != "" { objectMap["instanceType"] = aurpii.InstanceType } @@ -2737,6 +2788,10 @@ type A2AVMManagedDiskUpdateDetails struct { RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` // DiskEncryptionInfo - The recovery disk encryption information (for one / single pass flows). DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` + // FailoverDiskName - The target disk name for unplanned failover operation. + FailoverDiskName *string `json:"failoverDiskName,omitempty"` + // TfoDiskName - The target disk name for test failover operation. + TfoDiskName *string `json:"tfoDiskName,omitempty"` } // AddDisksInput input for add disk(s) operation. @@ -4200,6 +4255,67 @@ type CreateRecoveryPlanInputProperties struct { FailoverDeploymentModel FailoverDeploymentModel `json:"failoverDeploymentModel,omitempty"` // Groups - The recovery plan groups. Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` + // ProviderSpecificInput - The provider specific input. + ProviderSpecificInput *[]BasicRecoveryPlanProviderSpecificInput `json:"providerSpecificInput,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for CreateRecoveryPlanInputProperties struct. +func (crpip *CreateRecoveryPlanInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "primaryFabricId": + if v != nil { + var primaryFabricID string + err = json.Unmarshal(*v, &primaryFabricID) + if err != nil { + return err + } + crpip.PrimaryFabricID = &primaryFabricID + } + case "recoveryFabricId": + if v != nil { + var recoveryFabricID string + err = json.Unmarshal(*v, &recoveryFabricID) + if err != nil { + return err + } + crpip.RecoveryFabricID = &recoveryFabricID + } + case "failoverDeploymentModel": + if v != nil { + var failoverDeploymentModel FailoverDeploymentModel + err = json.Unmarshal(*v, &failoverDeploymentModel) + if err != nil { + return err + } + crpip.FailoverDeploymentModel = failoverDeploymentModel + } + case "groups": + if v != nil { + var groups []RecoveryPlanGroup + err = json.Unmarshal(*v, &groups) + if err != nil { + return err + } + crpip.Groups = &groups + } + case "providerSpecificInput": + if v != nil { + providerSpecificInput, err := unmarshalBasicRecoveryPlanProviderSpecificInputArray(*v) + if err != nil { + return err + } + crpip.ProviderSpecificInput = &providerSpecificInput + } + } + } + + return nil } // CurrentJobDetails current job details of the migration item. @@ -10580,6 +10696,16 @@ type InputEndpoint struct { Protocol *string `json:"protocol,omitempty"` } +// IPConfig IP configuration details. +type IPConfig struct { + // StaticIPAddress - The static IP address of the IP configuration. + StaticIPAddress *string `json:"staticIPAddress,omitempty"` + // PublicIPAddressID - The Id of the public IP address associated with the IP configuration. + PublicIPAddressID *string `json:"publicIpAddressId,omitempty"` + // LBBackendAddressPoolIds - The backend address pools associated with the IP configuration. + LBBackendAddressPoolIds *[]string `json:"lBBackendAddressPoolIds,omitempty"` +} + // Job job details. type Job struct { autorest.Response `json:"-"` @@ -14719,6 +14845,47 @@ type RecoveryPlan struct { Location *string `json:"location,omitempty"` } +// RecoveryPlanA2ADetails recovery plan A2A specific details. +type RecoveryPlanA2ADetails struct { + // PrimaryZone - The primary zone. + PrimaryZone *string `json:"primaryZone,omitempty"` + // RecoveryZone - The recovery zone. + RecoveryZone *string `json:"recoveryZone,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanProviderSpecificDetails', 'InstanceTypeRecoveryPlanA2ADetails' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanA2ADetails. +func (rpad RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { + rpad.InstanceType = InstanceTypeRecoveryPlanA2ADetails + objectMap := make(map[string]interface{}) + if rpad.PrimaryZone != nil { + objectMap["primaryZone"] = rpad.PrimaryZone + } + if rpad.RecoveryZone != nil { + objectMap["recoveryZone"] = rpad.RecoveryZone + } + if rpad.InstanceType != "" { + objectMap["instanceType"] = rpad.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2ADetails is the BasicRecoveryPlanProviderSpecificDetails implementation for RecoveryPlanA2ADetails. +func (rpad RecoveryPlanA2ADetails) AsRecoveryPlanA2ADetails() (*RecoveryPlanA2ADetails, bool) { + return &rpad, true +} + +// AsRecoveryPlanProviderSpecificDetails is the BasicRecoveryPlanProviderSpecificDetails implementation for RecoveryPlanA2ADetails. +func (rpad RecoveryPlanA2ADetails) AsRecoveryPlanProviderSpecificDetails() (*RecoveryPlanProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicRecoveryPlanProviderSpecificDetails is the BasicRecoveryPlanProviderSpecificDetails implementation for RecoveryPlanA2ADetails. +func (rpad RecoveryPlanA2ADetails) AsBasicRecoveryPlanProviderSpecificDetails() (BasicRecoveryPlanProviderSpecificDetails, bool) { + return &rpad, true +} + // RecoveryPlanA2AFailoverInput recovery plan A2A failover input. type RecoveryPlanA2AFailoverInput struct { // RecoveryPointType - The recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed' @@ -14785,6 +14952,47 @@ func (rpafi RecoveryPlanA2AFailoverInput) AsBasicRecoveryPlanProviderSpecificFai return &rpafi, true } +// RecoveryPlanA2AInput recovery plan A2A input. +type RecoveryPlanA2AInput struct { + // PrimaryZone - The primary zone. + PrimaryZone *string `json:"primaryZone,omitempty"` + // RecoveryZone - The recovery zone. + RecoveryZone *string `json:"recoveryZone,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanA2AInput. +func (rpai RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { + rpai.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if rpai.PrimaryZone != nil { + objectMap["primaryZone"] = rpai.PrimaryZone + } + if rpai.RecoveryZone != nil { + objectMap["recoveryZone"] = rpai.RecoveryZone + } + if rpai.InstanceType != "" { + objectMap["instanceType"] = rpai.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2AInput is the BasicRecoveryPlanProviderSpecificInput implementation for RecoveryPlanA2AInput. +func (rpai RecoveryPlanA2AInput) AsRecoveryPlanA2AInput() (*RecoveryPlanA2AInput, bool) { + return &rpai, true +} + +// AsRecoveryPlanProviderSpecificInput is the BasicRecoveryPlanProviderSpecificInput implementation for RecoveryPlanA2AInput. +func (rpai RecoveryPlanA2AInput) AsRecoveryPlanProviderSpecificInput() (*RecoveryPlanProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicRecoveryPlanProviderSpecificInput is the BasicRecoveryPlanProviderSpecificInput implementation for RecoveryPlanA2AInput. +func (rpai RecoveryPlanA2AInput) AsBasicRecoveryPlanProviderSpecificInput() (BasicRecoveryPlanProviderSpecificInput, bool) { + return &rpai, true +} + // RecoveryPlanAction recovery plan action details. type RecoveryPlanAction struct { // ActionName - The action name. @@ -15594,6 +15802,166 @@ type RecoveryPlanProperties struct { CurrentScenarioStatusDescription *string `json:"currentScenarioStatusDescription,omitempty"` // Groups - The recovery plan groups. Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` + // ProviderSpecificDetails - READ-ONLY; The provider id and provider specific details. + ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanProperties struct. +func (rpp *RecoveryPlanProperties) UnmarshalJSON(body []byte) error { + 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 + } + rpp.FriendlyName = &friendlyName + } + case "primaryFabricId": + if v != nil { + var primaryFabricID string + err = json.Unmarshal(*v, &primaryFabricID) + if err != nil { + return err + } + rpp.PrimaryFabricID = &primaryFabricID + } + case "primaryFabricFriendlyName": + if v != nil { + var primaryFabricFriendlyName string + err = json.Unmarshal(*v, &primaryFabricFriendlyName) + if err != nil { + return err + } + rpp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName + } + case "recoveryFabricId": + if v != nil { + var recoveryFabricID string + err = json.Unmarshal(*v, &recoveryFabricID) + if err != nil { + return err + } + rpp.RecoveryFabricID = &recoveryFabricID + } + case "recoveryFabricFriendlyName": + if v != nil { + var recoveryFabricFriendlyName string + err = json.Unmarshal(*v, &recoveryFabricFriendlyName) + if err != nil { + return err + } + rpp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName + } + case "failoverDeploymentModel": + if v != nil { + var failoverDeploymentModel string + err = json.Unmarshal(*v, &failoverDeploymentModel) + if err != nil { + return err + } + rpp.FailoverDeploymentModel = &failoverDeploymentModel + } + case "replicationProviders": + if v != nil { + var replicationProviders []string + err = json.Unmarshal(*v, &replicationProviders) + if err != nil { + return err + } + rpp.ReplicationProviders = &replicationProviders + } + case "allowedOperations": + if v != nil { + var allowedOperations []string + err = json.Unmarshal(*v, &allowedOperations) + if err != nil { + return err + } + rpp.AllowedOperations = &allowedOperations + } + case "lastPlannedFailoverTime": + if v != nil { + var lastPlannedFailoverTime date.Time + err = json.Unmarshal(*v, &lastPlannedFailoverTime) + if err != nil { + return err + } + rpp.LastPlannedFailoverTime = &lastPlannedFailoverTime + } + case "lastUnplannedFailoverTime": + if v != nil { + var lastUnplannedFailoverTime date.Time + err = json.Unmarshal(*v, &lastUnplannedFailoverTime) + if err != nil { + return err + } + rpp.LastUnplannedFailoverTime = &lastUnplannedFailoverTime + } + case "lastTestFailoverTime": + if v != nil { + var lastTestFailoverTime date.Time + err = json.Unmarshal(*v, &lastTestFailoverTime) + if err != nil { + return err + } + rpp.LastTestFailoverTime = &lastTestFailoverTime + } + case "currentScenario": + if v != nil { + var currentScenario CurrentScenarioDetails + err = json.Unmarshal(*v, ¤tScenario) + if err != nil { + return err + } + rpp.CurrentScenario = ¤tScenario + } + case "currentScenarioStatus": + if v != nil { + var currentScenarioStatus string + err = json.Unmarshal(*v, ¤tScenarioStatus) + if err != nil { + return err + } + rpp.CurrentScenarioStatus = ¤tScenarioStatus + } + case "currentScenarioStatusDescription": + if v != nil { + var currentScenarioStatusDescription string + err = json.Unmarshal(*v, ¤tScenarioStatusDescription) + if err != nil { + return err + } + rpp.CurrentScenarioStatusDescription = ¤tScenarioStatusDescription + } + case "groups": + if v != nil { + var groups []RecoveryPlanGroup + err = json.Unmarshal(*v, &groups) + if err != nil { + return err + } + rpp.Groups = &groups + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificDetailsArray(*v) + if err != nil { + return err + } + rpp.ProviderSpecificDetails = &providerSpecificDetails + } + } + } + + return nil } // RecoveryPlanProtectedItem recovery plan protected item. @@ -15604,6 +15972,80 @@ type RecoveryPlanProtectedItem struct { VirtualMachineID *string `json:"virtualMachineId,omitempty"` } +// BasicRecoveryPlanProviderSpecificDetails recovery plan provider specific details. +type BasicRecoveryPlanProviderSpecificDetails interface { + AsRecoveryPlanA2ADetails() (*RecoveryPlanA2ADetails, bool) + AsRecoveryPlanProviderSpecificDetails() (*RecoveryPlanProviderSpecificDetails, bool) +} + +// RecoveryPlanProviderSpecificDetails recovery plan provider specific details. +type RecoveryPlanProviderSpecificDetails struct { + // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanProviderSpecificDetails', 'InstanceTypeRecoveryPlanA2ADetails' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicRecoveryPlanProviderSpecificDetails(body []byte) (BasicRecoveryPlanProviderSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeRecoveryPlanA2ADetails): + var rpad RecoveryPlanA2ADetails + err := json.Unmarshal(body, &rpad) + return rpad, err + default: + var rppsd RecoveryPlanProviderSpecificDetails + err := json.Unmarshal(body, &rppsd) + return rppsd, err + } +} +func unmarshalBasicRecoveryPlanProviderSpecificDetailsArray(body []byte) ([]BasicRecoveryPlanProviderSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rppsdArray := make([]BasicRecoveryPlanProviderSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rppsd, err := unmarshalBasicRecoveryPlanProviderSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + rppsdArray[index] = rppsd + } + return rppsdArray, nil +} + +// MarshalJSON is the custom marshaler for RecoveryPlanProviderSpecificDetails. +func (rppsd RecoveryPlanProviderSpecificDetails) MarshalJSON() ([]byte, error) { + rppsd.InstanceType = InstanceTypeRecoveryPlanProviderSpecificDetails + objectMap := make(map[string]interface{}) + if rppsd.InstanceType != "" { + objectMap["instanceType"] = rppsd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2ADetails is the BasicRecoveryPlanProviderSpecificDetails implementation for RecoveryPlanProviderSpecificDetails. +func (rppsd RecoveryPlanProviderSpecificDetails) AsRecoveryPlanA2ADetails() (*RecoveryPlanA2ADetails, bool) { + return nil, false +} + +// AsRecoveryPlanProviderSpecificDetails is the BasicRecoveryPlanProviderSpecificDetails implementation for RecoveryPlanProviderSpecificDetails. +func (rppsd RecoveryPlanProviderSpecificDetails) AsRecoveryPlanProviderSpecificDetails() (*RecoveryPlanProviderSpecificDetails, bool) { + return &rppsd, true +} + +// AsBasicRecoveryPlanProviderSpecificDetails is the BasicRecoveryPlanProviderSpecificDetails implementation for RecoveryPlanProviderSpecificDetails. +func (rppsd RecoveryPlanProviderSpecificDetails) AsBasicRecoveryPlanProviderSpecificDetails() (BasicRecoveryPlanProviderSpecificDetails, bool) { + return &rppsd, true +} + // BasicRecoveryPlanProviderSpecificFailoverInput recovery plan provider specific failover input base class. type BasicRecoveryPlanProviderSpecificFailoverInput interface { AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) @@ -15718,6 +16160,80 @@ func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsBasicRecoveryPlanProvi return &rppsfi, true } +// BasicRecoveryPlanProviderSpecificInput recovery plan provider specific input base class. +type BasicRecoveryPlanProviderSpecificInput interface { + AsRecoveryPlanA2AInput() (*RecoveryPlanA2AInput, bool) + AsRecoveryPlanProviderSpecificInput() (*RecoveryPlanProviderSpecificInput, bool) +} + +// RecoveryPlanProviderSpecificInput recovery plan provider specific input base class. +type RecoveryPlanProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicRecoveryPlanProviderSpecificInput(body []byte) (BasicRecoveryPlanProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeA2A): + var rpai RecoveryPlanA2AInput + err := json.Unmarshal(body, &rpai) + return rpai, err + default: + var rppsi RecoveryPlanProviderSpecificInput + err := json.Unmarshal(body, &rppsi) + return rppsi, err + } +} +func unmarshalBasicRecoveryPlanProviderSpecificInputArray(body []byte) ([]BasicRecoveryPlanProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rppsiArray := make([]BasicRecoveryPlanProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rppsi, err := unmarshalBasicRecoveryPlanProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + rppsiArray[index] = rppsi + } + return rppsiArray, nil +} + +// MarshalJSON is the custom marshaler for RecoveryPlanProviderSpecificInput. +func (rppsi RecoveryPlanProviderSpecificInput) MarshalJSON() ([]byte, error) { + rppsi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificInputInstanceTypeRecoveryPlanProviderSpecificInput + objectMap := make(map[string]interface{}) + if rppsi.InstanceType != "" { + objectMap["instanceType"] = rppsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2AInput is the BasicRecoveryPlanProviderSpecificInput implementation for RecoveryPlanProviderSpecificInput. +func (rppsi RecoveryPlanProviderSpecificInput) AsRecoveryPlanA2AInput() (*RecoveryPlanA2AInput, bool) { + return nil, false +} + +// AsRecoveryPlanProviderSpecificInput is the BasicRecoveryPlanProviderSpecificInput implementation for RecoveryPlanProviderSpecificInput. +func (rppsi RecoveryPlanProviderSpecificInput) AsRecoveryPlanProviderSpecificInput() (*RecoveryPlanProviderSpecificInput, bool) { + return &rppsi, true +} + +// AsBasicRecoveryPlanProviderSpecificInput is the BasicRecoveryPlanProviderSpecificInput implementation for RecoveryPlanProviderSpecificInput. +func (rppsi RecoveryPlanProviderSpecificInput) AsBasicRecoveryPlanProviderSpecificInput() (BasicRecoveryPlanProviderSpecificInput, bool) { + return &rppsi, true +} + // RecoveryPlanScriptActionDetails recovery plan script action details. type RecoveryPlanScriptActionDetails struct { // Path - The script path. @@ -21266,6 +21782,8 @@ type UpdateReplicationProtectedItemInputProperties struct { RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` // SelectedRecoveryAzureNetworkID - Target Azure Network Id. SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + // SelectedTfoAzureNetworkID - The Azure Network Id for test failover. + SelectedTfoAzureNetworkID *string `json:"selectedTfoAzureNetworkId,omitempty"` // SelectedSourceNicID - The selected source nic Id which will be used as the primary nic during failover. SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. @@ -21316,6 +21834,15 @@ func (urpiip *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(body } urpiip.SelectedRecoveryAzureNetworkID = &selectedRecoveryAzureNetworkID } + case "selectedTfoAzureNetworkId": + if v != nil { + var selectedTfoAzureNetworkID string + err = json.Unmarshal(*v, &selectedTfoAzureNetworkID) + if err != nil { + return err + } + urpiip.SelectedTfoAzureNetworkID = &selectedTfoAzureNetworkID + } case "selectedSourceNicId": if v != nil { var selectedSourceNicID string @@ -22389,6 +22916,16 @@ type VMNicDetails struct { RecoveryLBBackendAddressPoolIds *[]string `json:"recoveryLBBackendAddressPoolIds,omitempty"` // EnableAcceleratedNetworkingOnRecovery - A value indicating whether the NIC has accelerated networking enabled. EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"` + // TfoVMNetworkID - The network to be used by NIC during test failover. + TfoVMNetworkID *string `json:"tfoVMNetworkId,omitempty"` + // TfoVMSubnetName - The subnet to be used by NIC during test failover. + TfoVMSubnetName *string `json:"tfoVMSubnetName,omitempty"` + // TfoNetworkSecurityGroupID - The NSG to be used by NIC during test failover. + TfoNetworkSecurityGroupID *string `json:"tfoNetworkSecurityGroupId,omitempty"` + // EnableAcceleratedNetworkingOnTfo - Whether the test failover NIC has accelerated networking enabled. + EnableAcceleratedNetworkingOnTfo *bool `json:"enableAcceleratedNetworkingOnTfo,omitempty"` + // TfoIPConfigs - The IP configurations to be used by NIC during test failover. + TfoIPConfigs *[]IPConfig `json:"tfoIPConfigs,omitempty"` } // VMNicInputDetails hyper V VM network input details. @@ -22409,6 +22946,14 @@ type VMNicInputDetails struct { RecoveryLBBackendAddressPoolIds *[]string `json:"recoveryLBBackendAddressPoolIds,omitempty"` // EnableAcceleratedNetworkingOnRecovery - Whether the NIC has accelerated networking enabled. EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"` + // TfoVMSubnetName - The subnet to be used by NIC during test failover. + TfoVMSubnetName *string `json:"tfoVMSubnetName,omitempty"` + // TfoNetworkSecurityGroupID - The NSG to be used by NIC during test failover. + TfoNetworkSecurityGroupID *string `json:"tfoNetworkSecurityGroupId,omitempty"` + // EnableAcceleratedNetworkingOnTfo - Whether the test NIC has accelerated networking enabled. + EnableAcceleratedNetworkingOnTfo *bool `json:"enableAcceleratedNetworkingOnTfo,omitempty"` + // TfoIPConfigs - The IP configurations to be used by NIC during test failover. + TfoIPConfigs *[]IPConfig `json:"tfoIPConfigs,omitempty"` } // VMNicUpdatesTaskDetails this class represents the vm NicUpdates task details. diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/operations.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/operations.go index 87ad407044ef..6a537c159c66 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/operations.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, resourceGroupName string, resour return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, resourceGroupName string, resourceName string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/recoverypoints.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/recoverypoints.go index e089be8a8766..31ac3815e7b8 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/recoverypoints.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/recoverypoints.go @@ -35,7 +35,8 @@ func NewRecoveryPointsClient(subscriptionID string, resourceGroupName string, re return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client. +// 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, resourceGroupName string, resourceName string) RecoveryPointsClient { return RecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationalertsettings.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationalertsettings.go index c6ff50d269e7..bba03d286e48 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationalertsettings.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationalertsettings.go @@ -35,7 +35,9 @@ func NewReplicationAlertSettingsClient(subscriptionID string, resourceGroupName return NewReplicationAlertSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationAlertSettingsClientWithBaseURI creates an instance of the ReplicationAlertSettingsClient client. +// NewReplicationAlertSettingsClientWithBaseURI creates an instance of the ReplicationAlertSettingsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationAlertSettingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationAlertSettingsClient { return ReplicationAlertSettingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go index f2f0ad2092af..915d0d1d759d 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go @@ -37,7 +37,8 @@ func NewReplicationEligibilityResultsClient(subscriptionID string, resourceGroup } // NewReplicationEligibilityResultsClientWithBaseURI creates an instance of the ReplicationEligibilityResultsClient -// 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 NewReplicationEligibilityResultsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationEligibilityResultsClient { return ReplicationEligibilityResultsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationevents.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationevents.go index faf6bb6601f7..c83d98ca0c0b 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationevents.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationevents.go @@ -35,7 +35,9 @@ func NewReplicationEventsClient(subscriptionID string, resourceGroupName string, return NewReplicationEventsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationEventsClientWithBaseURI creates an instance of the ReplicationEventsClient client. +// NewReplicationEventsClientWithBaseURI creates an instance of the ReplicationEventsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationEventsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationEventsClient { return ReplicationEventsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationfabrics.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationfabrics.go index 020d3ed80864..22d4c0f62656 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationfabrics.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationfabrics.go @@ -35,7 +35,9 @@ func NewReplicationFabricsClient(subscriptionID string, resourceGroupName string return NewReplicationFabricsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationFabricsClientWithBaseURI creates an instance of the ReplicationFabricsClient client. +// NewReplicationFabricsClientWithBaseURI creates an instance of the ReplicationFabricsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationFabricsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationFabricsClient { return ReplicationFabricsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationjobs.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationjobs.go index 6c5d6e0a3230..d3ac519d566b 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationjobs.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationjobs.go @@ -35,7 +35,8 @@ func NewReplicationJobsClient(subscriptionID string, resourceGroupName string, r return NewReplicationJobsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationJobsClientWithBaseURI creates an instance of the ReplicationJobsClient client. +// NewReplicationJobsClientWithBaseURI creates an instance of the ReplicationJobsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationJobsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationJobsClient { return ReplicationJobsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationlogicalnetworks.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationlogicalnetworks.go index 578f34ed6781..b0c5c666ce13 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationlogicalnetworks.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationlogicalnetworks.go @@ -36,7 +36,9 @@ func NewReplicationLogicalNetworksClient(subscriptionID string, resourceGroupNam return NewReplicationLogicalNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationLogicalNetworksClientWithBaseURI creates an instance of the ReplicationLogicalNetworksClient client. +// NewReplicationLogicalNetworksClientWithBaseURI creates an instance of the ReplicationLogicalNetworksClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationLogicalNetworksClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationLogicalNetworksClient { return ReplicationLogicalNetworksClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationmigrationitems.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationmigrationitems.go index 7e2ac5f0f606..af279fee8da9 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationmigrationitems.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationmigrationitems.go @@ -36,7 +36,9 @@ func NewReplicationMigrationItemsClient(subscriptionID string, resourceGroupName return NewReplicationMigrationItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationMigrationItemsClientWithBaseURI creates an instance of the ReplicationMigrationItemsClient client. +// NewReplicationMigrationItemsClientWithBaseURI creates an instance of the ReplicationMigrationItemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationMigrationItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationMigrationItemsClient { return ReplicationMigrationItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworkmappings.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworkmappings.go index 6006c965ad18..953ed02e8618 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworkmappings.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworkmappings.go @@ -36,7 +36,9 @@ func NewReplicationNetworkMappingsClient(subscriptionID string, resourceGroupNam return NewReplicationNetworkMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationNetworkMappingsClientWithBaseURI creates an instance of the ReplicationNetworkMappingsClient client. +// NewReplicationNetworkMappingsClientWithBaseURI creates an instance of the ReplicationNetworkMappingsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationNetworkMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworkMappingsClient { return ReplicationNetworkMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworks.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworks.go index e1a739ab3c89..97ed33dfe8fd 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworks.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworks.go @@ -35,7 +35,9 @@ func NewReplicationNetworksClient(subscriptionID string, resourceGroupName strin return NewReplicationNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationNetworksClientWithBaseURI creates an instance of the ReplicationNetworksClient client. +// NewReplicationNetworksClientWithBaseURI creates an instance of the ReplicationNetworksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationNetworksClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworksClient { return ReplicationNetworksClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationpolicies.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationpolicies.go index bb919f16d6cf..a12cfd07e270 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationpolicies.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationpolicies.go @@ -35,7 +35,9 @@ func NewReplicationPoliciesClient(subscriptionID string, resourceGroupName strin return NewReplicationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationPoliciesClientWithBaseURI creates an instance of the ReplicationPoliciesClient client. +// NewReplicationPoliciesClientWithBaseURI creates an instance of the ReplicationPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationPoliciesClient { return ReplicationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectableitems.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectableitems.go index c2a47513bbb6..ca8d6a27344e 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectableitems.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectableitems.go @@ -36,7 +36,9 @@ func NewReplicationProtectableItemsClient(subscriptionID string, resourceGroupNa return NewReplicationProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationProtectableItemsClientWithBaseURI creates an instance of the ReplicationProtectableItemsClient client. +// NewReplicationProtectableItemsClientWithBaseURI creates an instance of the ReplicationProtectableItemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectableItemsClient { return ReplicationProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotecteditems.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotecteditems.go index 244d153ec9bd..810fdda927d2 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotecteditems.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotecteditems.go @@ -36,7 +36,9 @@ func NewReplicationProtectedItemsClient(subscriptionID string, resourceGroupName return NewReplicationProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationProtectedItemsClientWithBaseURI creates an instance of the ReplicationProtectedItemsClient client. +// NewReplicationProtectedItemsClientWithBaseURI creates an instance of the ReplicationProtectedItemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectedItemsClient { return ReplicationProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainermappings.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainermappings.go index e96266a6479f..8327c2fc2c28 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainermappings.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainermappings.go @@ -38,7 +38,8 @@ func NewReplicationProtectionContainerMappingsClient(subscriptionID string, reso } // NewReplicationProtectionContainerMappingsClientWithBaseURI creates an instance of the -// ReplicationProtectionContainerMappingsClient client. +// ReplicationProtectionContainerMappingsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationProtectionContainerMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainerMappingsClient { return ReplicationProtectionContainerMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainers.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainers.go index 19139fa5d748..1b02ef17b38f 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainers.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainers.go @@ -37,7 +37,8 @@ func NewReplicationProtectionContainersClient(subscriptionID string, resourceGro } // NewReplicationProtectionContainersClientWithBaseURI creates an instance of the ReplicationProtectionContainersClient -// 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 NewReplicationProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainersClient { return ReplicationProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryplans.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryplans.go index 71f447905bfc..97a176a3c309 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryplans.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryplans.go @@ -36,7 +36,9 @@ func NewReplicationRecoveryPlansClient(subscriptionID string, resourceGroupName return NewReplicationRecoveryPlansClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationRecoveryPlansClientWithBaseURI creates an instance of the ReplicationRecoveryPlansClient client. +// NewReplicationRecoveryPlansClientWithBaseURI creates an instance of the ReplicationRecoveryPlansClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewReplicationRecoveryPlansClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryPlansClient { return ReplicationRecoveryPlansClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryservicesproviders.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryservicesproviders.go index d8574f3bb9f6..6bcf47ef62aa 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryservicesproviders.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryservicesproviders.go @@ -39,7 +39,8 @@ func NewReplicationRecoveryServicesProvidersClient(subscriptionID string, resour } // NewReplicationRecoveryServicesProvidersClientWithBaseURI creates an instance of the -// ReplicationRecoveryServicesProvidersClient client. +// ReplicationRecoveryServicesProvidersClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationRecoveryServicesProvidersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryServicesProvidersClient { return ReplicationRecoveryServicesProvidersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassificationmappings.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassificationmappings.go index d4fb88886468..f55052710ef5 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassificationmappings.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassificationmappings.go @@ -38,7 +38,8 @@ func NewReplicationStorageClassificationMappingsClient(subscriptionID string, re } // NewReplicationStorageClassificationMappingsClientWithBaseURI creates an instance of the -// ReplicationStorageClassificationMappingsClient client. +// ReplicationStorageClassificationMappingsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationStorageClassificationMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationMappingsClient { return ReplicationStorageClassificationMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassifications.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassifications.go index 9175d990885d..e9cf31c7577a 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassifications.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassifications.go @@ -38,7 +38,8 @@ func NewReplicationStorageClassificationsClient(subscriptionID string, resourceG } // NewReplicationStorageClassificationsClientWithBaseURI creates an instance of the -// ReplicationStorageClassificationsClient client. +// ReplicationStorageClassificationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewReplicationStorageClassificationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationsClient { return ReplicationStorageClassificationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaulthealth.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaulthealth.go index ab293a08e6e9..8b2e36d7495e 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaulthealth.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaulthealth.go @@ -35,7 +35,9 @@ func NewReplicationVaultHealthClient(subscriptionID string, resourceGroupName st return NewReplicationVaultHealthClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationVaultHealthClientWithBaseURI creates an instance of the ReplicationVaultHealthClient client. +// NewReplicationVaultHealthClientWithBaseURI creates an instance of the ReplicationVaultHealthClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReplicationVaultHealthClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { return ReplicationVaultHealthClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaultsetting.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaultsetting.go index 82270c31fff8..5605dac4b8c7 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaultsetting.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaultsetting.go @@ -36,7 +36,9 @@ func NewReplicationVaultSettingClient(subscriptionID string, resourceGroupName s return NewReplicationVaultSettingClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationVaultSettingClientWithBaseURI creates an instance of the ReplicationVaultSettingClient client. +// NewReplicationVaultSettingClientWithBaseURI creates an instance of the ReplicationVaultSettingClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewReplicationVaultSettingClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultSettingClient { return ReplicationVaultSettingClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvcenters.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvcenters.go index 3e18b158e980..b79f3fd66a0e 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvcenters.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvcenters.go @@ -35,7 +35,9 @@ func NewReplicationvCentersClient(subscriptionID string, resourceGroupName strin return NewReplicationvCentersClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewReplicationvCentersClientWithBaseURI creates an instance of the ReplicationvCentersClient client. +// NewReplicationvCentersClientWithBaseURI creates an instance of the ReplicationvCentersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationvCentersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationvCentersClient { return ReplicationvCentersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go index 6f2f7aa445f3..7d2c93d89d77 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result siterecovery.OperationsDiscoveryCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.OperationsDiscoveryCollectionIterator, err error) } var _ OperationsClientAPI = (*siterecovery.OperationsClient)(nil) @@ -34,6 +35,7 @@ type ReplicationAlertSettingsClientAPI interface { Create(ctx context.Context, alertSettingName string, request siterecovery.ConfigureAlertRequest) (result siterecovery.Alert, err error) Get(ctx context.Context, alertSettingName string) (result siterecovery.Alert, err error) List(ctx context.Context) (result siterecovery.AlertCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.AlertCollectionIterator, err error) } var _ ReplicationAlertSettingsClientAPI = (*siterecovery.ReplicationAlertSettingsClient)(nil) @@ -50,6 +52,7 @@ var _ ReplicationEligibilityResultsClientAPI = (*siterecovery.ReplicationEligibi type ReplicationEventsClientAPI interface { Get(ctx context.Context, eventName string) (result siterecovery.Event, err error) List(ctx context.Context, filter string) (result siterecovery.EventCollectionPage, err error) + ListComplete(ctx context.Context, filter string) (result siterecovery.EventCollectionIterator, err error) } var _ ReplicationEventsClientAPI = (*siterecovery.ReplicationEventsClient)(nil) @@ -61,6 +64,7 @@ type ReplicationFabricsClientAPI interface { Delete(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsDeleteFuture, err error) Get(ctx context.Context, fabricName string) (result siterecovery.Fabric, err error) List(ctx context.Context) (result siterecovery.FabricCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.FabricCollectionIterator, err error) MigrateToAad(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsMigrateToAadFuture, err error) Purge(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsPurgeFuture, err error) ReassociateGateway(ctx context.Context, fabricName string, failoverProcessServerRequest siterecovery.FailoverProcessServerRequest) (result siterecovery.ReplicationFabricsReassociateGatewayFuture, err error) @@ -73,6 +77,7 @@ var _ ReplicationFabricsClientAPI = (*siterecovery.ReplicationFabricsClient)(nil type ReplicationLogicalNetworksClientAPI interface { Get(ctx context.Context, fabricName string, logicalNetworkName string) (result siterecovery.LogicalNetwork, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.LogicalNetworkCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.LogicalNetworkCollectionIterator, err error) } var _ ReplicationLogicalNetworksClientAPI = (*siterecovery.ReplicationLogicalNetworksClient)(nil) @@ -81,7 +86,9 @@ var _ ReplicationLogicalNetworksClientAPI = (*siterecovery.ReplicationLogicalNet type ReplicationNetworksClientAPI interface { Get(ctx context.Context, fabricName string, networkName string) (result siterecovery.Network, err error) List(ctx context.Context) (result siterecovery.NetworkCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.NetworkCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.NetworkCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.NetworkCollectionIterator, err error) } var _ ReplicationNetworksClientAPI = (*siterecovery.ReplicationNetworksClient)(nil) @@ -92,7 +99,9 @@ type ReplicationNetworkMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result siterecovery.ReplicationNetworkMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result siterecovery.NetworkMapping, err error) List(ctx context.Context) (result siterecovery.NetworkMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.NetworkMappingCollectionIterator, err error) ListByReplicationNetworks(ctx context.Context, fabricName string, networkName string) (result siterecovery.NetworkMappingCollectionPage, err error) + ListByReplicationNetworksComplete(ctx context.Context, fabricName string, networkName string) (result siterecovery.NetworkMappingCollectionIterator, err error) Update(ctx context.Context, fabricName string, networkName string, networkMappingName string, input siterecovery.UpdateNetworkMappingInput) (result siterecovery.ReplicationNetworkMappingsUpdateFuture, err error) } @@ -105,7 +114,9 @@ type ReplicationProtectionContainersClientAPI interface { DiscoverProtectableItem(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest siterecovery.DiscoverProtectableItemRequest) (result siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainer, err error) List(ctx context.Context) (result siterecovery.ProtectionContainerCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.ProtectionContainerCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.ProtectionContainerCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.ProtectionContainerCollectionIterator, err error) SwitchProtection(ctx context.Context, fabricName string, protectionContainerName string, switchInput siterecovery.SwitchProtectionInput) (result siterecovery.ReplicationProtectionContainersSwitchProtectionFuture, err error) } @@ -117,7 +128,9 @@ type ReplicationMigrationItemsClientAPI interface { Delete(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, deleteOption string) (result siterecovery.ReplicationMigrationItemsDeleteFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result siterecovery.MigrationItem, err error) List(ctx context.Context, skipToken string, filter string) (result siterecovery.MigrationItemCollectionPage, err error) + ListComplete(ctx context.Context, skipToken string, filter string) (result siterecovery.MigrationItemCollectionIterator, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.MigrationItemCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.MigrationItemCollectionIterator, err error) Migrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrateInput siterecovery.MigrateInput) (result siterecovery.ReplicationMigrationItemsMigrateFuture, err error) TestMigrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput siterecovery.TestMigrateInput) (result siterecovery.ReplicationMigrationItemsTestMigrateFuture, err error) TestMigrateCleanup(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput siterecovery.TestMigrateCleanupInput) (result siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture, err error) @@ -130,6 +143,7 @@ var _ ReplicationMigrationItemsClientAPI = (*siterecovery.ReplicationMigrationIt type MigrationRecoveryPointsClientAPI interface { Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string) (result siterecovery.MigrationRecoveryPoint, err error) ListByReplicationMigrationItems(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result siterecovery.MigrationRecoveryPointCollectionPage, err error) + ListByReplicationMigrationItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result siterecovery.MigrationRecoveryPointCollectionIterator, err error) } var _ MigrationRecoveryPointsClientAPI = (*siterecovery.MigrationRecoveryPointsClient)(nil) @@ -138,6 +152,7 @@ var _ MigrationRecoveryPointsClientAPI = (*siterecovery.MigrationRecoveryPointsC type ReplicationProtectableItemsClientAPI interface { Get(ctx context.Context, fabricName string, protectionContainerName string, protectableItemName string) (result siterecovery.ProtectableItem, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result siterecovery.ProtectableItemCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result siterecovery.ProtectableItemCollectionIterator, err error) } var _ ReplicationProtectableItemsClientAPI = (*siterecovery.ReplicationProtectableItemsClient)(nil) @@ -151,7 +166,9 @@ type ReplicationProtectedItemsClientAPI interface { FailoverCommit(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsFailoverCommitFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItem, err error) List(ctx context.Context, skipToken string, filter string) (result siterecovery.ReplicationProtectedItemCollectionPage, err error) + ListComplete(ctx context.Context, skipToken string, filter string) (result siterecovery.ReplicationProtectedItemCollectionIterator, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ReplicationProtectedItemCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ReplicationProtectedItemCollectionIterator, err error) PlannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput siterecovery.PlannedFailoverInput) (result siterecovery.ReplicationProtectedItemsPlannedFailoverFuture, err error) Purge(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsPurgeFuture, err error) RemoveDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput siterecovery.RemoveDisksInput) (result siterecovery.ReplicationProtectedItemsRemoveDisksFuture, err error) @@ -171,6 +188,7 @@ var _ ReplicationProtectedItemsClientAPI = (*siterecovery.ReplicationProtectedIt type RecoveryPointsClientAPI interface { Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string) (result siterecovery.RecoveryPoint, err error) ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.RecoveryPointCollectionPage, err error) + ListByReplicationProtectedItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.RecoveryPointCollectionIterator, err error) } var _ RecoveryPointsClientAPI = (*siterecovery.RecoveryPointsClient)(nil) @@ -178,6 +196,7 @@ var _ RecoveryPointsClientAPI = (*siterecovery.RecoveryPointsClient)(nil) // TargetComputeSizesClientAPI contains the set of methods on the TargetComputeSizesClient type. type TargetComputeSizesClientAPI interface { ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.TargetComputeSizeCollectionPage, err error) + ListByReplicationProtectedItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.TargetComputeSizeCollectionIterator, err error) } var _ TargetComputeSizesClientAPI = (*siterecovery.TargetComputeSizesClient)(nil) @@ -188,7 +207,9 @@ type ReplicationProtectionContainerMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput siterecovery.RemoveProtectionContainerMappingInput) (result siterecovery.ReplicationProtectionContainerMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result siterecovery.ProtectionContainerMapping, err error) List(ctx context.Context) (result siterecovery.ProtectionContainerMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.ProtectionContainerMappingCollectionIterator, err error) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainerMappingCollectionPage, err error) + ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainerMappingCollectionIterator, err error) Purge(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result siterecovery.ReplicationProtectionContainerMappingsPurgeFuture, err error) Update(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, updateInput siterecovery.UpdateProtectionContainerMappingInput) (result siterecovery.ReplicationProtectionContainerMappingsUpdateFuture, err error) } @@ -201,7 +222,9 @@ type ReplicationRecoveryServicesProvidersClientAPI interface { Delete(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture, err error) Get(ctx context.Context, fabricName string, providerName string) (result siterecovery.RecoveryServicesProvider, err error) List(ctx context.Context) (result siterecovery.RecoveryServicesProviderCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.RecoveryServicesProviderCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.RecoveryServicesProviderCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.RecoveryServicesProviderCollectionIterator, err error) Purge(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture, err error) RefreshProvider(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) } @@ -212,7 +235,9 @@ var _ ReplicationRecoveryServicesProvidersClientAPI = (*siterecovery.Replication type ReplicationStorageClassificationsClientAPI interface { Get(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassification, err error) List(ctx context.Context) (result siterecovery.StorageClassificationCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.StorageClassificationCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.StorageClassificationCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.StorageClassificationCollectionIterator, err error) } var _ ReplicationStorageClassificationsClientAPI = (*siterecovery.ReplicationStorageClassificationsClient)(nil) @@ -223,7 +248,9 @@ type ReplicationStorageClassificationMappingsClientAPI interface { Delete(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result siterecovery.ReplicationStorageClassificationMappingsDeleteFuture, err error) Get(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result siterecovery.StorageClassificationMapping, err error) List(ctx context.Context) (result siterecovery.StorageClassificationMappingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.StorageClassificationMappingCollectionIterator, err error) ListByReplicationStorageClassifications(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassificationMappingCollectionPage, err error) + ListByReplicationStorageClassificationsComplete(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassificationMappingCollectionIterator, err error) } var _ ReplicationStorageClassificationMappingsClientAPI = (*siterecovery.ReplicationStorageClassificationMappingsClient)(nil) @@ -234,7 +261,9 @@ type ReplicationvCentersClientAPI interface { Delete(ctx context.Context, fabricName string, vCenterName string) (result siterecovery.ReplicationvCentersDeleteFuture, err error) Get(ctx context.Context, fabricName string, vCenterName string) (result siterecovery.VCenter, err error) List(ctx context.Context) (result siterecovery.VCenterCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.VCenterCollectionIterator, err error) ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.VCenterCollectionPage, err error) + ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result siterecovery.VCenterCollectionIterator, err error) Update(ctx context.Context, fabricName string, vCenterName string, updateVCenterRequest siterecovery.UpdateVCenterRequest) (result siterecovery.ReplicationvCentersUpdateFuture, err error) } @@ -246,6 +275,7 @@ type ReplicationJobsClientAPI interface { Export(ctx context.Context, jobQueryParameter siterecovery.JobQueryParameter) (result siterecovery.ReplicationJobsExportFuture, err error) Get(ctx context.Context, jobName string) (result siterecovery.Job, err error) List(ctx context.Context, filter string) (result siterecovery.JobCollectionPage, err error) + ListComplete(ctx context.Context, filter string) (result siterecovery.JobCollectionIterator, err error) Restart(ctx context.Context, jobName string) (result siterecovery.ReplicationJobsRestartFuture, err error) Resume(ctx context.Context, jobName string, resumeJobParams siterecovery.ResumeJobParams) (result siterecovery.ReplicationJobsResumeFuture, err error) } @@ -258,6 +288,7 @@ type ReplicationPoliciesClientAPI interface { Delete(ctx context.Context, policyName string) (result siterecovery.ReplicationPoliciesDeleteFuture, err error) Get(ctx context.Context, policyName string) (result siterecovery.Policy, err error) List(ctx context.Context) (result siterecovery.PolicyCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.PolicyCollectionIterator, err error) Update(ctx context.Context, policyName string, input siterecovery.UpdatePolicyInput) (result siterecovery.ReplicationPoliciesUpdateFuture, err error) } @@ -270,6 +301,7 @@ type ReplicationRecoveryPlansClientAPI interface { FailoverCommit(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansFailoverCommitFuture, err error) Get(ctx context.Context, recoveryPlanName string) (result siterecovery.RecoveryPlan, err error) List(ctx context.Context) (result siterecovery.RecoveryPlanCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.RecoveryPlanCollectionIterator, err error) PlannedFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanPlannedFailoverInput) (result siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture, err error) Reprotect(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansReprotectFuture, err error) TestFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanTestFailoverInput) (result siterecovery.ReplicationRecoveryPlansTestFailoverFuture, err error) @@ -300,6 +332,7 @@ type ReplicationVaultSettingClientAPI interface { Create(ctx context.Context, vaultSettingName string, input siterecovery.VaultSettingCreationInput) (result siterecovery.VaultSetting, err error) Get(ctx context.Context, vaultSettingName string) (result siterecovery.VaultSetting, err error) List(ctx context.Context) (result siterecovery.VaultSettingCollectionPage, err error) + ListComplete(ctx context.Context) (result siterecovery.VaultSettingCollectionIterator, err error) } var _ ReplicationVaultSettingClientAPI = (*siterecovery.ReplicationVaultSettingClient)(nil) diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/supportedoperatingsystems.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/supportedoperatingsystems.go index b040cea555fd..8a6a0333aec7 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/supportedoperatingsystems.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/supportedoperatingsystems.go @@ -35,7 +35,9 @@ func NewSupportedOperatingSystemsClient(subscriptionID string, resourceGroupName return NewSupportedOperatingSystemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewSupportedOperatingSystemsClientWithBaseURI creates an instance of the SupportedOperatingSystemsClient client. +// NewSupportedOperatingSystemsClientWithBaseURI creates an instance of the SupportedOperatingSystemsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewSupportedOperatingSystemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) SupportedOperatingSystemsClient { return SupportedOperatingSystemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/targetcomputesizes.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/targetcomputesizes.go index cff329f97ac1..0e7944622850 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/targetcomputesizes.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/targetcomputesizes.go @@ -35,7 +35,9 @@ func NewTargetComputeSizesClient(subscriptionID string, resourceGroupName string return NewTargetComputeSizesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) } -// NewTargetComputeSizesClientWithBaseURI creates an instance of the TargetComputeSizesClient client. +// NewTargetComputeSizesClientWithBaseURI creates an instance of the TargetComputeSizesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTargetComputeSizesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) TargetComputeSizesClient { return TargetComputeSizesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/backupapi/interfaces.go b/services/recoveryservices/mgmt/2019-05-13/backup/backupapi/interfaces.go index 4ee451609fcf..ca8cad292e2d 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/backupapi/interfaces.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/backupapi/interfaces.go @@ -51,6 +51,7 @@ var _ ProtectedItemOperationResultsClientAPI = (*backup.ProtectedItemOperationRe type RecoveryPointsClientAPI interface { Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result backup.RecoveryPointResource, err error) List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.RecoveryPointResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.RecoveryPointResourceListIterator, err error) } var _ RecoveryPointsClientAPI = (*backup.RecoveryPointsClient)(nil) @@ -65,6 +66,7 @@ var _ RestoresClientAPI = (*backup.RestoresClient)(nil) // PoliciesClientAPI contains the set of methods on the PoliciesClient type. type PoliciesClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionPolicyResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionPolicyResourceListIterator, err error) } var _ PoliciesClientAPI = (*backup.PoliciesClient)(nil) @@ -88,6 +90,7 @@ var _ ProtectionPolicyOperationResultsClientAPI = (*backup.ProtectionPolicyOpera // JobsClientAPI contains the set of methods on the JobsClient type. type JobsClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.JobResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.JobResourceListIterator, err error) } var _ JobsClientAPI = (*backup.JobsClient)(nil) @@ -130,6 +133,7 @@ var _ JobsGroupClientAPI = (*backup.JobsGroupClient)(nil) // ProtectedItemsGroupClientAPI contains the set of methods on the ProtectedItemsGroupClient type. type ProtectedItemsGroupClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectedItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectedItemResourceListIterator, err error) } var _ ProtectedItemsGroupClientAPI = (*backup.ProtectedItemsGroupClient)(nil) @@ -168,6 +172,7 @@ var _ FeatureSupportClientAPI = (*backup.FeatureSupportClient)(nil) // ProtectionIntentGroupClientAPI contains the set of methods on the ProtectionIntentGroupClient type. type ProtectionIntentGroupClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectionIntentResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectionIntentResourceListIterator, err error) } var _ ProtectionIntentGroupClientAPI = (*backup.ProtectionIntentGroupClient)(nil) @@ -183,6 +188,7 @@ var _ UsageSummariesClientAPI = (*backup.UsageSummariesClient)(nil) type EnginesClientAPI interface { Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result backup.EngineBaseResource, err error) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListIterator, err error) } var _ EnginesClientAPI = (*backup.EnginesClient)(nil) @@ -197,6 +203,7 @@ var _ ProtectionContainerRefreshOperationResultsClientAPI = (*backup.ProtectionC // ProtectableContainersClientAPI contains the set of methods on the ProtectableContainersClient type. type ProtectableContainersClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListIterator, err error) } var _ ProtectableContainersClientAPI = (*backup.ProtectableContainersClient)(nil) @@ -215,6 +222,7 @@ var _ ProtectionContainersClientAPI = (*backup.ProtectionContainersClient)(nil) // WorkloadItemsClientAPI contains the set of methods on the WorkloadItemsClient type. type WorkloadItemsClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListIterator, err error) } var _ WorkloadItemsClientAPI = (*backup.WorkloadItemsClient)(nil) @@ -272,6 +280,7 @@ var _ ProtectionPolicyOperationStatusesClientAPI = (*backup.ProtectionPolicyOper // ProtectableItemsClientAPI contains the set of methods on the ProtectableItemsClient type. type ProtectableItemsClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListIterator, err error) } var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) @@ -279,6 +288,7 @@ var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) // ProtectionContainersGroupClientAPI contains the set of methods on the ProtectionContainersGroupClient type. type ProtectionContainersGroupClientAPI interface { List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListIterator, err error) } var _ ProtectionContainersGroupClientAPI = (*backup.ProtectionContainersGroupClient)(nil) @@ -302,6 +312,7 @@ var _ ResourceStorageConfigsClientAPI = (*backup.ResourceStorageConfigsClient)(n // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result backup.ClientDiscoveryResponsePage, err error) + ListComplete(ctx context.Context) (result backup.ClientDiscoveryResponseIterator, err error) } var _ OperationsClientAPI = (*backup.OperationsClient)(nil) diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/backups.go b/services/recoveryservices/mgmt/2019-05-13/backup/backups.go index a8efbd3c56ba..2a389bc1f90f 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/backups.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/backups.go @@ -35,7 +35,8 @@ func NewBackupsClient(subscriptionID string) BackupsClient { return NewBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupsClientWithBaseURI creates an instance of the BackupsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/client.go b/services/recoveryservices/mgmt/2019-05-13/backup/client.go index 46ea059ebaf8..ee93a5b9b32b 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/client.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/engines.go b/services/recoveryservices/mgmt/2019-05-13/backup/engines.go index b12a52d19b6c..fc9aa41d61e5 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/engines.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/engines.go @@ -35,7 +35,8 @@ func NewEnginesClient(subscriptionID string) EnginesClient { return NewEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client. +// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEnginesClientWithBaseURI(baseURI string, subscriptionID string) EnginesClient { return EnginesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/exportjobsoperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/exportjobsoperationresults.go index 18c3bc00319a..20baa3e1a1ee 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/exportjobsoperationresults.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/exportjobsoperationresults.go @@ -35,7 +35,9 @@ func NewExportJobsOperationResultsClient(subscriptionID string) ExportJobsOperat return NewExportJobsOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the ExportJobsOperationResultsClient client. +// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the ExportJobsOperationResultsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewExportJobsOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsOperationResultsClient { return ExportJobsOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/featuresupport.go b/services/recoveryservices/mgmt/2019-05-13/backup/featuresupport.go index 6f7d732b6e93..92881d841fd9 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/featuresupport.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/featuresupport.go @@ -35,7 +35,8 @@ func NewFeatureSupportClient(subscriptionID string) FeatureSupportClient { return NewFeatureSupportClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFeatureSupportClientWithBaseURI creates an instance of the FeatureSupportClient client. +// NewFeatureSupportClientWithBaseURI creates an instance of the FeatureSupportClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFeatureSupportClientWithBaseURI(baseURI string, subscriptionID string) FeatureSupportClient { return FeatureSupportClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/itemlevelrecoveryconnections.go b/services/recoveryservices/mgmt/2019-05-13/backup/itemlevelrecoveryconnections.go index bfde3e76ee52..d6ba8b5e4037 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/itemlevelrecoveryconnections.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/itemlevelrecoveryconnections.go @@ -36,7 +36,8 @@ func NewItemLevelRecoveryConnectionsClient(subscriptionID string) ItemLevelRecov } // NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the ItemLevelRecoveryConnectionsClient -// 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 NewItemLevelRecoveryConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ItemLevelRecoveryConnectionsClient { return ItemLevelRecoveryConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/jobcancellations.go b/services/recoveryservices/mgmt/2019-05-13/backup/jobcancellations.go index 406e01345970..8bb1babb2581 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/jobcancellations.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/jobcancellations.go @@ -35,7 +35,9 @@ func NewJobCancellationsClient(subscriptionID string) JobCancellationsClient { return NewJobCancellationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCancellationsClientWithBaseURI creates an instance of the JobCancellationsClient client. +// NewJobCancellationsClientWithBaseURI creates an instance of the JobCancellationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewJobCancellationsClientWithBaseURI(baseURI string, subscriptionID string) JobCancellationsClient { return JobCancellationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/jobdetails.go b/services/recoveryservices/mgmt/2019-05-13/backup/jobdetails.go index 3a1c4bb385f1..4395dd59a3c2 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/jobdetails.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/jobdetails.go @@ -35,7 +35,8 @@ func NewJobDetailsClient(subscriptionID string) JobDetailsClient { return NewJobDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient client. +// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobDetailsClientWithBaseURI(baseURI string, subscriptionID string) JobDetailsClient { return JobDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/joboperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/joboperationresults.go index 89b5865ac595..72c63dbbd2e4 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/joboperationresults.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/joboperationresults.go @@ -35,7 +35,9 @@ func NewJobOperationResultsClient(subscriptionID string) JobOperationResultsClie return NewJobOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobOperationResultsClientWithBaseURI creates an instance of the JobOperationResultsClient client. +// NewJobOperationResultsClientWithBaseURI creates an instance of the JobOperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewJobOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) JobOperationResultsClient { return JobOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/jobs.go b/services/recoveryservices/mgmt/2019-05-13/backup/jobs.go index e371ecfb1e01..750077af8d1d 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/jobs.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/jobs.go @@ -35,7 +35,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/jobsgroup.go b/services/recoveryservices/mgmt/2019-05-13/backup/jobsgroup.go index 338edb73f8e9..7127ad9a597d 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/jobsgroup.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/jobsgroup.go @@ -35,7 +35,8 @@ func NewJobsGroupClient(subscriptionID string) JobsGroupClient { return NewJobsGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsGroupClientWithBaseURI creates an instance of the JobsGroupClient client. +// NewJobsGroupClientWithBaseURI creates an instance of the JobsGroupClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobsGroupClientWithBaseURI(baseURI string, subscriptionID string) JobsGroupClient { return JobsGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/operation.go b/services/recoveryservices/mgmt/2019-05-13/backup/operation.go index dc66321c1f6c..26f04ada6cc7 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/operation.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/operation.go @@ -35,7 +35,8 @@ func NewOperationClient(subscriptionID string) OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string, subscriptionID string) OperationClient { return OperationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/operationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/operationresults.go index e82ace5af78d..4b9e75433bb0 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/operationresults.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/operationresults.go @@ -35,7 +35,9 @@ func NewOperationResultsClient(subscriptionID string) OperationResultsClient { return NewOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client. +// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) OperationResultsClient { return OperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/operations.go b/services/recoveryservices/mgmt/2019-05-13/backup/operations.go index 53f59482812e..188a37bf8c15 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/operations.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/operationstatuses.go b/services/recoveryservices/mgmt/2019-05-13/backup/operationstatuses.go index b5c7ef6eebff..c8c1b383eb8e 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/operationstatuses.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/operationstatuses.go @@ -35,7 +35,9 @@ func NewOperationStatusesClient(subscriptionID string) OperationStatusesClient { return NewOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client. +// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusesClient { return OperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/policies.go b/services/recoveryservices/mgmt/2019-05-13/backup/policies.go index ac93925c96c9..ea3b37bdba2a 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/policies.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/policies.go @@ -35,7 +35,8 @@ func NewPoliciesClient(subscriptionID string) PoliciesClient { return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client. +// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient { return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectablecontainers.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectablecontainers.go index 0467090aa353..6340a1c1fd61 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectablecontainers.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectablecontainers.go @@ -35,7 +35,9 @@ func NewProtectableContainersClient(subscriptionID string) ProtectableContainers return NewProtectableContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectableContainersClientWithBaseURI creates an instance of the ProtectableContainersClient client. +// NewProtectableContainersClientWithBaseURI creates an instance of the ProtectableContainersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewProtectableContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectableContainersClient { return ProtectableContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectableitems.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectableitems.go index 18b8d7f3f683..137522a855fb 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectableitems.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectableitems.go @@ -35,7 +35,9 @@ func NewProtectableItemsClient(subscriptionID string) ProtectableItemsClient { return NewProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client. +// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectableItemsClient { return ProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationresults.go index 956a7ccb55e4..2f8c59afd361 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationresults.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationresults.go @@ -36,7 +36,8 @@ func NewProtectedItemOperationResultsClient(subscriptionID string) ProtectedItem } // NewProtectedItemOperationResultsClientWithBaseURI creates an instance of the ProtectedItemOperationResultsClient -// 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 NewProtectedItemOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationResultsClient { return ProtectedItemOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationstatuses.go b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationstatuses.go index 5f5153a60b4f..2c488d23be42 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationstatuses.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationstatuses.go @@ -36,7 +36,8 @@ func NewProtectedItemOperationStatusesClient(subscriptionID string) ProtectedIte } // NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of the ProtectedItemOperationStatusesClient -// 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 NewProtectedItemOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationStatusesClient { return ProtectedItemOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditems.go b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditems.go index 9c50fa811d38..6596587fc467 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditems.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditems.go @@ -35,7 +35,8 @@ func NewProtectedItemsClient(subscriptionID string) ProtectedItemsClient { return NewProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectedItemsClientWithBaseURI creates an instance of the ProtectedItemsClient client. +// NewProtectedItemsClientWithBaseURI creates an instance of the ProtectedItemsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemsClient { return ProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemsgroup.go b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemsgroup.go index 0003d05eb5ed..6f016aaeb02d 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemsgroup.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemsgroup.go @@ -35,7 +35,9 @@ func NewProtectedItemsGroupClient(subscriptionID string) ProtectedItemsGroupClie return NewProtectedItemsGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectedItemsGroupClientWithBaseURI creates an instance of the ProtectedItemsGroupClient client. +// NewProtectedItemsGroupClientWithBaseURI creates an instance of the ProtectedItemsGroupClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectedItemsGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemsGroupClient { return ProtectedItemsGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontaineroperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontaineroperationresults.go index 7509f1f533a5..6e8533cf1194 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontaineroperationresults.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontaineroperationresults.go @@ -37,7 +37,8 @@ func NewProtectionContainerOperationResultsClient(subscriptionID string) Protect } // NewProtectionContainerOperationResultsClientWithBaseURI creates an instance of the -// ProtectionContainerOperationResultsClient client. +// ProtectionContainerOperationResultsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionContainerOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerOperationResultsClient { return ProtectionContainerOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainerrefreshoperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainerrefreshoperationresults.go index 423b836635c3..5fde7c63f5c0 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainerrefreshoperationresults.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainerrefreshoperationresults.go @@ -37,7 +37,8 @@ func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string) } // NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an instance of the -// ProtectionContainerRefreshOperationResultsClient client. +// ProtectionContainerRefreshOperationResultsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionContainerRefreshOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerRefreshOperationResultsClient { return ProtectionContainerRefreshOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainers.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainers.go index 60649b4cbfc0..7c40fe0d2cc9 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainers.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainers.go @@ -35,7 +35,9 @@ func NewProtectionContainersClient(subscriptionID string) ProtectionContainersCl return NewProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client. +// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersClient { return ProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainersgroup.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainersgroup.go index 5895c5e0db01..7d6de9dcfcea 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainersgroup.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainersgroup.go @@ -35,7 +35,9 @@ func NewProtectionContainersGroupClient(subscriptionID string) ProtectionContain return NewProtectionContainersGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainersGroupClientWithBaseURI creates an instance of the ProtectionContainersGroupClient client. +// NewProtectionContainersGroupClientWithBaseURI creates an instance of the ProtectionContainersGroupClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProtectionContainersGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersGroupClient { return ProtectionContainersGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionintent.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionintent.go index b7bdac33115b..13ebf02ea8fc 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectionintent.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionintent.go @@ -35,7 +35,9 @@ func NewProtectionIntentClient(subscriptionID string) ProtectionIntentClient { return NewProtectionIntentClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionIntentClientWithBaseURI creates an instance of the ProtectionIntentClient client. +// NewProtectionIntentClientWithBaseURI creates an instance of the ProtectionIntentClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionIntentClientWithBaseURI(baseURI string, subscriptionID string) ProtectionIntentClient { return ProtectionIntentClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionintentgroup.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionintentgroup.go index a94ebda293ae..8dd9d8768722 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectionintentgroup.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionintentgroup.go @@ -35,7 +35,9 @@ func NewProtectionIntentGroupClient(subscriptionID string) ProtectionIntentGroup return NewProtectionIntentGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionIntentGroupClientWithBaseURI creates an instance of the ProtectionIntentGroupClient client. +// NewProtectionIntentGroupClientWithBaseURI creates an instance of the ProtectionIntentGroupClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewProtectionIntentGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionIntentGroupClient { return ProtectionIntentGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicies.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicies.go index 83f2afa24f43..8adbc8243fa8 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicies.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicies.go @@ -35,7 +35,9 @@ func NewProtectionPoliciesClient(subscriptionID string) ProtectionPoliciesClient return NewProtectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client. +// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPoliciesClient { return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationresults.go index 4f004b44d86f..99e395cb23ea 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationresults.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationresults.go @@ -36,7 +36,8 @@ func NewProtectionPolicyOperationResultsClient(subscriptionID string) Protection } // NewProtectionPolicyOperationResultsClientWithBaseURI creates an instance of the -// ProtectionPolicyOperationResultsClient client. +// ProtectionPolicyOperationResultsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionPolicyOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationResultsClient { return ProtectionPolicyOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationstatuses.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationstatuses.go index ac06686b3816..e22d4d8ed8be 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationstatuses.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationstatuses.go @@ -37,7 +37,8 @@ func NewProtectionPolicyOperationStatusesClient(subscriptionID string) Protectio } // NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the -// ProtectionPolicyOperationStatusesClient client. +// ProtectionPolicyOperationStatusesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient { return ProtectionPolicyOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/recoverypoints.go b/services/recoveryservices/mgmt/2019-05-13/backup/recoverypoints.go index 52e2f8698015..a376ad1e3b25 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/recoverypoints.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/recoverypoints.go @@ -35,7 +35,8 @@ func NewRecoveryPointsClient(subscriptionID string) RecoveryPointsClient { return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client. +// 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)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/resourcestorageconfigs.go b/services/recoveryservices/mgmt/2019-05-13/backup/resourcestorageconfigs.go index ef3d82a86cd9..cdbfd329774b 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/resourcestorageconfigs.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/resourcestorageconfigs.go @@ -35,7 +35,9 @@ func NewResourceStorageConfigsClient(subscriptionID string) ResourceStorageConfi return NewResourceStorageConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceStorageConfigsClientWithBaseURI creates an instance of the ResourceStorageConfigsClient client. +// NewResourceStorageConfigsClientWithBaseURI creates an instance of the ResourceStorageConfigsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceStorageConfigsClientWithBaseURI(baseURI string, subscriptionID string) ResourceStorageConfigsClient { return ResourceStorageConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/resourcevaultconfigs.go b/services/recoveryservices/mgmt/2019-05-13/backup/resourcevaultconfigs.go index be1d140227b9..58a49e322e20 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/resourcevaultconfigs.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/resourcevaultconfigs.go @@ -35,7 +35,9 @@ func NewResourceVaultConfigsClient(subscriptionID string) ResourceVaultConfigsCl return NewResourceVaultConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceVaultConfigsClientWithBaseURI creates an instance of the ResourceVaultConfigsClient client. +// NewResourceVaultConfigsClientWithBaseURI creates an instance of the ResourceVaultConfigsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewResourceVaultConfigsClientWithBaseURI(baseURI string, subscriptionID string) ResourceVaultConfigsClient { return ResourceVaultConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/restores.go b/services/recoveryservices/mgmt/2019-05-13/backup/restores.go index ae81caf616b1..09dbfea0e029 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/restores.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/restores.go @@ -35,7 +35,8 @@ func NewRestoresClient(subscriptionID string) RestoresClient { return NewRestoresClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestoresClientWithBaseURI creates an instance of the RestoresClient client. +// NewRestoresClientWithBaseURI creates an instance of the RestoresClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRestoresClientWithBaseURI(baseURI string, subscriptionID string) RestoresClient { return RestoresClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/securitypins.go b/services/recoveryservices/mgmt/2019-05-13/backup/securitypins.go index 281905c96c53..c34b255d99fd 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/securitypins.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/securitypins.go @@ -35,7 +35,8 @@ func NewSecurityPINsClient(subscriptionID string) SecurityPINsClient { return NewSecurityPINsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client. +// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecurityPINsClientWithBaseURI(baseURI string, subscriptionID string) SecurityPINsClient { return SecurityPINsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/status.go b/services/recoveryservices/mgmt/2019-05-13/backup/status.go index 65843f448fc1..c0cf0a6839a1 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/status.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/status.go @@ -35,7 +35,8 @@ func NewStatusClient(subscriptionID string) StatusClient { return NewStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStatusClientWithBaseURI creates an instance of the StatusClient client. +// NewStatusClientWithBaseURI creates an instance of the StatusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStatusClientWithBaseURI(baseURI string, subscriptionID string) StatusClient { return StatusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/usagesummaries.go b/services/recoveryservices/mgmt/2019-05-13/backup/usagesummaries.go index f671a15223ae..6f8638ddb749 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/usagesummaries.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/usagesummaries.go @@ -35,7 +35,8 @@ func NewUsageSummariesClient(subscriptionID string) UsageSummariesClient { return NewUsageSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageSummariesClientWithBaseURI creates an instance of the UsageSummariesClient client. +// NewUsageSummariesClientWithBaseURI creates an instance of the UsageSummariesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageSummariesClientWithBaseURI(baseURI string, subscriptionID string) UsageSummariesClient { return UsageSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/workloaditems.go b/services/recoveryservices/mgmt/2019-05-13/backup/workloaditems.go index 8523e8ce4bb6..b5585cf4ea5f 100644 --- a/services/recoveryservices/mgmt/2019-05-13/backup/workloaditems.go +++ b/services/recoveryservices/mgmt/2019-05-13/backup/workloaditems.go @@ -35,7 +35,8 @@ func NewWorkloadItemsClient(subscriptionID string) WorkloadItemsClient { return NewWorkloadItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkloadItemsClientWithBaseURI creates an instance of the WorkloadItemsClient client. +// NewWorkloadItemsClientWithBaseURI creates an instance of the WorkloadItemsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkloadItemsClientWithBaseURI(baseURI string, subscriptionID string) WorkloadItemsClient { return WorkloadItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/backupapi/interfaces.go b/services/recoveryservices/mgmt/2019-06-15/backup/backupapi/interfaces.go new file mode 100644 index 000000000000..7b20b6a876fb --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/backupapi/interfaces.go @@ -0,0 +1,318 @@ +package backupapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-06-15/backup" + "github.com/Azure/go-autorest/autorest" +) + +// ResourceVaultConfigsClientAPI contains the set of methods on the ResourceVaultConfigsClient type. +type ResourceVaultConfigsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string) (result backup.ResourceVaultConfigResource, err error) + Update(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.ResourceVaultConfigResource) (result backup.ResourceVaultConfigResource, err error) +} + +var _ ResourceVaultConfigsClientAPI = (*backup.ResourceVaultConfigsClient)(nil) + +// ProtectedItemsClientAPI contains the set of methods on the ProtectedItemsClient type. +type ProtectedItemsClientAPI interface { + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters backup.ProtectedItemResource) (result backup.ProtectedItemResource, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string) (result autorest.Response, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.ProtectedItemResource, err error) +} + +var _ ProtectedItemsClientAPI = (*backup.ProtectedItemsClient)(nil) + +// ProtectedItemOperationResultsClientAPI contains the set of methods on the ProtectedItemOperationResultsClient type. +type ProtectedItemOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result backup.ProtectedItemResource, err error) +} + +var _ ProtectedItemOperationResultsClientAPI = (*backup.ProtectedItemOperationResultsClient)(nil) + +// RecoveryPointsClientAPI contains the set of methods on the RecoveryPointsClient type. +type RecoveryPointsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result backup.RecoveryPointResource, err error) + List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.RecoveryPointResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.RecoveryPointResourceListIterator, err error) +} + +var _ RecoveryPointsClientAPI = (*backup.RecoveryPointsClient)(nil) + +// RestoresClientAPI contains the set of methods on the RestoresClient type. +type RestoresClientAPI interface { + Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters backup.RestoreRequestResource) (result autorest.Response, err error) +} + +var _ RestoresClientAPI = (*backup.RestoresClient)(nil) + +// PoliciesClientAPI contains the set of methods on the PoliciesClient type. +type PoliciesClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionPolicyResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionPolicyResourceListIterator, err error) +} + +var _ PoliciesClientAPI = (*backup.PoliciesClient)(nil) + +// ProtectionPoliciesClientAPI contains the set of methods on the ProtectionPoliciesClient type. +type ProtectionPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters backup.ProtectionPolicyResource) (result backup.ProtectionPolicyResource, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result autorest.Response, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result backup.ProtectionPolicyResource, err error) +} + +var _ ProtectionPoliciesClientAPI = (*backup.ProtectionPoliciesClient)(nil) + +// ProtectionPolicyOperationResultsClientAPI contains the set of methods on the ProtectionPolicyOperationResultsClient type. +type ProtectionPolicyOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result backup.ProtectionPolicyResource, err error) +} + +var _ ProtectionPolicyOperationResultsClientAPI = (*backup.ProtectionPolicyOperationResultsClient)(nil) + +// JobsClientAPI contains the set of methods on the JobsClient type. +type JobsClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.JobResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.JobResourceListIterator, err error) +} + +var _ JobsClientAPI = (*backup.JobsClient)(nil) + +// JobDetailsClientAPI contains the set of methods on the JobDetailsClient type. +type JobDetailsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (result backup.JobResource, err error) +} + +var _ JobDetailsClientAPI = (*backup.JobDetailsClient)(nil) + +// JobCancellationsClientAPI contains the set of methods on the JobCancellationsClient type. +type JobCancellationsClientAPI interface { + Trigger(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (result autorest.Response, err error) +} + +var _ JobCancellationsClientAPI = (*backup.JobCancellationsClient)(nil) + +// JobOperationResultsClientAPI contains the set of methods on the JobOperationResultsClient type. +type JobOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string) (result autorest.Response, err error) +} + +var _ JobOperationResultsClientAPI = (*backup.JobOperationResultsClient)(nil) + +// ExportJobsOperationResultsClientAPI contains the set of methods on the ExportJobsOperationResultsClient type. +type ExportJobsOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result backup.OperationResultInfoBaseResource, err error) +} + +var _ ExportJobsOperationResultsClientAPI = (*backup.ExportJobsOperationResultsClient)(nil) + +// JobsGroupClientAPI contains the set of methods on the JobsGroupClient type. +type JobsGroupClientAPI interface { + Export(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result autorest.Response, err error) +} + +var _ JobsGroupClientAPI = (*backup.JobsGroupClient)(nil) + +// ProtectedItemsGroupClientAPI contains the set of methods on the ProtectedItemsGroupClient type. +type ProtectedItemsGroupClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectedItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectedItemResourceListIterator, err error) +} + +var _ ProtectedItemsGroupClientAPI = (*backup.ProtectedItemsGroupClient)(nil) + +// OperationClientAPI contains the set of methods on the OperationClient type. +type OperationClientAPI interface { + Validate(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.BasicValidateOperationRequest) (result backup.ValidateOperationsResponse, err error) +} + +var _ OperationClientAPI = (*backup.OperationClient)(nil) + +// ProtectionIntentClientAPI contains the set of methods on the ProtectionIntentClient type. +type ProtectionIntentClientAPI interface { + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters backup.ProtectionIntentResource) (result backup.ProtectionIntentResource, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (result autorest.Response, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (result backup.ProtectionIntentResource, err error) + Validate(ctx context.Context, azureRegion string, parameters backup.PreValidateEnableBackupRequest) (result backup.PreValidateEnableBackupResponse, err error) +} + +var _ ProtectionIntentClientAPI = (*backup.ProtectionIntentClient)(nil) + +// StatusClientAPI contains the set of methods on the StatusClient type. +type StatusClientAPI interface { + Get(ctx context.Context, azureRegion string, parameters backup.StatusRequest) (result backup.StatusResponse, err error) +} + +var _ StatusClientAPI = (*backup.StatusClient)(nil) + +// FeatureSupportClientAPI contains the set of methods on the FeatureSupportClient type. +type FeatureSupportClientAPI interface { + Validate(ctx context.Context, azureRegion string, parameters backup.BasicFeatureSupportRequest) (result backup.AzureVMResourceFeatureSupportResponse, err error) +} + +var _ FeatureSupportClientAPI = (*backup.FeatureSupportClient)(nil) + +// ProtectionIntentGroupClientAPI contains the set of methods on the ProtectionIntentGroupClient type. +type ProtectionIntentGroupClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectionIntentResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectionIntentResourceListIterator, err error) +} + +var _ ProtectionIntentGroupClientAPI = (*backup.ProtectionIntentGroupClient)(nil) + +// UsageSummariesClientAPI contains the set of methods on the UsageSummariesClient type. +type UsageSummariesClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ManagementUsageList, err error) +} + +var _ UsageSummariesClientAPI = (*backup.UsageSummariesClient)(nil) + +// EnginesClientAPI contains the set of methods on the EnginesClient type. +type EnginesClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result backup.EngineBaseResource, err error) + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListIterator, err error) +} + +var _ EnginesClientAPI = (*backup.EnginesClient)(nil) + +// ProtectionContainerRefreshOperationResultsClientAPI contains the set of methods on the ProtectionContainerRefreshOperationResultsClient type. +type ProtectionContainerRefreshOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string) (result autorest.Response, err error) +} + +var _ ProtectionContainerRefreshOperationResultsClientAPI = (*backup.ProtectionContainerRefreshOperationResultsClient)(nil) + +// ProtectableContainersClientAPI contains the set of methods on the ProtectableContainersClient type. +type ProtectableContainersClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListIterator, err error) +} + +var _ ProtectableContainersClientAPI = (*backup.ProtectableContainersClient)(nil) + +// ProtectionContainersClientAPI contains the set of methods on the ProtectionContainersClient type. +type ProtectionContainersClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (result backup.ProtectionContainerResource, err error) + Inquire(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string) (result autorest.Response, err error) + Refresh(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result autorest.Response, err error) + Register(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters backup.ProtectionContainerResource) (result backup.ProtectionContainerResource, err error) + Unregister(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (result autorest.Response, err error) +} + +var _ ProtectionContainersClientAPI = (*backup.ProtectionContainersClient)(nil) + +// WorkloadItemsClientAPI contains the set of methods on the WorkloadItemsClient type. +type WorkloadItemsClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListIterator, err error) +} + +var _ WorkloadItemsClientAPI = (*backup.WorkloadItemsClient)(nil) + +// ProtectionContainerOperationResultsClientAPI contains the set of methods on the ProtectionContainerOperationResultsClient type. +type ProtectionContainerOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string) (result backup.ProtectionContainerResource, err error) +} + +var _ ProtectionContainerOperationResultsClientAPI = (*backup.ProtectionContainerOperationResultsClient)(nil) + +// BackupsClientAPI contains the set of methods on the BackupsClient type. +type BackupsClientAPI interface { + Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters backup.RequestResource) (result autorest.Response, err error) +} + +var _ BackupsClientAPI = (*backup.BackupsClient)(nil) + +// ProtectedItemOperationStatusesClientAPI contains the set of methods on the ProtectedItemOperationStatusesClient type. +type ProtectedItemOperationStatusesClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result backup.OperationStatus, err error) +} + +var _ ProtectedItemOperationStatusesClientAPI = (*backup.ProtectedItemOperationStatusesClient)(nil) + +// ItemLevelRecoveryConnectionsClientAPI contains the set of methods on the ItemLevelRecoveryConnectionsClient type. +type ItemLevelRecoveryConnectionsClientAPI interface { + Provision(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters backup.ILRRequestResource) (result autorest.Response, err error) + Revoke(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result autorest.Response, err error) +} + +var _ ItemLevelRecoveryConnectionsClientAPI = (*backup.ItemLevelRecoveryConnectionsClient)(nil) + +// OperationResultsClientAPI contains the set of methods on the OperationResultsClient type. +type OperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result autorest.Response, err error) +} + +var _ OperationResultsClientAPI = (*backup.OperationResultsClient)(nil) + +// OperationStatusesClientAPI contains the set of methods on the OperationStatusesClient type. +type OperationStatusesClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result backup.OperationStatus, err error) +} + +var _ OperationStatusesClientAPI = (*backup.OperationStatusesClient)(nil) + +// ProtectionPolicyOperationStatusesClientAPI contains the set of methods on the ProtectionPolicyOperationStatusesClient type. +type ProtectionPolicyOperationStatusesClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result backup.OperationStatus, err error) +} + +var _ ProtectionPolicyOperationStatusesClientAPI = (*backup.ProtectionPolicyOperationStatusesClient)(nil) + +// ProtectableItemsClientAPI contains the set of methods on the ProtectableItemsClient type. +type ProtectableItemsClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListIterator, err error) +} + +var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) + +// ProtectionContainersGroupClientAPI contains the set of methods on the ProtectionContainersGroupClient type. +type ProtectionContainersGroupClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListPage, err error) + ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListIterator, err error) +} + +var _ ProtectionContainersGroupClientAPI = (*backup.ProtectionContainersGroupClient)(nil) + +// SecurityPINsClientAPI contains the set of methods on the SecurityPINsClient type. +type SecurityPINsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string) (result backup.TokenInformation, err error) +} + +var _ SecurityPINsClientAPI = (*backup.SecurityPINsClient)(nil) + +// ResourceStorageConfigsClientAPI contains the set of methods on the ResourceStorageConfigsClient type. +type ResourceStorageConfigsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string) (result backup.ResourceConfigResource, err error) + Patch(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.ResourceConfigResource) (result autorest.Response, err error) + Update(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.ResourceConfigResource) (result backup.ResourceConfigResource, err error) +} + +var _ ResourceStorageConfigsClientAPI = (*backup.ResourceStorageConfigsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result backup.ClientDiscoveryResponsePage, err error) + ListComplete(ctx context.Context) (result backup.ClientDiscoveryResponseIterator, err error) +} + +var _ OperationsClientAPI = (*backup.OperationsClient)(nil) diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/backups.go b/services/recoveryservices/mgmt/2019-06-15/backup/backups.go new file mode 100644 index 000000000000..2a389bc1f90f --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/backups.go @@ -0,0 +1,128 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// BackupsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type BackupsClient struct { + BaseClient +} + +// NewBackupsClient creates an instance of the BackupsClient client. +func NewBackupsClient(subscriptionID string) BackupsClient { + return NewBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupsClientWithBaseURI creates an instance of the BackupsClient client 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)} +} + +// Trigger triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the +// operation, call GetProtectedItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backup item. +// containerName - container name associated with the backup item. +// protectedItemName - backup item for which backup needs to be triggered. +// parameters - resource backup request +func (client BackupsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters RequestResource) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.Trigger") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.TriggerPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.BackupsClient", "Trigger", nil, "Failure preparing request") + return + } + + resp, err := client.TriggerSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.BackupsClient", "Trigger", resp, "Failure sending request") + return + } + + result, err = client.TriggerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.BackupsClient", "Trigger", resp, "Failure responding to request") + } + + return +} + +// TriggerPreparer prepares the Trigger request. +func (client BackupsClient) TriggerPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters RequestResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TriggerSender sends the Trigger request. The method will close the +// http.Response Body if it receives an error. +func (client BackupsClient) TriggerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// TriggerResponder handles the response to the Trigger request. The method always +// closes the http.Response Body. +func (client BackupsClient) TriggerResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/client.go b/services/recoveryservices/mgmt/2019-06-15/backup/client.go new file mode 100644 index 000000000000..ee93a5b9b32b --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/client.go @@ -0,0 +1,52 @@ +// Package backup implements the Azure ARM Backup service API version . +// +// Open API 2.0 Specs for Azure RecoveryServices Backup service +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Backup + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Backup. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client 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/recoveryservices/mgmt/2019-06-15/backup/engines.go b/services/recoveryservices/mgmt/2019-06-15/backup/engines.go new file mode 100644 index 000000000000..fc9aa41d61e5 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/engines.go @@ -0,0 +1,252 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// EnginesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type EnginesClient struct { + BaseClient +} + +// NewEnginesClient creates an instance of the EnginesClient client. +func NewEnginesClient(subscriptionID string) EnginesClient { + return NewEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewEnginesClientWithBaseURI(baseURI string, subscriptionID string) EnginesClient { + return EnginesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get returns backup management server registered to Recovery Services Vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// backupEngineName - name of the backup management server. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client EnginesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result EngineBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnginesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, backupEngineName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client EnginesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupEngineName": autorest.Encode("path", backupEngineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client EnginesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client EnginesClient) GetResponder(resp *http.Response) (result EngineBaseResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client EnginesClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result EngineBaseResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnginesClient.List") + defer func() { + sc := -1 + if result.ebrl.Response.Response != nil { + sc = result.ebrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ebrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "List", resp, "Failure sending request") + return + } + + result.ebrl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client EnginesClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client EnginesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client EnginesClient) ListResponder(resp *http.Response) (result EngineBaseResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client EnginesClient) listNextResults(ctx context.Context, lastResults EngineBaseResourceList) (result EngineBaseResourceList, err error) { + req, err := lastResults.engineBaseResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.EnginesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.EnginesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client EnginesClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result EngineBaseResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnginesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter, skipToken) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/exportjobsoperationresults.go b/services/recoveryservices/mgmt/2019-06-15/backup/exportjobsoperationresults.go new file mode 100644 index 000000000000..b0fd8d037b93 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/exportjobsoperationresults.go @@ -0,0 +1,124 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ExportJobsOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ExportJobsOperationResultsClient struct { + BaseClient +} + +// NewExportJobsOperationResultsClient creates an instance of the ExportJobsOperationResultsClient client. +func NewExportJobsOperationResultsClient(subscriptionID string) ExportJobsOperationResultsClient { + return NewExportJobsOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the ExportJobsOperationResultsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewExportJobsOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsOperationResultsClient { + return ExportJobsOperationResultsClient{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: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// operationID - operationID which represents the export job. +func (client ExportJobsOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result OperationResultInfoBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExportJobsOperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ExportJobsOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ExportJobsOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ExportJobsOperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExportJobsOperationResultsClient) 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 = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/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 ExportJobsOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExportJobsOperationResultsClient) GetResponder(resp *http.Response) (result OperationResultInfoBaseResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/featuresupport.go b/services/recoveryservices/mgmt/2019-06-15/backup/featuresupport.go new file mode 100644 index 000000000000..92881d841fd9 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/featuresupport.go @@ -0,0 +1,120 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FeatureSupportClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type FeatureSupportClient struct { + BaseClient +} + +// NewFeatureSupportClient creates an instance of the FeatureSupportClient client. +func NewFeatureSupportClient(subscriptionID string) FeatureSupportClient { + return NewFeatureSupportClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFeatureSupportClientWithBaseURI creates an instance of the FeatureSupportClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewFeatureSupportClientWithBaseURI(baseURI string, subscriptionID string) FeatureSupportClient { + return FeatureSupportClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Validate sends the validate request. +// Parameters: +// azureRegion - azure region to hit Api +// parameters - feature support request object +func (client FeatureSupportClient) Validate(ctx context.Context, azureRegion string, parameters BasicFeatureSupportRequest) (result AzureVMResourceFeatureSupportResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FeatureSupportClient.Validate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ValidatePreparer(ctx, azureRegion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.FeatureSupportClient", "Validate", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.FeatureSupportClient", "Validate", resp, "Failure sending request") + return + } + + result, err = client.ValidateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.FeatureSupportClient", "Validate", resp, "Failure responding to request") + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client FeatureSupportClient) ValidatePreparer(ctx context.Context, azureRegion string, parameters BasicFeatureSupportRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureRegion": autorest.Encode("path", azureRegion), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client FeatureSupportClient) ValidateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client FeatureSupportClient) ValidateResponder(resp *http.Response) (result AzureVMResourceFeatureSupportResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/itemlevelrecoveryconnections.go b/services/recoveryservices/mgmt/2019-06-15/backup/itemlevelrecoveryconnections.go new file mode 100644 index 000000000000..d6ba8b5e4037 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/itemlevelrecoveryconnections.go @@ -0,0 +1,221 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ItemLevelRecoveryConnectionsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ItemLevelRecoveryConnectionsClient struct { + BaseClient +} + +// NewItemLevelRecoveryConnectionsClient creates an instance of the ItemLevelRecoveryConnectionsClient client. +func NewItemLevelRecoveryConnectionsClient(subscriptionID string) ItemLevelRecoveryConnectionsClient { + return NewItemLevelRecoveryConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the ItemLevelRecoveryConnectionsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewItemLevelRecoveryConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ItemLevelRecoveryConnectionsClient { + return ItemLevelRecoveryConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Provision provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a +// file +// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of +// provisioning, call GetProtectedItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up items. +// containerName - container name associated with the backed up items. +// protectedItemName - backed up item name whose files/folders are to be restored. +// recoveryPointID - recovery point ID which represents backed up data. iSCSI connection will be provisioned +// for this backed up data. +// parameters - resource ILR request +func (client ItemLevelRecoveryConnectionsClient) Provision(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ItemLevelRecoveryConnectionsClient.Provision") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ProvisionPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Provision", nil, "Failure preparing request") + return + } + + resp, err := client.ProvisionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Provision", resp, "Failure sending request") + return + } + + result, err = client.ProvisionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Provision", resp, "Failure responding to request") + } + + return +} + +// ProvisionPreparer prepares the Provision request. +func (client ItemLevelRecoveryConnectionsClient) ProvisionPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "recoveryPointId": autorest.Encode("path", recoveryPointID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ProvisionSender sends the Provision request. The method will close the +// http.Response Body if it receives an error. +func (client ItemLevelRecoveryConnectionsClient) ProvisionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ProvisionResponder handles the response to the Provision request. The method always +// closes the http.Response Body. +func (client ItemLevelRecoveryConnectionsClient) ProvisionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Revoke revokes an iSCSI connection which can be used to download a script. Executing this script opens a file +// explorer +// displaying all recoverable files and folders. This is an asynchronous operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up items. +// containerName - container name associated with the backed up items. +// protectedItemName - backed up item name whose files/folders are to be restored. +// recoveryPointID - recovery point ID which represents backed up data. iSCSI connection will be revoked for +// this backed up data. +func (client ItemLevelRecoveryConnectionsClient) Revoke(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ItemLevelRecoveryConnectionsClient.Revoke") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RevokePreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Revoke", nil, "Failure preparing request") + return + } + + resp, err := client.RevokeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Revoke", resp, "Failure sending request") + return + } + + result, err = client.RevokeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Revoke", resp, "Failure responding to request") + } + + return +} + +// RevokePreparer prepares the Revoke request. +func (client ItemLevelRecoveryConnectionsClient) RevokePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "recoveryPointId": autorest.Encode("path", recoveryPointID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RevokeSender sends the Revoke request. The method will close the +// http.Response Body if it receives an error. +func (client ItemLevelRecoveryConnectionsClient) RevokeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// RevokeResponder handles the response to the Revoke request. The method always +// closes the http.Response Body. +func (client ItemLevelRecoveryConnectionsClient) RevokeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/jobcancellations.go b/services/recoveryservices/mgmt/2019-06-15/backup/jobcancellations.go new file mode 100644 index 000000000000..61147c164b44 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/jobcancellations.go @@ -0,0 +1,122 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// JobCancellationsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type JobCancellationsClient struct { + BaseClient +} + +// NewJobCancellationsClient creates an instance of the JobCancellationsClient client. +func NewJobCancellationsClient(subscriptionID string) JobCancellationsClient { + return NewJobCancellationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewJobCancellationsClientWithBaseURI creates an instance of the JobCancellationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewJobCancellationsClientWithBaseURI(baseURI string, subscriptionID string) JobCancellationsClient { + return JobCancellationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Trigger cancels a job. This is an asynchronous operation. To know the status of the cancellation, call +// GetCancelOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// jobName - name of the job to cancel. +func (client JobCancellationsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobCancellationsClient.Trigger") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.TriggerPreparer(ctx, vaultName, resourceGroupName, jobName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobCancellationsClient", "Trigger", nil, "Failure preparing request") + return + } + + resp, err := client.TriggerSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.JobCancellationsClient", "Trigger", resp, "Failure sending request") + return + } + + result, err = client.TriggerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobCancellationsClient", "Trigger", resp, "Failure responding to request") + } + + return +} + +// TriggerPreparer prepares the Trigger request. +func (client JobCancellationsClient) TriggerPreparer(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jobName": autorest.Encode("path", jobName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel", 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 JobCancellationsClient) TriggerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// TriggerResponder handles the response to the Trigger request. The method always +// closes the http.Response Body. +func (client JobCancellationsClient) TriggerResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/jobdetails.go b/services/recoveryservices/mgmt/2019-06-15/backup/jobdetails.go new file mode 100644 index 000000000000..5e586acecdc1 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/jobdetails.go @@ -0,0 +1,121 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// JobDetailsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type JobDetailsClient struct { + BaseClient +} + +// NewJobDetailsClient creates an instance of the JobDetailsClient client. +func NewJobDetailsClient(subscriptionID string) JobDetailsClient { + return NewJobDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewJobDetailsClientWithBaseURI(baseURI string, subscriptionID string) JobDetailsClient { + return JobDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets extended information associated with the job. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// jobName - name of the job whose details are to be fetched. +func (client JobDetailsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (result JobResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobDetailsClient.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, jobName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobDetailsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.JobDetailsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobDetailsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client JobDetailsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jobName": autorest.Encode("path", jobName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client JobDetailsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client JobDetailsClient) GetResponder(resp *http.Response) (result JobResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/joboperationresults.go b/services/recoveryservices/mgmt/2019-06-15/backup/joboperationresults.go new file mode 100644 index 000000000000..1c3b83e0a088 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/joboperationresults.go @@ -0,0 +1,123 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// JobOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type JobOperationResultsClient struct { + BaseClient +} + +// NewJobOperationResultsClient creates an instance of the JobOperationResultsClient client. +func NewJobOperationResultsClient(subscriptionID string) JobOperationResultsClient { + return NewJobOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewJobOperationResultsClientWithBaseURI creates an instance of the JobOperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewJobOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) JobOperationResultsClient { + return JobOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches the result of any operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// jobName - job name whose operation result has to be fetched. +// operationID - operationID which represents the operation whose result has to be fetched. +func (client JobOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobOperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, jobName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.JobOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobOperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client JobOperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jobName": autorest.Encode("path", jobName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/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 JobOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client JobOperationResultsClient) GetResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/jobs.go b/services/recoveryservices/mgmt/2019-06-15/backup/jobs.go new file mode 100644 index 000000000000..9fb75355a0a3 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/jobs.go @@ -0,0 +1,165 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// JobsClient is the open API 2.0 Specs for Azure RecoveryServices Backup 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)} +} + +// List provides a pageable list of jobs. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client JobsClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result JobResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobsClient.List") + defer func() { + sc := -1 + if result.jrl.Response.Response != nil { + sc = result.jrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.jrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.JobsClient", "List", resp, "Failure sending request") + return + } + + result.jrl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client JobsClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client JobsClient) ListResponder(resp *http.Response) (result JobResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client JobsClient) listNextResults(ctx context.Context, lastResults JobResourceList) (result JobResourceList, err error) { + req, err := lastResults.jobResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.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, "backup.JobsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.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, vaultName string, resourceGroupName string, filter string, skipToken string) (result JobResourceListIterator, 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, vaultName, resourceGroupName, filter, skipToken) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/jobsgroup.go b/services/recoveryservices/mgmt/2019-06-15/backup/jobsgroup.go new file mode 100644 index 000000000000..9dbc1f3d7e44 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/jobsgroup.go @@ -0,0 +1,122 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// JobsGroupClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type JobsGroupClient struct { + BaseClient +} + +// NewJobsGroupClient creates an instance of the JobsGroupClient client. +func NewJobsGroupClient(subscriptionID string) JobsGroupClient { + return NewJobsGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewJobsGroupClientWithBaseURI creates an instance of the JobsGroupClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewJobsGroupClientWithBaseURI(baseURI string, subscriptionID string) JobsGroupClient { + return JobsGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Export triggers export of jobs specified by filters and returns an OperationID to track. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +func (client JobsGroupClient) Export(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobsGroupClient.Export") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ExportPreparer(ctx, vaultName, resourceGroupName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobsGroupClient", "Export", nil, "Failure preparing request") + return + } + + resp, err := client.ExportSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.JobsGroupClient", "Export", resp, "Failure sending request") + return + } + + result, err = client.ExportResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.JobsGroupClient", "Export", resp, "Failure responding to request") + } + + return +} + +// ExportPreparer prepares the Export request. +func (client JobsGroupClient) ExportPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport", 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 JobsGroupClient) ExportSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ExportResponder handles the response to the Export request. The method always +// closes the http.Response Body. +func (client JobsGroupClient) ExportResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/models.go b/services/recoveryservices/mgmt/2019-06-15/backup/models.go new file mode 100644 index 000000000000..c6f7ec3067df --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/models.go @@ -0,0 +1,21001 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-06-15/backup" + +// AzureFileShareType enumerates the values for azure file share type. +type AzureFileShareType string + +const ( + // Invalid ... + Invalid AzureFileShareType = "Invalid" + // XSMB ... + XSMB AzureFileShareType = "XSMB" + // XSync ... + XSync AzureFileShareType = "XSync" +) + +// PossibleAzureFileShareTypeValues returns an array of possible values for the AzureFileShareType const type. +func PossibleAzureFileShareTypeValues() []AzureFileShareType { + return []AzureFileShareType{Invalid, XSMB, XSync} +} + +// ContainerType enumerates the values for container type. +type ContainerType string + +const ( + // ContainerTypeAzureBackupServerContainer ... + ContainerTypeAzureBackupServerContainer ContainerType = "AzureBackupServerContainer" + // ContainerTypeAzureSQLContainer ... + ContainerTypeAzureSQLContainer ContainerType = "AzureSqlContainer" + // ContainerTypeCluster ... + ContainerTypeCluster ContainerType = "Cluster" + // ContainerTypeDPMContainer ... + ContainerTypeDPMContainer ContainerType = "DPMContainer" + // ContainerTypeGenericContainer ... + ContainerTypeGenericContainer ContainerType = "GenericContainer" + // ContainerTypeIaasVMContainer ... + ContainerTypeIaasVMContainer ContainerType = "IaasVMContainer" + // ContainerTypeIaasVMServiceContainer ... + ContainerTypeIaasVMServiceContainer ContainerType = "IaasVMServiceContainer" + // ContainerTypeInvalid ... + ContainerTypeInvalid ContainerType = "Invalid" + // ContainerTypeMABContainer ... + ContainerTypeMABContainer ContainerType = "MABContainer" + // ContainerTypeSQLAGWorkLoadContainer ... + ContainerTypeSQLAGWorkLoadContainer ContainerType = "SQLAGWorkLoadContainer" + // ContainerTypeStorageContainer ... + ContainerTypeStorageContainer ContainerType = "StorageContainer" + // ContainerTypeUnknown ... + ContainerTypeUnknown ContainerType = "Unknown" + // ContainerTypeVCenter ... + ContainerTypeVCenter ContainerType = "VCenter" + // ContainerTypeVMAppContainer ... + ContainerTypeVMAppContainer ContainerType = "VMAppContainer" + // ContainerTypeWindows ... + ContainerTypeWindows ContainerType = "Windows" +) + +// PossibleContainerTypeValues returns an array of possible values for the ContainerType const type. +func PossibleContainerTypeValues() []ContainerType { + return []ContainerType{ContainerTypeAzureBackupServerContainer, ContainerTypeAzureSQLContainer, ContainerTypeCluster, ContainerTypeDPMContainer, ContainerTypeGenericContainer, ContainerTypeIaasVMContainer, ContainerTypeIaasVMServiceContainer, ContainerTypeInvalid, ContainerTypeMABContainer, ContainerTypeSQLAGWorkLoadContainer, ContainerTypeStorageContainer, ContainerTypeUnknown, ContainerTypeVCenter, ContainerTypeVMAppContainer, ContainerTypeWindows} +} + +// ContainerTypeBasicProtectionContainer enumerates the values for container type basic protection container. +type ContainerTypeBasicProtectionContainer string + +const ( + // ContainerTypeAzureBackupServerContainer1 ... + ContainerTypeAzureBackupServerContainer1 ContainerTypeBasicProtectionContainer = "AzureBackupServerContainer" + // ContainerTypeAzureSQLContainer1 ... + ContainerTypeAzureSQLContainer1 ContainerTypeBasicProtectionContainer = "AzureSqlContainer" + // ContainerTypeAzureWorkloadContainer ... + ContainerTypeAzureWorkloadContainer ContainerTypeBasicProtectionContainer = "AzureWorkloadContainer" + // ContainerTypeDPMContainer1 ... + ContainerTypeDPMContainer1 ContainerTypeBasicProtectionContainer = "DPMContainer" + // ContainerTypeGenericContainer1 ... + ContainerTypeGenericContainer1 ContainerTypeBasicProtectionContainer = "GenericContainer" + // ContainerTypeIaaSVMContainer ... + ContainerTypeIaaSVMContainer ContainerTypeBasicProtectionContainer = "IaaSVMContainer" + // ContainerTypeMicrosoftClassicComputevirtualMachines ... + ContainerTypeMicrosoftClassicComputevirtualMachines ContainerTypeBasicProtectionContainer = "Microsoft.ClassicCompute/virtualMachines" + // ContainerTypeMicrosoftComputevirtualMachines ... + ContainerTypeMicrosoftComputevirtualMachines ContainerTypeBasicProtectionContainer = "Microsoft.Compute/virtualMachines" + // ContainerTypeProtectionContainer ... + ContainerTypeProtectionContainer ContainerTypeBasicProtectionContainer = "ProtectionContainer" + // ContainerTypeSQLAGWorkLoadContainer1 ... + ContainerTypeSQLAGWorkLoadContainer1 ContainerTypeBasicProtectionContainer = "SQLAGWorkLoadContainer" + // ContainerTypeStorageContainer1 ... + ContainerTypeStorageContainer1 ContainerTypeBasicProtectionContainer = "StorageContainer" + // ContainerTypeVMAppContainer1 ... + ContainerTypeVMAppContainer1 ContainerTypeBasicProtectionContainer = "VMAppContainer" + // ContainerTypeWindows1 ... + ContainerTypeWindows1 ContainerTypeBasicProtectionContainer = "Windows" +) + +// PossibleContainerTypeBasicProtectionContainerValues returns an array of possible values for the ContainerTypeBasicProtectionContainer const type. +func PossibleContainerTypeBasicProtectionContainerValues() []ContainerTypeBasicProtectionContainer { + return []ContainerTypeBasicProtectionContainer{ContainerTypeAzureBackupServerContainer1, ContainerTypeAzureSQLContainer1, ContainerTypeAzureWorkloadContainer, ContainerTypeDPMContainer1, ContainerTypeGenericContainer1, ContainerTypeIaaSVMContainer, ContainerTypeMicrosoftClassicComputevirtualMachines, ContainerTypeMicrosoftComputevirtualMachines, ContainerTypeProtectionContainer, ContainerTypeSQLAGWorkLoadContainer1, ContainerTypeStorageContainer1, ContainerTypeVMAppContainer1, ContainerTypeWindows1} +} + +// CopyOptions enumerates the values for copy options. +type CopyOptions string + +const ( + // CopyOptionsCreateCopy ... + CopyOptionsCreateCopy CopyOptions = "CreateCopy" + // CopyOptionsFailOnConflict ... + CopyOptionsFailOnConflict CopyOptions = "FailOnConflict" + // CopyOptionsInvalid ... + CopyOptionsInvalid CopyOptions = "Invalid" + // CopyOptionsOverwrite ... + CopyOptionsOverwrite CopyOptions = "Overwrite" + // CopyOptionsSkip ... + CopyOptionsSkip CopyOptions = "Skip" +) + +// PossibleCopyOptionsValues returns an array of possible values for the CopyOptions const type. +func PossibleCopyOptionsValues() []CopyOptions { + return []CopyOptions{CopyOptionsCreateCopy, CopyOptionsFailOnConflict, CopyOptionsInvalid, CopyOptionsOverwrite, CopyOptionsSkip} +} + +// CreateMode enumerates the values for create mode. +type CreateMode string + +const ( + // CreateModeDefault ... + CreateModeDefault CreateMode = "Default" + // CreateModeInvalid ... + CreateModeInvalid CreateMode = "Invalid" + // CreateModeRecover ... + CreateModeRecover CreateMode = "Recover" +) + +// PossibleCreateModeValues returns an array of possible values for the CreateMode const type. +func PossibleCreateModeValues() []CreateMode { + return []CreateMode{CreateModeDefault, CreateModeInvalid, CreateModeRecover} +} + +// DataSourceType enumerates the values for data source type. +type DataSourceType string + +const ( + // DataSourceTypeAzureFileShare ... + DataSourceTypeAzureFileShare DataSourceType = "AzureFileShare" + // DataSourceTypeAzureSQLDb ... + DataSourceTypeAzureSQLDb DataSourceType = "AzureSqlDb" + // DataSourceTypeClient ... + DataSourceTypeClient DataSourceType = "Client" + // DataSourceTypeExchange ... + DataSourceTypeExchange DataSourceType = "Exchange" + // DataSourceTypeFileFolder ... + DataSourceTypeFileFolder DataSourceType = "FileFolder" + // DataSourceTypeGenericDataSource ... + DataSourceTypeGenericDataSource DataSourceType = "GenericDataSource" + // DataSourceTypeInvalid ... + DataSourceTypeInvalid DataSourceType = "Invalid" + // DataSourceTypeSAPAseDatabase ... + DataSourceTypeSAPAseDatabase DataSourceType = "SAPAseDatabase" + // DataSourceTypeSAPHanaDatabase ... + DataSourceTypeSAPHanaDatabase DataSourceType = "SAPHanaDatabase" + // DataSourceTypeSharepoint ... + DataSourceTypeSharepoint DataSourceType = "Sharepoint" + // DataSourceTypeSQLDataBase ... + DataSourceTypeSQLDataBase DataSourceType = "SQLDataBase" + // DataSourceTypeSQLDB ... + DataSourceTypeSQLDB DataSourceType = "SQLDB" + // DataSourceTypeSystemState ... + DataSourceTypeSystemState DataSourceType = "SystemState" + // DataSourceTypeVM ... + DataSourceTypeVM DataSourceType = "VM" + // DataSourceTypeVMwareVM ... + DataSourceTypeVMwareVM DataSourceType = "VMwareVM" +) + +// PossibleDataSourceTypeValues returns an array of possible values for the DataSourceType const type. +func PossibleDataSourceTypeValues() []DataSourceType { + return []DataSourceType{DataSourceTypeAzureFileShare, DataSourceTypeAzureSQLDb, DataSourceTypeClient, DataSourceTypeExchange, DataSourceTypeFileFolder, DataSourceTypeGenericDataSource, DataSourceTypeInvalid, DataSourceTypeSAPAseDatabase, DataSourceTypeSAPHanaDatabase, DataSourceTypeSharepoint, DataSourceTypeSQLDataBase, DataSourceTypeSQLDB, DataSourceTypeSystemState, DataSourceTypeVM, DataSourceTypeVMwareVM} +} + +// DayOfWeek enumerates the values for day of week. +type DayOfWeek string + +const ( + // Friday ... + Friday DayOfWeek = "Friday" + // Monday ... + Monday DayOfWeek = "Monday" + // Saturday ... + Saturday DayOfWeek = "Saturday" + // Sunday ... + Sunday DayOfWeek = "Sunday" + // Thursday ... + Thursday DayOfWeek = "Thursday" + // Tuesday ... + Tuesday DayOfWeek = "Tuesday" + // Wednesday ... + Wednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{Friday, Monday, Saturday, Sunday, Thursday, Tuesday, Wednesday} +} + +// EngineType enumerates the values for engine type. +type EngineType string + +const ( + // BackupEngineTypeAzureBackupServerEngine ... + BackupEngineTypeAzureBackupServerEngine EngineType = "AzureBackupServerEngine" + // BackupEngineTypeBackupEngineBase ... + BackupEngineTypeBackupEngineBase EngineType = "BackupEngineBase" + // BackupEngineTypeDpmBackupEngine ... + BackupEngineTypeDpmBackupEngine EngineType = "DpmBackupEngine" +) + +// PossibleEngineTypeValues returns an array of possible values for the EngineType const type. +func PossibleEngineTypeValues() []EngineType { + return []EngineType{BackupEngineTypeAzureBackupServerEngine, BackupEngineTypeBackupEngineBase, BackupEngineTypeDpmBackupEngine} +} + +// EnhancedSecurityState enumerates the values for enhanced security state. +type EnhancedSecurityState string + +const ( + // EnhancedSecurityStateDisabled ... + EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled" + // EnhancedSecurityStateEnabled ... + EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled" + // EnhancedSecurityStateInvalid ... + EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid" +) + +// PossibleEnhancedSecurityStateValues returns an array of possible values for the EnhancedSecurityState const type. +func PossibleEnhancedSecurityStateValues() []EnhancedSecurityState { + return []EnhancedSecurityState{EnhancedSecurityStateDisabled, EnhancedSecurityStateEnabled, EnhancedSecurityStateInvalid} +} + +// FabricName enumerates the values for fabric name. +type FabricName string + +const ( + // FabricNameAzure ... + FabricNameAzure FabricName = "Azure" + // FabricNameInvalid ... + FabricNameInvalid FabricName = "Invalid" +) + +// PossibleFabricNameValues returns an array of possible values for the FabricName const type. +func PossibleFabricNameValues() []FabricName { + return []FabricName{FabricNameAzure, FabricNameInvalid} +} + +// FeatureType enumerates the values for feature type. +type FeatureType string + +const ( + // FeatureTypeAzureBackupGoals ... + FeatureTypeAzureBackupGoals FeatureType = "AzureBackupGoals" + // FeatureTypeAzureVMResourceBackup ... + FeatureTypeAzureVMResourceBackup FeatureType = "AzureVMResourceBackup" + // FeatureTypeFeatureSupportRequest ... + FeatureTypeFeatureSupportRequest FeatureType = "FeatureSupportRequest" +) + +// PossibleFeatureTypeValues returns an array of possible values for the FeatureType const type. +func PossibleFeatureTypeValues() []FeatureType { + return []FeatureType{FeatureTypeAzureBackupGoals, FeatureTypeAzureVMResourceBackup, FeatureTypeFeatureSupportRequest} +} + +// HealthState enumerates the values for health state. +type HealthState string + +const ( + // HealthStateActionRequired ... + HealthStateActionRequired HealthState = "ActionRequired" + // HealthStateActionSuggested ... + HealthStateActionSuggested HealthState = "ActionSuggested" + // HealthStateInvalid ... + HealthStateInvalid HealthState = "Invalid" + // HealthStatePassed ... + HealthStatePassed HealthState = "Passed" +) + +// PossibleHealthStateValues returns an array of possible values for the HealthState const type. +func PossibleHealthStateValues() []HealthState { + return []HealthState{HealthStateActionRequired, HealthStateActionSuggested, HealthStateInvalid, HealthStatePassed} +} + +// HealthStatus enumerates the values for health status. +type HealthStatus string + +const ( + // HealthStatusActionRequired ... + HealthStatusActionRequired HealthStatus = "ActionRequired" + // HealthStatusActionSuggested ... + HealthStatusActionSuggested HealthStatus = "ActionSuggested" + // HealthStatusInvalid ... + HealthStatusInvalid HealthStatus = "Invalid" + // HealthStatusPassed ... + HealthStatusPassed HealthStatus = "Passed" +) + +// PossibleHealthStatusValues returns an array of possible values for the HealthStatus const type. +func PossibleHealthStatusValues() []HealthStatus { + return []HealthStatus{HealthStatusActionRequired, HealthStatusActionSuggested, HealthStatusInvalid, HealthStatusPassed} +} + +// HTTPStatusCode enumerates the values for http status code. +type HTTPStatusCode string + +const ( + // Accepted ... + Accepted HTTPStatusCode = "Accepted" + // Ambiguous ... + Ambiguous HTTPStatusCode = "Ambiguous" + // BadGateway ... + BadGateway HTTPStatusCode = "BadGateway" + // BadRequest ... + BadRequest HTTPStatusCode = "BadRequest" + // Conflict ... + Conflict HTTPStatusCode = "Conflict" + // Continue ... + Continue HTTPStatusCode = "Continue" + // Created ... + Created HTTPStatusCode = "Created" + // ExpectationFailed ... + ExpectationFailed HTTPStatusCode = "ExpectationFailed" + // Forbidden ... + Forbidden HTTPStatusCode = "Forbidden" + // Found ... + Found HTTPStatusCode = "Found" + // GatewayTimeout ... + GatewayTimeout HTTPStatusCode = "GatewayTimeout" + // Gone ... + Gone HTTPStatusCode = "Gone" + // HTTPVersionNotSupported ... + HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" + // InternalServerError ... + InternalServerError HTTPStatusCode = "InternalServerError" + // LengthRequired ... + LengthRequired HTTPStatusCode = "LengthRequired" + // MethodNotAllowed ... + MethodNotAllowed HTTPStatusCode = "MethodNotAllowed" + // Moved ... + Moved HTTPStatusCode = "Moved" + // MovedPermanently ... + MovedPermanently HTTPStatusCode = "MovedPermanently" + // MultipleChoices ... + MultipleChoices HTTPStatusCode = "MultipleChoices" + // NoContent ... + NoContent HTTPStatusCode = "NoContent" + // NonAuthoritativeInformation ... + NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" + // NotAcceptable ... + NotAcceptable HTTPStatusCode = "NotAcceptable" + // NotFound ... + NotFound HTTPStatusCode = "NotFound" + // NotImplemented ... + NotImplemented HTTPStatusCode = "NotImplemented" + // NotModified ... + NotModified HTTPStatusCode = "NotModified" + // OK ... + OK HTTPStatusCode = "OK" + // PartialContent ... + PartialContent HTTPStatusCode = "PartialContent" + // PaymentRequired ... + PaymentRequired HTTPStatusCode = "PaymentRequired" + // PreconditionFailed ... + PreconditionFailed HTTPStatusCode = "PreconditionFailed" + // ProxyAuthenticationRequired ... + ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" + // Redirect ... + Redirect HTTPStatusCode = "Redirect" + // RedirectKeepVerb ... + RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" + // RedirectMethod ... + RedirectMethod HTTPStatusCode = "RedirectMethod" + // RequestedRangeNotSatisfiable ... + RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" + // RequestEntityTooLarge ... + RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" + // RequestTimeout ... + RequestTimeout HTTPStatusCode = "RequestTimeout" + // RequestURITooLong ... + RequestURITooLong HTTPStatusCode = "RequestUriTooLong" + // ResetContent ... + ResetContent HTTPStatusCode = "ResetContent" + // SeeOther ... + SeeOther HTTPStatusCode = "SeeOther" + // ServiceUnavailable ... + ServiceUnavailable HTTPStatusCode = "ServiceUnavailable" + // SwitchingProtocols ... + SwitchingProtocols HTTPStatusCode = "SwitchingProtocols" + // TemporaryRedirect ... + TemporaryRedirect HTTPStatusCode = "TemporaryRedirect" + // Unauthorized ... + Unauthorized HTTPStatusCode = "Unauthorized" + // UnsupportedMediaType ... + UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" + // Unused ... + Unused HTTPStatusCode = "Unused" + // UpgradeRequired ... + UpgradeRequired HTTPStatusCode = "UpgradeRequired" + // UseProxy ... + UseProxy HTTPStatusCode = "UseProxy" +) + +// PossibleHTTPStatusCodeValues returns an array of possible values for the HTTPStatusCode const type. +func PossibleHTTPStatusCodeValues() []HTTPStatusCode { + return []HTTPStatusCode{Accepted, Ambiguous, BadGateway, BadRequest, Conflict, Continue, Created, ExpectationFailed, Forbidden, Found, GatewayTimeout, Gone, HTTPVersionNotSupported, InternalServerError, LengthRequired, MethodNotAllowed, Moved, MovedPermanently, MultipleChoices, NoContent, NonAuthoritativeInformation, NotAcceptable, NotFound, NotImplemented, NotModified, OK, PartialContent, PaymentRequired, PreconditionFailed, ProxyAuthenticationRequired, Redirect, RedirectKeepVerb, RedirectMethod, RequestedRangeNotSatisfiable, RequestEntityTooLarge, RequestTimeout, RequestURITooLong, ResetContent, SeeOther, ServiceUnavailable, SwitchingProtocols, TemporaryRedirect, Unauthorized, UnsupportedMediaType, Unused, UpgradeRequired, UseProxy} +} + +// InquiryStatus enumerates the values for inquiry status. +type InquiryStatus string + +const ( + // InquiryStatusFailed ... + InquiryStatusFailed InquiryStatus = "Failed" + // InquiryStatusInvalid ... + InquiryStatusInvalid InquiryStatus = "Invalid" + // InquiryStatusSuccess ... + InquiryStatusSuccess InquiryStatus = "Success" +) + +// PossibleInquiryStatusValues returns an array of possible values for the InquiryStatus const type. +func PossibleInquiryStatusValues() []InquiryStatus { + return []InquiryStatus{InquiryStatusFailed, InquiryStatusInvalid, InquiryStatusSuccess} +} + +// IntentItemType enumerates the values for intent item type. +type IntentItemType string + +const ( + // IntentItemTypeInvalid ... + IntentItemTypeInvalid IntentItemType = "Invalid" + // IntentItemTypeSQLAvailabilityGroupContainer ... + IntentItemTypeSQLAvailabilityGroupContainer IntentItemType = "SQLAvailabilityGroupContainer" + // IntentItemTypeSQLInstance ... + IntentItemTypeSQLInstance IntentItemType = "SQLInstance" +) + +// PossibleIntentItemTypeValues returns an array of possible values for the IntentItemType const type. +func PossibleIntentItemTypeValues() []IntentItemType { + return []IntentItemType{IntentItemTypeInvalid, IntentItemTypeSQLAvailabilityGroupContainer, IntentItemTypeSQLInstance} +} + +// ItemType enumerates the values for item type. +type ItemType string + +const ( + // ItemTypeAzureFileShare ... + ItemTypeAzureFileShare ItemType = "AzureFileShare" + // ItemTypeAzureSQLDb ... + ItemTypeAzureSQLDb ItemType = "AzureSqlDb" + // ItemTypeClient ... + ItemTypeClient ItemType = "Client" + // ItemTypeExchange ... + ItemTypeExchange ItemType = "Exchange" + // ItemTypeFileFolder ... + ItemTypeFileFolder ItemType = "FileFolder" + // ItemTypeGenericDataSource ... + ItemTypeGenericDataSource ItemType = "GenericDataSource" + // ItemTypeInvalid ... + ItemTypeInvalid ItemType = "Invalid" + // ItemTypeSAPAseDatabase ... + ItemTypeSAPAseDatabase ItemType = "SAPAseDatabase" + // ItemTypeSAPHanaDatabase ... + ItemTypeSAPHanaDatabase ItemType = "SAPHanaDatabase" + // ItemTypeSharepoint ... + ItemTypeSharepoint ItemType = "Sharepoint" + // ItemTypeSQLDataBase ... + ItemTypeSQLDataBase ItemType = "SQLDataBase" + // ItemTypeSQLDB ... + ItemTypeSQLDB ItemType = "SQLDB" + // ItemTypeSystemState ... + ItemTypeSystemState ItemType = "SystemState" + // ItemTypeVM ... + ItemTypeVM ItemType = "VM" + // ItemTypeVMwareVM ... + ItemTypeVMwareVM ItemType = "VMwareVM" +) + +// PossibleItemTypeValues returns an array of possible values for the ItemType const type. +func PossibleItemTypeValues() []ItemType { + return []ItemType{ItemTypeAzureFileShare, ItemTypeAzureSQLDb, ItemTypeClient, ItemTypeExchange, ItemTypeFileFolder, ItemTypeGenericDataSource, ItemTypeInvalid, ItemTypeSAPAseDatabase, ItemTypeSAPHanaDatabase, ItemTypeSharepoint, ItemTypeSQLDataBase, ItemTypeSQLDB, ItemTypeSystemState, ItemTypeVM, ItemTypeVMwareVM} +} + +// JobOperationType enumerates the values for job operation type. +type JobOperationType string + +const ( + // JobOperationTypeBackup ... + JobOperationTypeBackup JobOperationType = "Backup" + // JobOperationTypeConfigureBackup ... + JobOperationTypeConfigureBackup JobOperationType = "ConfigureBackup" + // JobOperationTypeCrossRegionRestore ... + JobOperationTypeCrossRegionRestore JobOperationType = "CrossRegionRestore" + // JobOperationTypeDeleteBackupData ... + JobOperationTypeDeleteBackupData JobOperationType = "DeleteBackupData" + // JobOperationTypeDisableBackup ... + JobOperationTypeDisableBackup JobOperationType = "DisableBackup" + // JobOperationTypeInvalid ... + JobOperationTypeInvalid JobOperationType = "Invalid" + // JobOperationTypeRegister ... + JobOperationTypeRegister JobOperationType = "Register" + // JobOperationTypeRestore ... + JobOperationTypeRestore JobOperationType = "Restore" + // JobOperationTypeUndelete ... + JobOperationTypeUndelete JobOperationType = "Undelete" + // JobOperationTypeUnRegister ... + JobOperationTypeUnRegister JobOperationType = "UnRegister" +) + +// PossibleJobOperationTypeValues returns an array of possible values for the JobOperationType const type. +func PossibleJobOperationTypeValues() []JobOperationType { + return []JobOperationType{JobOperationTypeBackup, JobOperationTypeConfigureBackup, JobOperationTypeCrossRegionRestore, JobOperationTypeDeleteBackupData, JobOperationTypeDisableBackup, JobOperationTypeInvalid, JobOperationTypeRegister, JobOperationTypeRestore, JobOperationTypeUndelete, JobOperationTypeUnRegister} +} + +// JobStatus enumerates the values for job status. +type JobStatus string + +const ( + // JobStatusCancelled ... + JobStatusCancelled JobStatus = "Cancelled" + // JobStatusCancelling ... + JobStatusCancelling JobStatus = "Cancelling" + // JobStatusCompleted ... + JobStatusCompleted JobStatus = "Completed" + // JobStatusCompletedWithWarnings ... + JobStatusCompletedWithWarnings JobStatus = "CompletedWithWarnings" + // JobStatusFailed ... + JobStatusFailed JobStatus = "Failed" + // JobStatusInProgress ... + JobStatusInProgress JobStatus = "InProgress" + // JobStatusInvalid ... + JobStatusInvalid JobStatus = "Invalid" +) + +// PossibleJobStatusValues returns an array of possible values for the JobStatus const type. +func PossibleJobStatusValues() []JobStatus { + return []JobStatus{JobStatusCancelled, JobStatusCancelling, JobStatusCompleted, JobStatusCompletedWithWarnings, JobStatusFailed, JobStatusInProgress, JobStatusInvalid} +} + +// JobSupportedAction enumerates the values for job supported action. +type JobSupportedAction string + +const ( + // JobSupportedActionCancellable ... + JobSupportedActionCancellable JobSupportedAction = "Cancellable" + // JobSupportedActionInvalid ... + JobSupportedActionInvalid JobSupportedAction = "Invalid" + // JobSupportedActionRetriable ... + JobSupportedActionRetriable JobSupportedAction = "Retriable" +) + +// PossibleJobSupportedActionValues returns an array of possible values for the JobSupportedAction const type. +func PossibleJobSupportedActionValues() []JobSupportedAction { + return []JobSupportedAction{JobSupportedActionCancellable, JobSupportedActionInvalid, JobSupportedActionRetriable} +} + +// JobType enumerates the values for job type. +type JobType string + +const ( + // JobTypeAzureIaaSVMJob ... + JobTypeAzureIaaSVMJob JobType = "AzureIaaSVMJob" + // JobTypeAzureStorageJob ... + JobTypeAzureStorageJob JobType = "AzureStorageJob" + // JobTypeAzureWorkloadJob ... + JobTypeAzureWorkloadJob JobType = "AzureWorkloadJob" + // JobTypeDpmJob ... + JobTypeDpmJob JobType = "DpmJob" + // JobTypeJob ... + JobTypeJob JobType = "Job" + // JobTypeMabJob ... + JobTypeMabJob JobType = "MabJob" +) + +// PossibleJobTypeValues returns an array of possible values for the JobType const type. +func PossibleJobTypeValues() []JobType { + return []JobType{JobTypeAzureIaaSVMJob, JobTypeAzureStorageJob, JobTypeAzureWorkloadJob, JobTypeDpmJob, JobTypeJob, JobTypeMabJob} +} + +// LastBackupStatus enumerates the values for last backup status. +type LastBackupStatus string + +const ( + // LastBackupStatusHealthy ... + LastBackupStatusHealthy LastBackupStatus = "Healthy" + // LastBackupStatusInvalid ... + LastBackupStatusInvalid LastBackupStatus = "Invalid" + // LastBackupStatusIRPending ... + LastBackupStatusIRPending LastBackupStatus = "IRPending" + // LastBackupStatusUnhealthy ... + LastBackupStatusUnhealthy LastBackupStatus = "Unhealthy" +) + +// PossibleLastBackupStatusValues returns an array of possible values for the LastBackupStatus const type. +func PossibleLastBackupStatusValues() []LastBackupStatus { + return []LastBackupStatus{LastBackupStatusHealthy, LastBackupStatusInvalid, LastBackupStatusIRPending, LastBackupStatusUnhealthy} +} + +// MabServerType enumerates the values for mab server type. +type MabServerType string + +const ( + // MabServerTypeAzureBackupServerContainer ... + MabServerTypeAzureBackupServerContainer MabServerType = "AzureBackupServerContainer" + // MabServerTypeAzureSQLContainer ... + MabServerTypeAzureSQLContainer MabServerType = "AzureSqlContainer" + // MabServerTypeCluster ... + MabServerTypeCluster MabServerType = "Cluster" + // MabServerTypeDPMContainer ... + MabServerTypeDPMContainer MabServerType = "DPMContainer" + // MabServerTypeGenericContainer ... + MabServerTypeGenericContainer MabServerType = "GenericContainer" + // MabServerTypeIaasVMContainer ... + MabServerTypeIaasVMContainer MabServerType = "IaasVMContainer" + // MabServerTypeIaasVMServiceContainer ... + MabServerTypeIaasVMServiceContainer MabServerType = "IaasVMServiceContainer" + // MabServerTypeInvalid ... + MabServerTypeInvalid MabServerType = "Invalid" + // MabServerTypeMABContainer ... + MabServerTypeMABContainer MabServerType = "MABContainer" + // MabServerTypeSQLAGWorkLoadContainer ... + MabServerTypeSQLAGWorkLoadContainer MabServerType = "SQLAGWorkLoadContainer" + // MabServerTypeStorageContainer ... + MabServerTypeStorageContainer MabServerType = "StorageContainer" + // MabServerTypeUnknown ... + MabServerTypeUnknown MabServerType = "Unknown" + // MabServerTypeVCenter ... + MabServerTypeVCenter MabServerType = "VCenter" + // MabServerTypeVMAppContainer ... + MabServerTypeVMAppContainer MabServerType = "VMAppContainer" + // MabServerTypeWindows ... + MabServerTypeWindows MabServerType = "Windows" +) + +// PossibleMabServerTypeValues returns an array of possible values for the MabServerType const type. +func PossibleMabServerTypeValues() []MabServerType { + return []MabServerType{MabServerTypeAzureBackupServerContainer, MabServerTypeAzureSQLContainer, MabServerTypeCluster, MabServerTypeDPMContainer, MabServerTypeGenericContainer, MabServerTypeIaasVMContainer, MabServerTypeIaasVMServiceContainer, MabServerTypeInvalid, MabServerTypeMABContainer, MabServerTypeSQLAGWorkLoadContainer, MabServerTypeStorageContainer, MabServerTypeUnknown, MabServerTypeVCenter, MabServerTypeVMAppContainer, MabServerTypeWindows} +} + +// ManagementType enumerates the values for management type. +type ManagementType string + +const ( + // ManagementTypeAzureBackupServer ... + ManagementTypeAzureBackupServer ManagementType = "AzureBackupServer" + // ManagementTypeAzureIaasVM ... + ManagementTypeAzureIaasVM ManagementType = "AzureIaasVM" + // ManagementTypeAzureSQL ... + ManagementTypeAzureSQL ManagementType = "AzureSql" + // ManagementTypeAzureStorage ... + ManagementTypeAzureStorage ManagementType = "AzureStorage" + // ManagementTypeAzureWorkload ... + ManagementTypeAzureWorkload ManagementType = "AzureWorkload" + // ManagementTypeDefaultBackup ... + ManagementTypeDefaultBackup ManagementType = "DefaultBackup" + // ManagementTypeDPM ... + ManagementTypeDPM ManagementType = "DPM" + // ManagementTypeInvalid ... + ManagementTypeInvalid ManagementType = "Invalid" + // ManagementTypeMAB ... + ManagementTypeMAB ManagementType = "MAB" +) + +// PossibleManagementTypeValues returns an array of possible values for the ManagementType const type. +func PossibleManagementTypeValues() []ManagementType { + return []ManagementType{ManagementTypeAzureBackupServer, ManagementTypeAzureIaasVM, ManagementTypeAzureSQL, ManagementTypeAzureStorage, ManagementTypeAzureWorkload, ManagementTypeDefaultBackup, ManagementTypeDPM, ManagementTypeInvalid, ManagementTypeMAB} +} + +// ManagementTypeBasicProtectionPolicy enumerates the values for management type basic protection policy. +type ManagementTypeBasicProtectionPolicy string + +const ( + // BackupManagementTypeAzureIaasVM ... + BackupManagementTypeAzureIaasVM ManagementTypeBasicProtectionPolicy = "AzureIaasVM" + // BackupManagementTypeAzureSQL ... + BackupManagementTypeAzureSQL ManagementTypeBasicProtectionPolicy = "AzureSql" + // BackupManagementTypeAzureStorage ... + BackupManagementTypeAzureStorage ManagementTypeBasicProtectionPolicy = "AzureStorage" + // BackupManagementTypeAzureWorkload ... + BackupManagementTypeAzureWorkload ManagementTypeBasicProtectionPolicy = "AzureWorkload" + // BackupManagementTypeGenericProtectionPolicy ... + BackupManagementTypeGenericProtectionPolicy ManagementTypeBasicProtectionPolicy = "GenericProtectionPolicy" + // BackupManagementTypeMAB ... + BackupManagementTypeMAB ManagementTypeBasicProtectionPolicy = "MAB" + // BackupManagementTypeProtectionPolicy ... + BackupManagementTypeProtectionPolicy ManagementTypeBasicProtectionPolicy = "ProtectionPolicy" +) + +// PossibleManagementTypeBasicProtectionPolicyValues returns an array of possible values for the ManagementTypeBasicProtectionPolicy const type. +func PossibleManagementTypeBasicProtectionPolicyValues() []ManagementTypeBasicProtectionPolicy { + return []ManagementTypeBasicProtectionPolicy{BackupManagementTypeAzureIaasVM, BackupManagementTypeAzureSQL, BackupManagementTypeAzureStorage, BackupManagementTypeAzureWorkload, BackupManagementTypeGenericProtectionPolicy, BackupManagementTypeMAB, BackupManagementTypeProtectionPolicy} +} + +// MonthOfYear enumerates the values for month of year. +type MonthOfYear string + +const ( + // MonthOfYearApril ... + MonthOfYearApril MonthOfYear = "April" + // MonthOfYearAugust ... + MonthOfYearAugust MonthOfYear = "August" + // MonthOfYearDecember ... + MonthOfYearDecember MonthOfYear = "December" + // MonthOfYearFebruary ... + MonthOfYearFebruary MonthOfYear = "February" + // MonthOfYearInvalid ... + MonthOfYearInvalid MonthOfYear = "Invalid" + // MonthOfYearJanuary ... + MonthOfYearJanuary MonthOfYear = "January" + // MonthOfYearJuly ... + MonthOfYearJuly MonthOfYear = "July" + // MonthOfYearJune ... + MonthOfYearJune MonthOfYear = "June" + // MonthOfYearMarch ... + MonthOfYearMarch MonthOfYear = "March" + // MonthOfYearMay ... + MonthOfYearMay MonthOfYear = "May" + // MonthOfYearNovember ... + MonthOfYearNovember MonthOfYear = "November" + // MonthOfYearOctober ... + MonthOfYearOctober MonthOfYear = "October" + // MonthOfYearSeptember ... + MonthOfYearSeptember MonthOfYear = "September" +) + +// PossibleMonthOfYearValues returns an array of possible values for the MonthOfYear const type. +func PossibleMonthOfYearValues() []MonthOfYear { + return []MonthOfYear{MonthOfYearApril, MonthOfYearAugust, MonthOfYearDecember, MonthOfYearFebruary, MonthOfYearInvalid, MonthOfYearJanuary, MonthOfYearJuly, MonthOfYearJune, MonthOfYearMarch, MonthOfYearMay, MonthOfYearNovember, MonthOfYearOctober, MonthOfYearSeptember} +} + +// ObjectType enumerates the values for object type. +type ObjectType string + +const ( + // ObjectTypeExportJobsOperationResultInfo ... + ObjectTypeExportJobsOperationResultInfo ObjectType = "ExportJobsOperationResultInfo" + // ObjectTypeOperationResultInfo ... + ObjectTypeOperationResultInfo ObjectType = "OperationResultInfo" + // ObjectTypeOperationResultInfoBase ... + ObjectTypeOperationResultInfoBase ObjectType = "OperationResultInfoBase" +) + +// PossibleObjectTypeValues returns an array of possible values for the ObjectType const type. +func PossibleObjectTypeValues() []ObjectType { + return []ObjectType{ObjectTypeExportJobsOperationResultInfo, ObjectTypeOperationResultInfo, ObjectTypeOperationResultInfoBase} +} + +// ObjectTypeBasicILRRequest enumerates the values for object type basic ilr request. +type ObjectTypeBasicILRRequest string + +const ( + // ObjectTypeAzureFileShareProvisionILRRequest ... + ObjectTypeAzureFileShareProvisionILRRequest ObjectTypeBasicILRRequest = "AzureFileShareProvisionILRRequest" + // ObjectTypeIaasVMILRRegistrationRequest ... + ObjectTypeIaasVMILRRegistrationRequest ObjectTypeBasicILRRequest = "IaasVMILRRegistrationRequest" + // ObjectTypeILRRequest ... + ObjectTypeILRRequest ObjectTypeBasicILRRequest = "ILRRequest" +) + +// PossibleObjectTypeBasicILRRequestValues returns an array of possible values for the ObjectTypeBasicILRRequest const type. +func PossibleObjectTypeBasicILRRequestValues() []ObjectTypeBasicILRRequest { + return []ObjectTypeBasicILRRequest{ObjectTypeAzureFileShareProvisionILRRequest, ObjectTypeIaasVMILRRegistrationRequest, ObjectTypeILRRequest} +} + +// ObjectTypeBasicOperationStatusExtendedInfo enumerates the values for object type basic operation status +// extended info. +type ObjectTypeBasicOperationStatusExtendedInfo string + +const ( + // ObjectTypeOperationStatusExtendedInfo ... + ObjectTypeOperationStatusExtendedInfo ObjectTypeBasicOperationStatusExtendedInfo = "OperationStatusExtendedInfo" + // ObjectTypeOperationStatusJobExtendedInfo ... + ObjectTypeOperationStatusJobExtendedInfo ObjectTypeBasicOperationStatusExtendedInfo = "OperationStatusJobExtendedInfo" + // ObjectTypeOperationStatusJobsExtendedInfo ... + ObjectTypeOperationStatusJobsExtendedInfo ObjectTypeBasicOperationStatusExtendedInfo = "OperationStatusJobsExtendedInfo" + // ObjectTypeOperationStatusProvisionILRExtendedInfo ... + ObjectTypeOperationStatusProvisionILRExtendedInfo ObjectTypeBasicOperationStatusExtendedInfo = "OperationStatusProvisionILRExtendedInfo" +) + +// PossibleObjectTypeBasicOperationStatusExtendedInfoValues returns an array of possible values for the ObjectTypeBasicOperationStatusExtendedInfo const type. +func PossibleObjectTypeBasicOperationStatusExtendedInfoValues() []ObjectTypeBasicOperationStatusExtendedInfo { + return []ObjectTypeBasicOperationStatusExtendedInfo{ObjectTypeOperationStatusExtendedInfo, ObjectTypeOperationStatusJobExtendedInfo, ObjectTypeOperationStatusJobsExtendedInfo, ObjectTypeOperationStatusProvisionILRExtendedInfo} +} + +// ObjectTypeBasicRecoveryPoint enumerates the values for object type basic recovery point. +type ObjectTypeBasicRecoveryPoint string + +const ( + // ObjectTypeAzureFileShareRecoveryPoint ... + ObjectTypeAzureFileShareRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureFileShareRecoveryPoint" + // ObjectTypeAzureWorkloadPointInTimeRecoveryPoint ... + ObjectTypeAzureWorkloadPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadPointInTimeRecoveryPoint" + // ObjectTypeAzureWorkloadRecoveryPoint ... + ObjectTypeAzureWorkloadRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadRecoveryPoint" + // ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint ... + ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" + // ObjectTypeAzureWorkloadSAPHanaRecoveryPoint ... + ObjectTypeAzureWorkloadSAPHanaRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSAPHanaRecoveryPoint" + // ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint ... + ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSQLPointInTimeRecoveryPoint" + // ObjectTypeAzureWorkloadSQLRecoveryPoint ... + ObjectTypeAzureWorkloadSQLRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSQLRecoveryPoint" + // ObjectTypeGenericRecoveryPoint ... + ObjectTypeGenericRecoveryPoint ObjectTypeBasicRecoveryPoint = "GenericRecoveryPoint" + // ObjectTypeIaasVMRecoveryPoint ... + ObjectTypeIaasVMRecoveryPoint ObjectTypeBasicRecoveryPoint = "IaasVMRecoveryPoint" + // ObjectTypeRecoveryPoint ... + ObjectTypeRecoveryPoint ObjectTypeBasicRecoveryPoint = "RecoveryPoint" +) + +// PossibleObjectTypeBasicRecoveryPointValues returns an array of possible values for the ObjectTypeBasicRecoveryPoint const type. +func PossibleObjectTypeBasicRecoveryPointValues() []ObjectTypeBasicRecoveryPoint { + return []ObjectTypeBasicRecoveryPoint{ObjectTypeAzureFileShareRecoveryPoint, ObjectTypeAzureWorkloadPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadRecoveryPoint, ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadSAPHanaRecoveryPoint, ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadSQLRecoveryPoint, ObjectTypeGenericRecoveryPoint, ObjectTypeIaasVMRecoveryPoint, ObjectTypeRecoveryPoint} +} + +// ObjectTypeBasicRequest enumerates the values for object type basic request. +type ObjectTypeBasicRequest string + +const ( + // ObjectTypeAzureFileShareBackupRequest ... + ObjectTypeAzureFileShareBackupRequest ObjectTypeBasicRequest = "AzureFileShareBackupRequest" + // ObjectTypeAzureWorkloadBackupRequest ... + ObjectTypeAzureWorkloadBackupRequest ObjectTypeBasicRequest = "AzureWorkloadBackupRequest" + // ObjectTypeBackupRequest ... + ObjectTypeBackupRequest ObjectTypeBasicRequest = "BackupRequest" + // ObjectTypeIaasVMBackupRequest ... + ObjectTypeIaasVMBackupRequest ObjectTypeBasicRequest = "IaasVMBackupRequest" +) + +// PossibleObjectTypeBasicRequestValues returns an array of possible values for the ObjectTypeBasicRequest const type. +func PossibleObjectTypeBasicRequestValues() []ObjectTypeBasicRequest { + return []ObjectTypeBasicRequest{ObjectTypeAzureFileShareBackupRequest, ObjectTypeAzureWorkloadBackupRequest, ObjectTypeBackupRequest, ObjectTypeIaasVMBackupRequest} +} + +// ObjectTypeBasicRestoreRequest enumerates the values for object type basic restore request. +type ObjectTypeBasicRestoreRequest string + +const ( + // ObjectTypeAzureFileShareRestoreRequest ... + ObjectTypeAzureFileShareRestoreRequest ObjectTypeBasicRestoreRequest = "AzureFileShareRestoreRequest" + // ObjectTypeAzureWorkloadPointInTimeRestoreRequest ... + ObjectTypeAzureWorkloadPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadPointInTimeRestoreRequest" + // ObjectTypeAzureWorkloadRestoreRequest ... + ObjectTypeAzureWorkloadRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadRestoreRequest" + // ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest ... + ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" + // ObjectTypeAzureWorkloadSAPHanaRestoreRequest ... + ObjectTypeAzureWorkloadSAPHanaRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSAPHanaRestoreRequest" + // ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest ... + ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSQLPointInTimeRestoreRequest" + // ObjectTypeAzureWorkloadSQLRestoreRequest ... + ObjectTypeAzureWorkloadSQLRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSQLRestoreRequest" + // ObjectTypeIaasVMRestoreRequest ... + ObjectTypeIaasVMRestoreRequest ObjectTypeBasicRestoreRequest = "IaasVMRestoreRequest" + // ObjectTypeRestoreRequest ... + ObjectTypeRestoreRequest ObjectTypeBasicRestoreRequest = "RestoreRequest" +) + +// PossibleObjectTypeBasicRestoreRequestValues returns an array of possible values for the ObjectTypeBasicRestoreRequest const type. +func PossibleObjectTypeBasicRestoreRequestValues() []ObjectTypeBasicRestoreRequest { + return []ObjectTypeBasicRestoreRequest{ObjectTypeAzureFileShareRestoreRequest, ObjectTypeAzureWorkloadPointInTimeRestoreRequest, ObjectTypeAzureWorkloadRestoreRequest, ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest, ObjectTypeAzureWorkloadSAPHanaRestoreRequest, ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest, ObjectTypeAzureWorkloadSQLRestoreRequest, ObjectTypeIaasVMRestoreRequest, ObjectTypeRestoreRequest} +} + +// ObjectTypeBasicValidateOperationRequest enumerates the values for object type basic validate operation +// request. +type ObjectTypeBasicValidateOperationRequest string + +const ( + // ObjectTypeValidateIaasVMRestoreOperationRequest ... + ObjectTypeValidateIaasVMRestoreOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateIaasVMRestoreOperationRequest" + // ObjectTypeValidateOperationRequest ... + ObjectTypeValidateOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateOperationRequest" + // ObjectTypeValidateRestoreOperationRequest ... + ObjectTypeValidateRestoreOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateRestoreOperationRequest" +) + +// PossibleObjectTypeBasicValidateOperationRequestValues returns an array of possible values for the ObjectTypeBasicValidateOperationRequest const type. +func PossibleObjectTypeBasicValidateOperationRequestValues() []ObjectTypeBasicValidateOperationRequest { + return []ObjectTypeBasicValidateOperationRequest{ObjectTypeValidateIaasVMRestoreOperationRequest, ObjectTypeValidateOperationRequest, ObjectTypeValidateRestoreOperationRequest} +} + +// OperationStatusValues enumerates the values for operation status values. +type OperationStatusValues string + +const ( + // OperationStatusValuesCanceled ... + OperationStatusValuesCanceled OperationStatusValues = "Canceled" + // OperationStatusValuesFailed ... + OperationStatusValuesFailed OperationStatusValues = "Failed" + // OperationStatusValuesInProgress ... + OperationStatusValuesInProgress OperationStatusValues = "InProgress" + // OperationStatusValuesInvalid ... + OperationStatusValuesInvalid OperationStatusValues = "Invalid" + // OperationStatusValuesSucceeded ... + OperationStatusValuesSucceeded OperationStatusValues = "Succeeded" +) + +// PossibleOperationStatusValuesValues returns an array of possible values for the OperationStatusValues const type. +func PossibleOperationStatusValuesValues() []OperationStatusValues { + return []OperationStatusValues{OperationStatusValuesCanceled, OperationStatusValuesFailed, OperationStatusValuesInProgress, OperationStatusValuesInvalid, OperationStatusValuesSucceeded} +} + +// OperationType enumerates the values for operation type. +type OperationType string + +const ( + // OperationTypeInvalid ... + OperationTypeInvalid OperationType = "Invalid" + // OperationTypeRegister ... + OperationTypeRegister OperationType = "Register" + // OperationTypeReregister ... + OperationTypeReregister OperationType = "Reregister" +) + +// PossibleOperationTypeValues returns an array of possible values for the OperationType const type. +func PossibleOperationTypeValues() []OperationType { + return []OperationType{OperationTypeInvalid, OperationTypeRegister, OperationTypeReregister} +} + +// OverwriteOptions enumerates the values for overwrite options. +type OverwriteOptions string + +const ( + // OverwriteOptionsFailOnConflict ... + OverwriteOptionsFailOnConflict OverwriteOptions = "FailOnConflict" + // OverwriteOptionsInvalid ... + OverwriteOptionsInvalid OverwriteOptions = "Invalid" + // OverwriteOptionsOverwrite ... + OverwriteOptionsOverwrite OverwriteOptions = "Overwrite" +) + +// PossibleOverwriteOptionsValues returns an array of possible values for the OverwriteOptions const type. +func PossibleOverwriteOptionsValues() []OverwriteOptions { + return []OverwriteOptions{OverwriteOptionsFailOnConflict, OverwriteOptionsInvalid, OverwriteOptionsOverwrite} +} + +// PolicyType enumerates the values for policy type. +type PolicyType string + +const ( + // PolicyTypeCopyOnlyFull ... + PolicyTypeCopyOnlyFull PolicyType = "CopyOnlyFull" + // PolicyTypeDifferential ... + PolicyTypeDifferential PolicyType = "Differential" + // PolicyTypeFull ... + PolicyTypeFull PolicyType = "Full" + // PolicyTypeInvalid ... + PolicyTypeInvalid PolicyType = "Invalid" + // PolicyTypeLog ... + PolicyTypeLog PolicyType = "Log" +) + +// PossiblePolicyTypeValues returns an array of possible values for the PolicyType const type. +func PossiblePolicyTypeValues() []PolicyType { + return []PolicyType{PolicyTypeCopyOnlyFull, PolicyTypeDifferential, PolicyTypeFull, PolicyTypeInvalid, PolicyTypeLog} +} + +// ProtectableContainerType enumerates the values for protectable container type. +type ProtectableContainerType string + +const ( + // ProtectableContainerTypeProtectableContainer ... + ProtectableContainerTypeProtectableContainer ProtectableContainerType = "ProtectableContainer" + // ProtectableContainerTypeStorageContainer ... + ProtectableContainerTypeStorageContainer ProtectableContainerType = "StorageContainer" + // ProtectableContainerTypeVMAppContainer ... + ProtectableContainerTypeVMAppContainer ProtectableContainerType = "VMAppContainer" +) + +// PossibleProtectableContainerTypeValues returns an array of possible values for the ProtectableContainerType const type. +func PossibleProtectableContainerTypeValues() []ProtectableContainerType { + return []ProtectableContainerType{ProtectableContainerTypeProtectableContainer, ProtectableContainerTypeStorageContainer, ProtectableContainerTypeVMAppContainer} +} + +// ProtectableItemType enumerates the values for protectable item type. +type ProtectableItemType string + +const ( + // ProtectableItemTypeAzureFileShare ... + ProtectableItemTypeAzureFileShare ProtectableItemType = "AzureFileShare" + // ProtectableItemTypeAzureVMWorkloadProtectableItem ... + ProtectableItemTypeAzureVMWorkloadProtectableItem ProtectableItemType = "AzureVmWorkloadProtectableItem" + // ProtectableItemTypeIaaSVMProtectableItem ... + ProtectableItemTypeIaaSVMProtectableItem ProtectableItemType = "IaaSVMProtectableItem" + // ProtectableItemTypeMicrosoftClassicComputevirtualMachines ... + ProtectableItemTypeMicrosoftClassicComputevirtualMachines ProtectableItemType = "Microsoft.ClassicCompute/virtualMachines" + // ProtectableItemTypeMicrosoftComputevirtualMachines ... + ProtectableItemTypeMicrosoftComputevirtualMachines ProtectableItemType = "Microsoft.Compute/virtualMachines" + // ProtectableItemTypeSAPAseSystem ... + ProtectableItemTypeSAPAseSystem ProtectableItemType = "SAPAseSystem" + // ProtectableItemTypeSAPHanaDatabase ... + ProtectableItemTypeSAPHanaDatabase ProtectableItemType = "SAPHanaDatabase" + // ProtectableItemTypeSAPHanaSystem ... + ProtectableItemTypeSAPHanaSystem ProtectableItemType = "SAPHanaSystem" + // ProtectableItemTypeSQLAvailabilityGroupContainer ... + ProtectableItemTypeSQLAvailabilityGroupContainer ProtectableItemType = "SQLAvailabilityGroupContainer" + // ProtectableItemTypeSQLDataBase ... + ProtectableItemTypeSQLDataBase ProtectableItemType = "SQLDataBase" + // ProtectableItemTypeSQLInstance ... + ProtectableItemTypeSQLInstance ProtectableItemType = "SQLInstance" + // ProtectableItemTypeWorkloadProtectableItem ... + ProtectableItemTypeWorkloadProtectableItem ProtectableItemType = "WorkloadProtectableItem" +) + +// PossibleProtectableItemTypeValues returns an array of possible values for the ProtectableItemType const type. +func PossibleProtectableItemTypeValues() []ProtectableItemType { + return []ProtectableItemType{ProtectableItemTypeAzureFileShare, ProtectableItemTypeAzureVMWorkloadProtectableItem, ProtectableItemTypeIaaSVMProtectableItem, ProtectableItemTypeMicrosoftClassicComputevirtualMachines, ProtectableItemTypeMicrosoftComputevirtualMachines, ProtectableItemTypeSAPAseSystem, ProtectableItemTypeSAPHanaDatabase, ProtectableItemTypeSAPHanaSystem, ProtectableItemTypeSQLAvailabilityGroupContainer, ProtectableItemTypeSQLDataBase, ProtectableItemTypeSQLInstance, ProtectableItemTypeWorkloadProtectableItem} +} + +// ProtectedItemHealthStatus enumerates the values for protected item health status. +type ProtectedItemHealthStatus string + +const ( + // ProtectedItemHealthStatusHealthy ... + ProtectedItemHealthStatusHealthy ProtectedItemHealthStatus = "Healthy" + // ProtectedItemHealthStatusInvalid ... + ProtectedItemHealthStatusInvalid ProtectedItemHealthStatus = "Invalid" + // ProtectedItemHealthStatusIRPending ... + ProtectedItemHealthStatusIRPending ProtectedItemHealthStatus = "IRPending" + // ProtectedItemHealthStatusNotReachable ... + ProtectedItemHealthStatusNotReachable ProtectedItemHealthStatus = "NotReachable" + // ProtectedItemHealthStatusUnhealthy ... + ProtectedItemHealthStatusUnhealthy ProtectedItemHealthStatus = "Unhealthy" +) + +// PossibleProtectedItemHealthStatusValues returns an array of possible values for the ProtectedItemHealthStatus const type. +func PossibleProtectedItemHealthStatusValues() []ProtectedItemHealthStatus { + return []ProtectedItemHealthStatus{ProtectedItemHealthStatusHealthy, ProtectedItemHealthStatusInvalid, ProtectedItemHealthStatusIRPending, ProtectedItemHealthStatusNotReachable, ProtectedItemHealthStatusUnhealthy} +} + +// ProtectedItemState enumerates the values for protected item state. +type ProtectedItemState string + +const ( + // ProtectedItemStateInvalid ... + ProtectedItemStateInvalid ProtectedItemState = "Invalid" + // ProtectedItemStateIRPending ... + ProtectedItemStateIRPending ProtectedItemState = "IRPending" + // ProtectedItemStateProtected ... + ProtectedItemStateProtected ProtectedItemState = "Protected" + // ProtectedItemStateProtectionError ... + ProtectedItemStateProtectionError ProtectedItemState = "ProtectionError" + // ProtectedItemStateProtectionPaused ... + ProtectedItemStateProtectionPaused ProtectedItemState = "ProtectionPaused" + // ProtectedItemStateProtectionStopped ... + ProtectedItemStateProtectionStopped ProtectedItemState = "ProtectionStopped" +) + +// PossibleProtectedItemStateValues returns an array of possible values for the ProtectedItemState const type. +func PossibleProtectedItemStateValues() []ProtectedItemState { + return []ProtectedItemState{ProtectedItemStateInvalid, ProtectedItemStateIRPending, ProtectedItemStateProtected, ProtectedItemStateProtectionError, ProtectedItemStateProtectionPaused, ProtectedItemStateProtectionStopped} +} + +// ProtectedItemType enumerates the values for protected item type. +type ProtectedItemType string + +const ( + // ProtectedItemTypeAzureFileShareProtectedItem ... + ProtectedItemTypeAzureFileShareProtectedItem ProtectedItemType = "AzureFileShareProtectedItem" + // ProtectedItemTypeAzureIaaSVMProtectedItem ... + ProtectedItemTypeAzureIaaSVMProtectedItem ProtectedItemType = "AzureIaaSVMProtectedItem" + // ProtectedItemTypeAzureVMWorkloadProtectedItem ... + ProtectedItemTypeAzureVMWorkloadProtectedItem ProtectedItemType = "AzureVmWorkloadProtectedItem" + // ProtectedItemTypeAzureVMWorkloadSAPAseDatabase ... + ProtectedItemTypeAzureVMWorkloadSAPAseDatabase ProtectedItemType = "AzureVmWorkloadSAPAseDatabase" + // ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase ... + ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase ProtectedItemType = "AzureVmWorkloadSAPHanaDatabase" + // ProtectedItemTypeAzureVMWorkloadSQLDatabase ... + ProtectedItemTypeAzureVMWorkloadSQLDatabase ProtectedItemType = "AzureVmWorkloadSQLDatabase" + // ProtectedItemTypeDPMProtectedItem ... + ProtectedItemTypeDPMProtectedItem ProtectedItemType = "DPMProtectedItem" + // ProtectedItemTypeGenericProtectedItem ... + ProtectedItemTypeGenericProtectedItem ProtectedItemType = "GenericProtectedItem" + // ProtectedItemTypeMabFileFolderProtectedItem ... + ProtectedItemTypeMabFileFolderProtectedItem ProtectedItemType = "MabFileFolderProtectedItem" + // ProtectedItemTypeMicrosoftClassicComputevirtualMachines ... + ProtectedItemTypeMicrosoftClassicComputevirtualMachines ProtectedItemType = "Microsoft.ClassicCompute/virtualMachines" + // ProtectedItemTypeMicrosoftComputevirtualMachines ... + ProtectedItemTypeMicrosoftComputevirtualMachines ProtectedItemType = "Microsoft.Compute/virtualMachines" + // ProtectedItemTypeMicrosoftSqlserversdatabases ... + ProtectedItemTypeMicrosoftSqlserversdatabases ProtectedItemType = "Microsoft.Sql/servers/databases" + // ProtectedItemTypeProtectedItem ... + ProtectedItemTypeProtectedItem ProtectedItemType = "ProtectedItem" +) + +// PossibleProtectedItemTypeValues returns an array of possible values for the ProtectedItemType const type. +func PossibleProtectedItemTypeValues() []ProtectedItemType { + return []ProtectedItemType{ProtectedItemTypeAzureFileShareProtectedItem, ProtectedItemTypeAzureIaaSVMProtectedItem, ProtectedItemTypeAzureVMWorkloadProtectedItem, ProtectedItemTypeAzureVMWorkloadSAPAseDatabase, ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase, ProtectedItemTypeAzureVMWorkloadSQLDatabase, ProtectedItemTypeDPMProtectedItem, ProtectedItemTypeGenericProtectedItem, ProtectedItemTypeMabFileFolderProtectedItem, ProtectedItemTypeMicrosoftClassicComputevirtualMachines, ProtectedItemTypeMicrosoftComputevirtualMachines, ProtectedItemTypeMicrosoftSqlserversdatabases, ProtectedItemTypeProtectedItem} +} + +// ProtectionIntentItemType enumerates the values for protection intent item type. +type ProtectionIntentItemType string + +const ( + // ProtectionIntentItemTypeAzureResourceItem ... + ProtectionIntentItemTypeAzureResourceItem ProtectionIntentItemType = "AzureResourceItem" + // ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent ... + ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadAutoProtectionIntent" + // ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent ... + ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadSQLAutoProtectionIntent" + // ProtectionIntentItemTypeProtectionIntent ... + ProtectionIntentItemTypeProtectionIntent ProtectionIntentItemType = "ProtectionIntent" + // ProtectionIntentItemTypeRecoveryServiceVaultItem ... + ProtectionIntentItemTypeRecoveryServiceVaultItem ProtectionIntentItemType = "RecoveryServiceVaultItem" +) + +// PossibleProtectionIntentItemTypeValues returns an array of possible values for the ProtectionIntentItemType const type. +func PossibleProtectionIntentItemTypeValues() []ProtectionIntentItemType { + return []ProtectionIntentItemType{ProtectionIntentItemTypeAzureResourceItem, ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent, ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent, ProtectionIntentItemTypeProtectionIntent, ProtectionIntentItemTypeRecoveryServiceVaultItem} +} + +// ProtectionState enumerates the values for protection state. +type ProtectionState string + +const ( + // ProtectionStateInvalid ... + ProtectionStateInvalid ProtectionState = "Invalid" + // ProtectionStateIRPending ... + ProtectionStateIRPending ProtectionState = "IRPending" + // ProtectionStateProtected ... + ProtectionStateProtected ProtectionState = "Protected" + // ProtectionStateProtectionError ... + ProtectionStateProtectionError ProtectionState = "ProtectionError" + // ProtectionStateProtectionPaused ... + ProtectionStateProtectionPaused ProtectionState = "ProtectionPaused" + // ProtectionStateProtectionStopped ... + ProtectionStateProtectionStopped ProtectionState = "ProtectionStopped" +) + +// PossibleProtectionStateValues returns an array of possible values for the ProtectionState const type. +func PossibleProtectionStateValues() []ProtectionState { + return []ProtectionState{ProtectionStateInvalid, ProtectionStateIRPending, ProtectionStateProtected, ProtectionStateProtectionError, ProtectionStateProtectionPaused, ProtectionStateProtectionStopped} +} + +// ProtectionStatus enumerates the values for protection status. +type ProtectionStatus string + +const ( + // ProtectionStatusInvalid ... + ProtectionStatusInvalid ProtectionStatus = "Invalid" + // ProtectionStatusNotProtected ... + ProtectionStatusNotProtected ProtectionStatus = "NotProtected" + // ProtectionStatusProtected ... + ProtectionStatusProtected ProtectionStatus = "Protected" + // ProtectionStatusProtecting ... + ProtectionStatusProtecting ProtectionStatus = "Protecting" + // ProtectionStatusProtectionFailed ... + ProtectionStatusProtectionFailed ProtectionStatus = "ProtectionFailed" +) + +// PossibleProtectionStatusValues returns an array of possible values for the ProtectionStatus const type. +func PossibleProtectionStatusValues() []ProtectionStatus { + return []ProtectionStatus{ProtectionStatusInvalid, ProtectionStatusNotProtected, ProtectionStatusProtected, ProtectionStatusProtecting, ProtectionStatusProtectionFailed} +} + +// RecoveryMode enumerates the values for recovery mode. +type RecoveryMode string + +const ( + // RecoveryModeFileRecovery ... + RecoveryModeFileRecovery RecoveryMode = "FileRecovery" + // RecoveryModeInvalid ... + RecoveryModeInvalid RecoveryMode = "Invalid" + // RecoveryModeWorkloadRecovery ... + RecoveryModeWorkloadRecovery RecoveryMode = "WorkloadRecovery" +) + +// PossibleRecoveryModeValues returns an array of possible values for the RecoveryMode const type. +func PossibleRecoveryModeValues() []RecoveryMode { + return []RecoveryMode{RecoveryModeFileRecovery, RecoveryModeInvalid, RecoveryModeWorkloadRecovery} +} + +// RecoveryPointTierStatus enumerates the values for recovery point tier status. +type RecoveryPointTierStatus string + +const ( + // RecoveryPointTierStatusDeleted ... + RecoveryPointTierStatusDeleted RecoveryPointTierStatus = "Deleted" + // RecoveryPointTierStatusDisabled ... + RecoveryPointTierStatusDisabled RecoveryPointTierStatus = "Disabled" + // RecoveryPointTierStatusInvalid ... + RecoveryPointTierStatusInvalid RecoveryPointTierStatus = "Invalid" + // RecoveryPointTierStatusValid ... + RecoveryPointTierStatusValid RecoveryPointTierStatus = "Valid" +) + +// PossibleRecoveryPointTierStatusValues returns an array of possible values for the RecoveryPointTierStatus const type. +func PossibleRecoveryPointTierStatusValues() []RecoveryPointTierStatus { + return []RecoveryPointTierStatus{RecoveryPointTierStatusDeleted, RecoveryPointTierStatusDisabled, RecoveryPointTierStatusInvalid, RecoveryPointTierStatusValid} +} + +// RecoveryPointTierType enumerates the values for recovery point tier type. +type RecoveryPointTierType string + +const ( + // RecoveryPointTierTypeHardenedRP ... + RecoveryPointTierTypeHardenedRP RecoveryPointTierType = "HardenedRP" + // RecoveryPointTierTypeInstantRP ... + RecoveryPointTierTypeInstantRP RecoveryPointTierType = "InstantRP" + // RecoveryPointTierTypeInvalid ... + RecoveryPointTierTypeInvalid RecoveryPointTierType = "Invalid" +) + +// PossibleRecoveryPointTierTypeValues returns an array of possible values for the RecoveryPointTierType const type. +func PossibleRecoveryPointTierTypeValues() []RecoveryPointTierType { + return []RecoveryPointTierType{RecoveryPointTierTypeHardenedRP, RecoveryPointTierTypeInstantRP, RecoveryPointTierTypeInvalid} +} + +// RecoveryType enumerates the values for recovery type. +type RecoveryType string + +const ( + // RecoveryTypeAlternateLocation ... + RecoveryTypeAlternateLocation RecoveryType = "AlternateLocation" + // RecoveryTypeInvalid ... + RecoveryTypeInvalid RecoveryType = "Invalid" + // RecoveryTypeOffline ... + RecoveryTypeOffline RecoveryType = "Offline" + // RecoveryTypeOriginalLocation ... + RecoveryTypeOriginalLocation RecoveryType = "OriginalLocation" + // RecoveryTypeRestoreDisks ... + RecoveryTypeRestoreDisks RecoveryType = "RestoreDisks" +) + +// PossibleRecoveryTypeValues returns an array of possible values for the RecoveryType const type. +func PossibleRecoveryTypeValues() []RecoveryType { + return []RecoveryType{RecoveryTypeAlternateLocation, RecoveryTypeInvalid, RecoveryTypeOffline, RecoveryTypeOriginalLocation, RecoveryTypeRestoreDisks} +} + +// RestorePointQueryType enumerates the values for restore point query type. +type RestorePointQueryType string + +const ( + // RestorePointQueryTypeAll ... + RestorePointQueryTypeAll RestorePointQueryType = "All" + // RestorePointQueryTypeDifferential ... + RestorePointQueryTypeDifferential RestorePointQueryType = "Differential" + // RestorePointQueryTypeFull ... + RestorePointQueryTypeFull RestorePointQueryType = "Full" + // RestorePointQueryTypeFullAndDifferential ... + RestorePointQueryTypeFullAndDifferential RestorePointQueryType = "FullAndDifferential" + // RestorePointQueryTypeInvalid ... + RestorePointQueryTypeInvalid RestorePointQueryType = "Invalid" + // RestorePointQueryTypeLog ... + RestorePointQueryTypeLog RestorePointQueryType = "Log" +) + +// PossibleRestorePointQueryTypeValues returns an array of possible values for the RestorePointQueryType const type. +func PossibleRestorePointQueryTypeValues() []RestorePointQueryType { + return []RestorePointQueryType{RestorePointQueryTypeAll, RestorePointQueryTypeDifferential, RestorePointQueryTypeFull, RestorePointQueryTypeFullAndDifferential, RestorePointQueryTypeInvalid, RestorePointQueryTypeLog} +} + +// RestorePointType enumerates the values for restore point type. +type RestorePointType string + +const ( + // RestorePointTypeDifferential ... + RestorePointTypeDifferential RestorePointType = "Differential" + // RestorePointTypeFull ... + RestorePointTypeFull RestorePointType = "Full" + // RestorePointTypeInvalid ... + RestorePointTypeInvalid RestorePointType = "Invalid" + // RestorePointTypeLog ... + RestorePointTypeLog RestorePointType = "Log" +) + +// PossibleRestorePointTypeValues returns an array of possible values for the RestorePointType const type. +func PossibleRestorePointTypeValues() []RestorePointType { + return []RestorePointType{RestorePointTypeDifferential, RestorePointTypeFull, RestorePointTypeInvalid, RestorePointTypeLog} +} + +// RestoreRequestType enumerates the values for restore request type. +type RestoreRequestType string + +const ( + // RestoreRequestTypeFullShareRestore ... + RestoreRequestTypeFullShareRestore RestoreRequestType = "FullShareRestore" + // RestoreRequestTypeInvalid ... + RestoreRequestTypeInvalid RestoreRequestType = "Invalid" + // RestoreRequestTypeItemLevelRestore ... + RestoreRequestTypeItemLevelRestore RestoreRequestType = "ItemLevelRestore" +) + +// PossibleRestoreRequestTypeValues returns an array of possible values for the RestoreRequestType const type. +func PossibleRestoreRequestTypeValues() []RestoreRequestType { + return []RestoreRequestType{RestoreRequestTypeFullShareRestore, RestoreRequestTypeInvalid, RestoreRequestTypeItemLevelRestore} +} + +// RetentionDurationType enumerates the values for retention duration type. +type RetentionDurationType string + +const ( + // RetentionDurationTypeDays ... + RetentionDurationTypeDays RetentionDurationType = "Days" + // RetentionDurationTypeInvalid ... + RetentionDurationTypeInvalid RetentionDurationType = "Invalid" + // RetentionDurationTypeMonths ... + RetentionDurationTypeMonths RetentionDurationType = "Months" + // RetentionDurationTypeWeeks ... + RetentionDurationTypeWeeks RetentionDurationType = "Weeks" + // RetentionDurationTypeYears ... + RetentionDurationTypeYears RetentionDurationType = "Years" +) + +// PossibleRetentionDurationTypeValues returns an array of possible values for the RetentionDurationType const type. +func PossibleRetentionDurationTypeValues() []RetentionDurationType { + return []RetentionDurationType{RetentionDurationTypeDays, RetentionDurationTypeInvalid, RetentionDurationTypeMonths, RetentionDurationTypeWeeks, RetentionDurationTypeYears} +} + +// RetentionPolicyType enumerates the values for retention policy type. +type RetentionPolicyType string + +const ( + // RetentionPolicyTypeLongTermRetentionPolicy ... + RetentionPolicyTypeLongTermRetentionPolicy RetentionPolicyType = "LongTermRetentionPolicy" + // RetentionPolicyTypeRetentionPolicy ... + RetentionPolicyTypeRetentionPolicy RetentionPolicyType = "RetentionPolicy" + // RetentionPolicyTypeSimpleRetentionPolicy ... + RetentionPolicyTypeSimpleRetentionPolicy RetentionPolicyType = "SimpleRetentionPolicy" +) + +// PossibleRetentionPolicyTypeValues returns an array of possible values for the RetentionPolicyType const type. +func PossibleRetentionPolicyTypeValues() []RetentionPolicyType { + return []RetentionPolicyType{RetentionPolicyTypeLongTermRetentionPolicy, RetentionPolicyTypeRetentionPolicy, RetentionPolicyTypeSimpleRetentionPolicy} +} + +// RetentionScheduleFormat enumerates the values for retention schedule format. +type RetentionScheduleFormat string + +const ( + // RetentionScheduleFormatDaily ... + RetentionScheduleFormatDaily RetentionScheduleFormat = "Daily" + // RetentionScheduleFormatInvalid ... + RetentionScheduleFormatInvalid RetentionScheduleFormat = "Invalid" + // RetentionScheduleFormatWeekly ... + RetentionScheduleFormatWeekly RetentionScheduleFormat = "Weekly" +) + +// PossibleRetentionScheduleFormatValues returns an array of possible values for the RetentionScheduleFormat const type. +func PossibleRetentionScheduleFormatValues() []RetentionScheduleFormat { + return []RetentionScheduleFormat{RetentionScheduleFormatDaily, RetentionScheduleFormatInvalid, RetentionScheduleFormatWeekly} +} + +// SchedulePolicyType enumerates the values for schedule policy type. +type SchedulePolicyType string + +const ( + // SchedulePolicyTypeLogSchedulePolicy ... + SchedulePolicyTypeLogSchedulePolicy SchedulePolicyType = "LogSchedulePolicy" + // SchedulePolicyTypeLongTermSchedulePolicy ... + SchedulePolicyTypeLongTermSchedulePolicy SchedulePolicyType = "LongTermSchedulePolicy" + // SchedulePolicyTypeSchedulePolicy ... + SchedulePolicyTypeSchedulePolicy SchedulePolicyType = "SchedulePolicy" + // SchedulePolicyTypeSimpleSchedulePolicy ... + SchedulePolicyTypeSimpleSchedulePolicy SchedulePolicyType = "SimpleSchedulePolicy" +) + +// PossibleSchedulePolicyTypeValues returns an array of possible values for the SchedulePolicyType const type. +func PossibleSchedulePolicyTypeValues() []SchedulePolicyType { + return []SchedulePolicyType{SchedulePolicyTypeLogSchedulePolicy, SchedulePolicyTypeLongTermSchedulePolicy, SchedulePolicyTypeSchedulePolicy, SchedulePolicyTypeSimpleSchedulePolicy} +} + +// ScheduleRunType enumerates the values for schedule run type. +type ScheduleRunType string + +const ( + // ScheduleRunTypeDaily ... + ScheduleRunTypeDaily ScheduleRunType = "Daily" + // ScheduleRunTypeInvalid ... + ScheduleRunTypeInvalid ScheduleRunType = "Invalid" + // ScheduleRunTypeWeekly ... + ScheduleRunTypeWeekly ScheduleRunType = "Weekly" +) + +// PossibleScheduleRunTypeValues returns an array of possible values for the ScheduleRunType const type. +func PossibleScheduleRunTypeValues() []ScheduleRunType { + return []ScheduleRunType{ScheduleRunTypeDaily, ScheduleRunTypeInvalid, ScheduleRunTypeWeekly} +} + +// SoftDeleteFeatureState enumerates the values for soft delete feature state. +type SoftDeleteFeatureState string + +const ( + // SoftDeleteFeatureStateDisabled ... + SoftDeleteFeatureStateDisabled SoftDeleteFeatureState = "Disabled" + // SoftDeleteFeatureStateEnabled ... + SoftDeleteFeatureStateEnabled SoftDeleteFeatureState = "Enabled" + // SoftDeleteFeatureStateInvalid ... + SoftDeleteFeatureStateInvalid SoftDeleteFeatureState = "Invalid" +) + +// PossibleSoftDeleteFeatureStateValues returns an array of possible values for the SoftDeleteFeatureState const type. +func PossibleSoftDeleteFeatureStateValues() []SoftDeleteFeatureState { + return []SoftDeleteFeatureState{SoftDeleteFeatureStateDisabled, SoftDeleteFeatureStateEnabled, SoftDeleteFeatureStateInvalid} +} + +// SQLDataDirectoryType enumerates the values for sql data directory type. +type SQLDataDirectoryType string + +const ( + // SQLDataDirectoryTypeData ... + SQLDataDirectoryTypeData SQLDataDirectoryType = "Data" + // SQLDataDirectoryTypeInvalid ... + SQLDataDirectoryTypeInvalid SQLDataDirectoryType = "Invalid" + // SQLDataDirectoryTypeLog ... + SQLDataDirectoryTypeLog SQLDataDirectoryType = "Log" +) + +// PossibleSQLDataDirectoryTypeValues returns an array of possible values for the SQLDataDirectoryType const type. +func PossibleSQLDataDirectoryTypeValues() []SQLDataDirectoryType { + return []SQLDataDirectoryType{SQLDataDirectoryTypeData, SQLDataDirectoryTypeInvalid, SQLDataDirectoryTypeLog} +} + +// StorageType enumerates the values for storage type. +type StorageType string + +const ( + // StorageTypeGeoRedundant ... + StorageTypeGeoRedundant StorageType = "GeoRedundant" + // StorageTypeInvalid ... + StorageTypeInvalid StorageType = "Invalid" + // StorageTypeLocallyRedundant ... + StorageTypeLocallyRedundant StorageType = "LocallyRedundant" +) + +// PossibleStorageTypeValues returns an array of possible values for the StorageType const type. +func PossibleStorageTypeValues() []StorageType { + return []StorageType{StorageTypeGeoRedundant, StorageTypeInvalid, StorageTypeLocallyRedundant} +} + +// StorageTypeState enumerates the values for storage type state. +type StorageTypeState string + +const ( + // StorageTypeStateInvalid ... + StorageTypeStateInvalid StorageTypeState = "Invalid" + // StorageTypeStateLocked ... + StorageTypeStateLocked StorageTypeState = "Locked" + // StorageTypeStateUnlocked ... + StorageTypeStateUnlocked StorageTypeState = "Unlocked" +) + +// PossibleStorageTypeStateValues returns an array of possible values for the StorageTypeState const type. +func PossibleStorageTypeStateValues() []StorageTypeState { + return []StorageTypeState{StorageTypeStateInvalid, StorageTypeStateLocked, StorageTypeStateUnlocked} +} + +// SupportStatus enumerates the values for support status. +type SupportStatus string + +const ( + // SupportStatusDefaultOFF ... + SupportStatusDefaultOFF SupportStatus = "DefaultOFF" + // SupportStatusDefaultON ... + SupportStatusDefaultON SupportStatus = "DefaultON" + // SupportStatusInvalid ... + SupportStatusInvalid SupportStatus = "Invalid" + // SupportStatusNotSupported ... + SupportStatusNotSupported SupportStatus = "NotSupported" + // SupportStatusSupported ... + SupportStatusSupported SupportStatus = "Supported" +) + +// PossibleSupportStatusValues returns an array of possible values for the SupportStatus const type. +func PossibleSupportStatusValues() []SupportStatus { + return []SupportStatus{SupportStatusDefaultOFF, SupportStatusDefaultON, SupportStatusInvalid, SupportStatusNotSupported, SupportStatusSupported} +} + +// Type enumerates the values for type. +type Type string + +const ( + // TypeBackupProtectedItemCountSummary ... + TypeBackupProtectedItemCountSummary Type = "BackupProtectedItemCountSummary" + // TypeBackupProtectionContainerCountSummary ... + TypeBackupProtectionContainerCountSummary Type = "BackupProtectionContainerCountSummary" + // TypeInvalid ... + TypeInvalid Type = "Invalid" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{TypeBackupProtectedItemCountSummary, TypeBackupProtectionContainerCountSummary, TypeInvalid} +} + +// TypeEnum enumerates the values for type enum. +type TypeEnum string + +const ( + // TypeEnumCopyOnlyFull ... + TypeEnumCopyOnlyFull TypeEnum = "CopyOnlyFull" + // TypeEnumDifferential ... + TypeEnumDifferential TypeEnum = "Differential" + // TypeEnumFull ... + TypeEnumFull TypeEnum = "Full" + // TypeEnumInvalid ... + TypeEnumInvalid TypeEnum = "Invalid" + // TypeEnumLog ... + TypeEnumLog TypeEnum = "Log" +) + +// PossibleTypeEnumValues returns an array of possible values for the TypeEnum const type. +func PossibleTypeEnumValues() []TypeEnum { + return []TypeEnum{TypeEnumCopyOnlyFull, TypeEnumDifferential, TypeEnumFull, TypeEnumInvalid, TypeEnumLog} +} + +// UsagesUnit enumerates the values for usages unit. +type UsagesUnit string + +const ( + // Bytes ... + Bytes UsagesUnit = "Bytes" + // BytesPerSecond ... + BytesPerSecond UsagesUnit = "BytesPerSecond" + // Count ... + Count UsagesUnit = "Count" + // CountPerSecond ... + CountPerSecond UsagesUnit = "CountPerSecond" + // Percent ... + Percent UsagesUnit = "Percent" + // Seconds ... + Seconds UsagesUnit = "Seconds" +) + +// PossibleUsagesUnitValues returns an array of possible values for the UsagesUnit const type. +func PossibleUsagesUnitValues() []UsagesUnit { + return []UsagesUnit{Bytes, BytesPerSecond, Count, CountPerSecond, Percent, Seconds} +} + +// ValidationStatus enumerates the values for validation status. +type ValidationStatus string + +const ( + // ValidationStatusFailed ... + ValidationStatusFailed ValidationStatus = "Failed" + // ValidationStatusInvalid ... + ValidationStatusInvalid ValidationStatus = "Invalid" + // ValidationStatusSucceeded ... + ValidationStatusSucceeded ValidationStatus = "Succeeded" +) + +// PossibleValidationStatusValues returns an array of possible values for the ValidationStatus const type. +func PossibleValidationStatusValues() []ValidationStatus { + return []ValidationStatus{ValidationStatusFailed, ValidationStatusInvalid, ValidationStatusSucceeded} +} + +// WeekOfMonth enumerates the values for week of month. +type WeekOfMonth string + +const ( + // WeekOfMonthFirst ... + WeekOfMonthFirst WeekOfMonth = "First" + // WeekOfMonthFourth ... + WeekOfMonthFourth WeekOfMonth = "Fourth" + // WeekOfMonthInvalid ... + WeekOfMonthInvalid WeekOfMonth = "Invalid" + // WeekOfMonthLast ... + WeekOfMonthLast WeekOfMonth = "Last" + // WeekOfMonthSecond ... + WeekOfMonthSecond WeekOfMonth = "Second" + // WeekOfMonthThird ... + WeekOfMonthThird WeekOfMonth = "Third" +) + +// PossibleWeekOfMonthValues returns an array of possible values for the WeekOfMonth const type. +func PossibleWeekOfMonthValues() []WeekOfMonth { + return []WeekOfMonth{WeekOfMonthFirst, WeekOfMonthFourth, WeekOfMonthInvalid, WeekOfMonthLast, WeekOfMonthSecond, WeekOfMonthThird} +} + +// WorkloadItemType enumerates the values for workload item type. +type WorkloadItemType string + +const ( + // WorkloadItemTypeInvalid ... + WorkloadItemTypeInvalid WorkloadItemType = "Invalid" + // WorkloadItemTypeSAPAseDatabase ... + WorkloadItemTypeSAPAseDatabase WorkloadItemType = "SAPAseDatabase" + // WorkloadItemTypeSAPAseSystem ... + WorkloadItemTypeSAPAseSystem WorkloadItemType = "SAPAseSystem" + // WorkloadItemTypeSAPHanaDatabase ... + WorkloadItemTypeSAPHanaDatabase WorkloadItemType = "SAPHanaDatabase" + // WorkloadItemTypeSAPHanaSystem ... + WorkloadItemTypeSAPHanaSystem WorkloadItemType = "SAPHanaSystem" + // WorkloadItemTypeSQLDataBase ... + WorkloadItemTypeSQLDataBase WorkloadItemType = "SQLDataBase" + // WorkloadItemTypeSQLInstance ... + WorkloadItemTypeSQLInstance WorkloadItemType = "SQLInstance" +) + +// PossibleWorkloadItemTypeValues returns an array of possible values for the WorkloadItemType const type. +func PossibleWorkloadItemTypeValues() []WorkloadItemType { + return []WorkloadItemType{WorkloadItemTypeInvalid, WorkloadItemTypeSAPAseDatabase, WorkloadItemTypeSAPAseSystem, WorkloadItemTypeSAPHanaDatabase, WorkloadItemTypeSAPHanaSystem, WorkloadItemTypeSQLDataBase, WorkloadItemTypeSQLInstance} +} + +// WorkloadItemTypeBasicWorkloadItem enumerates the values for workload item type basic workload item. +type WorkloadItemTypeBasicWorkloadItem string + +const ( + // WorkloadItemTypeAzureVMWorkloadItem ... + WorkloadItemTypeAzureVMWorkloadItem WorkloadItemTypeBasicWorkloadItem = "AzureVmWorkloadItem" + // WorkloadItemTypeSAPAseDatabase1 ... + WorkloadItemTypeSAPAseDatabase1 WorkloadItemTypeBasicWorkloadItem = "SAPAseDatabase" + // WorkloadItemTypeSAPAseSystem1 ... + WorkloadItemTypeSAPAseSystem1 WorkloadItemTypeBasicWorkloadItem = "SAPAseSystem" + // WorkloadItemTypeSAPHanaDatabase1 ... + WorkloadItemTypeSAPHanaDatabase1 WorkloadItemTypeBasicWorkloadItem = "SAPHanaDatabase" + // WorkloadItemTypeSAPHanaSystem1 ... + WorkloadItemTypeSAPHanaSystem1 WorkloadItemTypeBasicWorkloadItem = "SAPHanaSystem" + // WorkloadItemTypeSQLDataBase1 ... + WorkloadItemTypeSQLDataBase1 WorkloadItemTypeBasicWorkloadItem = "SQLDataBase" + // WorkloadItemTypeSQLInstance1 ... + WorkloadItemTypeSQLInstance1 WorkloadItemTypeBasicWorkloadItem = "SQLInstance" + // WorkloadItemTypeWorkloadItem ... + WorkloadItemTypeWorkloadItem WorkloadItemTypeBasicWorkloadItem = "WorkloadItem" +) + +// PossibleWorkloadItemTypeBasicWorkloadItemValues returns an array of possible values for the WorkloadItemTypeBasicWorkloadItem const type. +func PossibleWorkloadItemTypeBasicWorkloadItemValues() []WorkloadItemTypeBasicWorkloadItem { + return []WorkloadItemTypeBasicWorkloadItem{WorkloadItemTypeAzureVMWorkloadItem, WorkloadItemTypeSAPAseDatabase1, WorkloadItemTypeSAPAseSystem1, WorkloadItemTypeSAPHanaDatabase1, WorkloadItemTypeSAPHanaSystem1, WorkloadItemTypeSQLDataBase1, WorkloadItemTypeSQLInstance1, WorkloadItemTypeWorkloadItem} +} + +// WorkloadType enumerates the values for workload type. +type WorkloadType string + +const ( + // WorkloadTypeAzureFileShare ... + WorkloadTypeAzureFileShare WorkloadType = "AzureFileShare" + // WorkloadTypeAzureSQLDb ... + WorkloadTypeAzureSQLDb WorkloadType = "AzureSqlDb" + // WorkloadTypeClient ... + WorkloadTypeClient WorkloadType = "Client" + // WorkloadTypeExchange ... + WorkloadTypeExchange WorkloadType = "Exchange" + // WorkloadTypeFileFolder ... + WorkloadTypeFileFolder WorkloadType = "FileFolder" + // WorkloadTypeGenericDataSource ... + WorkloadTypeGenericDataSource WorkloadType = "GenericDataSource" + // WorkloadTypeInvalid ... + WorkloadTypeInvalid WorkloadType = "Invalid" + // WorkloadTypeSAPAseDatabase ... + WorkloadTypeSAPAseDatabase WorkloadType = "SAPAseDatabase" + // WorkloadTypeSAPHanaDatabase ... + WorkloadTypeSAPHanaDatabase WorkloadType = "SAPHanaDatabase" + // WorkloadTypeSharepoint ... + WorkloadTypeSharepoint WorkloadType = "Sharepoint" + // WorkloadTypeSQLDataBase ... + WorkloadTypeSQLDataBase WorkloadType = "SQLDataBase" + // WorkloadTypeSQLDB ... + WorkloadTypeSQLDB WorkloadType = "SQLDB" + // WorkloadTypeSystemState ... + WorkloadTypeSystemState WorkloadType = "SystemState" + // WorkloadTypeVM ... + WorkloadTypeVM WorkloadType = "VM" + // WorkloadTypeVMwareVM ... + WorkloadTypeVMwareVM WorkloadType = "VMwareVM" +) + +// PossibleWorkloadTypeValues returns an array of possible values for the WorkloadType const type. +func PossibleWorkloadTypeValues() []WorkloadType { + return []WorkloadType{WorkloadTypeAzureFileShare, WorkloadTypeAzureSQLDb, WorkloadTypeClient, WorkloadTypeExchange, WorkloadTypeFileFolder, WorkloadTypeGenericDataSource, WorkloadTypeInvalid, WorkloadTypeSAPAseDatabase, WorkloadTypeSAPHanaDatabase, WorkloadTypeSharepoint, WorkloadTypeSQLDataBase, WorkloadTypeSQLDB, WorkloadTypeSystemState, WorkloadTypeVM, WorkloadTypeVMwareVM} +} + +// AzureBackupGoalFeatureSupportRequest azure backup goal feature specific request. +type AzureBackupGoalFeatureSupportRequest struct { + // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' + FeatureType FeatureType `json:"featureType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { + abgfsr.FeatureType = FeatureTypeAzureBackupGoals + objectMap := make(map[string]interface{}) + if abgfsr.FeatureType != "" { + objectMap["featureType"] = abgfsr.FeatureType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { + return &abgfsr, true +} + +// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { + return nil, false +} + +// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { + return nil, false +} + +// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { + return &abgfsr, true +} + +// AzureBackupServerContainer azureBackupServer (DPMVenus) workload-specific protection container. +type AzureBackupServerContainer struct { + // CanReRegister - Specifies whether the container is re-registrable. + CanReRegister *bool `json:"canReRegister,omitempty"` + // ContainerID - ID of container. + ContainerID *string `json:"containerId,omitempty"` + // ProtectedItemCount - Number of protected items in the BackupEngine + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // DpmAgentVersion - Backup engine Agent version + DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` + // DpmServers - List of BackupEngines protecting the container + DpmServers *[]string `json:"dpmServers,omitempty"` + // UpgradeAvailable - To check if upgrade available + UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` + // ProtectionStatus - Protection status of the container. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ExtendedInfo - Extended Info of the container. + ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) { + absc.ContainerType = ContainerTypeAzureBackupServerContainer1 + objectMap := make(map[string]interface{}) + if absc.CanReRegister != nil { + objectMap["canReRegister"] = absc.CanReRegister + } + if absc.ContainerID != nil { + objectMap["containerId"] = absc.ContainerID + } + if absc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = absc.ProtectedItemCount + } + if absc.DpmAgentVersion != nil { + objectMap["dpmAgentVersion"] = absc.DpmAgentVersion + } + if absc.DpmServers != nil { + objectMap["dpmServers"] = absc.DpmServers + } + if absc.UpgradeAvailable != nil { + objectMap["upgradeAvailable"] = absc.UpgradeAvailable + } + if absc.ProtectionStatus != nil { + objectMap["protectionStatus"] = absc.ProtectionStatus + } + if absc.ExtendedInfo != nil { + objectMap["extendedInfo"] = absc.ExtendedInfo + } + if absc.FriendlyName != nil { + objectMap["friendlyName"] = absc.FriendlyName + } + if absc.BackupManagementType != "" { + objectMap["backupManagementType"] = absc.BackupManagementType + } + if absc.RegistrationStatus != nil { + objectMap["registrationStatus"] = absc.RegistrationStatus + } + if absc.HealthStatus != nil { + objectMap["healthStatus"] = absc.HealthStatus + } + if absc.ContainerType != "" { + objectMap["containerType"] = absc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return &absc, true +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return &absc, true +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &absc, true +} + +// AzureBackupServerEngine backup engine type when Azure Backup Server is used to manage the backups. +type AzureBackupServerEngine struct { + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string `json:"backupEngineState,omitempty"` + // HealthStatus - Backup status of the backup engine. + HealthStatus *string `json:"healthStatus,omitempty"` + // CanReRegister - Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool `json:"canReRegister,omitempty"` + // BackupEngineID - ID of the backup engine. + BackupEngineID *string `json:"backupEngineId,omitempty"` + // DpmVersion - Backup engine version + DpmVersion *string `json:"dpmVersion,omitempty"` + // AzureBackupAgentVersion - Backup agent version + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + // IsDpmUpgradeAvailable - To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + // ExtendedInfo - Extended info of the backupengine + ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` + // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' + BackupEngineType EngineType `json:"backupEngineType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) { + abse.BackupEngineType = BackupEngineTypeAzureBackupServerEngine + objectMap := make(map[string]interface{}) + if abse.FriendlyName != nil { + objectMap["friendlyName"] = abse.FriendlyName + } + if abse.BackupManagementType != "" { + objectMap["backupManagementType"] = abse.BackupManagementType + } + if abse.RegistrationStatus != nil { + objectMap["registrationStatus"] = abse.RegistrationStatus + } + if abse.BackupEngineState != nil { + objectMap["backupEngineState"] = abse.BackupEngineState + } + if abse.HealthStatus != nil { + objectMap["healthStatus"] = abse.HealthStatus + } + if abse.CanReRegister != nil { + objectMap["canReRegister"] = abse.CanReRegister + } + if abse.BackupEngineID != nil { + objectMap["backupEngineId"] = abse.BackupEngineID + } + if abse.DpmVersion != nil { + objectMap["dpmVersion"] = abse.DpmVersion + } + if abse.AzureBackupAgentVersion != nil { + objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion + } + if abse.IsAzureBackupAgentUpgradeAvailable != nil { + objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable + } + if abse.IsDpmUpgradeAvailable != nil { + objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable + } + if abse.ExtendedInfo != nil { + objectMap["extendedInfo"] = abse.ExtendedInfo + } + if abse.BackupEngineType != "" { + objectMap["backupEngineType"] = abse.BackupEngineType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerEngine is the BasicEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { + return &abse, true +} + +// AsDpmBackupEngine is the BasicEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return nil, false +} + +// AsEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) { + return nil, false +} + +// AsBasicEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) { + return &abse, true +} + +// AzureFileShareBackupRequest azureFileShare workload-specific backup request. +type AzureFileShareBackupRequest struct { + // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { + afsbr.ObjectType = ObjectTypeAzureFileShareBackupRequest + objectMap := make(map[string]interface{}) + if afsbr.RecoveryPointExpiryTimeInUTC != nil { + objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC + } + if afsbr.ObjectType != "" { + objectMap["objectType"] = afsbr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return &afsbr, true +} + +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return nil, false +} + +// AsIaasVMBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return nil, false +} + +// AsRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) { + return nil, false +} + +// AsBasicRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) { + return &afsbr, true +} + +// AzureFileShareProtectableItem protectable item for Azure Fileshare workloads. +type AzureFileShareProtectableItem struct { + // ParentContainerFabricID - Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. + ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"` + // ParentContainerFriendlyName - Friendly name of container to which this protectable item belongs. + ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` + // AzureFileShareType - File Share type XSync or XSMB. Possible values include: 'Invalid', 'XSMB', 'XSync' + AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { + afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare + objectMap := make(map[string]interface{}) + if afspi.ParentContainerFabricID != nil { + objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID + } + if afspi.ParentContainerFriendlyName != nil { + objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName + } + if afspi.AzureFileShareType != "" { + objectMap["azureFileShareType"] = afspi.AzureFileShareType + } + if afspi.BackupManagementType != nil { + objectMap["backupManagementType"] = afspi.BackupManagementType + } + if afspi.WorkloadType != nil { + objectMap["workloadType"] = afspi.WorkloadType + } + if afspi.FriendlyName != nil { + objectMap["friendlyName"] = afspi.FriendlyName + } + if afspi.ProtectionState != "" { + objectMap["protectionState"] = afspi.ProtectionState + } + if afspi.ProtectableItemType != "" { + objectMap["protectableItemType"] = afspi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return &afspi, true +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &afspi, true +} + +// AzureFileshareProtectedItem azure File Share workload-specific backup item. +type AzureFileshareProtectedItem struct { + // FriendlyName - Friendly name of the fileshare represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // HealthStatus - backups running status for this backup item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' + HealthStatus HealthStatus `json:"healthStatus,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ExtendedInfo - Additional information with this backup item. + ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { + afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem + objectMap := make(map[string]interface{}) + if afpi.FriendlyName != nil { + objectMap["friendlyName"] = afpi.FriendlyName + } + if afpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = afpi.ProtectionStatus + } + if afpi.ProtectionState != "" { + objectMap["protectionState"] = afpi.ProtectionState + } + if afpi.HealthStatus != "" { + objectMap["healthStatus"] = afpi.HealthStatus + } + if afpi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = afpi.LastBackupStatus + } + if afpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = afpi.LastBackupTime + } + if afpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = afpi.ExtendedInfo + } + if afpi.BackupManagementType != "" { + objectMap["backupManagementType"] = afpi.BackupManagementType + } + if afpi.WorkloadType != "" { + objectMap["workloadType"] = afpi.WorkloadType + } + if afpi.ContainerName != nil { + objectMap["containerName"] = afpi.ContainerName + } + if afpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = afpi.SourceResourceID + } + if afpi.PolicyID != nil { + objectMap["policyId"] = afpi.PolicyID + } + if afpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint + } + if afpi.BackupSetName != nil { + objectMap["backupSetName"] = afpi.BackupSetName + } + if afpi.CreateMode != "" { + objectMap["createMode"] = afpi.CreateMode + } + if afpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC + } + if afpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete + } + if afpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining + } + if afpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming + } + if afpi.IsRehydrate != nil { + objectMap["isRehydrate"] = afpi.IsRehydrate + } + if afpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = afpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return &afpi, true +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &afpi, true +} + +// AzureFileshareProtectedItemExtendedInfo additional information about Azure File Share backup item. +type AzureFileshareProtectedItemExtendedInfo struct { + // OldestRecoveryPoint - The oldest backup copy available for this item in the service. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of available backup copies associated with this backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // PolicyState - Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string `json:"policyState,omitempty"` + // ResourceState - READ-ONLY; Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + ResourceState *string `json:"resourceState,omitempty"` + // ResourceStateSyncTime - READ-ONLY; The resource state sync time for this backup item. + ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"` +} + +// AzureFileShareProtectionPolicy azureStorage backup policy. +type AzureFileShareProtectionPolicy struct { + // WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkLoadType WorkloadType `json:"workLoadType,omitempty"` + // SchedulePolicy - Backup schedule specified as part of backup policy. + SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` + // RetentionPolicy - Retention policy with the details on backup copy retention ranges. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` + // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string `json:"timeZone,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { + afspp.BackupManagementType = BackupManagementTypeAzureStorage + objectMap := make(map[string]interface{}) + if afspp.WorkLoadType != "" { + objectMap["workLoadType"] = afspp.WorkLoadType + } + objectMap["schedulePolicy"] = afspp.SchedulePolicy + objectMap["retentionPolicy"] = afspp.RetentionPolicy + if afspp.TimeZone != nil { + objectMap["timeZone"] = afspp.TimeZone + } + if afspp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount + } + if afspp.BackupManagementType != "" { + objectMap["backupManagementType"] = afspp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return &afspp, true +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &afspp, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureFileShareProtectionPolicy struct. +func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "workLoadType": + if v != nil { + var workLoadType WorkloadType + err = json.Unmarshal(*v, &workLoadType) + if err != nil { + return err + } + afspp.WorkLoadType = workLoadType + } + case "schedulePolicy": + if v != nil { + schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) + if err != nil { + return err + } + afspp.SchedulePolicy = schedulePolicy + } + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + afspp.RetentionPolicy = retentionPolicy + } + case "timeZone": + if v != nil { + var timeZone string + err = json.Unmarshal(*v, &timeZone) + if err != nil { + return err + } + afspp.TimeZone = &timeZone + } + case "protectedItemsCount": + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*v, &protectedItemsCount) + if err != nil { + return err + } + afspp.ProtectedItemsCount = &protectedItemsCount + } + case "backupManagementType": + if v != nil { + var backupManagementType ManagementTypeBasicProtectionPolicy + err = json.Unmarshal(*v, &backupManagementType) + if err != nil { + return err + } + afspp.BackupManagementType = backupManagementType + } + } + } + + return nil +} + +// AzureFileShareProvisionILRRequest update snapshot Uri with the correct friendly Name of the source Azure +// file share. +type AzureFileShareProvisionILRRequest struct { + // RecoveryPointID - Recovery point ID. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // SourceResourceID - Source Storage account ARM Id + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { + afspir.ObjectType = ObjectTypeAzureFileShareProvisionILRRequest + objectMap := make(map[string]interface{}) + if afspir.RecoveryPointID != nil { + objectMap["recoveryPointId"] = afspir.RecoveryPointID + } + if afspir.SourceResourceID != nil { + objectMap["sourceResourceId"] = afspir.SourceResourceID + } + if afspir.ObjectType != "" { + objectMap["objectType"] = afspir.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { + return &afspir, true +} + +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return nil, false +} + +// AsILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) { + return nil, false +} + +// AsBasicILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &afspir, true +} + +// AzureFileShareRecoveryPoint azure File Share workload specific backup copy. +type AzureFileShareRecoveryPoint struct { + // RecoveryPointType - READ-ONLY; Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + // FileShareSnapshotURI - READ-ONLY; Contains Url to the snapshot of fileshare, if applicable + FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"` + // RecoveryPointSizeInGB - READ-ONLY; Contains recovery point size + RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { + afsrp.ObjectType = ObjectTypeAzureFileShareRecoveryPoint + objectMap := make(map[string]interface{}) + if afsrp.ObjectType != "" { + objectMap["objectType"] = afsrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return &afsrp, true +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &afsrp, true +} + +// AzureFileShareRestoreRequest azureFileShare Restore Request +type AzureFileShareRestoreRequest struct { + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Source storage account ARM Id + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // CopyOptions - Options to resolve copy conflicts. Possible values include: 'CopyOptionsInvalid', 'CopyOptionsCreateCopy', 'CopyOptionsSkip', 'CopyOptionsOverwrite', 'CopyOptionsFailOnConflict' + CopyOptions CopyOptions `json:"copyOptions,omitempty"` + // RestoreRequestType - Restore Type (FullShareRestore or ItemLevelRestore). Possible values include: 'RestoreRequestTypeInvalid', 'RestoreRequestTypeFullShareRestore', 'RestoreRequestTypeItemLevelRestore' + RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"` + // RestoreFileSpecs - List of Source Files/Folders(which need to recover) and TargetFolderPath details + RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"` + // TargetDetails - Target File Share Details + TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { + afsrr.ObjectType = ObjectTypeAzureFileShareRestoreRequest + objectMap := make(map[string]interface{}) + if afsrr.RecoveryType != "" { + objectMap["recoveryType"] = afsrr.RecoveryType + } + if afsrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = afsrr.SourceResourceID + } + if afsrr.CopyOptions != "" { + objectMap["copyOptions"] = afsrr.CopyOptions + } + if afsrr.RestoreRequestType != "" { + objectMap["restoreRequestType"] = afsrr.RestoreRequestType + } + if afsrr.RestoreFileSpecs != nil { + objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs + } + if afsrr.TargetDetails != nil { + objectMap["targetDetails"] = afsrr.TargetDetails + } + if afsrr.ObjectType != "" { + objectMap["objectType"] = afsrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return &afsrr, true +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &afsrr, true +} + +// AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic virtual +// machine. +type AzureIaaSClassicComputeVMContainer struct { + // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { + aisccvc.ContainerType = ContainerTypeMicrosoftClassicComputevirtualMachines + objectMap := make(map[string]interface{}) + if aisccvc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aisccvc.VirtualMachineID + } + if aisccvc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion + } + if aisccvc.ResourceGroup != nil { + objectMap["resourceGroup"] = aisccvc.ResourceGroup + } + if aisccvc.FriendlyName != nil { + objectMap["friendlyName"] = aisccvc.FriendlyName + } + if aisccvc.BackupManagementType != "" { + objectMap["backupManagementType"] = aisccvc.BackupManagementType + } + if aisccvc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aisccvc.RegistrationStatus + } + if aisccvc.HealthStatus != nil { + objectMap["healthStatus"] = aisccvc.HealthStatus + } + if aisccvc.ContainerType != "" { + objectMap["containerType"] = aisccvc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return &aisccvc, true +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &aisccvc, true +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aisccvc, true +} + +// AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing the Classic +// Compute VM. +type AzureIaaSClassicComputeVMProtectableItem struct { + // VirtualMachineID - Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines + objectMap := make(map[string]interface{}) + if aisccvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID + } + if aisccvpi.BackupManagementType != nil { + objectMap["backupManagementType"] = aisccvpi.BackupManagementType + } + if aisccvpi.WorkloadType != nil { + objectMap["workloadType"] = aisccvpi.WorkloadType + } + if aisccvpi.FriendlyName != nil { + objectMap["friendlyName"] = aisccvpi.FriendlyName + } + if aisccvpi.ProtectionState != "" { + objectMap["protectionState"] = aisccvpi.ProtectionState + } + if aisccvpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = aisccvpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return &aisccvpi, true +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &aisccvpi, true +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &aisccvpi, true +} + +// AzureIaaSClassicComputeVMProtectedItem iaaS VM workload-specific backup item representing the Classic +// Compute VM. +type AzureIaaSClassicComputeVMProtectedItem struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' + HealthStatus HealthStatus `json:"healthStatus,omitempty"` + // HealthDetails - Health details on this backup item. + HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` + // LastBackupStatus - Last backup operation status. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ProtectedItemDataID - Data ID of the protected item. + ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { + aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines + objectMap := make(map[string]interface{}) + if aisccvpi.FriendlyName != nil { + objectMap["friendlyName"] = aisccvpi.FriendlyName + } + if aisccvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID + } + if aisccvpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = aisccvpi.ProtectionStatus + } + if aisccvpi.ProtectionState != "" { + objectMap["protectionState"] = aisccvpi.ProtectionState + } + if aisccvpi.HealthStatus != "" { + objectMap["healthStatus"] = aisccvpi.HealthStatus + } + if aisccvpi.HealthDetails != nil { + objectMap["healthDetails"] = aisccvpi.HealthDetails + } + if aisccvpi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus + } + if aisccvpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = aisccvpi.LastBackupTime + } + if aisccvpi.ProtectedItemDataID != nil { + objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID + } + if aisccvpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = aisccvpi.ExtendedInfo + } + if aisccvpi.ExtendedProperties != nil { + objectMap["extendedProperties"] = aisccvpi.ExtendedProperties + } + if aisccvpi.BackupManagementType != "" { + objectMap["backupManagementType"] = aisccvpi.BackupManagementType + } + if aisccvpi.WorkloadType != "" { + objectMap["workloadType"] = aisccvpi.WorkloadType + } + if aisccvpi.ContainerName != nil { + objectMap["containerName"] = aisccvpi.ContainerName + } + if aisccvpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = aisccvpi.SourceResourceID + } + if aisccvpi.PolicyID != nil { + objectMap["policyId"] = aisccvpi.PolicyID + } + if aisccvpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint + } + if aisccvpi.BackupSetName != nil { + objectMap["backupSetName"] = aisccvpi.BackupSetName + } + if aisccvpi.CreateMode != "" { + objectMap["createMode"] = aisccvpi.CreateMode + } + if aisccvpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC + } + if aisccvpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete + } + if aisccvpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining + } + if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming + } + if aisccvpi.IsRehydrate != nil { + objectMap["isRehydrate"] = aisccvpi.IsRehydrate + } + if aisccvpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = aisccvpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return &aisccvpi, true +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return &aisccvpi, true +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &aisccvpi, true +} + +// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager +// virtual machine. +type AzureIaaSComputeVMContainer struct { + // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { + aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines + objectMap := make(map[string]interface{}) + if aiscvc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aiscvc.VirtualMachineID + } + if aiscvc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion + } + if aiscvc.ResourceGroup != nil { + objectMap["resourceGroup"] = aiscvc.ResourceGroup + } + if aiscvc.FriendlyName != nil { + objectMap["friendlyName"] = aiscvc.FriendlyName + } + if aiscvc.BackupManagementType != "" { + objectMap["backupManagementType"] = aiscvc.BackupManagementType + } + if aiscvc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aiscvc.RegistrationStatus + } + if aiscvc.HealthStatus != nil { + objectMap["healthStatus"] = aiscvc.HealthStatus + } + if aiscvc.ContainerType != "" { + objectMap["containerType"] = aiscvc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return &aiscvc, true +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &aiscvc, true +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aiscvc, true +} + +// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource +// Manager VM. +type AzureIaaSComputeVMProtectableItem struct { + // VirtualMachineID - Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines + objectMap := make(map[string]interface{}) + if aiscvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID + } + if aiscvpi.BackupManagementType != nil { + objectMap["backupManagementType"] = aiscvpi.BackupManagementType + } + if aiscvpi.WorkloadType != nil { + objectMap["workloadType"] = aiscvpi.WorkloadType + } + if aiscvpi.FriendlyName != nil { + objectMap["friendlyName"] = aiscvpi.FriendlyName + } + if aiscvpi.ProtectionState != "" { + objectMap["protectionState"] = aiscvpi.ProtectionState + } + if aiscvpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = aiscvpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return &aiscvpi, true +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &aiscvpi, true +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &aiscvpi, true +} + +// AzureIaaSComputeVMProtectedItem iaaS VM workload-specific backup item representing the Azure Resource +// Manager VM. +type AzureIaaSComputeVMProtectedItem struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' + HealthStatus HealthStatus `json:"healthStatus,omitempty"` + // HealthDetails - Health details on this backup item. + HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` + // LastBackupStatus - Last backup operation status. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ProtectedItemDataID - Data ID of the protected item. + ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { + aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines + objectMap := make(map[string]interface{}) + if aiscvpi.FriendlyName != nil { + objectMap["friendlyName"] = aiscvpi.FriendlyName + } + if aiscvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID + } + if aiscvpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = aiscvpi.ProtectionStatus + } + if aiscvpi.ProtectionState != "" { + objectMap["protectionState"] = aiscvpi.ProtectionState + } + if aiscvpi.HealthStatus != "" { + objectMap["healthStatus"] = aiscvpi.HealthStatus + } + if aiscvpi.HealthDetails != nil { + objectMap["healthDetails"] = aiscvpi.HealthDetails + } + if aiscvpi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus + } + if aiscvpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = aiscvpi.LastBackupTime + } + if aiscvpi.ProtectedItemDataID != nil { + objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID + } + if aiscvpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = aiscvpi.ExtendedInfo + } + if aiscvpi.ExtendedProperties != nil { + objectMap["extendedProperties"] = aiscvpi.ExtendedProperties + } + if aiscvpi.BackupManagementType != "" { + objectMap["backupManagementType"] = aiscvpi.BackupManagementType + } + if aiscvpi.WorkloadType != "" { + objectMap["workloadType"] = aiscvpi.WorkloadType + } + if aiscvpi.ContainerName != nil { + objectMap["containerName"] = aiscvpi.ContainerName + } + if aiscvpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = aiscvpi.SourceResourceID + } + if aiscvpi.PolicyID != nil { + objectMap["policyId"] = aiscvpi.PolicyID + } + if aiscvpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint + } + if aiscvpi.BackupSetName != nil { + objectMap["backupSetName"] = aiscvpi.BackupSetName + } + if aiscvpi.CreateMode != "" { + objectMap["createMode"] = aiscvpi.CreateMode + } + if aiscvpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC + } + if aiscvpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete + } + if aiscvpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining + } + if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming + } + if aiscvpi.IsRehydrate != nil { + objectMap["isRehydrate"] = aiscvpi.IsRehydrate + } + if aiscvpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = aiscvpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return &aiscvpi, true +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return &aiscvpi, true +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &aiscvpi, true +} + +// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information. +type AzureIaaSVMErrorInfo struct { + // ErrorCode - READ-ONLY; Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorTitle - READ-ONLY; Title: Typically, the entity that the error pertains to. + ErrorTitle *string `json:"errorTitle,omitempty"` + // ErrorString - READ-ONLY; Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - READ-ONLY; List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// AzureIaaSVMHealthDetails azure IaaS VM workload-specific Health Details. +type AzureIaaSVMHealthDetails struct { + // Code - READ-ONLY; Health Code + Code *int32 `json:"code,omitempty"` + // Title - READ-ONLY; Health Title + Title *string `json:"title,omitempty"` + // Message - READ-ONLY; Health Message + Message *string `json:"message,omitempty"` + // Recommendations - READ-ONLY; Health Recommended Actions + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// AzureIaaSVMJob azure IaaS VM workload-specific job object. +type AzureIaaSVMJob struct { + // Duration - Time elapsed during the execution of this job. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - Error details on execution of this job. + ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` + // VirtualMachineVersion - Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ExtendedInfo - Additional information for this job. + ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) { + aisj.JobType = JobTypeAzureIaaSVMJob + objectMap := make(map[string]interface{}) + if aisj.Duration != nil { + objectMap["duration"] = aisj.Duration + } + if aisj.ActionsInfo != nil { + objectMap["actionsInfo"] = aisj.ActionsInfo + } + if aisj.ErrorDetails != nil { + objectMap["errorDetails"] = aisj.ErrorDetails + } + if aisj.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion + } + if aisj.ExtendedInfo != nil { + objectMap["extendedInfo"] = aisj.ExtendedInfo + } + if aisj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = aisj.EntityFriendlyName + } + if aisj.BackupManagementType != "" { + objectMap["backupManagementType"] = aisj.BackupManagementType + } + if aisj.Operation != nil { + objectMap["operation"] = aisj.Operation + } + if aisj.Status != nil { + objectMap["status"] = aisj.Status + } + if aisj.StartTime != nil { + objectMap["startTime"] = aisj.StartTime + } + if aisj.EndTime != nil { + objectMap["endTime"] = aisj.EndTime + } + if aisj.ActivityID != nil { + objectMap["activityId"] = aisj.ActivityID + } + if aisj.JobType != "" { + objectMap["jobType"] = aisj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return &aisj, true +} + +// AsAzureStorageJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) { + return &aisj, true +} + +// AzureIaaSVMJobExtendedInfo azure IaaS VM workload-specific additional information for job. +type AzureIaaSVMJobExtendedInfo struct { + // TasksList - List of tasks associated with this job. + TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - Job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // InternalPropertyBag - Job internal properties. + InternalPropertyBag map[string]*string `json:"internalPropertyBag"` + // ProgressPercentage - Indicates progress of the job. Null if it has not started or completed. + ProgressPercentage *float64 `json:"progressPercentage,omitempty"` + // EstimatedRemainingDuration - Time remaining for execution of this job. + EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMJobExtendedInfo. +func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aisjei.TasksList != nil { + objectMap["tasksList"] = aisjei.TasksList + } + if aisjei.PropertyBag != nil { + objectMap["propertyBag"] = aisjei.PropertyBag + } + if aisjei.InternalPropertyBag != nil { + objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag + } + if aisjei.ProgressPercentage != nil { + objectMap["progressPercentage"] = aisjei.ProgressPercentage + } + if aisjei.EstimatedRemainingDuration != nil { + objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration + } + if aisjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// AzureIaaSVMJobTaskDetails azure IaaS VM workload-specific job task details. +type AzureIaaSVMJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // InstanceID - The instanceId. + InstanceID *string `json:"instanceId,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` + // ProgressPercentage - Progress of the task. + ProgressPercentage *float64 `json:"progressPercentage,omitempty"` + // TaskExecutionDetails - Details about execution of the task. + // eg: number of bytes transferred etc + TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"` +} + +// BasicAzureIaaSVMProtectedItem iaaS VM workload-specific backup item. +type BasicAzureIaaSVMProtectedItem interface { + AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) + AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) + AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) +} + +// AzureIaaSVMProtectedItem iaaS VM workload-specific backup item. +type AzureIaaSVMProtectedItem struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' + HealthStatus HealthStatus `json:"healthStatus,omitempty"` + // HealthDetails - Health details on this backup item. + HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` + // LastBackupStatus - Last backup operation status. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ProtectedItemDataID - Data ID of the protected item. + ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectedItemType"] { + case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectedItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectedItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectedItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + default: + var aispi AzureIaaSVMProtectedItem + err := json.Unmarshal(body, &aispi) + return aispi, err + } +} +func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage) + if err != nil { + return nil, err + } + aispiArray[index] = aispi + } + return aispiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { + aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem + objectMap := make(map[string]interface{}) + if aispi.FriendlyName != nil { + objectMap["friendlyName"] = aispi.FriendlyName + } + if aispi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aispi.VirtualMachineID + } + if aispi.ProtectionStatus != nil { + objectMap["protectionStatus"] = aispi.ProtectionStatus + } + if aispi.ProtectionState != "" { + objectMap["protectionState"] = aispi.ProtectionState + } + if aispi.HealthStatus != "" { + objectMap["healthStatus"] = aispi.HealthStatus + } + if aispi.HealthDetails != nil { + objectMap["healthDetails"] = aispi.HealthDetails + } + if aispi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = aispi.LastBackupStatus + } + if aispi.LastBackupTime != nil { + objectMap["lastBackupTime"] = aispi.LastBackupTime + } + if aispi.ProtectedItemDataID != nil { + objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID + } + if aispi.ExtendedInfo != nil { + objectMap["extendedInfo"] = aispi.ExtendedInfo + } + if aispi.ExtendedProperties != nil { + objectMap["extendedProperties"] = aispi.ExtendedProperties + } + if aispi.BackupManagementType != "" { + objectMap["backupManagementType"] = aispi.BackupManagementType + } + if aispi.WorkloadType != "" { + objectMap["workloadType"] = aispi.WorkloadType + } + if aispi.ContainerName != nil { + objectMap["containerName"] = aispi.ContainerName + } + if aispi.SourceResourceID != nil { + objectMap["sourceResourceId"] = aispi.SourceResourceID + } + if aispi.PolicyID != nil { + objectMap["policyId"] = aispi.PolicyID + } + if aispi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint + } + if aispi.BackupSetName != nil { + objectMap["backupSetName"] = aispi.BackupSetName + } + if aispi.CreateMode != "" { + objectMap["createMode"] = aispi.CreateMode + } + if aispi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC + } + if aispi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete + } + if aispi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining + } + if aispi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming + } + if aispi.IsRehydrate != nil { + objectMap["isRehydrate"] = aispi.IsRehydrate + } + if aispi.ProtectedItemType != "" { + objectMap["protectedItemType"] = aispi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return &aispi, true +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return &aispi, true +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &aispi, true +} + +// AzureIaaSVMProtectedItemExtendedInfo additional information on Azure IaaS VM specific backup item. +type AzureIaaSVMProtectedItemExtendedInfo struct { + // OldestRecoveryPoint - The oldest backup copy available for this backup item. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of backup copies available for this backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // PolicyInconsistent - Specifies if backup policy associated with the backup item is inconsistent. + PolicyInconsistent *bool `json:"policyInconsistent,omitempty"` +} + +// AzureIaaSVMProtectionPolicy iaaS VM workload-specific backup policy. +type AzureIaaSVMProtectionPolicy struct { + InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"` + // SchedulePolicy - Backup schedule specified as part of backup policy. + SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` + // RetentionPolicy - Retention policy with the details on backup copy retention ranges. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` + // InstantRpRetentionRangeInDays - Instant RP retention policy range in days + InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"` + // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string `json:"timeZone,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { + aispp.BackupManagementType = BackupManagementTypeAzureIaasVM + objectMap := make(map[string]interface{}) + if aispp.InstantRPDetails != nil { + objectMap["instantRPDetails"] = aispp.InstantRPDetails + } + objectMap["schedulePolicy"] = aispp.SchedulePolicy + objectMap["retentionPolicy"] = aispp.RetentionPolicy + if aispp.InstantRpRetentionRangeInDays != nil { + objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays + } + if aispp.TimeZone != nil { + objectMap["timeZone"] = aispp.TimeZone + } + if aispp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount + } + if aispp.BackupManagementType != "" { + objectMap["backupManagementType"] = aispp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return &aispp, true +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &aispp, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureIaaSVMProtectionPolicy struct. +func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "instantRPDetails": + if v != nil { + var instantRPDetails InstantRPAdditionalDetails + err = json.Unmarshal(*v, &instantRPDetails) + if err != nil { + return err + } + aispp.InstantRPDetails = &instantRPDetails + } + case "schedulePolicy": + if v != nil { + schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) + if err != nil { + return err + } + aispp.SchedulePolicy = schedulePolicy + } + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + aispp.RetentionPolicy = retentionPolicy + } + case "instantRpRetentionRangeInDays": + if v != nil { + var instantRpRetentionRangeInDays int32 + err = json.Unmarshal(*v, &instantRpRetentionRangeInDays) + if err != nil { + return err + } + aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays + } + case "timeZone": + if v != nil { + var timeZone string + err = json.Unmarshal(*v, &timeZone) + if err != nil { + return err + } + aispp.TimeZone = &timeZone + } + case "protectedItemsCount": + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*v, &protectedItemsCount) + if err != nil { + return err + } + aispp.ProtectedItemsCount = &protectedItemsCount + } + case "backupManagementType": + if v != nil { + var backupManagementType ManagementTypeBasicProtectionPolicy + err = json.Unmarshal(*v, &backupManagementType) + if err != nil { + return err + } + aispp.BackupManagementType = backupManagementType + } + } + } + + return nil +} + +// BasicAzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. +type BasicAzureRecoveryServiceVaultProtectionIntent interface { + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) + AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) +} + +// AzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. +type AzureRecoveryServiceVaultProtectionIntent struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err + default: + var arsvpi AzureRecoveryServiceVaultProtectionIntent + err := json.Unmarshal(body, &arsvpi) + return arsvpi, err + } +} +func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage) + if err != nil { + return nil, err + } + arsvpiArray[index] = arsvpi + } + return arsvpiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) { + arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem + objectMap := make(map[string]interface{}) + if arsvpi.BackupManagementType != "" { + objectMap["backupManagementType"] = arsvpi.BackupManagementType + } + if arsvpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = arsvpi.SourceResourceID + } + if arsvpi.ItemID != nil { + objectMap["itemId"] = arsvpi.ItemID + } + if arsvpi.PolicyID != nil { + objectMap["policyId"] = arsvpi.PolicyID + } + if arsvpi.ProtectionState != "" { + objectMap["protectionState"] = arsvpi.ProtectionState + } + if arsvpi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return &arsvpi, true +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &arsvpi, true +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &arsvpi, true +} + +// AzureResourceProtectionIntent iaaS VM specific backup protection intent item. +type AzureResourceProtectionIntent struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { + arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem + objectMap := make(map[string]interface{}) + if arpi.FriendlyName != nil { + objectMap["friendlyName"] = arpi.FriendlyName + } + if arpi.BackupManagementType != "" { + objectMap["backupManagementType"] = arpi.BackupManagementType + } + if arpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = arpi.SourceResourceID + } + if arpi.ItemID != nil { + objectMap["itemId"] = arpi.ItemID + } + if arpi.PolicyID != nil { + objectMap["policyId"] = arpi.PolicyID + } + if arpi.ProtectionState != "" { + objectMap["protectionState"] = arpi.ProtectionState + } + if arpi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return &arpi, true +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &arpi, true +} + +// AzureSQLAGWorkloadContainerProtectionContainer container for SQL workloads under SQL Availability Group. +type AzureSQLAGWorkloadContainerProtectionContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) { + aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1 + objectMap := make(map[string]interface{}) + if aswcpc.SourceResourceID != nil { + objectMap["sourceResourceId"] = aswcpc.SourceResourceID + } + if aswcpc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime + } + if aswcpc.ExtendedInfo != nil { + objectMap["extendedInfo"] = aswcpc.ExtendedInfo + } + if aswcpc.WorkloadType != "" { + objectMap["workloadType"] = aswcpc.WorkloadType + } + if aswcpc.OperationType != "" { + objectMap["operationType"] = aswcpc.OperationType + } + if aswcpc.FriendlyName != nil { + objectMap["friendlyName"] = aswcpc.FriendlyName + } + if aswcpc.BackupManagementType != "" { + objectMap["backupManagementType"] = aswcpc.BackupManagementType + } + if aswcpc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aswcpc.RegistrationStatus + } + if aswcpc.HealthStatus != nil { + objectMap["healthStatus"] = aswcpc.HealthStatus + } + if aswcpc.ContainerType != "" { + objectMap["containerType"] = aswcpc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return &aswcpc, true +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &aswcpc, true +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aswcpc, true +} + +// AzureSQLContainer azure Sql workload-specific container. +type AzureSQLContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLContainer. +func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) { + asc.ContainerType = ContainerTypeAzureSQLContainer1 + objectMap := make(map[string]interface{}) + if asc.FriendlyName != nil { + objectMap["friendlyName"] = asc.FriendlyName + } + if asc.BackupManagementType != "" { + objectMap["backupManagementType"] = asc.BackupManagementType + } + if asc.RegistrationStatus != nil { + objectMap["registrationStatus"] = asc.RegistrationStatus + } + if asc.HealthStatus != nil { + objectMap["healthStatus"] = asc.HealthStatus + } + if asc.ContainerType != "" { + objectMap["containerType"] = asc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return &asc, true +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &asc, true +} + +// AzureSQLProtectedItem azure SQL workload-specific backup item. +type AzureSQLProtectedItem struct { + // ProtectedItemDataID - Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. + ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` + // ProtectionState - Backup state of the backed up item. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' + ProtectionState ProtectedItemState `json:"protectionState,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { + aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases + objectMap := make(map[string]interface{}) + if aspi.ProtectedItemDataID != nil { + objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID + } + if aspi.ProtectionState != "" { + objectMap["protectionState"] = aspi.ProtectionState + } + if aspi.ExtendedInfo != nil { + objectMap["extendedInfo"] = aspi.ExtendedInfo + } + if aspi.BackupManagementType != "" { + objectMap["backupManagementType"] = aspi.BackupManagementType + } + if aspi.WorkloadType != "" { + objectMap["workloadType"] = aspi.WorkloadType + } + if aspi.ContainerName != nil { + objectMap["containerName"] = aspi.ContainerName + } + if aspi.SourceResourceID != nil { + objectMap["sourceResourceId"] = aspi.SourceResourceID + } + if aspi.PolicyID != nil { + objectMap["policyId"] = aspi.PolicyID + } + if aspi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint + } + if aspi.BackupSetName != nil { + objectMap["backupSetName"] = aspi.BackupSetName + } + if aspi.CreateMode != "" { + objectMap["createMode"] = aspi.CreateMode + } + if aspi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC + } + if aspi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete + } + if aspi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining + } + if aspi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming + } + if aspi.IsRehydrate != nil { + objectMap["isRehydrate"] = aspi.IsRehydrate + } + if aspi.ProtectedItemType != "" { + objectMap["protectedItemType"] = aspi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return &aspi, true +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &aspi, true +} + +// AzureSQLProtectedItemExtendedInfo additional information on Azure Sql specific protected item. +type AzureSQLProtectedItemExtendedInfo struct { + // OldestRecoveryPoint - The oldest backup copy available for this item in the service. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of available backup copies associated with this backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // PolicyState - State of the backup policy associated with this backup item. + PolicyState *string `json:"policyState,omitempty"` +} + +// AzureSQLProtectionPolicy azure SQL workload-specific backup policy. +type AzureSQLProtectionPolicy struct { + // RetentionPolicy - Retention policy details. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) { + aspp.BackupManagementType = BackupManagementTypeAzureSQL + objectMap := make(map[string]interface{}) + objectMap["retentionPolicy"] = aspp.RetentionPolicy + if aspp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount + } + if aspp.BackupManagementType != "" { + objectMap["backupManagementType"] = aspp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return &aspp, true +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &aspp, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureSQLProtectionPolicy struct. +func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + aspp.RetentionPolicy = retentionPolicy + } + case "protectedItemsCount": + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*v, &protectedItemsCount) + if err != nil { + return err + } + aspp.ProtectedItemsCount = &protectedItemsCount + } + case "backupManagementType": + if v != nil { + var backupManagementType ManagementTypeBasicProtectionPolicy + err = json.Unmarshal(*v, &backupManagementType) + if err != nil { + return err + } + aspp.BackupManagementType = backupManagementType + } + } + } + + return nil +} + +// AzureStorageContainer azure Storage Account workload-specific container. +type AzureStorageContainer struct { + // SourceResourceID - Fully qualified ARM url. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // StorageAccountVersion - Storage account version. + StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // ProtectedItemCount - Number of items backed up in this container. + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStorageContainer. +func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) { + asc.ContainerType = ContainerTypeStorageContainer1 + objectMap := make(map[string]interface{}) + if asc.SourceResourceID != nil { + objectMap["sourceResourceId"] = asc.SourceResourceID + } + if asc.StorageAccountVersion != nil { + objectMap["storageAccountVersion"] = asc.StorageAccountVersion + } + if asc.ResourceGroup != nil { + objectMap["resourceGroup"] = asc.ResourceGroup + } + if asc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = asc.ProtectedItemCount + } + if asc.FriendlyName != nil { + objectMap["friendlyName"] = asc.FriendlyName + } + if asc.BackupManagementType != "" { + objectMap["backupManagementType"] = asc.BackupManagementType + } + if asc.RegistrationStatus != nil { + objectMap["registrationStatus"] = asc.RegistrationStatus + } + if asc.HealthStatus != nil { + objectMap["healthStatus"] = asc.HealthStatus + } + if asc.ContainerType != "" { + objectMap["containerType"] = asc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return &asc, true +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &asc, true +} + +// AzureStorageErrorInfo azure storage specific error information +type AzureStorageErrorInfo struct { + // ErrorCode - Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// AzureStorageJob azure storage specific job. +type AzureStorageJob struct { + // Duration - Time elapsed during the execution of this job. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - Error details on execution of this job. + ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"` + // StorageAccountName - Specifies friendly name of the storage account. + StorageAccountName *string `json:"storageAccountName,omitempty"` + // StorageAccountVersion - Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. + StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` + // ExtendedInfo - Additional information about the job. + ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStorageJob. +func (asj AzureStorageJob) MarshalJSON() ([]byte, error) { + asj.JobType = JobTypeAzureStorageJob + objectMap := make(map[string]interface{}) + if asj.Duration != nil { + objectMap["duration"] = asj.Duration + } + if asj.ActionsInfo != nil { + objectMap["actionsInfo"] = asj.ActionsInfo + } + if asj.ErrorDetails != nil { + objectMap["errorDetails"] = asj.ErrorDetails + } + if asj.StorageAccountName != nil { + objectMap["storageAccountName"] = asj.StorageAccountName + } + if asj.StorageAccountVersion != nil { + objectMap["storageAccountVersion"] = asj.StorageAccountVersion + } + if asj.ExtendedInfo != nil { + objectMap["extendedInfo"] = asj.ExtendedInfo + } + if asj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = asj.EntityFriendlyName + } + if asj.BackupManagementType != "" { + objectMap["backupManagementType"] = asj.BackupManagementType + } + if asj.Operation != nil { + objectMap["operation"] = asj.Operation + } + if asj.Status != nil { + objectMap["status"] = asj.Status + } + if asj.StartTime != nil { + objectMap["startTime"] = asj.StartTime + } + if asj.EndTime != nil { + objectMap["endTime"] = asj.EndTime + } + if asj.ActivityID != nil { + objectMap["activityId"] = asj.ActivityID + } + if asj.JobType != "" { + objectMap["jobType"] = asj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return &asj, true +} + +// AsAzureWorkloadJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) { + return &asj, true +} + +// AzureStorageJobExtendedInfo azure Storage workload-specific additional information for job. +type AzureStorageJobExtendedInfo struct { + // TasksList - List of tasks for this job + TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - Job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStorageJobExtendedInfo. +func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asjei.TasksList != nil { + objectMap["tasksList"] = asjei.TasksList + } + if asjei.PropertyBag != nil { + objectMap["propertyBag"] = asjei.PropertyBag + } + if asjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// AzureStorageJobTaskDetails azure storage workload specific job task details. +type AzureStorageJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// AzureStorageProtectableContainer azure Storage-specific protectable containers +type AzureStorageProtectableContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { + aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer + objectMap := make(map[string]interface{}) + if aspc.FriendlyName != nil { + objectMap["friendlyName"] = aspc.FriendlyName + } + if aspc.BackupManagementType != "" { + objectMap["backupManagementType"] = aspc.BackupManagementType + } + if aspc.HealthStatus != nil { + objectMap["healthStatus"] = aspc.HealthStatus + } + if aspc.ContainerID != nil { + objectMap["containerId"] = aspc.ContainerID + } + if aspc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = aspc.ProtectableContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { + return &aspc, true +} + +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { + return nil, false +} + +// AsProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { + return nil, false +} + +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &aspc, true +} + +// AzureVMAppContainerProtectableContainer azure workload-specific container +type AzureVMAppContainerProtectableContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { + avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer + objectMap := make(map[string]interface{}) + if avacpc.FriendlyName != nil { + objectMap["friendlyName"] = avacpc.FriendlyName + } + if avacpc.BackupManagementType != "" { + objectMap["backupManagementType"] = avacpc.BackupManagementType + } + if avacpc.HealthStatus != nil { + objectMap["healthStatus"] = avacpc.HealthStatus + } + if avacpc.ContainerID != nil { + objectMap["containerId"] = avacpc.ContainerID + } + if avacpc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = avacpc.ProtectableContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { + return &avacpc, true +} + +// AsProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { + return nil, false +} + +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &avacpc, true +} + +// AzureVMAppContainerProtectionContainer container for SQL workloads under Azure Virtual Machines. +type AzureVMAppContainerProtectionContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { + avacpc.ContainerType = ContainerTypeVMAppContainer1 + objectMap := make(map[string]interface{}) + if avacpc.SourceResourceID != nil { + objectMap["sourceResourceId"] = avacpc.SourceResourceID + } + if avacpc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime + } + if avacpc.ExtendedInfo != nil { + objectMap["extendedInfo"] = avacpc.ExtendedInfo + } + if avacpc.WorkloadType != "" { + objectMap["workloadType"] = avacpc.WorkloadType + } + if avacpc.OperationType != "" { + objectMap["operationType"] = avacpc.OperationType + } + if avacpc.FriendlyName != nil { + objectMap["friendlyName"] = avacpc.FriendlyName + } + if avacpc.BackupManagementType != "" { + objectMap["backupManagementType"] = avacpc.BackupManagementType + } + if avacpc.RegistrationStatus != nil { + objectMap["registrationStatus"] = avacpc.RegistrationStatus + } + if avacpc.HealthStatus != nil { + objectMap["healthStatus"] = avacpc.HealthStatus + } + if avacpc.ContainerType != "" { + objectMap["containerType"] = avacpc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return &avacpc, true +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &avacpc, true +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &avacpc, true +} + +// AzureVMResourceFeatureSupportRequest azureResource(IaaS VM) Specific feature support request +type AzureVMResourceFeatureSupportRequest struct { + // VMSize - Size of the resource: VM size(A/D series etc) in case of IaasVM + VMSize *string `json:"vmSize,omitempty"` + // VMSku - SKUs (Premium/Managed etc) in case of IaasVM + VMSku *string `json:"vmSku,omitempty"` + // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' + FeatureType FeatureType `json:"featureType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { + avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup + objectMap := make(map[string]interface{}) + if avrfsr.VMSize != nil { + objectMap["vmSize"] = avrfsr.VMSize + } + if avrfsr.VMSku != nil { + objectMap["vmSku"] = avrfsr.VMSku + } + if avrfsr.FeatureType != "" { + objectMap["featureType"] = avrfsr.FeatureType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { + return nil, false +} + +// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { + return &avrfsr, true +} + +// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { + return nil, false +} + +// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { + return &avrfsr, true +} + +// AzureVMResourceFeatureSupportResponse response for feature support requests for Azure IaasVm +type AzureVMResourceFeatureSupportResponse struct { + autorest.Response `json:"-"` + // SupportStatus - Support status of feature. Possible values include: 'SupportStatusInvalid', 'SupportStatusSupported', 'SupportStatusDefaultOFF', 'SupportStatusDefaultON', 'SupportStatusNotSupported' + SupportStatus SupportStatus `json:"supportStatus,omitempty"` +} + +// BasicAzureVMWorkloadItem azure VM workload-specific workload item. +type BasicAzureVMWorkloadItem interface { + AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) + AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) + AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) +} + +// AzureVMWorkloadItem azure VM workload-specific workload item. +type AzureVMWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["workloadItemType"] { + case string(WorkloadItemTypeSAPAseDatabase1): + var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsadwi) + return avwsadwi, err + case string(WorkloadItemTypeSAPAseSystem1): + var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem + err := json.Unmarshal(body, &avwsaswi) + return avwsaswi, err + case string(WorkloadItemTypeSAPHanaDatabase1): + var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem + err := json.Unmarshal(body, &avwshdwi) + return avwshdwi, err + case string(WorkloadItemTypeSAPHanaSystem1): + var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem + err := json.Unmarshal(body, &avwshswi) + return avwshswi, err + case string(WorkloadItemTypeSQLDataBase1): + var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsdwi) + return avwsdwi, err + case string(WorkloadItemTypeSQLInstance1): + var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem + err := json.Unmarshal(body, &avwsiwi) + return avwsiwi, err + default: + var avwi AzureVMWorkloadItem + err := json.Unmarshal(body, &avwi) + return avwi, err + } +} +func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage) + if err != nil { + return nil, err + } + avwiArray[index] = avwi + } + return avwiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { + avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem + objectMap := make(map[string]interface{}) + if avwi.ParentName != nil { + objectMap["parentName"] = avwi.ParentName + } + if avwi.ServerName != nil { + objectMap["serverName"] = avwi.ServerName + } + if avwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwi.IsAutoProtectable + } + if avwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwi.Subinquireditemcount + } + if avwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount + } + if avwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwi.BackupManagementType + } + if avwi.WorkloadType != nil { + objectMap["workloadType"] = avwi.WorkloadType + } + if avwi.FriendlyName != nil { + objectMap["friendlyName"] = avwi.FriendlyName + } + if avwi.ProtectionState != "" { + objectMap["protectionState"] = avwi.ProtectionState + } + if avwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return &avwi, true +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwi, true +} + +// BasicAzureVMWorkloadProtectableItem azure VM workload-specific protectable item. +type BasicAzureVMWorkloadProtectableItem interface { + AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) + AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) + AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) + AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) + AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) +} + +// AzureVMWorkloadProtectableItem azure VM workload-specific protectable item. +type AzureVMWorkloadProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableItemType"] { + case string(ProtectableItemTypeSAPAseSystem): + var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem + err := json.Unmarshal(body, &avwsaspi) + return avwsaspi, err + case string(ProtectableItemTypeSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectableItemTypeSAPHanaSystem): + var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem + err := json.Unmarshal(body, &avwshspi) + return avwshspi, err + case string(ProtectableItemTypeSQLAvailabilityGroupContainer): + var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem + err := json.Unmarshal(body, &avwsagpi) + return avwsagpi, err + case string(ProtectableItemTypeSQLDataBase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + case string(ProtectableItemTypeSQLInstance): + var avwsipi AzureVMWorkloadSQLInstanceProtectableItem + err := json.Unmarshal(body, &avwsipi) + return avwsipi, err + default: + var avwpi AzureVMWorkloadProtectableItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + } +} +func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage) + if err != nil { + return nil, err + } + avwpiArray[index] = avwpi + } + return avwpiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { + avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem + objectMap := make(map[string]interface{}) + if avwpi.ParentName != nil { + objectMap["parentName"] = avwpi.ParentName + } + if avwpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwpi.ParentUniqueName + } + if avwpi.ServerName != nil { + objectMap["serverName"] = avwpi.ServerName + } + if avwpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable + } + if avwpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwpi.IsAutoProtected + } + if avwpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount + } + if avwpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount + } + if avwpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation + } + if avwpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwpi.BackupManagementType + } + if avwpi.WorkloadType != nil { + objectMap["workloadType"] = avwpi.WorkloadType + } + if avwpi.FriendlyName != nil { + objectMap["friendlyName"] = avwpi.FriendlyName + } + if avwpi.ProtectionState != "" { + objectMap["protectionState"] = avwpi.ProtectionState + } + if avwpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return &avwpi, true +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwpi, true +} + +// BasicAzureVMWorkloadProtectedItem azure VM workload-specific protected item. +type BasicAzureVMWorkloadProtectedItem interface { + AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) + AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) +} + +// AzureVMWorkloadProtectedItem azure VM workload-specific protected item. +type AzureVMWorkloadProtectedItem struct { + // FriendlyName - Friendly name of the DB represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // ParentName - Parent name of the DB such as Instance or Availability Group. + ParentName *string `json:"parentName,omitempty"` + // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string `json:"parentType,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' + LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // LastBackupErrorDetail - Error details in last backup + LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` + // ProtectedItemDataSourceID - Data ID of the protected item. + ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` + // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' + ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectedItemType"] { + case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): + var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem + err := json.Unmarshal(body, &avwsadpi) + return avwsadpi, err + case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + default: + var avwpi AzureVMWorkloadProtectedItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + } +} +func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage) + if err != nil { + return nil, err + } + avwpiArray[index] = avwpi + } + return avwpiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { + avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem + objectMap := make(map[string]interface{}) + if avwpi.FriendlyName != nil { + objectMap["friendlyName"] = avwpi.FriendlyName + } + if avwpi.ServerName != nil { + objectMap["serverName"] = avwpi.ServerName + } + if avwpi.ParentName != nil { + objectMap["parentName"] = avwpi.ParentName + } + if avwpi.ParentType != nil { + objectMap["parentType"] = avwpi.ParentType + } + if avwpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = avwpi.ProtectionStatus + } + if avwpi.ProtectionState != "" { + objectMap["protectionState"] = avwpi.ProtectionState + } + if avwpi.LastBackupStatus != "" { + objectMap["lastBackupStatus"] = avwpi.LastBackupStatus + } + if avwpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = avwpi.LastBackupTime + } + if avwpi.LastBackupErrorDetail != nil { + objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail + } + if avwpi.ProtectedItemDataSourceID != nil { + objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID + } + if avwpi.ProtectedItemHealthStatus != "" { + objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus + } + if avwpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = avwpi.ExtendedInfo + } + if avwpi.BackupManagementType != "" { + objectMap["backupManagementType"] = avwpi.BackupManagementType + } + if avwpi.WorkloadType != "" { + objectMap["workloadType"] = avwpi.WorkloadType + } + if avwpi.ContainerName != nil { + objectMap["containerName"] = avwpi.ContainerName + } + if avwpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = avwpi.SourceResourceID + } + if avwpi.PolicyID != nil { + objectMap["policyId"] = avwpi.PolicyID + } + if avwpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint + } + if avwpi.BackupSetName != nil { + objectMap["backupSetName"] = avwpi.BackupSetName + } + if avwpi.CreateMode != "" { + objectMap["createMode"] = avwpi.CreateMode + } + if avwpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC + } + if avwpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete + } + if avwpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining + } + if avwpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming + } + if avwpi.IsRehydrate != nil { + objectMap["isRehydrate"] = avwpi.IsRehydrate + } + if avwpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = avwpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return &avwpi, true +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return &avwpi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &avwpi, true +} + +// AzureVMWorkloadProtectedItemExtendedInfo additional information on Azure Workload for SQL specific +// backup item. +type AzureVMWorkloadProtectedItemExtendedInfo struct { + // OldestRecoveryPoint - The oldest backup copy available for this backup item. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of backup copies available for this backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // PolicyState - Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string `json:"policyState,omitempty"` +} + +// AzureVMWorkloadProtectionPolicy azure VM (Mercury) workload-specific backup policy. +type AzureVMWorkloadProtectionPolicy struct { + // WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkLoadType WorkloadType `json:"workLoadType,omitempty"` + // Settings - Common settings for the backup management + Settings *Settings `json:"settings,omitempty"` + // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention + SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` + // MakePolicyConsistent - Fix the policy inconsistency + MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { + avwpp.BackupManagementType = BackupManagementTypeAzureWorkload + objectMap := make(map[string]interface{}) + if avwpp.WorkLoadType != "" { + objectMap["workLoadType"] = avwpp.WorkLoadType + } + if avwpp.Settings != nil { + objectMap["settings"] = avwpp.Settings + } + if avwpp.SubProtectionPolicy != nil { + objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy + } + if avwpp.MakePolicyConsistent != nil { + objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent + } + if avwpp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount + } + if avwpp.BackupManagementType != "" { + objectMap["backupManagementType"] = avwpp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return &avwpp, true +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &avwpp, true +} + +// AzureVMWorkloadSAPAseDatabaseProtectedItem azure VM workload-specific protected item representing SAP +// ASE Database. +type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { + // FriendlyName - Friendly name of the DB represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // ParentName - Parent name of the DB such as Instance or Availability Group. + ParentName *string `json:"parentName,omitempty"` + // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string `json:"parentType,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' + LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // LastBackupErrorDetail - Error details in last backup + LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` + // ProtectedItemDataSourceID - Data ID of the protected item. + ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` + // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' + ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase + objectMap := make(map[string]interface{}) + if avwsadpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsadpi.FriendlyName + } + if avwsadpi.ServerName != nil { + objectMap["serverName"] = avwsadpi.ServerName + } + if avwsadpi.ParentName != nil { + objectMap["parentName"] = avwsadpi.ParentName + } + if avwsadpi.ParentType != nil { + objectMap["parentType"] = avwsadpi.ParentType + } + if avwsadpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = avwsadpi.ProtectionStatus + } + if avwsadpi.ProtectionState != "" { + objectMap["protectionState"] = avwsadpi.ProtectionState + } + if avwsadpi.LastBackupStatus != "" { + objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus + } + if avwsadpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = avwsadpi.LastBackupTime + } + if avwsadpi.LastBackupErrorDetail != nil { + objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail + } + if avwsadpi.ProtectedItemDataSourceID != nil { + objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID + } + if avwsadpi.ProtectedItemHealthStatus != "" { + objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus + } + if avwsadpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = avwsadpi.ExtendedInfo + } + if avwsadpi.BackupManagementType != "" { + objectMap["backupManagementType"] = avwsadpi.BackupManagementType + } + if avwsadpi.WorkloadType != "" { + objectMap["workloadType"] = avwsadpi.WorkloadType + } + if avwsadpi.ContainerName != nil { + objectMap["containerName"] = avwsadpi.ContainerName + } + if avwsadpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = avwsadpi.SourceResourceID + } + if avwsadpi.PolicyID != nil { + objectMap["policyId"] = avwsadpi.PolicyID + } + if avwsadpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint + } + if avwsadpi.BackupSetName != nil { + objectMap["backupSetName"] = avwsadpi.BackupSetName + } + if avwsadpi.CreateMode != "" { + objectMap["createMode"] = avwsadpi.CreateMode + } + if avwsadpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC + } + if avwsadpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete + } + if avwsadpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining + } + if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming + } + if avwsadpi.IsRehydrate != nil { + objectMap["isRehydrate"] = avwsadpi.IsRehydrate + } + if avwsadpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = avwsadpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return &avwsadpi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return &avwsadpi, true +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &avwsadpi, true +} + +// AzureVMWorkloadSAPAseDatabaseWorkloadItem azure VM workload-specific workload item representing SAP ASE +// Database. +type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1 + objectMap := make(map[string]interface{}) + if avwsadwi.ParentName != nil { + objectMap["parentName"] = avwsadwi.ParentName + } + if avwsadwi.ServerName != nil { + objectMap["serverName"] = avwsadwi.ServerName + } + if avwsadwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable + } + if avwsadwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount + } + if avwsadwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount + } + if avwsadwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsadwi.BackupManagementType + } + if avwsadwi.WorkloadType != nil { + objectMap["workloadType"] = avwsadwi.WorkloadType + } + if avwsadwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsadwi.FriendlyName + } + if avwsadwi.ProtectionState != "" { + objectMap["protectionState"] = avwsadwi.ProtectionState + } + if avwsadwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsadwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsadwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return &avwsadwi, true +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsadwi, true +} + +// AzureVMWorkloadSAPAseSystemProtectableItem azure VM workload-specific protectable item representing SAP +// ASE System. +type AzureVMWorkloadSAPAseSystemProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { + avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem + objectMap := make(map[string]interface{}) + if avwsaspi.ParentName != nil { + objectMap["parentName"] = avwsaspi.ParentName + } + if avwsaspi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName + } + if avwsaspi.ServerName != nil { + objectMap["serverName"] = avwsaspi.ServerName + } + if avwsaspi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable + } + if avwsaspi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected + } + if avwsaspi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount + } + if avwsaspi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount + } + if avwsaspi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation + } + if avwsaspi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsaspi.BackupManagementType + } + if avwsaspi.WorkloadType != nil { + objectMap["workloadType"] = avwsaspi.WorkloadType + } + if avwsaspi.FriendlyName != nil { + objectMap["friendlyName"] = avwsaspi.FriendlyName + } + if avwsaspi.ProtectionState != "" { + objectMap["protectionState"] = avwsaspi.ProtectionState + } + if avwsaspi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsaspi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsaspi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return &avwsaspi, true +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsaspi, true +} + +// AzureVMWorkloadSAPAseSystemWorkloadItem azure VM workload-specific workload item representing SAP ASE +// System. +type AzureVMWorkloadSAPAseSystemWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { + avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1 + objectMap := make(map[string]interface{}) + if avwsaswi.ParentName != nil { + objectMap["parentName"] = avwsaswi.ParentName + } + if avwsaswi.ServerName != nil { + objectMap["serverName"] = avwsaswi.ServerName + } + if avwsaswi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable + } + if avwsaswi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount + } + if avwsaswi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount + } + if avwsaswi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsaswi.BackupManagementType + } + if avwsaswi.WorkloadType != nil { + objectMap["workloadType"] = avwsaswi.WorkloadType + } + if avwsaswi.FriendlyName != nil { + objectMap["friendlyName"] = avwsaswi.FriendlyName + } + if avwsaswi.ProtectionState != "" { + objectMap["protectionState"] = avwsaswi.ProtectionState + } + if avwsaswi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsaswi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsaswi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return &avwsaswi, true +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsaswi, true +} + +// AzureVMWorkloadSAPHanaDatabaseProtectableItem azure VM workload-specific protectable item representing +// SAP HANA Database. +type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase + objectMap := make(map[string]interface{}) + if avwshdpi.ParentName != nil { + objectMap["parentName"] = avwshdpi.ParentName + } + if avwshdpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName + } + if avwshdpi.ServerName != nil { + objectMap["serverName"] = avwshdpi.ServerName + } + if avwshdpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable + } + if avwshdpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected + } + if avwshdpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount + } + if avwshdpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount + } + if avwshdpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation + } + if avwshdpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshdpi.BackupManagementType + } + if avwshdpi.WorkloadType != nil { + objectMap["workloadType"] = avwshdpi.WorkloadType + } + if avwshdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwshdpi.FriendlyName + } + if avwshdpi.ProtectionState != "" { + objectMap["protectionState"] = avwshdpi.ProtectionState + } + if avwshdpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwshdpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwshdpi, true +} + +// AzureVMWorkloadSAPHanaDatabaseProtectedItem azure VM workload-specific protected item representing SAP +// HANA Database. +type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { + // FriendlyName - Friendly name of the DB represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // ParentName - Parent name of the DB such as Instance or Availability Group. + ParentName *string `json:"parentName,omitempty"` + // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string `json:"parentType,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' + LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // LastBackupErrorDetail - Error details in last backup + LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` + // ProtectedItemDataSourceID - Data ID of the protected item. + ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` + // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' + ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase + objectMap := make(map[string]interface{}) + if avwshdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwshdpi.FriendlyName + } + if avwshdpi.ServerName != nil { + objectMap["serverName"] = avwshdpi.ServerName + } + if avwshdpi.ParentName != nil { + objectMap["parentName"] = avwshdpi.ParentName + } + if avwshdpi.ParentType != nil { + objectMap["parentType"] = avwshdpi.ParentType + } + if avwshdpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = avwshdpi.ProtectionStatus + } + if avwshdpi.ProtectionState != "" { + objectMap["protectionState"] = avwshdpi.ProtectionState + } + if avwshdpi.LastBackupStatus != "" { + objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus + } + if avwshdpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = avwshdpi.LastBackupTime + } + if avwshdpi.LastBackupErrorDetail != nil { + objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail + } + if avwshdpi.ProtectedItemDataSourceID != nil { + objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID + } + if avwshdpi.ProtectedItemHealthStatus != "" { + objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus + } + if avwshdpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = avwshdpi.ExtendedInfo + } + if avwshdpi.BackupManagementType != "" { + objectMap["backupManagementType"] = avwshdpi.BackupManagementType + } + if avwshdpi.WorkloadType != "" { + objectMap["workloadType"] = avwshdpi.WorkloadType + } + if avwshdpi.ContainerName != nil { + objectMap["containerName"] = avwshdpi.ContainerName + } + if avwshdpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = avwshdpi.SourceResourceID + } + if avwshdpi.PolicyID != nil { + objectMap["policyId"] = avwshdpi.PolicyID + } + if avwshdpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint + } + if avwshdpi.BackupSetName != nil { + objectMap["backupSetName"] = avwshdpi.BackupSetName + } + if avwshdpi.CreateMode != "" { + objectMap["createMode"] = avwshdpi.CreateMode + } + if avwshdpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC + } + if avwshdpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete + } + if avwshdpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining + } + if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming + } + if avwshdpi.IsRehydrate != nil { + objectMap["isRehydrate"] = avwshdpi.IsRehydrate + } + if avwshdpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = avwshdpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &avwshdpi, true +} + +// AzureVMWorkloadSAPHanaDatabaseWorkloadItem azure VM workload-specific workload item representing SAP +// HANA Database. +type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1 + objectMap := make(map[string]interface{}) + if avwshdwi.ParentName != nil { + objectMap["parentName"] = avwshdwi.ParentName + } + if avwshdwi.ServerName != nil { + objectMap["serverName"] = avwshdwi.ServerName + } + if avwshdwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable + } + if avwshdwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount + } + if avwshdwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount + } + if avwshdwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshdwi.BackupManagementType + } + if avwshdwi.WorkloadType != nil { + objectMap["workloadType"] = avwshdwi.WorkloadType + } + if avwshdwi.FriendlyName != nil { + objectMap["friendlyName"] = avwshdwi.FriendlyName + } + if avwshdwi.ProtectionState != "" { + objectMap["protectionState"] = avwshdwi.ProtectionState + } + if avwshdwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwshdwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwshdwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return &avwshdwi, true +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwshdwi, true +} + +// AzureVMWorkloadSAPHanaSystemProtectableItem azure VM workload-specific protectable item representing SAP +// HANA System. +type AzureVMWorkloadSAPHanaSystemProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { + avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem + objectMap := make(map[string]interface{}) + if avwshspi.ParentName != nil { + objectMap["parentName"] = avwshspi.ParentName + } + if avwshspi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwshspi.ParentUniqueName + } + if avwshspi.ServerName != nil { + objectMap["serverName"] = avwshspi.ServerName + } + if avwshspi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable + } + if avwshspi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwshspi.IsAutoProtected + } + if avwshspi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount + } + if avwshspi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount + } + if avwshspi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation + } + if avwshspi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshspi.BackupManagementType + } + if avwshspi.WorkloadType != nil { + objectMap["workloadType"] = avwshspi.WorkloadType + } + if avwshspi.FriendlyName != nil { + objectMap["friendlyName"] = avwshspi.FriendlyName + } + if avwshspi.ProtectionState != "" { + objectMap["protectionState"] = avwshspi.ProtectionState + } + if avwshspi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwshspi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwshspi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return &avwshspi, true +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwshspi, true +} + +// AzureVMWorkloadSAPHanaSystemWorkloadItem azure VM workload-specific workload item representing SAP HANA +// System. +type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { + avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1 + objectMap := make(map[string]interface{}) + if avwshswi.ParentName != nil { + objectMap["parentName"] = avwshswi.ParentName + } + if avwshswi.ServerName != nil { + objectMap["serverName"] = avwshswi.ServerName + } + if avwshswi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable + } + if avwshswi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount + } + if avwshswi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount + } + if avwshswi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshswi.BackupManagementType + } + if avwshswi.WorkloadType != nil { + objectMap["workloadType"] = avwshswi.WorkloadType + } + if avwshswi.FriendlyName != nil { + objectMap["friendlyName"] = avwshswi.FriendlyName + } + if avwshswi.ProtectionState != "" { + objectMap["protectionState"] = avwshswi.ProtectionState + } + if avwshswi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwshswi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwshswi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return &avwshswi, true +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwshswi, true +} + +// AzureVMWorkloadSQLAvailabilityGroupProtectableItem azure VM workload-specific protectable item +// representing SQL Availability Group. +type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { + avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer + objectMap := make(map[string]interface{}) + if avwsagpi.ParentName != nil { + objectMap["parentName"] = avwsagpi.ParentName + } + if avwsagpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName + } + if avwsagpi.ServerName != nil { + objectMap["serverName"] = avwsagpi.ServerName + } + if avwsagpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable + } + if avwsagpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected + } + if avwsagpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount + } + if avwsagpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount + } + if avwsagpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation + } + if avwsagpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsagpi.BackupManagementType + } + if avwsagpi.WorkloadType != nil { + objectMap["workloadType"] = avwsagpi.WorkloadType + } + if avwsagpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsagpi.FriendlyName + } + if avwsagpi.ProtectionState != "" { + objectMap["protectionState"] = avwsagpi.ProtectionState + } + if avwsagpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsagpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsagpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return &avwsagpi, true +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsagpi, true +} + +// AzureVMWorkloadSQLDatabaseProtectableItem azure VM workload-specific protectable item representing SQL +// Database. +type AzureVMWorkloadSQLDatabaseProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase + objectMap := make(map[string]interface{}) + if avwsdpi.ParentName != nil { + objectMap["parentName"] = avwsdpi.ParentName + } + if avwsdpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName + } + if avwsdpi.ServerName != nil { + objectMap["serverName"] = avwsdpi.ServerName + } + if avwsdpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable + } + if avwsdpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected + } + if avwsdpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount + } + if avwsdpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount + } + if avwsdpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation + } + if avwsdpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsdpi.BackupManagementType + } + if avwsdpi.WorkloadType != nil { + objectMap["workloadType"] = avwsdpi.WorkloadType + } + if avwsdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsdpi.FriendlyName + } + if avwsdpi.ProtectionState != "" { + objectMap["protectionState"] = avwsdpi.ProtectionState + } + if avwsdpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsdpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsdpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return &avwsdpi, true +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsdpi, true +} + +// AzureVMWorkloadSQLDatabaseProtectedItem azure VM workload-specific protected item representing SQL +// Database. +type AzureVMWorkloadSQLDatabaseProtectedItem struct { + // FriendlyName - Friendly name of the DB represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // ParentName - Parent name of the DB such as Instance or Availability Group. + ParentName *string `json:"parentName,omitempty"` + // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string `json:"parentType,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' + LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // LastBackupErrorDetail - Error details in last backup + LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` + // ProtectedItemDataSourceID - Data ID of the protected item. + ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` + // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' + ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase + objectMap := make(map[string]interface{}) + if avwsdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsdpi.FriendlyName + } + if avwsdpi.ServerName != nil { + objectMap["serverName"] = avwsdpi.ServerName + } + if avwsdpi.ParentName != nil { + objectMap["parentName"] = avwsdpi.ParentName + } + if avwsdpi.ParentType != nil { + objectMap["parentType"] = avwsdpi.ParentType + } + if avwsdpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = avwsdpi.ProtectionStatus + } + if avwsdpi.ProtectionState != "" { + objectMap["protectionState"] = avwsdpi.ProtectionState + } + if avwsdpi.LastBackupStatus != "" { + objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus + } + if avwsdpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = avwsdpi.LastBackupTime + } + if avwsdpi.LastBackupErrorDetail != nil { + objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail + } + if avwsdpi.ProtectedItemDataSourceID != nil { + objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID + } + if avwsdpi.ProtectedItemHealthStatus != "" { + objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus + } + if avwsdpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = avwsdpi.ExtendedInfo + } + if avwsdpi.BackupManagementType != "" { + objectMap["backupManagementType"] = avwsdpi.BackupManagementType + } + if avwsdpi.WorkloadType != "" { + objectMap["workloadType"] = avwsdpi.WorkloadType + } + if avwsdpi.ContainerName != nil { + objectMap["containerName"] = avwsdpi.ContainerName + } + if avwsdpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = avwsdpi.SourceResourceID + } + if avwsdpi.PolicyID != nil { + objectMap["policyId"] = avwsdpi.PolicyID + } + if avwsdpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint + } + if avwsdpi.BackupSetName != nil { + objectMap["backupSetName"] = avwsdpi.BackupSetName + } + if avwsdpi.CreateMode != "" { + objectMap["createMode"] = avwsdpi.CreateMode + } + if avwsdpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC + } + if avwsdpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete + } + if avwsdpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining + } + if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming + } + if avwsdpi.IsRehydrate != nil { + objectMap["isRehydrate"] = avwsdpi.IsRehydrate + } + if avwsdpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = avwsdpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return &avwsdpi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return &avwsdpi, true +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &avwsdpi, true +} + +// AzureVMWorkloadSQLDatabaseWorkloadItem azure VM workload-specific workload item representing SQL +// Database. +type AzureVMWorkloadSQLDatabaseWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1 + objectMap := make(map[string]interface{}) + if avwsdwi.ParentName != nil { + objectMap["parentName"] = avwsdwi.ParentName + } + if avwsdwi.ServerName != nil { + objectMap["serverName"] = avwsdwi.ServerName + } + if avwsdwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable + } + if avwsdwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount + } + if avwsdwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount + } + if avwsdwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsdwi.BackupManagementType + } + if avwsdwi.WorkloadType != nil { + objectMap["workloadType"] = avwsdwi.WorkloadType + } + if avwsdwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsdwi.FriendlyName + } + if avwsdwi.ProtectionState != "" { + objectMap["protectionState"] = avwsdwi.ProtectionState + } + if avwsdwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsdwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsdwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return &avwsdwi, true +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsdwi, true +} + +// AzureVMWorkloadSQLInstanceProtectableItem azure VM workload-specific protectable item representing SQL +// Instance. +type AzureVMWorkloadSQLInstanceProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { + avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance + objectMap := make(map[string]interface{}) + if avwsipi.ParentName != nil { + objectMap["parentName"] = avwsipi.ParentName + } + if avwsipi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsipi.ParentUniqueName + } + if avwsipi.ServerName != nil { + objectMap["serverName"] = avwsipi.ServerName + } + if avwsipi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable + } + if avwsipi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsipi.IsAutoProtected + } + if avwsipi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount + } + if avwsipi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount + } + if avwsipi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation + } + if avwsipi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsipi.BackupManagementType + } + if avwsipi.WorkloadType != nil { + objectMap["workloadType"] = avwsipi.WorkloadType + } + if avwsipi.FriendlyName != nil { + objectMap["friendlyName"] = avwsipi.FriendlyName + } + if avwsipi.ProtectionState != "" { + objectMap["protectionState"] = avwsipi.ProtectionState + } + if avwsipi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsipi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsipi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return &avwsipi, true +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsipi, true +} + +// AzureVMWorkloadSQLInstanceWorkloadItem azure VM workload-specific workload item representing SQL +// Instance. +type AzureVMWorkloadSQLInstanceWorkloadItem struct { + // DataDirectoryPaths - Data Directory Paths for default directories + DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { + avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1 + objectMap := make(map[string]interface{}) + if avwsiwi.DataDirectoryPaths != nil { + objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths + } + if avwsiwi.ParentName != nil { + objectMap["parentName"] = avwsiwi.ParentName + } + if avwsiwi.ServerName != nil { + objectMap["serverName"] = avwsiwi.ServerName + } + if avwsiwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable + } + if avwsiwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount + } + if avwsiwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount + } + if avwsiwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsiwi.BackupManagementType + } + if avwsiwi.WorkloadType != nil { + objectMap["workloadType"] = avwsiwi.WorkloadType + } + if avwsiwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsiwi.FriendlyName + } + if avwsiwi.ProtectionState != "" { + objectMap["protectionState"] = avwsiwi.ProtectionState + } + if avwsiwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsiwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsiwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return &avwsiwi, true +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsiwi, true +} + +// BasicAzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. +type BasicAzureWorkloadAutoProtectionIntent interface { + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) +} + +// AzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. +type AzureWorkloadAutoProtectionIntent struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err + default: + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err + } +} +func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage) + if err != nil { + return nil, err + } + awapiArray[index] = awapi + } + return awapiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { + awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent + objectMap := make(map[string]interface{}) + if awapi.BackupManagementType != "" { + objectMap["backupManagementType"] = awapi.BackupManagementType + } + if awapi.SourceResourceID != nil { + objectMap["sourceResourceId"] = awapi.SourceResourceID + } + if awapi.ItemID != nil { + objectMap["itemId"] = awapi.ItemID + } + if awapi.PolicyID != nil { + objectMap["policyId"] = awapi.PolicyID + } + if awapi.ProtectionState != "" { + objectMap["protectionState"] = awapi.ProtectionState + } + if awapi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &awapi, true +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return &awapi, true +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return &awapi, true +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &awapi, true +} + +// AzureWorkloadBackupRequest azureWorkload workload-specific backup request. +type AzureWorkloadBackupRequest struct { + // BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'TypeEnumInvalid', 'TypeEnumFull', 'TypeEnumDifferential', 'TypeEnumLog', 'TypeEnumCopyOnlyFull' + BackupType TypeEnum `json:"backupType,omitempty"` + // EnableCompression - Bool for Compression setting + EnableCompression *bool `json:"enableCompression,omitempty"` + // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { + awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest + objectMap := make(map[string]interface{}) + if awbr.BackupType != "" { + objectMap["backupType"] = awbr.BackupType + } + if awbr.EnableCompression != nil { + objectMap["enableCompression"] = awbr.EnableCompression + } + if awbr.RecoveryPointExpiryTimeInUTC != nil { + objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC + } + if awbr.ObjectType != "" { + objectMap["objectType"] = awbr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return nil, false +} + +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return &awbr, true +} + +// AsIaasVMBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return nil, false +} + +// AsRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) { + return nil, false +} + +// AsBasicRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) { + return &awbr, true +} + +// BasicAzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. +type BasicAzureWorkloadContainer interface { + AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) + AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) + AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) +} + +// AzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. +type AzureWorkloadContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeSQLAGWorkLoadContainer1): + var aswcpc AzureSQLAGWorkloadContainerProtectionContainer + err := json.Unmarshal(body, &aswcpc) + return aswcpc, err + case string(ContainerTypeVMAppContainer1): + var avacpc AzureVMAppContainerProtectionContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err + default: + var awc AzureWorkloadContainer + err := json.Unmarshal(body, &awc) + return awc, err + } +} +func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage) + if err != nil { + return nil, err + } + awcArray[index] = awc + } + return awcArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) { + awc.ContainerType = ContainerTypeAzureWorkloadContainer + objectMap := make(map[string]interface{}) + if awc.SourceResourceID != nil { + objectMap["sourceResourceId"] = awc.SourceResourceID + } + if awc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = awc.LastUpdatedTime + } + if awc.ExtendedInfo != nil { + objectMap["extendedInfo"] = awc.ExtendedInfo + } + if awc.WorkloadType != "" { + objectMap["workloadType"] = awc.WorkloadType + } + if awc.OperationType != "" { + objectMap["operationType"] = awc.OperationType + } + if awc.FriendlyName != nil { + objectMap["friendlyName"] = awc.FriendlyName + } + if awc.BackupManagementType != "" { + objectMap["backupManagementType"] = awc.BackupManagementType + } + if awc.RegistrationStatus != nil { + objectMap["registrationStatus"] = awc.RegistrationStatus + } + if awc.HealthStatus != nil { + objectMap["healthStatus"] = awc.HealthStatus + } + if awc.ContainerType != "" { + objectMap["containerType"] = awc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return &awc, true +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &awc, true +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &awc, true +} + +// AzureWorkloadContainerExtendedInfo extended information of the container. +type AzureWorkloadContainerExtendedInfo struct { + // HostServerName - Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + HostServerName *string `json:"hostServerName,omitempty"` + // InquiryInfo - Inquiry Status for the container. + InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"` + // NodesList - List of the nodes in case of distributed container. + NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"` +} + +// AzureWorkloadErrorInfo azure storage specific error information +type AzureWorkloadErrorInfo struct { + // ErrorCode - Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // ErrorTitle - Title: Typically, the entity that the error pertains to. + ErrorTitle *string `json:"errorTitle,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` + // AdditionalDetails - Additional details for above error code. + AdditionalDetails *string `json:"additionalDetails,omitempty"` +} + +// AzureWorkloadJob azure storage specific job. +type AzureWorkloadJob struct { + // WorkloadType - Workload type of the job + WorkloadType *string `json:"workloadType,omitempty"` + // Duration - Time elapsed during the execution of this job. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - Error details on execution of this job. + ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information about the job. + ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadJob. +func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) { + awj.JobType = JobTypeAzureWorkloadJob + objectMap := make(map[string]interface{}) + if awj.WorkloadType != nil { + objectMap["workloadType"] = awj.WorkloadType + } + if awj.Duration != nil { + objectMap["duration"] = awj.Duration + } + if awj.ActionsInfo != nil { + objectMap["actionsInfo"] = awj.ActionsInfo + } + if awj.ErrorDetails != nil { + objectMap["errorDetails"] = awj.ErrorDetails + } + if awj.ExtendedInfo != nil { + objectMap["extendedInfo"] = awj.ExtendedInfo + } + if awj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = awj.EntityFriendlyName + } + if awj.BackupManagementType != "" { + objectMap["backupManagementType"] = awj.BackupManagementType + } + if awj.Operation != nil { + objectMap["operation"] = awj.Operation + } + if awj.Status != nil { + objectMap["status"] = awj.Status + } + if awj.StartTime != nil { + objectMap["startTime"] = awj.StartTime + } + if awj.EndTime != nil { + objectMap["endTime"] = awj.EndTime + } + if awj.ActivityID != nil { + objectMap["activityId"] = awj.ActivityID + } + if awj.JobType != "" { + objectMap["jobType"] = awj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return &awj, true +} + +// AsDpmJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) { + return &awj, true +} + +// AzureWorkloadJobExtendedInfo azure VM workload-specific additional information for job. +type AzureWorkloadJobExtendedInfo struct { + // TasksList - List of tasks for this job + TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - Job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadJobExtendedInfo. +func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if awjei.TasksList != nil { + objectMap["tasksList"] = awjei.TasksList + } + if awjei.PropertyBag != nil { + objectMap["propertyBag"] = awjei.PropertyBag + } + if awjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// AzureWorkloadJobTaskDetails azure VM workload specific job task details. +type AzureWorkloadJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// BasicAzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime +type BasicAzureWorkloadPointInTimeRecoveryPoint interface { + AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) + AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) +} + +// AzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime +type AzureWorkloadPointInTimeRecoveryPoint struct { + // TimeRanges - List of log ranges + TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): + var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awshpitrp) + return awshpitrp, err + default: + var awpitrp AzureWorkloadPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awpitrp) + return awpitrp, err + } +} +func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + awpitrpArray[index] = awpitrp + } + return awpitrpArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + awpitrp.ObjectType = ObjectTypeAzureWorkloadPointInTimeRecoveryPoint + objectMap := make(map[string]interface{}) + if awpitrp.TimeRanges != nil { + objectMap["timeRanges"] = awpitrp.TimeRanges + } + if awpitrp.ObjectType != "" { + objectMap["objectType"] = awpitrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return &awpitrp, true +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return &awpitrp, true +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awpitrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awpitrp, true +} + +// AzureWorkloadPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for +// PointInTime/Log restore +type AzureWorkloadPointInTimeRestoreRequest struct { + // PointInTime - PointInTime value + PointInTime *date.Time `json:"pointInTime,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + awpitrr.ObjectType = ObjectTypeAzureWorkloadPointInTimeRestoreRequest + objectMap := make(map[string]interface{}) + if awpitrr.PointInTime != nil { + objectMap["pointInTime"] = awpitrr.PointInTime + } + if awpitrr.RecoveryType != "" { + objectMap["recoveryType"] = awpitrr.RecoveryType + } + if awpitrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awpitrr.SourceResourceID + } + if awpitrr.PropertyBag != nil { + objectMap["propertyBag"] = awpitrr.PropertyBag + } + if awpitrr.TargetInfo != nil { + objectMap["targetInfo"] = awpitrr.TargetInfo + } + if awpitrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awpitrr.RecoveryMode + } + if awpitrr.ObjectType != "" { + objectMap["objectType"] = awpitrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return &awpitrr, true +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awpitrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awpitrr, true +} + +// BasicAzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery point +type BasicAzureWorkloadRecoveryPoint interface { + AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) + AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) + AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) + AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) + AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) +} + +// AzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery +// point +type AzureWorkloadRecoveryPoint struct { + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): + var awpitrp AzureWorkloadPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awpitrp) + return awpitrp, err + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): + var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awshpitrp) + return awshpitrp, err + case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): + var awshrp AzureWorkloadSAPHanaRecoveryPoint + err := json.Unmarshal(body, &awshrp) + return awshrp, err + case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): + var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awspitrp) + return awspitrp, err + case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): + var awsrp AzureWorkloadSQLRecoveryPoint + err := json.Unmarshal(body, &awsrp) + return awsrp, err + default: + var awrp AzureWorkloadRecoveryPoint + err := json.Unmarshal(body, &awrp) + return awrp, err + } +} +func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + awrpArray[index] = awrp + } + return awrpArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { + awrp.ObjectType = ObjectTypeAzureWorkloadRecoveryPoint + objectMap := make(map[string]interface{}) + if awrp.ObjectType != "" { + objectMap["objectType"] = awrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return &awrp, true +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awrp, true +} + +// BasicAzureWorkloadRestoreRequest azureWorkload-specific restore. +type BasicAzureWorkloadRestoreRequest interface { + AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) + AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) + AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) + AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) + AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) + AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) + AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) + AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) +} + +// AzureWorkloadRestoreRequest azureWorkload-specific restore. +type AzureWorkloadRestoreRequest struct { + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): + var awpitrr AzureWorkloadPointInTimeRestoreRequest + err := json.Unmarshal(body, &awpitrr) + return awpitrr, err + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): + var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest + err := json.Unmarshal(body, &awshpitrr) + return awshpitrr, err + case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): + var awshrr AzureWorkloadSAPHanaRestoreRequest + err := json.Unmarshal(body, &awshrr) + return awshrr, err + case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): + var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest + err := json.Unmarshal(body, &awspitrr) + return awspitrr, err + case string(ObjectTypeAzureWorkloadSQLRestoreRequest): + var awsrr AzureWorkloadSQLRestoreRequest + err := json.Unmarshal(body, &awsrr) + return awsrr, err + default: + var awrr AzureWorkloadRestoreRequest + err := json.Unmarshal(body, &awrr) + return awrr, err + } +} +func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + awrrArray[index] = awrr + } + return awrrArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { + awrr.ObjectType = ObjectTypeAzureWorkloadRestoreRequest + objectMap := make(map[string]interface{}) + if awrr.RecoveryType != "" { + objectMap["recoveryType"] = awrr.RecoveryType + } + if awrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awrr.SourceResourceID + } + if awrr.PropertyBag != nil { + objectMap["propertyBag"] = awrr.PropertyBag + } + if awrr.TargetInfo != nil { + objectMap["targetInfo"] = awrr.TargetInfo + } + if awrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awrr.RecoveryMode + } + if awrr.ObjectType != "" { + objectMap["objectType"] = awrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return &awrr, true +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awrr, true +} + +// AzureWorkloadSAPHanaPointInTimeRecoveryPoint recovery point specific to PointInTime in SAPHana +type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { + // TimeRanges - List of log ranges + TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + awshpitrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint + objectMap := make(map[string]interface{}) + if awshpitrp.TimeRanges != nil { + objectMap["timeRanges"] = awshpitrp.TimeRanges + } + if awshpitrp.ObjectType != "" { + objectMap["objectType"] = awshpitrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return &awshpitrp, true +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awshpitrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return &awshpitrp, true +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awshpitrp, true +} + +// AzureWorkloadSAPHanaPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for +// PointInTime/Log restore +type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { + // PointInTime - PointInTime value + PointInTime *date.Time `json:"pointInTime,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + awshpitrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest + objectMap := make(map[string]interface{}) + if awshpitrr.PointInTime != nil { + objectMap["pointInTime"] = awshpitrr.PointInTime + } + if awshpitrr.RecoveryType != "" { + objectMap["recoveryType"] = awshpitrr.RecoveryType + } + if awshpitrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awshpitrr.SourceResourceID + } + if awshpitrr.PropertyBag != nil { + objectMap["propertyBag"] = awshpitrr.PropertyBag + } + if awshpitrr.TargetInfo != nil { + objectMap["targetInfo"] = awshpitrr.TargetInfo + } + if awshpitrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awshpitrr.RecoveryMode + } + if awshpitrr.ObjectType != "" { + objectMap["objectType"] = awshpitrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awshpitrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return &awshpitrr, true +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return &awshpitrr, true +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awshpitrr, true +} + +// AzureWorkloadSAPHanaRecoveryPoint sAPHana specific recoverypoint, specifically encapsulates full/diff +// recoverypoints +type AzureWorkloadSAPHanaRecoveryPoint struct { + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { + awshrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaRecoveryPoint + objectMap := make(map[string]interface{}) + if awshrp.ObjectType != "" { + objectMap["objectType"] = awshrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awshrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return &awshrp, true +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awshrp, true +} + +// BasicAzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. +type BasicAzureWorkloadSAPHanaRestoreRequest interface { + AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) + AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) +} + +// AzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. +type AzureWorkloadSAPHanaRestoreRequest struct { + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): + var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest + err := json.Unmarshal(body, &awshpitrr) + return awshpitrr, err + default: + var awshrr AzureWorkloadSAPHanaRestoreRequest + err := json.Unmarshal(body, &awshrr) + return awshrr, err + } +} +func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + awshrrArray[index] = awshrr + } + return awshrrArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { + awshrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaRestoreRequest + objectMap := make(map[string]interface{}) + if awshrr.RecoveryType != "" { + objectMap["recoveryType"] = awshrr.RecoveryType + } + if awshrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awshrr.SourceResourceID + } + if awshrr.PropertyBag != nil { + objectMap["propertyBag"] = awshrr.PropertyBag + } + if awshrr.TargetInfo != nil { + objectMap["targetInfo"] = awshrr.TargetInfo + } + if awshrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awshrr.RecoveryMode + } + if awshrr.ObjectType != "" { + objectMap["objectType"] = awshrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awshrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return &awshrr, true +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return &awshrr, true +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awshrr, true +} + +// AzureWorkloadSQLAutoProtectionIntent azure Workload SQL Auto Protection intent item. +type AzureWorkloadSQLAutoProtectionIntent struct { + // WorkloadItemType - Workload item type of the item for which intent is to be set. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' + WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { + awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent + objectMap := make(map[string]interface{}) + if awsapi.WorkloadItemType != "" { + objectMap["workloadItemType"] = awsapi.WorkloadItemType + } + if awsapi.BackupManagementType != "" { + objectMap["backupManagementType"] = awsapi.BackupManagementType + } + if awsapi.SourceResourceID != nil { + objectMap["sourceResourceId"] = awsapi.SourceResourceID + } + if awsapi.ItemID != nil { + objectMap["itemId"] = awsapi.ItemID + } + if awsapi.PolicyID != nil { + objectMap["policyId"] = awsapi.PolicyID + } + if awsapi.ProtectionState != "" { + objectMap["protectionState"] = awsapi.ProtectionState + } + if awsapi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &awsapi, true +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return &awsapi, true +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return &awsapi, true +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &awsapi, true +} + +// AzureWorkloadSQLPointInTimeRecoveryPoint recovery point specific to PointInTime +type AzureWorkloadSQLPointInTimeRecoveryPoint struct { + // TimeRanges - List of log ranges + TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` + // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: + // When a specific recovery point is accessed using GetRecoveryPoint + // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter + ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + awspitrp.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint + objectMap := make(map[string]interface{}) + if awspitrp.TimeRanges != nil { + objectMap["timeRanges"] = awspitrp.TimeRanges + } + if awspitrp.ExtendedInfo != nil { + objectMap["extendedInfo"] = awspitrp.ExtendedInfo + } + if awspitrp.ObjectType != "" { + objectMap["objectType"] = awspitrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awspitrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return &awspitrp, true +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return &awspitrp, true +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awspitrp, true +} + +// AzureWorkloadSQLPointInTimeRestoreRequest azureWorkload SQL -specific restore. Specifically for +// PointInTime/Log restore +type AzureWorkloadSQLPointInTimeRestoreRequest struct { + // PointInTime - PointInTime value + PointInTime *date.Time `json:"pointInTime,omitempty"` + // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided + ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` + // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried + IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` + // AlternateDirectoryPaths - Data directory details + AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + awspitrr.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest + objectMap := make(map[string]interface{}) + if awspitrr.PointInTime != nil { + objectMap["pointInTime"] = awspitrr.PointInTime + } + if awspitrr.ShouldUseAlternateTargetLocation != nil { + objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation + } + if awspitrr.IsNonRecoverable != nil { + objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable + } + if awspitrr.AlternateDirectoryPaths != nil { + objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths + } + if awspitrr.RecoveryType != "" { + objectMap["recoveryType"] = awspitrr.RecoveryType + } + if awspitrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awspitrr.SourceResourceID + } + if awspitrr.PropertyBag != nil { + objectMap["propertyBag"] = awspitrr.PropertyBag + } + if awspitrr.TargetInfo != nil { + objectMap["targetInfo"] = awspitrr.TargetInfo + } + if awspitrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awspitrr.RecoveryMode + } + if awspitrr.ObjectType != "" { + objectMap["objectType"] = awspitrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awspitrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return &awspitrr, true +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return &awspitrr, true +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awspitrr, true +} + +// BasicAzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint +// along with extended info +type BasicAzureWorkloadSQLRecoveryPoint interface { + AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) +} + +// AzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint +// along with extended info +type AzureWorkloadSQLRecoveryPoint struct { + // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: + // When a specific recovery point is accessed using GetRecoveryPoint + // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter + ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): + var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awspitrp) + return awspitrp, err + default: + var awsrp AzureWorkloadSQLRecoveryPoint + err := json.Unmarshal(body, &awsrp) + return awsrp, err + } +} +func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + awsrpArray[index] = awsrp + } + return awsrpArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { + awsrp.ObjectType = ObjectTypeAzureWorkloadSQLRecoveryPoint + objectMap := make(map[string]interface{}) + if awsrp.ExtendedInfo != nil { + objectMap["extendedInfo"] = awsrp.ExtendedInfo + } + if awsrp.ObjectType != "" { + objectMap["objectType"] = awsrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awsrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return &awsrp, true +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return &awsrp, true +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awsrp, true +} + +// AzureWorkloadSQLRecoveryPointExtendedInfo extended info class details +type AzureWorkloadSQLRecoveryPointExtendedInfo struct { + // DataDirectoryTimeInUTC - READ-ONLY; UTC time at which data directory info was captured + DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"` + // DataDirectoryPaths - READ-ONLY; List of data directory paths during restore operation. + DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` +} + +// BasicAzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore +type BasicAzureWorkloadSQLRestoreRequest interface { + AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) + AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) +} + +// AzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore +type AzureWorkloadSQLRestoreRequest struct { + // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided + ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` + // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried + IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` + // AlternateDirectoryPaths - Data directory details + AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): + var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest + err := json.Unmarshal(body, &awspitrr) + return awspitrr, err + default: + var awsrr AzureWorkloadSQLRestoreRequest + err := json.Unmarshal(body, &awsrr) + return awsrr, err + } +} +func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + awsrrArray[index] = awsrr + } + return awsrrArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { + awsrr.ObjectType = ObjectTypeAzureWorkloadSQLRestoreRequest + objectMap := make(map[string]interface{}) + if awsrr.ShouldUseAlternateTargetLocation != nil { + objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation + } + if awsrr.IsNonRecoverable != nil { + objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable + } + if awsrr.AlternateDirectoryPaths != nil { + objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths + } + if awsrr.RecoveryType != "" { + objectMap["recoveryType"] = awsrr.RecoveryType + } + if awsrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awsrr.SourceResourceID + } + if awsrr.PropertyBag != nil { + objectMap["propertyBag"] = awsrr.PropertyBag + } + if awsrr.TargetInfo != nil { + objectMap["targetInfo"] = awsrr.TargetInfo + } + if awsrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awsrr.RecoveryMode + } + if awsrr.ObjectType != "" { + objectMap["objectType"] = awsrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awsrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return &awsrr, true +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return &awsrr, true +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awsrr, true +} + +// BEKDetails BEK is bitlocker encryption key. +type BEKDetails struct { + // SecretURL - Secret is BEK. + SecretURL *string `json:"secretUrl,omitempty"` + // SecretVaultID - ID of the Key Vault where this Secret is stored. + SecretVaultID *string `json:"secretVaultId,omitempty"` + // SecretData - BEK data. + SecretData *string `json:"secretData,omitempty"` +} + +// BMSBackupEngineQueryObject query parameters to fetch list of backup engines. +type BMSBackupEngineQueryObject struct { + // Expand - attribute to add extended info + Expand *string `json:"expand,omitempty"` +} + +// BMSBackupEnginesQueryObject query parameters to fetch list of backup engines. +type BMSBackupEnginesQueryObject struct { + // BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // Expand - Attribute to add extended info. + Expand *string `json:"expand,omitempty"` +} + +// BMSBackupSummariesQueryObject query parameters to fetch backup summaries. +type BMSBackupSummariesQueryObject struct { + // Type - Backup management type for this container. Possible values include: 'TypeInvalid', 'TypeBackupProtectedItemCountSummary', 'TypeBackupProtectionContainerCountSummary' + Type Type `json:"type,omitempty"` +} + +// BMSContainerQueryObject the query filters that can be used with the list containers API. +type BMSContainerQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer' + ContainerType ContainerType `json:"containerType,omitempty"` + // BackupEngineName - Backup engine name + BackupEngineName *string `json:"backupEngineName,omitempty"` + // FabricName - Fabric name for filter + FabricName *string `json:"fabricName,omitempty"` + // Status - Status of registration of this container with the Recovery Services Vault. + Status *string `json:"status,omitempty"` + // FriendlyName - Friendly name of this container. + FriendlyName *string `json:"friendlyName,omitempty"` +} + +// BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API. +type BMSContainersInquiryQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` +} + +// BMSPOQueryObject filters to list items that can be backed up. +type BMSPOQueryObject struct { + // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ContainerName - Full name of the container whose Protectable Objects should be returned. + ContainerName *string `json:"containerName,omitempty"` + // Status - Backup status query parameter. + Status *string `json:"status,omitempty"` + // FriendlyName - Friendly name. + FriendlyName *string `json:"friendlyName,omitempty"` +} + +// BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API. +type BMSRefreshContainersQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` +} + +// BMSRPQueryObject filters to list backup copies. +type BMSRPQueryObject struct { + // StartDate - Backup copies created after this time. + StartDate *date.Time `json:"startDate,omitempty"` + // EndDate - Backup copies created before this time. + EndDate *date.Time `json:"endDate,omitempty"` + // RestorePointQueryType - RestorePoint type. Possible values include: 'RestorePointQueryTypeInvalid', 'RestorePointQueryTypeFull', 'RestorePointQueryTypeLog', 'RestorePointQueryTypeDifferential', 'RestorePointQueryTypeFullAndDifferential', 'RestorePointQueryTypeAll' + RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"` + // ExtendedInfo - In Get Recovery Point, it tells whether extended information about recovery point is asked. + ExtendedInfo *bool `json:"extendedInfo,omitempty"` +} + +// BMSWorkloadItemQueryObject filters to list items that can be backed up. +type BMSWorkloadItemQueryObject struct { + // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' + WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` + // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` +} + +// ClientDiscoveryDisplay localized display information of an operation. +type ClientDiscoveryDisplay struct { + // Provider - Name of the provider for display purposes + Provider *string `json:"provider,omitempty"` + // Resource - ResourceType for which this Operation can be performed. + Resource *string `json:"resource,omitempty"` + // Operation - Operations Name itself. + Operation *string `json:"operation,omitempty"` + // Description - Description of the operation having details of what operation is about. + Description *string `json:"description,omitempty"` +} + +// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client +// discovery. +type ClientDiscoveryForLogSpecification struct { + // Name - Name for shoebox log specification. + Name *string `json:"name,omitempty"` + // DisplayName - Localized display name + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - blob duration of shoebox log specification + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery. +type ClientDiscoveryForProperties struct { + // ServiceSpecification - Operation properties. + ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client +// discovery. +type ClientDiscoveryForServiceSpecification struct { + // LogSpecifications - List of log specifications of this operation. + LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` +} + +// ClientDiscoveryResponse operations List response which contains list of available APIs. +type ClientDiscoveryResponse struct { + autorest.Response `json:"-"` + // Value - List of available operations. + Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` + // NextLink - Link to the next chunk of Response. + NextLink *string `json:"nextLink,omitempty"` +} + +// ClientDiscoveryResponseIterator provides access to a complete listing of +// ClientDiscoveryValueForSingleAPI values. +type ClientDiscoveryResponseIterator struct { + i int + page ClientDiscoveryResponsePage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ClientDiscoveryResponseIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ClientDiscoveryResponseIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI { + if !iter.page.NotDone() { + return ClientDiscoveryValueForSingleAPI{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ClientDiscoveryResponseIterator type. +func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { + return ClientDiscoveryResponseIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (cdr ClientDiscoveryResponse) IsEmpty() bool { + return cdr.Value == nil || len(*cdr.Value) == 0 +} + +// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) { + if cdr.NextLink == nil || len(to.String(cdr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cdr.NextLink))) +} + +// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values. +type ClientDiscoveryResponsePage struct { + fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error) + cdr ClientDiscoveryResponse +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.cdr) + if err != nil { + return err + } + page.cdr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ClientDiscoveryResponsePage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ClientDiscoveryResponsePage) NotDone() bool { + return !page.cdr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse { + return page.cdr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI { + if page.cdr.IsEmpty() { + return nil + } + return *page.cdr.Value +} + +// Creates a new instance of the ClientDiscoveryResponsePage type. +func NewClientDiscoveryResponsePage(getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { + return ClientDiscoveryResponsePage{fn: getNextPage} +} + +// ClientDiscoveryValueForSingleAPI available operation details. +type ClientDiscoveryValueForSingleAPI struct { + // Name - Name of the Operation. + Name *string `json:"name,omitempty"` + // Display - Contains the localized display information for this particular operation + Display *ClientDiscoveryDisplay `json:"display,omitempty"` + // Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + Origin *string `json:"origin,omitempty"` + // Properties - ShoeBox properties for the given operation. + Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` +} + +// ClientScriptForConnect client script details for file / folder restore. +type ClientScriptForConnect struct { + // ScriptContent - File content of the client script for file / folder restore. + ScriptContent *string `json:"scriptContent,omitempty"` + // ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc. + ScriptExtension *string `json:"scriptExtension,omitempty"` + // OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works. + OsType *string `json:"osType,omitempty"` + // URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used + URL *string `json:"url,omitempty"` + // ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user. + // If its null or empty then , ignore it. + ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"` +} + +// ContainerIdentityInfo container identity information +type ContainerIdentityInfo struct { + // UniqueName - Unique name of the container + UniqueName *string `json:"uniqueName,omitempty"` + // AadTenantID - Protection container identity - AAD Tenant + AadTenantID *string `json:"aadTenantId,omitempty"` + // ServicePrincipalClientID - Protection container identity - AAD Service Principal + ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` + // Audience - Protection container identity - Audience + Audience *string `json:"audience,omitempty"` +} + +// DailyRetentionFormat daily retention format. +type DailyRetentionFormat struct { + // DaysOfTheMonth - List of days of the month. + DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"` +} + +// DailyRetentionSchedule daily retention schedule. +type DailyRetentionSchedule struct { + // RetentionTimes - Retention times of retention policy. + RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` + // RetentionDuration - Retention duration of retention Policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} + +// Day day of the week. +type Day struct { + // Date - Date of the month + Date *int32 `json:"date,omitempty"` + // IsLast - Whether Date is last date of month + IsLast *bool `json:"isLast,omitempty"` +} + +// DiskExclusionProperties ... +type DiskExclusionProperties struct { + // DiskLunList - List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + DiskLunList *[]int32 `json:"diskLunList,omitempty"` + // IsInclusionList - Flag to indicate whether DiskLunList is to be included/ excluded from backup. + IsInclusionList *bool `json:"isInclusionList,omitempty"` +} + +// DiskInformation disk information +type DiskInformation struct { + Lun *int32 `json:"lun,omitempty"` + Name *string `json:"name,omitempty"` +} + +// DistributedNodesInfo this is used to represent the various nodes of the distributed container. +type DistributedNodesInfo struct { + // NodeName - Name of the node under a distributed container. + NodeName *string `json:"nodeName,omitempty"` + // Status - Status of this Node. + // Failed | Succeeded + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Details if the Status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` +} + +// DpmBackupEngine data Protection Manager (DPM) specific backup engine. +type DpmBackupEngine struct { + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string `json:"backupEngineState,omitempty"` + // HealthStatus - Backup status of the backup engine. + HealthStatus *string `json:"healthStatus,omitempty"` + // CanReRegister - Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool `json:"canReRegister,omitempty"` + // BackupEngineID - ID of the backup engine. + BackupEngineID *string `json:"backupEngineId,omitempty"` + // DpmVersion - Backup engine version + DpmVersion *string `json:"dpmVersion,omitempty"` + // AzureBackupAgentVersion - Backup agent version + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + // IsDpmUpgradeAvailable - To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + // ExtendedInfo - Extended info of the backupengine + ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` + // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' + BackupEngineType EngineType `json:"backupEngineType,omitempty"` +} + +// MarshalJSON is the custom marshaler for DpmBackupEngine. +func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) { + dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine + objectMap := make(map[string]interface{}) + if dbe.FriendlyName != nil { + objectMap["friendlyName"] = dbe.FriendlyName + } + if dbe.BackupManagementType != "" { + objectMap["backupManagementType"] = dbe.BackupManagementType + } + if dbe.RegistrationStatus != nil { + objectMap["registrationStatus"] = dbe.RegistrationStatus + } + if dbe.BackupEngineState != nil { + objectMap["backupEngineState"] = dbe.BackupEngineState + } + if dbe.HealthStatus != nil { + objectMap["healthStatus"] = dbe.HealthStatus + } + if dbe.CanReRegister != nil { + objectMap["canReRegister"] = dbe.CanReRegister + } + if dbe.BackupEngineID != nil { + objectMap["backupEngineId"] = dbe.BackupEngineID + } + if dbe.DpmVersion != nil { + objectMap["dpmVersion"] = dbe.DpmVersion + } + if dbe.AzureBackupAgentVersion != nil { + objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion + } + if dbe.IsAzureBackupAgentUpgradeAvailable != nil { + objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable + } + if dbe.IsDpmUpgradeAvailable != nil { + objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable + } + if dbe.ExtendedInfo != nil { + objectMap["extendedInfo"] = dbe.ExtendedInfo + } + if dbe.BackupEngineType != "" { + objectMap["backupEngineType"] = dbe.BackupEngineType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { + return nil, false +} + +// AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return &dbe, true +} + +// AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) { + return nil, false +} + +// AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) { + return &dbe, true +} + +// BasicDpmContainer DPM workload-specific protection container. +type BasicDpmContainer interface { + AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) + AsDpmContainer() (*DpmContainer, bool) +} + +// DpmContainer DPM workload-specific protection container. +type DpmContainer struct { + // CanReRegister - Specifies whether the container is re-registrable. + CanReRegister *bool `json:"canReRegister,omitempty"` + // ContainerID - ID of container. + ContainerID *string `json:"containerId,omitempty"` + // ProtectedItemCount - Number of protected items in the BackupEngine + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // DpmAgentVersion - Backup engine Agent version + DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` + // DpmServers - List of BackupEngines protecting the container + DpmServers *[]string `json:"dpmServers,omitempty"` + // UpgradeAvailable - To check if upgrade available + UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` + // ProtectionStatus - Protection status of the container. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ExtendedInfo - Extended Info of the container. + ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeAzureBackupServerContainer1): + var absc AzureBackupServerContainer + err := json.Unmarshal(body, &absc) + return absc, err + default: + var dc DpmContainer + err := json.Unmarshal(body, &dc) + return dc, err + } +} +func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dcArray := make([]BasicDpmContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dc, err := unmarshalBasicDpmContainer(*rawMessage) + if err != nil { + return nil, err + } + dcArray[index] = dc + } + return dcArray, nil +} + +// MarshalJSON is the custom marshaler for DpmContainer. +func (dc DpmContainer) MarshalJSON() ([]byte, error) { + dc.ContainerType = ContainerTypeDPMContainer1 + objectMap := make(map[string]interface{}) + if dc.CanReRegister != nil { + objectMap["canReRegister"] = dc.CanReRegister + } + if dc.ContainerID != nil { + objectMap["containerId"] = dc.ContainerID + } + if dc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = dc.ProtectedItemCount + } + if dc.DpmAgentVersion != nil { + objectMap["dpmAgentVersion"] = dc.DpmAgentVersion + } + if dc.DpmServers != nil { + objectMap["dpmServers"] = dc.DpmServers + } + if dc.UpgradeAvailable != nil { + objectMap["upgradeAvailable"] = dc.UpgradeAvailable + } + if dc.ProtectionStatus != nil { + objectMap["protectionStatus"] = dc.ProtectionStatus + } + if dc.ExtendedInfo != nil { + objectMap["extendedInfo"] = dc.ExtendedInfo + } + if dc.FriendlyName != nil { + objectMap["friendlyName"] = dc.FriendlyName + } + if dc.BackupManagementType != "" { + objectMap["backupManagementType"] = dc.BackupManagementType + } + if dc.RegistrationStatus != nil { + objectMap["registrationStatus"] = dc.RegistrationStatus + } + if dc.HealthStatus != nil { + objectMap["healthStatus"] = dc.HealthStatus + } + if dc.ContainerType != "" { + objectMap["containerType"] = dc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) { + return &dc, true +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return &dc, true +} + +// AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &dc, true +} + +// DPMContainerExtendedInfo additional information of the DPMContainer. +type DPMContainerExtendedInfo struct { + // LastRefreshedAt - Last refresh time of the DPMContainer. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` +} + +// DpmErrorInfo DPM workload-specific error information. +type DpmErrorInfo struct { + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// DpmJob DPM workload-specific job object. +type DpmJob struct { + // Duration - Time elapsed for job. + Duration *string `json:"duration,omitempty"` + // DpmServerName - DPM server name managing the backup item or backup job. + DpmServerName *string `json:"dpmServerName,omitempty"` + // ContainerName - Name of cluster/server protecting current backup item, if any. + ContainerName *string `json:"containerName,omitempty"` + // ContainerType - Type of container. + ContainerType *string `json:"containerType,omitempty"` + // WorkloadType - Type of backup item. + WorkloadType *string `json:"workloadType,omitempty"` + // ActionsInfo - The state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - The errors. + ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information for this job. + ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for DpmJob. +func (dj DpmJob) MarshalJSON() ([]byte, error) { + dj.JobType = JobTypeDpmJob + objectMap := make(map[string]interface{}) + if dj.Duration != nil { + objectMap["duration"] = dj.Duration + } + if dj.DpmServerName != nil { + objectMap["dpmServerName"] = dj.DpmServerName + } + if dj.ContainerName != nil { + objectMap["containerName"] = dj.ContainerName + } + if dj.ContainerType != nil { + objectMap["containerType"] = dj.ContainerType + } + if dj.WorkloadType != nil { + objectMap["workloadType"] = dj.WorkloadType + } + if dj.ActionsInfo != nil { + objectMap["actionsInfo"] = dj.ActionsInfo + } + if dj.ErrorDetails != nil { + objectMap["errorDetails"] = dj.ErrorDetails + } + if dj.ExtendedInfo != nil { + objectMap["extendedInfo"] = dj.ExtendedInfo + } + if dj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = dj.EntityFriendlyName + } + if dj.BackupManagementType != "" { + objectMap["backupManagementType"] = dj.BackupManagementType + } + if dj.Operation != nil { + objectMap["operation"] = dj.Operation + } + if dj.Status != nil { + objectMap["status"] = dj.Status + } + if dj.StartTime != nil { + objectMap["startTime"] = dj.StartTime + } + if dj.EndTime != nil { + objectMap["endTime"] = dj.EndTime + } + if dj.ActivityID != nil { + objectMap["activityId"] = dj.ActivityID + } + if dj.JobType != "" { + objectMap["jobType"] = dj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsDpmJob() (*DpmJob, bool) { + return &dj, true +} + +// AsMabJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsBasicJob() (BasicJob, bool) { + return &dj, true +} + +// DpmJobExtendedInfo additional information on the DPM workload-specific job. +type DpmJobExtendedInfo struct { + // TasksList - List of tasks associated with this job. + TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - The job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for DpmJobExtendedInfo. +func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if djei.TasksList != nil { + objectMap["tasksList"] = djei.TasksList + } + if djei.PropertyBag != nil { + objectMap["propertyBag"] = djei.PropertyBag + } + if djei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// DpmJobTaskDetails DPM workload-specific job task details. +type DpmJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// DPMProtectedItem additional information on Backup engine specific backup item. +type DPMProtectedItem struct { + // FriendlyName - Friendly name of the managed item + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupEngineName - Backup Management server protecting this backup item + BackupEngineName *string `json:"backupEngineName,omitempty"` + // ProtectionState - Protection state of the backup engine. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' + ProtectionState ProtectedItemState `json:"protectionState,omitempty"` + // ExtendedInfo - Extended info of the backup item. + ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for DPMProtectedItem. +func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) { + dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem + objectMap := make(map[string]interface{}) + if dpi.FriendlyName != nil { + objectMap["friendlyName"] = dpi.FriendlyName + } + if dpi.BackupEngineName != nil { + objectMap["backupEngineName"] = dpi.BackupEngineName + } + if dpi.ProtectionState != "" { + objectMap["protectionState"] = dpi.ProtectionState + } + if dpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = dpi.ExtendedInfo + } + if dpi.BackupManagementType != "" { + objectMap["backupManagementType"] = dpi.BackupManagementType + } + if dpi.WorkloadType != "" { + objectMap["workloadType"] = dpi.WorkloadType + } + if dpi.ContainerName != nil { + objectMap["containerName"] = dpi.ContainerName + } + if dpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = dpi.SourceResourceID + } + if dpi.PolicyID != nil { + objectMap["policyId"] = dpi.PolicyID + } + if dpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint + } + if dpi.BackupSetName != nil { + objectMap["backupSetName"] = dpi.BackupSetName + } + if dpi.CreateMode != "" { + objectMap["createMode"] = dpi.CreateMode + } + if dpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC + } + if dpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete + } + if dpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining + } + if dpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming + } + if dpi.IsRehydrate != nil { + objectMap["isRehydrate"] = dpi.IsRehydrate + } + if dpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = dpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return &dpi, true +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &dpi, true +} + +// DPMProtectedItemExtendedInfo additional information of DPM Protected item. +type DPMProtectedItemExtendedInfo struct { + // ProtectableObjectLoadPath - Attribute to provide information on various DBs. + ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"` + // Protected - To check if backup item is disk protected. + Protected *bool `json:"protected,omitempty"` + // IsPresentOnCloud - To check if backup item is cloud protected. + IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"` + // LastBackupStatus - Last backup status information on backup item. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastRefreshedAt - Last refresh time on backup item. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` + // OldestRecoveryPoint - Oldest cloud recovery point time. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - cloud recovery point count. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // OnPremiseOldestRecoveryPoint - Oldest disk recovery point time. + OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"` + // OnPremiseLatestRecoveryPoint - latest disk recovery point time. + OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"` + // OnPremiseRecoveryPointCount - disk recovery point count. + OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"` + // IsCollocated - To check if backup item is collocated. + IsCollocated *bool `json:"isCollocated,omitempty"` + // ProtectionGroupName - Protection group name of the backup item. + ProtectionGroupName *string `json:"protectionGroupName,omitempty"` + // DiskStorageUsedInBytes - Used Disk storage in bytes. + DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"` + // TotalDiskStorageSizeInBytes - total Disk storage in bytes. + TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"` +} + +// MarshalJSON is the custom marshaler for DPMProtectedItemExtendedInfo. +func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpiei.ProtectableObjectLoadPath != nil { + objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath + } + if dpiei.Protected != nil { + objectMap["protected"] = dpiei.Protected + } + if dpiei.IsPresentOnCloud != nil { + objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud + } + if dpiei.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = dpiei.LastBackupStatus + } + if dpiei.LastRefreshedAt != nil { + objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt + } + if dpiei.OldestRecoveryPoint != nil { + objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint + } + if dpiei.RecoveryPointCount != nil { + objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount + } + if dpiei.OnPremiseOldestRecoveryPoint != nil { + objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint + } + if dpiei.OnPremiseLatestRecoveryPoint != nil { + objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint + } + if dpiei.OnPremiseRecoveryPointCount != nil { + objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount + } + if dpiei.IsCollocated != nil { + objectMap["isCollocated"] = dpiei.IsCollocated + } + if dpiei.ProtectionGroupName != nil { + objectMap["protectionGroupName"] = dpiei.ProtectionGroupName + } + if dpiei.DiskStorageUsedInBytes != nil { + objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes + } + if dpiei.TotalDiskStorageSizeInBytes != nil { + objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes + } + return json.Marshal(objectMap) +} + +// EncryptionDetails details needed if the VM was encrypted at the time of backup. +type EncryptionDetails struct { + // EncryptionEnabled - Identifies whether this backup copy represents an encrypted VM at the time of backup. + EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` + // KekURL - Key Url. + KekURL *string `json:"kekUrl,omitempty"` + // SecretKeyURL - Secret Url. + SecretKeyURL *string `json:"secretKeyUrl,omitempty"` + // KekVaultID - ID of Key Vault where KEK is stored. + KekVaultID *string `json:"kekVaultId,omitempty"` + // SecretKeyVaultID - ID of Key Vault where Secret is stored. + SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"` +} + +// BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class. +type BasicEngineBase interface { + AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) + AsDpmBackupEngine() (*DpmBackupEngine, bool) + AsEngineBase() (*EngineBase, bool) +} + +// EngineBase the base backup engine class. All workload specific backup engines derive from this class. +type EngineBase struct { + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string `json:"backupEngineState,omitempty"` + // HealthStatus - Backup status of the backup engine. + HealthStatus *string `json:"healthStatus,omitempty"` + // CanReRegister - Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool `json:"canReRegister,omitempty"` + // BackupEngineID - ID of the backup engine. + BackupEngineID *string `json:"backupEngineId,omitempty"` + // DpmVersion - Backup engine version + DpmVersion *string `json:"dpmVersion,omitempty"` + // AzureBackupAgentVersion - Backup agent version + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + // IsDpmUpgradeAvailable - To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + // ExtendedInfo - Extended info of the backupengine + ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` + // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' + BackupEngineType EngineType `json:"backupEngineType,omitempty"` +} + +func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["backupEngineType"] { + case string(BackupEngineTypeAzureBackupServerEngine): + var abse AzureBackupServerEngine + err := json.Unmarshal(body, &abse) + return abse, err + case string(BackupEngineTypeDpmBackupEngine): + var dbe DpmBackupEngine + err := json.Unmarshal(body, &dbe) + return dbe, err + default: + var eb EngineBase + err := json.Unmarshal(body, &eb) + return eb, err + } +} +func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ebArray := make([]BasicEngineBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + eb, err := unmarshalBasicEngineBase(*rawMessage) + if err != nil { + return nil, err + } + ebArray[index] = eb + } + return ebArray, nil +} + +// MarshalJSON is the custom marshaler for EngineBase. +func (eb EngineBase) MarshalJSON() ([]byte, error) { + eb.BackupEngineType = BackupEngineTypeBackupEngineBase + objectMap := make(map[string]interface{}) + if eb.FriendlyName != nil { + objectMap["friendlyName"] = eb.FriendlyName + } + if eb.BackupManagementType != "" { + objectMap["backupManagementType"] = eb.BackupManagementType + } + if eb.RegistrationStatus != nil { + objectMap["registrationStatus"] = eb.RegistrationStatus + } + if eb.BackupEngineState != nil { + objectMap["backupEngineState"] = eb.BackupEngineState + } + if eb.HealthStatus != nil { + objectMap["healthStatus"] = eb.HealthStatus + } + if eb.CanReRegister != nil { + objectMap["canReRegister"] = eb.CanReRegister + } + if eb.BackupEngineID != nil { + objectMap["backupEngineId"] = eb.BackupEngineID + } + if eb.DpmVersion != nil { + objectMap["dpmVersion"] = eb.DpmVersion + } + if eb.AzureBackupAgentVersion != nil { + objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion + } + if eb.IsAzureBackupAgentUpgradeAvailable != nil { + objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable + } + if eb.IsDpmUpgradeAvailable != nil { + objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable + } + if eb.ExtendedInfo != nil { + objectMap["extendedInfo"] = eb.ExtendedInfo + } + if eb.BackupEngineType != "" { + objectMap["backupEngineType"] = eb.BackupEngineType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { + return nil, false +} + +// AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return nil, false +} + +// AsEngineBase is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsEngineBase() (*EngineBase, bool) { + return &eb, true +} + +// AsBasicEngineBase is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) { + return &eb, true +} + +// EngineBaseResource the base backup engine class. All workload specific backup engines derive from this +// class. +type EngineBaseResource struct { + autorest.Response `json:"-"` + // Properties - BackupEngineBaseResource properties + Properties BasicEngineBase `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for EngineBaseResource. +func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = ebr.Properties + if ebr.Location != nil { + objectMap["location"] = ebr.Location + } + if ebr.Tags != nil { + objectMap["tags"] = ebr.Tags + } + if ebr.ETag != nil { + objectMap["eTag"] = ebr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct. +func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicEngineBase(*v) + if err != nil { + return err + } + ebr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ebr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ebr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ebr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ebr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ebr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + ebr.ETag = &eTag + } + } + } + + return nil +} + +// EngineBaseResourceList list of BackupEngineBase resources +type EngineBaseResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]EngineBaseResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values. +type EngineBaseResourceListIterator struct { + i int + page EngineBaseResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *EngineBaseResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EngineBaseResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter EngineBaseResourceListIterator) Value() EngineBaseResource { + if !iter.page.NotDone() { + return EngineBaseResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EngineBaseResourceListIterator type. +func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator { + return EngineBaseResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ebrl EngineBaseResourceList) IsEmpty() bool { + return ebrl.Value == nil || len(*ebrl.Value) == 0 +} + +// engineBaseResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) { + if ebrl.NextLink == nil || len(to.String(ebrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ebrl.NextLink))) +} + +// EngineBaseResourceListPage contains a page of EngineBaseResource values. +type EngineBaseResourceListPage struct { + fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error) + ebrl EngineBaseResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ebrl) + if err != nil { + return err + } + page.ebrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *EngineBaseResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EngineBaseResourceListPage) NotDone() bool { + return !page.ebrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EngineBaseResourceListPage) Response() EngineBaseResourceList { + return page.ebrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EngineBaseResourceListPage) Values() []EngineBaseResource { + if page.ebrl.IsEmpty() { + return nil + } + return *page.ebrl.Value +} + +// Creates a new instance of the EngineBaseResourceListPage type. +func NewEngineBaseResourceListPage(getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage { + return EngineBaseResourceListPage{fn: getNextPage} +} + +// EngineExtendedInfo additional information on backup engine. +type EngineExtendedInfo struct { + // DatabaseName - Database name of backup engine. + DatabaseName *string `json:"databaseName,omitempty"` + // ProtectedItemsCount - Number of protected items in the backup engine. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // ProtectedServersCount - Number of protected servers in the backup engine. + ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"` + // DiskCount - Number of disks in the backup engine. + DiskCount *int32 `json:"diskCount,omitempty"` + // UsedDiskSpace - Disk space used in the backup engine. + UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"` + // AvailableDiskSpace - Disk space currently available in the backup engine. + AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"` + // RefreshedAt - Last refresh time in the backup engine. + RefreshedAt *date.Time `json:"refreshedAt,omitempty"` + // AzureProtectedInstances - Protected instances in the backup engine. + AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"` +} + +// ErrorDetail error Detail class which encapsulates Code, Message and Recommendations. +type ErrorDetail struct { + // Code - READ-ONLY; Error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; Error Message related to the Code. + Message *string `json:"message,omitempty"` + // Recommendations - READ-ONLY; List of recommendation strings. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// ExportJobsOperationResultInfo this class is used to send blob details after exporting jobs. +type ExportJobsOperationResultInfo struct { + // BlobURL - URL of the blob into which the serialized string of list of jobs is exported. + BlobURL *string `json:"blobUrl,omitempty"` + // BlobSasKey - SAS key to access the blob. It expires in 15 mins. + BlobSasKey *string `json:"blobSasKey,omitempty"` + // ExcelFileBlobURL - URL of the blob into which the ExcelFile is uploaded. + ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"` + // ExcelFileBlobSasKey - SAS key to access the blob. It expires in 15 mins. + ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) { + ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo + objectMap := make(map[string]interface{}) + if ejori.BlobURL != nil { + objectMap["blobUrl"] = ejori.BlobURL + } + if ejori.BlobSasKey != nil { + objectMap["blobSasKey"] = ejori.BlobSasKey + } + if ejori.ExcelFileBlobURL != nil { + objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL + } + if ejori.ExcelFileBlobSasKey != nil { + objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey + } + if ejori.ObjectType != "" { + objectMap["objectType"] = ejori.ObjectType + } + return json.Marshal(objectMap) +} + +// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { + return &ejori, true +} + +// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { + return nil, false +} + +// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { + return &ejori, true +} + +// ExtendedProperties extended Properties for Azure IaasVM Backup. +type ExtendedProperties struct { + // DiskExclusionProperties - Extended Properties for Disk Exclusion. + DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"` +} + +// BasicFeatureSupportRequest base class for feature request +type BasicFeatureSupportRequest interface { + AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) + AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) + AsFeatureSupportRequest() (*FeatureSupportRequest, bool) +} + +// FeatureSupportRequest base class for feature request +type FeatureSupportRequest struct { + // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' + FeatureType FeatureType `json:"featureType,omitempty"` +} + +func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["featureType"] { + case string(FeatureTypeAzureBackupGoals): + var abgfsr AzureBackupGoalFeatureSupportRequest + err := json.Unmarshal(body, &abgfsr) + return abgfsr, err + case string(FeatureTypeAzureVMResourceBackup): + var avrfsr AzureVMResourceFeatureSupportRequest + err := json.Unmarshal(body, &avrfsr) + return avrfsr, err + default: + var fsr FeatureSupportRequest + err := json.Unmarshal(body, &fsr) + return fsr, err + } +} +func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage) + if err != nil { + return nil, err + } + fsrArray[index] = fsr + } + return fsrArray, nil +} + +// MarshalJSON is the custom marshaler for FeatureSupportRequest. +func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) { + fsr.FeatureType = FeatureTypeFeatureSupportRequest + objectMap := make(map[string]interface{}) + if fsr.FeatureType != "" { + objectMap["featureType"] = fsr.FeatureType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { + return nil, false +} + +// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { + return nil, false +} + +// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { + return &fsr, true +} + +// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { + return &fsr, true +} + +// GenericContainer base class for generic container of backup items +type GenericContainer struct { + // FabricName - Name of the container's fabric + FabricName *string `json:"fabricName,omitempty"` + // ExtendedInformation - Extended information (not returned in List container API calls) + ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericContainer. +func (gc GenericContainer) MarshalJSON() ([]byte, error) { + gc.ContainerType = ContainerTypeGenericContainer1 + objectMap := make(map[string]interface{}) + if gc.FabricName != nil { + objectMap["fabricName"] = gc.FabricName + } + if gc.ExtendedInformation != nil { + objectMap["extendedInformation"] = gc.ExtendedInformation + } + if gc.FriendlyName != nil { + objectMap["friendlyName"] = gc.FriendlyName + } + if gc.BackupManagementType != "" { + objectMap["backupManagementType"] = gc.BackupManagementType + } + if gc.RegistrationStatus != nil { + objectMap["registrationStatus"] = gc.RegistrationStatus + } + if gc.HealthStatus != nil { + objectMap["healthStatus"] = gc.HealthStatus + } + if gc.ContainerType != "" { + objectMap["containerType"] = gc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) { + return &gc, true +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &gc, true +} + +// GenericContainerExtendedInfo container extended information +type GenericContainerExtendedInfo struct { + // RawCertData - Public key of container cert + RawCertData *string `json:"rawCertData,omitempty"` + // ContainerIdentityInfo - Container identity information + ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"` + // ServiceEndpoints - Azure Backup Service Endpoints for the container + ServiceEndpoints map[string]*string `json:"serviceEndpoints"` +} + +// MarshalJSON is the custom marshaler for GenericContainerExtendedInfo. +func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gcei.RawCertData != nil { + objectMap["rawCertData"] = gcei.RawCertData + } + if gcei.ContainerIdentityInfo != nil { + objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo + } + if gcei.ServiceEndpoints != nil { + objectMap["serviceEndpoints"] = gcei.ServiceEndpoints + } + return json.Marshal(objectMap) +} + +// GenericProtectedItem base class for backup items. +type GenericProtectedItem struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // PolicyState - Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string `json:"policyState,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // ProtectedItemID - Data Plane Service ID of the protected item. + ProtectedItemID *int64 `json:"protectedItemId,omitempty"` + // SourceAssociations - Loosely coupled (type, value) associations (example - parent of a protected item) + SourceAssociations map[string]*string `json:"sourceAssociations"` + // FabricName - Name of this backup item's fabric. + FabricName *string `json:"fabricName,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericProtectedItem. +func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) { + gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem + objectMap := make(map[string]interface{}) + if gpi.FriendlyName != nil { + objectMap["friendlyName"] = gpi.FriendlyName + } + if gpi.PolicyState != nil { + objectMap["policyState"] = gpi.PolicyState + } + if gpi.ProtectionState != "" { + objectMap["protectionState"] = gpi.ProtectionState + } + if gpi.ProtectedItemID != nil { + objectMap["protectedItemId"] = gpi.ProtectedItemID + } + if gpi.SourceAssociations != nil { + objectMap["sourceAssociations"] = gpi.SourceAssociations + } + if gpi.FabricName != nil { + objectMap["fabricName"] = gpi.FabricName + } + if gpi.BackupManagementType != "" { + objectMap["backupManagementType"] = gpi.BackupManagementType + } + if gpi.WorkloadType != "" { + objectMap["workloadType"] = gpi.WorkloadType + } + if gpi.ContainerName != nil { + objectMap["containerName"] = gpi.ContainerName + } + if gpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = gpi.SourceResourceID + } + if gpi.PolicyID != nil { + objectMap["policyId"] = gpi.PolicyID + } + if gpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint + } + if gpi.BackupSetName != nil { + objectMap["backupSetName"] = gpi.BackupSetName + } + if gpi.CreateMode != "" { + objectMap["createMode"] = gpi.CreateMode + } + if gpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC + } + if gpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete + } + if gpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining + } + if gpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming + } + if gpi.IsRehydrate != nil { + objectMap["isRehydrate"] = gpi.IsRehydrate + } + if gpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = gpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return &gpi, true +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &gpi, true +} + +// GenericProtectionPolicy azure VM (Mercury) workload-specific backup policy. +type GenericProtectionPolicy struct { + // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention + SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` + // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string `json:"timeZone,omitempty"` + // FabricName - Name of this policy's fabric. + FabricName *string `json:"fabricName,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) { + gpp.BackupManagementType = BackupManagementTypeGenericProtectionPolicy + objectMap := make(map[string]interface{}) + if gpp.SubProtectionPolicy != nil { + objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy + } + if gpp.TimeZone != nil { + objectMap["timeZone"] = gpp.TimeZone + } + if gpp.FabricName != nil { + objectMap["fabricName"] = gpp.FabricName + } + if gpp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount + } + if gpp.BackupManagementType != "" { + objectMap["backupManagementType"] = gpp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return &gpp, true +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &gpp, true +} + +// GenericRecoveryPoint generic backup copy. +type GenericRecoveryPoint struct { + // FriendlyName - Friendly name of the backup copy. + FriendlyName *string `json:"friendlyName,omitempty"` + // RecoveryPointType - Type of the backup copy. + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + // RecoveryPointTime - Time at which this backup copy was created. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + // RecoveryPointAdditionalInfo - Additional information associated with this backup copy. + RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) { + grp.ObjectType = ObjectTypeGenericRecoveryPoint + objectMap := make(map[string]interface{}) + if grp.FriendlyName != nil { + objectMap["friendlyName"] = grp.FriendlyName + } + if grp.RecoveryPointType != nil { + objectMap["recoveryPointType"] = grp.RecoveryPointType + } + if grp.RecoveryPointTime != nil { + objectMap["recoveryPointTime"] = grp.RecoveryPointTime + } + if grp.RecoveryPointAdditionalInfo != nil { + objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo + } + if grp.ObjectType != "" { + objectMap["objectType"] = grp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return &grp, true +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &grp, true +} + +// GetProtectedItemQueryObject filters to list backup items. +type GetProtectedItemQueryObject struct { + // Expand - Specifies if the additional information should be provided for this item. + Expand *string `json:"expand,omitempty"` +} + +// IaasVMBackupRequest iaaS VM workload-specific backup request. +type IaasVMBackupRequest struct { + // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) { + ivbr.ObjectType = ObjectTypeIaasVMBackupRequest + objectMap := make(map[string]interface{}) + if ivbr.RecoveryPointExpiryTimeInUTC != nil { + objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC + } + if ivbr.ObjectType != "" { + objectMap["objectType"] = ivbr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return nil, false +} + +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return nil, false +} + +// AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return &ivbr, true +} + +// AsRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) { + return nil, false +} + +// AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) { + return &ivbr, true +} + +// BasicIaaSVMContainer iaaS VM workload-specific container. +type BasicIaaSVMContainer interface { + AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) + AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) + AsIaaSVMContainer() (*IaaSVMContainer, bool) +} + +// IaaSVMContainer iaaS VM workload-specific container. +type IaaSVMContainer struct { + // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeMicrosoftClassicComputevirtualMachines): + var aisccvc AzureIaaSClassicComputeVMContainer + err := json.Unmarshal(body, &aisccvc) + return aisccvc, err + case string(ContainerTypeMicrosoftComputevirtualMachines): + var aiscvc AzureIaaSComputeVMContainer + err := json.Unmarshal(body, &aiscvc) + return aiscvc, err + default: + var isc IaaSVMContainer + err := json.Unmarshal(body, &isc) + return isc, err + } +} +func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + iscArray := make([]BasicIaaSVMContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + isc, err := unmarshalBasicIaaSVMContainer(*rawMessage) + if err != nil { + return nil, err + } + iscArray[index] = isc + } + return iscArray, nil +} + +// MarshalJSON is the custom marshaler for IaaSVMContainer. +func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) { + isc.ContainerType = ContainerTypeIaaSVMContainer + objectMap := make(map[string]interface{}) + if isc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = isc.VirtualMachineID + } + if isc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion + } + if isc.ResourceGroup != nil { + objectMap["resourceGroup"] = isc.ResourceGroup + } + if isc.FriendlyName != nil { + objectMap["friendlyName"] = isc.FriendlyName + } + if isc.BackupManagementType != "" { + objectMap["backupManagementType"] = isc.BackupManagementType + } + if isc.RegistrationStatus != nil { + objectMap["registrationStatus"] = isc.RegistrationStatus + } + if isc.HealthStatus != nil { + objectMap["healthStatus"] = isc.HealthStatus + } + if isc.ContainerType != "" { + objectMap["containerType"] = isc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return &isc, true +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &isc, true +} + +// AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &isc, true +} + +// IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM. +type IaasVMILRRegistrationRequest struct { + // RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // InitiatorName - iSCSI initiator name. + InitiatorName *string `json:"initiatorName,omitempty"` + // RenewExistingRegistration - Whether to renew existing registration with the iSCSI server. + RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { + ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest + objectMap := make(map[string]interface{}) + if ivrr.RecoveryPointID != nil { + objectMap["recoveryPointId"] = ivrr.RecoveryPointID + } + if ivrr.VirtualMachineID != nil { + objectMap["virtualMachineId"] = ivrr.VirtualMachineID + } + if ivrr.InitiatorName != nil { + objectMap["initiatorName"] = ivrr.InitiatorName + } + if ivrr.RenewExistingRegistration != nil { + objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration + } + if ivrr.ObjectType != "" { + objectMap["objectType"] = ivrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { + return nil, false +} + +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return &ivrr, true +} + +// AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) { + return nil, false +} + +// AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &ivrr, true +} + +// BasicIaaSVMProtectableItem iaaS VM workload-specific backup item. +type BasicIaaSVMProtectableItem interface { + AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) + AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) + AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) +} + +// IaaSVMProtectableItem iaaS VM workload-specific backup item. +type IaaSVMProtectableItem struct { + // VirtualMachineID - Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableItemType"] { + case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectableItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectableItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectableItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + default: + var ispi IaaSVMProtectableItem + err := json.Unmarshal(body, &ispi) + return ispi, err + } +} +func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage) + if err != nil { + return nil, err + } + ispiArray[index] = ispi + } + return ispiArray, nil +} + +// MarshalJSON is the custom marshaler for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { + ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem + objectMap := make(map[string]interface{}) + if ispi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = ispi.VirtualMachineID + } + if ispi.BackupManagementType != nil { + objectMap["backupManagementType"] = ispi.BackupManagementType + } + if ispi.WorkloadType != nil { + objectMap["workloadType"] = ispi.WorkloadType + } + if ispi.FriendlyName != nil { + objectMap["friendlyName"] = ispi.FriendlyName + } + if ispi.ProtectionState != "" { + objectMap["protectionState"] = ispi.ProtectionState + } + if ispi.ProtectableItemType != "" { + objectMap["protectableItemType"] = ispi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return &ispi, true +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &ispi, true +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &ispi, true +} + +// IaasVMRecoveryPoint iaaS VM workload specific backup copy. +type IaasVMRecoveryPoint struct { + // RecoveryPointType - READ-ONLY; Type of the backup copy. + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + // RecoveryPointAdditionalInfo - READ-ONLY; Additional information associated with this backup copy. + RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` + // SourceVMStorageType - READ-ONLY; Storage type of the VM whose backup copy is created. + SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` + // IsSourceVMEncrypted - READ-ONLY; Identifies whether the VM was encrypted when the backup copy is created. + IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` + // KeyAndSecret - Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. + KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` + // IsInstantIlrSessionActive - Is the session to recover items from this backup copy still active. + IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"` + // RecoveryPointTierDetails - Recovery point tier information. + RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"` + // IsManagedVirtualMachine - Whether VM is with Managed Disks + IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` + // VirtualMachineSize - Virtual Machine Size + VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` + // OriginalStorageAccountOption - Original Storage Account Option + OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` + // OsType - OS type + OsType *string `json:"osType,omitempty"` + // RecoveryPointDiskConfiguration - Disk configuration + RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { + ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint + objectMap := make(map[string]interface{}) + if ivrp.KeyAndSecret != nil { + objectMap["keyAndSecret"] = ivrp.KeyAndSecret + } + if ivrp.IsInstantIlrSessionActive != nil { + objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive + } + if ivrp.RecoveryPointTierDetails != nil { + objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails + } + if ivrp.IsManagedVirtualMachine != nil { + objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine + } + if ivrp.VirtualMachineSize != nil { + objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize + } + if ivrp.OriginalStorageAccountOption != nil { + objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption + } + if ivrp.OsType != nil { + objectMap["osType"] = ivrp.OsType + } + if ivrp.RecoveryPointDiskConfiguration != nil { + objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration + } + if ivrp.ObjectType != "" { + objectMap["objectType"] = ivrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return &ivrp, true +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &ivrp, true +} + +// IaasVMRestoreRequest iaaS VM workload-specific restore. +type IaasVMRestoreRequest struct { + // RecoveryPointID - ID of the backup copy to be recovered. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM which is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // TargetVirtualMachineID - This is the complete ARM Id of the VM that will be created. + // For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` + // TargetResourceGroupID - This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. + // For e.g. /subscriptions/{subId}/resourcegroups/{rg} + TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` + // StorageAccountID - Fully qualified ARM ID of the storage account to which the VM has to be restored. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // VirtualNetworkID - This is the virtual network Id of the vnet that will be attached to the virtual machine. + // User will be validated for join action permissions in the linked access. + VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` + // SubnetID - Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be + // {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent + // the subnet. + SubnetID *string `json:"subnetId,omitempty"` + // TargetDomainNameID - Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic + // Virtual Machines. + TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` + // Region - Region in which the virtual machine is restored. + Region *string `json:"region,omitempty"` + // AffinityGroup - Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. + AffinityGroup *string `json:"affinityGroup,omitempty"` + // CreateNewCloudService - Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same + // cloud service as it was at the time of backup. + CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` + // OriginalStorageAccountOption - Original Storage Account Option + OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` + // EncryptionDetails - Details needed if the VM was encrypted at the time of backup. + EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` + // RestoreDiskLunList - List of Disk LUNs for partial restore + RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { + ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest + objectMap := make(map[string]interface{}) + if ivrr.RecoveryPointID != nil { + objectMap["recoveryPointId"] = ivrr.RecoveryPointID + } + if ivrr.RecoveryType != "" { + objectMap["recoveryType"] = ivrr.RecoveryType + } + if ivrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = ivrr.SourceResourceID + } + if ivrr.TargetVirtualMachineID != nil { + objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID + } + if ivrr.TargetResourceGroupID != nil { + objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID + } + if ivrr.StorageAccountID != nil { + objectMap["storageAccountId"] = ivrr.StorageAccountID + } + if ivrr.VirtualNetworkID != nil { + objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID + } + if ivrr.SubnetID != nil { + objectMap["subnetId"] = ivrr.SubnetID + } + if ivrr.TargetDomainNameID != nil { + objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID + } + if ivrr.Region != nil { + objectMap["region"] = ivrr.Region + } + if ivrr.AffinityGroup != nil { + objectMap["affinityGroup"] = ivrr.AffinityGroup + } + if ivrr.CreateNewCloudService != nil { + objectMap["createNewCloudService"] = ivrr.CreateNewCloudService + } + if ivrr.OriginalStorageAccountOption != nil { + objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption + } + if ivrr.EncryptionDetails != nil { + objectMap["encryptionDetails"] = ivrr.EncryptionDetails + } + if ivrr.RestoreDiskLunList != nil { + objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList + } + if ivrr.ObjectType != "" { + objectMap["objectType"] = ivrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return &ivrr, true +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &ivrr, true +} + +// BasicILRRequest parameters to Provision ILR API. +type BasicILRRequest interface { + AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) + AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) + AsILRRequest() (*ILRRequest, bool) +} + +// ILRRequest parameters to Provision ILR API. +type ILRRequest struct { + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareProvisionILRRequest): + var afspir AzureFileShareProvisionILRRequest + err := json.Unmarshal(body, &afspir) + return afspir, err + case string(ObjectTypeIaasVMILRRegistrationRequest): + var ivrr IaasVMILRRegistrationRequest + err := json.Unmarshal(body, &ivrr) + return ivrr, err + default: + var ir ILRRequest + err := json.Unmarshal(body, &ir) + return ir, err + } +} +func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + irArray := make([]BasicILRRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ir, err := unmarshalBasicILRRequest(*rawMessage) + if err != nil { + return nil, err + } + irArray[index] = ir + } + return irArray, nil +} + +// MarshalJSON is the custom marshaler for ILRRequest. +func (ir ILRRequest) MarshalJSON() ([]byte, error) { + ir.ObjectType = ObjectTypeILRRequest + objectMap := make(map[string]interface{}) + if ir.ObjectType != "" { + objectMap["objectType"] = ir.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { + return nil, false +} + +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return nil, false +} + +// AsILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) { + return &ir, true +} + +// AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &ir, true +} + +// ILRRequestResource parameters to Provision ILR API. +type ILRRequestResource struct { + // Properties - ILRRequestResource properties + Properties BasicILRRequest `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ILRRequestResource. +func (irr ILRRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = irr.Properties + if irr.Location != nil { + objectMap["location"] = irr.Location + } + if irr.Tags != nil { + objectMap["tags"] = irr.Tags + } + if irr.ETag != nil { + objectMap["eTag"] = irr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct. +func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicILRRequest(*v) + if err != nil { + return err + } + irr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + irr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + irr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + irr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + irr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + irr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + irr.ETag = &eTag + } + } + } + + return nil +} + +// InquiryInfo details about inquired protectable items under a given container. +type InquiryInfo struct { + // Status - Inquiry Status for this container such as + // InProgress | Failed | Succeeded + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Details if the Status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` + // InquiryDetails - Inquiry Details which will have workload specific details. + // For e.g. - For SQL and oracle this will contain different details. + InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"` +} + +// InquiryValidation validation for inquired protectable items under a given container. +type InquiryValidation struct { + // Status - Status for the Inquiry Validation. + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Detail in case the status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` + // AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success. + AdditionalDetail *string `json:"additionalDetail,omitempty"` +} + +// InstantItemRecoveryTarget target details for file / folder restore. +type InstantItemRecoveryTarget struct { + // ClientScripts - List of client scripts. + ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"` +} + +// InstantRPAdditionalDetails ... +type InstantRPAdditionalDetails struct { + AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"` + AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"` +} + +// BasicJob defines workload agnostic properties for a job. +type BasicJob interface { + AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) + AsAzureStorageJob() (*AzureStorageJob, bool) + AsAzureWorkloadJob() (*AzureWorkloadJob, bool) + AsDpmJob() (*DpmJob, bool) + AsMabJob() (*MabJob, bool) + AsJob() (*Job, bool) +} + +// Job defines workload agnostic properties for a job. +type Job struct { + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +func unmarshalBasicJob(body []byte) (BasicJob, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["jobType"] { + case string(JobTypeAzureIaaSVMJob): + var aisj AzureIaaSVMJob + err := json.Unmarshal(body, &aisj) + return aisj, err + case string(JobTypeAzureStorageJob): + var asj AzureStorageJob + err := json.Unmarshal(body, &asj) + return asj, err + case string(JobTypeAzureWorkloadJob): + var awj AzureWorkloadJob + err := json.Unmarshal(body, &awj) + return awj, err + case string(JobTypeDpmJob): + var dj DpmJob + err := json.Unmarshal(body, &dj) + return dj, err + case string(JobTypeMabJob): + var mj MabJob + err := json.Unmarshal(body, &mj) + return mj, err + default: + var j Job + err := json.Unmarshal(body, &j) + return j, err + } +} +func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + jArray := make([]BasicJob, len(rawMessages)) + + for index, rawMessage := range rawMessages { + j, err := unmarshalBasicJob(*rawMessage) + if err != nil { + return nil, err + } + jArray[index] = j + } + return jArray, nil +} + +// MarshalJSON is the custom marshaler for Job. +func (j Job) MarshalJSON() ([]byte, error) { + j.JobType = JobTypeJob + objectMap := make(map[string]interface{}) + if j.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = j.EntityFriendlyName + } + if j.BackupManagementType != "" { + objectMap["backupManagementType"] = j.BackupManagementType + } + if j.Operation != nil { + objectMap["operation"] = j.Operation + } + if j.Status != nil { + objectMap["status"] = j.Status + } + if j.StartTime != nil { + objectMap["startTime"] = j.StartTime + } + if j.EndTime != nil { + objectMap["endTime"] = j.EndTime + } + if j.ActivityID != nil { + objectMap["activityId"] = j.ActivityID + } + if j.JobType != "" { + objectMap["jobType"] = j.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for Job. +func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for Job. +func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for Job. +func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for Job. +func (j Job) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for Job. +func (j Job) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for Job. +func (j Job) AsJob() (*Job, bool) { + return &j, true +} + +// AsBasicJob is the BasicJob implementation for Job. +func (j Job) AsBasicJob() (BasicJob, bool) { + return &j, true +} + +// JobQueryObject filters to list the jobs. +type JobQueryObject struct { + // Status - Status of the job. Possible values include: 'JobStatusInvalid', 'JobStatusInProgress', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusCompletedWithWarnings', 'JobStatusCancelled', 'JobStatusCancelling' + Status JobStatus `json:"status,omitempty"` + // BackupManagementType - Type of backup management for the job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - Type of operation. Possible values include: 'JobOperationTypeInvalid', 'JobOperationTypeRegister', 'JobOperationTypeUnRegister', 'JobOperationTypeConfigureBackup', 'JobOperationTypeBackup', 'JobOperationTypeRestore', 'JobOperationTypeDisableBackup', 'JobOperationTypeDeleteBackupData', 'JobOperationTypeCrossRegionRestore', 'JobOperationTypeUndelete' + Operation JobOperationType `json:"operation,omitempty"` + // JobID - JobID represents the job uniquely. + JobID *string `json:"jobId,omitempty"` + // StartTime - Job has started at this time. Value is in UTC. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Job has ended at this time. Value is in UTC. + EndTime *date.Time `json:"endTime,omitempty"` +} + +// JobResource defines workload agnostic properties for a job. +type JobResource struct { + autorest.Response `json:"-"` + // Properties - JobResource properties + Properties BasicJob `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for JobResource. +func (jr JobResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = jr.Properties + if jr.Location != nil { + objectMap["location"] = jr.Location + } + if jr.Tags != nil { + objectMap["tags"] = jr.Tags + } + if jr.ETag != nil { + objectMap["eTag"] = jr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for JobResource struct. +func (jr *JobResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicJob(*v) + if err != nil { + return err + } + jr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + jr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + jr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + jr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + jr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + jr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + jr.ETag = &eTag + } + } + } + + return nil +} + +// JobResourceList list of Job resources +type JobResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]JobResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// JobResourceListIterator provides access to a complete listing of JobResource values. +type JobResourceListIterator struct { + i int + page JobResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *JobResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter JobResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter JobResourceListIterator) Response() JobResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter JobResourceListIterator) Value() JobResource { + if !iter.page.NotDone() { + return JobResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the JobResourceListIterator type. +func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator { + return JobResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (jrl JobResourceList) IsEmpty() bool { + return jrl.Value == nil || len(*jrl.Value) == 0 +} + +// jobResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) { + if jrl.NextLink == nil || len(to.String(jrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(jrl.NextLink))) +} + +// JobResourceListPage contains a page of JobResource values. +type JobResourceListPage struct { + fn func(context.Context, JobResourceList) (JobResourceList, error) + jrl JobResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.jrl) + if err != nil { + return err + } + page.jrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *JobResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page JobResourceListPage) NotDone() bool { + return !page.jrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page JobResourceListPage) Response() JobResourceList { + return page.jrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page JobResourceListPage) Values() []JobResource { + if page.jrl.IsEmpty() { + return nil + } + return *page.jrl.Value +} + +// Creates a new instance of the JobResourceListPage type. +func NewJobResourceListPage(getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage { + return JobResourceListPage{fn: getNextPage} +} + +// KEKDetails KEK is encryption key for BEK. +type KEKDetails struct { + // KeyURL - Key is KEK. + KeyURL *string `json:"keyUrl,omitempty"` + // KeyVaultID - Key Vault ID where this Key is stored. + KeyVaultID *string `json:"keyVaultId,omitempty"` + // KeyBackupData - KEK data. + KeyBackupData *string `json:"keyBackupData,omitempty"` +} + +// KeyAndSecretDetails BEK is bitlocker key. +// KEK is encryption key for BEK +// If the VM was encrypted then we will store following details : +// 1. Secret(BEK) - Url + Backup Data + vaultId. +// 2. Key(KEK) - Url + Backup Data + vaultId. +// 3. EncryptionMechanism +// BEK and KEK can potentially have different vault ids. +type KeyAndSecretDetails struct { + // KekDetails - KEK is encryption key for BEK. + KekDetails *KEKDetails `json:"kekDetails,omitempty"` + // BekDetails - BEK is bitlocker encryption key. + BekDetails *BEKDetails `json:"bekDetails,omitempty"` + // EncryptionMechanism - Encryption mechanism: None/ SinglePass/ DoublePass + EncryptionMechanism *string `json:"encryptionMechanism,omitempty"` +} + +// LogSchedulePolicy log policy schedule. +type LogSchedulePolicy struct { + // ScheduleFrequencyInMins - Frequency of the log schedule operation of this policy in minutes. + ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"` + // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LogSchedulePolicy. +func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) { + lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy + objectMap := make(map[string]interface{}) + if lsp.ScheduleFrequencyInMins != nil { + objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins + } + if lsp.SchedulePolicyType != "" { + objectMap["schedulePolicyType"] = lsp.SchedulePolicyType + } + return json.Marshal(objectMap) +} + +// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { + return &lsp, true +} + +// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return nil, false +} + +// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return nil, false +} + +// AsSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { + return nil, false +} + +// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { + return &lsp, true +} + +// LongTermRetentionPolicy long term retention policy. +type LongTermRetentionPolicy struct { + // DailySchedule - Daily retention schedule of the protection policy. + DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` + // WeeklySchedule - Weekly retention schedule of the protection policy. + WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` + // MonthlySchedule - Monthly retention schedule of the protection policy. + MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` + // YearlySchedule - Yearly retention schedule of the protection policy. + YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` + // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' + RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { + ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy + objectMap := make(map[string]interface{}) + if ltrp.DailySchedule != nil { + objectMap["dailySchedule"] = ltrp.DailySchedule + } + if ltrp.WeeklySchedule != nil { + objectMap["weeklySchedule"] = ltrp.WeeklySchedule + } + if ltrp.MonthlySchedule != nil { + objectMap["monthlySchedule"] = ltrp.MonthlySchedule + } + if ltrp.YearlySchedule != nil { + objectMap["yearlySchedule"] = ltrp.YearlySchedule + } + if ltrp.RetentionPolicyType != "" { + objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType + } + return json.Marshal(objectMap) +} + +// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { + return <rp, true +} + +// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { + return nil, false +} + +// AsRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { + return nil, false +} + +// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { + return <rp, true +} + +// LongTermSchedulePolicy long term policy schedule. +type LongTermSchedulePolicy struct { + // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { + ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy + objectMap := make(map[string]interface{}) + if ltsp.SchedulePolicyType != "" { + objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType + } + return json.Marshal(objectMap) +} + +// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { + return nil, false +} + +// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return <sp, true +} + +// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return nil, false +} + +// AsSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { + return nil, false +} + +// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { + return <sp, true +} + +// MabContainer container with items backed up using MAB backup engine. +type MabContainer struct { + // CanReRegister - Can the container be registered one more time. + CanReRegister *bool `json:"canReRegister,omitempty"` + // ContainerID - ContainerID represents the container. + ContainerID *int64 `json:"containerId,omitempty"` + // ProtectedItemCount - Number of items backed up in this container. + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // AgentVersion - Agent version of this container. + AgentVersion *string `json:"agentVersion,omitempty"` + // ExtendedInfo - Additional information for this container + ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` + // MabContainerHealthDetails - Health details on this mab container. + MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"` + // ContainerHealthState - Health state of mab container. + ContainerHealthState *string `json:"containerHealthState,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabContainer. +func (mc MabContainer) MarshalJSON() ([]byte, error) { + mc.ContainerType = ContainerTypeWindows1 + objectMap := make(map[string]interface{}) + if mc.CanReRegister != nil { + objectMap["canReRegister"] = mc.CanReRegister + } + if mc.ContainerID != nil { + objectMap["containerId"] = mc.ContainerID + } + if mc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = mc.ProtectedItemCount + } + if mc.AgentVersion != nil { + objectMap["agentVersion"] = mc.AgentVersion + } + if mc.ExtendedInfo != nil { + objectMap["extendedInfo"] = mc.ExtendedInfo + } + if mc.MabContainerHealthDetails != nil { + objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails + } + if mc.ContainerHealthState != nil { + objectMap["containerHealthState"] = mc.ContainerHealthState + } + if mc.FriendlyName != nil { + objectMap["friendlyName"] = mc.FriendlyName + } + if mc.BackupManagementType != "" { + objectMap["backupManagementType"] = mc.BackupManagementType + } + if mc.RegistrationStatus != nil { + objectMap["registrationStatus"] = mc.RegistrationStatus + } + if mc.HealthStatus != nil { + objectMap["healthStatus"] = mc.HealthStatus + } + if mc.ContainerType != "" { + objectMap["containerType"] = mc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsMabContainer() (*MabContainer, bool) { + return &mc, true +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &mc, true +} + +// MabContainerExtendedInfo additional information of the container. +type MabContainerExtendedInfo struct { + // LastRefreshedAt - Time stamp when this container was refreshed. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` + // BackupItemType - Type of backup items associated with this container. Possible values include: 'ItemTypeInvalid', 'ItemTypeVM', 'ItemTypeFileFolder', 'ItemTypeAzureSQLDb', 'ItemTypeSQLDB', 'ItemTypeExchange', 'ItemTypeSharepoint', 'ItemTypeVMwareVM', 'ItemTypeSystemState', 'ItemTypeClient', 'ItemTypeGenericDataSource', 'ItemTypeSQLDataBase', 'ItemTypeAzureFileShare', 'ItemTypeSAPHanaDatabase', 'ItemTypeSAPAseDatabase' + BackupItemType ItemType `json:"backupItemType,omitempty"` + // BackupItems - List of backup items associated with this container. + BackupItems *[]string `json:"backupItems,omitempty"` + // PolicyName - Backup policy associated with this container. + PolicyName *string `json:"policyName,omitempty"` + // LastBackupStatus - Latest backup status of this container. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` +} + +// MABContainerHealthDetails MAB workload-specific Health Details. +type MABContainerHealthDetails struct { + // Code - Health Code + Code *int32 `json:"code,omitempty"` + // Title - Health Title + Title *string `json:"title,omitempty"` + // Message - Health Message + Message *string `json:"message,omitempty"` + // Recommendations - Health Recommended Actions + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// MabErrorInfo MAB workload-specific error information. +type MabErrorInfo struct { + // ErrorString - READ-ONLY; Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - READ-ONLY; List of localized recommendations. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// MabFileFolderProtectedItem MAB workload-specific backup item. +type MabFileFolderProtectedItem struct { + // FriendlyName - Friendly name of this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ComputerName - Name of the computer associated with this backup item. + ComputerName *string `json:"computerName,omitempty"` + // LastBackupStatus - Status of last backup operation. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ProtectionState - Protected, ProtectionStopped, IRPending or ProtectionError + ProtectionState *string `json:"protectionState,omitempty"` + // DeferredDeleteSyncTimeInUTC - Sync time for deferred deletion in UTC + DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"` + // ExtendedInfo - Additional information with this backup item. + ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { + mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem + objectMap := make(map[string]interface{}) + if mffpi.FriendlyName != nil { + objectMap["friendlyName"] = mffpi.FriendlyName + } + if mffpi.ComputerName != nil { + objectMap["computerName"] = mffpi.ComputerName + } + if mffpi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = mffpi.LastBackupStatus + } + if mffpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = mffpi.LastBackupTime + } + if mffpi.ProtectionState != nil { + objectMap["protectionState"] = mffpi.ProtectionState + } + if mffpi.DeferredDeleteSyncTimeInUTC != nil { + objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC + } + if mffpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = mffpi.ExtendedInfo + } + if mffpi.BackupManagementType != "" { + objectMap["backupManagementType"] = mffpi.BackupManagementType + } + if mffpi.WorkloadType != "" { + objectMap["workloadType"] = mffpi.WorkloadType + } + if mffpi.ContainerName != nil { + objectMap["containerName"] = mffpi.ContainerName + } + if mffpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = mffpi.SourceResourceID + } + if mffpi.PolicyID != nil { + objectMap["policyId"] = mffpi.PolicyID + } + if mffpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint + } + if mffpi.BackupSetName != nil { + objectMap["backupSetName"] = mffpi.BackupSetName + } + if mffpi.CreateMode != "" { + objectMap["createMode"] = mffpi.CreateMode + } + if mffpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC + } + if mffpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete + } + if mffpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining + } + if mffpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming + } + if mffpi.IsRehydrate != nil { + objectMap["isRehydrate"] = mffpi.IsRehydrate + } + if mffpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = mffpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return &mffpi, true +} + +// AsProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &mffpi, true +} + +// MabFileFolderProtectedItemExtendedInfo additional information on the backed up item. +type MabFileFolderProtectedItemExtendedInfo struct { + // LastRefreshedAt - Last time when the agent data synced to service. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` + // OldestRecoveryPoint - The oldest backup copy available. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of backup copies associated with the backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` +} + +// MabJob MAB workload-specific job. +type MabJob struct { + // Duration - Time taken by job to run. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - The state/actions applicable on jobs like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // MabServerName - Name of server protecting the DS. + MabServerName *string `json:"mabServerName,omitempty"` + // MabServerType - Server type of MAB container. Possible values include: 'MabServerTypeInvalid', 'MabServerTypeUnknown', 'MabServerTypeIaasVMContainer', 'MabServerTypeIaasVMServiceContainer', 'MabServerTypeDPMContainer', 'MabServerTypeAzureBackupServerContainer', 'MabServerTypeMABContainer', 'MabServerTypeCluster', 'MabServerTypeAzureSQLContainer', 'MabServerTypeWindows', 'MabServerTypeVCenter', 'MabServerTypeVMAppContainer', 'MabServerTypeSQLAGWorkLoadContainer', 'MabServerTypeStorageContainer', 'MabServerTypeGenericContainer' + MabServerType MabServerType `json:"mabServerType,omitempty"` + // WorkloadType - Workload type of backup item. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ErrorDetails - The errors. + ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information on the job. + ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabJob. +func (mj MabJob) MarshalJSON() ([]byte, error) { + mj.JobType = JobTypeMabJob + objectMap := make(map[string]interface{}) + if mj.Duration != nil { + objectMap["duration"] = mj.Duration + } + if mj.ActionsInfo != nil { + objectMap["actionsInfo"] = mj.ActionsInfo + } + if mj.MabServerName != nil { + objectMap["mabServerName"] = mj.MabServerName + } + if mj.MabServerType != "" { + objectMap["mabServerType"] = mj.MabServerType + } + if mj.WorkloadType != "" { + objectMap["workloadType"] = mj.WorkloadType + } + if mj.ErrorDetails != nil { + objectMap["errorDetails"] = mj.ErrorDetails + } + if mj.ExtendedInfo != nil { + objectMap["extendedInfo"] = mj.ExtendedInfo + } + if mj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = mj.EntityFriendlyName + } + if mj.BackupManagementType != "" { + objectMap["backupManagementType"] = mj.BackupManagementType + } + if mj.Operation != nil { + objectMap["operation"] = mj.Operation + } + if mj.Status != nil { + objectMap["status"] = mj.Status + } + if mj.StartTime != nil { + objectMap["startTime"] = mj.StartTime + } + if mj.EndTime != nil { + objectMap["endTime"] = mj.EndTime + } + if mj.ActivityID != nil { + objectMap["activityId"] = mj.ActivityID + } + if mj.JobType != "" { + objectMap["jobType"] = mj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsMabJob() (*MabJob, bool) { + return &mj, true +} + +// AsJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsBasicJob() (BasicJob, bool) { + return &mj, true +} + +// MabJobExtendedInfo additional information for the MAB workload-specific job. +type MabJobExtendedInfo struct { + // TasksList - List of tasks for this job. + TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - The job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message specific to this job. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabJobExtendedInfo. +func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mjei.TasksList != nil { + objectMap["tasksList"] = mjei.TasksList + } + if mjei.PropertyBag != nil { + objectMap["propertyBag"] = mjei.PropertyBag + } + if mjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// MabJobTaskDetails MAB workload-specific job task details. +type MabJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// MabProtectionPolicy mab container-specific backup policy. +type MabProtectionPolicy struct { + // SchedulePolicy - Backup schedule of backup policy. + SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` + // RetentionPolicy - Retention policy details. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabProtectionPolicy. +func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) { + mpp.BackupManagementType = BackupManagementTypeMAB + objectMap := make(map[string]interface{}) + objectMap["schedulePolicy"] = mpp.SchedulePolicy + objectMap["retentionPolicy"] = mpp.RetentionPolicy + if mpp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount + } + if mpp.BackupManagementType != "" { + objectMap["backupManagementType"] = mpp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return &mpp, true +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &mpp, true +} + +// UnmarshalJSON is the custom unmarshaler for MabProtectionPolicy struct. +func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "schedulePolicy": + if v != nil { + schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) + if err != nil { + return err + } + mpp.SchedulePolicy = schedulePolicy + } + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + mpp.RetentionPolicy = retentionPolicy + } + case "protectedItemsCount": + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*v, &protectedItemsCount) + if err != nil { + return err + } + mpp.ProtectedItemsCount = &protectedItemsCount + } + case "backupManagementType": + if v != nil { + var backupManagementType ManagementTypeBasicProtectionPolicy + err = json.Unmarshal(*v, &backupManagementType) + if err != nil { + return err + } + mpp.BackupManagementType = backupManagementType + } + } + } + + return nil +} + +// ManagementUsage backup management usages of a vault. +type ManagementUsage struct { + // Unit - Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + Unit UsagesUnit `json:"unit,omitempty"` + // QuotaPeriod - Quota period of usage. + QuotaPeriod *string `json:"quotaPeriod,omitempty"` + // NextResetTime - Next reset time of usage. + NextResetTime *date.Time `json:"nextResetTime,omitempty"` + // CurrentValue - Current value of usage. + CurrentValue *int64 `json:"currentValue,omitempty"` + // Limit - Limit of usage. + Limit *int64 `json:"limit,omitempty"` + // Name - Name of usage. + Name *NameInfo `json:"name,omitempty"` +} + +// ManagementUsageList backup management usage for vault. +type ManagementUsageList struct { + autorest.Response `json:"-"` + // Value - The list of backup management usages for the given vault. + Value *[]ManagementUsage `json:"value,omitempty"` +} + +// MonthlyRetentionSchedule monthly retention schedule. +type MonthlyRetentionSchedule struct { + // RetentionScheduleFormatType - Retention schedule format type for monthly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' + RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` + // RetentionScheduleDaily - Daily retention format for monthly retention policy. + RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` + // RetentionScheduleWeekly - Weekly retention format for monthly retention policy. + RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` + // RetentionTimes - Retention times of retention policy. + RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` + // RetentionDuration - Retention duration of retention Policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} + +// NameInfo the name of usage. +type NameInfo struct { + // Value - Value of usage. + Value *string `json:"value,omitempty"` + // LocalizedValue - Localized value of usage. + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// OperationResultInfo operation result info. +type OperationResultInfo struct { + // JobList - List of jobs created by this operation. + JobList *[]string `json:"jobList,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationResultInfo. +func (ori OperationResultInfo) MarshalJSON() ([]byte, error) { + ori.ObjectType = ObjectTypeOperationResultInfo + objectMap := make(map[string]interface{}) + if ori.JobList != nil { + objectMap["jobList"] = ori.JobList + } + if ori.ObjectType != "" { + objectMap["objectType"] = ori.ObjectType + } + return json.Marshal(objectMap) +} + +// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { + return &ori, true +} + +// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { + return nil, false +} + +// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { + return &ori, true +} + +// BasicOperationResultInfoBase base class for operation result info. +type BasicOperationResultInfoBase interface { + AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) + AsOperationResultInfo() (*OperationResultInfo, bool) + AsOperationResultInfoBase() (*OperationResultInfoBase, bool) +} + +// OperationResultInfoBase base class for operation result info. +type OperationResultInfoBase struct { + // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeExportJobsOperationResultInfo): + var ejori ExportJobsOperationResultInfo + err := json.Unmarshal(body, &ejori) + return ejori, err + case string(ObjectTypeOperationResultInfo): + var ori OperationResultInfo + err := json.Unmarshal(body, &ori) + return ori, err + default: + var orib OperationResultInfoBase + err := json.Unmarshal(body, &orib) + return orib, err + } +} +func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oribArray := make([]BasicOperationResultInfoBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage) + if err != nil { + return nil, err + } + oribArray[index] = orib + } + return oribArray, nil +} + +// MarshalJSON is the custom marshaler for OperationResultInfoBase. +func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) { + orib.ObjectType = ObjectTypeOperationResultInfoBase + objectMap := make(map[string]interface{}) + if orib.ObjectType != "" { + objectMap["objectType"] = orib.ObjectType + } + return json.Marshal(objectMap) +} + +// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. +func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. +func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. +func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { + return &orib, true +} + +// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. +func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { + return &orib, true +} + +// OperationResultInfoBaseResource base class for operation result info. +type OperationResultInfoBaseResource struct { + autorest.Response `json:"-"` + // Operation - OperationResultInfoBaseResource operation + Operation BasicOperationResultInfoBase `json:"operation,omitempty"` + // StatusCode - HTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported' + StatusCode HTTPStatusCode `json:"statusCode,omitempty"` + // Headers - HTTP headers associated with this operation. + Headers map[string][]string `json:"headers"` +} + +// MarshalJSON is the custom marshaler for OperationResultInfoBaseResource. +func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["operation"] = oribr.Operation + if oribr.StatusCode != "" { + objectMap["statusCode"] = oribr.StatusCode + } + if oribr.Headers != nil { + objectMap["headers"] = oribr.Headers + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OperationResultInfoBaseResource struct. +func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "operation": + if v != nil { + operation, err := unmarshalBasicOperationResultInfoBase(*v) + if err != nil { + return err + } + oribr.Operation = operation + } + case "statusCode": + if v != nil { + var statusCode HTTPStatusCode + err = json.Unmarshal(*v, &statusCode) + if err != nil { + return err + } + oribr.StatusCode = statusCode + } + case "headers": + if v != nil { + var headers map[string][]string + err = json.Unmarshal(*v, &headers) + if err != nil { + return err + } + oribr.Headers = headers + } + } + } + + return nil +} + +// OperationStatus operation status. +type OperationStatus struct { + autorest.Response `json:"-"` + // ID - ID of the operation. + ID *string `json:"id,omitempty"` + // Name - Name of the operation. + Name *string `json:"name,omitempty"` + // Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled' + Status OperationStatusValues `json:"status,omitempty"` + // StartTime - Operation start time. Format: ISO-8601. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Operation end time. Format: ISO-8601. + EndTime *date.Time `json:"endTime,omitempty"` + // Error - Error information related to this operation. + Error *OperationStatusError `json:"error,omitempty"` + // Properties - Additional information associated with this operation. + Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for OperationStatus struct. +func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + osVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + osVar.Name = &name + } + case "status": + if v != nil { + var status OperationStatusValues + err = json.Unmarshal(*v, &status) + if err != nil { + return err + } + osVar.Status = status + } + case "startTime": + if v != nil { + var startTime date.Time + err = json.Unmarshal(*v, &startTime) + if err != nil { + return err + } + osVar.StartTime = &startTime + } + case "endTime": + if v != nil { + var endTime date.Time + err = json.Unmarshal(*v, &endTime) + if err != nil { + return err + } + osVar.EndTime = &endTime + } + case "error": + if v != nil { + var errorVar OperationStatusError + err = json.Unmarshal(*v, &errorVar) + if err != nil { + return err + } + osVar.Error = &errorVar + } + case "properties": + if v != nil { + properties, err := unmarshalBasicOperationStatusExtendedInfo(*v) + if err != nil { + return err + } + osVar.Properties = properties + } + } + } + + return nil +} + +// OperationStatusError error information associated with operation status call. +type OperationStatusError struct { + // Code - Error code of the operation failure. + Code *string `json:"code,omitempty"` + // Message - Error message displayed if the operation failure. + Message *string `json:"message,omitempty"` +} + +// BasicOperationStatusExtendedInfo base class for additional information of operation status. +type BasicOperationStatusExtendedInfo interface { + AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) + AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) + AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) + AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) +} + +// OperationStatusExtendedInfo base class for additional information of operation status. +type OperationStatusExtendedInfo struct { + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeOperationStatusJobExtendedInfo): + var osjei OperationStatusJobExtendedInfo + err := json.Unmarshal(body, &osjei) + return osjei, err + case string(ObjectTypeOperationStatusJobsExtendedInfo): + var osjei OperationStatusJobsExtendedInfo + err := json.Unmarshal(body, &osjei) + return osjei, err + case string(ObjectTypeOperationStatusProvisionILRExtendedInfo): + var ospiei OperationStatusProvisionILRExtendedInfo + err := json.Unmarshal(body, &ospiei) + return ospiei, err + default: + var osei OperationStatusExtendedInfo + err := json.Unmarshal(body, &osei) + return osei, err + } +} +func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage) + if err != nil { + return nil, err + } + oseiArray[index] = osei + } + return oseiArray, nil +} + +// MarshalJSON is the custom marshaler for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) { + osei.ObjectType = ObjectTypeOperationStatusExtendedInfo + objectMap := make(map[string]interface{}) + if osei.ObjectType != "" { + objectMap["objectType"] = osei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return &osei, true +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osei, true +} + +// OperationStatusJobExtendedInfo operation status job extended info. +type OperationStatusJobExtendedInfo struct { + // JobID - ID of the job created for this protected item. + JobID *string `json:"jobId,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { + osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo + objectMap := make(map[string]interface{}) + if osjei.JobID != nil { + objectMap["jobId"] = osjei.JobID + } + if osjei.ObjectType != "" { + objectMap["objectType"] = osjei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return &osjei, true +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osjei, true +} + +// OperationStatusJobsExtendedInfo operation status extended info for list of jobs. +type OperationStatusJobsExtendedInfo struct { + // JobIds - IDs of the jobs created for the protected item. + JobIds *[]string `json:"jobIds,omitempty"` + // FailedJobsError - Stores all the failed jobs along with the corresponding error codes. + FailedJobsError map[string]*string `json:"failedJobsError"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { + osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo + objectMap := make(map[string]interface{}) + if osjei.JobIds != nil { + objectMap["jobIds"] = osjei.JobIds + } + if osjei.FailedJobsError != nil { + objectMap["failedJobsError"] = osjei.FailedJobsError + } + if osjei.ObjectType != "" { + objectMap["objectType"] = osjei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return &osjei, true +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osjei, true +} + +// OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action. +type OperationStatusProvisionILRExtendedInfo struct { + // RecoveryTarget - Target details for file / folder restore. + RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { + ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo + objectMap := make(map[string]interface{}) + if ospiei.RecoveryTarget != nil { + objectMap["recoveryTarget"] = ospiei.RecoveryTarget + } + if ospiei.ObjectType != "" { + objectMap["objectType"] = ospiei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return &ospiei, true +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &ospiei, true +} + +// OperationWorkerResponse this is the base class for operation result responses. +type OperationWorkerResponse struct { + // StatusCode - HTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported' + StatusCode HTTPStatusCode `json:"statusCode,omitempty"` + // Headers - HTTP headers associated with this operation. + Headers map[string][]string `json:"headers"` +} + +// MarshalJSON is the custom marshaler for OperationWorkerResponse. +func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if owr.StatusCode != "" { + objectMap["statusCode"] = owr.StatusCode + } + if owr.Headers != nil { + objectMap["headers"] = owr.Headers + } + return json.Marshal(objectMap) +} + +// PointInTimeRange provides details for log ranges +type PointInTimeRange struct { + // StartTime - Start time of the time range for log recovery. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - End time of the time range for log recovery. + EndTime *date.Time `json:"endTime,omitempty"` +} + +// PreBackupValidation pre-backup validation for Azure VM Workload provider. +type PreBackupValidation struct { + // Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed' + Status InquiryStatus `json:"status,omitempty"` + // Code - Error code of protectable item + Code *string `json:"code,omitempty"` + // Message - Message corresponding to the error code for the protectable item + Message *string `json:"message,omitempty"` +} + +// PreValidateEnableBackupRequest contract to validate if backup can be enabled on the given resource in a +// given vault and given configuration. +// It will validate followings +// 1. Vault capacity +// 2. VM is already protected +// 3. Any VM related configuration passed in properties. +type PreValidateEnableBackupRequest struct { + // ResourceType - ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + ResourceType DataSourceType `json:"resourceType,omitempty"` + // ResourceID - ARM Virtual Machine Id + ResourceID *string `json:"resourceId,omitempty"` + // VaultID - ARM id of the Recovery Services Vault + VaultID *string `json:"vaultId,omitempty"` + // Properties - Configuration of VM if any needs to be validated like OS type etc + Properties *string `json:"properties,omitempty"` +} + +// PreValidateEnableBackupResponse response contract for enable backup validation request +type PreValidateEnableBackupResponse struct { + autorest.Response `json:"-"` + // Status - Validation Status. Possible values include: 'ValidationStatusInvalid', 'ValidationStatusSucceeded', 'ValidationStatusFailed' + Status ValidationStatus `json:"status,omitempty"` + // ErrorCode - Response error code + ErrorCode *string `json:"errorCode,omitempty"` + // ErrorMessage - Response error message + ErrorMessage *string `json:"errorMessage,omitempty"` + // Recommendation - Recommended action for user + Recommendation *string `json:"recommendation,omitempty"` + // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + // for portal + ContainerName *string `json:"containerName,omitempty"` + // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal + ProtectedItemName *string `json:"protectedItemName,omitempty"` +} + +// BasicProtectableContainer protectable Container Class. +type BasicProtectableContainer interface { + AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) + AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) + AsProtectableContainer() (*ProtectableContainer, bool) +} + +// ProtectableContainer protectable Container Class. +type ProtectableContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` +} + +func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableContainerType"] { + case string(ProtectableContainerTypeStorageContainer): + var aspc AzureStorageProtectableContainer + err := json.Unmarshal(body, &aspc) + return aspc, err + case string(ProtectableContainerTypeVMAppContainer): + var avacpc AzureVMAppContainerProtectableContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err + default: + var pc ProtectableContainer + err := json.Unmarshal(body, &pc) + return pc, err + } +} +func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pcArray := make([]BasicProtectableContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pc, err := unmarshalBasicProtectableContainer(*rawMessage) + if err != nil { + return nil, err + } + pcArray[index] = pc + } + return pcArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectableContainer. +func (pc ProtectableContainer) MarshalJSON() ([]byte, error) { + pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer + objectMap := make(map[string]interface{}) + if pc.FriendlyName != nil { + objectMap["friendlyName"] = pc.FriendlyName + } + if pc.BackupManagementType != "" { + objectMap["backupManagementType"] = pc.BackupManagementType + } + if pc.HealthStatus != nil { + objectMap["healthStatus"] = pc.HealthStatus + } + if pc.ContainerID != nil { + objectMap["containerId"] = pc.ContainerID + } + if pc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = pc.ProtectableContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { + return nil, false +} + +// AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { + return &pc, true +} + +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &pc, true +} + +// ProtectableContainerResource protectable Container Class. +type ProtectableContainerResource struct { + // Properties - ProtectableContainerResource properties + Properties BasicProtectableContainer `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectableContainerResource. +func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pcr.Properties + if pcr.Location != nil { + objectMap["location"] = pcr.Location + } + if pcr.Tags != nil { + objectMap["tags"] = pcr.Tags + } + if pcr.ETag != nil { + objectMap["eTag"] = pcr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct. +func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectableContainer(*v) + if err != nil { + return err + } + pcr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pcr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pcr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pcr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pcr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pcr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pcr.ETag = &eTag + } + } + } + + return nil +} + +// ProtectableContainerResourceList list of ProtectableContainer resources +type ProtectableContainerResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectableContainerResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectableContainerResourceListIterator provides access to a complete listing of +// ProtectableContainerResource values. +type ProtectableContainerResourceListIterator struct { + i int + page ProtectableContainerResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectableContainerResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectableContainerResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource { + if !iter.page.NotDone() { + return ProtectableContainerResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectableContainerResourceListIterator type. +func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator { + return ProtectableContainerResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pcrl ProtectableContainerResourceList) IsEmpty() bool { + return pcrl.Value == nil || len(*pcrl.Value) == 0 +} + +// protectableContainerResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pcrl.NextLink))) +} + +// ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values. +type ProtectableContainerResourceListPage struct { + fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error) + pcrl ProtectableContainerResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pcrl) + if err != nil { + return err + } + page.pcrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectableContainerResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectableContainerResourceListPage) NotDone() bool { + return !page.pcrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList { + return page.pcrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource { + if page.pcrl.IsEmpty() { + return nil + } + return *page.pcrl.Value +} + +// Creates a new instance of the ProtectableContainerResourceListPage type. +func NewProtectableContainerResourceListPage(getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage { + return ProtectableContainerResourceListPage{fn: getNextPage} +} + +// BasicProtectedItem base class for backup items. +type BasicProtectedItem interface { + AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) + AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) + AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) + AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) + AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) + AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) + AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) + AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) + AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) + AsDPMProtectedItem() (*DPMProtectedItem, bool) + AsGenericProtectedItem() (*GenericProtectedItem, bool) + AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) + AsProtectedItem() (*ProtectedItem, bool) +} + +// ProtectedItem base class for backup items. +type ProtectedItem struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectedItemType"] { + case string(ProtectedItemTypeAzureFileShareProtectedItem): + var afpi AzureFileshareProtectedItem + err := json.Unmarshal(body, &afpi) + return afpi, err + case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectedItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectedItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectedItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + case string(ProtectedItemTypeAzureIaaSVMProtectedItem): + var aispi AzureIaaSVMProtectedItem + err := json.Unmarshal(body, &aispi) + return aispi, err + case string(ProtectedItemTypeMicrosoftSqlserversdatabases): + var aspi AzureSQLProtectedItem + err := json.Unmarshal(body, &aspi) + return aspi, err + case string(ProtectedItemTypeAzureVMWorkloadProtectedItem): + var avwpi AzureVMWorkloadProtectedItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): + var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem + err := json.Unmarshal(body, &avwsadpi) + return avwsadpi, err + case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + case string(ProtectedItemTypeDPMProtectedItem): + var dpi DPMProtectedItem + err := json.Unmarshal(body, &dpi) + return dpi, err + case string(ProtectedItemTypeGenericProtectedItem): + var gpi GenericProtectedItem + err := json.Unmarshal(body, &gpi) + return gpi, err + case string(ProtectedItemTypeMabFileFolderProtectedItem): + var mffpi MabFileFolderProtectedItem + err := json.Unmarshal(body, &mffpi) + return mffpi, err + default: + var pi ProtectedItem + err := json.Unmarshal(body, &pi) + return pi, err + } +} +func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + piArray := make([]BasicProtectedItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pi, err := unmarshalBasicProtectedItem(*rawMessage) + if err != nil { + return nil, err + } + piArray[index] = pi + } + return piArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectedItem. +func (pi ProtectedItem) MarshalJSON() ([]byte, error) { + pi.ProtectedItemType = ProtectedItemTypeProtectedItem + objectMap := make(map[string]interface{}) + if pi.BackupManagementType != "" { + objectMap["backupManagementType"] = pi.BackupManagementType + } + if pi.WorkloadType != "" { + objectMap["workloadType"] = pi.WorkloadType + } + if pi.ContainerName != nil { + objectMap["containerName"] = pi.ContainerName + } + if pi.SourceResourceID != nil { + objectMap["sourceResourceId"] = pi.SourceResourceID + } + if pi.PolicyID != nil { + objectMap["policyId"] = pi.PolicyID + } + if pi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint + } + if pi.BackupSetName != nil { + objectMap["backupSetName"] = pi.BackupSetName + } + if pi.CreateMode != "" { + objectMap["createMode"] = pi.CreateMode + } + if pi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC + } + if pi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete + } + if pi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining + } + if pi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming + } + if pi.IsRehydrate != nil { + objectMap["isRehydrate"] = pi.IsRehydrate + } + if pi.ProtectedItemType != "" { + objectMap["protectedItemType"] = pi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return &pi, true +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &pi, true +} + +// ProtectedItemQueryObject filters to list backup items. +type ProtectedItemQueryObject struct { + // HealthState - Health State for the backed up item. Possible values include: 'HealthStatePassed', 'HealthStateActionRequired', 'HealthStateActionSuggested', 'HealthStateInvalid' + HealthState HealthState `json:"healthState,omitempty"` + // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // ItemType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + ItemType DataSourceType `json:"itemType,omitempty"` + // PolicyName - Backup policy name associated with the backup item. + PolicyName *string `json:"policyName,omitempty"` + // ContainerName - Name of the container. + ContainerName *string `json:"containerName,omitempty"` + // BackupEngineName - Backup Engine name + BackupEngineName *string `json:"backupEngineName,omitempty"` + // FriendlyName - Friendly name of protected item + FriendlyName *string `json:"friendlyName,omitempty"` + // FabricName - Name of the fabric. + FabricName *string `json:"fabricName,omitempty"` + // BackupSetName - Name of the backup set. + BackupSetName *string `json:"backupSetName,omitempty"` +} + +// ProtectedItemResource base class for backup items. +type ProtectedItemResource struct { + autorest.Response `json:"-"` + // Properties - ProtectedItemResource properties + Properties BasicProtectedItem `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectedItemResource. +func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pir.Properties + if pir.Location != nil { + objectMap["location"] = pir.Location + } + if pir.Tags != nil { + objectMap["tags"] = pir.Tags + } + if pir.ETag != nil { + objectMap["eTag"] = pir.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectedItemResource struct. +func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectedItem(*v) + if err != nil { + return err + } + pir.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pir.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pir.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pir.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pir.ETag = &eTag + } + } + } + + return nil +} + +// ProtectedItemResourceList list of ProtectedItem resources +type ProtectedItemResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectedItemResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectedItemResourceListIterator provides access to a complete listing of ProtectedItemResource values. +type ProtectedItemResourceListIterator struct { + i int + page ProtectedItemResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectedItemResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectedItemResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource { + if !iter.page.NotDone() { + return ProtectedItemResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectedItemResourceListIterator type. +func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator { + return ProtectedItemResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pirl ProtectedItemResourceList) IsEmpty() bool { + return pirl.Value == nil || len(*pirl.Value) == 0 +} + +// protectedItemResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pirl.NextLink == nil || len(to.String(pirl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pirl.NextLink))) +} + +// ProtectedItemResourceListPage contains a page of ProtectedItemResource values. +type ProtectedItemResourceListPage struct { + fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error) + pirl ProtectedItemResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pirl) + if err != nil { + return err + } + page.pirl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectedItemResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectedItemResourceListPage) NotDone() bool { + return !page.pirl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList { + return page.pirl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource { + if page.pirl.IsEmpty() { + return nil + } + return *page.pirl.Value +} + +// Creates a new instance of the ProtectedItemResourceListPage type. +func NewProtectedItemResourceListPage(getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage { + return ProtectedItemResourceListPage{fn: getNextPage} +} + +// BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived +// from this class. +type BasicProtectionContainer interface { + AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) + AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) + AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) + AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) + AsAzureSQLContainer() (*AzureSQLContainer, bool) + AsAzureStorageContainer() (*AzureStorageContainer, bool) + AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) + AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) + AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) + AsDpmContainer() (*DpmContainer, bool) + AsBasicDpmContainer() (BasicDpmContainer, bool) + AsGenericContainer() (*GenericContainer, bool) + AsIaaSVMContainer() (*IaaSVMContainer, bool) + AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) + AsMabContainer() (*MabContainer, bool) + AsProtectionContainer() (*ProtectionContainer, bool) +} + +// ProtectionContainer base class for container with backup items. Containers with specific workloads are +// derived from this class. +type ProtectionContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeAzureBackupServerContainer1): + var absc AzureBackupServerContainer + err := json.Unmarshal(body, &absc) + return absc, err + case string(ContainerTypeMicrosoftClassicComputevirtualMachines): + var aisccvc AzureIaaSClassicComputeVMContainer + err := json.Unmarshal(body, &aisccvc) + return aisccvc, err + case string(ContainerTypeMicrosoftComputevirtualMachines): + var aiscvc AzureIaaSComputeVMContainer + err := json.Unmarshal(body, &aiscvc) + return aiscvc, err + case string(ContainerTypeSQLAGWorkLoadContainer1): + var aswcpc AzureSQLAGWorkloadContainerProtectionContainer + err := json.Unmarshal(body, &aswcpc) + return aswcpc, err + case string(ContainerTypeAzureSQLContainer1): + var asc AzureSQLContainer + err := json.Unmarshal(body, &asc) + return asc, err + case string(ContainerTypeStorageContainer1): + var asc AzureStorageContainer + err := json.Unmarshal(body, &asc) + return asc, err + case string(ContainerTypeVMAppContainer1): + var avacpc AzureVMAppContainerProtectionContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err + case string(ContainerTypeAzureWorkloadContainer): + var awc AzureWorkloadContainer + err := json.Unmarshal(body, &awc) + return awc, err + case string(ContainerTypeDPMContainer1): + var dc DpmContainer + err := json.Unmarshal(body, &dc) + return dc, err + case string(ContainerTypeGenericContainer1): + var gc GenericContainer + err := json.Unmarshal(body, &gc) + return gc, err + case string(ContainerTypeIaaSVMContainer): + var isc IaaSVMContainer + err := json.Unmarshal(body, &isc) + return isc, err + case string(ContainerTypeWindows1): + var mc MabContainer + err := json.Unmarshal(body, &mc) + return mc, err + default: + var pc ProtectionContainer + err := json.Unmarshal(body, &pc) + return pc, err + } +} +func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pcArray := make([]BasicProtectionContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pc, err := unmarshalBasicProtectionContainer(*rawMessage) + if err != nil { + return nil, err + } + pcArray[index] = pc + } + return pcArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectionContainer. +func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { + pc.ContainerType = ContainerTypeProtectionContainer + objectMap := make(map[string]interface{}) + if pc.FriendlyName != nil { + objectMap["friendlyName"] = pc.FriendlyName + } + if pc.BackupManagementType != "" { + objectMap["backupManagementType"] = pc.BackupManagementType + } + if pc.RegistrationStatus != nil { + objectMap["registrationStatus"] = pc.RegistrationStatus + } + if pc.HealthStatus != nil { + objectMap["healthStatus"] = pc.HealthStatus + } + if pc.ContainerType != "" { + objectMap["containerType"] = pc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return &pc, true +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &pc, true +} + +// ProtectionContainerResource base class for container with backup items. Containers with specific +// workloads are derived from this class. +type ProtectionContainerResource struct { + autorest.Response `json:"-"` + // Properties - ProtectionContainerResource properties + Properties BasicProtectionContainer `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectionContainerResource. +func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pcr.Properties + if pcr.Location != nil { + objectMap["location"] = pcr.Location + } + if pcr.Tags != nil { + objectMap["tags"] = pcr.Tags + } + if pcr.ETag != nil { + objectMap["eTag"] = pcr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct. +func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectionContainer(*v) + if err != nil { + return err + } + pcr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pcr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pcr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pcr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pcr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pcr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pcr.ETag = &eTag + } + } + } + + return nil +} + +// ProtectionContainerResourceList list of ProtectionContainer resources +type ProtectionContainerResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectionContainerResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectionContainerResourceListIterator provides access to a complete listing of +// ProtectionContainerResource values. +type ProtectionContainerResourceListIterator struct { + i int + page ProtectionContainerResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionContainerResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionContainerResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource { + if !iter.page.NotDone() { + return ProtectionContainerResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionContainerResourceListIterator type. +func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator { + return ProtectionContainerResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pcrl ProtectionContainerResourceList) IsEmpty() bool { + return pcrl.Value == nil || len(*pcrl.Value) == 0 +} + +// protectionContainerResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pcrl.NextLink))) +} + +// ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values. +type ProtectionContainerResourceListPage struct { + fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error) + pcrl ProtectionContainerResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pcrl) + if err != nil { + return err + } + page.pcrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionContainerResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionContainerResourceListPage) NotDone() bool { + return !page.pcrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList { + return page.pcrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource { + if page.pcrl.IsEmpty() { + return nil + } + return *page.pcrl.Value +} + +// Creates a new instance of the ProtectionContainerResourceListPage type. +func NewProtectionContainerResourceListPage(getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage { + return ProtectionContainerResourceListPage{fn: getNextPage} +} + +// BasicProtectionIntent base class for backup ProtectionIntent. +type BasicProtectionIntent interface { + AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) + AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) + AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) + AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsProtectionIntent() (*ProtectionIntent, bool) +} + +// ProtectionIntent base class for backup ProtectionIntent. +type ProtectionIntent struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): + var arsvpi AzureRecoveryServiceVaultProtectionIntent + err := json.Unmarshal(body, &arsvpi) + return arsvpi, err + case string(ProtectionIntentItemTypeAzureResourceItem): + var arpi AzureResourceProtectionIntent + err := json.Unmarshal(body, &arpi) + return arpi, err + case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err + default: + var pi ProtectionIntent + err := json.Unmarshal(body, &pi) + return pi, err + } +} +func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + piArray := make([]BasicProtectionIntent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pi, err := unmarshalBasicProtectionIntent(*rawMessage) + if err != nil { + return nil, err + } + piArray[index] = pi + } + return piArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectionIntent. +func (pi ProtectionIntent) MarshalJSON() ([]byte, error) { + pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent + objectMap := make(map[string]interface{}) + if pi.BackupManagementType != "" { + objectMap["backupManagementType"] = pi.BackupManagementType + } + if pi.SourceResourceID != nil { + objectMap["sourceResourceId"] = pi.SourceResourceID + } + if pi.ItemID != nil { + objectMap["itemId"] = pi.ItemID + } + if pi.PolicyID != nil { + objectMap["policyId"] = pi.PolicyID + } + if pi.ProtectionState != "" { + objectMap["protectionState"] = pi.ProtectionState + } + if pi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return &pi, true +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &pi, true +} + +// ProtectionIntentQueryObject filters to list protection intent. +type ProtectionIntentQueryObject struct { + // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // ItemType - Type of workload this item represents. Possible values include: 'IntentItemTypeInvalid', 'IntentItemTypeSQLInstance', 'IntentItemTypeSQLAvailabilityGroupContainer' + ItemType IntentItemType `json:"itemType,omitempty"` + // ParentName - Parent name of the intent + ParentName *string `json:"parentName,omitempty"` + // ItemName - Item name of the intent + ItemName *string `json:"itemName,omitempty"` +} + +// ProtectionIntentResource base class for backup ProtectionIntent. +type ProtectionIntentResource struct { + autorest.Response `json:"-"` + // Properties - ProtectionIntentResource properties + Properties BasicProtectionIntent `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectionIntentResource. +func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pir.Properties + if pir.Location != nil { + objectMap["location"] = pir.Location + } + if pir.Tags != nil { + objectMap["tags"] = pir.Tags + } + if pir.ETag != nil { + objectMap["eTag"] = pir.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionIntentResource struct. +func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectionIntent(*v) + if err != nil { + return err + } + pir.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pir.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pir.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pir.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pir.ETag = &eTag + } + } + } + + return nil +} + +// ProtectionIntentResourceList list of ProtectionIntent resources +type ProtectionIntentResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectionIntentResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectionIntentResourceListIterator provides access to a complete listing of ProtectionIntentResource +// values. +type ProtectionIntentResourceListIterator struct { + i int + page ProtectionIntentResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionIntentResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionIntentResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource { + if !iter.page.NotDone() { + return ProtectionIntentResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionIntentResourceListIterator type. +func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator { + return ProtectionIntentResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pirl ProtectionIntentResourceList) IsEmpty() bool { + return pirl.Value == nil || len(*pirl.Value) == 0 +} + +// protectionIntentResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pirl.NextLink == nil || len(to.String(pirl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pirl.NextLink))) +} + +// ProtectionIntentResourceListPage contains a page of ProtectionIntentResource values. +type ProtectionIntentResourceListPage struct { + fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error) + pirl ProtectionIntentResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pirl) + if err != nil { + return err + } + page.pirl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionIntentResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionIntentResourceListPage) NotDone() bool { + return !page.pirl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList { + return page.pirl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource { + if page.pirl.IsEmpty() { + return nil + } + return *page.pirl.Value +} + +// Creates a new instance of the ProtectionIntentResourceListPage type. +func NewProtectionIntentResourceListPage(getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage { + return ProtectionIntentResourceListPage{fn: getNextPage} +} + +// BasicProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this class. +type BasicProtectionPolicy interface { + AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) + AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) + AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) + AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) + AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) + AsMabProtectionPolicy() (*MabProtectionPolicy, bool) + AsProtectionPolicy() (*ProtectionPolicy, bool) +} + +// ProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this +// class. +type ProtectionPolicy struct { + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["backupManagementType"] { + case string(BackupManagementTypeAzureWorkload): + var avwpp AzureVMWorkloadProtectionPolicy + err := json.Unmarshal(body, &avwpp) + return avwpp, err + case string(BackupManagementTypeAzureStorage): + var afspp AzureFileShareProtectionPolicy + err := json.Unmarshal(body, &afspp) + return afspp, err + case string(BackupManagementTypeAzureIaasVM): + var aispp AzureIaaSVMProtectionPolicy + err := json.Unmarshal(body, &aispp) + return aispp, err + case string(BackupManagementTypeAzureSQL): + var aspp AzureSQLProtectionPolicy + err := json.Unmarshal(body, &aspp) + return aspp, err + case string(BackupManagementTypeGenericProtectionPolicy): + var gpp GenericProtectionPolicy + err := json.Unmarshal(body, &gpp) + return gpp, err + case string(BackupManagementTypeMAB): + var mpp MabProtectionPolicy + err := json.Unmarshal(body, &mpp) + return mpp, err + default: + var pp ProtectionPolicy + err := json.Unmarshal(body, &pp) + return pp, err + } +} +func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ppArray := make([]BasicProtectionPolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pp, err := unmarshalBasicProtectionPolicy(*rawMessage) + if err != nil { + return nil, err + } + ppArray[index] = pp + } + return ppArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectionPolicy. +func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) { + pp.BackupManagementType = BackupManagementTypeProtectionPolicy + objectMap := make(map[string]interface{}) + if pp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = pp.ProtectedItemsCount + } + if pp.BackupManagementType != "" { + objectMap["backupManagementType"] = pp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return &pp, true +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &pp, true +} + +// ProtectionPolicyQueryObject filters the list backup policies API. +type ProtectionPolicyQueryObject struct { + // BackupManagementType - Backup management type for the backup policy. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // FabricName - Fabric name for filter + FabricName *string `json:"fabricName,omitempty"` + // WorkloadType - Workload type for the backup policy. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` +} + +// ProtectionPolicyResource base class for backup policy. Workload-specific backup policies are derived +// from this class. +type ProtectionPolicyResource struct { + autorest.Response `json:"-"` + // Properties - ProtectionPolicyResource properties + Properties BasicProtectionPolicy `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectionPolicyResource. +func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = ppr.Properties + if ppr.Location != nil { + objectMap["location"] = ppr.Location + } + if ppr.Tags != nil { + objectMap["tags"] = ppr.Tags + } + if ppr.ETag != nil { + objectMap["eTag"] = ppr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionPolicyResource struct. +func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectionPolicy(*v) + if err != nil { + return err + } + ppr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ppr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ppr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ppr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ppr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ppr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + ppr.ETag = &eTag + } + } + } + + return nil +} + +// ProtectionPolicyResourceList list of ProtectionPolicy resources +type ProtectionPolicyResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectionPolicyResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectionPolicyResourceListIterator provides access to a complete listing of ProtectionPolicyResource +// values. +type ProtectionPolicyResourceListIterator struct { + i int + page ProtectionPolicyResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionPolicyResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionPolicyResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource { + if !iter.page.NotDone() { + return ProtectionPolicyResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionPolicyResourceListIterator type. +func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator { + return ProtectionPolicyResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pprl ProtectionPolicyResourceList) IsEmpty() bool { + return pprl.Value == nil || len(*pprl.Value) == 0 +} + +// protectionPolicyResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pprl.NextLink == nil || len(to.String(pprl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pprl.NextLink))) +} + +// ProtectionPolicyResourceListPage contains a page of ProtectionPolicyResource values. +type ProtectionPolicyResourceListPage struct { + fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error) + pprl ProtectionPolicyResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pprl) + if err != nil { + return err + } + page.pprl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionPolicyResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionPolicyResourceListPage) NotDone() bool { + return !page.pprl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList { + return page.pprl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource { + if page.pprl.IsEmpty() { + return nil + } + return *page.pprl.Value +} + +// Creates a new instance of the ProtectionPolicyResourceListPage type. +func NewProtectionPolicyResourceListPage(getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage { + return ProtectionPolicyResourceListPage{fn: getNextPage} +} + +// BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. +type BasicRecoveryPoint interface { + AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) + AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) + AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) + AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) + AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) + AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) + AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) + AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) + AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) + AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) + AsRecoveryPoint() (*RecoveryPoint, bool) +} + +// RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. +type RecoveryPoint struct { + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareRecoveryPoint): + var afsrp AzureFileShareRecoveryPoint + err := json.Unmarshal(body, &afsrp) + return afsrp, err + case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): + var awpitrp AzureWorkloadPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awpitrp) + return awpitrp, err + case string(ObjectTypeAzureWorkloadRecoveryPoint): + var awrp AzureWorkloadRecoveryPoint + err := json.Unmarshal(body, &awrp) + return awrp, err + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): + var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awshpitrp) + return awshpitrp, err + case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): + var awshrp AzureWorkloadSAPHanaRecoveryPoint + err := json.Unmarshal(body, &awshrp) + return awshrp, err + case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): + var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awspitrp) + return awspitrp, err + case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): + var awsrp AzureWorkloadSQLRecoveryPoint + err := json.Unmarshal(body, &awsrp) + return awsrp, err + case string(ObjectTypeGenericRecoveryPoint): + var grp GenericRecoveryPoint + err := json.Unmarshal(body, &grp) + return grp, err + case string(ObjectTypeIaasVMRecoveryPoint): + var ivrp IaasVMRecoveryPoint + err := json.Unmarshal(body, &ivrp) + return ivrp, err + default: + var rp RecoveryPoint + err := json.Unmarshal(body, &rp) + return rp, err + } +} +func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpArray := make([]BasicRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rp, err := unmarshalBasicRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + rpArray[index] = rp + } + return rpArray, nil +} + +// MarshalJSON is the custom marshaler for RecoveryPoint. +func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { + rp.ObjectType = ObjectTypeRecoveryPoint + objectMap := make(map[string]interface{}) + if rp.ObjectType != "" { + objectMap["objectType"] = rp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return &rp, true +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &rp, true +} + +// RecoveryPointDiskConfiguration disk configuration +type RecoveryPointDiskConfiguration struct { + // NumberOfDisksIncludedInBackup - Number of disks included in backup + NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"` + // NumberOfDisksAttachedToVM - Number of disks attached to the VM + NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"` + // IncludedDiskList - Information of disks included in backup + IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"` + // ExcludedDiskList - Information of disks excluded from backup + ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"` +} + +// RecoveryPointResource base class for backup copies. Workload-specific backup copies are derived from +// this class. +type RecoveryPointResource struct { + autorest.Response `json:"-"` + // Properties - RecoveryPointResource properties + Properties BasicRecoveryPoint `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPointResource. +func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = rpr.Properties + if rpr.Location != nil { + objectMap["location"] = rpr.Location + } + if rpr.Tags != nil { + objectMap["tags"] = rpr.Tags + } + if rpr.ETag != nil { + objectMap["eTag"] = rpr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPointResource struct. +func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicRecoveryPoint(*v) + if err != nil { + return err + } + rpr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rpr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rpr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rpr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rpr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rpr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + rpr.ETag = &eTag + } + } + } + + return nil +} + +// RecoveryPointResourceList list of RecoveryPoint resources +type RecoveryPointResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]RecoveryPointResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// RecoveryPointResourceListIterator provides access to a complete listing of RecoveryPointResource values. +type RecoveryPointResourceListIterator struct { + i int + page RecoveryPointResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RecoveryPointResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RecoveryPointResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource { + if !iter.page.NotDone() { + return RecoveryPointResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RecoveryPointResourceListIterator type. +func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator { + return RecoveryPointResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rprl RecoveryPointResourceList) IsEmpty() bool { + return rprl.Value == nil || len(*rprl.Value) == 0 +} + +// recoveryPointResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) { + if rprl.NextLink == nil || len(to.String(rprl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rprl.NextLink))) +} + +// RecoveryPointResourceListPage contains a page of RecoveryPointResource values. +type RecoveryPointResourceListPage struct { + fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error) + rprl RecoveryPointResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rprl) + if err != nil { + return err + } + page.rprl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RecoveryPointResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RecoveryPointResourceListPage) NotDone() bool { + return !page.rprl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList { + return page.rprl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource { + if page.rprl.IsEmpty() { + return nil + } + return *page.rprl.Value +} + +// Creates a new instance of the RecoveryPointResourceListPage type. +func NewRecoveryPointResourceListPage(getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage { + return RecoveryPointResourceListPage{fn: getNextPage} +} + +// RecoveryPointTierInformation recovery point tier information. +type RecoveryPointTierInformation struct { + // Type - Recovery point tier type. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP' + Type RecoveryPointTierType `json:"type,omitempty"` + // Status - Recovery point tier status. Possible values include: 'RecoveryPointTierStatusInvalid', 'RecoveryPointTierStatusValid', 'RecoveryPointTierStatusDisabled', 'RecoveryPointTierStatusDeleted' + Status RecoveryPointTierStatus `json:"status,omitempty"` +} + +// BasicRequest base class for backup request. Workload-specific backup requests are derived from this class. +type BasicRequest interface { + AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) + AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) + AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) + AsRequest() (*Request, bool) +} + +// Request base class for backup request. Workload-specific backup requests are derived from this class. +type Request struct { + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicRequest(body []byte) (BasicRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareBackupRequest): + var afsbr AzureFileShareBackupRequest + err := json.Unmarshal(body, &afsbr) + return afsbr, err + case string(ObjectTypeAzureWorkloadBackupRequest): + var awbr AzureWorkloadBackupRequest + err := json.Unmarshal(body, &awbr) + return awbr, err + case string(ObjectTypeIaasVMBackupRequest): + var ivbr IaasVMBackupRequest + err := json.Unmarshal(body, &ivbr) + return ivbr, err + default: + var r Request + err := json.Unmarshal(body, &r) + return r, err + } +} +func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rArray := make([]BasicRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + r, err := unmarshalBasicRequest(*rawMessage) + if err != nil { + return nil, err + } + rArray[index] = r + } + return rArray, nil +} + +// MarshalJSON is the custom marshaler for Request. +func (r Request) MarshalJSON() ([]byte, error) { + r.ObjectType = ObjectTypeBackupRequest + objectMap := make(map[string]interface{}) + if r.ObjectType != "" { + objectMap["objectType"] = r.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return nil, false +} + +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return nil, false +} + +// AsIaasVMBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return nil, false +} + +// AsRequest is the BasicRequest implementation for Request. +func (r Request) AsRequest() (*Request, bool) { + return &r, true +} + +// AsBasicRequest is the BasicRequest implementation for Request. +func (r Request) AsBasicRequest() (BasicRequest, bool) { + return &r, true +} + +// RequestResource base class for backup request. Workload-specific backup requests are derived from this +// class. +type RequestResource struct { + // Properties - BackupRequestResource properties + Properties BasicRequest `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for RequestResource. +func (rr RequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = rr.Properties + if rr.Location != nil { + objectMap["location"] = rr.Location + } + if rr.Tags != nil { + objectMap["tags"] = rr.Tags + } + if rr.ETag != nil { + objectMap["eTag"] = rr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RequestResource struct. +func (rr *RequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicRequest(*v) + if err != nil { + return err + } + rr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + rr.ETag = &eTag + } + } + } + + return nil +} + +// Resource ARM Resource. +type Resource struct { + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + if r.ETag != nil { + objectMap["eTag"] = r.ETag + } + return json.Marshal(objectMap) +} + +// ResourceConfig the resource storage details. +type ResourceConfig struct { + // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageModelType StorageType `json:"storageModelType,omitempty"` + // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageType StorageType `json:"storageType,omitempty"` + // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' + StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` +} + +// ResourceConfigResource the resource storage details. +type ResourceConfigResource struct { + autorest.Response `json:"-"` + // Properties - BackupResourceConfigResource properties + Properties *ResourceConfig `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceConfigResource. +func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rcr.Properties != nil { + objectMap["properties"] = rcr.Properties + } + if rcr.Location != nil { + objectMap["location"] = rcr.Location + } + if rcr.Tags != nil { + objectMap["tags"] = rcr.Tags + } + if rcr.ETag != nil { + objectMap["eTag"] = rcr.ETag + } + return json.Marshal(objectMap) +} + +// ResourceList base for all lists of resources. +type ResourceList struct { + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceVaultConfig backup resource vault config details. +type ResourceVaultConfig struct { + // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageModelType StorageType `json:"storageModelType,omitempty"` + // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageType StorageType `json:"storageType,omitempty"` + // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' + StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` + // EnhancedSecurityState - Enabled or Disabled. Possible values include: 'EnhancedSecurityStateInvalid', 'EnhancedSecurityStateEnabled', 'EnhancedSecurityStateDisabled' + EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` + // SoftDeleteFeatureState - Soft Delete feature state. Possible values include: 'SoftDeleteFeatureStateInvalid', 'SoftDeleteFeatureStateEnabled', 'SoftDeleteFeatureStateDisabled' + SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"` +} + +// ResourceVaultConfigResource backup resource vault config details. +type ResourceVaultConfigResource struct { + autorest.Response `json:"-"` + // Properties - BackupResourceVaultConfigResource properties + Properties *ResourceVaultConfig `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceVaultConfigResource. +func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rvcr.Properties != nil { + objectMap["properties"] = rvcr.Properties + } + if rvcr.Location != nil { + objectMap["location"] = rvcr.Location + } + if rvcr.Tags != nil { + objectMap["tags"] = rvcr.Tags + } + if rvcr.ETag != nil { + objectMap["eTag"] = rvcr.ETag + } + return json.Marshal(objectMap) +} + +// RestoreFileSpecs restore file specs like file path, type and target folder path info. +type RestoreFileSpecs struct { + // Path - Source File/Folder path + Path *string `json:"path,omitempty"` + // FileSpecType - Indicates what the Path variable stands for + FileSpecType *string `json:"fileSpecType,omitempty"` + // TargetFolderPath - Destination folder path in target FileShare + TargetFolderPath *string `json:"targetFolderPath,omitempty"` +} + +// BasicRestoreRequest base class for restore request. Workload-specific restore requests are derived from this class. +type BasicRestoreRequest interface { + AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) + AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) + AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) + AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) + AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) + AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) + AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) + AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) + AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) + AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) + AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) + AsRestoreRequest() (*RestoreRequest, bool) +} + +// RestoreRequest base class for restore request. Workload-specific restore requests are derived from this +// class. +type RestoreRequest struct { + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareRestoreRequest): + var afsrr AzureFileShareRestoreRequest + err := json.Unmarshal(body, &afsrr) + return afsrr, err + case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): + var awpitrr AzureWorkloadPointInTimeRestoreRequest + err := json.Unmarshal(body, &awpitrr) + return awpitrr, err + case string(ObjectTypeAzureWorkloadRestoreRequest): + var awrr AzureWorkloadRestoreRequest + err := json.Unmarshal(body, &awrr) + return awrr, err + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): + var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest + err := json.Unmarshal(body, &awshpitrr) + return awshpitrr, err + case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): + var awshrr AzureWorkloadSAPHanaRestoreRequest + err := json.Unmarshal(body, &awshrr) + return awshrr, err + case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): + var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest + err := json.Unmarshal(body, &awspitrr) + return awspitrr, err + case string(ObjectTypeAzureWorkloadSQLRestoreRequest): + var awsrr AzureWorkloadSQLRestoreRequest + err := json.Unmarshal(body, &awsrr) + return awsrr, err + case string(ObjectTypeIaasVMRestoreRequest): + var ivrr IaasVMRestoreRequest + err := json.Unmarshal(body, &ivrr) + return ivrr, err + default: + var rr RestoreRequest + err := json.Unmarshal(body, &rr) + return rr, err + } +} +func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rrArray := make([]BasicRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rr, err := unmarshalBasicRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + rrArray[index] = rr + } + return rrArray, nil +} + +// MarshalJSON is the custom marshaler for RestoreRequest. +func (rr RestoreRequest) MarshalJSON() ([]byte, error) { + rr.ObjectType = ObjectTypeRestoreRequest + objectMap := make(map[string]interface{}) + if rr.ObjectType != "" { + objectMap["objectType"] = rr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return &rr, true +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &rr, true +} + +// RestoreRequestResource base class for restore request. Workload-specific restore requests are derived +// from this class. +type RestoreRequestResource struct { + // Properties - RestoreRequestResource properties + Properties BasicRestoreRequest `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestoreRequestResource. +func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = rrr.Properties + if rrr.Location != nil { + objectMap["location"] = rrr.Location + } + if rrr.Tags != nil { + objectMap["tags"] = rrr.Tags + } + if rrr.ETag != nil { + objectMap["eTag"] = rrr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RestoreRequestResource struct. +func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicRestoreRequest(*v) + if err != nil { + return err + } + rrr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rrr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rrr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rrr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rrr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rrr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + rrr.ETag = &eTag + } + } + } + + return nil +} + +// RetentionDuration retention duration. +type RetentionDuration struct { + // Count - Count of duration types. Retention duration is obtained by the counting the duration type Count times. + // For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + Count *int32 `json:"count,omitempty"` + // DurationType - Retention duration type of retention policy. Possible values include: 'RetentionDurationTypeInvalid', 'RetentionDurationTypeDays', 'RetentionDurationTypeWeeks', 'RetentionDurationTypeMonths', 'RetentionDurationTypeYears' + DurationType RetentionDurationType `json:"durationType,omitempty"` +} + +// BasicRetentionPolicy base class for retention policy. +type BasicRetentionPolicy interface { + AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) + AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) + AsRetentionPolicy() (*RetentionPolicy, bool) +} + +// RetentionPolicy base class for retention policy. +type RetentionPolicy struct { + // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' + RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` +} + +func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["retentionPolicyType"] { + case string(RetentionPolicyTypeLongTermRetentionPolicy): + var ltrp LongTermRetentionPolicy + err := json.Unmarshal(body, <rp) + return ltrp, err + case string(RetentionPolicyTypeSimpleRetentionPolicy): + var srp SimpleRetentionPolicy + err := json.Unmarshal(body, &srp) + return srp, err + default: + var rp RetentionPolicy + err := json.Unmarshal(body, &rp) + return rp, err + } +} +func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpArray := make([]BasicRetentionPolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rp, err := unmarshalBasicRetentionPolicy(*rawMessage) + if err != nil { + return nil, err + } + rpArray[index] = rp + } + return rpArray, nil +} + +// MarshalJSON is the custom marshaler for RetentionPolicy. +func (rp RetentionPolicy) MarshalJSON() ([]byte, error) { + rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy + objectMap := make(map[string]interface{}) + if rp.RetentionPolicyType != "" { + objectMap["retentionPolicyType"] = rp.RetentionPolicyType + } + return json.Marshal(objectMap) +} + +// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. +func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { + return nil, false +} + +// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. +func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { + return nil, false +} + +// AsRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. +func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { + return &rp, true +} + +// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. +func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { + return &rp, true +} + +// BasicSchedulePolicy base class for backup schedule. +type BasicSchedulePolicy interface { + AsLogSchedulePolicy() (*LogSchedulePolicy, bool) + AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) + AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) + AsSchedulePolicy() (*SchedulePolicy, bool) +} + +// SchedulePolicy base class for backup schedule. +type SchedulePolicy struct { + // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["schedulePolicyType"] { + case string(SchedulePolicyTypeLogSchedulePolicy): + var lsp LogSchedulePolicy + err := json.Unmarshal(body, &lsp) + return lsp, err + case string(SchedulePolicyTypeLongTermSchedulePolicy): + var ltsp LongTermSchedulePolicy + err := json.Unmarshal(body, <sp) + return ltsp, err + case string(SchedulePolicyTypeSimpleSchedulePolicy): + var ssp SimpleSchedulePolicy + err := json.Unmarshal(body, &ssp) + return ssp, err + default: + var sp SchedulePolicy + err := json.Unmarshal(body, &sp) + return sp, err + } +} +func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + spArray := make([]BasicSchedulePolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sp, err := unmarshalBasicSchedulePolicy(*rawMessage) + if err != nil { + return nil, err + } + spArray[index] = sp + } + return spArray, nil +} + +// MarshalJSON is the custom marshaler for SchedulePolicy. +func (sp SchedulePolicy) MarshalJSON() ([]byte, error) { + sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy + objectMap := make(map[string]interface{}) + if sp.SchedulePolicyType != "" { + objectMap["schedulePolicyType"] = sp.SchedulePolicyType + } + return json.Marshal(objectMap) +} + +// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { + return nil, false +} + +// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return nil, false +} + +// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return nil, false +} + +// AsSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { + return &sp, true +} + +// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { + return &sp, true +} + +// Settings common settings field for backup management +type Settings struct { + // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string `json:"timeZone,omitempty"` + // Issqlcompression - SQL compression flag + Issqlcompression *bool `json:"issqlcompression,omitempty"` + // IsCompression - Workload compression flag. This has been added so that 'isSqlCompression' + // will be deprecated once clients upgrade to consider this flag. + IsCompression *bool `json:"isCompression,omitempty"` +} + +// SimpleRetentionPolicy simple policy retention. +type SimpleRetentionPolicy struct { + // RetentionDuration - Retention duration of the protection policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` + // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' + RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { + srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy + objectMap := make(map[string]interface{}) + if srp.RetentionDuration != nil { + objectMap["retentionDuration"] = srp.RetentionDuration + } + if srp.RetentionPolicyType != "" { + objectMap["retentionPolicyType"] = srp.RetentionPolicyType + } + return json.Marshal(objectMap) +} + +// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { + return nil, false +} + +// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { + return &srp, true +} + +// AsRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { + return nil, false +} + +// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { + return &srp, true +} + +// SimpleSchedulePolicy simple policy schedule. +type SimpleSchedulePolicy struct { + // ScheduleRunFrequency - Frequency of the schedule operation of this policy. Possible values include: 'ScheduleRunTypeInvalid', 'ScheduleRunTypeDaily', 'ScheduleRunTypeWeekly' + ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"` + // ScheduleRunDays - List of days of week this schedule has to be run. + ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"` + // ScheduleRunTimes - List of times of day this schedule has to be run. + ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"` + // ScheduleWeeklyFrequency - At every number weeks this schedule has to be run. + ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` + // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { + ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy + objectMap := make(map[string]interface{}) + if ssp.ScheduleRunFrequency != "" { + objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency + } + if ssp.ScheduleRunDays != nil { + objectMap["scheduleRunDays"] = ssp.ScheduleRunDays + } + if ssp.ScheduleRunTimes != nil { + objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes + } + if ssp.ScheduleWeeklyFrequency != nil { + objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency + } + if ssp.SchedulePolicyType != "" { + objectMap["schedulePolicyType"] = ssp.SchedulePolicyType + } + return json.Marshal(objectMap) +} + +// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { + return nil, false +} + +// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return nil, false +} + +// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return &ssp, true +} + +// AsSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { + return nil, false +} + +// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { + return &ssp, true +} + +// SQLDataDirectory sQLDataDirectory info +type SQLDataDirectory struct { + // Type - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' + Type SQLDataDirectoryType `json:"type,omitempty"` + // Path - File path + Path *string `json:"path,omitempty"` + // LogicalName - Logical name of the file + LogicalName *string `json:"logicalName,omitempty"` +} + +// SQLDataDirectoryMapping encapsulates information regarding data directory +type SQLDataDirectoryMapping struct { + // MappingType - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' + MappingType SQLDataDirectoryType `json:"mappingType,omitempty"` + // SourceLogicalName - Restore source logical name path + SourceLogicalName *string `json:"sourceLogicalName,omitempty"` + // SourcePath - Restore source path + SourcePath *string `json:"sourcePath,omitempty"` + // TargetPath - Target path + TargetPath *string `json:"targetPath,omitempty"` +} + +// StatusRequest backupStatus request. +type StatusRequest struct { + // ResourceType - Container Type - VM, SQLPaaS, DPM, AzureFileShare. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + ResourceType DataSourceType `json:"resourceType,omitempty"` + // ResourceID - Entire ARM resource id of the resource + ResourceID *string `json:"resourceId,omitempty"` + // PoLogicalName - Protectable Item Logical Name + PoLogicalName *string `json:"poLogicalName,omitempty"` +} + +// StatusResponse backupStatus response. +type StatusResponse struct { + autorest.Response `json:"-"` + // ProtectionStatus - Specifies whether the container is registered or not. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` + // VaultID - Specifies the arm resource id of the vault + VaultID *string `json:"vaultId,omitempty"` + // FabricName - Specifies the fabric name - Azure or AD. Possible values include: 'FabricNameInvalid', 'FabricNameAzure' + FabricName FabricName `json:"fabricName,omitempty"` + // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. + ContainerName *string `json:"containerName,omitempty"` + // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. + ProtectedItemName *string `json:"protectedItemName,omitempty"` + // ErrorCode - ErrorCode in case of intent failed + ErrorCode *string `json:"errorCode,omitempty"` + // ErrorMessage - ErrorMessage in case of intent failed. + ErrorMessage *string `json:"errorMessage,omitempty"` + // PolicyName - Specifies the policy name which is used for protection + PolicyName *string `json:"policyName,omitempty"` + // RegistrationStatus - Container registration status + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +// SubProtectionPolicy sub-protection policy which includes schedule and retention +type SubProtectionPolicy struct { + // PolicyType - Type of backup policy type. Possible values include: 'PolicyTypeInvalid', 'PolicyTypeFull', 'PolicyTypeDifferential', 'PolicyTypeLog', 'PolicyTypeCopyOnlyFull' + PolicyType PolicyType `json:"policyType,omitempty"` + // SchedulePolicy - Backup schedule specified as part of backup policy. + SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` + // RetentionPolicy - Retention policy with the details on backup copy retention ranges. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SubProtectionPolicy struct. +func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "policyType": + if v != nil { + var policyType PolicyType + err = json.Unmarshal(*v, &policyType) + if err != nil { + return err + } + spp.PolicyType = policyType + } + case "schedulePolicy": + if v != nil { + schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) + if err != nil { + return err + } + spp.SchedulePolicy = schedulePolicy + } + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + spp.RetentionPolicy = retentionPolicy + } + } + } + + return nil +} + +// TargetAFSRestoreInfo target Azure File Share Info. +type TargetAFSRestoreInfo struct { + // Name - File share name + Name *string `json:"name,omitempty"` + // TargetResourceID - Target file share resource ARM ID + TargetResourceID *string `json:"targetResourceId,omitempty"` +} + +// TargetRestoreInfo details about target workload during restore operation. +type TargetRestoreInfo struct { + // OverwriteOption - Can Overwrite if Target DataBase already exists. Possible values include: 'OverwriteOptionsInvalid', 'OverwriteOptionsFailOnConflict', 'OverwriteOptionsOverwrite' + OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"` + // ContainerID - Resource Id name of the container in which Target DataBase resides + ContainerID *string `json:"containerId,omitempty"` + // DatabaseName - Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + DatabaseName *string `json:"databaseName,omitempty"` + // TargetDirectoryForFileRestore - Target directory location for restore as files. + TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"` +} + +// TokenInformation the token information details. +type TokenInformation struct { + autorest.Response `json:"-"` + // Token - Token value. + Token *string `json:"token,omitempty"` + // ExpiryTimeInUtcTicks - Expiry time of token. + ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"` + // SecurityPIN - Security PIN + SecurityPIN *string `json:"securityPIN,omitempty"` +} + +// ValidateIaasVMRestoreOperationRequest azureRestoreValidation request. +type ValidateIaasVMRestoreOperationRequest struct { + // RestoreRequest - Sets restore request to be validated + RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' + ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { + vivror.ObjectType = ObjectTypeValidateIaasVMRestoreOperationRequest + objectMap := make(map[string]interface{}) + objectMap["restoreRequest"] = vivror.RestoreRequest + if vivror.ObjectType != "" { + objectMap["objectType"] = vivror.ObjectType + } + return json.Marshal(objectMap) +} + +// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { + return &vivror, true +} + +// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { + return nil, false +} + +// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { + return &vivror, true +} + +// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { + return nil, false +} + +// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { + return &vivror, true +} + +// UnmarshalJSON is the custom unmarshaler for ValidateIaasVMRestoreOperationRequest struct. +func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "restoreRequest": + if v != nil { + restoreRequest, err := unmarshalBasicRestoreRequest(*v) + if err != nil { + return err + } + vivror.RestoreRequest = restoreRequest + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicValidateOperationRequest + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + vivror.ObjectType = objectType + } + } + } + + return nil +} + +// BasicValidateOperationRequest base class for validate operation request. +type BasicValidateOperationRequest interface { + AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) + AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) + AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) + AsValidateOperationRequest() (*ValidateOperationRequest, bool) +} + +// ValidateOperationRequest base class for validate operation request. +type ValidateOperationRequest struct { + // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' + ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeValidateIaasVMRestoreOperationRequest): + var vivror ValidateIaasVMRestoreOperationRequest + err := json.Unmarshal(body, &vivror) + return vivror, err + case string(ObjectTypeValidateRestoreOperationRequest): + var vror ValidateRestoreOperationRequest + err := json.Unmarshal(body, &vror) + return vror, err + default: + var vor ValidateOperationRequest + err := json.Unmarshal(body, &vor) + return vor, err + } +} +func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + vorArray := make([]BasicValidateOperationRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + vor, err := unmarshalBasicValidateOperationRequest(*rawMessage) + if err != nil { + return nil, err + } + vorArray[index] = vor + } + return vorArray, nil +} + +// MarshalJSON is the custom marshaler for ValidateOperationRequest. +func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) { + vor.ObjectType = ObjectTypeValidateOperationRequest + objectMap := make(map[string]interface{}) + if vor.ObjectType != "" { + objectMap["objectType"] = vor.ObjectType + } + return json.Marshal(objectMap) +} + +// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { + return nil, false +} + +// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { + return nil, false +} + +// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { + return nil, false +} + +// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { + return &vor, true +} + +// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { + return &vor, true +} + +// ValidateOperationResponse base class for validate operation response. +type ValidateOperationResponse struct { + // ValidationResults - Gets the validation result + ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"` +} + +// ValidateOperationsResponse ... +type ValidateOperationsResponse struct { + autorest.Response `json:"-"` + ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"` +} + +// BasicValidateRestoreOperationRequest azureRestoreValidation request. +type BasicValidateRestoreOperationRequest interface { + AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) + AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) +} + +// ValidateRestoreOperationRequest azureRestoreValidation request. +type ValidateRestoreOperationRequest struct { + // RestoreRequest - Sets restore request to be validated + RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' + ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeValidateIaasVMRestoreOperationRequest): + var vivror ValidateIaasVMRestoreOperationRequest + err := json.Unmarshal(body, &vivror) + return vivror, err + default: + var vror ValidateRestoreOperationRequest + err := json.Unmarshal(body, &vror) + return vror, err + } +} +func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage) + if err != nil { + return nil, err + } + vrorArray[index] = vror + } + return vrorArray, nil +} + +// MarshalJSON is the custom marshaler for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { + vror.ObjectType = ObjectTypeValidateRestoreOperationRequest + objectMap := make(map[string]interface{}) + objectMap["restoreRequest"] = vror.RestoreRequest + if vror.ObjectType != "" { + objectMap["objectType"] = vror.ObjectType + } + return json.Marshal(objectMap) +} + +// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { + return nil, false +} + +// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { + return &vror, true +} + +// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { + return &vror, true +} + +// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { + return nil, false +} + +// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { + return &vror, true +} + +// UnmarshalJSON is the custom unmarshaler for ValidateRestoreOperationRequest struct. +func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "restoreRequest": + if v != nil { + restoreRequest, err := unmarshalBasicRestoreRequest(*v) + if err != nil { + return err + } + vror.RestoreRequest = restoreRequest + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicValidateOperationRequest + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + vror.ObjectType = objectType + } + } + } + + return nil +} + +// WeeklyRetentionFormat weekly retention format. +type WeeklyRetentionFormat struct { + // DaysOfTheWeek - List of days of the week. + DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` + // WeeksOfTheMonth - List of weeks of month. + WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"` +} + +// WeeklyRetentionSchedule weekly retention schedule. +type WeeklyRetentionSchedule struct { + // DaysOfTheWeek - List of days of week for weekly retention policy. + DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` + // RetentionTimes - Retention times of retention policy. + RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` + // RetentionDuration - Retention duration of retention Policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} + +// WorkloadInquiryDetails details of an inquired protectable item. +type WorkloadInquiryDetails struct { + // Type - Type of the Workload such as SQL, Oracle etc. + Type *string `json:"type,omitempty"` + // ItemCount - Contains the protectable item Count inside this Container. + ItemCount *int64 `json:"itemCount,omitempty"` + // InquiryValidation - Inquiry validation such as permissions and other backup validations. + InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"` +} + +// BasicWorkloadItem base class for backup item. Workload-specific backup items are derived from this class. +type BasicWorkloadItem interface { + AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) + AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) + AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) + AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) + AsWorkloadItem() (*WorkloadItem, bool) +} + +// WorkloadItem base class for backup item. Workload-specific backup items are derived from this class. +type WorkloadItem struct { + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["workloadItemType"] { + case string(WorkloadItemTypeAzureVMWorkloadItem): + var avwi AzureVMWorkloadItem + err := json.Unmarshal(body, &avwi) + return avwi, err + case string(WorkloadItemTypeSAPAseDatabase1): + var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsadwi) + return avwsadwi, err + case string(WorkloadItemTypeSAPAseSystem1): + var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem + err := json.Unmarshal(body, &avwsaswi) + return avwsaswi, err + case string(WorkloadItemTypeSAPHanaDatabase1): + var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem + err := json.Unmarshal(body, &avwshdwi) + return avwshdwi, err + case string(WorkloadItemTypeSAPHanaSystem1): + var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem + err := json.Unmarshal(body, &avwshswi) + return avwshswi, err + case string(WorkloadItemTypeSQLDataBase1): + var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsdwi) + return avwsdwi, err + case string(WorkloadItemTypeSQLInstance1): + var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem + err := json.Unmarshal(body, &avwsiwi) + return avwsiwi, err + default: + var wi WorkloadItem + err := json.Unmarshal(body, &wi) + return wi, err + } +} +func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + wiArray := make([]BasicWorkloadItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + wi, err := unmarshalBasicWorkloadItem(*rawMessage) + if err != nil { + return nil, err + } + wiArray[index] = wi + } + return wiArray, nil +} + +// MarshalJSON is the custom marshaler for WorkloadItem. +func (wi WorkloadItem) MarshalJSON() ([]byte, error) { + wi.WorkloadItemType = WorkloadItemTypeWorkloadItem + objectMap := make(map[string]interface{}) + if wi.BackupManagementType != nil { + objectMap["backupManagementType"] = wi.BackupManagementType + } + if wi.WorkloadType != nil { + objectMap["workloadType"] = wi.WorkloadType + } + if wi.FriendlyName != nil { + objectMap["friendlyName"] = wi.FriendlyName + } + if wi.ProtectionState != "" { + objectMap["protectionState"] = wi.ProtectionState + } + if wi.WorkloadItemType != "" { + objectMap["workloadItemType"] = wi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return &wi, true +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &wi, true +} + +// WorkloadItemResource base class for backup item. Workload-specific backup items are derived from this +// class. +type WorkloadItemResource struct { + // Properties - WorkloadItemResource properties + Properties BasicWorkloadItem `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkloadItemResource. +func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = wir.Properties + if wir.Location != nil { + objectMap["location"] = wir.Location + } + if wir.Tags != nil { + objectMap["tags"] = wir.Tags + } + if wir.ETag != nil { + objectMap["eTag"] = wir.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkloadItemResource struct. +func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicWorkloadItem(*v) + if err != nil { + return err + } + wir.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wir.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + wir.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wir.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + wir.ETag = &eTag + } + } + } + + return nil +} + +// WorkloadItemResourceList list of WorkloadItem resources +type WorkloadItemResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]WorkloadItemResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkloadItemResourceListIterator provides access to a complete listing of WorkloadItemResource values. +type WorkloadItemResourceListIterator struct { + i int + page WorkloadItemResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkloadItemResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkloadItemResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource { + if !iter.page.NotDone() { + return WorkloadItemResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkloadItemResourceListIterator type. +func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator { + return WorkloadItemResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wirl WorkloadItemResourceList) IsEmpty() bool { + return wirl.Value == nil || len(*wirl.Value) == 0 +} + +// workloadItemResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) { + if wirl.NextLink == nil || len(to.String(wirl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wirl.NextLink))) +} + +// WorkloadItemResourceListPage contains a page of WorkloadItemResource values. +type WorkloadItemResourceListPage struct { + fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error) + wirl WorkloadItemResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wirl) + if err != nil { + return err + } + page.wirl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkloadItemResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkloadItemResourceListPage) NotDone() bool { + return !page.wirl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList { + return page.wirl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource { + if page.wirl.IsEmpty() { + return nil + } + return *page.wirl.Value +} + +// Creates a new instance of the WorkloadItemResourceListPage type. +func NewWorkloadItemResourceListPage(getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage { + return WorkloadItemResourceListPage{fn: getNextPage} +} + +// BasicWorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this class. +type BasicWorkloadProtectableItem interface { + AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) + AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) + AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) + AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) + AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) + AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) + AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) + AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) + AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) + AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) + AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) + AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) +} + +// WorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this +// class. +type WorkloadProtectableItem struct { + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableItemType"] { + case string(ProtectableItemTypeAzureFileShare): + var afspi AzureFileShareProtectableItem + err := json.Unmarshal(body, &afspi) + return afspi, err + case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectableItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectableItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectableItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + case string(ProtectableItemTypeAzureVMWorkloadProtectableItem): + var avwpi AzureVMWorkloadProtectableItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + case string(ProtectableItemTypeSAPAseSystem): + var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem + err := json.Unmarshal(body, &avwsaspi) + return avwsaspi, err + case string(ProtectableItemTypeSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectableItemTypeSAPHanaSystem): + var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem + err := json.Unmarshal(body, &avwshspi) + return avwshspi, err + case string(ProtectableItemTypeSQLAvailabilityGroupContainer): + var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem + err := json.Unmarshal(body, &avwsagpi) + return avwsagpi, err + case string(ProtectableItemTypeSQLDataBase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + case string(ProtectableItemTypeSQLInstance): + var avwsipi AzureVMWorkloadSQLInstanceProtectableItem + err := json.Unmarshal(body, &avwsipi) + return avwsipi, err + case string(ProtectableItemTypeIaaSVMProtectableItem): + var ispi IaaSVMProtectableItem + err := json.Unmarshal(body, &ispi) + return ispi, err + default: + var wpi WorkloadProtectableItem + err := json.Unmarshal(body, &wpi) + return wpi, err + } +} +func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage) + if err != nil { + return nil, err + } + wpiArray[index] = wpi + } + return wpiArray, nil +} + +// MarshalJSON is the custom marshaler for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) { + wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem + objectMap := make(map[string]interface{}) + if wpi.BackupManagementType != nil { + objectMap["backupManagementType"] = wpi.BackupManagementType + } + if wpi.WorkloadType != nil { + objectMap["workloadType"] = wpi.WorkloadType + } + if wpi.FriendlyName != nil { + objectMap["friendlyName"] = wpi.FriendlyName + } + if wpi.ProtectionState != "" { + objectMap["protectionState"] = wpi.ProtectionState + } + if wpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = wpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return &wpi, true +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &wpi, true +} + +// WorkloadProtectableItemResource base class for backup item. Workload-specific backup items are derived +// from this class. +type WorkloadProtectableItemResource struct { + // Properties - WorkloadProtectableItemResource properties + Properties BasicWorkloadProtectableItem `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkloadProtectableItemResource. +func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = wpir.Properties + if wpir.Location != nil { + objectMap["location"] = wpir.Location + } + if wpir.Tags != nil { + objectMap["tags"] = wpir.Tags + } + if wpir.ETag != nil { + objectMap["eTag"] = wpir.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkloadProtectableItemResource struct. +func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicWorkloadProtectableItem(*v) + if err != nil { + return err + } + wpir.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wpir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wpir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wpir.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + wpir.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wpir.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + wpir.ETag = &eTag + } + } + } + + return nil +} + +// WorkloadProtectableItemResourceList list of WorkloadProtectableItem resources +type WorkloadProtectableItemResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]WorkloadProtectableItemResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkloadProtectableItemResourceListIterator provides access to a complete listing of +// WorkloadProtectableItemResource values. +type WorkloadProtectableItemResourceListIterator struct { + i int + page WorkloadProtectableItemResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkloadProtectableItemResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource { + if !iter.page.NotDone() { + return WorkloadProtectableItemResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkloadProtectableItemResourceListIterator type. +func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator { + return WorkloadProtectableItemResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool { + return wpirl.Value == nil || len(*wpirl.Value) == 0 +} + +// workloadProtectableItemResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) { + if wpirl.NextLink == nil || len(to.String(wpirl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wpirl.NextLink))) +} + +// WorkloadProtectableItemResourceListPage contains a page of WorkloadProtectableItemResource values. +type WorkloadProtectableItemResourceListPage struct { + fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error) + wpirl WorkloadProtectableItemResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wpirl) + if err != nil { + return err + } + page.wpirl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkloadProtectableItemResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkloadProtectableItemResourceListPage) NotDone() bool { + return !page.wpirl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList { + return page.wpirl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource { + if page.wpirl.IsEmpty() { + return nil + } + return *page.wpirl.Value +} + +// Creates a new instance of the WorkloadProtectableItemResourceListPage type. +func NewWorkloadProtectableItemResourceListPage(getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage { + return WorkloadProtectableItemResourceListPage{fn: getNextPage} +} + +// YearlyRetentionSchedule yearly retention schedule. +type YearlyRetentionSchedule struct { + // RetentionScheduleFormatType - Retention schedule format for yearly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' + RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` + // MonthsOfYear - List of months of year of yearly retention policy. + MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"` + // RetentionScheduleDaily - Daily retention format for yearly retention policy. + RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` + // RetentionScheduleWeekly - Weekly retention format for yearly retention policy. + RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` + // RetentionTimes - Retention times of retention policy. + RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` + // RetentionDuration - Retention duration of retention Policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/operation.go b/services/recoveryservices/mgmt/2019-06-15/backup/operation.go new file mode 100644 index 000000000000..9daf7d7dc1b4 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/operation.go @@ -0,0 +1,122 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type OperationClient struct { + BaseClient +} + +// NewOperationClient creates an instance of the OperationClient client. +func NewOperationClient(subscriptionID string) OperationClient { + return NewOperationClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationClientWithBaseURI(baseURI string, subscriptionID string) OperationClient { + return OperationClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Validate validate operation for specified backed up item. This is a synchronous operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// parameters - resource validate operation request +func (client OperationClient) Validate(ctx context.Context, vaultName string, resourceGroupName string, parameters BasicValidateOperationRequest) (result ValidateOperationsResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationClient.Validate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ValidatePreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationClient", "Validate", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.OperationClient", "Validate", resp, "Failure sending request") + return + } + + result, err = client.ValidateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationClient", "Validate", resp, "Failure responding to request") + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client OperationClient) ValidatePreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters BasicValidateOperationRequest) (*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 = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client OperationClient) ValidateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client OperationClient) ValidateResponder(resp *http.Response) (result ValidateOperationsResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/operationresults.go b/services/recoveryservices/mgmt/2019-06-15/backup/operationresults.go new file mode 100644 index 000000000000..4b9e75433bb0 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/operationresults.go @@ -0,0 +1,125 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type OperationResultsClient struct { + BaseClient +} + +// NewOperationResultsClient creates an instance of the OperationResultsClient client. +func NewOperationResultsClient(subscriptionID string) OperationResultsClient { + return NewOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) OperationResultsClient { + return OperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get provides the status of the delete operations such as deleting backed up item. Once the operation has started, +// the +// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On +// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is +// part of the Location header of the operation response. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// operationID - operationID which represents the operation. +func (client OperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.OperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client OperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client OperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client OperationResultsClient) GetResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/operations.go b/services/recoveryservices/mgmt/2019-06-15/backup/operations.go new file mode 100644 index 000000000000..188a37bf8c15 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/operations.go @@ -0,0 +1,148 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client 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 returns the list of available operations. +func (client OperationsClient) List(ctx context.Context) (result ClientDiscoveryResponsePage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.cdr.Response.Response != nil { + sc = result.cdr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.cdr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.cdr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2016-08-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.RecoveryServices/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result ClientDiscoveryResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults ClientDiscoveryResponse) (result ClientDiscoveryResponse, err error) { + req, err := lastResults.clientDiscoveryResponsePreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.OperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OperationsClient) ListComplete(ctx context.Context) (result ClientDiscoveryResponseIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/operationstatuses.go b/services/recoveryservices/mgmt/2019-06-15/backup/operationstatuses.go new file mode 100644 index 000000000000..c8c1b383eb8e --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/operationstatuses.go @@ -0,0 +1,125 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type OperationStatusesClient struct { + BaseClient +} + +// NewOperationStatusesClient creates an instance of the OperationStatusesClient client. +func NewOperationStatusesClient(subscriptionID string) OperationStatusesClient { + return NewOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusesClient { + return OperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches the status of an operation such as triggering a backup, restore. The status can be in progress, +// completed +// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations +// create jobs. This method returns the list of jobs when the operation is complete. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// operationID - operationID which represents the operation. +func (client OperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result OperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationStatusesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationStatusesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.OperationStatusesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationStatusesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client OperationStatusesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client OperationStatusesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client OperationStatusesClient) GetResponder(resp *http.Response) (result OperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/policies.go b/services/recoveryservices/mgmt/2019-06-15/backup/policies.go new file mode 100644 index 000000000000..9b61c58c8539 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/policies.go @@ -0,0 +1,162 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PoliciesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type PoliciesClient struct { + BaseClient +} + +// NewPoliciesClient creates an instance of the PoliciesClient client. +func NewPoliciesClient(subscriptionID string) PoliciesClient { + return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient { + return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch +// scoped results. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +func (client PoliciesClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result ProtectionPolicyResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.List") + defer func() { + sc := -1 + if result.pprl.Response.Response != nil { + sc = result.pprl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.PoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pprl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.PoliciesClient", "List", resp, "Failure sending request") + return + } + + result.pprl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.PoliciesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PoliciesClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/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 PoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PoliciesClient) ListResponder(resp *http.Response) (result ProtectionPolicyResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client PoliciesClient) listNextResults(ctx context.Context, lastResults ProtectionPolicyResourceList) (result ProtectionPolicyResourceList, err error) { + req, err := lastResults.protectionPolicyResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.PoliciesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.PoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.PoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PoliciesClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result ProtectionPolicyResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectablecontainers.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectablecontainers.go new file mode 100644 index 000000000000..6340a1c1fd61 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectablecontainers.go @@ -0,0 +1,163 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectableContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectableContainersClient struct { + BaseClient +} + +// NewProtectableContainersClient creates an instance of the ProtectableContainersClient client. +func NewProtectableContainersClient(subscriptionID string) ProtectableContainersClient { + return NewProtectableContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectableContainersClientWithBaseURI creates an instance of the ProtectableContainersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewProtectableContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectableContainersClient { + return ProtectableContainersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists the containers that can be registered to Recovery Services Vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +func (client ProtectableContainersClient) List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result ProtectableContainerResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainersClient.List") + defer func() { + sc := -1 + if result.pcrl.Response.Response != nil { + sc = result.pcrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, fabricName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pcrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "List", resp, "Failure sending request") + return + } + + result.pcrl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectableContainersClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectableContainersClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectableContainersClient) ListResponder(resp *http.Response) (result ProtectableContainerResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectableContainersClient) listNextResults(ctx context.Context, lastResults ProtectableContainerResourceList) (result ProtectableContainerResourceList, err error) { + req, err := lastResults.protectableContainerResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectableContainersClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result ProtectableContainerResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, fabricName, filter) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectableitems.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectableitems.go new file mode 100644 index 000000000000..137522a855fb --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectableitems.go @@ -0,0 +1,167 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectableItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectableItemsClient struct { + BaseClient +} + +// NewProtectableItemsClient creates an instance of the ProtectableItemsClient client. +func NewProtectableItemsClient(subscriptionID string) ProtectableItemsClient { + return NewProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectableItemsClient { + return ProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List provides a pageable list of protectable objects within your subscription according to the query filter and the +// pagination parameters. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client ProtectableItemsClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result WorkloadProtectableItemResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemsClient.List") + defer func() { + sc := -1 + if result.wpirl.Response.Response != nil { + sc = result.wpirl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wpirl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "List", resp, "Failure sending request") + return + } + + result.wpirl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectableItemsClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectableItemsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectableItemsClient) ListResponder(resp *http.Response) (result WorkloadProtectableItemResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectableItemsClient) listNextResults(ctx context.Context, lastResults WorkloadProtectableItemResourceList) (result WorkloadProtectableItemResourceList, err error) { + req, err := lastResults.workloadProtectableItemResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectableItemsClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result WorkloadProtectableItemResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter, skipToken) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemoperationresults.go b/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemoperationresults.go new file mode 100644 index 000000000000..cd8435b50ff7 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemoperationresults.go @@ -0,0 +1,128 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectedItemOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectedItemOperationResultsClient struct { + BaseClient +} + +// NewProtectedItemOperationResultsClient creates an instance of the ProtectedItemOperationResultsClient client. +func NewProtectedItemOperationResultsClient(subscriptionID string) ProtectedItemOperationResultsClient { + return NewProtectedItemOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectedItemOperationResultsClientWithBaseURI creates an instance of the ProtectedItemOperationResultsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewProtectedItemOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationResultsClient { + return ProtectedItemOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches the result of any operation on the backup item. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backup item. +// containerName - container name associated with the backup item. +// protectedItemName - backup item name whose details are to be fetched. +// operationID - operationID which represents the operation whose result needs to be fetched. +func (client ProtectedItemOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result ProtectedItemResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemOperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectedItemOperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "operationId": autorest.Encode("path", operationID), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/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 ProtectedItemOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectedItemOperationResultsClient) GetResponder(resp *http.Response) (result ProtectedItemResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemoperationstatuses.go b/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemoperationstatuses.go new file mode 100644 index 000000000000..2c488d23be42 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemoperationstatuses.go @@ -0,0 +1,131 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectedItemOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectedItemOperationStatusesClient struct { + BaseClient +} + +// NewProtectedItemOperationStatusesClient creates an instance of the ProtectedItemOperationStatusesClient client. +func NewProtectedItemOperationStatusesClient(subscriptionID string) ProtectedItemOperationStatusesClient { + return NewProtectedItemOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of the ProtectedItemOperationStatusesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewProtectedItemOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationStatusesClient { + return ProtectedItemOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches the status of an operation such as triggering a backup, restore. The status can be in progress, +// completed +// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations +// create jobs. This method returns the list of jobs associated with the operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backup item. +// containerName - container name associated with the backup item. +// protectedItemName - backup item name whose details are to be fetched. +// operationID - operationID represents the operation whose status needs to be fetched. +func (client ProtectedItemOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result OperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemOperationStatusesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationStatusesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationStatusesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationStatusesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectedItemOperationStatusesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "operationId": autorest.Encode("path", operationID), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectedItemOperationStatusesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectedItemOperationStatusesClient) GetResponder(resp *http.Response) (result OperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protecteditems.go b/services/recoveryservices/mgmt/2019-06-15/backup/protecteditems.go new file mode 100644 index 000000000000..8acbf47b0016 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protecteditems.go @@ -0,0 +1,303 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectedItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectedItemsClient struct { + BaseClient +} + +// NewProtectedItemsClient creates an instance of the ProtectedItemsClient client. +func NewProtectedItemsClient(subscriptionID string) ProtectedItemsClient { + return NewProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectedItemsClientWithBaseURI creates an instance of the ProtectedItemsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemsClient { + return ProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate enables backup of an item or to modifies the backup policy information of an already backed up item. +// This is an +// asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backup item. +// containerName - container name associated with the backup item. +// protectedItemName - item name to be backed up. +// parameters - resource backed up item +func (client ProtectedItemsClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource) (result ProtectedItemResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ProtectedItemsClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", 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 ProtectedItemsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ProtectedItemsClient) CreateOrUpdateResponder(resp *http.Response) (result ProtectedItemResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete used to disable backup of an item within a container. This is an asynchronous operation. To know the status +// of the +// request, call the GetItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up item. +// containerName - container name associated with the backed up item. +// protectedItemName - backed up item to be deleted. +func (client ProtectedItemsClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ProtectedItemsClient) DeletePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", 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 ProtectedItemsClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ProtectedItemsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get provides the details of the backed up item. This is an asynchronous operation. To know the status of the +// operation, +// call the GetItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up item. +// containerName - container name associated with the backed up item. +// protectedItemName - backed up item name whose details are to be fetched. +// filter - oData filter options. +func (client ProtectedItemsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result ProtectedItemResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectedItemsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectedItemsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectedItemsClient) GetResponder(resp *http.Response) (result ProtectedItemResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemsgroup.go b/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemsgroup.go new file mode 100644 index 000000000000..9bb26c9a3131 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protecteditemsgroup.go @@ -0,0 +1,166 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectedItemsGroupClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectedItemsGroupClient struct { + BaseClient +} + +// NewProtectedItemsGroupClient creates an instance of the ProtectedItemsGroupClient client. +func NewProtectedItemsGroupClient(subscriptionID string) ProtectedItemsGroupClient { + return NewProtectedItemsGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectedItemsGroupClientWithBaseURI creates an instance of the ProtectedItemsGroupClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewProtectedItemsGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemsGroupClient { + return ProtectedItemsGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List provides a pageable list of all items that are backed up within a vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client ProtectedItemsGroupClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result ProtectedItemResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemsGroupClient.List") + defer func() { + sc := -1 + if result.pirl.Response.Response != nil { + sc = result.pirl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsGroupClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pirl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsGroupClient", "List", resp, "Failure sending request") + return + } + + result.pirl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsGroupClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectedItemsGroupClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems", 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 ProtectedItemsGroupClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectedItemsGroupClient) ListResponder(resp *http.Response) (result ProtectedItemResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectedItemsGroupClient) listNextResults(ctx context.Context, lastResults ProtectedItemResourceList) (result ProtectedItemResourceList, err error) { + req, err := lastResults.protectedItemResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectedItemsGroupClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectedItemsGroupClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemsGroupClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectedItemsGroupClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result ProtectedItemResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemsGroupClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter, skipToken) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontaineroperationresults.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontaineroperationresults.go new file mode 100644 index 000000000000..6e8533cf1194 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontaineroperationresults.go @@ -0,0 +1,127 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionContainerOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionContainerOperationResultsClient struct { + BaseClient +} + +// NewProtectionContainerOperationResultsClient creates an instance of the ProtectionContainerOperationResultsClient +// client. +func NewProtectionContainerOperationResultsClient(subscriptionID string) ProtectionContainerOperationResultsClient { + return NewProtectionContainerOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionContainerOperationResultsClientWithBaseURI creates an instance of the +// ProtectionContainerOperationResultsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewProtectionContainerOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerOperationResultsClient { + return ProtectionContainerOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches the result of any operation on the container. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the container. +// containerName - container name whose information should be fetched. +// operationID - operation ID which represents the operation whose result needs to be fetched. +func (client ProtectionContainerOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string) (result ProtectionContainerResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerOperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerOperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionContainerOperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainerOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionContainerOperationResultsClient) GetResponder(resp *http.Response) (result ProtectionContainerResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainerrefreshoperationresults.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainerrefreshoperationresults.go new file mode 100644 index 000000000000..5fde7c63f5c0 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainerrefreshoperationresults.go @@ -0,0 +1,124 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionContainerRefreshOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionContainerRefreshOperationResultsClient struct { + BaseClient +} + +// NewProtectionContainerRefreshOperationResultsClient creates an instance of the +// ProtectionContainerRefreshOperationResultsClient client. +func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string) ProtectionContainerRefreshOperationResultsClient { + return NewProtectionContainerRefreshOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an instance of the +// ProtectionContainerRefreshOperationResultsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewProtectionContainerRefreshOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerRefreshOperationResultsClient { + return ProtectionContainerRefreshOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get provides the result of the refresh operation triggered by the BeginRefresh operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the container. +// operationID - operation ID associated with the operation whose result needs to be fetched. +func (client ProtectionContainerRefreshOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerRefreshOperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerRefreshOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerRefreshOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerRefreshOperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionContainerRefreshOperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainerRefreshOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionContainerRefreshOperationResultsClient) GetResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainers.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainers.go new file mode 100644 index 000000000000..7c40fe0d2cc9 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainers.go @@ -0,0 +1,460 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionContainersClient struct { + BaseClient +} + +// NewProtectionContainersClient creates an instance of the ProtectionContainersClient client. +func NewProtectionContainersClient(subscriptionID string) ProtectionContainersClient { + return NewProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersClient { + return ProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets details of the specific container registered to your Recovery Services Vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - name of the fabric where the container belongs. +// containerName - name of the container whose details need to be fetched. +func (client ProtectionContainersClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (result ProtectionContainerResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionContainersClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) GetResponder(resp *http.Response) (result ProtectionContainerResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Inquire this is an async operation and the results should be tracked using location header or Azure-async-url. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric Name associated with the container. +// containerName - name of the container in which inquiry needs to be triggered. +// filter - oData filter options. +func (client ProtectionContainersClient) Inquire(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Inquire") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.InquirePreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Inquire", nil, "Failure preparing request") + return + } + + resp, err := client.InquireSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Inquire", resp, "Failure sending request") + return + } + + result, err = client.InquireResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Inquire", resp, "Failure responding to request") + } + + return +} + +// InquirePreparer prepares the Inquire request. +func (client ProtectionContainersClient) InquirePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InquireSender sends the Inquire request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) InquireSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// InquireResponder handles the response to the Inquire request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) InquireResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Refresh discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is +// an +// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated the container. +// filter - oData filter options. +func (client ProtectionContainersClient) Refresh(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Refresh") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RefreshPreparer(ctx, vaultName, resourceGroupName, fabricName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Refresh", nil, "Failure preparing request") + return + } + + resp, err := client.RefreshSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Refresh", resp, "Failure sending request") + return + } + + result, err = client.RefreshResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Refresh", resp, "Failure responding to request") + } + + return +} + +// RefreshPreparer prepares the Refresh request. +func (client ProtectionContainersClient) RefreshPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RefreshSender sends the Refresh request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) RefreshSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// RefreshResponder handles the response to the Refresh request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) RefreshResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Register registers the container with Recovery Services vault. +// This is an asynchronous operation. To track the operation status, use location header to call get latest status of +// the operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the container. +// containerName - name of the container to be registered. +// parameters - request body for operation +func (client ProtectionContainersClient) Register(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource) (result ProtectionContainerResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Register") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RegisterPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Register", nil, "Failure preparing request") + return + } + + resp, err := client.RegisterSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Register", resp, "Failure sending request") + return + } + + result, err = client.RegisterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Register", resp, "Failure responding to request") + } + + return +} + +// RegisterPreparer prepares the Register request. +func (client ProtectionContainersClient) RegisterPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegisterSender sends the Register request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) RegisterSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// RegisterResponder handles the response to the Register request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) RegisterResponder(resp *http.Response) (result ProtectionContainerResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Unregister unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To +// determine +// whether the backend service has finished processing the request, call Get Container Operation Result API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - name of the fabric where the container belongs. +// containerName - name of the container which needs to be unregistered from the Recovery Services Vault. +func (client ProtectionContainersClient) Unregister(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Unregister") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UnregisterPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Unregister", nil, "Failure preparing request") + return + } + + resp, err := client.UnregisterSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Unregister", resp, "Failure sending request") + return + } + + result, err = client.UnregisterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Unregister", resp, "Failure responding to request") + } + + return +} + +// UnregisterPreparer prepares the Unregister request. +func (client ProtectionContainersClient) UnregisterPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnregisterSender sends the Unregister request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) UnregisterSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UnregisterResponder handles the response to the Unregister request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) UnregisterResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainersgroup.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainersgroup.go new file mode 100644 index 000000000000..7d6de9dcfcea --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectioncontainersgroup.go @@ -0,0 +1,162 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionContainersGroupClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionContainersGroupClient struct { + BaseClient +} + +// NewProtectionContainersGroupClient creates an instance of the ProtectionContainersGroupClient client. +func NewProtectionContainersGroupClient(subscriptionID string) ProtectionContainersGroupClient { + return NewProtectionContainersGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionContainersGroupClientWithBaseURI creates an instance of the ProtectionContainersGroupClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewProtectionContainersGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersGroupClient { + return ProtectionContainersGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists the containers registered to Recovery Services Vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +func (client ProtectionContainersGroupClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result ProtectionContainerResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersGroupClient.List") + defer func() { + sc := -1 + if result.pcrl.Response.Response != nil { + sc = result.pcrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pcrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "List", resp, "Failure sending request") + return + } + + result.pcrl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectionContainersGroupClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersGroupClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectionContainersGroupClient) ListResponder(resp *http.Response) (result ProtectionContainerResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectionContainersGroupClient) listNextResults(ctx context.Context, lastResults ProtectionContainerResourceList) (result ProtectionContainerResourceList, err error) { + req, err := lastResults.protectionContainerResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectionContainersGroupClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result ProtectionContainerResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersGroupClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectionintent.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectionintent.go new file mode 100644 index 000000000000..13ebf02ea8fc --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectionintent.go @@ -0,0 +1,368 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionIntentClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionIntentClient struct { + BaseClient +} + +// NewProtectionIntentClient creates an instance of the ProtectionIntentClient client. +func NewProtectionIntentClient(subscriptionID string) ProtectionIntentClient { + return NewProtectionIntentClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionIntentClientWithBaseURI creates an instance of the ProtectionIntentClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewProtectionIntentClientWithBaseURI(baseURI string, subscriptionID string) ProtectionIntentClient { + return ProtectionIntentClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create Intent for Enabling backup of an item. This is a synchronous operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backup item. +// intentObjectName - intent object name. +// parameters - resource backed up item +func (client ProtectionIntentClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource) (result ProtectionIntentResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ProtectionIntentClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "intentObjectName": autorest.Encode("path", intentObjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ProtectionIntentClient) CreateOrUpdateResponder(resp *http.Response) (result ProtectionIntentResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete used to remove intent from an item +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the intent. +// intentObjectName - intent to be deleted. +func (client ProtectionIntentClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, vaultName, resourceGroupName, fabricName, intentObjectName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ProtectionIntentClient) DeletePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "intentObjectName": autorest.Encode("path", intentObjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ProtectionIntentClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get provides the details of the protection intent up item. This is an asynchronous operation. To know the status of +// the operation, +// call the GetItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up item. +// intentObjectName - backed up item name whose details are to be fetched. +func (client ProtectionIntentClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (result ProtectionIntentResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, intentObjectName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionIntentClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "intentObjectName": autorest.Encode("path", intentObjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionIntentClient) GetResponder(resp *http.Response) (result ProtectionIntentResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Validate sends the validate request. +// Parameters: +// azureRegion - azure region to hit Api +// parameters - enable backup validation request on Virtual Machine +func (client ProtectionIntentClient) Validate(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest) (result PreValidateEnableBackupResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentClient.Validate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ValidatePreparer(ctx, azureRegion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Validate", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Validate", resp, "Failure sending request") + return + } + + result, err = client.ValidateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Validate", resp, "Failure responding to request") + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client ProtectionIntentClient) ValidatePreparer(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureRegion": autorest.Encode("path", azureRegion), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentClient) ValidateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client ProtectionIntentClient) ValidateResponder(resp *http.Response) (result PreValidateEnableBackupResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectionintentgroup.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectionintentgroup.go new file mode 100644 index 000000000000..8dd9d8768722 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectionintentgroup.go @@ -0,0 +1,166 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionIntentGroupClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionIntentGroupClient struct { + BaseClient +} + +// NewProtectionIntentGroupClient creates an instance of the ProtectionIntentGroupClient client. +func NewProtectionIntentGroupClient(subscriptionID string) ProtectionIntentGroupClient { + return NewProtectionIntentGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionIntentGroupClientWithBaseURI creates an instance of the ProtectionIntentGroupClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewProtectionIntentGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionIntentGroupClient { + return ProtectionIntentGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List provides a pageable list of all intents that are present within a vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client ProtectionIntentGroupClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result ProtectionIntentResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentGroupClient.List") + defer func() { + sc := -1 + if result.pirl.Response.Response != nil { + sc = result.pirl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pirl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "List", resp, "Failure sending request") + return + } + + result.pirl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectionIntentGroupClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentGroupClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectionIntentGroupClient) ListResponder(resp *http.Response) (result ProtectionIntentResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectionIntentGroupClient) listNextResults(ctx context.Context, lastResults ProtectionIntentResourceList) (result ProtectionIntentResourceList, err error) { + req, err := lastResults.protectionIntentResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectionIntentGroupClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result ProtectionIntentResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentGroupClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter, skipToken) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicies.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicies.go new file mode 100644 index 000000000000..31c4d9ccb054 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicies.go @@ -0,0 +1,287 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionPoliciesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionPoliciesClient struct { + BaseClient +} + +// NewProtectionPoliciesClient creates an instance of the ProtectionPoliciesClient client. +func NewProtectionPoliciesClient(subscriptionID string) ProtectionPoliciesClient { + return NewProtectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPoliciesClient { + return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can +// be fetched +// using GetPolicyOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy to be created. +// parameters - resource backup policy +func (client ProtectionPoliciesClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource) (result ProtectionPolicyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, vaultName, resourceGroupName, policyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ProtectionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ProtectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ProtectionPolicyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status +// of the +// operation can be fetched using GetPolicyOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy to be deleted. +func (client ProtectionPoliciesClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPoliciesClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, vaultName, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ProtectionPoliciesClient) DeletePreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ProtectionPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous +// operation. Status of the operation can be fetched using GetPolicyOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy information to be fetched. +func (client ProtectionPoliciesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result ProtectionPolicyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPoliciesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionPoliciesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionPoliciesClient) GetResponder(resp *http.Response) (result ProtectionPolicyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicyoperationresults.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicyoperationresults.go new file mode 100644 index 000000000000..19d4ab579281 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicyoperationresults.go @@ -0,0 +1,124 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionPolicyOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionPolicyOperationResultsClient struct { + BaseClient +} + +// NewProtectionPolicyOperationResultsClient creates an instance of the ProtectionPolicyOperationResultsClient client. +func NewProtectionPolicyOperationResultsClient(subscriptionID string) ProtectionPolicyOperationResultsClient { + return NewProtectionPolicyOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionPolicyOperationResultsClientWithBaseURI creates an instance of the +// ProtectionPolicyOperationResultsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewProtectionPolicyOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationResultsClient { + return ProtectionPolicyOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get provides the result of an operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy name whose operation's result needs to be fetched. +// operationID - operation ID which represents the operation whose result needs to be fetched. +func (client ProtectionPolicyOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result ProtectionPolicyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyOperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, policyName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionPolicyOperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationId": autorest.Encode("path", operationID), + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/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 ProtectionPolicyOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionPolicyOperationResultsClient) GetResponder(resp *http.Response) (result ProtectionPolicyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicyoperationstatuses.go b/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicyoperationstatuses.go new file mode 100644 index 000000000000..e22d4d8ed8be --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/protectionpolicyoperationstatuses.go @@ -0,0 +1,128 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionPolicyOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionPolicyOperationStatusesClient struct { + BaseClient +} + +// NewProtectionPolicyOperationStatusesClient creates an instance of the ProtectionPolicyOperationStatusesClient +// client. +func NewProtectionPolicyOperationStatusesClient(subscriptionID string) ProtectionPolicyOperationStatusesClient { + return NewProtectionPolicyOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the +// ProtectionPolicyOperationStatusesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient { + return ProtectionPolicyOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get provides the status of the asynchronous operations like backup, restore. The status can be in progress, +// completed +// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations +// create jobs. This method returns the list of jobs associated with operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy name whose operation's status needs to be fetched. +// operationID - operation ID which represents an operation whose status needs to be fetched. +func (client ProtectionPolicyOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result OperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyOperationStatusesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, policyName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationStatusesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationStatusesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationStatusesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionPolicyOperationStatusesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationId": autorest.Encode("path", operationID), + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionPolicyOperationStatusesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionPolicyOperationStatusesClient) GetResponder(resp *http.Response) (result OperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/recoverypoints.go b/services/recoveryservices/mgmt/2019-06-15/backup/recoverypoints.go new file mode 100644 index 000000000000..19d27076d75a --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/recoverypoints.go @@ -0,0 +1,254 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RecoveryPointsClient is the open API 2.0 Specs for Azure RecoveryServices Backup 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 provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous +// operation. +// To know the status of the operation, call the GetProtectedItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with backed up item. +// containerName - container name associated with backed up item. +// protectedItemName - backed up item name whose backup data needs to be fetched. +// recoveryPointID - recoveryPointID represents the backed up data to be fetched. +func (client RecoveryPointsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result RecoveryPointResource, 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, fabricName, containerName, protectedItemName, recoveryPointID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.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, "backup.RecoveryPointsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.RecoveryPointsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client RecoveryPointsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "recoveryPointId": autorest.Encode("path", recoveryPointID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RecoveryPointsClient) GetResponder(resp *http.Response) (result RecoveryPointResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the backup copies for the backed up item. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up item. +// containerName - container name associated with the backed up item. +// protectedItemName - backed up item whose backup copies are to be fetched. +// filter - oData filter options. +func (client RecoveryPointsClient) List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result RecoveryPointResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointsClient.List") + defer func() { + sc := -1 + if result.rprl.Response.Response != nil { + sc = result.rprl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.RecoveryPointsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rprl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.RecoveryPointsClient", "List", resp, "Failure sending request") + return + } + + result.rprl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.RecoveryPointsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client RecoveryPointsClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RecoveryPointsClient) ListResponder(resp *http.Response) (result RecoveryPointResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client RecoveryPointsClient) listNextResults(ctx context.Context, lastResults RecoveryPointResourceList) (result RecoveryPointResourceList, err error) { + req, err := lastResults.recoveryPointResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.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, "backup.RecoveryPointsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.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, fabricName string, containerName string, protectedItemName string, filter string) (result RecoveryPointResourceListIterator, 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, fabricName, containerName, protectedItemName, filter) + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/resourcestorageconfigs.go b/services/recoveryservices/mgmt/2019-06-15/backup/resourcestorageconfigs.go new file mode 100644 index 000000000000..cdbfd329774b --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/resourcestorageconfigs.go @@ -0,0 +1,279 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ResourceStorageConfigsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ResourceStorageConfigsClient struct { + BaseClient +} + +// NewResourceStorageConfigsClient creates an instance of the ResourceStorageConfigsClient client. +func NewResourceStorageConfigsClient(subscriptionID string) ResourceStorageConfigsClient { + return NewResourceStorageConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceStorageConfigsClientWithBaseURI creates an instance of the ResourceStorageConfigsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewResourceStorageConfigsClientWithBaseURI(baseURI string, subscriptionID string) ResourceStorageConfigsClient { + return ResourceStorageConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches resource storage config. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +func (client ResourceStorageConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string) (result ResourceConfigResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceStorageConfigsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ResourceStorageConfigsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceStorageConfigsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ResourceStorageConfigsClient) GetResponder(resp *http.Response) (result ResourceConfigResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Patch updates vault storage model type. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// parameters - vault storage config request +func (client ResourceStorageConfigsClient) Patch(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceConfigResource) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceStorageConfigsClient.Patch") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PatchPreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Patch", nil, "Failure preparing request") + return + } + + resp, err := client.PatchSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Patch", resp, "Failure sending request") + return + } + + result, err = client.PatchResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Patch", resp, "Failure responding to request") + } + + return +} + +// PatchPreparer prepares the Patch request. +func (client ResourceStorageConfigsClient) PatchPreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceConfigResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PatchSender sends the Patch request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceStorageConfigsClient) PatchSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// PatchResponder handles the response to the Patch request. The method always +// closes the http.Response Body. +func (client ResourceStorageConfigsClient) PatchResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates vault storage model type. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// parameters - vault storage config request +func (client ResourceStorageConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceConfigResource) (result ResourceConfigResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceStorageConfigsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ResourceStorageConfigsClient) UpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceConfigResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceStorageConfigsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ResourceStorageConfigsClient) UpdateResponder(resp *http.Response) (result ResourceConfigResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/resourcevaultconfigs.go b/services/recoveryservices/mgmt/2019-06-15/backup/resourcevaultconfigs.go new file mode 100644 index 000000000000..836314b063bd --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/resourcevaultconfigs.go @@ -0,0 +1,200 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ResourceVaultConfigsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ResourceVaultConfigsClient struct { + BaseClient +} + +// NewResourceVaultConfigsClient creates an instance of the ResourceVaultConfigsClient client. +func NewResourceVaultConfigsClient(subscriptionID string) ResourceVaultConfigsClient { + return NewResourceVaultConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceVaultConfigsClientWithBaseURI creates an instance of the ResourceVaultConfigsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewResourceVaultConfigsClientWithBaseURI(baseURI string, subscriptionID string) ResourceVaultConfigsClient { + return ResourceVaultConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches resource vault config. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +func (client ResourceVaultConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string) (result ResourceVaultConfigResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceVaultConfigsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceVaultConfigsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ResourceVaultConfigsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceVaultConfigsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ResourceVaultConfigsClient) 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 = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceVaultConfigsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ResourceVaultConfigsClient) GetResponder(resp *http.Response) (result ResourceVaultConfigResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates vault security config. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// parameters - resource config request +func (client ResourceVaultConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceVaultConfigResource) (result ResourceVaultConfigResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceVaultConfigsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceVaultConfigsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ResourceVaultConfigsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceVaultConfigsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ResourceVaultConfigsClient) UpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceVaultConfigResource) (*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 = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", 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 ResourceVaultConfigsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ResourceVaultConfigsClient) UpdateResponder(resp *http.Response) (result ResourceVaultConfigResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/restores.go b/services/recoveryservices/mgmt/2019-06-15/backup/restores.go new file mode 100644 index 000000000000..d0288a3a2239 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/restores.go @@ -0,0 +1,131 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RestoresClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type RestoresClient struct { + BaseClient +} + +// NewRestoresClient creates an instance of the RestoresClient client. +func NewRestoresClient(subscriptionID string) RestoresClient { + return NewRestoresClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRestoresClientWithBaseURI creates an instance of the RestoresClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewRestoresClientWithBaseURI(baseURI string, subscriptionID string) RestoresClient { + return RestoresClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Trigger restores the specified backed up data. This is an asynchronous operation. To know the status of this API +// call, use +// GetProtectedItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up items. +// containerName - container name associated with the backed up items. +// protectedItemName - backed up item to be restored. +// recoveryPointID - recovery point ID which represents the backed up data to be restored. +// parameters - resource restore request +func (client RestoresClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RestoresClient.Trigger") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.TriggerPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.RestoresClient", "Trigger", nil, "Failure preparing request") + return + } + + resp, err := client.TriggerSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.RestoresClient", "Trigger", resp, "Failure sending request") + return + } + + result, err = client.TriggerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.RestoresClient", "Trigger", resp, "Failure responding to request") + } + + return +} + +// TriggerPreparer prepares the Trigger request. +func (client RestoresClient) TriggerPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "recoveryPointId": autorest.Encode("path", recoveryPointID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-06-15" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TriggerSender sends the Trigger request. The method will close the +// http.Response Body if it receives an error. +func (client RestoresClient) TriggerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// TriggerResponder handles the response to the Trigger request. The method always +// closes the http.Response Body. +func (client RestoresClient) TriggerResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/securitypins.go b/services/recoveryservices/mgmt/2019-06-15/backup/securitypins.go new file mode 100644 index 000000000000..c34b255d99fd --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/securitypins.go @@ -0,0 +1,119 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SecurityPINsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type SecurityPINsClient struct { + BaseClient +} + +// NewSecurityPINsClient creates an instance of the SecurityPINsClient client. +func NewSecurityPINsClient(subscriptionID string) SecurityPINsClient { + return NewSecurityPINsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSecurityPINsClientWithBaseURI(baseURI string, subscriptionID string) SecurityPINsClient { + return SecurityPINsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get the security PIN. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +func (client SecurityPINsClient) Get(ctx context.Context, vaultName string, resourceGroupName string) (result TokenInformation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPINsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.SecurityPINsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.SecurityPINsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.SecurityPINsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SecurityPINsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SecurityPINsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SecurityPINsClient) GetResponder(resp *http.Response) (result TokenInformation, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/status.go b/services/recoveryservices/mgmt/2019-06-15/backup/status.go new file mode 100644 index 000000000000..c0cf0a6839a1 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/status.go @@ -0,0 +1,120 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// StatusClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type StatusClient struct { + BaseClient +} + +// NewStatusClient creates an instance of the StatusClient client. +func NewStatusClient(subscriptionID string) StatusClient { + return NewStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewStatusClientWithBaseURI creates an instance of the StatusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewStatusClientWithBaseURI(baseURI string, subscriptionID string) StatusClient { + return StatusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get sends the get request. +// Parameters: +// azureRegion - azure region to hit Api +// parameters - container Backup Status Request +func (client StatusClient) Get(ctx context.Context, azureRegion string, parameters StatusRequest) (result StatusResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StatusClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, azureRegion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.StatusClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.StatusClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.StatusClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client StatusClient) GetPreparer(ctx context.Context, azureRegion string, parameters StatusRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureRegion": autorest.Encode("path", azureRegion), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client StatusClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client StatusClient) GetResponder(resp *http.Response) (result StatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/usagesummaries.go b/services/recoveryservices/mgmt/2019-06-15/backup/usagesummaries.go new file mode 100644 index 000000000000..6f8638ddb749 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/usagesummaries.go @@ -0,0 +1,127 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// UsageSummariesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type UsageSummariesClient struct { + BaseClient +} + +// NewUsageSummariesClient creates an instance of the UsageSummariesClient client. +func NewUsageSummariesClient(subscriptionID string) UsageSummariesClient { + return NewUsageSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewUsageSummariesClientWithBaseURI creates an instance of the UsageSummariesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewUsageSummariesClientWithBaseURI(baseURI string, subscriptionID string) UsageSummariesClient { + return UsageSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List fetches the backup management usage summaries of the vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client UsageSummariesClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result ManagementUsageList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsageSummariesClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.UsageSummariesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.UsageSummariesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.UsageSummariesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client UsageSummariesClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client UsageSummariesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client UsageSummariesClient) ListResponder(resp *http.Response) (result ManagementUsageList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/version.go b/services/recoveryservices/mgmt/2019-06-15/backup/version.go new file mode 100644 index 000000000000..897aa6932c88 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/version.go @@ -0,0 +1,30 @@ +package backup + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " backup/2019-06-15" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/recoveryservices/mgmt/2019-06-15/backup/workloaditems.go b/services/recoveryservices/mgmt/2019-06-15/backup/workloaditems.go new file mode 100644 index 000000000000..b5585cf4ea5f --- /dev/null +++ b/services/recoveryservices/mgmt/2019-06-15/backup/workloaditems.go @@ -0,0 +1,171 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// WorkloadItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type WorkloadItemsClient struct { + BaseClient +} + +// NewWorkloadItemsClient creates an instance of the WorkloadItemsClient client. +func NewWorkloadItemsClient(subscriptionID string) WorkloadItemsClient { + return NewWorkloadItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkloadItemsClientWithBaseURI creates an instance of the WorkloadItemsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWorkloadItemsClientWithBaseURI(baseURI string, subscriptionID string) WorkloadItemsClient { + return WorkloadItemsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List provides a pageable list of workload item of a specific container according to the query filter and the +// pagination +// parameters. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the container. +// containerName - name of the container. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client WorkloadItemsClient) List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result WorkloadItemResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemsClient.List") + defer func() { + sc := -1 + if result.wirl.Response.Response != nil { + sc = result.wirl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wirl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "List", resp, "Failure sending request") + return + } + + result.wirl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkloadItemsClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadItemsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkloadItemsClient) ListResponder(resp *http.Response) (result WorkloadItemResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkloadItemsClient) listNextResults(ctx context.Context, lastResults WorkloadItemResourceList) (result WorkloadItemResourceList, err error) { + req, err := lastResults.workloadItemResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkloadItemsClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result WorkloadItemResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, fabricName, containerName, filter, skipToken) + return +} diff --git a/services/redis/mgmt/2015-08-01/redis/client.go b/services/redis/mgmt/2015-08-01/redis/client.go index ef785db9407a..f54b8724a10f 100644 --- a/services/redis/mgmt/2015-08-01/redis/client.go +++ b/services/redis/mgmt/2015-08-01/redis/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/redis/mgmt/2015-08-01/redis/redis.go b/services/redis/mgmt/2015-08-01/redis/redis.go index bc2930a91578..400ba9414cb4 100644 --- a/services/redis/mgmt/2015-08-01/redis/redis.go +++ b/services/redis/mgmt/2015-08-01/redis/redis.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/redis/mgmt/2015-08-01/redis/redisapi/interfaces.go b/services/redis/mgmt/2015-08-01/redis/redisapi/interfaces.go index 180ab32211d8..658450efe401 100644 --- a/services/redis/mgmt/2015-08-01/redis/redisapi/interfaces.go +++ b/services/redis/mgmt/2015-08-01/redis/redisapi/interfaces.go @@ -30,7 +30,9 @@ type ClientAPI interface { ForceReboot(ctx context.Context, resourceGroupName string, name string, parameters redis.RebootParameters) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, name string) (result redis.ResourceType, err error) List(ctx context.Context) (result redis.ListResultPage, err error) + ListComplete(ctx context.Context) (result redis.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result redis.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result redis.ListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, name string) (result redis.ListKeysResult, err error) RegenerateKey(ctx context.Context, resourceGroupName string, name string, parameters redis.RegenerateKeyParameters) (result redis.ListKeysResult, err error) } diff --git a/services/redis/mgmt/2016-04-01/redis/client.go b/services/redis/mgmt/2016-04-01/redis/client.go index 4f4d02fb0d09..ae4b6033b7c5 100644 --- a/services/redis/mgmt/2016-04-01/redis/client.go +++ b/services/redis/mgmt/2016-04-01/redis/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/redis/mgmt/2016-04-01/redis/firewallrule.go b/services/redis/mgmt/2016-04-01/redis/firewallrule.go index c544be48556f..6c26c094a713 100644 --- a/services/redis/mgmt/2016-04-01/redis/firewallrule.go +++ b/services/redis/mgmt/2016-04-01/redis/firewallrule.go @@ -36,7 +36,8 @@ func NewFirewallRuleClient(subscriptionID string) FirewallRuleClient { return NewFirewallRuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRuleClientWithBaseURI creates an instance of the FirewallRuleClient client. +// NewFirewallRuleClientWithBaseURI creates an instance of the FirewallRuleClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRuleClientWithBaseURI(baseURI string, subscriptionID string) FirewallRuleClient { return FirewallRuleClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2016-04-01/redis/firewallrules.go b/services/redis/mgmt/2016-04-01/redis/firewallrules.go index 3fc317817935..428185110290 100644 --- a/services/redis/mgmt/2016-04-01/redis/firewallrules.go +++ b/services/redis/mgmt/2016-04-01/redis/firewallrules.go @@ -35,7 +35,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2016-04-01/redis/operations.go b/services/redis/mgmt/2016-04-01/redis/operations.go index 6701c741debb..0f01eb7119d9 100644 --- a/services/redis/mgmt/2016-04-01/redis/operations.go +++ b/services/redis/mgmt/2016-04-01/redis/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/redis/mgmt/2016-04-01/redis/patchschedules.go b/services/redis/mgmt/2016-04-01/redis/patchschedules.go index 73c03172513d..17a4fcafd616 100644 --- a/services/redis/mgmt/2016-04-01/redis/patchschedules.go +++ b/services/redis/mgmt/2016-04-01/redis/patchschedules.go @@ -36,7 +36,8 @@ func NewPatchSchedulesClient(subscriptionID string) PatchSchedulesClient { return NewPatchSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client. +// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPatchSchedulesClientWithBaseURI(baseURI string, subscriptionID string) PatchSchedulesClient { return PatchSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2016-04-01/redis/redis.go b/services/redis/mgmt/2016-04-01/redis/redis.go index 8694bcf95012..9a45475ba9e0 100644 --- a/services/redis/mgmt/2016-04-01/redis/redis.go +++ b/services/redis/mgmt/2016-04-01/redis/redis.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/redis/mgmt/2016-04-01/redis/redisapi/interfaces.go b/services/redis/mgmt/2016-04-01/redis/redisapi/interfaces.go index 3c181fceeb88..7c2cc8b5366f 100644 --- a/services/redis/mgmt/2016-04-01/redis/redisapi/interfaces.go +++ b/services/redis/mgmt/2016-04-01/redis/redisapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result redis.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result redis.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*redis.OperationsClient)(nil) @@ -39,7 +40,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, name string) (result redis.ResourceType, err error) ImportData(ctx context.Context, resourceGroupName string, name string, parameters redis.ImportRDBParameters) (result redis.ImportDataFuture, err error) List(ctx context.Context) (result redis.ListResultPage, err error) + ListComplete(ctx context.Context) (result redis.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result redis.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result redis.ListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, name string) (result redis.AccessKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, name string, parameters redis.RegenerateKeyParameters) (result redis.AccessKeys, err error) Update(ctx context.Context, resourceGroupName string, name string, parameters redis.UpdateParameters) (result redis.ResourceType, err error) @@ -50,6 +53,7 @@ var _ ClientAPI = (*redis.Client)(nil) // FirewallRulesClientAPI contains the set of methods on the FirewallRulesClient type. type FirewallRulesClientAPI interface { List(ctx context.Context, resourceGroupName string, cacheName string) (result redis.FirewallRuleListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, cacheName string) (result redis.FirewallRuleListResultIterator, err error) } var _ FirewallRulesClientAPI = (*redis.FirewallRulesClient)(nil) diff --git a/services/redis/mgmt/2017-02-01/redis/client.go b/services/redis/mgmt/2017-02-01/redis/client.go index 88755c728bb2..53b9d8d52c0f 100644 --- a/services/redis/mgmt/2017-02-01/redis/client.go +++ b/services/redis/mgmt/2017-02-01/redis/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/redis/mgmt/2017-02-01/redis/firewallrules.go b/services/redis/mgmt/2017-02-01/redis/firewallrules.go index 1cb3a7ae0769..add73577ad1e 100644 --- a/services/redis/mgmt/2017-02-01/redis/firewallrules.go +++ b/services/redis/mgmt/2017-02-01/redis/firewallrules.go @@ -36,7 +36,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2017-02-01/redis/linkedserver.go b/services/redis/mgmt/2017-02-01/redis/linkedserver.go index d62d589e9580..c9ecca24e290 100644 --- a/services/redis/mgmt/2017-02-01/redis/linkedserver.go +++ b/services/redis/mgmt/2017-02-01/redis/linkedserver.go @@ -36,7 +36,8 @@ func NewLinkedServerClient(subscriptionID string) LinkedServerClient { return NewLinkedServerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedServerClientWithBaseURI creates an instance of the LinkedServerClient client. +// NewLinkedServerClientWithBaseURI creates an instance of the LinkedServerClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedServerClientWithBaseURI(baseURI string, subscriptionID string) LinkedServerClient { return LinkedServerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2017-02-01/redis/operations.go b/services/redis/mgmt/2017-02-01/redis/operations.go index 30577407cb3f..bd95a7809dbe 100644 --- a/services/redis/mgmt/2017-02-01/redis/operations.go +++ b/services/redis/mgmt/2017-02-01/redis/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/redis/mgmt/2017-02-01/redis/patchschedules.go b/services/redis/mgmt/2017-02-01/redis/patchschedules.go index 0a54cf849284..40e55a11ac2d 100644 --- a/services/redis/mgmt/2017-02-01/redis/patchschedules.go +++ b/services/redis/mgmt/2017-02-01/redis/patchschedules.go @@ -36,7 +36,8 @@ func NewPatchSchedulesClient(subscriptionID string) PatchSchedulesClient { return NewPatchSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client. +// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPatchSchedulesClientWithBaseURI(baseURI string, subscriptionID string) PatchSchedulesClient { return PatchSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2017-02-01/redis/redis.go b/services/redis/mgmt/2017-02-01/redis/redis.go index a23d5fc4f106..bac4ea18b7c8 100644 --- a/services/redis/mgmt/2017-02-01/redis/redis.go +++ b/services/redis/mgmt/2017-02-01/redis/redis.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/redis/mgmt/2017-02-01/redis/redisapi/interfaces.go b/services/redis/mgmt/2017-02-01/redis/redisapi/interfaces.go index 932f2f7daf00..4c1e279a7826 100644 --- a/services/redis/mgmt/2017-02-01/redis/redisapi/interfaces.go +++ b/services/redis/mgmt/2017-02-01/redis/redisapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result redis.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result redis.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*redis.OperationsClient)(nil) @@ -39,7 +40,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, name string) (result redis.ResourceType, err error) ImportData(ctx context.Context, resourceGroupName string, name string, parameters redis.ImportRDBParameters) (result redis.ImportDataFuture, err error) List(ctx context.Context) (result redis.ListResultPage, err error) + ListComplete(ctx context.Context) (result redis.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result redis.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result redis.ListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, name string) (result redis.AccessKeys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, name string, parameters redis.RegenerateKeyParameters) (result redis.AccessKeys, err error) Update(ctx context.Context, resourceGroupName string, name string, parameters redis.UpdateParameters) (result redis.ResourceType, err error) @@ -53,6 +56,7 @@ type FirewallRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, cacheName string, ruleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, cacheName string, ruleName string) (result redis.FirewallRule, err error) ListByRedisResource(ctx context.Context, resourceGroupName string, cacheName string) (result redis.FirewallRuleListResultPage, err error) + ListByRedisResourceComplete(ctx context.Context, resourceGroupName string, cacheName string) (result redis.FirewallRuleListResultIterator, err error) } var _ FirewallRulesClientAPI = (*redis.FirewallRulesClient)(nil) diff --git a/services/redis/mgmt/2017-10-01/redis/client.go b/services/redis/mgmt/2017-10-01/redis/client.go index 3afaeca11eb9..35df0cf15c95 100644 --- a/services/redis/mgmt/2017-10-01/redis/client.go +++ b/services/redis/mgmt/2017-10-01/redis/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/redis/mgmt/2017-10-01/redis/firewallrules.go b/services/redis/mgmt/2017-10-01/redis/firewallrules.go index b65edc87e139..d31476df0e7b 100644 --- a/services/redis/mgmt/2017-10-01/redis/firewallrules.go +++ b/services/redis/mgmt/2017-10-01/redis/firewallrules.go @@ -36,7 +36,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2017-10-01/redis/linkedserver.go b/services/redis/mgmt/2017-10-01/redis/linkedserver.go index 24c634ad0328..444b071254a3 100644 --- a/services/redis/mgmt/2017-10-01/redis/linkedserver.go +++ b/services/redis/mgmt/2017-10-01/redis/linkedserver.go @@ -36,7 +36,8 @@ func NewLinkedServerClient(subscriptionID string) LinkedServerClient { return NewLinkedServerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedServerClientWithBaseURI creates an instance of the LinkedServerClient client. +// NewLinkedServerClientWithBaseURI creates an instance of the LinkedServerClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedServerClientWithBaseURI(baseURI string, subscriptionID string) LinkedServerClient { return LinkedServerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2017-10-01/redis/operations.go b/services/redis/mgmt/2017-10-01/redis/operations.go index 221d53ff1cc4..4956706c2373 100644 --- a/services/redis/mgmt/2017-10-01/redis/operations.go +++ b/services/redis/mgmt/2017-10-01/redis/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/redis/mgmt/2017-10-01/redis/patchschedules.go b/services/redis/mgmt/2017-10-01/redis/patchschedules.go index 662c74230805..d02407db2c74 100644 --- a/services/redis/mgmt/2017-10-01/redis/patchschedules.go +++ b/services/redis/mgmt/2017-10-01/redis/patchschedules.go @@ -36,7 +36,8 @@ func NewPatchSchedulesClient(subscriptionID string) PatchSchedulesClient { return NewPatchSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client. +// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPatchSchedulesClientWithBaseURI(baseURI string, subscriptionID string) PatchSchedulesClient { return PatchSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2017-10-01/redis/redis.go b/services/redis/mgmt/2017-10-01/redis/redis.go index 77625eb50b0e..4d7971f8a2ac 100644 --- a/services/redis/mgmt/2017-10-01/redis/redis.go +++ b/services/redis/mgmt/2017-10-01/redis/redis.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/redis/mgmt/2017-10-01/redis/redisapi/interfaces.go b/services/redis/mgmt/2017-10-01/redis/redisapi/interfaces.go index a3918e716e57..404c7d1447a9 100644 --- a/services/redis/mgmt/2017-10-01/redis/redisapi/interfaces.go +++ b/services/redis/mgmt/2017-10-01/redis/redisapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result redis.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result redis.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*redis.OperationsClient)(nil) @@ -40,7 +41,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, name string) (result redis.ResourceType, err error) ImportData(ctx context.Context, resourceGroupName string, name string, parameters redis.ImportRDBParameters) (result redis.ImportDataFuture, err error) List(ctx context.Context) (result redis.ListResultPage, err error) + ListComplete(ctx context.Context) (result redis.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result redis.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result redis.ListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, name string) (result redis.AccessKeys, err error) ListUpgradeNotifications(ctx context.Context, resourceGroupName string, name string, history float64) (result redis.NotificationListResponse, err error) RegenerateKey(ctx context.Context, resourceGroupName string, name string, parameters redis.RegenerateKeyParameters) (result redis.AccessKeys, err error) @@ -55,6 +58,7 @@ type FirewallRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, cacheName string, ruleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, cacheName string, ruleName string) (result redis.FirewallRule, err error) ListByRedisResource(ctx context.Context, resourceGroupName string, cacheName string) (result redis.FirewallRuleListResultPage, err error) + ListByRedisResourceComplete(ctx context.Context, resourceGroupName string, cacheName string) (result redis.FirewallRuleListResultIterator, err error) } var _ FirewallRulesClientAPI = (*redis.FirewallRulesClient)(nil) @@ -65,6 +69,7 @@ type PatchSchedulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, name string) (result redis.PatchSchedule, err error) ListByRedisResource(ctx context.Context, resourceGroupName string, cacheName string) (result redis.PatchScheduleListResultPage, err error) + ListByRedisResourceComplete(ctx context.Context, resourceGroupName string, cacheName string) (result redis.PatchScheduleListResultIterator, err error) } var _ PatchSchedulesClientAPI = (*redis.PatchSchedulesClient)(nil) @@ -75,6 +80,7 @@ type LinkedServerClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string, linkedServerName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, name string, linkedServerName string) (result redis.LinkedServerWithProperties, err error) List(ctx context.Context, resourceGroupName string, name string) (result redis.LinkedServerWithPropertiesListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, name string) (result redis.LinkedServerWithPropertiesListIterator, err error) } var _ LinkedServerClientAPI = (*redis.LinkedServerClient)(nil) diff --git a/services/redis/mgmt/2018-03-01/redis/client.go b/services/redis/mgmt/2018-03-01/redis/client.go index a22618843a8d..682580577607 100644 --- a/services/redis/mgmt/2018-03-01/redis/client.go +++ b/services/redis/mgmt/2018-03-01/redis/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/redis/mgmt/2018-03-01/redis/firewallrules.go b/services/redis/mgmt/2018-03-01/redis/firewallrules.go index a23c4828b896..a8a2179436f0 100644 --- a/services/redis/mgmt/2018-03-01/redis/firewallrules.go +++ b/services/redis/mgmt/2018-03-01/redis/firewallrules.go @@ -36,7 +36,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2018-03-01/redis/linkedserver.go b/services/redis/mgmt/2018-03-01/redis/linkedserver.go index 4cd0a5ed8b67..0f986b7115f0 100644 --- a/services/redis/mgmt/2018-03-01/redis/linkedserver.go +++ b/services/redis/mgmt/2018-03-01/redis/linkedserver.go @@ -36,7 +36,8 @@ func NewLinkedServerClient(subscriptionID string) LinkedServerClient { return NewLinkedServerClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedServerClientWithBaseURI creates an instance of the LinkedServerClient client. +// NewLinkedServerClientWithBaseURI creates an instance of the LinkedServerClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLinkedServerClientWithBaseURI(baseURI string, subscriptionID string) LinkedServerClient { return LinkedServerClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2018-03-01/redis/operations.go b/services/redis/mgmt/2018-03-01/redis/operations.go index 57d57de10aee..a367cca6cbf9 100644 --- a/services/redis/mgmt/2018-03-01/redis/operations.go +++ b/services/redis/mgmt/2018-03-01/redis/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/redis/mgmt/2018-03-01/redis/patchschedules.go b/services/redis/mgmt/2018-03-01/redis/patchschedules.go index 885a1134d6d5..3a7ff4b17241 100644 --- a/services/redis/mgmt/2018-03-01/redis/patchschedules.go +++ b/services/redis/mgmt/2018-03-01/redis/patchschedules.go @@ -36,7 +36,8 @@ func NewPatchSchedulesClient(subscriptionID string) PatchSchedulesClient { return NewPatchSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client. +// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPatchSchedulesClientWithBaseURI(baseURI string, subscriptionID string) PatchSchedulesClient { return PatchSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/redis/mgmt/2018-03-01/redis/redis.go b/services/redis/mgmt/2018-03-01/redis/redis.go index 6ae5cb043d1c..d520b08430d2 100644 --- a/services/redis/mgmt/2018-03-01/redis/redis.go +++ b/services/redis/mgmt/2018-03-01/redis/redis.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/redis/mgmt/2018-03-01/redis/redisapi/interfaces.go b/services/redis/mgmt/2018-03-01/redis/redisapi/interfaces.go index c0f800c644a1..1cae682813ea 100644 --- a/services/redis/mgmt/2018-03-01/redis/redisapi/interfaces.go +++ b/services/redis/mgmt/2018-03-01/redis/redisapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result redis.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result redis.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*redis.OperationsClient)(nil) @@ -40,7 +41,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, name string) (result redis.ResourceType, err error) ImportData(ctx context.Context, resourceGroupName string, name string, parameters redis.ImportRDBParameters) (result redis.ImportDataFuture, err error) List(ctx context.Context) (result redis.ListResultPage, err error) + ListComplete(ctx context.Context) (result redis.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result redis.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result redis.ListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, name string) (result redis.AccessKeys, err error) ListUpgradeNotifications(ctx context.Context, resourceGroupName string, name string, history float64) (result redis.NotificationListResponse, err error) RegenerateKey(ctx context.Context, resourceGroupName string, name string, parameters redis.RegenerateKeyParameters) (result redis.AccessKeys, err error) @@ -55,6 +58,7 @@ type FirewallRulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, cacheName string, ruleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, cacheName string, ruleName string) (result redis.FirewallRule, err error) ListByRedisResource(ctx context.Context, resourceGroupName string, cacheName string) (result redis.FirewallRuleListResultPage, err error) + ListByRedisResourceComplete(ctx context.Context, resourceGroupName string, cacheName string) (result redis.FirewallRuleListResultIterator, err error) } var _ FirewallRulesClientAPI = (*redis.FirewallRulesClient)(nil) @@ -65,6 +69,7 @@ type PatchSchedulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, name string) (result redis.PatchSchedule, err error) ListByRedisResource(ctx context.Context, resourceGroupName string, cacheName string) (result redis.PatchScheduleListResultPage, err error) + ListByRedisResourceComplete(ctx context.Context, resourceGroupName string, cacheName string) (result redis.PatchScheduleListResultIterator, err error) } var _ PatchSchedulesClientAPI = (*redis.PatchSchedulesClient)(nil) @@ -75,6 +80,7 @@ type LinkedServerClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string, linkedServerName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, name string, linkedServerName string) (result redis.LinkedServerWithProperties, err error) List(ctx context.Context, resourceGroupName string, name string) (result redis.LinkedServerWithPropertiesListPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, name string) (result redis.LinkedServerWithPropertiesListIterator, err error) } var _ LinkedServerClientAPI = (*redis.LinkedServerClient)(nil) diff --git a/services/relay/mgmt/2016-07-01/relay/client.go b/services/relay/mgmt/2016-07-01/relay/client.go index 7877efcfafdf..807b22a40af9 100644 --- a/services/relay/mgmt/2016-07-01/relay/client.go +++ b/services/relay/mgmt/2016-07-01/relay/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/relay/mgmt/2016-07-01/relay/hybridconnections.go b/services/relay/mgmt/2016-07-01/relay/hybridconnections.go index d2ffbb60bf4a..6a90591f88a6 100644 --- a/services/relay/mgmt/2016-07-01/relay/hybridconnections.go +++ b/services/relay/mgmt/2016-07-01/relay/hybridconnections.go @@ -36,7 +36,9 @@ func NewHybridConnectionsClient(subscriptionID string) HybridConnectionsClient { return NewHybridConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridConnectionsClientWithBaseURI creates an instance of the HybridConnectionsClient client. +// NewHybridConnectionsClientWithBaseURI creates an instance of the HybridConnectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewHybridConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HybridConnectionsClient { return HybridConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/relay/mgmt/2016-07-01/relay/namespaces.go b/services/relay/mgmt/2016-07-01/relay/namespaces.go index c920b296aba0..5e00149f6188 100644 --- a/services/relay/mgmt/2016-07-01/relay/namespaces.go +++ b/services/relay/mgmt/2016-07-01/relay/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/relay/mgmt/2016-07-01/relay/operations.go b/services/relay/mgmt/2016-07-01/relay/operations.go index d31fbad35389..b6c090f4f8c5 100644 --- a/services/relay/mgmt/2016-07-01/relay/operations.go +++ b/services/relay/mgmt/2016-07-01/relay/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/relay/mgmt/2016-07-01/relay/relayapi/interfaces.go b/services/relay/mgmt/2016-07-01/relay/relayapi/interfaces.go index 52688a51e111..0ded7e1150ea 100644 --- a/services/relay/mgmt/2016-07-01/relay/relayapi/interfaces.go +++ b/services/relay/mgmt/2016-07-01/relay/relayapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result relay.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result relay.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*relay.OperationsClient)(nil) @@ -40,10 +41,14 @@ type NamespacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.Namespace, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) List(ctx context.Context) (result relay.NamespaceListResultPage, err error) + ListComplete(ctx context.Context) (result relay.NamespaceListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.AuthorizationRuleListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result relay.NamespaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result relay.NamespaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result relay.AuthorizationRuleKeys, err error) ListPostAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.AuthorizationRuleListResultPage, err error) + ListPostAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.AuthorizationRuleListResultIterator, err error) PostAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters relay.RegenerateKeysParameters) (result relay.AuthorizationRuleKeys, err error) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters relay.NamespaceUpdateParameter) (result relay.Namespace, err error) @@ -60,9 +65,12 @@ type HybridConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string) (result relay.HybridConnection, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string) (result relay.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string) (result relay.AuthorizationRuleListResultIterator, err error) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.HybridConnectionListResultPage, err error) + ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.HybridConnectionListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result relay.AuthorizationRuleKeys, err error) ListPostAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string) (result relay.AuthorizationRuleListResultPage, err error) + ListPostAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string) (result relay.AuthorizationRuleListResultIterator, err error) PostAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters relay.RegenerateKeysParameters) (result relay.AuthorizationRuleKeys, err error) } @@ -78,9 +86,12 @@ type WCFRelaysClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, relayName string) (result relay.WcfRelay, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, relayName string) (result relay.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, relayName string) (result relay.AuthorizationRuleListResultIterator, err error) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.WcfRelaysListResultPage, err error) + ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.WcfRelaysListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result relay.AuthorizationRuleKeys, err error) ListPostAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, relayName string) (result relay.AuthorizationRuleListResultPage, err error) + ListPostAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, relayName string) (result relay.AuthorizationRuleListResultIterator, err error) PostAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters relay.RegenerateKeysParameters) (result relay.AuthorizationRuleKeys, err error) } diff --git a/services/relay/mgmt/2016-07-01/relay/wcfrelays.go b/services/relay/mgmt/2016-07-01/relay/wcfrelays.go index dec422005fbc..fee0b83bc830 100644 --- a/services/relay/mgmt/2016-07-01/relay/wcfrelays.go +++ b/services/relay/mgmt/2016-07-01/relay/wcfrelays.go @@ -36,7 +36,8 @@ func NewWCFRelaysClient(subscriptionID string) WCFRelaysClient { return NewWCFRelaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWCFRelaysClientWithBaseURI creates an instance of the WCFRelaysClient client. +// NewWCFRelaysClientWithBaseURI creates an instance of the WCFRelaysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWCFRelaysClientWithBaseURI(baseURI string, subscriptionID string) WCFRelaysClient { return WCFRelaysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/relay/mgmt/2017-04-01/relay/client.go b/services/relay/mgmt/2017-04-01/relay/client.go index a881d83d1356..453ef081c8f9 100644 --- a/services/relay/mgmt/2017-04-01/relay/client.go +++ b/services/relay/mgmt/2017-04-01/relay/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/relay/mgmt/2017-04-01/relay/hybridconnections.go b/services/relay/mgmt/2017-04-01/relay/hybridconnections.go index 5f6dcd71f73d..399d208e2f56 100644 --- a/services/relay/mgmt/2017-04-01/relay/hybridconnections.go +++ b/services/relay/mgmt/2017-04-01/relay/hybridconnections.go @@ -36,7 +36,9 @@ func NewHybridConnectionsClient(subscriptionID string) HybridConnectionsClient { return NewHybridConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridConnectionsClientWithBaseURI creates an instance of the HybridConnectionsClient client. +// NewHybridConnectionsClientWithBaseURI creates an instance of the HybridConnectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewHybridConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HybridConnectionsClient { return HybridConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/relay/mgmt/2017-04-01/relay/namespaces.go b/services/relay/mgmt/2017-04-01/relay/namespaces.go index fe5eed35c436..d5c70d11ac36 100644 --- a/services/relay/mgmt/2017-04-01/relay/namespaces.go +++ b/services/relay/mgmt/2017-04-01/relay/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/relay/mgmt/2017-04-01/relay/operations.go b/services/relay/mgmt/2017-04-01/relay/operations.go index 39a46a658ff2..93fec626a411 100644 --- a/services/relay/mgmt/2017-04-01/relay/operations.go +++ b/services/relay/mgmt/2017-04-01/relay/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/relay/mgmt/2017-04-01/relay/relayapi/interfaces.go b/services/relay/mgmt/2017-04-01/relay/relayapi/interfaces.go index b74946a0a3a4..e7232f9456cc 100644 --- a/services/relay/mgmt/2017-04-01/relay/relayapi/interfaces.go +++ b/services/relay/mgmt/2017-04-01/relay/relayapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result relay.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result relay.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*relay.OperationsClient)(nil) @@ -40,8 +41,11 @@ type NamespacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.Namespace, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) List(ctx context.Context) (result relay.NamespaceListResultPage, err error) + ListComplete(ctx context.Context) (result relay.NamespaceListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.AuthorizationRuleListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result relay.NamespaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result relay.NamespaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result relay.AccessKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters relay.RegenerateAccessKeyParameters) (result relay.AccessKeys, err error) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters relay.UpdateParameters) (result relay.Namespace, err error) @@ -58,7 +62,9 @@ type HybridConnectionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string) (result relay.HybridConnection, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string) (result relay.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string) (result relay.AuthorizationRuleListResultIterator, err error) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.HybridConnectionListResultPage, err error) + ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.HybridConnectionListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result relay.AccessKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters relay.RegenerateAccessKeyParameters) (result relay.AccessKeys, err error) } @@ -74,7 +80,9 @@ type WCFRelaysClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, relayName string) (result relay.WcfRelay, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result relay.AuthorizationRule, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, relayName string) (result relay.AuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, relayName string) (result relay.AuthorizationRuleListResultIterator, err error) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.WcfRelaysListResultPage, err error) + ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result relay.WcfRelaysListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result relay.AccessKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters relay.RegenerateAccessKeyParameters) (result relay.AccessKeys, err error) } diff --git a/services/relay/mgmt/2017-04-01/relay/wcfrelays.go b/services/relay/mgmt/2017-04-01/relay/wcfrelays.go index 5daffc7f2597..1d4a26e34051 100644 --- a/services/relay/mgmt/2017-04-01/relay/wcfrelays.go +++ b/services/relay/mgmt/2017-04-01/relay/wcfrelays.go @@ -36,7 +36,8 @@ func NewWCFRelaysClient(subscriptionID string) WCFRelaysClient { return NewWCFRelaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWCFRelaysClientWithBaseURI creates an instance of the WCFRelaysClient client. +// NewWCFRelaysClientWithBaseURI creates an instance of the WCFRelaysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWCFRelaysClientWithBaseURI(baseURI string, subscriptionID string) WCFRelaysClient { return WCFRelaysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/reservations/mgmt/2017-11-01/reservations/client.go b/services/reservations/mgmt/2017-11-01/reservations/client.go index f8861c6d5ca9..2d64c18d6b3c 100644 --- a/services/reservations/mgmt/2017-11-01/reservations/client.go +++ b/services/reservations/mgmt/2017-11-01/reservations/client.go @@ -44,7 +44,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/reservations/mgmt/2017-11-01/reservations/operation.go b/services/reservations/mgmt/2017-11-01/reservations/operation.go index 5d7b7aa8dc1b..126b68b319e6 100644 --- a/services/reservations/mgmt/2017-11-01/reservations/operation.go +++ b/services/reservations/mgmt/2017-11-01/reservations/operation.go @@ -35,7 +35,8 @@ func NewOperationClient() OperationClient { return NewOperationClientWithBaseURI(DefaultBaseURI) } -// NewOperationClientWithBaseURI creates an instance of the OperationClient client. +// NewOperationClientWithBaseURI creates an instance of the OperationClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationClientWithBaseURI(baseURI string) OperationClient { return OperationClient{NewWithBaseURI(baseURI)} } diff --git a/services/reservations/mgmt/2017-11-01/reservations/order.go b/services/reservations/mgmt/2017-11-01/reservations/order.go index 4d6ce6d14e51..f07b78b6d2ff 100644 --- a/services/reservations/mgmt/2017-11-01/reservations/order.go +++ b/services/reservations/mgmt/2017-11-01/reservations/order.go @@ -35,7 +35,8 @@ func NewOrderClient() OrderClient { return NewOrderClientWithBaseURI(DefaultBaseURI) } -// NewOrderClientWithBaseURI creates an instance of the OrderClient client. +// NewOrderClientWithBaseURI creates an instance of the OrderClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOrderClientWithBaseURI(baseURI string) OrderClient { return OrderClient{NewWithBaseURI(baseURI)} } diff --git a/services/reservations/mgmt/2017-11-01/reservations/reservation.go b/services/reservations/mgmt/2017-11-01/reservations/reservation.go index 2542c4f010cb..2576cc4f514c 100644 --- a/services/reservations/mgmt/2017-11-01/reservations/reservation.go +++ b/services/reservations/mgmt/2017-11-01/reservations/reservation.go @@ -35,7 +35,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/reservations/mgmt/2017-11-01/reservations/reservationsapi/interfaces.go b/services/reservations/mgmt/2017-11-01/reservations/reservationsapi/interfaces.go index ec2f87ccc24a..0348217d368e 100644 --- a/services/reservations/mgmt/2017-11-01/reservations/reservationsapi/interfaces.go +++ b/services/reservations/mgmt/2017-11-01/reservations/reservationsapi/interfaces.go @@ -34,6 +34,7 @@ var _ BaseClientAPI = (*reservations.BaseClient)(nil) type OrderClientAPI interface { Get(ctx context.Context, reservationOrderID string) (result reservations.OrderResponse, err error) List(ctx context.Context) (result reservations.OrderListPage, err error) + ListComplete(ctx context.Context) (result reservations.OrderListIterator, err error) } var _ OrderClientAPI = (*reservations.OrderClient)(nil) @@ -42,7 +43,9 @@ var _ OrderClientAPI = (*reservations.OrderClient)(nil) type ClientAPI interface { Get(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.Response, err error) List(ctx context.Context, reservationOrderID string) (result reservations.ListPage, err error) + ListComplete(ctx context.Context, reservationOrderID string) (result reservations.ListIterator, err error) ListRevisions(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.ListPage, err error) + ListRevisionsComplete(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.ListIterator, err error) Merge(ctx context.Context, reservationOrderID string, body reservations.MergeRequest) (result reservations.ReservationMergeFuture, err error) Split(ctx context.Context, reservationOrderID string, body reservations.SplitRequest) (result reservations.SplitFuture, err error) Update(ctx context.Context, reservationOrderID string, reservationID string, parameters reservations.Patch) (result reservations.ReservationUpdateFuture, err error) @@ -53,6 +56,7 @@ var _ ClientAPI = (*reservations.Client)(nil) // OperationClientAPI contains the set of methods on the OperationClient type. type OperationClientAPI interface { List(ctx context.Context) (result reservations.OperationListPage, err error) + ListComplete(ctx context.Context) (result reservations.OperationListIterator, err error) } var _ OperationClientAPI = (*reservations.OperationClient)(nil) diff --git a/services/resourcegraph/mgmt/2019-04-01/resourcegraph/client.go b/services/resourcegraph/mgmt/2019-04-01/resourcegraph/client.go index af23f1420f5b..607a5dcf3039 100644 --- a/services/resourcegraph/mgmt/2019-04-01/resourcegraph/client.go +++ b/services/resourcegraph/mgmt/2019-04-01/resourcegraph/client.go @@ -45,7 +45,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/resourcegraph/mgmt/2019-04-01/resourcegraph/operations.go b/services/resourcegraph/mgmt/2019-04-01/resourcegraph/operations.go index 303ef422c62b..633c8df7af4c 100644 --- a/services/resourcegraph/mgmt/2019-04-01/resourcegraph/operations.go +++ b/services/resourcegraph/mgmt/2019-04-01/resourcegraph/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/availabilitystatuses.go b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/availabilitystatuses.go index 94f1313fb27b..8f64ada8f1af 100644 --- a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/availabilitystatuses.go +++ b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/availabilitystatuses.go @@ -35,7 +35,9 @@ func NewAvailabilityStatusesClient(subscriptionID string) AvailabilityStatusesCl return NewAvailabilityStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilityStatusesClientWithBaseURI creates an instance of the AvailabilityStatusesClient client. +// NewAvailabilityStatusesClientWithBaseURI creates an instance of the AvailabilityStatusesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAvailabilityStatusesClientWithBaseURI(baseURI string, subscriptionID string) AvailabilityStatusesClient { return AvailabilityStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/childavailabilitystatuses.go b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/childavailabilitystatuses.go index 31e9561938b8..8e3159f07217 100644 --- a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/childavailabilitystatuses.go +++ b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/childavailabilitystatuses.go @@ -35,7 +35,9 @@ func NewChildAvailabilityStatusesClient(subscriptionID string) ChildAvailability return NewChildAvailabilityStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChildAvailabilityStatusesClientWithBaseURI creates an instance of the ChildAvailabilityStatusesClient client. +// NewChildAvailabilityStatusesClientWithBaseURI creates an instance of the ChildAvailabilityStatusesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewChildAvailabilityStatusesClientWithBaseURI(baseURI string, subscriptionID string) ChildAvailabilityStatusesClient { return ChildAvailabilityStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/childresources.go b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/childresources.go index b6bc5428dba0..5e199cb049b2 100644 --- a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/childresources.go +++ b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/childresources.go @@ -35,7 +35,8 @@ func NewChildResourcesClient(subscriptionID string) ChildResourcesClient { return NewChildResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChildResourcesClientWithBaseURI creates an instance of the ChildResourcesClient client. +// NewChildResourcesClientWithBaseURI creates an instance of the ChildResourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChildResourcesClientWithBaseURI(baseURI string, subscriptionID string) ChildResourcesClient { return ChildResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/client.go b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/client.go index a850592f9aa9..5ffbc56bd45d 100644 --- a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/client.go +++ b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/operations.go b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/operations.go index c55ce88e4505..b9ee7060437a 100644 --- a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/operations.go +++ b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/resourcehealthapi/interfaces.go b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/resourcehealthapi/interfaces.go index 20769627d26e..88aecefb0b55 100644 --- a/services/resourcehealth/mgmt/2015-01-01/resourcehealth/resourcehealthapi/interfaces.go +++ b/services/resourcehealth/mgmt/2015-01-01/resourcehealth/resourcehealthapi/interfaces.go @@ -26,8 +26,11 @@ import ( type AvailabilityStatusesClientAPI interface { GetByResource(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatus, err error) List(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListComplete(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) ListBySubscriptionID(ctx context.Context, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListBySubscriptionIDComplete(ctx context.Context, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) } var _ AvailabilityStatusesClientAPI = (*resourcehealth.AvailabilityStatusesClient)(nil) @@ -36,6 +39,7 @@ var _ AvailabilityStatusesClientAPI = (*resourcehealth.AvailabilityStatusesClien type ChildAvailabilityStatusesClientAPI interface { GetByResource(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatus, err error) List(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListComplete(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) } var _ ChildAvailabilityStatusesClientAPI = (*resourcehealth.ChildAvailabilityStatusesClient)(nil) @@ -43,6 +47,7 @@ var _ ChildAvailabilityStatusesClientAPI = (*resourcehealth.ChildAvailabilitySta // ChildResourcesClientAPI contains the set of methods on the ChildResourcesClient type. type ChildResourcesClientAPI interface { List(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListComplete(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) } var _ ChildResourcesClientAPI = (*resourcehealth.ChildResourcesClient)(nil) diff --git a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/availabilitystatuses.go b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/availabilitystatuses.go index beed15420c3f..3f7901f5ca58 100644 --- a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/availabilitystatuses.go +++ b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/availabilitystatuses.go @@ -35,7 +35,9 @@ func NewAvailabilityStatusesClient(subscriptionID string) AvailabilityStatusesCl return NewAvailabilityStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilityStatusesClientWithBaseURI creates an instance of the AvailabilityStatusesClient client. +// NewAvailabilityStatusesClientWithBaseURI creates an instance of the AvailabilityStatusesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAvailabilityStatusesClientWithBaseURI(baseURI string, subscriptionID string) AvailabilityStatusesClient { return AvailabilityStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/childavailabilitystatuses.go b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/childavailabilitystatuses.go index 1d41d2b7f74f..adfcf9b9abde 100644 --- a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/childavailabilitystatuses.go +++ b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/childavailabilitystatuses.go @@ -35,7 +35,9 @@ func NewChildAvailabilityStatusesClient(subscriptionID string) ChildAvailability return NewChildAvailabilityStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChildAvailabilityStatusesClientWithBaseURI creates an instance of the ChildAvailabilityStatusesClient client. +// NewChildAvailabilityStatusesClientWithBaseURI creates an instance of the ChildAvailabilityStatusesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewChildAvailabilityStatusesClientWithBaseURI(baseURI string, subscriptionID string) ChildAvailabilityStatusesClient { return ChildAvailabilityStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/childresources.go b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/childresources.go index 71b0670e1ecc..6718ae137930 100644 --- a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/childresources.go +++ b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/childresources.go @@ -35,7 +35,8 @@ func NewChildResourcesClient(subscriptionID string) ChildResourcesClient { return NewChildResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChildResourcesClientWithBaseURI creates an instance of the ChildResourcesClient client. +// NewChildResourcesClientWithBaseURI creates an instance of the ChildResourcesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChildResourcesClientWithBaseURI(baseURI string, subscriptionID string) ChildResourcesClient { return ChildResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/client.go b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/client.go index 3ad57080362d..22bed6438880 100644 --- a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/client.go +++ b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/emergingissues.go b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/emergingissues.go index 74e6ac8f1475..ef43f2b6d37f 100644 --- a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/emergingissues.go +++ b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/emergingissues.go @@ -35,7 +35,8 @@ func NewEmergingIssuesClient(subscriptionID string) EmergingIssuesClient { return NewEmergingIssuesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEmergingIssuesClientWithBaseURI creates an instance of the EmergingIssuesClient client. +// NewEmergingIssuesClientWithBaseURI creates an instance of the EmergingIssuesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEmergingIssuesClientWithBaseURI(baseURI string, subscriptionID string) EmergingIssuesClient { return EmergingIssuesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/operations.go b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/operations.go index a96ec484d6ea..711cd0c68e49 100644 --- a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/operations.go +++ b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/resourcehealthapi/interfaces.go b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/resourcehealthapi/interfaces.go index aef0b011bfc4..a546be602fa6 100644 --- a/services/resourcehealth/mgmt/2017-07-01/resourcehealth/resourcehealthapi/interfaces.go +++ b/services/resourcehealth/mgmt/2017-07-01/resourcehealth/resourcehealthapi/interfaces.go @@ -26,8 +26,11 @@ import ( type AvailabilityStatusesClientAPI interface { GetByResource(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatus, err error) List(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListComplete(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) ListBySubscriptionID(ctx context.Context, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListBySubscriptionIDComplete(ctx context.Context, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) } var _ AvailabilityStatusesClientAPI = (*resourcehealth.AvailabilityStatusesClient)(nil) @@ -36,6 +39,7 @@ var _ AvailabilityStatusesClientAPI = (*resourcehealth.AvailabilityStatusesClien type ChildAvailabilityStatusesClientAPI interface { GetByResource(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatus, err error) List(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListComplete(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) } var _ ChildAvailabilityStatusesClientAPI = (*resourcehealth.ChildAvailabilityStatusesClient)(nil) @@ -43,6 +47,7 @@ var _ ChildAvailabilityStatusesClientAPI = (*resourcehealth.ChildAvailabilitySta // ChildResourcesClientAPI contains the set of methods on the ChildResourcesClient type. type ChildResourcesClientAPI interface { List(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultPage, err error) + ListComplete(ctx context.Context, resourceURI string, filter string, expand string) (result resourcehealth.AvailabilityStatusListResultIterator, err error) } var _ ChildResourcesClientAPI = (*resourcehealth.ChildResourcesClient)(nil) @@ -58,6 +63,7 @@ var _ OperationsClientAPI = (*resourcehealth.OperationsClient)(nil) type EmergingIssuesClientAPI interface { Get(ctx context.Context) (result resourcehealth.EmergingIssuesGetResult, err error) List(ctx context.Context) (result resourcehealth.EmergingIssueListResultPage, err error) + ListComplete(ctx context.Context) (result resourcehealth.EmergingIssueListResultIterator, err error) } var _ EmergingIssuesClientAPI = (*resourcehealth.EmergingIssuesClient)(nil) diff --git a/services/resources/mgmt/2015-01-01/locks/client.go b/services/resources/mgmt/2015-01-01/locks/client.go index 082d1e1b6d6f..dbca3ee379a1 100644 --- a/services/resources/mgmt/2015-01-01/locks/client.go +++ b/services/resources/mgmt/2015-01-01/locks/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2015-01-01/locks/locksapi/interfaces.go b/services/resources/mgmt/2015-01-01/locks/locksapi/interfaces.go index 5049987bdb6c..2fc9928db8d7 100644 --- a/services/resources/mgmt/2015-01-01/locks/locksapi/interfaces.go +++ b/services/resources/mgmt/2015-01-01/locks/locksapi/interfaces.go @@ -34,8 +34,11 @@ type ManagementLocksClientAPI interface { Get(ctx context.Context, lockName string) (result locks.ManagementLockObject, err error) GetAtResourceGroupLevel(ctx context.Context, resourceGroupName string, lockName string) (result locks.ManagementLockObject, err error) ListAtResourceGroupLevel(ctx context.Context, resourceGroupName string, filter string) (result locks.ManagementLockListResultPage, err error) + ListAtResourceGroupLevelComplete(ctx context.Context, resourceGroupName string, filter string) (result locks.ManagementLockListResultIterator, err error) ListAtResourceLevel(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result locks.ManagementLockListResultPage, err error) + ListAtResourceLevelComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result locks.ManagementLockListResultIterator, err error) ListAtSubscriptionLevel(ctx context.Context, filter string) (result locks.ManagementLockListResultPage, err error) + ListAtSubscriptionLevelComplete(ctx context.Context, filter string) (result locks.ManagementLockListResultIterator, err error) } var _ ManagementLocksClientAPI = (*locks.ManagementLocksClient)(nil) diff --git a/services/resources/mgmt/2015-01-01/locks/managementlocks.go b/services/resources/mgmt/2015-01-01/locks/managementlocks.go index 572ec8521a03..5403bdaa7ca4 100644 --- a/services/resources/mgmt/2015-01-01/locks/managementlocks.go +++ b/services/resources/mgmt/2015-01-01/locks/managementlocks.go @@ -36,7 +36,8 @@ func NewManagementLocksClient(subscriptionID string) ManagementLocksClient { return NewManagementLocksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagementLocksClientWithBaseURI creates an instance of the ManagementLocksClient client. +// NewManagementLocksClientWithBaseURI creates an instance of the ManagementLocksClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagementLocksClientWithBaseURI(baseURI string, subscriptionID string) ManagementLocksClient { return ManagementLocksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/resources/client.go b/services/resources/mgmt/2015-11-01/resources/client.go index f26641f53bb8..30dbb3e26b1c 100644 --- a/services/resources/mgmt/2015-11-01/resources/client.go +++ b/services/resources/mgmt/2015-11-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2015-11-01/resources/deploymentoperations.go b/services/resources/mgmt/2015-11-01/resources/deploymentoperations.go index 32a1b8f8569e..de8b8aea43b4 100644 --- a/services/resources/mgmt/2015-11-01/resources/deploymentoperations.go +++ b/services/resources/mgmt/2015-11-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/resources/deployments.go b/services/resources/mgmt/2015-11-01/resources/deployments.go index d9aff3390343..2b4bab7adb7f 100644 --- a/services/resources/mgmt/2015-11-01/resources/deployments.go +++ b/services/resources/mgmt/2015-11-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/resources/groups.go b/services/resources/mgmt/2015-11-01/resources/groups.go index efe2e72a98f6..68a77f260fb8 100644 --- a/services/resources/mgmt/2015-11-01/resources/groups.go +++ b/services/resources/mgmt/2015-11-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/resources/policyassignments.go b/services/resources/mgmt/2015-11-01/resources/policyassignments.go index c551269ea2cb..943013c2d80d 100644 --- a/services/resources/mgmt/2015-11-01/resources/policyassignments.go +++ b/services/resources/mgmt/2015-11-01/resources/policyassignments.go @@ -36,7 +36,9 @@ func NewPolicyAssignmentsClient(subscriptionID string) PolicyAssignmentsClient { return NewPolicyAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicyAssignmentsClientWithBaseURI creates an instance of the PolicyAssignmentsClient client. +// NewPolicyAssignmentsClientWithBaseURI creates an instance of the PolicyAssignmentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPolicyAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) PolicyAssignmentsClient { return PolicyAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/resources/policydefinitions.go b/services/resources/mgmt/2015-11-01/resources/policydefinitions.go index 81fca06b125f..3dcc0b4c83ab 100644 --- a/services/resources/mgmt/2015-11-01/resources/policydefinitions.go +++ b/services/resources/mgmt/2015-11-01/resources/policydefinitions.go @@ -35,7 +35,9 @@ func NewPolicyDefinitionsClient(subscriptionID string) PolicyDefinitionsClient { return NewPolicyDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicyDefinitionsClientWithBaseURI creates an instance of the PolicyDefinitionsClient client. +// NewPolicyDefinitionsClientWithBaseURI creates an instance of the PolicyDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPolicyDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) PolicyDefinitionsClient { return PolicyDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/resources/provideroperationdetails.go b/services/resources/mgmt/2015-11-01/resources/provideroperationdetails.go index 0673ff6a7069..37eccf8ded08 100644 --- a/services/resources/mgmt/2015-11-01/resources/provideroperationdetails.go +++ b/services/resources/mgmt/2015-11-01/resources/provideroperationdetails.go @@ -35,7 +35,9 @@ func NewProviderOperationDetailsClient(subscriptionID string) ProviderOperationD return NewProviderOperationDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationDetailsClientWithBaseURI creates an instance of the ProviderOperationDetailsClient client. +// NewProviderOperationDetailsClientWithBaseURI creates an instance of the ProviderOperationDetailsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProviderOperationDetailsClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationDetailsClient { return ProviderOperationDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/resources/providers.go b/services/resources/mgmt/2015-11-01/resources/providers.go index e0fa8323d277..9c5b40c3ed7d 100644 --- a/services/resources/mgmt/2015-11-01/resources/providers.go +++ b/services/resources/mgmt/2015-11-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/resources/resources.go b/services/resources/mgmt/2015-11-01/resources/resources.go index 092866cf4cc9..248fb9605ebd 100644 --- a/services/resources/mgmt/2015-11-01/resources/resources.go +++ b/services/resources/mgmt/2015-11-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2015-11-01/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2015-11-01/resources/resourcesapi/interfaces.go index 4212c1e4396d..32ab130c8804 100644 --- a/services/resources/mgmt/2015-11-01/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2015-11-01/resources/resourcesapi/interfaces.go @@ -32,6 +32,7 @@ type DeploymentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) List(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) } @@ -41,6 +42,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) List(ctx context.Context, top *int32) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -54,7 +56,9 @@ type GroupsClientAPI interface { Delete(ctx context.Context, resourceGroupName string) (result resources.GroupsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) ListResources(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.ListResultPage, err error) + ListResourcesComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.ListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, parameters resources.Group) (result resources.Group, err error) } @@ -67,6 +71,7 @@ type ClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) } @@ -80,6 +85,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -88,6 +94,7 @@ var _ TagsClientAPI = (*resources.TagsClient)(nil) type DeploymentOperationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) @@ -95,6 +102,7 @@ var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(ni // ProviderOperationDetailsClientAPI contains the set of methods on the ProviderOperationDetailsClient type. type ProviderOperationDetailsClientAPI interface { List(ctx context.Context, resourceProviderNamespace string, APIVersion string) (result resources.ProviderOperationDetailListResultPage, err error) + ListComplete(ctx context.Context, resourceProviderNamespace string, APIVersion string) (result resources.ProviderOperationDetailListResultIterator, err error) } var _ ProviderOperationDetailsClientAPI = (*resources.ProviderOperationDetailsClient)(nil) @@ -117,9 +125,13 @@ type PolicyAssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result resources.PolicyAssignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result resources.PolicyAssignment, err error) List(ctx context.Context, filter string) (result resources.PolicyAssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result resources.PolicyAssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result resources.PolicyAssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result resources.PolicyAssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result resources.PolicyAssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result resources.PolicyAssignmentListResultIterator, err error) ListForScope(ctx context.Context, scope string, filter string) (result resources.PolicyAssignmentListResultPage, err error) + ListForScopeComplete(ctx context.Context, scope string, filter string) (result resources.PolicyAssignmentListResultIterator, err error) } var _ PolicyAssignmentsClientAPI = (*resources.PolicyAssignmentsClient)(nil) diff --git a/services/resources/mgmt/2015-11-01/resources/tags.go b/services/resources/mgmt/2015-11-01/resources/tags.go index f4fc16b2ac85..bdd28785a925 100644 --- a/services/resources/mgmt/2015-11-01/resources/tags.go +++ b/services/resources/mgmt/2015-11-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2015-11-01/subscriptions/client.go b/services/resources/mgmt/2015-11-01/subscriptions/client.go index 327f1fa490f1..d171bb400d00 100644 --- a/services/resources/mgmt/2015-11-01/subscriptions/client.go +++ b/services/resources/mgmt/2015-11-01/subscriptions/client.go @@ -40,7 +40,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/resources/mgmt/2015-11-01/subscriptions/subscriptions.go b/services/resources/mgmt/2015-11-01/subscriptions/subscriptions.go index 2d5879eb9200..06653606ace3 100644 --- a/services/resources/mgmt/2015-11-01/subscriptions/subscriptions.go +++ b/services/resources/mgmt/2015-11-01/subscriptions/subscriptions.go @@ -35,7 +35,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2015-11-01/subscriptions/subscriptionsapi/interfaces.go b/services/resources/mgmt/2015-11-01/subscriptions/subscriptionsapi/interfaces.go index ec5a5f6a5d9e..5494ee2a438f 100644 --- a/services/resources/mgmt/2015-11-01/subscriptions/subscriptionsapi/interfaces.go +++ b/services/resources/mgmt/2015-11-01/subscriptions/subscriptionsapi/interfaces.go @@ -26,6 +26,7 @@ import ( type ClientAPI interface { Get(ctx context.Context, subscriptionID string) (result subscriptions.Subscription, err error) List(ctx context.Context) (result subscriptions.ListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.ListResultIterator, err error) ListLocations(ctx context.Context, subscriptionID string) (result subscriptions.LocationListResult, err error) } @@ -34,6 +35,7 @@ var _ ClientAPI = (*subscriptions.Client)(nil) // TenantsClientAPI contains the set of methods on the TenantsClient type. type TenantsClientAPI interface { List(ctx context.Context) (result subscriptions.TenantListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.TenantListResultIterator, err error) } var _ TenantsClientAPI = (*subscriptions.TenantsClient)(nil) diff --git a/services/resources/mgmt/2015-11-01/subscriptions/tenants.go b/services/resources/mgmt/2015-11-01/subscriptions/tenants.go index 2ada5959f0a6..c399158d7655 100644 --- a/services/resources/mgmt/2015-11-01/subscriptions/tenants.go +++ b/services/resources/mgmt/2015-11-01/subscriptions/tenants.go @@ -35,7 +35,8 @@ func NewTenantsClient() TenantsClient { return NewTenantsClientWithBaseURI(DefaultBaseURI) } -// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client. +// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantsClientWithBaseURI(baseURI string) TenantsClient { return TenantsClient{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2015-12-01/features/client.go b/services/resources/mgmt/2015-12-01/features/client.go index d7f0f9ff6a2e..32e594877690 100644 --- a/services/resources/mgmt/2015-12-01/features/client.go +++ b/services/resources/mgmt/2015-12-01/features/client.go @@ -48,7 +48,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2015-12-01/features/features.go b/services/resources/mgmt/2015-12-01/features/features.go index 2de20f291e22..e15fd43828a2 100644 --- a/services/resources/mgmt/2015-12-01/features/features.go +++ b/services/resources/mgmt/2015-12-01/features/features.go @@ -38,7 +38,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2015-12-01/features/featuresapi/interfaces.go b/services/resources/mgmt/2015-12-01/features/featuresapi/interfaces.go index 956d5433fd7e..f89e4afdff2b 100644 --- a/services/resources/mgmt/2015-12-01/features/featuresapi/interfaces.go +++ b/services/resources/mgmt/2015-12-01/features/featuresapi/interfaces.go @@ -25,6 +25,7 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { ListOperations(ctx context.Context) (result features.OperationListResultPage, err error) + ListOperationsComplete(ctx context.Context) (result features.OperationListResultIterator, err error) } var _ BaseClientAPI = (*features.BaseClient)(nil) @@ -33,7 +34,9 @@ var _ BaseClientAPI = (*features.BaseClient)(nil) type ClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, featureName string) (result features.Result, err error) List(ctx context.Context, resourceProviderNamespace string) (result features.OperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceProviderNamespace string) (result features.OperationsListResultIterator, err error) ListAll(ctx context.Context) (result features.OperationsListResultPage, err error) + ListAllComplete(ctx context.Context) (result features.OperationsListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string, featureName string) (result features.Result, err error) } diff --git a/services/resources/mgmt/2016-02-01/resources/client.go b/services/resources/mgmt/2016-02-01/resources/client.go index a25b93f1110e..6ccee4c9fa47 100644 --- a/services/resources/mgmt/2016-02-01/resources/client.go +++ b/services/resources/mgmt/2016-02-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2016-02-01/resources/deploymentoperations.go b/services/resources/mgmt/2016-02-01/resources/deploymentoperations.go index 3047aa00bea3..ab53d8a0198a 100644 --- a/services/resources/mgmt/2016-02-01/resources/deploymentoperations.go +++ b/services/resources/mgmt/2016-02-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-02-01/resources/deployments.go b/services/resources/mgmt/2016-02-01/resources/deployments.go index 184c1fecc82c..9f62ce2f48d7 100644 --- a/services/resources/mgmt/2016-02-01/resources/deployments.go +++ b/services/resources/mgmt/2016-02-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-02-01/resources/groups.go b/services/resources/mgmt/2016-02-01/resources/groups.go index 9858b639bf42..a709caf08793 100644 --- a/services/resources/mgmt/2016-02-01/resources/groups.go +++ b/services/resources/mgmt/2016-02-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-02-01/resources/providers.go b/services/resources/mgmt/2016-02-01/resources/providers.go index 7ba9bdfc81d4..3d472565ceb5 100644 --- a/services/resources/mgmt/2016-02-01/resources/providers.go +++ b/services/resources/mgmt/2016-02-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-02-01/resources/resources.go b/services/resources/mgmt/2016-02-01/resources/resources.go index 3c74b158a07a..135d2c2f2c77 100644 --- a/services/resources/mgmt/2016-02-01/resources/resources.go +++ b/services/resources/mgmt/2016-02-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2016-02-01/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2016-02-01/resources/resourcesapi/interfaces.go index 181961126f10..48f15a3f4080 100644 --- a/services/resources/mgmt/2016-02-01/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2016-02-01/resources/resourcesapi/interfaces.go @@ -33,6 +33,7 @@ type DeploymentsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, err error) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) List(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) } @@ -42,6 +43,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error) List(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -56,7 +58,9 @@ type GroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters resources.ExportTemplateRequest) (result resources.GroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) ListResources(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListResourcesComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, parameters resources.Group) (result resources.Group, err error) } @@ -69,6 +73,7 @@ type ClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) } @@ -82,6 +87,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -90,6 +96,7 @@ var _ TagsClientAPI = (*resources.TagsClient)(nil) type DeploymentOperationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2016-02-01/resources/tags.go b/services/resources/mgmt/2016-02-01/resources/tags.go index 62f9d05b9e82..f2aa5a0d4064 100644 --- a/services/resources/mgmt/2016-02-01/resources/tags.go +++ b/services/resources/mgmt/2016-02-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-04-01/policy/assignments.go b/services/resources/mgmt/2016-04-01/policy/assignments.go index 069a07711aee..75c14fa47fe4 100644 --- a/services/resources/mgmt/2016-04-01/policy/assignments.go +++ b/services/resources/mgmt/2016-04-01/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } diff --git a/services/resources/mgmt/2016-04-01/policy/client.go b/services/resources/mgmt/2016-04-01/policy/client.go index 5cceebf20081..47e166e664a5 100644 --- a/services/resources/mgmt/2016-04-01/policy/client.go +++ b/services/resources/mgmt/2016-04-01/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2016-04-01/policy/definitions.go b/services/resources/mgmt/2016-04-01/policy/definitions.go index 5f3633457d46..d3a94fa8ee6d 100644 --- a/services/resources/mgmt/2016-04-01/policy/definitions.go +++ b/services/resources/mgmt/2016-04-01/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-04-01/policy/policyapi/interfaces.go b/services/resources/mgmt/2016-04-01/policy/policyapi/interfaces.go index 53e4472c8cbc..064731148f69 100644 --- a/services/resources/mgmt/2016-04-01/policy/policyapi/interfaces.go +++ b/services/resources/mgmt/2016-04-01/policy/policyapi/interfaces.go @@ -32,8 +32,11 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) @@ -44,6 +47,7 @@ type DefinitionsClientAPI interface { Delete(ctx context.Context, policyDefinitionName string) (result autorest.Response, err error) Get(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context, filter string) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) diff --git a/services/resources/mgmt/2016-06-01/subscriptions/client.go b/services/resources/mgmt/2016-06-01/subscriptions/client.go index 0195a20b36bf..2dc00503207f 100644 --- a/services/resources/mgmt/2016-06-01/subscriptions/client.go +++ b/services/resources/mgmt/2016-06-01/subscriptions/client.go @@ -42,7 +42,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/resources/mgmt/2016-06-01/subscriptions/operations.go b/services/resources/mgmt/2016-06-01/subscriptions/operations.go index b45f925763c2..dbfcd8377098 100644 --- a/services/resources/mgmt/2016-06-01/subscriptions/operations.go +++ b/services/resources/mgmt/2016-06-01/subscriptions/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2016-06-01/subscriptions/subscriptions.go b/services/resources/mgmt/2016-06-01/subscriptions/subscriptions.go index fbc791697952..96c8c5ade5ec 100644 --- a/services/resources/mgmt/2016-06-01/subscriptions/subscriptions.go +++ b/services/resources/mgmt/2016-06-01/subscriptions/subscriptions.go @@ -37,7 +37,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2016-06-01/subscriptions/subscriptionsapi/interfaces.go b/services/resources/mgmt/2016-06-01/subscriptions/subscriptionsapi/interfaces.go index 037b74c82fa4..040c6ae320fa 100644 --- a/services/resources/mgmt/2016-06-01/subscriptions/subscriptionsapi/interfaces.go +++ b/services/resources/mgmt/2016-06-01/subscriptions/subscriptionsapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result subscriptions.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*subscriptions.OperationsClient)(nil) @@ -33,6 +34,7 @@ var _ OperationsClientAPI = (*subscriptions.OperationsClient)(nil) type ClientAPI interface { Get(ctx context.Context, subscriptionID string) (result subscriptions.Subscription, err error) List(ctx context.Context) (result subscriptions.ListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.ListResultIterator, err error) ListLocations(ctx context.Context, subscriptionID string) (result subscriptions.LocationListResult, err error) } @@ -41,6 +43,7 @@ var _ ClientAPI = (*subscriptions.Client)(nil) // TenantsClientAPI contains the set of methods on the TenantsClient type. type TenantsClientAPI interface { List(ctx context.Context) (result subscriptions.TenantListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.TenantListResultIterator, err error) } var _ TenantsClientAPI = (*subscriptions.TenantsClient)(nil) diff --git a/services/resources/mgmt/2016-06-01/subscriptions/tenants.go b/services/resources/mgmt/2016-06-01/subscriptions/tenants.go index ee6a71686da3..6ef2faf74e6e 100644 --- a/services/resources/mgmt/2016-06-01/subscriptions/tenants.go +++ b/services/resources/mgmt/2016-06-01/subscriptions/tenants.go @@ -37,7 +37,8 @@ func NewTenantsClient() TenantsClient { return NewTenantsClientWithBaseURI(DefaultBaseURI) } -// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client. +// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantsClientWithBaseURI(baseURI string) TenantsClient { return TenantsClient{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2016-07-01/resources/client.go b/services/resources/mgmt/2016-07-01/resources/client.go index 8df67ad41cb8..09b54167ffa3 100644 --- a/services/resources/mgmt/2016-07-01/resources/client.go +++ b/services/resources/mgmt/2016-07-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2016-07-01/resources/deploymentoperations.go b/services/resources/mgmt/2016-07-01/resources/deploymentoperations.go index c47d1aa4f9af..ad17f5e978b4 100644 --- a/services/resources/mgmt/2016-07-01/resources/deploymentoperations.go +++ b/services/resources/mgmt/2016-07-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-07-01/resources/deployments.go b/services/resources/mgmt/2016-07-01/resources/deployments.go index 19e2307dff36..9d398235844d 100644 --- a/services/resources/mgmt/2016-07-01/resources/deployments.go +++ b/services/resources/mgmt/2016-07-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-07-01/resources/groups.go b/services/resources/mgmt/2016-07-01/resources/groups.go index 0c154f57681d..3cc807b80f79 100644 --- a/services/resources/mgmt/2016-07-01/resources/groups.go +++ b/services/resources/mgmt/2016-07-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-07-01/resources/providers.go b/services/resources/mgmt/2016-07-01/resources/providers.go index fc29fd9cdfd6..d81c5e2916e8 100644 --- a/services/resources/mgmt/2016-07-01/resources/providers.go +++ b/services/resources/mgmt/2016-07-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-07-01/resources/resources.go b/services/resources/mgmt/2016-07-01/resources/resources.go index d4a73b17d0bc..f6e61f3a1f96 100644 --- a/services/resources/mgmt/2016-07-01/resources/resources.go +++ b/services/resources/mgmt/2016-07-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2016-07-01/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2016-07-01/resources/resourcesapi/interfaces.go index db3093961425..11333b8332fd 100644 --- a/services/resources/mgmt/2016-07-01/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2016-07-01/resources/resourcesapi/interfaces.go @@ -33,6 +33,7 @@ type DeploymentsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, err error) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) List(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) } @@ -42,6 +43,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error) List(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -56,7 +58,9 @@ type GroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters resources.ExportTemplateRequest) (result resources.GroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) ListResources(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListResourcesComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, parameters resources.Group) (result resources.Group, err error) } @@ -69,6 +73,7 @@ type ClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) } @@ -82,6 +87,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -90,6 +96,7 @@ var _ TagsClientAPI = (*resources.TagsClient)(nil) type DeploymentOperationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2016-07-01/resources/tags.go b/services/resources/mgmt/2016-07-01/resources/tags.go index 1d8245e14978..dbcd220dce48 100644 --- a/services/resources/mgmt/2016-07-01/resources/tags.go +++ b/services/resources/mgmt/2016-07-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-09-01/links/client.go b/services/resources/mgmt/2016-09-01/links/client.go index 4803db85f13d..809058c9f6c2 100644 --- a/services/resources/mgmt/2016-09-01/links/client.go +++ b/services/resources/mgmt/2016-09-01/links/client.go @@ -44,7 +44,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2016-09-01/links/linksapi/interfaces.go b/services/resources/mgmt/2016-09-01/links/linksapi/interfaces.go index d4f07bbb030a..f144e7a4041d 100644 --- a/services/resources/mgmt/2016-09-01/links/linksapi/interfaces.go +++ b/services/resources/mgmt/2016-09-01/links/linksapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result links.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result links.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*links.OperationsClient)(nil) @@ -36,7 +37,9 @@ type ResourceLinksClientAPI interface { Delete(ctx context.Context, linkID string) (result autorest.Response, err error) Get(ctx context.Context, linkID string) (result links.ResourceLink, err error) ListAtSourceScope(ctx context.Context, scope string, filter links.Filter) (result links.ResourceLinkResultPage, err error) + ListAtSourceScopeComplete(ctx context.Context, scope string, filter links.Filter) (result links.ResourceLinkResultIterator, err error) ListAtSubscription(ctx context.Context, filter string) (result links.ResourceLinkResultPage, err error) + ListAtSubscriptionComplete(ctx context.Context, filter string) (result links.ResourceLinkResultIterator, err error) } var _ ResourceLinksClientAPI = (*links.ResourceLinksClient)(nil) diff --git a/services/resources/mgmt/2016-09-01/links/operations.go b/services/resources/mgmt/2016-09-01/links/operations.go index d97a255c12a9..2f8d9c076cf6 100644 --- a/services/resources/mgmt/2016-09-01/links/operations.go +++ b/services/resources/mgmt/2016-09-01/links/operations.go @@ -38,7 +38,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/resources/mgmt/2016-09-01/links/resourcelinks.go b/services/resources/mgmt/2016-09-01/links/resourcelinks.go index 5fb15b267118..071d2272e9ea 100644 --- a/services/resources/mgmt/2016-09-01/links/resourcelinks.go +++ b/services/resources/mgmt/2016-09-01/links/resourcelinks.go @@ -39,7 +39,8 @@ func NewResourceLinksClient(subscriptionID string) ResourceLinksClient { return NewResourceLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceLinksClientWithBaseURI creates an instance of the ResourceLinksClient client. +// NewResourceLinksClientWithBaseURI creates an instance of the ResourceLinksClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourceLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceLinksClient { return ResourceLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-09-01/locks/authorizationoperations.go b/services/resources/mgmt/2016-09-01/locks/authorizationoperations.go index 44bfbf813a87..5530eb1c7773 100644 --- a/services/resources/mgmt/2016-09-01/locks/authorizationoperations.go +++ b/services/resources/mgmt/2016-09-01/locks/authorizationoperations.go @@ -36,7 +36,9 @@ func NewAuthorizationOperationsClient(subscriptionID string) AuthorizationOperat return NewAuthorizationOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationOperationsClientWithBaseURI creates an instance of the AuthorizationOperationsClient client. +// NewAuthorizationOperationsClientWithBaseURI creates an instance of the AuthorizationOperationsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewAuthorizationOperationsClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationOperationsClient { return AuthorizationOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-09-01/locks/client.go b/services/resources/mgmt/2016-09-01/locks/client.go index 823e99227488..cd3e815da8c0 100644 --- a/services/resources/mgmt/2016-09-01/locks/client.go +++ b/services/resources/mgmt/2016-09-01/locks/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2016-09-01/locks/locksapi/interfaces.go b/services/resources/mgmt/2016-09-01/locks/locksapi/interfaces.go index 15d815a1e3c8..9df9ca89de49 100644 --- a/services/resources/mgmt/2016-09-01/locks/locksapi/interfaces.go +++ b/services/resources/mgmt/2016-09-01/locks/locksapi/interfaces.go @@ -26,6 +26,7 @@ import ( // AuthorizationOperationsClientAPI contains the set of methods on the AuthorizationOperationsClient type. type AuthorizationOperationsClientAPI interface { List(ctx context.Context) (result locks.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result locks.OperationListResultIterator, err error) } var _ AuthorizationOperationsClientAPI = (*locks.AuthorizationOperationsClient)(nil) @@ -45,9 +46,13 @@ type ManagementLocksClientAPI interface { GetAtSubscriptionLevel(ctx context.Context, lockName string) (result locks.ManagementLockObject, err error) GetByScope(ctx context.Context, scope string, lockName string) (result locks.ManagementLockObject, err error) ListAtResourceGroupLevel(ctx context.Context, resourceGroupName string, filter string) (result locks.ManagementLockListResultPage, err error) + ListAtResourceGroupLevelComplete(ctx context.Context, resourceGroupName string, filter string) (result locks.ManagementLockListResultIterator, err error) ListAtResourceLevel(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result locks.ManagementLockListResultPage, err error) + ListAtResourceLevelComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result locks.ManagementLockListResultIterator, err error) ListAtSubscriptionLevel(ctx context.Context, filter string) (result locks.ManagementLockListResultPage, err error) + ListAtSubscriptionLevelComplete(ctx context.Context, filter string) (result locks.ManagementLockListResultIterator, err error) ListByScope(ctx context.Context, scope string, filter string) (result locks.ManagementLockListResultPage, err error) + ListByScopeComplete(ctx context.Context, scope string, filter string) (result locks.ManagementLockListResultIterator, err error) } var _ ManagementLocksClientAPI = (*locks.ManagementLocksClient)(nil) diff --git a/services/resources/mgmt/2016-09-01/locks/managementlocks.go b/services/resources/mgmt/2016-09-01/locks/managementlocks.go index 0d36a4221903..3057f96f715f 100644 --- a/services/resources/mgmt/2016-09-01/locks/managementlocks.go +++ b/services/resources/mgmt/2016-09-01/locks/managementlocks.go @@ -37,7 +37,8 @@ func NewManagementLocksClient(subscriptionID string) ManagementLocksClient { return NewManagementLocksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagementLocksClientWithBaseURI creates an instance of the ManagementLocksClient client. +// NewManagementLocksClientWithBaseURI creates an instance of the ManagementLocksClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagementLocksClientWithBaseURI(baseURI string, subscriptionID string) ManagementLocksClient { return ManagementLocksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-09-01/resources/client.go b/services/resources/mgmt/2016-09-01/resources/client.go index fa1e5cb99e7d..22fdb3b43027 100644 --- a/services/resources/mgmt/2016-09-01/resources/client.go +++ b/services/resources/mgmt/2016-09-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2016-09-01/resources/deploymentoperations.go b/services/resources/mgmt/2016-09-01/resources/deploymentoperations.go index 65d24460a346..4d8e5770bbe3 100644 --- a/services/resources/mgmt/2016-09-01/resources/deploymentoperations.go +++ b/services/resources/mgmt/2016-09-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-09-01/resources/deployments.go b/services/resources/mgmt/2016-09-01/resources/deployments.go index 420f4e1c80a2..2bea4ac6fa48 100644 --- a/services/resources/mgmt/2016-09-01/resources/deployments.go +++ b/services/resources/mgmt/2016-09-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-09-01/resources/groups.go b/services/resources/mgmt/2016-09-01/resources/groups.go index dd3d1dfe8fa0..235d1ae386e5 100644 --- a/services/resources/mgmt/2016-09-01/resources/groups.go +++ b/services/resources/mgmt/2016-09-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-09-01/resources/providers.go b/services/resources/mgmt/2016-09-01/resources/providers.go index c0a52f3c50f7..f2a085202a7d 100644 --- a/services/resources/mgmt/2016-09-01/resources/providers.go +++ b/services/resources/mgmt/2016-09-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-09-01/resources/resources.go b/services/resources/mgmt/2016-09-01/resources/resources.go index 4835d4398d6c..822e1a1c9655 100644 --- a/services/resources/mgmt/2016-09-01/resources/resources.go +++ b/services/resources/mgmt/2016-09-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2016-09-01/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2016-09-01/resources/resourcesapi/interfaces.go index 630ea31d329a..16f42c61ec83 100644 --- a/services/resources/mgmt/2016-09-01/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2016-09-01/resources/resourcesapi/interfaces.go @@ -33,6 +33,7 @@ type DeploymentsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, err error) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) List(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) } @@ -42,6 +43,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error) List(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -56,7 +58,9 @@ type GroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters resources.ExportTemplateRequest) (result resources.GroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) ListResources(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListResourcesComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, parameters resources.Group) (result resources.Group, err error) } @@ -73,6 +77,7 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) GetByID(ctx context.Context, resourceID string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateByIDFuture, err error) @@ -87,6 +92,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -95,6 +101,7 @@ var _ TagsClientAPI = (*resources.TagsClient)(nil) type DeploymentOperationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2016-09-01/resources/tags.go b/services/resources/mgmt/2016-09-01/resources/tags.go index 60566f4f49c0..107e23a70929 100644 --- a/services/resources/mgmt/2016-09-01/resources/tags.go +++ b/services/resources/mgmt/2016-09-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-12-01/policy/assignments.go b/services/resources/mgmt/2016-12-01/policy/assignments.go index c38eb9d5bbd7..e3d72e935335 100644 --- a/services/resources/mgmt/2016-12-01/policy/assignments.go +++ b/services/resources/mgmt/2016-12-01/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } diff --git a/services/resources/mgmt/2016-12-01/policy/client.go b/services/resources/mgmt/2016-12-01/policy/client.go index a89e1b63eead..7acd4944d881 100644 --- a/services/resources/mgmt/2016-12-01/policy/client.go +++ b/services/resources/mgmt/2016-12-01/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2016-12-01/policy/definitions.go b/services/resources/mgmt/2016-12-01/policy/definitions.go index 3a0f4bca7db9..f3698cc7a01d 100644 --- a/services/resources/mgmt/2016-12-01/policy/definitions.go +++ b/services/resources/mgmt/2016-12-01/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2016-12-01/policy/policyapi/interfaces.go b/services/resources/mgmt/2016-12-01/policy/policyapi/interfaces.go index e7b9e41361ce..db76b4485af8 100644 --- a/services/resources/mgmt/2016-12-01/policy/policyapi/interfaces.go +++ b/services/resources/mgmt/2016-12-01/policy/policyapi/interfaces.go @@ -33,8 +33,11 @@ type DefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result policy.Definition, err error) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) @@ -48,8 +51,11 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) diff --git a/services/resources/mgmt/2017-05-10/resources/client.go b/services/resources/mgmt/2017-05-10/resources/client.go index 0f1914aa28e0..c3f35599a776 100644 --- a/services/resources/mgmt/2017-05-10/resources/client.go +++ b/services/resources/mgmt/2017-05-10/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go b/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go index b9d508d50152..954fcd499626 100644 --- a/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go +++ b/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2017-05-10/resources/deployments.go b/services/resources/mgmt/2017-05-10/resources/deployments.go index d37d3a30a93e..af1728bf7594 100644 --- a/services/resources/mgmt/2017-05-10/resources/deployments.go +++ b/services/resources/mgmt/2017-05-10/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2017-05-10/resources/groups.go b/services/resources/mgmt/2017-05-10/resources/groups.go index 38cd1bb8fe2f..7f1b2ef04eb2 100644 --- a/services/resources/mgmt/2017-05-10/resources/groups.go +++ b/services/resources/mgmt/2017-05-10/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2017-05-10/resources/providers.go b/services/resources/mgmt/2017-05-10/resources/providers.go index 948e02f3efb8..e9d1990ff746 100644 --- a/services/resources/mgmt/2017-05-10/resources/providers.go +++ b/services/resources/mgmt/2017-05-10/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2017-05-10/resources/resources.go b/services/resources/mgmt/2017-05-10/resources/resources.go index 454f330b859f..8f0f14418ecf 100644 --- a/services/resources/mgmt/2017-05-10/resources/resources.go +++ b/services/resources/mgmt/2017-05-10/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2017-05-10/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2017-05-10/resources/resourcesapi/interfaces.go index 8073c3ef3b48..b251c10880d4 100644 --- a/services/resources/mgmt/2017-05-10/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2017-05-10/resources/resourcesapi/interfaces.go @@ -33,6 +33,7 @@ type DeploymentsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, err error) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) } @@ -42,6 +43,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error) List(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -59,7 +61,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) GetByID(ctx context.Context, resourceID string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateByIDFuture, err error) @@ -76,6 +80,7 @@ type GroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters resources.ExportTemplateRequest) (result resources.GroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, parameters resources.GroupPatchable) (result resources.Group, err error) } @@ -88,6 +93,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -96,6 +102,7 @@ var _ TagsClientAPI = (*resources.TagsClient)(nil) type DeploymentOperationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2017-05-10/resources/tags.go b/services/resources/mgmt/2017-05-10/resources/tags.go index 3f7435970735..7255a394c6b4 100644 --- a/services/resources/mgmt/2017-05-10/resources/tags.go +++ b/services/resources/mgmt/2017-05-10/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2017-09-01/managedapplications/applicationdefinitions.go b/services/resources/mgmt/2017-09-01/managedapplications/applicationdefinitions.go index bf877620fe0a..5d3fdeedecdc 100644 --- a/services/resources/mgmt/2017-09-01/managedapplications/applicationdefinitions.go +++ b/services/resources/mgmt/2017-09-01/managedapplications/applicationdefinitions.go @@ -36,7 +36,9 @@ func NewApplicationDefinitionsClient(subscriptionID string) ApplicationDefinitio return NewApplicationDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationDefinitionsClientWithBaseURI creates an instance of the ApplicationDefinitionsClient client. +// NewApplicationDefinitionsClientWithBaseURI creates an instance of the ApplicationDefinitionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewApplicationDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationDefinitionsClient { return ApplicationDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2017-09-01/managedapplications/applications.go b/services/resources/mgmt/2017-09-01/managedapplications/applications.go index 0c7d976e1aed..c3a9f15dd0e5 100644 --- a/services/resources/mgmt/2017-09-01/managedapplications/applications.go +++ b/services/resources/mgmt/2017-09-01/managedapplications/applications.go @@ -36,7 +36,8 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2017-09-01/managedapplications/client.go b/services/resources/mgmt/2017-09-01/managedapplications/client.go index 2c91724e3447..6ac92d9ed914 100644 --- a/services/resources/mgmt/2017-09-01/managedapplications/client.go +++ b/services/resources/mgmt/2017-09-01/managedapplications/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2017-09-01/managedapplications/managedapplicationsapi/interfaces.go b/services/resources/mgmt/2017-09-01/managedapplications/managedapplicationsapi/interfaces.go index 5db0608972bd..c8788cc5c1ab 100644 --- a/services/resources/mgmt/2017-09-01/managedapplications/managedapplicationsapi/interfaces.go +++ b/services/resources/mgmt/2017-09-01/managedapplications/managedapplicationsapi/interfaces.go @@ -31,7 +31,9 @@ type ApplicationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationName string) (result managedapplications.Application, err error) GetByID(ctx context.Context, applicationID string) (result managedapplications.Application, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationListResultIterator, err error) ListBySubscription(ctx context.Context) (result managedapplications.ApplicationListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result managedapplications.ApplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *managedapplications.Application) (result managedapplications.Application, err error) UpdateByID(ctx context.Context, applicationID string, parameters *managedapplications.Application) (result managedapplications.Application, err error) } @@ -47,6 +49,7 @@ type ApplicationDefinitionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinition, err error) GetByID(ctx context.Context, applicationDefinitionID string) (result managedapplications.ApplicationDefinition, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultIterator, err error) } var _ ApplicationDefinitionsClientAPI = (*managedapplications.ApplicationDefinitionsClient)(nil) diff --git a/services/resources/mgmt/2018-02-01/resources/client.go b/services/resources/mgmt/2018-02-01/resources/client.go index 05184f90b3bb..eb89abbc2c73 100644 --- a/services/resources/mgmt/2018-02-01/resources/client.go +++ b/services/resources/mgmt/2018-02-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2018-02-01/resources/deploymentoperations.go b/services/resources/mgmt/2018-02-01/resources/deploymentoperations.go index b15e373d7629..c25564b70c21 100644 --- a/services/resources/mgmt/2018-02-01/resources/deploymentoperations.go +++ b/services/resources/mgmt/2018-02-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-02-01/resources/deployments.go b/services/resources/mgmt/2018-02-01/resources/deployments.go index bd475c488953..ceb8c434b760 100644 --- a/services/resources/mgmt/2018-02-01/resources/deployments.go +++ b/services/resources/mgmt/2018-02-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-02-01/resources/groups.go b/services/resources/mgmt/2018-02-01/resources/groups.go index 2b8989ab8454..7352e156a5b1 100644 --- a/services/resources/mgmt/2018-02-01/resources/groups.go +++ b/services/resources/mgmt/2018-02-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-02-01/resources/providers.go b/services/resources/mgmt/2018-02-01/resources/providers.go index 8fb05d800dfc..1be7ffe7f471 100644 --- a/services/resources/mgmt/2018-02-01/resources/providers.go +++ b/services/resources/mgmt/2018-02-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-02-01/resources/resources.go b/services/resources/mgmt/2018-02-01/resources/resources.go index 29a107dbe944..a5b6055f3a79 100644 --- a/services/resources/mgmt/2018-02-01/resources/resources.go +++ b/services/resources/mgmt/2018-02-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2018-02-01/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2018-02-01/resources/resourcesapi/interfaces.go index 9a2edeb4fb68..95f26646bfdd 100644 --- a/services/resources/mgmt/2018-02-01/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2018-02-01/resources/resourcesapi/interfaces.go @@ -33,6 +33,7 @@ type DeploymentsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, err error) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) } @@ -42,6 +43,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error) List(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -59,7 +61,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) GetByID(ctx context.Context, resourceID string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateByIDFuture, err error) @@ -76,6 +80,7 @@ type GroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters resources.ExportTemplateRequest) (result resources.GroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, parameters resources.GroupPatchable) (result resources.Group, err error) } @@ -88,6 +93,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -96,6 +102,7 @@ var _ TagsClientAPI = (*resources.TagsClient)(nil) type DeploymentOperationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2018-02-01/resources/tags.go b/services/resources/mgmt/2018-02-01/resources/tags.go index af41758ba329..ce162eaf4f58 100644 --- a/services/resources/mgmt/2018-02-01/resources/tags.go +++ b/services/resources/mgmt/2018-02-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-03-01/policy/assignments.go b/services/resources/mgmt/2018-03-01/policy/assignments.go index 900671f8a382..894ce9e49714 100644 --- a/services/resources/mgmt/2018-03-01/policy/assignments.go +++ b/services/resources/mgmt/2018-03-01/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } diff --git a/services/resources/mgmt/2018-03-01/policy/client.go b/services/resources/mgmt/2018-03-01/policy/client.go index cd094536296c..a16a134f79fe 100644 --- a/services/resources/mgmt/2018-03-01/policy/client.go +++ b/services/resources/mgmt/2018-03-01/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2018-03-01/policy/definitions.go b/services/resources/mgmt/2018-03-01/policy/definitions.go index 69b0697edd9c..615dc0b6c93b 100644 --- a/services/resources/mgmt/2018-03-01/policy/definitions.go +++ b/services/resources/mgmt/2018-03-01/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-03-01/policy/policyapi/interfaces.go b/services/resources/mgmt/2018-03-01/policy/policyapi/interfaces.go index 6f4c925bc97d..3bbab4cbc594 100644 --- a/services/resources/mgmt/2018-03-01/policy/policyapi/interfaces.go +++ b/services/resources/mgmt/2018-03-01/policy/policyapi/interfaces.go @@ -32,8 +32,11 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) @@ -48,8 +51,11 @@ type DefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result policy.Definition, err error) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) @@ -64,8 +70,11 @@ type SetDefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result policy.SetDefinition, err error) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result policy.SetDefinition, err error) List(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultIterator, err error) } var _ SetDefinitionsClientAPI = (*policy.SetDefinitionsClient)(nil) diff --git a/services/resources/mgmt/2018-03-01/policy/setdefinitions.go b/services/resources/mgmt/2018-03-01/policy/setdefinitions.go index 2ddee39f7520..f67b8aafc41a 100644 --- a/services/resources/mgmt/2018-03-01/policy/setdefinitions.go +++ b/services/resources/mgmt/2018-03-01/policy/setdefinitions.go @@ -37,7 +37,8 @@ func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient { return NewSetDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client. +// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient { return SetDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-05-01/policy/assignments.go b/services/resources/mgmt/2018-05-01/policy/assignments.go index 9832814df636..bbd2795bb7e5 100644 --- a/services/resources/mgmt/2018-05-01/policy/assignments.go +++ b/services/resources/mgmt/2018-05-01/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } diff --git a/services/resources/mgmt/2018-05-01/policy/client.go b/services/resources/mgmt/2018-05-01/policy/client.go index d00e90671405..4719a640da54 100644 --- a/services/resources/mgmt/2018-05-01/policy/client.go +++ b/services/resources/mgmt/2018-05-01/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2018-05-01/policy/definitions.go b/services/resources/mgmt/2018-05-01/policy/definitions.go index 75fe8f3cec1a..e5b8c98fcb4c 100644 --- a/services/resources/mgmt/2018-05-01/policy/definitions.go +++ b/services/resources/mgmt/2018-05-01/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-05-01/policy/policyapi/interfaces.go b/services/resources/mgmt/2018-05-01/policy/policyapi/interfaces.go index 80c579bd8146..75a9e28f873f 100644 --- a/services/resources/mgmt/2018-05-01/policy/policyapi/interfaces.go +++ b/services/resources/mgmt/2018-05-01/policy/policyapi/interfaces.go @@ -32,8 +32,11 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) @@ -48,8 +51,11 @@ type DefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result policy.Definition, err error) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) @@ -64,8 +70,11 @@ type SetDefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result policy.SetDefinition, err error) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result policy.SetDefinition, err error) List(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultIterator, err error) } var _ SetDefinitionsClientAPI = (*policy.SetDefinitionsClient)(nil) diff --git a/services/resources/mgmt/2018-05-01/policy/setdefinitions.go b/services/resources/mgmt/2018-05-01/policy/setdefinitions.go index d8685122beb9..af306d1e5230 100644 --- a/services/resources/mgmt/2018-05-01/policy/setdefinitions.go +++ b/services/resources/mgmt/2018-05-01/policy/setdefinitions.go @@ -37,7 +37,8 @@ func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient { return NewSetDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client. +// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient { return SetDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-05-01/resources/client.go b/services/resources/mgmt/2018-05-01/resources/client.go index db48ee8e8a7b..813a11e5d79d 100644 --- a/services/resources/mgmt/2018-05-01/resources/client.go +++ b/services/resources/mgmt/2018-05-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go b/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go index 68281b2dd69b..3b0806553017 100644 --- a/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go +++ b/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-05-01/resources/deployments.go b/services/resources/mgmt/2018-05-01/resources/deployments.go index 24aca4044097..e7b927bcb6d3 100644 --- a/services/resources/mgmt/2018-05-01/resources/deployments.go +++ b/services/resources/mgmt/2018-05-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-05-01/resources/groups.go b/services/resources/mgmt/2018-05-01/resources/groups.go index 4e2fd36fc088..4b6b7ee257db 100644 --- a/services/resources/mgmt/2018-05-01/resources/groups.go +++ b/services/resources/mgmt/2018-05-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-05-01/resources/operations.go b/services/resources/mgmt/2018-05-01/resources/operations.go index 86be2815ff01..06cb552b710e 100644 --- a/services/resources/mgmt/2018-05-01/resources/operations.go +++ b/services/resources/mgmt/2018-05-01/resources/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/resources/mgmt/2018-05-01/resources/providers.go b/services/resources/mgmt/2018-05-01/resources/providers.go index 60938122a1ef..e62a605df06c 100644 --- a/services/resources/mgmt/2018-05-01/resources/providers.go +++ b/services/resources/mgmt/2018-05-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-05-01/resources/resources.go b/services/resources/mgmt/2018-05-01/resources/resources.go index b98d8902b4d6..c9184b66a536 100644 --- a/services/resources/mgmt/2018-05-01/resources/resources.go +++ b/services/resources/mgmt/2018-05-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2018-05-01/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2018-05-01/resources/resourcesapi/interfaces.go index 79b4edeb5de0..a78a74b0a8d5 100644 --- a/services/resources/mgmt/2018-05-01/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2018-05-01/resources/resourcesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result resources.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result resources.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*resources.OperationsClient)(nil) @@ -46,7 +47,9 @@ type DeploymentsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) GetAtSubscriptionScope(ctx context.Context, deploymentName string) (result resources.DeploymentExtended, err error) ListAtSubscriptionScope(ctx context.Context, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListAtSubscriptionScopeComplete(ctx context.Context, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) ValidateAtSubscriptionScope(ctx context.Context, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) } @@ -57,6 +60,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error) List(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -74,7 +78,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) GetByID(ctx context.Context, resourceID string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateByIDFuture, err error) @@ -91,6 +97,7 @@ type GroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters resources.ExportTemplateRequest) (result resources.GroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, parameters resources.GroupPatchable) (result resources.Group, err error) } @@ -103,6 +110,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -112,7 +120,9 @@ type DeploymentOperationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) GetAtSubscriptionScope(ctx context.Context, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) ListAtSubscriptionScope(ctx context.Context, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListAtSubscriptionScopeComplete(ctx context.Context, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2018-05-01/resources/tags.go b/services/resources/mgmt/2018-05-01/resources/tags.go index 826ac2597b3f..eb12f84e6af4 100644 --- a/services/resources/mgmt/2018-05-01/resources/tags.go +++ b/services/resources/mgmt/2018-05-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-06-01/managedapplications/applicationdefinitions.go b/services/resources/mgmt/2018-06-01/managedapplications/applicationdefinitions.go index f93c69af4070..6cb99d4d023a 100644 --- a/services/resources/mgmt/2018-06-01/managedapplications/applicationdefinitions.go +++ b/services/resources/mgmt/2018-06-01/managedapplications/applicationdefinitions.go @@ -36,7 +36,9 @@ func NewApplicationDefinitionsClient(subscriptionID string) ApplicationDefinitio return NewApplicationDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationDefinitionsClientWithBaseURI creates an instance of the ApplicationDefinitionsClient client. +// NewApplicationDefinitionsClientWithBaseURI creates an instance of the ApplicationDefinitionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewApplicationDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationDefinitionsClient { return ApplicationDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-06-01/managedapplications/applications.go b/services/resources/mgmt/2018-06-01/managedapplications/applications.go index 52992d32ca33..adf1d27ce196 100644 --- a/services/resources/mgmt/2018-06-01/managedapplications/applications.go +++ b/services/resources/mgmt/2018-06-01/managedapplications/applications.go @@ -36,7 +36,8 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2018-06-01/managedapplications/client.go b/services/resources/mgmt/2018-06-01/managedapplications/client.go index 5ba72777784b..db11dac27ac0 100644 --- a/services/resources/mgmt/2018-06-01/managedapplications/client.go +++ b/services/resources/mgmt/2018-06-01/managedapplications/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2018-06-01/managedapplications/managedapplicationsapi/interfaces.go b/services/resources/mgmt/2018-06-01/managedapplications/managedapplicationsapi/interfaces.go index d0894616f699..536950f80404 100644 --- a/services/resources/mgmt/2018-06-01/managedapplications/managedapplicationsapi/interfaces.go +++ b/services/resources/mgmt/2018-06-01/managedapplications/managedapplicationsapi/interfaces.go @@ -31,7 +31,9 @@ type ApplicationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationName string) (result managedapplications.Application, err error) GetByID(ctx context.Context, applicationID string) (result managedapplications.Application, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationListResultIterator, err error) ListBySubscription(ctx context.Context) (result managedapplications.ApplicationListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result managedapplications.ApplicationListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *managedapplications.Application) (result managedapplications.Application, err error) UpdateByID(ctx context.Context, applicationID string, parameters *managedapplications.Application) (result managedapplications.Application, err error) } @@ -47,6 +49,7 @@ type ApplicationDefinitionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinition, err error) GetByID(ctx context.Context, applicationDefinitionID string) (result managedapplications.ApplicationDefinition, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultIterator, err error) } var _ ApplicationDefinitionsClientAPI = (*managedapplications.ApplicationDefinitionsClient)(nil) diff --git a/services/resources/mgmt/2018-06-01/subscriptions/client.go b/services/resources/mgmt/2018-06-01/subscriptions/client.go index 3bf047ef1284..799aa258add8 100644 --- a/services/resources/mgmt/2018-06-01/subscriptions/client.go +++ b/services/resources/mgmt/2018-06-01/subscriptions/client.go @@ -42,7 +42,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/resources/mgmt/2018-06-01/subscriptions/operations.go b/services/resources/mgmt/2018-06-01/subscriptions/operations.go index f3443ff3e47e..a4284db9dd17 100644 --- a/services/resources/mgmt/2018-06-01/subscriptions/operations.go +++ b/services/resources/mgmt/2018-06-01/subscriptions/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2018-06-01/subscriptions/subscriptions.go b/services/resources/mgmt/2018-06-01/subscriptions/subscriptions.go index f6c2fdf51b3f..be30831d7054 100644 --- a/services/resources/mgmt/2018-06-01/subscriptions/subscriptions.go +++ b/services/resources/mgmt/2018-06-01/subscriptions/subscriptions.go @@ -37,7 +37,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2018-06-01/subscriptions/subscriptionsapi/interfaces.go b/services/resources/mgmt/2018-06-01/subscriptions/subscriptionsapi/interfaces.go index 67a1e6c65d40..59bbbf46c06f 100644 --- a/services/resources/mgmt/2018-06-01/subscriptions/subscriptionsapi/interfaces.go +++ b/services/resources/mgmt/2018-06-01/subscriptions/subscriptionsapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result subscriptions.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*subscriptions.OperationsClient)(nil) @@ -33,6 +34,7 @@ var _ OperationsClientAPI = (*subscriptions.OperationsClient)(nil) type ClientAPI interface { Get(ctx context.Context, subscriptionID string) (result subscriptions.Subscription, err error) List(ctx context.Context) (result subscriptions.ListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.ListResultIterator, err error) ListLocations(ctx context.Context, subscriptionID string) (result subscriptions.LocationListResult, err error) } @@ -41,6 +43,7 @@ var _ ClientAPI = (*subscriptions.Client)(nil) // TenantsClientAPI contains the set of methods on the TenantsClient type. type TenantsClientAPI interface { List(ctx context.Context) (result subscriptions.TenantListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.TenantListResultIterator, err error) } var _ TenantsClientAPI = (*subscriptions.TenantsClient)(nil) diff --git a/services/resources/mgmt/2018-06-01/subscriptions/tenants.go b/services/resources/mgmt/2018-06-01/subscriptions/tenants.go index 4874da6b4bc5..274b72ff07eb 100644 --- a/services/resources/mgmt/2018-06-01/subscriptions/tenants.go +++ b/services/resources/mgmt/2018-06-01/subscriptions/tenants.go @@ -37,7 +37,8 @@ func NewTenantsClient() TenantsClient { return NewTenantsClientWithBaseURI(DefaultBaseURI) } -// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client. +// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantsClientWithBaseURI(baseURI string) TenantsClient { return TenantsClient{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2019-01-01/policy/assignments.go b/services/resources/mgmt/2019-01-01/policy/assignments.go index 8eb8a19d926a..3787aa8f9d4c 100644 --- a/services/resources/mgmt/2019-01-01/policy/assignments.go +++ b/services/resources/mgmt/2019-01-01/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } diff --git a/services/resources/mgmt/2019-01-01/policy/client.go b/services/resources/mgmt/2019-01-01/policy/client.go index 30ed692391f5..439be67e28ad 100644 --- a/services/resources/mgmt/2019-01-01/policy/client.go +++ b/services/resources/mgmt/2019-01-01/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2019-01-01/policy/definitions.go b/services/resources/mgmt/2019-01-01/policy/definitions.go index ec186dbffa89..287b2c2eb5ca 100644 --- a/services/resources/mgmt/2019-01-01/policy/definitions.go +++ b/services/resources/mgmt/2019-01-01/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-01-01/policy/policyapi/interfaces.go b/services/resources/mgmt/2019-01-01/policy/policyapi/interfaces.go index 95ed3a4c6259..842a40d2dee1 100644 --- a/services/resources/mgmt/2019-01-01/policy/policyapi/interfaces.go +++ b/services/resources/mgmt/2019-01-01/policy/policyapi/interfaces.go @@ -32,8 +32,11 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) @@ -48,8 +51,11 @@ type DefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result policy.Definition, err error) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) @@ -64,8 +70,11 @@ type SetDefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result policy.SetDefinition, err error) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result policy.SetDefinition, err error) List(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultIterator, err error) } var _ SetDefinitionsClientAPI = (*policy.SetDefinitionsClient)(nil) diff --git a/services/resources/mgmt/2019-01-01/policy/setdefinitions.go b/services/resources/mgmt/2019-01-01/policy/setdefinitions.go index 9f2d33ec014e..74ab9663087b 100644 --- a/services/resources/mgmt/2019-01-01/policy/setdefinitions.go +++ b/services/resources/mgmt/2019-01-01/policy/setdefinitions.go @@ -37,7 +37,8 @@ func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient { return NewSetDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client. +// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient { return SetDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-03-01/resources/client.go b/services/resources/mgmt/2019-03-01/resources/client.go index 2b25d2191e99..39f90ff09703 100644 --- a/services/resources/mgmt/2019-03-01/resources/client.go +++ b/services/resources/mgmt/2019-03-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go b/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go index 7b0413e9395c..2e25eebfb80e 100644 --- a/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go +++ b/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-03-01/resources/deployments.go b/services/resources/mgmt/2019-03-01/resources/deployments.go index b65dff16bbd3..7648dd6964d4 100644 --- a/services/resources/mgmt/2019-03-01/resources/deployments.go +++ b/services/resources/mgmt/2019-03-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-03-01/resources/groups.go b/services/resources/mgmt/2019-03-01/resources/groups.go index a74460950c04..f4dc2956e548 100644 --- a/services/resources/mgmt/2019-03-01/resources/groups.go +++ b/services/resources/mgmt/2019-03-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-03-01/resources/operations.go b/services/resources/mgmt/2019-03-01/resources/operations.go index b5a4f9cddbbd..67bb2b420f1b 100644 --- a/services/resources/mgmt/2019-03-01/resources/operations.go +++ b/services/resources/mgmt/2019-03-01/resources/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/resources/mgmt/2019-03-01/resources/providers.go b/services/resources/mgmt/2019-03-01/resources/providers.go index e9fff221c879..8de220ba4aa7 100644 --- a/services/resources/mgmt/2019-03-01/resources/providers.go +++ b/services/resources/mgmt/2019-03-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-03-01/resources/resources.go b/services/resources/mgmt/2019-03-01/resources/resources.go index 20fab7fe9260..39c086e3fa83 100644 --- a/services/resources/mgmt/2019-03-01/resources/resources.go +++ b/services/resources/mgmt/2019-03-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2019-03-01/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2019-03-01/resources/resourcesapi/interfaces.go index 5231e6751d1a..0c4eb34f34a6 100644 --- a/services/resources/mgmt/2019-03-01/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2019-03-01/resources/resourcesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result resources.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result resources.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*resources.OperationsClient)(nil) @@ -46,7 +47,9 @@ type DeploymentsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) GetAtSubscriptionScope(ctx context.Context, deploymentName string) (result resources.DeploymentExtended, err error) ListAtSubscriptionScope(ctx context.Context, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListAtSubscriptionScopeComplete(ctx context.Context, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) ValidateAtSubscriptionScope(ctx context.Context, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) } @@ -57,6 +60,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error) List(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -74,7 +78,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) GetByID(ctx context.Context, resourceID string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateByIDFuture, err error) @@ -91,6 +97,7 @@ type GroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters resources.ExportTemplateRequest) (result resources.GroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, parameters resources.GroupPatchable) (result resources.Group, err error) } @@ -103,6 +110,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -112,7 +120,9 @@ type DeploymentOperationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) GetAtSubscriptionScope(ctx context.Context, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) ListAtSubscriptionScope(ctx context.Context, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListAtSubscriptionScopeComplete(ctx context.Context, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2019-03-01/resources/tags.go b/services/resources/mgmt/2019-03-01/resources/tags.go index bb2b96320aed..f8e1138e3932 100644 --- a/services/resources/mgmt/2019-03-01/resources/tags.go +++ b/services/resources/mgmt/2019-03-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-05-01/resources/client.go b/services/resources/mgmt/2019-05-01/resources/client.go index c6dfd6ee6654..ab582ee03692 100644 --- a/services/resources/mgmt/2019-05-01/resources/client.go +++ b/services/resources/mgmt/2019-05-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go b/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go index 0e21a0971e90..94f3c1de4b8c 100644 --- a/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go +++ b/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-05-01/resources/deployments.go b/services/resources/mgmt/2019-05-01/resources/deployments.go index 5046f3d6d829..0137bbacaf5c 100644 --- a/services/resources/mgmt/2019-05-01/resources/deployments.go +++ b/services/resources/mgmt/2019-05-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-05-01/resources/groups.go b/services/resources/mgmt/2019-05-01/resources/groups.go index 1ab3b4c26852..261ded458da8 100644 --- a/services/resources/mgmt/2019-05-01/resources/groups.go +++ b/services/resources/mgmt/2019-05-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-05-01/resources/operations.go b/services/resources/mgmt/2019-05-01/resources/operations.go index 106f060776ff..36fd2b95f271 100644 --- a/services/resources/mgmt/2019-05-01/resources/operations.go +++ b/services/resources/mgmt/2019-05-01/resources/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/resources/mgmt/2019-05-01/resources/providers.go b/services/resources/mgmt/2019-05-01/resources/providers.go index a66c6a1209ca..b5c835c8f07b 100644 --- a/services/resources/mgmt/2019-05-01/resources/providers.go +++ b/services/resources/mgmt/2019-05-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-05-01/resources/resources.go b/services/resources/mgmt/2019-05-01/resources/resources.go index ad1e1dda2a55..a287bbf02dc9 100644 --- a/services/resources/mgmt/2019-05-01/resources/resources.go +++ b/services/resources/mgmt/2019-05-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/resources/mgmt/2019-05-01/resources/resourcesapi/interfaces.go b/services/resources/mgmt/2019-05-01/resources/resourcesapi/interfaces.go index b38cca08d14f..7eafa95b8db7 100644 --- a/services/resources/mgmt/2019-05-01/resources/resourcesapi/interfaces.go +++ b/services/resources/mgmt/2019-05-01/resources/resourcesapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result resources.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result resources.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*resources.OperationsClient)(nil) @@ -52,8 +53,11 @@ type DeploymentsClientAPI interface { GetAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string) (result resources.DeploymentExtended, err error) GetAtSubscriptionScope(ctx context.Context, deploymentName string) (result resources.DeploymentExtended, err error) ListAtManagementGroupScope(ctx context.Context, groupID string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListAtManagementGroupScopeComplete(ctx context.Context, groupID string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) ListAtSubscriptionScope(ctx context.Context, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListAtSubscriptionScopeComplete(ctx context.Context, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result resources.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) ValidateAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) ValidateAtSubscriptionScope(ctx context.Context, deploymentName string, parameters resources.Deployment) (result resources.DeploymentValidateResult, err error) @@ -65,6 +69,7 @@ var _ DeploymentsClientAPI = (*resources.DeploymentsClient)(nil) type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error) List(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result resources.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result resources.Provider, err error) } @@ -82,7 +87,9 @@ type ClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result resources.GenericResource, err error) GetByID(ctx context.Context, resourceID string, APIVersion string) (result resources.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result resources.ListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters resources.MoveInfo) (result resources.MoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateFuture, err error) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters resources.GenericResource) (result resources.UpdateByIDFuture, err error) @@ -99,6 +106,7 @@ type GroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters resources.ExportTemplateRequest) (result resources.GroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result resources.Group, err error) List(ctx context.Context, filter string, top *int32) (result resources.GroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result resources.GroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, parameters resources.GroupPatchable) (result resources.Group, err error) } @@ -111,6 +119,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result resources.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result resources.TagsListResultIterator, err error) } var _ TagsClientAPI = (*resources.TagsClient)(nil) @@ -121,8 +130,11 @@ type DeploymentOperationsClientAPI interface { GetAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) GetAtSubscriptionScope(ctx context.Context, deploymentName string, operationID string) (result resources.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) ListAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListAtManagementGroupScopeComplete(ctx context.Context, groupID string, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) ListAtSubscriptionScope(ctx context.Context, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultPage, err error) + ListAtSubscriptionScopeComplete(ctx context.Context, deploymentName string, top *int32) (result resources.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*resources.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2019-05-01/resources/tags.go b/services/resources/mgmt/2019-05-01/resources/tags.go index 41a085642d83..625e800a28f4 100644 --- a/services/resources/mgmt/2019-05-01/resources/tags.go +++ b/services/resources/mgmt/2019-05-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-06-01/policy/assignments.go b/services/resources/mgmt/2019-06-01/policy/assignments.go index 0b8cb46951a2..900307e3d240 100644 --- a/services/resources/mgmt/2019-06-01/policy/assignments.go +++ b/services/resources/mgmt/2019-06-01/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } diff --git a/services/resources/mgmt/2019-06-01/policy/client.go b/services/resources/mgmt/2019-06-01/policy/client.go index a60923b29250..b02122a29807 100644 --- a/services/resources/mgmt/2019-06-01/policy/client.go +++ b/services/resources/mgmt/2019-06-01/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2019-06-01/policy/definitions.go b/services/resources/mgmt/2019-06-01/policy/definitions.go index 0a697e0252da..810a2142d1c9 100644 --- a/services/resources/mgmt/2019-06-01/policy/definitions.go +++ b/services/resources/mgmt/2019-06-01/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-06-01/policy/policyapi/interfaces.go b/services/resources/mgmt/2019-06-01/policy/policyapi/interfaces.go index 7169bcdd4700..832afa998c63 100644 --- a/services/resources/mgmt/2019-06-01/policy/policyapi/interfaces.go +++ b/services/resources/mgmt/2019-06-01/policy/policyapi/interfaces.go @@ -32,8 +32,11 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) @@ -48,8 +51,11 @@ type DefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result policy.Definition, err error) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) @@ -64,8 +70,11 @@ type SetDefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result policy.SetDefinition, err error) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result policy.SetDefinition, err error) List(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultIterator, err error) } var _ SetDefinitionsClientAPI = (*policy.SetDefinitionsClient)(nil) diff --git a/services/resources/mgmt/2019-06-01/policy/setdefinitions.go b/services/resources/mgmt/2019-06-01/policy/setdefinitions.go index 391db09666db..65b28535b654 100644 --- a/services/resources/mgmt/2019-06-01/policy/setdefinitions.go +++ b/services/resources/mgmt/2019-06-01/policy/setdefinitions.go @@ -37,7 +37,8 @@ func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient { return NewSetDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client. +// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient { return SetDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-06-01/subscriptions/client.go b/services/resources/mgmt/2019-06-01/subscriptions/client.go index 7e071c044763..c26a7741e750 100644 --- a/services/resources/mgmt/2019-06-01/subscriptions/client.go +++ b/services/resources/mgmt/2019-06-01/subscriptions/client.go @@ -42,7 +42,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/resources/mgmt/2019-06-01/subscriptions/operations.go b/services/resources/mgmt/2019-06-01/subscriptions/operations.go index fe16bb7ecac7..915257c3fa07 100644 --- a/services/resources/mgmt/2019-06-01/subscriptions/operations.go +++ b/services/resources/mgmt/2019-06-01/subscriptions/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient() OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go b/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go index d73b6ad4e3b7..990a58d07862 100644 --- a/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go +++ b/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go @@ -37,7 +37,8 @@ func NewClient() Client { return NewClientWithBaseURI(DefaultBaseURI) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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) Client { return Client{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2019-06-01/subscriptions/subscriptionsapi/interfaces.go b/services/resources/mgmt/2019-06-01/subscriptions/subscriptionsapi/interfaces.go index 159b1a7d19ca..eeb9945107ce 100644 --- a/services/resources/mgmt/2019-06-01/subscriptions/subscriptionsapi/interfaces.go +++ b/services/resources/mgmt/2019-06-01/subscriptions/subscriptionsapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result subscriptions.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*subscriptions.OperationsClient)(nil) @@ -33,6 +34,7 @@ var _ OperationsClientAPI = (*subscriptions.OperationsClient)(nil) type ClientAPI interface { Get(ctx context.Context, subscriptionID string) (result subscriptions.Subscription, err error) List(ctx context.Context) (result subscriptions.ListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.ListResultIterator, err error) ListLocations(ctx context.Context, subscriptionID string) (result subscriptions.LocationListResult, err error) } @@ -41,6 +43,7 @@ var _ ClientAPI = (*subscriptions.Client)(nil) // TenantsClientAPI contains the set of methods on the TenantsClient type. type TenantsClientAPI interface { List(ctx context.Context) (result subscriptions.TenantListResultPage, err error) + ListComplete(ctx context.Context) (result subscriptions.TenantListResultIterator, err error) } var _ TenantsClientAPI = (*subscriptions.TenantsClient)(nil) diff --git a/services/resources/mgmt/2019-06-01/subscriptions/tenants.go b/services/resources/mgmt/2019-06-01/subscriptions/tenants.go index 16d24866e273..987285029bcf 100644 --- a/services/resources/mgmt/2019-06-01/subscriptions/tenants.go +++ b/services/resources/mgmt/2019-06-01/subscriptions/tenants.go @@ -37,7 +37,8 @@ func NewTenantsClient() TenantsClient { return NewTenantsClientWithBaseURI(DefaultBaseURI) } -// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client. +// NewTenantsClientWithBaseURI creates an instance of the TenantsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTenantsClientWithBaseURI(baseURI string) TenantsClient { return TenantsClient{NewWithBaseURI(baseURI)} } diff --git a/services/resources/mgmt/2019-07-01/features/client.go b/services/resources/mgmt/2019-07-01/features/client.go index de34ebe9dd7c..8274059781ab 100644 --- a/services/resources/mgmt/2019-07-01/features/client.go +++ b/services/resources/mgmt/2019-07-01/features/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2019-07-01/features/deploymentoperations.go b/services/resources/mgmt/2019-07-01/features/deploymentoperations.go index 17eea6682420..281900a6da77 100644 --- a/services/resources/mgmt/2019-07-01/features/deploymentoperations.go +++ b/services/resources/mgmt/2019-07-01/features/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-07-01/features/deployments.go b/services/resources/mgmt/2019-07-01/features/deployments.go index 59d94fd5b938..36b7681f732f 100644 --- a/services/resources/mgmt/2019-07-01/features/deployments.go +++ b/services/resources/mgmt/2019-07-01/features/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-07-01/features/featuresapi/interfaces.go b/services/resources/mgmt/2019-07-01/features/featuresapi/interfaces.go index e2dc919af61a..bfc6d1fbe297 100644 --- a/services/resources/mgmt/2019-07-01/features/featuresapi/interfaces.go +++ b/services/resources/mgmt/2019-07-01/features/featuresapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result features.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result features.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*features.OperationsClient)(nil) @@ -64,10 +65,15 @@ type DeploymentsClientAPI interface { GetAtSubscriptionScope(ctx context.Context, deploymentName string) (result features.DeploymentExtended, err error) GetAtTenantScope(ctx context.Context, deploymentName string) (result features.DeploymentExtended, err error) ListAtManagementGroupScope(ctx context.Context, groupID string, filter string, top *int32) (result features.DeploymentListResultPage, err error) + ListAtManagementGroupScopeComplete(ctx context.Context, groupID string, filter string, top *int32) (result features.DeploymentListResultIterator, err error) ListAtScope(ctx context.Context, scope string, filter string, top *int32) (result features.DeploymentListResultPage, err error) + ListAtScopeComplete(ctx context.Context, scope string, filter string, top *int32) (result features.DeploymentListResultIterator, err error) ListAtSubscriptionScope(ctx context.Context, filter string, top *int32) (result features.DeploymentListResultPage, err error) + ListAtSubscriptionScopeComplete(ctx context.Context, filter string, top *int32) (result features.DeploymentListResultIterator, err error) ListAtTenantScope(ctx context.Context, filter string, top *int32) (result features.DeploymentListResultPage, err error) + ListAtTenantScopeComplete(ctx context.Context, filter string, top *int32) (result features.DeploymentListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result features.DeploymentListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result features.DeploymentListResultIterator, err error) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters features.Deployment) (result features.DeploymentValidateResult, err error) ValidateAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, parameters features.Deployment) (result features.DeploymentValidateResult, err error) ValidateAtScope(ctx context.Context, scope string, deploymentName string, parameters features.Deployment) (result features.DeploymentValidateResult, err error) @@ -84,7 +90,9 @@ type ProvidersClientAPI interface { Get(ctx context.Context, resourceProviderNamespace string, expand string) (result features.Provider, err error) GetAtTenantScope(ctx context.Context, resourceProviderNamespace string, expand string) (result features.Provider, err error) List(ctx context.Context, top *int32, expand string) (result features.ProviderListResultPage, err error) + ListComplete(ctx context.Context, top *int32, expand string) (result features.ProviderListResultIterator, err error) ListAtTenantScope(ctx context.Context, top *int32, expand string) (result features.ProviderListResultPage, err error) + ListAtTenantScopeComplete(ctx context.Context, top *int32, expand string) (result features.ProviderListResultIterator, err error) Register(ctx context.Context, resourceProviderNamespace string) (result features.Provider, err error) Unregister(ctx context.Context, resourceProviderNamespace string) (result features.Provider, err error) } @@ -102,7 +110,9 @@ type ResourcesClientAPI interface { Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result features.GenericResource, err error) GetByID(ctx context.Context, resourceID string, APIVersion string) (result features.GenericResource, err error) List(ctx context.Context, filter string, expand string, top *int32) (result features.ResourceListResultPage, err error) + ListComplete(ctx context.Context, filter string, expand string, top *int32) (result features.ResourceListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result features.ResourceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result features.ResourceListResultIterator, err error) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters features.ResourcesMoveInfo) (result features.ResourcesMoveResourcesFuture, err error) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters features.GenericResource) (result features.ResourcesUpdateFuture, err error) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters features.GenericResource) (result features.ResourcesUpdateByIDFuture, err error) @@ -119,6 +129,7 @@ type ResourceGroupsClientAPI interface { ExportTemplate(ctx context.Context, resourceGroupName string, parameters features.ExportTemplateRequest) (result features.ResourceGroupExportResult, err error) Get(ctx context.Context, resourceGroupName string) (result features.ResourceGroup, err error) List(ctx context.Context, filter string, top *int32) (result features.ResourceGroupListResultPage, err error) + ListComplete(ctx context.Context, filter string, top *int32) (result features.ResourceGroupListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, parameters features.ResourceGroupPatchable) (result features.ResourceGroup, err error) } @@ -131,6 +142,7 @@ type TagsClientAPI interface { Delete(ctx context.Context, tagName string) (result autorest.Response, err error) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) List(ctx context.Context) (result features.TagsListResultPage, err error) + ListComplete(ctx context.Context) (result features.TagsListResultIterator, err error) } var _ TagsClientAPI = (*features.TagsClient)(nil) @@ -143,10 +155,15 @@ type DeploymentOperationsClientAPI interface { GetAtSubscriptionScope(ctx context.Context, deploymentName string, operationID string) (result features.DeploymentOperation, err error) GetAtTenantScope(ctx context.Context, deploymentName string, operationID string) (result features.DeploymentOperation, err error) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result features.DeploymentOperationsListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result features.DeploymentOperationsListResultIterator, err error) ListAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, top *int32) (result features.DeploymentOperationsListResultPage, err error) + ListAtManagementGroupScopeComplete(ctx context.Context, groupID string, deploymentName string, top *int32) (result features.DeploymentOperationsListResultIterator, err error) ListAtScope(ctx context.Context, scope string, deploymentName string, top *int32) (result features.DeploymentOperationsListResultPage, err error) + ListAtScopeComplete(ctx context.Context, scope string, deploymentName string, top *int32) (result features.DeploymentOperationsListResultIterator, err error) ListAtSubscriptionScope(ctx context.Context, deploymentName string, top *int32) (result features.DeploymentOperationsListResultPage, err error) + ListAtSubscriptionScopeComplete(ctx context.Context, deploymentName string, top *int32) (result features.DeploymentOperationsListResultIterator, err error) ListAtTenantScope(ctx context.Context, deploymentName string, top *int32) (result features.DeploymentOperationsListResultPage, err error) + ListAtTenantScopeComplete(ctx context.Context, deploymentName string, top *int32) (result features.DeploymentOperationsListResultIterator, err error) } var _ DeploymentOperationsClientAPI = (*features.DeploymentOperationsClient)(nil) diff --git a/services/resources/mgmt/2019-07-01/features/operations.go b/services/resources/mgmt/2019-07-01/features/operations.go index 33031c46d166..d4a46fa6487c 100644 --- a/services/resources/mgmt/2019-07-01/features/operations.go +++ b/services/resources/mgmt/2019-07-01/features/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/resources/mgmt/2019-07-01/features/providers.go b/services/resources/mgmt/2019-07-01/features/providers.go index a160319a3ecf..962eb64ade8c 100644 --- a/services/resources/mgmt/2019-07-01/features/providers.go +++ b/services/resources/mgmt/2019-07-01/features/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-07-01/features/resourcegroups.go b/services/resources/mgmt/2019-07-01/features/resourcegroups.go index 4578bb265088..8e378f63ee7b 100644 --- a/services/resources/mgmt/2019-07-01/features/resourcegroups.go +++ b/services/resources/mgmt/2019-07-01/features/resourcegroups.go @@ -36,7 +36,8 @@ func NewResourceGroupsClient(subscriptionID string) ResourceGroupsClient { return NewResourceGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceGroupsClientWithBaseURI creates an instance of the ResourceGroupsClient client. +// NewResourceGroupsClientWithBaseURI creates an instance of the ResourceGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourceGroupsClientWithBaseURI(baseURI string, subscriptionID string) ResourceGroupsClient { return ResourceGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-07-01/features/resources.go b/services/resources/mgmt/2019-07-01/features/resources.go index dfaa510bd4eb..6b3a23408884 100644 --- a/services/resources/mgmt/2019-07-01/features/resources.go +++ b/services/resources/mgmt/2019-07-01/features/resources.go @@ -36,7 +36,8 @@ func NewResourcesClient(subscriptionID string) ResourcesClient { return NewResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourcesClientWithBaseURI creates an instance of the ResourcesClient client. +// NewResourcesClientWithBaseURI creates an instance of the ResourcesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourcesClientWithBaseURI(baseURI string, subscriptionID string) ResourcesClient { return ResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-07-01/features/tags.go b/services/resources/mgmt/2019-07-01/features/tags.go index ee3c20f229ad..7637708b6660 100644 --- a/services/resources/mgmt/2019-07-01/features/tags.go +++ b/services/resources/mgmt/2019-07-01/features/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go b/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go index 45ad2453f0fb..e0b69ebb8257 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go @@ -36,7 +36,9 @@ func NewApplicationDefinitionsClient(subscriptionID string) ApplicationDefinitio return NewApplicationDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationDefinitionsClientWithBaseURI creates an instance of the ApplicationDefinitionsClient client. +// NewApplicationDefinitionsClientWithBaseURI creates an instance of the ApplicationDefinitionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewApplicationDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationDefinitionsClient { return ApplicationDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -67,7 +69,9 @@ func (client ApplicationDefinitionsClient) CreateOrUpdate(ctx context.Context, r {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.Authorizations", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.NotificationPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.NotificationPolicy.NotificationEndpoints", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "CreateOrUpdate", err.Error()) } @@ -155,7 +159,9 @@ func (client ApplicationDefinitionsClient) CreateOrUpdateByID(ctx context.Contex if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.Authorizations", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.NotificationPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.NotificationPolicy.NotificationEndpoints", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", err.Error()) } diff --git a/services/resources/mgmt/2019-07-01/managedapplications/applications.go b/services/resources/mgmt/2019-07-01/managedapplications/applications.go index a1d44086a040..11795f669c5d 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/applications.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/applications.go @@ -36,7 +36,8 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -67,7 +68,13 @@ func (client ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGro {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ApplicationProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.ManagedResourceGroupID", Name: validation.Null, Rule: true, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.JitAccessPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.JitAccessPolicy.JitAccessEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.ApplicationProperties.CustomerSupport", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.CustomerSupport.Email", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ApplicationProperties.CustomerSupport.Phone", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, {Target: "parameters.Plan", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Plan.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Plan.Publisher", Name: validation.Null, Rule: true, Chain: nil}, @@ -163,7 +170,13 @@ func (client ApplicationsClient) CreateOrUpdateByID(ctx context.Context, applica if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ApplicationProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.ManagedResourceGroupID", Name: validation.Null, Rule: true, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.JitAccessPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.JitAccessPolicy.JitAccessEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.ApplicationProperties.CustomerSupport", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.CustomerSupport.Email", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ApplicationProperties.CustomerSupport.Phone", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, {Target: "parameters.Plan", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Plan.Name", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Plan.Publisher", Name: validation.Null, Rule: true, Chain: nil}, diff --git a/services/resources/mgmt/2019-07-01/managedapplications/client.go b/services/resources/mgmt/2019-07-01/managedapplications/client.go index 601dbe63445d..5d2783926997 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/client.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2019-07-01/managedapplications/jitrequests.go b/services/resources/mgmt/2019-07-01/managedapplications/jitrequests.go index 1aaa66e65611..7e7d3407449e 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/jitrequests.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/jitrequests.go @@ -36,7 +36,8 @@ func NewJitRequestsClient(subscriptionID string) JitRequestsClient { return NewJitRequestsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJitRequestsClientWithBaseURI creates an instance of the JitRequestsClient client. +// NewJitRequestsClientWithBaseURI creates an instance of the JitRequestsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJitRequestsClientWithBaseURI(baseURI string, subscriptionID string) JitRequestsClient { return JitRequestsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go b/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go index 79f0e561fc7a..85e11ec08ee4 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // BaseClientAPI contains the set of methods on the BaseClient type. type BaseClientAPI interface { ListOperations(ctx context.Context) (result managedapplications.OperationListResultPage, err error) + ListOperationsComplete(ctx context.Context) (result managedapplications.OperationListResultIterator, err error) } var _ BaseClientAPI = (*managedapplications.BaseClient)(nil) @@ -39,7 +40,9 @@ type ApplicationsClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationName string) (result managedapplications.Application, err error) GetByID(ctx context.Context, applicationID string) (result managedapplications.Application, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationListResultIterator, err error) ListBySubscription(ctx context.Context) (result managedapplications.ApplicationListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result managedapplications.ApplicationListResultIterator, err error) RefreshPermissions(ctx context.Context, resourceGroupName string, applicationName string) (result managedapplications.ApplicationsRefreshPermissionsFuture, err error) Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *managedapplications.Application) (result managedapplications.Application, err error) UpdateByID(ctx context.Context, applicationID string, parameters *managedapplications.Application) (result managedapplications.Application, err error) @@ -56,6 +59,7 @@ type ApplicationDefinitionsClientAPI interface { Get(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinition, err error) GetByID(ctx context.Context, applicationDefinitionID string) (result managedapplications.ApplicationDefinition, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultIterator, err error) } var _ ApplicationDefinitionsClientAPI = (*managedapplications.ApplicationDefinitionsClient)(nil) diff --git a/services/resources/mgmt/2019-07-01/managedapplications/models.go b/services/resources/mgmt/2019-07-01/managedapplications/models.go index ce42db6f5606..7be91c69d52a 100644 --- a/services/resources/mgmt/2019-07-01/managedapplications/models.go +++ b/services/resources/mgmt/2019-07-01/managedapplications/models.go @@ -31,19 +31,59 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/managedapplications" +// ApplicationArtifactName enumerates the values for application artifact name. +type ApplicationArtifactName string + +const ( + // Authorizations ... + Authorizations ApplicationArtifactName = "Authorizations" + // CustomRoleDefinition ... + CustomRoleDefinition ApplicationArtifactName = "CustomRoleDefinition" + // NotSpecified ... + NotSpecified ApplicationArtifactName = "NotSpecified" + // ViewDefinition ... + ViewDefinition ApplicationArtifactName = "ViewDefinition" +) + +// PossibleApplicationArtifactNameValues returns an array of possible values for the ApplicationArtifactName const type. +func PossibleApplicationArtifactNameValues() []ApplicationArtifactName { + return []ApplicationArtifactName{Authorizations, CustomRoleDefinition, NotSpecified, ViewDefinition} +} + // ApplicationArtifactType enumerates the values for application artifact type. type ApplicationArtifactType string const ( - // Custom ... - Custom ApplicationArtifactType = "Custom" - // Template ... - Template ApplicationArtifactType = "Template" + // ApplicationArtifactTypeCustom ... + ApplicationArtifactTypeCustom ApplicationArtifactType = "Custom" + // ApplicationArtifactTypeNotSpecified ... + ApplicationArtifactTypeNotSpecified ApplicationArtifactType = "NotSpecified" + // ApplicationArtifactTypeTemplate ... + ApplicationArtifactTypeTemplate ApplicationArtifactType = "Template" ) // PossibleApplicationArtifactTypeValues returns an array of possible values for the ApplicationArtifactType const type. func PossibleApplicationArtifactTypeValues() []ApplicationArtifactType { - return []ApplicationArtifactType{Custom, Template} + return []ApplicationArtifactType{ApplicationArtifactTypeCustom, ApplicationArtifactTypeNotSpecified, ApplicationArtifactTypeTemplate} +} + +// ApplicationDefinitionArtifactName enumerates the values for application definition artifact name. +type ApplicationDefinitionArtifactName string + +const ( + // ApplicationDefinitionArtifactNameApplicationResourceTemplate ... + ApplicationDefinitionArtifactNameApplicationResourceTemplate ApplicationDefinitionArtifactName = "ApplicationResourceTemplate" + // ApplicationDefinitionArtifactNameCreateUIDefinition ... + ApplicationDefinitionArtifactNameCreateUIDefinition ApplicationDefinitionArtifactName = "CreateUiDefinition" + // ApplicationDefinitionArtifactNameMainTemplateParameters ... + ApplicationDefinitionArtifactNameMainTemplateParameters ApplicationDefinitionArtifactName = "MainTemplateParameters" + // ApplicationDefinitionArtifactNameNotSpecified ... + ApplicationDefinitionArtifactNameNotSpecified ApplicationDefinitionArtifactName = "NotSpecified" +) + +// PossibleApplicationDefinitionArtifactNameValues returns an array of possible values for the ApplicationDefinitionArtifactName const type. +func PossibleApplicationDefinitionArtifactNameValues() []ApplicationDefinitionArtifactName { + return []ApplicationDefinitionArtifactName{ApplicationDefinitionArtifactNameApplicationResourceTemplate, ApplicationDefinitionArtifactNameCreateUIDefinition, ApplicationDefinitionArtifactNameMainTemplateParameters, ApplicationDefinitionArtifactNameNotSpecified} } // ApplicationLockLevel enumerates the values for application lock level. @@ -63,31 +103,97 @@ func PossibleApplicationLockLevelValues() []ApplicationLockLevel { return []ApplicationLockLevel{CanNotDelete, None, ReadOnly} } +// ApplicationManagementMode enumerates the values for application management mode. +type ApplicationManagementMode string + +const ( + // ApplicationManagementModeManaged ... + ApplicationManagementModeManaged ApplicationManagementMode = "Managed" + // ApplicationManagementModeNotSpecified ... + ApplicationManagementModeNotSpecified ApplicationManagementMode = "NotSpecified" + // ApplicationManagementModeUnmanaged ... + ApplicationManagementModeUnmanaged ApplicationManagementMode = "Unmanaged" +) + +// PossibleApplicationManagementModeValues returns an array of possible values for the ApplicationManagementMode const type. +func PossibleApplicationManagementModeValues() []ApplicationManagementMode { + return []ApplicationManagementMode{ApplicationManagementModeManaged, ApplicationManagementModeNotSpecified, ApplicationManagementModeUnmanaged} +} + +// DeploymentMode enumerates the values for deployment mode. +type DeploymentMode string + +const ( + // DeploymentModeComplete ... + DeploymentModeComplete DeploymentMode = "Complete" + // DeploymentModeIncremental ... + DeploymentModeIncremental DeploymentMode = "Incremental" + // DeploymentModeNotSpecified ... + DeploymentModeNotSpecified DeploymentMode = "NotSpecified" +) + +// PossibleDeploymentModeValues returns an array of possible values for the DeploymentMode const type. +func PossibleDeploymentModeValues() []DeploymentMode { + return []DeploymentMode{DeploymentModeComplete, DeploymentModeIncremental, DeploymentModeNotSpecified} +} + +// JitApprovalMode enumerates the values for jit approval mode. +type JitApprovalMode string + +const ( + // JitApprovalModeAutoApprove ... + JitApprovalModeAutoApprove JitApprovalMode = "AutoApprove" + // JitApprovalModeManualApprove ... + JitApprovalModeManualApprove JitApprovalMode = "ManualApprove" + // JitApprovalModeNotSpecified ... + JitApprovalModeNotSpecified JitApprovalMode = "NotSpecified" +) + +// PossibleJitApprovalModeValues returns an array of possible values for the JitApprovalMode const type. +func PossibleJitApprovalModeValues() []JitApprovalMode { + return []JitApprovalMode{JitApprovalModeAutoApprove, JitApprovalModeManualApprove, JitApprovalModeNotSpecified} +} + +// JitApproverType enumerates the values for jit approver type. +type JitApproverType string + +const ( + // Group ... + Group JitApproverType = "group" + // User ... + User JitApproverType = "user" +) + +// PossibleJitApproverTypeValues returns an array of possible values for the JitApproverType const type. +func PossibleJitApproverTypeValues() []JitApproverType { + return []JitApproverType{Group, User} +} + // JitRequestState enumerates the values for jit request state. type JitRequestState string const ( - // Approved ... - Approved JitRequestState = "Approved" - // Canceled ... - Canceled JitRequestState = "Canceled" - // Denied ... - Denied JitRequestState = "Denied" - // Expired ... - Expired JitRequestState = "Expired" - // Failed ... - Failed JitRequestState = "Failed" - // NotSpecified ... - NotSpecified JitRequestState = "NotSpecified" - // Pending ... - Pending JitRequestState = "Pending" - // Timeout ... - Timeout JitRequestState = "Timeout" + // JitRequestStateApproved ... + JitRequestStateApproved JitRequestState = "Approved" + // JitRequestStateCanceled ... + JitRequestStateCanceled JitRequestState = "Canceled" + // JitRequestStateDenied ... + JitRequestStateDenied JitRequestState = "Denied" + // JitRequestStateExpired ... + JitRequestStateExpired JitRequestState = "Expired" + // JitRequestStateFailed ... + JitRequestStateFailed JitRequestState = "Failed" + // JitRequestStateNotSpecified ... + JitRequestStateNotSpecified JitRequestState = "NotSpecified" + // JitRequestStatePending ... + JitRequestStatePending JitRequestState = "Pending" + // JitRequestStateTimeout ... + JitRequestStateTimeout JitRequestState = "Timeout" ) // PossibleJitRequestStateValues returns an array of possible values for the JitRequestState const type. func PossibleJitRequestStateValues() []JitRequestState { - return []JitRequestState{Approved, Canceled, Denied, Expired, Failed, NotSpecified, Pending, Timeout} + return []JitRequestState{JitRequestStateApproved, JitRequestStateCanceled, JitRequestStateDenied, JitRequestStateExpired, JitRequestStateFailed, JitRequestStateNotSpecified, JitRequestStatePending, JitRequestStateTimeout} } // JitSchedulingType enumerates the values for jit scheduling type. @@ -125,6 +231,8 @@ const ( ProvisioningStateDeleting ProvisioningState = "Deleting" // ProvisioningStateFailed ... ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateNotSpecified ... + ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" // ProvisioningStateReady ... ProvisioningStateReady ProvisioningState = "Ready" // ProvisioningStateRunning ... @@ -137,7 +245,7 @@ const ( // PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreated, ProvisioningStateCreating, ProvisioningStateDeleted, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateReady, ProvisioningStateRunning, ProvisioningStateSucceeded, ProvisioningStateUpdating} + return []ProvisioningState{ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreated, ProvisioningStateCreating, ProvisioningStateDeleted, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateNotSpecified, ProvisioningStateReady, ProvisioningStateRunning, ProvisioningStateSucceeded, ProvisioningStateUpdating} } // ResourceIdentityType enumerates the values for resource identity type. @@ -162,12 +270,12 @@ type Application struct { Plan *Plan `json:"plan,omitempty"` // Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. Kind *string `json:"kind,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` // ManagedBy - ID of the resource that manages this resource. ManagedBy *string `json:"managedBy,omitempty"` // Sku - The SKU of the resource. Sku *Sku `json:"sku,omitempty"` - // Identity - The identity of the resource. - Identity *Identity `json:"identity,omitempty"` // ID - READ-ONLY; Resource ID ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -192,15 +300,15 @@ func (a Application) MarshalJSON() ([]byte, error) { if a.Kind != nil { objectMap["kind"] = a.Kind } + if a.Identity != nil { + objectMap["identity"] = a.Identity + } if a.ManagedBy != nil { objectMap["managedBy"] = a.ManagedBy } if a.Sku != nil { objectMap["sku"] = a.Sku } - if a.Identity != nil { - objectMap["identity"] = a.Identity - } if a.Location != nil { objectMap["location"] = a.Location } @@ -246,6 +354,15 @@ func (a *Application) UnmarshalJSON(body []byte) error { } a.Kind = &kind } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + a.Identity = &identity + } case "managedBy": if v != nil { var managedBy string @@ -264,15 +381,6 @@ func (a *Application) UnmarshalJSON(body []byte) error { } a.Sku = &sku } - case "identity": - if v != nil { - var identity Identity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - a.Identity = &identity - } case "id": if v != nil { var ID string @@ -326,14 +434,28 @@ func (a *Application) UnmarshalJSON(body []byte) error { // ApplicationArtifact managed application artifact. type ApplicationArtifact struct { - // Name - The managed application artifact name. - Name *string `json:"name,omitempty"` + // Name - The managed application artifact name. Possible values include: 'NotSpecified', 'ViewDefinition', 'Authorizations', 'CustomRoleDefinition' + Name ApplicationArtifactName `json:"name,omitempty"` // URI - The managed application artifact blob uri. URI *string `json:"uri,omitempty"` - // Type - The managed application artifact type. Possible values include: 'Template', 'Custom' + // Type - The managed application artifact type. Possible values include: 'ApplicationArtifactTypeNotSpecified', 'ApplicationArtifactTypeTemplate', 'ApplicationArtifactTypeCustom' Type ApplicationArtifactType `json:"type,omitempty"` } +// ApplicationAuthorization the managed application provider authorization. +type ApplicationAuthorization struct { + // PrincipalID - The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources. + PrincipalID *string `json:"principalId,omitempty"` + // RoleDefinitionID - The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. + RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` +} + +// ApplicationBillingDetailsDefinition managed application billing details definition. +type ApplicationBillingDetailsDefinition struct { + // ResourceUsageID - The managed application resource usage Id. + ResourceUsageID *string `json:"resourceUsageId,omitempty"` +} + // ApplicationClientDetails the application client details to track the entity creating/updating the // managed app resource. type ApplicationClientDetails struct { @@ -354,8 +476,6 @@ type ApplicationDefinition struct { ManagedBy *string `json:"managedBy,omitempty"` // Sku - The SKU of the resource. Sku *Sku `json:"sku,omitempty"` - // Identity - The identity of the resource. - Identity *Identity `json:"identity,omitempty"` // ID - READ-ONLY; Resource ID ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -380,9 +500,6 @@ func (ad ApplicationDefinition) MarshalJSON() ([]byte, error) { if ad.Sku != nil { objectMap["sku"] = ad.Sku } - if ad.Identity != nil { - objectMap["identity"] = ad.Identity - } if ad.Location != nil { objectMap["location"] = ad.Location } @@ -428,15 +545,6 @@ func (ad *ApplicationDefinition) UnmarshalJSON(body []byte) error { } ad.Sku = &sku } - case "identity": - if v != nil { - var identity Identity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - ad.Identity = &identity - } case "id": if v != nil { var ID string @@ -488,6 +596,16 @@ func (ad *ApplicationDefinition) UnmarshalJSON(body []byte) error { return nil } +// ApplicationDefinitionArtifact application definition artifact. +type ApplicationDefinitionArtifact struct { + // Name - The managed application definition artifact name. Possible values include: 'ApplicationDefinitionArtifactNameNotSpecified', 'ApplicationDefinitionArtifactNameApplicationResourceTemplate', 'ApplicationDefinitionArtifactNameCreateUIDefinition', 'ApplicationDefinitionArtifactNameMainTemplateParameters' + Name ApplicationDefinitionArtifactName `json:"name,omitempty"` + // URI - The managed application definition artifact blob uri. + URI *string `json:"uri,omitempty"` + // Type - The managed application definition artifact type. Possible values include: 'ApplicationArtifactTypeNotSpecified', 'ApplicationArtifactTypeTemplate', 'ApplicationArtifactTypeCustom' + Type ApplicationArtifactType `json:"type,omitempty"` +} + // ApplicationDefinitionListResult list of managed application definitions. type ApplicationDefinitionListResult struct { autorest.Response `json:"-"` @@ -642,11 +760,11 @@ type ApplicationDefinitionProperties struct { // DisplayName - The managed application definition display name. DisplayName *string `json:"displayName,omitempty"` // IsEnabled - A value indicating whether the package is enabled or not. - IsEnabled *string `json:"isEnabled,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` // Authorizations - The managed application provider authorizations. - Authorizations *[]ApplicationProviderAuthorization `json:"authorizations,omitempty"` + Authorizations *[]ApplicationAuthorization `json:"authorizations,omitempty"` // Artifacts - The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition. - Artifacts *[]ApplicationArtifact `json:"artifacts,omitempty"` + Artifacts *[]ApplicationDefinitionArtifact `json:"artifacts,omitempty"` // Description - The managed application definition description. Description *string `json:"description,omitempty"` // PackageFileURI - The managed application definition package file Uri. Use this element @@ -655,6 +773,16 @@ type ApplicationDefinitionProperties struct { MainTemplate interface{} `json:"mainTemplate,omitempty"` // CreateUIDefinition - The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource. It can be a JObject or well-formed JSON string. CreateUIDefinition interface{} `json:"createUiDefinition,omitempty"` + // NotificationPolicy - The managed application notification policy. + NotificationPolicy *ApplicationNotificationPolicy `json:"notificationPolicy,omitempty"` + // LockingPolicy - The managed application locking policy. + LockingPolicy *ApplicationPackageLockingPolicyDefinition `json:"lockingPolicy,omitempty"` + // DeploymentPolicy - The managed application deployment policy. + DeploymentPolicy *ApplicationDeploymentPolicy `json:"deploymentPolicy,omitempty"` + // ManagementPolicy - The managed application management policy that determines publisher's access to the managed resource group. + ManagementPolicy *ApplicationManagementPolicy `json:"managementPolicy,omitempty"` + // Policies - The managed application provider policies. + Policies *[]ApplicationPolicy `json:"policies,omitempty"` } // ApplicationDefinitionsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results @@ -761,6 +889,24 @@ func (future *ApplicationDefinitionsDeleteFuture) Result(client ApplicationDefin return } +// ApplicationDeploymentPolicy managed application deployment policy. +type ApplicationDeploymentPolicy struct { + // DeploymentMode - The managed application deployment mode. Possible values include: 'DeploymentModeNotSpecified', 'DeploymentModeIncremental', 'DeploymentModeComplete' + DeploymentMode DeploymentMode `json:"deploymentMode,omitempty"` +} + +// ApplicationJitAccessPolicy managed application Jit access policy. +type ApplicationJitAccessPolicy struct { + // JitAccessEnabled - Whether the JIT access is enabled. + JitAccessEnabled *bool `json:"jitAccessEnabled,omitempty"` + // JitApprovalMode - JIT approval mode. Possible values include: 'JitApprovalModeNotSpecified', 'JitApprovalModeAutoApprove', 'JitApprovalModeManualApprove' + JitApprovalMode JitApprovalMode `json:"jitApprovalMode,omitempty"` + // JitApprovers - The JIT approvers + JitApprovers *[]JitApproverDefinition `json:"jitApprovers,omitempty"` + // MaximumJitAccessDuration - The maximum duration JIT access is granted. This is an ISO8601 time period value. + MaximumJitAccessDuration *string `json:"maximumJitAccessDuration,omitempty"` +} + // ApplicationListResult list of managed applications. type ApplicationListResult struct { autorest.Response `json:"-"` @@ -907,6 +1053,48 @@ func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationL return ApplicationListResultPage{fn: getNextPage} } +// ApplicationManagementPolicy managed application management policy. +type ApplicationManagementPolicy struct { + // Mode - The managed application management mode. Possible values include: 'ApplicationManagementModeNotSpecified', 'ApplicationManagementModeUnmanaged', 'ApplicationManagementModeManaged' + Mode ApplicationManagementMode `json:"mode,omitempty"` +} + +// ApplicationNotificationEndpoint managed application notification endpoint. +type ApplicationNotificationEndpoint struct { + // URI - The managed application notification endpoint uri. + URI *string `json:"uri,omitempty"` +} + +// ApplicationNotificationPolicy managed application notification policy. +type ApplicationNotificationPolicy struct { + // NotificationEndpoints - The managed application notification endpoint. + NotificationEndpoints *[]ApplicationNotificationEndpoint `json:"notificationEndpoints,omitempty"` +} + +// ApplicationPackageContact the application package contact information. +type ApplicationPackageContact struct { + // ContactName - The contact name. + ContactName *string `json:"contactName,omitempty"` + // Email - The contact email. + Email *string `json:"email,omitempty"` + // Phone - The contact phone number. + Phone *string `json:"phone,omitempty"` +} + +// ApplicationPackageLockingPolicyDefinition managed application locking policy. +type ApplicationPackageLockingPolicyDefinition struct { + // AllowedActions - The deny assignment excluded actions. + AllowedActions *[]string `json:"allowedActions,omitempty"` +} + +// ApplicationPackageSupportUrls the appliance package support URLs. +type ApplicationPackageSupportUrls struct { + // PublicAzure - The public azure support URL. + PublicAzure *string `json:"publicAzure,omitempty"` + // GovernmentCloud - The government cloud support URL. + GovernmentCloud *string `json:"governmentCloud,omitempty"` +} + // ApplicationPatchable information about managed application. type ApplicationPatchable struct { // ApplicationPropertiesPatchable - The managed application properties. @@ -915,12 +1103,12 @@ type ApplicationPatchable struct { Plan *PlanPatchable `json:"plan,omitempty"` // Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. Kind *string `json:"kind,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` // ManagedBy - ID of the resource that manages this resource. ManagedBy *string `json:"managedBy,omitempty"` // Sku - The SKU of the resource. Sku *Sku `json:"sku,omitempty"` - // Identity - The identity of the resource. - Identity *Identity `json:"identity,omitempty"` // ID - READ-ONLY; Resource ID ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -945,15 +1133,15 @@ func (ap ApplicationPatchable) MarshalJSON() ([]byte, error) { if ap.Kind != nil { objectMap["kind"] = ap.Kind } + if ap.Identity != nil { + objectMap["identity"] = ap.Identity + } if ap.ManagedBy != nil { objectMap["managedBy"] = ap.ManagedBy } if ap.Sku != nil { objectMap["sku"] = ap.Sku } - if ap.Identity != nil { - objectMap["identity"] = ap.Identity - } if ap.Location != nil { objectMap["location"] = ap.Location } @@ -999,6 +1187,15 @@ func (ap *ApplicationPatchable) UnmarshalJSON(body []byte) error { } ap.Kind = &kind } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + ap.Identity = &identity + } case "managedBy": if v != nil { var managedBy string @@ -1017,15 +1214,6 @@ func (ap *ApplicationPatchable) UnmarshalJSON(body []byte) error { } ap.Sku = &sku } - case "identity": - if v != nil { - var identity Identity - err = json.Unmarshal(*v, &identity) - if err != nil { - return err - } - ap.Identity = &identity - } case "id": if v != nil { var ID string @@ -1077,6 +1265,16 @@ func (ap *ApplicationPatchable) UnmarshalJSON(body []byte) error { return nil } +// ApplicationPolicy managed application policy. +type ApplicationPolicy struct { + // Name - The policy name + Name *string `json:"name,omitempty"` + // PolicyDefinitionID - The policy definition Id. + PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"` + // Parameters - The policy parameters. + Parameters *string `json:"parameters,omitempty"` +} + // ApplicationProperties the managed application properties. type ApplicationProperties struct { // ManagedResourceGroupID - The managed resource group Id. @@ -1087,8 +1285,28 @@ type ApplicationProperties struct { Parameters interface{} `json:"parameters,omitempty"` // Outputs - READ-ONLY; Name and value pairs that define the managed application outputs. Outputs interface{} `json:"outputs,omitempty"` - // ProvisioningState - READ-ONLY; The managed application provisioning state. Possible values include: 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' + // ProvisioningState - READ-ONLY; The managed application provisioning state. Possible values include: 'ProvisioningStateNotSpecified', 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // BillingDetails - READ-ONLY; The managed application billing details. + BillingDetails *ApplicationBillingDetailsDefinition `json:"billingDetails,omitempty"` + // JitAccessPolicy - The managed application Jit access policy. + JitAccessPolicy *ApplicationJitAccessPolicy `json:"jitAccessPolicy,omitempty"` + // PublisherTenantID - READ-ONLY; The publisher tenant Id. + PublisherTenantID *string `json:"publisherTenantId,omitempty"` + // Authorizations - READ-ONLY; The read-only authorizations property that is retrieved from the application package. + Authorizations *[]ApplicationAuthorization `json:"authorizations,omitempty"` + // ManagementMode - READ-ONLY; The managed application management mode. Possible values include: 'ApplicationManagementModeNotSpecified', 'ApplicationManagementModeUnmanaged', 'ApplicationManagementModeManaged' + ManagementMode ApplicationManagementMode `json:"managementMode,omitempty"` + // CustomerSupport - READ-ONLY; The read-only customer support property that is retrieved from the application package. + CustomerSupport *ApplicationPackageContact `json:"customerSupport,omitempty"` + // SupportUrls - READ-ONLY; The read-only support URLs property that is retrieved from the application package. + SupportUrls *ApplicationPackageSupportUrls `json:"supportUrls,omitempty"` + // Artifacts - READ-ONLY; The collection of managed application artifacts. + Artifacts *[]ApplicationArtifact `json:"artifacts,omitempty"` + // CreatedBy - READ-ONLY; The client entity that created the JIT request. + CreatedBy *ApplicationClientDetails `json:"createdBy,omitempty"` + // UpdatedBy - READ-ONLY; The client entity that last updated the JIT request. + UpdatedBy *ApplicationClientDetails `json:"updatedBy,omitempty"` } // ApplicationPropertiesPatchable the managed application properties. @@ -1101,18 +1319,10 @@ type ApplicationPropertiesPatchable struct { Parameters interface{} `json:"parameters,omitempty"` // Outputs - READ-ONLY; Name and value pairs that define the managed application outputs. Outputs interface{} `json:"outputs,omitempty"` - // ProvisioningState - READ-ONLY; The managed application provisioning state. Possible values include: 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' + // ProvisioningState - READ-ONLY; The managed application provisioning state. Possible values include: 'ProvisioningStateNotSpecified', 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// ApplicationProviderAuthorization the managed application provider authorization. -type ApplicationProviderAuthorization struct { - // PrincipalID - The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources. - PrincipalID *string `json:"principalId,omitempty"` - // RoleDefinitionID - The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. - RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` -} - // ApplicationsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ApplicationsCreateOrUpdateByIDFuture struct { @@ -1257,8 +1467,6 @@ type GenericResource struct { ManagedBy *string `json:"managedBy,omitempty"` // Sku - The SKU of the resource. Sku *Sku `json:"sku,omitempty"` - // Identity - The identity of the resource. - Identity *Identity `json:"identity,omitempty"` // ID - READ-ONLY; Resource ID ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1280,9 +1488,6 @@ func (gr GenericResource) MarshalJSON() ([]byte, error) { if gr.Sku != nil { objectMap["sku"] = gr.Sku } - if gr.Identity != nil { - objectMap["identity"] = gr.Identity - } if gr.Location != nil { objectMap["location"] = gr.Location } @@ -1302,6 +1507,16 @@ type Identity struct { Type ResourceIdentityType `json:"type,omitempty"` } +// JitApproverDefinition JIT approver definition. +type JitApproverDefinition struct { + // ID - The approver service principal Id. + ID *string `json:"id,omitempty"` + // Type - The approver type. Possible values include: 'User', 'Group' + Type JitApproverType `json:"type,omitempty"` + // DisplayName - The approver display name. + DisplayName *string `json:"displayName,omitempty"` +} + // JitAuthorizationPolicies the JIT authorization policies. type JitAuthorizationPolicies struct { // PrincipalID - The the principal id that will be granted JIT access. @@ -1445,9 +1660,9 @@ type JitRequestProperties struct { JitAuthorizationPolicies *[]JitAuthorizationPolicies `json:"jitAuthorizationPolicies,omitempty"` // JitSchedulingPolicy - The JIT request properties. JitSchedulingPolicy *JitSchedulingPolicy `json:"jitSchedulingPolicy,omitempty"` - // ProvisioningState - READ-ONLY; The JIT request provisioning state. Possible values include: 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' + // ProvisioningState - READ-ONLY; The JIT request provisioning state. Possible values include: 'ProvisioningStateNotSpecified', 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // JitRequestState - READ-ONLY; The JIT request state. Possible values include: 'NotSpecified', 'Pending', 'Approved', 'Denied', 'Failed', 'Canceled', 'Expired', 'Timeout' + // JitRequestState - READ-ONLY; The JIT request state. Possible values include: 'JitRequestStateNotSpecified', 'JitRequestStatePending', 'JitRequestStateApproved', 'JitRequestStateDenied', 'JitRequestStateFailed', 'JitRequestStateCanceled', 'JitRequestStateExpired', 'JitRequestStateTimeout' JitRequestState JitRequestState `json:"jitRequestState,omitempty"` // CreatedBy - READ-ONLY; The client entity that created the JIT request. CreatedBy *ApplicationClientDetails `json:"createdBy,omitempty"` diff --git a/services/resources/mgmt/2019-09-01/policy/assignments.go b/services/resources/mgmt/2019-09-01/policy/assignments.go index 1828ec35d2a9..0ae2a98e7a25 100644 --- a/services/resources/mgmt/2019-09-01/policy/assignments.go +++ b/services/resources/mgmt/2019-09-01/policy/assignments.go @@ -37,7 +37,8 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. +// 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)} } @@ -678,6 +679,127 @@ func (client AssignmentsClient) ListComplete(ctx context.Context, filter string) return } +// ListForManagementGroup this operation retrieves the list of all policy assignments applicable to the management +// group that match the given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. +// If $filter=atScope() is provided, the returned list includes all policy assignments that are assigned to the +// management group or the management group's ancestors. If $filter=policyDefinitionId eq '{value}' is provided, the +// returned list includes all policy assignments of the policy definition whose id is {value} that apply to the +// management group. +// Parameters: +// managementGroupID - the ID of the management group. +// filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or +// 'policyDefinitionId eq '{value}''. A filter is required when listing policy assignments at management group +// scope. +func (client AssignmentsClient) ListForManagementGroup(ctx context.Context, managementGroupID string, filter string) (result AssignmentListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.ListForManagementGroup") + defer func() { + sc := -1 + if result.alr.Response.Response != nil { + sc = result.alr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listForManagementGroupNextResults + req, err := client.ListForManagementGroupPreparer(ctx, managementGroupID, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForManagementGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListForManagementGroupSender(req) + if err != nil { + result.alr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForManagementGroup", resp, "Failure sending request") + return + } + + result.alr, err = client.ListForManagementGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "ListForManagementGroup", resp, "Failure responding to request") + } + + return +} + +// ListForManagementGroupPreparer prepares the ListForManagementGroup request. +func (client AssignmentsClient) ListForManagementGroupPreparer(ctx context.Context, managementGroupID string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "managementGroupId": autorest.Encode("path", managementGroupID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "$filter": filter, + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyAssignments", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListForManagementGroupSender sends the ListForManagementGroup request. The method will close the +// http.Response Body if it receives an error. +func (client AssignmentsClient) ListForManagementGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListForManagementGroupResponder handles the response to the ListForManagementGroup request. The method always +// closes the http.Response Body. +func (client AssignmentsClient) ListForManagementGroupResponder(resp *http.Response) (result AssignmentListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listForManagementGroupNextResults retrieves the next set of results, if any. +func (client AssignmentsClient) listForManagementGroupNextResults(ctx context.Context, lastResults AssignmentListResult) (result AssignmentListResult, err error) { + req, err := lastResults.assignmentListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForManagementGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListForManagementGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForManagementGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListForManagementGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "policy.AssignmentsClient", "listForManagementGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListForManagementGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client AssignmentsClient) ListForManagementGroupComplete(ctx context.Context, managementGroupID string, filter string) (result AssignmentListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AssignmentsClient.ListForManagementGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListForManagementGroup(ctx, managementGroupID, filter) + return +} + // ListForResource this operation retrieves the list of all policy assignments associated with the specified resource // in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: // 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all diff --git a/services/resources/mgmt/2019-09-01/policy/client.go b/services/resources/mgmt/2019-09-01/policy/client.go index 5f51f601e186..396687cac191 100644 --- a/services/resources/mgmt/2019-09-01/policy/client.go +++ b/services/resources/mgmt/2019-09-01/policy/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/resources/mgmt/2019-09-01/policy/definitions.go b/services/resources/mgmt/2019-09-01/policy/definitions.go index dd3b3621eaf4..85bfafe41b30 100644 --- a/services/resources/mgmt/2019-09-01/policy/definitions.go +++ b/services/resources/mgmt/2019-09-01/policy/definitions.go @@ -36,7 +36,8 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/resources/mgmt/2019-09-01/policy/policyapi/interfaces.go b/services/resources/mgmt/2019-09-01/policy/policyapi/interfaces.go index c4c6e9309bd6..4577433ce4f7 100644 --- a/services/resources/mgmt/2019-09-01/policy/policyapi/interfaces.go +++ b/services/resources/mgmt/2019-09-01/policy/policyapi/interfaces.go @@ -32,8 +32,13 @@ type AssignmentsClientAPI interface { Get(ctx context.Context, scope string, policyAssignmentName string) (result policy.Assignment, err error) GetByID(ctx context.Context, policyAssignmentID string) (result policy.Assignment, err error) List(ctx context.Context, filter string) (result policy.AssignmentListResultPage, err error) + ListComplete(ctx context.Context, filter string) (result policy.AssignmentListResultIterator, err error) + ListForManagementGroup(ctx context.Context, managementGroupID string, filter string) (result policy.AssignmentListResultPage, err error) + ListForManagementGroupComplete(ctx context.Context, managementGroupID string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result policy.AssignmentListResultIterator, err error) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultPage, err error) + ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result policy.AssignmentListResultIterator, err error) } var _ AssignmentsClientAPI = (*policy.AssignmentsClient)(nil) @@ -48,8 +53,11 @@ type DefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result policy.Definition, err error) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result policy.Definition, err error) List(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.DefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.DefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.DefinitionListResultIterator, err error) } var _ DefinitionsClientAPI = (*policy.DefinitionsClient)(nil) @@ -64,8 +72,11 @@ type SetDefinitionsClientAPI interface { GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result policy.SetDefinition, err error) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result policy.SetDefinition, err error) List(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListBuiltIn(ctx context.Context) (result policy.SetDefinitionListResultPage, err error) + ListBuiltInComplete(ctx context.Context) (result policy.SetDefinitionListResultIterator, err error) ListByManagementGroup(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultPage, err error) + ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result policy.SetDefinitionListResultIterator, err error) } var _ SetDefinitionsClientAPI = (*policy.SetDefinitionsClient)(nil) diff --git a/services/resources/mgmt/2019-09-01/policy/setdefinitions.go b/services/resources/mgmt/2019-09-01/policy/setdefinitions.go index 34a78b50a3f5..5837195d8fbc 100644 --- a/services/resources/mgmt/2019-09-01/policy/setdefinitions.go +++ b/services/resources/mgmt/2019-09-01/policy/setdefinitions.go @@ -37,7 +37,8 @@ func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient { return NewSetDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client. +// NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient { return SetDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/scheduler/mgmt/2016-01-01/scheduler/client.go b/services/scheduler/mgmt/2016-01-01/scheduler/client.go index a9c15b2d63fe..295b2813e083 100644 --- a/services/scheduler/mgmt/2016-01-01/scheduler/client.go +++ b/services/scheduler/mgmt/2016-01-01/scheduler/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/scheduler/mgmt/2016-01-01/scheduler/jobcollections.go b/services/scheduler/mgmt/2016-01-01/scheduler/jobcollections.go index ee9bab302834..80a7486bef97 100644 --- a/services/scheduler/mgmt/2016-01-01/scheduler/jobcollections.go +++ b/services/scheduler/mgmt/2016-01-01/scheduler/jobcollections.go @@ -35,7 +35,8 @@ func NewJobCollectionsClient(subscriptionID string) JobCollectionsClient { return NewJobCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCollectionsClientWithBaseURI creates an instance of the JobCollectionsClient client. +// NewJobCollectionsClientWithBaseURI creates an instance of the JobCollectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobCollectionsClientWithBaseURI(baseURI string, subscriptionID string) JobCollectionsClient { return JobCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/scheduler/mgmt/2016-01-01/scheduler/jobs.go b/services/scheduler/mgmt/2016-01-01/scheduler/jobs.go index 357327abdd88..eba5b2eb3a24 100644 --- a/services/scheduler/mgmt/2016-01-01/scheduler/jobs.go +++ b/services/scheduler/mgmt/2016-01-01/scheduler/jobs.go @@ -35,7 +35,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/scheduler/mgmt/2016-01-01/scheduler/schedulerapi/interfaces.go b/services/scheduler/mgmt/2016-01-01/scheduler/schedulerapi/interfaces.go index 7f3c4ba2f09d..61c299c0de66 100644 --- a/services/scheduler/mgmt/2016-01-01/scheduler/schedulerapi/interfaces.go +++ b/services/scheduler/mgmt/2016-01-01/scheduler/schedulerapi/interfaces.go @@ -31,7 +31,9 @@ type JobCollectionsClientAPI interface { Enable(ctx context.Context, resourceGroupName string, jobCollectionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, jobCollectionName string) (result scheduler.JobCollectionDefinition, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result scheduler.JobCollectionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result scheduler.JobCollectionListResultIterator, err error) ListBySubscription(ctx context.Context) (result scheduler.JobCollectionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result scheduler.JobCollectionListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, jobCollectionName string, jobCollection scheduler.JobCollectionDefinition) (result scheduler.JobCollectionDefinition, err error) } @@ -43,7 +45,9 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result scheduler.JobDefinition, err error) List(ctx context.Context, resourceGroupName string, jobCollectionName string, top *int32, skip *int32, filter string) (result scheduler.JobListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, jobCollectionName string, top *int32, skip *int32, filter string) (result scheduler.JobListResultIterator, err error) ListJobHistory(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string) (result scheduler.JobHistoryListResultPage, err error) + ListJobHistoryComplete(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string) (result scheduler.JobHistoryListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, job scheduler.JobDefinition) (result scheduler.JobDefinition, err error) Run(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result autorest.Response, err error) } diff --git a/services/scheduler/mgmt/2016-03-01/scheduler/client.go b/services/scheduler/mgmt/2016-03-01/scheduler/client.go index 014a36f64ae9..91afb667f158 100644 --- a/services/scheduler/mgmt/2016-03-01/scheduler/client.go +++ b/services/scheduler/mgmt/2016-03-01/scheduler/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/scheduler/mgmt/2016-03-01/scheduler/jobcollections.go b/services/scheduler/mgmt/2016-03-01/scheduler/jobcollections.go index 9f72059704c9..eb270c42f9f9 100644 --- a/services/scheduler/mgmt/2016-03-01/scheduler/jobcollections.go +++ b/services/scheduler/mgmt/2016-03-01/scheduler/jobcollections.go @@ -35,7 +35,8 @@ func NewJobCollectionsClient(subscriptionID string) JobCollectionsClient { return NewJobCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCollectionsClientWithBaseURI creates an instance of the JobCollectionsClient client. +// NewJobCollectionsClientWithBaseURI creates an instance of the JobCollectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewJobCollectionsClientWithBaseURI(baseURI string, subscriptionID string) JobCollectionsClient { return JobCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go b/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go index 6a1489d7b092..8ac64632238f 100644 --- a/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go +++ b/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/scheduler/mgmt/2016-03-01/scheduler/schedulerapi/interfaces.go b/services/scheduler/mgmt/2016-03-01/scheduler/schedulerapi/interfaces.go index 6f9c8aae16b6..272c1f5d2571 100644 --- a/services/scheduler/mgmt/2016-03-01/scheduler/schedulerapi/interfaces.go +++ b/services/scheduler/mgmt/2016-03-01/scheduler/schedulerapi/interfaces.go @@ -31,7 +31,9 @@ type JobCollectionsClientAPI interface { Enable(ctx context.Context, resourceGroupName string, jobCollectionName string) (result scheduler.JobCollectionsEnableFuture, err error) Get(ctx context.Context, resourceGroupName string, jobCollectionName string) (result scheduler.JobCollectionDefinition, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result scheduler.JobCollectionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result scheduler.JobCollectionListResultIterator, err error) ListBySubscription(ctx context.Context) (result scheduler.JobCollectionListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result scheduler.JobCollectionListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, jobCollectionName string, jobCollection scheduler.JobCollectionDefinition) (result scheduler.JobCollectionDefinition, err error) } @@ -43,7 +45,9 @@ type JobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result scheduler.JobDefinition, err error) List(ctx context.Context, resourceGroupName string, jobCollectionName string, top *int32, skip *int32, filter string) (result scheduler.JobListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, jobCollectionName string, top *int32, skip *int32, filter string) (result scheduler.JobListResultIterator, err error) ListJobHistory(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string) (result scheduler.JobHistoryListResultPage, err error) + ListJobHistoryComplete(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string) (result scheduler.JobHistoryListResultIterator, err error) Patch(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string, job scheduler.JobDefinition) (result scheduler.JobDefinition, err error) Run(ctx context.Context, resourceGroupName string, jobCollectionName string, jobName string) (result autorest.Response, err error) } diff --git a/services/search/mgmt/2015-02-28/search/adminkeys.go b/services/search/mgmt/2015-02-28/search/adminkeys.go index 0e526d1ae1ac..b8b15946d7e9 100644 --- a/services/search/mgmt/2015-02-28/search/adminkeys.go +++ b/services/search/mgmt/2015-02-28/search/adminkeys.go @@ -35,7 +35,8 @@ func NewAdminKeysClient(subscriptionID string) AdminKeysClient { return NewAdminKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAdminKeysClientWithBaseURI creates an instance of the AdminKeysClient client. +// NewAdminKeysClientWithBaseURI creates an instance of the AdminKeysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAdminKeysClientWithBaseURI(baseURI string, subscriptionID string) AdminKeysClient { return AdminKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/search/mgmt/2015-02-28/search/client.go b/services/search/mgmt/2015-02-28/search/client.go index 9f614d348aa4..593d4f8f57f2 100644 --- a/services/search/mgmt/2015-02-28/search/client.go +++ b/services/search/mgmt/2015-02-28/search/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/search/mgmt/2015-02-28/search/querykeys.go b/services/search/mgmt/2015-02-28/search/querykeys.go index 5de52689d07d..71a3ff71fecc 100644 --- a/services/search/mgmt/2015-02-28/search/querykeys.go +++ b/services/search/mgmt/2015-02-28/search/querykeys.go @@ -35,7 +35,8 @@ func NewQueryKeysClient(subscriptionID string) QueryKeysClient { return NewQueryKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueryKeysClientWithBaseURI creates an instance of the QueryKeysClient client. +// NewQueryKeysClientWithBaseURI creates an instance of the QueryKeysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryKeysClientWithBaseURI(baseURI string, subscriptionID string) QueryKeysClient { return QueryKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/search/mgmt/2015-02-28/search/services.go b/services/search/mgmt/2015-02-28/search/services.go index ca9c5262cfac..9d3c9427a617 100644 --- a/services/search/mgmt/2015-02-28/search/services.go +++ b/services/search/mgmt/2015-02-28/search/services.go @@ -35,7 +35,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/search/mgmt/2015-08-19/search/adminkeys.go b/services/search/mgmt/2015-08-19/search/adminkeys.go index b010a77138e8..9a463f963943 100644 --- a/services/search/mgmt/2015-08-19/search/adminkeys.go +++ b/services/search/mgmt/2015-08-19/search/adminkeys.go @@ -26,7 +26,7 @@ import ( "net/http" ) -// AdminKeysClient is the client that can be used to manage Azure Search services and API keys. +// AdminKeysClient is the client that can be used to manage Azure Cognitive Search services and API keys. type AdminKeysClient struct { BaseClient } @@ -36,16 +36,18 @@ func NewAdminKeysClient(subscriptionID string) AdminKeysClient { return NewAdminKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAdminKeysClientWithBaseURI creates an instance of the AdminKeysClient client. +// NewAdminKeysClientWithBaseURI creates an instance of the AdminKeysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAdminKeysClientWithBaseURI(baseURI string, subscriptionID string) AdminKeysClient { return AdminKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get gets the primary and secondary admin API keys for the specified Azure Search service. +// Get gets the primary and secondary admin API keys for the specified Azure Cognitive Search service. // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service associated with the specified resource group. +// searchServiceName - the name of the Azure Cognitive Search service associated with the specified resource +// group. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. func (client AdminKeysClient) Get(ctx context.Context, resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result AdminKeyResult, err error) { @@ -129,7 +131,8 @@ func (client AdminKeysClient) GetResponder(resp *http.Response) (result AdminKey // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service associated with the specified resource group. +// searchServiceName - the name of the Azure Cognitive Search service associated with the specified resource +// group. // keyKind - specifies which key to regenerate. Valid values include 'primary' and 'secondary'. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. diff --git a/services/search/mgmt/2015-08-19/search/client.go b/services/search/mgmt/2015-08-19/search/client.go index e5102bebfbe5..74568b61ce2e 100644 --- a/services/search/mgmt/2015-08-19/search/client.go +++ b/services/search/mgmt/2015-08-19/search/client.go @@ -1,6 +1,6 @@ // Package search implements the Azure ARM Search service API version 2015-08-19. // -// Client that can be used to manage Azure Search services and API keys. +// Client that can be used to manage Azure Cognitive Search services and API keys. package search // Copyright (c) Microsoft and contributors. All rights reserved. @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/search/mgmt/2015-08-19/search/models.go b/services/search/mgmt/2015-08-19/search/models.go index 6b65eba75efa..4f21db7a2194 100644 --- a/services/search/mgmt/2015-08-19/search/models.go +++ b/services/search/mgmt/2015-08-19/search/models.go @@ -153,8 +153,8 @@ func PossibleUnavailableNameReasonValues() []UnavailableNameReason { return []UnavailableNameReason{AlreadyExists, Invalid} } -// AdminKeyResult response containing the primary and secondary admin API keys for a given Azure Search -// service. +// AdminKeyResult response containing the primary and secondary admin API keys for a given Azure Cognitive +// Search service. type AdminKeyResult struct { autorest.Response `json:"-"` // PrimaryKey - READ-ONLY; The primary admin API key of the Search service. @@ -210,10 +210,10 @@ type Identity struct { Type IdentityType `json:"type,omitempty"` } -// ListQueryKeysResult response containing the query API keys for a given Azure Search service. +// ListQueryKeysResult response containing the query API keys for a given Azure Cognitive Search service. type ListQueryKeysResult struct { autorest.Response `json:"-"` - // Value - READ-ONLY; The query keys for the Azure Search service. + // Value - READ-ONLY; The query keys for the Azure Cognitive Search service. Value *[]QueryKey `json:"value,omitempty"` } @@ -247,8 +247,8 @@ type OperationListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// QueryKey describes an API key for a given Azure Search service that has permissions for query operations -// only. +// QueryKey describes an API key for a given Azure Cognitive Search service that has permissions for query +// operations only. type QueryKey struct { autorest.Response `json:"-"` // Name - READ-ONLY; The name of the query API key; may be empty. @@ -288,7 +288,7 @@ func (r Resource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// Service describes an Azure Search service and its current state. +// Service describes an Azure Cognitive Search service and its current state. type Service struct { autorest.Response `json:"-"` // ServiceProperties - Properties of the Search service. @@ -417,7 +417,7 @@ func (s *Service) UnmarshalJSON(body []byte) error { return nil } -// ServiceListResult response containing a list of Azure Search services. +// ServiceListResult response containing a list of Azure Cognitive Search services. type ServiceListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of Search services. @@ -432,7 +432,7 @@ type ServiceProperties struct { PartitionCount *int32 `json:"partitionCount,omitempty"` // HostingMode - Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. Possible values include: 'Default', 'HighDensity' HostingMode HostingMode `json:"hostingMode,omitempty"` - // Status - READ-ONLY; The status of the Search service. Possible values include: 'running': The Search service is running and no provisioning operations are underway. 'provisioning': The Search service is being provisioned or scaled up or down. 'deleting': The Search service is being deleted. 'degraded': The Search service is degraded. This can occur when the underlying search units are not healthy. The Search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The Search service is disabled. In this state, the service will reject all API requests. 'error': The Search service is in an error state. If your service is in the degraded, disabled, or error states, it means the Azure Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. Possible values include: 'ServiceStatusRunning', 'ServiceStatusProvisioning', 'ServiceStatusDeleting', 'ServiceStatusDegraded', 'ServiceStatusDisabled', 'ServiceStatusError' + // Status - READ-ONLY; The status of the Search service. Possible values include: 'running': The Search service is running and no provisioning operations are underway. 'provisioning': The Search service is being provisioned or scaled up or down. 'deleting': The Search service is being deleted. 'degraded': The Search service is degraded. This can occur when the underlying search units are not healthy. The Search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The Search service is disabled. In this state, the service will reject all API requests. 'error': The Search service is in an error state. If your service is in the degraded, disabled, or error states, it means the Azure Cognitive Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. Possible values include: 'ServiceStatusRunning', 'ServiceStatusProvisioning', 'ServiceStatusDeleting', 'ServiceStatusDegraded', 'ServiceStatusDisabled', 'ServiceStatusError' Status ServiceStatus `json:"status,omitempty"` // StatusDetails - READ-ONLY; The details of the Search service status. StatusDetails *string `json:"statusDetails,omitempty"` @@ -469,7 +469,8 @@ func (future *ServicesCreateOrUpdateFuture) Result(client ServicesClient) (s Ser return } -// Sku defines the SKU of an Azure Search Service, which determines price tier and capacity limits. +// Sku defines the SKU of an Azure Cognitive Search Service, which determines price tier and capacity +// limits. type Sku struct { // Name - The SKU of the Search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. Possible values include: 'Free', 'Basic', 'Standard', 'Standard2', 'Standard3', 'StorageOptimizedL1', 'StorageOptimizedL2' Name SkuName `json:"name,omitempty"` diff --git a/services/search/mgmt/2015-08-19/search/operations.go b/services/search/mgmt/2015-08-19/search/operations.go index 877f46029f7e..02ff6d76cb3c 100644 --- a/services/search/mgmt/2015-08-19/search/operations.go +++ b/services/search/mgmt/2015-08-19/search/operations.go @@ -25,7 +25,7 @@ import ( "net/http" ) -// OperationsClient is the client that can be used to manage Azure Search services and API keys. +// OperationsClient is the client that can be used to manage Azure Cognitive Search services and API keys. type OperationsClient struct { BaseClient } @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/search/mgmt/2015-08-19/search/querykeys.go b/services/search/mgmt/2015-08-19/search/querykeys.go index 09b87fc88bfb..76350f77d609 100644 --- a/services/search/mgmt/2015-08-19/search/querykeys.go +++ b/services/search/mgmt/2015-08-19/search/querykeys.go @@ -26,7 +26,7 @@ import ( "net/http" ) -// QueryKeysClient is the client that can be used to manage Azure Search services and API keys. +// QueryKeysClient is the client that can be used to manage Azure Cognitive Search services and API keys. type QueryKeysClient struct { BaseClient } @@ -36,7 +36,8 @@ func NewQueryKeysClient(subscriptionID string) QueryKeysClient { return NewQueryKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueryKeysClientWithBaseURI creates an instance of the QueryKeysClient client. +// NewQueryKeysClientWithBaseURI creates an instance of the QueryKeysClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryKeysClientWithBaseURI(baseURI string, subscriptionID string) QueryKeysClient { return QueryKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -45,7 +46,8 @@ func NewQueryKeysClientWithBaseURI(baseURI string, subscriptionID string) QueryK // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service associated with the specified resource group. +// searchServiceName - the name of the Azure Cognitive Search service associated with the specified resource +// group. // name - the name of the new query API key. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. @@ -132,7 +134,8 @@ func (client QueryKeysClient) CreateResponder(resp *http.Response) (result Query // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service associated with the specified resource group. +// searchServiceName - the name of the Azure Cognitive Search service associated with the specified resource +// group. // key - the query key to be deleted. Query keys are identified by value, not by name. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. @@ -213,11 +216,12 @@ func (client QueryKeysClient) DeleteResponder(resp *http.Response) (result autor return } -// ListBySearchService returns the list of query API keys for the given Azure Search service. +// ListBySearchService returns the list of query API keys for the given Azure Cognitive Search service. // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service associated with the specified resource group. +// searchServiceName - the name of the Azure Cognitive Search service associated with the specified resource +// group. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. func (client QueryKeysClient) ListBySearchService(ctx context.Context, resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result ListQueryKeysResult, err error) { @@ -266,7 +270,7 @@ func (client QueryKeysClient) ListBySearchServicePreparer(ctx context.Context, r } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys", pathParameters), autorest.WithQueryParameters(queryParameters)) @@ -296,3 +300,88 @@ func (client QueryKeysClient) ListBySearchServiceResponder(resp *http.Response) result.Response = autorest.Response{Response: resp} return } + +// ListBySearchServiceGet returns the list of query API keys for the given Azure Cognitive Search service. +// Parameters: +// resourceGroupName - the name of the resource group within the current subscription. You can obtain this +// value from the Azure Resource Manager API or the portal. +// searchServiceName - the name of the Azure Cognitive Search service associated with the specified resource +// group. +// clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be +// included in response information as a way to track the request. +func (client QueryKeysClient) ListBySearchServiceGet(ctx context.Context, resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result ListQueryKeysResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueryKeysClient.ListBySearchServiceGet") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListBySearchServiceGetPreparer(ctx, resourceGroupName, searchServiceName, clientRequestID) + if err != nil { + err = autorest.NewErrorWithError(err, "search.QueryKeysClient", "ListBySearchServiceGet", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySearchServiceGetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "search.QueryKeysClient", "ListBySearchServiceGet", resp, "Failure sending request") + return + } + + result, err = client.ListBySearchServiceGetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "search.QueryKeysClient", "ListBySearchServiceGet", resp, "Failure responding to request") + } + + return +} + +// ListBySearchServiceGetPreparer prepares the ListBySearchServiceGet request. +func (client QueryKeysClient) ListBySearchServiceGetPreparer(ctx context.Context, resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "searchServiceName": autorest.Encode("path", searchServiceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-08-19" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if clientRequestID != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("x-ms-client-request-id", autorest.String(clientRequestID))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySearchServiceGetSender sends the ListBySearchServiceGet request. The method will close the +// http.Response Body if it receives an error. +func (client QueryKeysClient) ListBySearchServiceGetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBySearchServiceGetResponder handles the response to the ListBySearchServiceGet request. The method always +// closes the http.Response Body. +func (client QueryKeysClient) ListBySearchServiceGetResponder(resp *http.Response) (result ListQueryKeysResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/search/mgmt/2015-08-19/search/searchapi/interfaces.go b/services/search/mgmt/2015-08-19/search/searchapi/interfaces.go index e7ac5b1059c4..9b83cb6b4063 100644 --- a/services/search/mgmt/2015-08-19/search/searchapi/interfaces.go +++ b/services/search/mgmt/2015-08-19/search/searchapi/interfaces.go @@ -44,6 +44,7 @@ type QueryKeysClientAPI interface { Create(ctx context.Context, resourceGroupName string, searchServiceName string, name string, clientRequestID *uuid.UUID) (result search.QueryKey, err error) Delete(ctx context.Context, resourceGroupName string, searchServiceName string, key string, clientRequestID *uuid.UUID) (result autorest.Response, err error) ListBySearchService(ctx context.Context, resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result search.ListQueryKeysResult, err error) + ListBySearchServiceGet(ctx context.Context, resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result search.ListQueryKeysResult, err error) } var _ QueryKeysClientAPI = (*search.QueryKeysClient)(nil) diff --git a/services/search/mgmt/2015-08-19/search/services.go b/services/search/mgmt/2015-08-19/search/services.go index 518521c4c01f..ccd04d13bd21 100644 --- a/services/search/mgmt/2015-08-19/search/services.go +++ b/services/search/mgmt/2015-08-19/search/services.go @@ -27,7 +27,7 @@ import ( "net/http" ) -// ServicesClient is the client that can be used to manage Azure Search services and API keys. +// ServicesClient is the client that can be used to manage Azure Cognitive Search services and API keys. type ServicesClient struct { BaseClient } @@ -37,7 +37,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -137,11 +138,11 @@ func (client ServicesClient) CheckNameAvailabilityResponder(resp *http.Response) // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service to create or update. Search service names must only -// contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot -// contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be -// globally unique since they are part of the service URI (https://.search.windows.net). You cannot -// change the service name after the service is created. +// searchServiceName - the name of the Azure Cognitive Search service to create or update. Search service names +// must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one +// characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search +// service names must be globally unique since they are part of the service URI +// (https://.search.windows.net). You cannot change the service name after the service is created. // service - the definition of the Search service to create or update. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. @@ -243,7 +244,8 @@ func (client ServicesClient) CreateOrUpdateResponder(resp *http.Response) (resul // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service associated with the specified resource group. +// searchServiceName - the name of the Azure Cognitive Search service associated with the specified resource +// group. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. func (client ServicesClient) Delete(ctx context.Context, resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result autorest.Response, err error) { @@ -326,7 +328,8 @@ func (client ServicesClient) DeleteResponder(resp *http.Response) (result autore // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service associated with the specified resource group. +// searchServiceName - the name of the Azure Cognitive Search service associated with the specified resource +// group. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. func (client ServicesClient) Get(ctx context.Context, resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result Service, err error) { @@ -571,7 +574,7 @@ func (client ServicesClient) ListBySubscriptionResponder(resp *http.Response) (r // Parameters: // resourceGroupName - the name of the resource group within the current subscription. You can obtain this // value from the Azure Resource Manager API or the portal. -// searchServiceName - the name of the Azure Search service to update. +// searchServiceName - the name of the Azure Cognitive Search service to update. // service - the definition of the Search service to update. // clientRequestID - a client-generated GUID value that identifies this request. If specified, this will be // included in response information as a way to track the request. diff --git a/services/serialconsole/mgmt/2018-05-01/serialconsole/client.go b/services/serialconsole/mgmt/2018-05-01/serialconsole/client.go index fdc5b4671f12..76e7ef76a9cb 100644 --- a/services/serialconsole/mgmt/2018-05-01/serialconsole/client.go +++ b/services/serialconsole/mgmt/2018-05-01/serialconsole/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/client.go b/services/servicebus/mgmt/2015-08-01/servicebus/client.go index 5adb146d8a02..2ce7e05c1bb9 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/client.go +++ b/services/servicebus/mgmt/2015-08-01/servicebus/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/namespaces.go b/services/servicebus/mgmt/2015-08-01/servicebus/namespaces.go index f20b42ebb05a..e9ede6696201 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/namespaces.go +++ b/services/servicebus/mgmt/2015-08-01/servicebus/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/operations.go b/services/servicebus/mgmt/2015-08-01/servicebus/operations.go index 9714d26b2b72..8ef5c1aeeacb 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/operations.go +++ b/services/servicebus/mgmt/2015-08-01/servicebus/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/queues.go b/services/servicebus/mgmt/2015-08-01/servicebus/queues.go index 877ca11cc0e9..ae0d21e098eb 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/queues.go +++ b/services/servicebus/mgmt/2015-08-01/servicebus/queues.go @@ -36,7 +36,8 @@ func NewQueuesClient(subscriptionID string) QueuesClient { return NewQueuesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueuesClientWithBaseURI creates an instance of the QueuesClient client. +// NewQueuesClientWithBaseURI creates an instance of the QueuesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueuesClientWithBaseURI(baseURI string, subscriptionID string) QueuesClient { return QueuesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/servicebusapi/interfaces.go b/services/servicebus/mgmt/2015-08-01/servicebus/servicebusapi/interfaces.go index fdc28ea82312..60c56e81a58e 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/servicebusapi/interfaces.go +++ b/services/servicebus/mgmt/2015-08-01/servicebus/servicebusapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result servicebus.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result servicebus.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicebus.OperationsClient)(nil) @@ -40,8 +41,11 @@ type NamespacesClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.NamespaceResource, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result servicebus.SharedAccessAuthorizationRuleResource, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.SharedAccessAuthorizationRuleListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicebus.NamespaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicebus.NamespaceListResultIterator, err error) ListBySubscription(ctx context.Context) (result servicebus.NamespaceListResultPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result servicebus.NamespaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result servicebus.ResourceListKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters servicebus.RegenerateKeysParameters) (result servicebus.ResourceListKeys, err error) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters servicebus.NamespaceUpdateParameters) (result servicebus.NamespaceResource, err error) @@ -58,7 +62,9 @@ type QueuesClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result servicebus.QueueResource, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result servicebus.SharedAccessAuthorizationRuleResource, err error) ListAll(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.QueueListResultPage, err error) + ListAllComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.QueueListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result servicebus.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result servicebus.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result servicebus.ResourceListKeys, err error) PostAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result servicebus.SharedAccessAuthorizationRuleResource, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters servicebus.RegenerateKeysParameters) (result servicebus.ResourceListKeys, err error) @@ -75,7 +81,9 @@ type TopicsClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, topicName string) (result servicebus.TopicResource, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result servicebus.SharedAccessAuthorizationRuleResource, err error) ListAll(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.TopicListResultPage, err error) + ListAllComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.TopicListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, topicName string) (result servicebus.SharedAccessAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string) (result servicebus.SharedAccessAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result servicebus.ResourceListKeys, err error) PostAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result servicebus.SharedAccessAuthorizationRuleResource, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters servicebus.RegenerateKeysParameters) (result servicebus.ResourceListKeys, err error) @@ -89,6 +97,7 @@ type SubscriptionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (result servicebus.SubscriptionResource, err error) ListAll(ctx context.Context, resourceGroupName string, namespaceName string, topicName string) (result servicebus.SubscriptionListResultPage, err error) + ListAllComplete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string) (result servicebus.SubscriptionListResultIterator, err error) } var _ SubscriptionsClientAPI = (*servicebus.SubscriptionsClient)(nil) diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/subscriptions.go b/services/servicebus/mgmt/2015-08-01/servicebus/subscriptions.go index 530b6ba40f04..7936c820c4a0 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/subscriptions.go +++ b/services/servicebus/mgmt/2015-08-01/servicebus/subscriptions.go @@ -36,7 +36,8 @@ func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2015-08-01/servicebus/topics.go b/services/servicebus/mgmt/2015-08-01/servicebus/topics.go index 33accfd7e5eb..9bd79aa67ca1 100644 --- a/services/servicebus/mgmt/2015-08-01/servicebus/topics.go +++ b/services/servicebus/mgmt/2015-08-01/servicebus/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/client.go b/services/servicebus/mgmt/2017-04-01/servicebus/client.go index d061bd5a506f..2c52d76272ec 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/client.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/disasterrecoveryconfigs.go b/services/servicebus/mgmt/2017-04-01/servicebus/disasterrecoveryconfigs.go index dd9f7bb85168..d8c0622bee2d 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/disasterrecoveryconfigs.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/disasterrecoveryconfigs.go @@ -36,7 +36,9 @@ func NewDisasterRecoveryConfigsClient(subscriptionID string) DisasterRecoveryCon return NewDisasterRecoveryConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisasterRecoveryConfigsClientWithBaseURI creates an instance of the DisasterRecoveryConfigsClient client. +// NewDisasterRecoveryConfigsClientWithBaseURI creates an instance of the DisasterRecoveryConfigsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDisasterRecoveryConfigsClientWithBaseURI(baseURI string, subscriptionID string) DisasterRecoveryConfigsClient { return DisasterRecoveryConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/eventhubs.go b/services/servicebus/mgmt/2017-04-01/servicebus/eventhubs.go index ac2c1df100a0..f011979deb43 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/eventhubs.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/eventhubs.go @@ -36,7 +36,8 @@ func NewEventHubsClient(subscriptionID string) EventHubsClient { return NewEventHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client. +// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventHubsClient { return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go b/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go index 6e1d2d21f497..8712ef9be141 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go @@ -36,7 +36,9 @@ func NewMigrationConfigsClient(subscriptionID string) MigrationConfigsClient { return NewMigrationConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMigrationConfigsClientWithBaseURI creates an instance of the MigrationConfigsClient client. +// NewMigrationConfigsClientWithBaseURI creates an instance of the MigrationConfigsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMigrationConfigsClientWithBaseURI(baseURI string, subscriptionID string) MigrationConfigsClient { return MigrationConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go b/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go index e9034b3b14cb..de0759464e3f 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/operations.go b/services/servicebus/mgmt/2017-04-01/servicebus/operations.go index 7fe64bdd817a..4ff26d20b587 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/operations.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/premiummessagingregions.go b/services/servicebus/mgmt/2017-04-01/servicebus/premiummessagingregions.go index 3fbb68a3e6a8..f69505d5b5c2 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/premiummessagingregions.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/premiummessagingregions.go @@ -35,7 +35,9 @@ func NewPremiumMessagingRegionsClient(subscriptionID string) PremiumMessagingReg return NewPremiumMessagingRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPremiumMessagingRegionsClientWithBaseURI creates an instance of the PremiumMessagingRegionsClient client. +// NewPremiumMessagingRegionsClientWithBaseURI creates an instance of the PremiumMessagingRegionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewPremiumMessagingRegionsClientWithBaseURI(baseURI string, subscriptionID string) PremiumMessagingRegionsClient { return PremiumMessagingRegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/queues.go b/services/servicebus/mgmt/2017-04-01/servicebus/queues.go index 2c0c1c04b696..a747acf0e98d 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/queues.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/queues.go @@ -36,7 +36,8 @@ func NewQueuesClient(subscriptionID string) QueuesClient { return NewQueuesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueuesClientWithBaseURI creates an instance of the QueuesClient client. +// NewQueuesClientWithBaseURI creates an instance of the QueuesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueuesClientWithBaseURI(baseURI string, subscriptionID string) QueuesClient { return QueuesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/regions.go b/services/servicebus/mgmt/2017-04-01/servicebus/regions.go index 416bec3f5651..29a9c7a2e605 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/regions.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/regions.go @@ -36,7 +36,8 @@ func NewRegionsClient(subscriptionID string) RegionsClient { return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/rules.go b/services/servicebus/mgmt/2017-04-01/servicebus/rules.go index 52138da6134b..49eb43acab9e 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/rules.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/rules.go @@ -36,7 +36,8 @@ func NewRulesClient(subscriptionID string) RulesClient { return NewRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRulesClientWithBaseURI creates an instance of the RulesClient client. +// NewRulesClientWithBaseURI creates an instance of the RulesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRulesClientWithBaseURI(baseURI string, subscriptionID string) RulesClient { return RulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/servicebusapi/interfaces.go b/services/servicebus/mgmt/2017-04-01/servicebus/servicebusapi/interfaces.go index a5a9dcb0efe7..791c1bbce464 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/servicebusapi/interfaces.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/servicebusapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result servicebus.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result servicebus.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicebus.OperationsClient)(nil) @@ -42,10 +43,14 @@ type NamespacesClientAPI interface { GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result servicebus.SBAuthorizationRule, err error) GetNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.NetworkRuleSet, err error) List(ctx context.Context) (result servicebus.SBNamespaceListResultPage, err error) + ListComplete(ctx context.Context) (result servicebus.SBNamespaceListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.SBAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.SBAuthorizationRuleListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicebus.SBNamespaceListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicebus.SBNamespaceListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result servicebus.AccessKeys, err error) ListNetworkRuleSets(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.NetworkRuleSetListResultPage, err error) + ListNetworkRuleSetsComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.NetworkRuleSetListResultIterator, err error) Migrate(ctx context.Context, resourceGroupName string, namespaceName string, parameters servicebus.SBNamespaceMigrate) (result autorest.Response, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters servicebus.RegenerateAccessKeyParameters) (result servicebus.AccessKeys, err error) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters servicebus.SBNamespaceUpdateParameters) (result servicebus.SBNamespace, err error) @@ -63,7 +68,9 @@ type DisasterRecoveryConfigsClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result servicebus.ArmDisasterRecovery, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string) (result servicebus.SBAuthorizationRule, err error) List(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.ArmDisasterRecoveryListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.ArmDisasterRecoveryListResultIterator, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result servicebus.SBAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result servicebus.SBAuthorizationRuleListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string) (result servicebus.AccessKeys, err error) } @@ -76,6 +83,7 @@ type MigrationConfigsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, namespaceName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.MigrationConfigProperties, err error) List(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.MigrationConfigListResultPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.MigrationConfigListResultIterator, err error) Revert(ctx context.Context, resourceGroupName string, namespaceName string) (result autorest.Response, err error) } @@ -90,7 +98,9 @@ type QueuesClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result servicebus.SBQueue, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result servicebus.SBAuthorizationRule, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result servicebus.SBAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result servicebus.SBAuthorizationRuleListResultIterator, err error) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result servicebus.SBQueueListResultPage, err error) + ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result servicebus.SBQueueListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result servicebus.AccessKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters servicebus.RegenerateAccessKeyParameters) (result servicebus.AccessKeys, err error) } @@ -106,7 +116,9 @@ type TopicsClientAPI interface { Get(ctx context.Context, resourceGroupName string, namespaceName string, topicName string) (result servicebus.SBTopic, err error) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result servicebus.SBAuthorizationRule, err error) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, topicName string) (result servicebus.SBAuthorizationRuleListResultPage, err error) + ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string) (result servicebus.SBAuthorizationRuleListResultIterator, err error) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result servicebus.SBTopicListResultPage, err error) + ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result servicebus.SBTopicListResultIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result servicebus.AccessKeys, err error) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters servicebus.RegenerateAccessKeyParameters) (result servicebus.AccessKeys, err error) } @@ -119,6 +131,7 @@ type SubscriptionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (result servicebus.SBSubscription, err error) ListByTopic(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, skip *int32, top *int32) (result servicebus.SBSubscriptionListResultPage, err error) + ListByTopicComplete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, skip *int32, top *int32) (result servicebus.SBSubscriptionListResultIterator, err error) } var _ SubscriptionsClientAPI = (*servicebus.SubscriptionsClient)(nil) @@ -129,6 +142,7 @@ type RulesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string) (result servicebus.Rule, err error) ListBySubscriptions(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, skip *int32, top *int32) (result servicebus.RuleListResultPage, err error) + ListBySubscriptionsComplete(ctx context.Context, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, skip *int32, top *int32) (result servicebus.RuleListResultIterator, err error) } var _ RulesClientAPI = (*servicebus.RulesClient)(nil) @@ -136,6 +150,7 @@ var _ RulesClientAPI = (*servicebus.RulesClient)(nil) // RegionsClientAPI contains the set of methods on the RegionsClient type. type RegionsClientAPI interface { ListBySku(ctx context.Context, sku string) (result servicebus.PremiumMessagingRegionsListResultPage, err error) + ListBySkuComplete(ctx context.Context, sku string) (result servicebus.PremiumMessagingRegionsListResultIterator, err error) } var _ RegionsClientAPI = (*servicebus.RegionsClient)(nil) @@ -143,6 +158,7 @@ var _ RegionsClientAPI = (*servicebus.RegionsClient)(nil) // PremiumMessagingRegionsClientAPI contains the set of methods on the PremiumMessagingRegionsClient type. type PremiumMessagingRegionsClientAPI interface { List(ctx context.Context) (result servicebus.PremiumMessagingRegionsListResultPage, err error) + ListComplete(ctx context.Context) (result servicebus.PremiumMessagingRegionsListResultIterator, err error) } var _ PremiumMessagingRegionsClientAPI = (*servicebus.PremiumMessagingRegionsClient)(nil) @@ -150,6 +166,7 @@ var _ PremiumMessagingRegionsClientAPI = (*servicebus.PremiumMessagingRegionsCli // EventHubsClientAPI contains the set of methods on the EventHubsClient type. type EventHubsClientAPI interface { ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.EventHubListResultPage, err error) + ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result servicebus.EventHubListResultIterator, err error) } var _ EventHubsClientAPI = (*servicebus.EventHubsClient)(nil) diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go b/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go index 118d6679eccb..5db214ebac01 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go @@ -36,7 +36,8 @@ func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/topics.go b/services/servicebus/mgmt/2017-04-01/servicebus/topics.go index 7d625a497fbf..29d02c881d93 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/topics.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/topics.go @@ -36,7 +36,8 @@ func NewTopicsClient(subscriptionID string) TopicsClient { return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client. +// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient { return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/6.2/servicefabric/client.go b/services/servicefabric/6.2/servicefabric/client.go index 71be58854679..f6144d36d4d6 100644 --- a/services/servicefabric/6.2/servicefabric/client.go +++ b/services/servicefabric/6.2/servicefabric/client.go @@ -47,7 +47,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/servicefabric/6.3/servicefabric/client.go b/services/servicefabric/6.3/servicefabric/client.go index d8904d5b4cf5..77d47c899044 100644 --- a/services/servicefabric/6.3/servicefabric/client.go +++ b/services/servicefabric/6.3/servicefabric/client.go @@ -47,7 +47,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/servicefabric/6.4/servicefabric/client.go b/services/servicefabric/6.4/servicefabric/client.go index ea95e17d7d30..7c38ff102330 100644 --- a/services/servicefabric/6.4/servicefabric/client.go +++ b/services/servicefabric/6.4/servicefabric/client.go @@ -47,7 +47,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/servicefabric/6.4/servicefabric/meshapplication.go b/services/servicefabric/6.4/servicefabric/meshapplication.go index 0e50e7d31eef..da1033dededb 100644 --- a/services/servicefabric/6.4/servicefabric/meshapplication.go +++ b/services/servicefabric/6.4/servicefabric/meshapplication.go @@ -37,7 +37,8 @@ func NewMeshApplicationClient() MeshApplicationClient { return NewMeshApplicationClientWithBaseURI(DefaultBaseURI) } -// NewMeshApplicationClientWithBaseURI creates an instance of the MeshApplicationClient client. +// NewMeshApplicationClientWithBaseURI creates an instance of the MeshApplicationClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshApplicationClientWithBaseURI(baseURI string) MeshApplicationClient { return MeshApplicationClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.4/servicefabric/meshcodepackage.go b/services/servicefabric/6.4/servicefabric/meshcodepackage.go index 2eee99f9eadc..a8d82c8ff0ab 100644 --- a/services/servicefabric/6.4/servicefabric/meshcodepackage.go +++ b/services/servicefabric/6.4/servicefabric/meshcodepackage.go @@ -36,7 +36,8 @@ func NewMeshCodePackageClient() MeshCodePackageClient { return NewMeshCodePackageClientWithBaseURI(DefaultBaseURI) } -// NewMeshCodePackageClientWithBaseURI creates an instance of the MeshCodePackageClient client. +// NewMeshCodePackageClientWithBaseURI creates an instance of the MeshCodePackageClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshCodePackageClientWithBaseURI(baseURI string) MeshCodePackageClient { return MeshCodePackageClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.4/servicefabric/meshgateway.go b/services/servicefabric/6.4/servicefabric/meshgateway.go index 96bd0a2923f5..1e355401adcf 100644 --- a/services/servicefabric/6.4/servicefabric/meshgateway.go +++ b/services/servicefabric/6.4/servicefabric/meshgateway.go @@ -37,7 +37,8 @@ func NewMeshGatewayClient() MeshGatewayClient { return NewMeshGatewayClientWithBaseURI(DefaultBaseURI) } -// NewMeshGatewayClientWithBaseURI creates an instance of the MeshGatewayClient client. +// NewMeshGatewayClientWithBaseURI creates an instance of the MeshGatewayClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshGatewayClientWithBaseURI(baseURI string) MeshGatewayClient { return MeshGatewayClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.4/servicefabric/meshnetwork.go b/services/servicefabric/6.4/servicefabric/meshnetwork.go index 7d9cb989f2a8..c37a6145920c 100644 --- a/services/servicefabric/6.4/servicefabric/meshnetwork.go +++ b/services/servicefabric/6.4/servicefabric/meshnetwork.go @@ -37,7 +37,8 @@ func NewMeshNetworkClient() MeshNetworkClient { return NewMeshNetworkClientWithBaseURI(DefaultBaseURI) } -// NewMeshNetworkClientWithBaseURI creates an instance of the MeshNetworkClient client. +// NewMeshNetworkClientWithBaseURI creates an instance of the MeshNetworkClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshNetworkClientWithBaseURI(baseURI string) MeshNetworkClient { return MeshNetworkClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.4/servicefabric/meshsecret.go b/services/servicefabric/6.4/servicefabric/meshsecret.go index 5dfb02644b76..1d9060e2f130 100644 --- a/services/servicefabric/6.4/servicefabric/meshsecret.go +++ b/services/servicefabric/6.4/servicefabric/meshsecret.go @@ -37,7 +37,8 @@ func NewMeshSecretClient() MeshSecretClient { return NewMeshSecretClientWithBaseURI(DefaultBaseURI) } -// NewMeshSecretClientWithBaseURI creates an instance of the MeshSecretClient client. +// NewMeshSecretClientWithBaseURI creates an instance of the MeshSecretClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshSecretClientWithBaseURI(baseURI string) MeshSecretClient { return MeshSecretClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.4/servicefabric/meshsecretvalue.go b/services/servicefabric/6.4/servicefabric/meshsecretvalue.go index e0f410d107a0..3bd3f8bda46e 100644 --- a/services/servicefabric/6.4/servicefabric/meshsecretvalue.go +++ b/services/servicefabric/6.4/servicefabric/meshsecretvalue.go @@ -37,7 +37,8 @@ func NewMeshSecretValueClient() MeshSecretValueClient { return NewMeshSecretValueClientWithBaseURI(DefaultBaseURI) } -// NewMeshSecretValueClientWithBaseURI creates an instance of the MeshSecretValueClient client. +// NewMeshSecretValueClientWithBaseURI creates an instance of the MeshSecretValueClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshSecretValueClientWithBaseURI(baseURI string) MeshSecretValueClient { return MeshSecretValueClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.4/servicefabric/meshservice.go b/services/servicefabric/6.4/servicefabric/meshservice.go index edab24224fd7..a69dff3e0830 100644 --- a/services/servicefabric/6.4/servicefabric/meshservice.go +++ b/services/servicefabric/6.4/servicefabric/meshservice.go @@ -36,7 +36,8 @@ func NewMeshServiceClient() MeshServiceClient { return NewMeshServiceClientWithBaseURI(DefaultBaseURI) } -// NewMeshServiceClientWithBaseURI creates an instance of the MeshServiceClient client. +// NewMeshServiceClientWithBaseURI creates an instance of the MeshServiceClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshServiceClientWithBaseURI(baseURI string) MeshServiceClient { return MeshServiceClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.4/servicefabric/meshservicereplica.go b/services/servicefabric/6.4/servicefabric/meshservicereplica.go index 88209751688f..10d459c71ac2 100644 --- a/services/servicefabric/6.4/servicefabric/meshservicereplica.go +++ b/services/servicefabric/6.4/servicefabric/meshservicereplica.go @@ -36,7 +36,9 @@ func NewMeshServiceReplicaClient() MeshServiceReplicaClient { return NewMeshServiceReplicaClientWithBaseURI(DefaultBaseURI) } -// NewMeshServiceReplicaClientWithBaseURI creates an instance of the MeshServiceReplicaClient client. +// NewMeshServiceReplicaClientWithBaseURI creates an instance of the MeshServiceReplicaClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMeshServiceReplicaClientWithBaseURI(baseURI string) MeshServiceReplicaClient { return MeshServiceReplicaClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.4/servicefabric/meshvolume.go b/services/servicefabric/6.4/servicefabric/meshvolume.go index 60e5871e842b..dcec2e859e72 100644 --- a/services/servicefabric/6.4/servicefabric/meshvolume.go +++ b/services/servicefabric/6.4/servicefabric/meshvolume.go @@ -37,7 +37,8 @@ func NewMeshVolumeClient() MeshVolumeClient { return NewMeshVolumeClientWithBaseURI(DefaultBaseURI) } -// NewMeshVolumeClientWithBaseURI creates an instance of the MeshVolumeClient client. +// NewMeshVolumeClientWithBaseURI creates an instance of the MeshVolumeClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshVolumeClientWithBaseURI(baseURI string) MeshVolumeClient { return MeshVolumeClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/client.go b/services/servicefabric/6.5/servicefabric/client.go index 2fb607b3e12a..9d683292e9cf 100644 --- a/services/servicefabric/6.5/servicefabric/client.go +++ b/services/servicefabric/6.5/servicefabric/client.go @@ -47,7 +47,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/servicefabric/6.5/servicefabric/meshapplication.go b/services/servicefabric/6.5/servicefabric/meshapplication.go index 1fd8af88e8fe..87255264a938 100644 --- a/services/servicefabric/6.5/servicefabric/meshapplication.go +++ b/services/servicefabric/6.5/servicefabric/meshapplication.go @@ -37,7 +37,8 @@ func NewMeshApplicationClient() MeshApplicationClient { return NewMeshApplicationClientWithBaseURI(DefaultBaseURI) } -// NewMeshApplicationClientWithBaseURI creates an instance of the MeshApplicationClient client. +// NewMeshApplicationClientWithBaseURI creates an instance of the MeshApplicationClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshApplicationClientWithBaseURI(baseURI string) MeshApplicationClient { return MeshApplicationClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/meshcodepackage.go b/services/servicefabric/6.5/servicefabric/meshcodepackage.go index 2eee99f9eadc..a8d82c8ff0ab 100644 --- a/services/servicefabric/6.5/servicefabric/meshcodepackage.go +++ b/services/servicefabric/6.5/servicefabric/meshcodepackage.go @@ -36,7 +36,8 @@ func NewMeshCodePackageClient() MeshCodePackageClient { return NewMeshCodePackageClientWithBaseURI(DefaultBaseURI) } -// NewMeshCodePackageClientWithBaseURI creates an instance of the MeshCodePackageClient client. +// NewMeshCodePackageClientWithBaseURI creates an instance of the MeshCodePackageClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshCodePackageClientWithBaseURI(baseURI string) MeshCodePackageClient { return MeshCodePackageClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/meshgateway.go b/services/servicefabric/6.5/servicefabric/meshgateway.go index 96bd0a2923f5..1e355401adcf 100644 --- a/services/servicefabric/6.5/servicefabric/meshgateway.go +++ b/services/servicefabric/6.5/servicefabric/meshgateway.go @@ -37,7 +37,8 @@ func NewMeshGatewayClient() MeshGatewayClient { return NewMeshGatewayClientWithBaseURI(DefaultBaseURI) } -// NewMeshGatewayClientWithBaseURI creates an instance of the MeshGatewayClient client. +// NewMeshGatewayClientWithBaseURI creates an instance of the MeshGatewayClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshGatewayClientWithBaseURI(baseURI string) MeshGatewayClient { return MeshGatewayClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/meshnetwork.go b/services/servicefabric/6.5/servicefabric/meshnetwork.go index 7d9cb989f2a8..c37a6145920c 100644 --- a/services/servicefabric/6.5/servicefabric/meshnetwork.go +++ b/services/servicefabric/6.5/servicefabric/meshnetwork.go @@ -37,7 +37,8 @@ func NewMeshNetworkClient() MeshNetworkClient { return NewMeshNetworkClientWithBaseURI(DefaultBaseURI) } -// NewMeshNetworkClientWithBaseURI creates an instance of the MeshNetworkClient client. +// NewMeshNetworkClientWithBaseURI creates an instance of the MeshNetworkClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshNetworkClientWithBaseURI(baseURI string) MeshNetworkClient { return MeshNetworkClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/meshsecret.go b/services/servicefabric/6.5/servicefabric/meshsecret.go index 5dfb02644b76..1d9060e2f130 100644 --- a/services/servicefabric/6.5/servicefabric/meshsecret.go +++ b/services/servicefabric/6.5/servicefabric/meshsecret.go @@ -37,7 +37,8 @@ func NewMeshSecretClient() MeshSecretClient { return NewMeshSecretClientWithBaseURI(DefaultBaseURI) } -// NewMeshSecretClientWithBaseURI creates an instance of the MeshSecretClient client. +// NewMeshSecretClientWithBaseURI creates an instance of the MeshSecretClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshSecretClientWithBaseURI(baseURI string) MeshSecretClient { return MeshSecretClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/meshsecretvalue.go b/services/servicefabric/6.5/servicefabric/meshsecretvalue.go index e0f410d107a0..3bd3f8bda46e 100644 --- a/services/servicefabric/6.5/servicefabric/meshsecretvalue.go +++ b/services/servicefabric/6.5/servicefabric/meshsecretvalue.go @@ -37,7 +37,8 @@ func NewMeshSecretValueClient() MeshSecretValueClient { return NewMeshSecretValueClientWithBaseURI(DefaultBaseURI) } -// NewMeshSecretValueClientWithBaseURI creates an instance of the MeshSecretValueClient client. +// NewMeshSecretValueClientWithBaseURI creates an instance of the MeshSecretValueClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshSecretValueClientWithBaseURI(baseURI string) MeshSecretValueClient { return MeshSecretValueClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/meshservice.go b/services/servicefabric/6.5/servicefabric/meshservice.go index edab24224fd7..a69dff3e0830 100644 --- a/services/servicefabric/6.5/servicefabric/meshservice.go +++ b/services/servicefabric/6.5/servicefabric/meshservice.go @@ -36,7 +36,8 @@ func NewMeshServiceClient() MeshServiceClient { return NewMeshServiceClientWithBaseURI(DefaultBaseURI) } -// NewMeshServiceClientWithBaseURI creates an instance of the MeshServiceClient client. +// NewMeshServiceClientWithBaseURI creates an instance of the MeshServiceClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshServiceClientWithBaseURI(baseURI string) MeshServiceClient { return MeshServiceClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/meshservicereplica.go b/services/servicefabric/6.5/servicefabric/meshservicereplica.go index 88209751688f..10d459c71ac2 100644 --- a/services/servicefabric/6.5/servicefabric/meshservicereplica.go +++ b/services/servicefabric/6.5/servicefabric/meshservicereplica.go @@ -36,7 +36,9 @@ func NewMeshServiceReplicaClient() MeshServiceReplicaClient { return NewMeshServiceReplicaClientWithBaseURI(DefaultBaseURI) } -// NewMeshServiceReplicaClientWithBaseURI creates an instance of the MeshServiceReplicaClient client. +// NewMeshServiceReplicaClientWithBaseURI creates an instance of the MeshServiceReplicaClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMeshServiceReplicaClientWithBaseURI(baseURI string) MeshServiceReplicaClient { return MeshServiceReplicaClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/6.5/servicefabric/meshvolume.go b/services/servicefabric/6.5/servicefabric/meshvolume.go index 60e5871e842b..dcec2e859e72 100644 --- a/services/servicefabric/6.5/servicefabric/meshvolume.go +++ b/services/servicefabric/6.5/servicefabric/meshvolume.go @@ -37,7 +37,8 @@ func NewMeshVolumeClient() MeshVolumeClient { return NewMeshVolumeClientWithBaseURI(DefaultBaseURI) } -// NewMeshVolumeClientWithBaseURI creates an instance of the MeshVolumeClient client. +// NewMeshVolumeClientWithBaseURI creates an instance of the MeshVolumeClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshVolumeClientWithBaseURI(baseURI string) MeshVolumeClient { return MeshVolumeClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/client.go b/services/servicefabric/7.0/servicefabric/client.go index 7f8595f21b2e..1bf4675da73e 100644 --- a/services/servicefabric/7.0/servicefabric/client.go +++ b/services/servicefabric/7.0/servicefabric/client.go @@ -47,7 +47,8 @@ func New() BaseClient { return NewWithBaseURI(DefaultBaseURI) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/servicefabric/7.0/servicefabric/meshapplication.go b/services/servicefabric/7.0/servicefabric/meshapplication.go index b9b4cc443985..eba2efd090db 100644 --- a/services/servicefabric/7.0/servicefabric/meshapplication.go +++ b/services/servicefabric/7.0/servicefabric/meshapplication.go @@ -37,7 +37,8 @@ func NewMeshApplicationClient() MeshApplicationClient { return NewMeshApplicationClientWithBaseURI(DefaultBaseURI) } -// NewMeshApplicationClientWithBaseURI creates an instance of the MeshApplicationClient client. +// NewMeshApplicationClientWithBaseURI creates an instance of the MeshApplicationClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshApplicationClientWithBaseURI(baseURI string) MeshApplicationClient { return MeshApplicationClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/meshcodepackage.go b/services/servicefabric/7.0/servicefabric/meshcodepackage.go index 2eee99f9eadc..a8d82c8ff0ab 100644 --- a/services/servicefabric/7.0/servicefabric/meshcodepackage.go +++ b/services/servicefabric/7.0/servicefabric/meshcodepackage.go @@ -36,7 +36,8 @@ func NewMeshCodePackageClient() MeshCodePackageClient { return NewMeshCodePackageClientWithBaseURI(DefaultBaseURI) } -// NewMeshCodePackageClientWithBaseURI creates an instance of the MeshCodePackageClient client. +// NewMeshCodePackageClientWithBaseURI creates an instance of the MeshCodePackageClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshCodePackageClientWithBaseURI(baseURI string) MeshCodePackageClient { return MeshCodePackageClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/meshgateway.go b/services/servicefabric/7.0/servicefabric/meshgateway.go index 96bd0a2923f5..1e355401adcf 100644 --- a/services/servicefabric/7.0/servicefabric/meshgateway.go +++ b/services/servicefabric/7.0/servicefabric/meshgateway.go @@ -37,7 +37,8 @@ func NewMeshGatewayClient() MeshGatewayClient { return NewMeshGatewayClientWithBaseURI(DefaultBaseURI) } -// NewMeshGatewayClientWithBaseURI creates an instance of the MeshGatewayClient client. +// NewMeshGatewayClientWithBaseURI creates an instance of the MeshGatewayClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshGatewayClientWithBaseURI(baseURI string) MeshGatewayClient { return MeshGatewayClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/meshnetwork.go b/services/servicefabric/7.0/servicefabric/meshnetwork.go index 7d9cb989f2a8..c37a6145920c 100644 --- a/services/servicefabric/7.0/servicefabric/meshnetwork.go +++ b/services/servicefabric/7.0/servicefabric/meshnetwork.go @@ -37,7 +37,8 @@ func NewMeshNetworkClient() MeshNetworkClient { return NewMeshNetworkClientWithBaseURI(DefaultBaseURI) } -// NewMeshNetworkClientWithBaseURI creates an instance of the MeshNetworkClient client. +// NewMeshNetworkClientWithBaseURI creates an instance of the MeshNetworkClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshNetworkClientWithBaseURI(baseURI string) MeshNetworkClient { return MeshNetworkClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/meshsecret.go b/services/servicefabric/7.0/servicefabric/meshsecret.go index 5dfb02644b76..1d9060e2f130 100644 --- a/services/servicefabric/7.0/servicefabric/meshsecret.go +++ b/services/servicefabric/7.0/servicefabric/meshsecret.go @@ -37,7 +37,8 @@ func NewMeshSecretClient() MeshSecretClient { return NewMeshSecretClientWithBaseURI(DefaultBaseURI) } -// NewMeshSecretClientWithBaseURI creates an instance of the MeshSecretClient client. +// NewMeshSecretClientWithBaseURI creates an instance of the MeshSecretClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshSecretClientWithBaseURI(baseURI string) MeshSecretClient { return MeshSecretClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/meshsecretvalue.go b/services/servicefabric/7.0/servicefabric/meshsecretvalue.go index e0f410d107a0..3bd3f8bda46e 100644 --- a/services/servicefabric/7.0/servicefabric/meshsecretvalue.go +++ b/services/servicefabric/7.0/servicefabric/meshsecretvalue.go @@ -37,7 +37,8 @@ func NewMeshSecretValueClient() MeshSecretValueClient { return NewMeshSecretValueClientWithBaseURI(DefaultBaseURI) } -// NewMeshSecretValueClientWithBaseURI creates an instance of the MeshSecretValueClient client. +// NewMeshSecretValueClientWithBaseURI creates an instance of the MeshSecretValueClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshSecretValueClientWithBaseURI(baseURI string) MeshSecretValueClient { return MeshSecretValueClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/meshservice.go b/services/servicefabric/7.0/servicefabric/meshservice.go index edab24224fd7..a69dff3e0830 100644 --- a/services/servicefabric/7.0/servicefabric/meshservice.go +++ b/services/servicefabric/7.0/servicefabric/meshservice.go @@ -36,7 +36,8 @@ func NewMeshServiceClient() MeshServiceClient { return NewMeshServiceClientWithBaseURI(DefaultBaseURI) } -// NewMeshServiceClientWithBaseURI creates an instance of the MeshServiceClient client. +// NewMeshServiceClientWithBaseURI creates an instance of the MeshServiceClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshServiceClientWithBaseURI(baseURI string) MeshServiceClient { return MeshServiceClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/meshservicereplica.go b/services/servicefabric/7.0/servicefabric/meshservicereplica.go index 88209751688f..10d459c71ac2 100644 --- a/services/servicefabric/7.0/servicefabric/meshservicereplica.go +++ b/services/servicefabric/7.0/servicefabric/meshservicereplica.go @@ -36,7 +36,9 @@ func NewMeshServiceReplicaClient() MeshServiceReplicaClient { return NewMeshServiceReplicaClientWithBaseURI(DefaultBaseURI) } -// NewMeshServiceReplicaClientWithBaseURI creates an instance of the MeshServiceReplicaClient client. +// NewMeshServiceReplicaClientWithBaseURI creates an instance of the MeshServiceReplicaClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMeshServiceReplicaClientWithBaseURI(baseURI string) MeshServiceReplicaClient { return MeshServiceReplicaClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/7.0/servicefabric/meshvolume.go b/services/servicefabric/7.0/servicefabric/meshvolume.go index 60e5871e842b..dcec2e859e72 100644 --- a/services/servicefabric/7.0/servicefabric/meshvolume.go +++ b/services/servicefabric/7.0/servicefabric/meshvolume.go @@ -37,7 +37,8 @@ func NewMeshVolumeClient() MeshVolumeClient { return NewMeshVolumeClientWithBaseURI(DefaultBaseURI) } -// NewMeshVolumeClientWithBaseURI creates an instance of the MeshVolumeClient client. +// NewMeshVolumeClientWithBaseURI creates an instance of the MeshVolumeClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMeshVolumeClientWithBaseURI(baseURI string) MeshVolumeClient { return MeshVolumeClient{NewWithBaseURI(baseURI)} } diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/client.go b/services/servicefabric/mgmt/2016-09-01/servicefabric/client.go index 2587cb96557f..7ed4f67a5ee0 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/client.go +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go b/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go index 3b4e3f71c813..f31b140f4daa 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/clusterversions.go b/services/servicefabric/mgmt/2016-09-01/servicefabric/clusterversions.go index df8c50cd05db..23b6951df353 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/clusterversions.go +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/clusterversions.go @@ -35,7 +35,8 @@ func NewClusterVersionsClient(subscriptionID string) ClusterVersionsClient { return NewClusterVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client. +// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClusterVersionsClientWithBaseURI(baseURI string, subscriptionID string) ClusterVersionsClient { return ClusterVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/operations.go b/services/servicefabric/mgmt/2016-09-01/servicefabric/operations.go index d8f30188e3a2..cfe6e4473c1a 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/operations.go +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/servicefabricapi/interfaces.go b/services/servicefabric/mgmt/2016-09-01/servicefabric/servicefabricapi/interfaces.go index 074993a18c92..c42b0144ab2b 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/servicefabricapi/interfaces.go +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/servicefabricapi/interfaces.go @@ -29,7 +29,9 @@ type ClustersClientAPI interface { Delete(ctx context.Context, resourceGroupName string, clusterName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, clusterName string) (result servicefabric.Cluster, err error) List(ctx context.Context) (result servicefabric.ClusterListResultPage, err error) + ListComplete(ctx context.Context) (result servicefabric.ClusterListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result servicefabric.ClusterListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result servicefabric.ClusterListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters servicefabric.ClusterUpdateParameters) (result servicefabric.ClustersUpdateFuture, err error) } @@ -39,8 +41,11 @@ var _ ClustersClientAPI = (*servicefabric.ClustersClient)(nil) type ClusterVersionsClientAPI interface { Get(ctx context.Context, location string, environment string, clusterVersion string) (result servicefabric.ClusterCodeVersionsResult, err error) List(ctx context.Context, location string) (result servicefabric.ClusterCodeVersionsListResultPage, err error) + ListComplete(ctx context.Context, location string) (result servicefabric.ClusterCodeVersionsListResultIterator, err error) ListByEnvironment(ctx context.Context, location string, environment string) (result servicefabric.ClusterCodeVersionsListResultPage, err error) + ListByEnvironmentComplete(ctx context.Context, location string, environment string) (result servicefabric.ClusterCodeVersionsListResultIterator, err error) ListByVersion(ctx context.Context, location string, clusterVersion string) (result servicefabric.ClusterCodeVersionsListResultPage, err error) + ListByVersionComplete(ctx context.Context, location string, clusterVersion string) (result servicefabric.ClusterCodeVersionsListResultIterator, err error) } var _ ClusterVersionsClientAPI = (*servicefabric.ClusterVersionsClient)(nil) @@ -48,6 +53,7 @@ var _ ClusterVersionsClientAPI = (*servicefabric.ClusterVersionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result servicefabric.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result servicefabric.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicefabric.OperationsClient)(nil) diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/applications.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/applications.go index 6c0a9e30423e..23470d6971ab 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/applications.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/applications.go @@ -35,7 +35,8 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypes.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypes.go index d13c129ed001..e409c54fa8b4 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypes.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypes.go @@ -35,7 +35,9 @@ func NewApplicationTypesClient(subscriptionID string) ApplicationTypesClient { return NewApplicationTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationTypesClientWithBaseURI creates an instance of the ApplicationTypesClient client. +// NewApplicationTypesClientWithBaseURI creates an instance of the ApplicationTypesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationTypesClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypesClient { return ApplicationTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypeversions.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypeversions.go index ac8ba3ed0b56..2f653f2feca5 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypeversions.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/applicationtypeversions.go @@ -36,7 +36,9 @@ func NewApplicationTypeVersionsClient(subscriptionID string) ApplicationTypeVers return NewApplicationTypeVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationTypeVersionsClientWithBaseURI creates an instance of the ApplicationTypeVersionsClient client. +// NewApplicationTypeVersionsClientWithBaseURI creates an instance of the ApplicationTypeVersionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewApplicationTypeVersionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypeVersionsClient { return ApplicationTypeVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/client.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/client.go index 5d0f53e073fc..c80825792d83 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/client.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go index 74fce5e5ab40..1a3bc9d334ca 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/clusterversions.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/clusterversions.go index 7ad6e93246af..ced9e703a8d7 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/clusterversions.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/clusterversions.go @@ -35,7 +35,8 @@ func NewClusterVersionsClient(subscriptionID string) ClusterVersionsClient { return NewClusterVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client. +// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClusterVersionsClientWithBaseURI(baseURI string, subscriptionID string) ClusterVersionsClient { return ClusterVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/operations.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/operations.go index 82ccc3f0bf26..0ec579653c3a 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/operations.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/servicefabricapi/interfaces.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/servicefabricapi/interfaces.go index 31d177b3eb2b..4f91825ce4a2 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/servicefabricapi/interfaces.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/servicefabricapi/interfaces.go @@ -48,6 +48,7 @@ var _ ClusterVersionsClientAPI = (*servicefabric.ClusterVersionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context, APIVersion string) (result servicefabric.OperationListResultPage, err error) + ListComplete(ctx context.Context, APIVersion string) (result servicefabric.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicefabric.OperationsClient)(nil) diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/services.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/services.go index 035278d87394..9171195fdd4b 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/services.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/services.go @@ -35,7 +35,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/applications.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/applications.go index 069a1a741ce3..c0a38711fa5f 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/applications.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/applications.go @@ -35,7 +35,8 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypes.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypes.go index ab95ffc76e99..00d2d3e34cb0 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypes.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypes.go @@ -35,7 +35,9 @@ func NewApplicationTypesClient(subscriptionID string) ApplicationTypesClient { return NewApplicationTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationTypesClientWithBaseURI creates an instance of the ApplicationTypesClient client. +// NewApplicationTypesClientWithBaseURI creates an instance of the ApplicationTypesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationTypesClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypesClient { return ApplicationTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypeversions.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypeversions.go index 5764aa455349..544fc12d2593 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypeversions.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/applicationtypeversions.go @@ -36,7 +36,9 @@ func NewApplicationTypeVersionsClient(subscriptionID string) ApplicationTypeVers return NewApplicationTypeVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationTypeVersionsClientWithBaseURI creates an instance of the ApplicationTypeVersionsClient client. +// NewApplicationTypeVersionsClientWithBaseURI creates an instance of the ApplicationTypeVersionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewApplicationTypeVersionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationTypeVersionsClient { return ApplicationTypeVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/client.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/client.go index c1ab1f71bffb..6e07f5d100d5 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/client.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go index 5ffa8e065445..be8931884cd1 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go @@ -36,7 +36,8 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/clusterversions.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/clusterversions.go index cc740eb6e894..a381deeb8d1c 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/clusterversions.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/clusterversions.go @@ -35,7 +35,8 @@ func NewClusterVersionsClient(subscriptionID string) ClusterVersionsClient { return NewClusterVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client. +// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClusterVersionsClientWithBaseURI(baseURI string, subscriptionID string) ClusterVersionsClient { return ClusterVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/operations.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/operations.go index 82ccc3f0bf26..0ec579653c3a 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/operations.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/servicefabricapi/interfaces.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/servicefabricapi/interfaces.go index 8e7e214946e2..9a9a00f2cf4b 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/servicefabricapi/interfaces.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/servicefabricapi/interfaces.go @@ -48,6 +48,7 @@ var _ ClusterVersionsClientAPI = (*servicefabric.ClusterVersionsClient)(nil) // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context, APIVersion string) (result servicefabric.OperationListResultPage, err error) + ListComplete(ctx context.Context, APIVersion string) (result servicefabric.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*servicefabric.OperationsClient)(nil) diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/services.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/services.go index 1ef4a2539bbd..029526250b5d 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/services.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/services.go @@ -35,7 +35,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/signalr/mgmt/2018-10-01/signalr/client.go b/services/signalr/mgmt/2018-10-01/signalr/client.go index 4652e64b9885..636149b898a0 100644 --- a/services/signalr/mgmt/2018-10-01/signalr/client.go +++ b/services/signalr/mgmt/2018-10-01/signalr/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/signalr/mgmt/2018-10-01/signalr/operations.go b/services/signalr/mgmt/2018-10-01/signalr/operations.go index e9ab3d517afe..4c42eeed66a8 100644 --- a/services/signalr/mgmt/2018-10-01/signalr/operations.go +++ b/services/signalr/mgmt/2018-10-01/signalr/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/signalr/mgmt/2018-10-01/signalr/signalr.go b/services/signalr/mgmt/2018-10-01/signalr/signalr.go index c9d2a02ce055..0dd9b1e0e14f 100644 --- a/services/signalr/mgmt/2018-10-01/signalr/signalr.go +++ b/services/signalr/mgmt/2018-10-01/signalr/signalr.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// 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)} } diff --git a/services/signalr/mgmt/2018-10-01/signalr/signalrapi/interfaces.go b/services/signalr/mgmt/2018-10-01/signalr/signalrapi/interfaces.go index ec2bad881765..f100b8aa9dc8 100644 --- a/services/signalr/mgmt/2018-10-01/signalr/signalrapi/interfaces.go +++ b/services/signalr/mgmt/2018-10-01/signalr/signalrapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result signalr.OperationListPage, err error) + ListComplete(ctx context.Context) (result signalr.OperationListIterator, err error) } var _ OperationsClientAPI = (*signalr.OperationsClient)(nil) @@ -36,7 +37,9 @@ type ClientAPI interface { Delete(ctx context.Context, resourceGroupName string, resourceName string) (result signalr.DeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, resourceName string) (result signalr.ResourceType, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result signalr.ResourceListPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result signalr.ResourceListIterator, err error) ListBySubscription(ctx context.Context) (result signalr.ResourceListPage, err error) + ListBySubscriptionComplete(ctx context.Context) (result signalr.ResourceListIterator, err error) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result signalr.Keys, err error) RegenerateKey(ctx context.Context, resourceGroupName string, resourceName string, parameters *signalr.RegenerateKeyParameters) (result signalr.RegenerateKeyFuture, err error) Restart(ctx context.Context, resourceGroupName string, resourceName string) (result signalr.RestartFuture, err error) @@ -48,6 +51,7 @@ var _ ClientAPI = (*signalr.Client)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, location string) (result signalr.UsageListPage, err error) + ListComplete(ctx context.Context, location string) (result signalr.UsageListIterator, err error) } var _ UsagesClientAPI = (*signalr.UsagesClient)(nil) diff --git a/services/signalr/mgmt/2018-10-01/signalr/usages.go b/services/signalr/mgmt/2018-10-01/signalr/usages.go index 9b8d6de5511e..44e432fc6db7 100644 --- a/services/signalr/mgmt/2018-10-01/signalr/usages.go +++ b/services/signalr/mgmt/2018-10-01/signalr/usages.go @@ -35,7 +35,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionpolicies.go b/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionpolicies.go index d106b0595037..751ba63cf95b 100644 --- a/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionpolicies.go @@ -39,7 +39,8 @@ func NewBackupLongTermRetentionPoliciesClient(subscriptionID string) BackupLongT } // NewBackupLongTermRetentionPoliciesClientWithBaseURI creates an instance of the BackupLongTermRetentionPoliciesClient -// 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 NewBackupLongTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionPoliciesClient { return BackupLongTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionvaults.go b/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionvaults.go index da3db554f53d..a37ef6abdb4b 100644 --- a/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionvaults.go +++ b/services/sql/mgmt/2014-04-01/sql/backuplongtermretentionvaults.go @@ -39,7 +39,8 @@ func NewBackupLongTermRetentionVaultsClient(subscriptionID string) BackupLongTer } // NewBackupLongTermRetentionVaultsClientWithBaseURI creates an instance of the BackupLongTermRetentionVaultsClient -// 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 NewBackupLongTermRetentionVaultsClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionVaultsClient { return BackupLongTermRetentionVaultsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/capabilities.go b/services/sql/mgmt/2014-04-01/sql/capabilities.go index c5718dd09fbe..c605e5b3383f 100644 --- a/services/sql/mgmt/2014-04-01/sql/capabilities.go +++ b/services/sql/mgmt/2014-04-01/sql/capabilities.go @@ -37,7 +37,8 @@ func NewCapabilitiesClient(subscriptionID string) CapabilitiesClient { return NewCapabilitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client. +// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) CapabilitiesClient { return CapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/client.go b/services/sql/mgmt/2014-04-01/sql/client.go index 3623373c8383..59faddcbcafe 100644 --- a/services/sql/mgmt/2014-04-01/sql/client.go +++ b/services/sql/mgmt/2014-04-01/sql/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/sql/mgmt/2014-04-01/sql/databaseadvisors.go b/services/sql/mgmt/2014-04-01/sql/databaseadvisors.go index be13e2ed22e1..e622148f3398 100644 --- a/services/sql/mgmt/2014-04-01/sql/databaseadvisors.go +++ b/services/sql/mgmt/2014-04-01/sql/databaseadvisors.go @@ -37,7 +37,9 @@ func NewDatabaseAdvisorsClient(subscriptionID string) DatabaseAdvisorsClient { return NewDatabaseAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseAdvisorsClientWithBaseURI creates an instance of the DatabaseAdvisorsClient client. +// NewDatabaseAdvisorsClientWithBaseURI creates an instance of the DatabaseAdvisorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDatabaseAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseAdvisorsClient { return DatabaseAdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/databaseconnectionpolicies.go b/services/sql/mgmt/2014-04-01/sql/databaseconnectionpolicies.go index 7c70c940b266..d8a7c4b4c51d 100644 --- a/services/sql/mgmt/2014-04-01/sql/databaseconnectionpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/databaseconnectionpolicies.go @@ -37,7 +37,9 @@ func NewDatabaseConnectionPoliciesClient(subscriptionID string) DatabaseConnecti return NewDatabaseConnectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseConnectionPoliciesClientWithBaseURI creates an instance of the DatabaseConnectionPoliciesClient client. +// NewDatabaseConnectionPoliciesClientWithBaseURI creates an instance of the DatabaseConnectionPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDatabaseConnectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseConnectionPoliciesClient { return DatabaseConnectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/databases.go b/services/sql/mgmt/2014-04-01/sql/databases.go index 36b2bc57c791..aaeec74277dd 100644 --- a/services/sql/mgmt/2014-04-01/sql/databases.go +++ b/services/sql/mgmt/2014-04-01/sql/databases.go @@ -38,7 +38,8 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/databasetableauditingpolicies.go b/services/sql/mgmt/2014-04-01/sql/databasetableauditingpolicies.go index 731bef2eb94f..a79311f97a7f 100644 --- a/services/sql/mgmt/2014-04-01/sql/databasetableauditingpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/databasetableauditingpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseTableAuditingPoliciesClient(subscriptionID string) DatabaseTable } // NewDatabaseTableAuditingPoliciesClientWithBaseURI creates an instance of the DatabaseTableAuditingPoliciesClient -// 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 NewDatabaseTableAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseTableAuditingPoliciesClient { return DatabaseTableAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/databasethreatdetectionpolicies.go b/services/sql/mgmt/2014-04-01/sql/databasethreatdetectionpolicies.go index 9c858036755f..ca44eccd7da2 100644 --- a/services/sql/mgmt/2014-04-01/sql/databasethreatdetectionpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/databasethreatdetectionpolicies.go @@ -38,7 +38,8 @@ func NewDatabaseThreatDetectionPoliciesClient(subscriptionID string) DatabaseThr } // NewDatabaseThreatDetectionPoliciesClientWithBaseURI creates an instance of the DatabaseThreatDetectionPoliciesClient -// 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 NewDatabaseThreatDetectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseThreatDetectionPoliciesClient { return DatabaseThreatDetectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/databaseusages.go b/services/sql/mgmt/2014-04-01/sql/databaseusages.go index 45f0a1e730a4..d3601a4bfdc9 100644 --- a/services/sql/mgmt/2014-04-01/sql/databaseusages.go +++ b/services/sql/mgmt/2014-04-01/sql/databaseusages.go @@ -37,7 +37,8 @@ func NewDatabaseUsagesClient(subscriptionID string) DatabaseUsagesClient { return NewDatabaseUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client. +// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDatabaseUsagesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseUsagesClient { return DatabaseUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/datamaskingpolicies.go b/services/sql/mgmt/2014-04-01/sql/datamaskingpolicies.go index 65303d3d345a..51c2a48ad0f0 100644 --- a/services/sql/mgmt/2014-04-01/sql/datamaskingpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/datamaskingpolicies.go @@ -37,7 +37,9 @@ func NewDataMaskingPoliciesClient(subscriptionID string) DataMaskingPoliciesClie return NewDataMaskingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataMaskingPoliciesClientWithBaseURI creates an instance of the DataMaskingPoliciesClient client. +// 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)} } diff --git a/services/sql/mgmt/2014-04-01/sql/datamaskingrules.go b/services/sql/mgmt/2014-04-01/sql/datamaskingrules.go index d7a6ff263792..8472a5ff846d 100644 --- a/services/sql/mgmt/2014-04-01/sql/datamaskingrules.go +++ b/services/sql/mgmt/2014-04-01/sql/datamaskingrules.go @@ -38,7 +38,9 @@ func NewDataMaskingRulesClient(subscriptionID string) DataMaskingRulesClient { return NewDataMaskingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataMaskingRulesClientWithBaseURI creates an instance of the DataMaskingRulesClient client. +// 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)} } diff --git a/services/sql/mgmt/2014-04-01/sql/disasterrecoveryconfigurations.go b/services/sql/mgmt/2014-04-01/sql/disasterrecoveryconfigurations.go index 4ff7c9f53201..1d62f2a29cf1 100644 --- a/services/sql/mgmt/2014-04-01/sql/disasterrecoveryconfigurations.go +++ b/services/sql/mgmt/2014-04-01/sql/disasterrecoveryconfigurations.go @@ -38,7 +38,8 @@ func NewDisasterRecoveryConfigurationsClient(subscriptionID string) DisasterReco } // NewDisasterRecoveryConfigurationsClientWithBaseURI creates an instance of the DisasterRecoveryConfigurationsClient -// 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 NewDisasterRecoveryConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) DisasterRecoveryConfigurationsClient { return DisasterRecoveryConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/elasticpoolactivities.go b/services/sql/mgmt/2014-04-01/sql/elasticpoolactivities.go index 94df73d2fff9..268b2ee5c392 100644 --- a/services/sql/mgmt/2014-04-01/sql/elasticpoolactivities.go +++ b/services/sql/mgmt/2014-04-01/sql/elasticpoolactivities.go @@ -37,7 +37,9 @@ func NewElasticPoolActivitiesClient(subscriptionID string) ElasticPoolActivities return NewElasticPoolActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client. +// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewElasticPoolActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolActivitiesClient { return ElasticPoolActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/elasticpooldatabaseactivities.go b/services/sql/mgmt/2014-04-01/sql/elasticpooldatabaseactivities.go index dd0e955db87f..70e005ff32d2 100644 --- a/services/sql/mgmt/2014-04-01/sql/elasticpooldatabaseactivities.go +++ b/services/sql/mgmt/2014-04-01/sql/elasticpooldatabaseactivities.go @@ -38,7 +38,8 @@ func NewElasticPoolDatabaseActivitiesClient(subscriptionID string) ElasticPoolDa } // NewElasticPoolDatabaseActivitiesClientWithBaseURI creates an instance of the ElasticPoolDatabaseActivitiesClient -// 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 NewElasticPoolDatabaseActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolDatabaseActivitiesClient { return ElasticPoolDatabaseActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/elasticpools.go b/services/sql/mgmt/2014-04-01/sql/elasticpools.go index 8b2ff84aad84..82445b7580b5 100644 --- a/services/sql/mgmt/2014-04-01/sql/elasticpools.go +++ b/services/sql/mgmt/2014-04-01/sql/elasticpools.go @@ -37,7 +37,8 @@ func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client. +// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/extensions.go b/services/sql/mgmt/2014-04-01/sql/extensions.go index e240a3ccadf4..8343313b846c 100644 --- a/services/sql/mgmt/2014-04-01/sql/extensions.go +++ b/services/sql/mgmt/2014-04-01/sql/extensions.go @@ -37,7 +37,8 @@ func NewExtensionsClient(subscriptionID string) ExtensionsClient { return NewExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExtensionsClientWithBaseURI creates an instance of the ExtensionsClient client. +// NewExtensionsClientWithBaseURI creates an instance of the ExtensionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExtensionsClientWithBaseURI(baseURI string, subscriptionID string) ExtensionsClient { return ExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/firewallrules.go b/services/sql/mgmt/2014-04-01/sql/firewallrules.go index daa8a1f832c7..7d80bda73e1d 100644 --- a/services/sql/mgmt/2014-04-01/sql/firewallrules.go +++ b/services/sql/mgmt/2014-04-01/sql/firewallrules.go @@ -38,7 +38,8 @@ func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/geobackuppolicies.go b/services/sql/mgmt/2014-04-01/sql/geobackuppolicies.go index 28e35d715a1b..9c0118335e54 100644 --- a/services/sql/mgmt/2014-04-01/sql/geobackuppolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/geobackuppolicies.go @@ -38,7 +38,9 @@ func NewGeoBackupPoliciesClient(subscriptionID string) GeoBackupPoliciesClient { return NewGeoBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client. +// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGeoBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) GeoBackupPoliciesClient { return GeoBackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/operations.go b/services/sql/mgmt/2014-04-01/sql/operations.go index 18a4cb800c85..b14f2df3c0e6 100644 --- a/services/sql/mgmt/2014-04-01/sql/operations.go +++ b/services/sql/mgmt/2014-04-01/sql/operations.go @@ -37,7 +37,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/sql/mgmt/2014-04-01/sql/queries.go b/services/sql/mgmt/2014-04-01/sql/queries.go index c783532b4683..d66c27d94ad7 100644 --- a/services/sql/mgmt/2014-04-01/sql/queries.go +++ b/services/sql/mgmt/2014-04-01/sql/queries.go @@ -37,7 +37,8 @@ func NewQueriesClient(subscriptionID string) QueriesClient { return NewQueriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueriesClientWithBaseURI creates an instance of the QueriesClient client. +// NewQueriesClientWithBaseURI creates an instance of the QueriesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueriesClientWithBaseURI(baseURI string, subscriptionID string) QueriesClient { return QueriesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/querystatistics.go b/services/sql/mgmt/2014-04-01/sql/querystatistics.go index 4b948db0a3a2..4650a4efcda1 100644 --- a/services/sql/mgmt/2014-04-01/sql/querystatistics.go +++ b/services/sql/mgmt/2014-04-01/sql/querystatistics.go @@ -37,7 +37,8 @@ func NewQueryStatisticsClient(subscriptionID string) QueryStatisticsClient { return NewQueryStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueryStatisticsClientWithBaseURI creates an instance of the QueryStatisticsClient client. +// NewQueryStatisticsClientWithBaseURI creates an instance of the QueryStatisticsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryStatisticsClientWithBaseURI(baseURI string, subscriptionID string) QueryStatisticsClient { return QueryStatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/querytexts.go b/services/sql/mgmt/2014-04-01/sql/querytexts.go index 133a7a07db30..03b159094b83 100644 --- a/services/sql/mgmt/2014-04-01/sql/querytexts.go +++ b/services/sql/mgmt/2014-04-01/sql/querytexts.go @@ -37,7 +37,8 @@ func NewQueryTextsClient(subscriptionID string) QueryTextsClient { return NewQueryTextsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueryTextsClientWithBaseURI creates an instance of the QueryTextsClient client. +// NewQueryTextsClientWithBaseURI creates an instance of the QueryTextsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewQueryTextsClientWithBaseURI(baseURI string, subscriptionID string) QueryTextsClient { return QueryTextsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/recommendedelasticpools.go b/services/sql/mgmt/2014-04-01/sql/recommendedelasticpools.go index bc6f306fc31f..5aba17530b46 100644 --- a/services/sql/mgmt/2014-04-01/sql/recommendedelasticpools.go +++ b/services/sql/mgmt/2014-04-01/sql/recommendedelasticpools.go @@ -37,7 +37,9 @@ func NewRecommendedElasticPoolsClient(subscriptionID string) RecommendedElasticP return NewRecommendedElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendedElasticPoolsClientWithBaseURI creates an instance of the RecommendedElasticPoolsClient client. +// NewRecommendedElasticPoolsClientWithBaseURI creates an instance of the RecommendedElasticPoolsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewRecommendedElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) RecommendedElasticPoolsClient { return RecommendedElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/recoverabledatabases.go b/services/sql/mgmt/2014-04-01/sql/recoverabledatabases.go index bfa9b2425b97..d900e5223ef5 100644 --- a/services/sql/mgmt/2014-04-01/sql/recoverabledatabases.go +++ b/services/sql/mgmt/2014-04-01/sql/recoverabledatabases.go @@ -37,7 +37,9 @@ func NewRecoverableDatabasesClient(subscriptionID string) RecoverableDatabasesCl return NewRecoverableDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client. +// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRecoverableDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RecoverableDatabasesClient { return RecoverableDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/replicationlinks.go b/services/sql/mgmt/2014-04-01/sql/replicationlinks.go index 4122dbff6cef..c810a1a2db59 100644 --- a/services/sql/mgmt/2014-04-01/sql/replicationlinks.go +++ b/services/sql/mgmt/2014-04-01/sql/replicationlinks.go @@ -37,7 +37,9 @@ func NewReplicationLinksClient(subscriptionID string) ReplicationLinksClient { return NewReplicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client. +// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewReplicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ReplicationLinksClient { return ReplicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/restorabledroppeddatabases.go b/services/sql/mgmt/2014-04-01/sql/restorabledroppeddatabases.go index ee9433fcd23a..9916f42cfd6d 100644 --- a/services/sql/mgmt/2014-04-01/sql/restorabledroppeddatabases.go +++ b/services/sql/mgmt/2014-04-01/sql/restorabledroppeddatabases.go @@ -37,7 +37,9 @@ func NewRestorableDroppedDatabasesClient(subscriptionID string) RestorableDroppe return NewRestorableDroppedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client. +// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewRestorableDroppedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedDatabasesClient { return RestorableDroppedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/restorepoints.go b/services/sql/mgmt/2014-04-01/sql/restorepoints.go index a261a52b7584..c696a59b7597 100644 --- a/services/sql/mgmt/2014-04-01/sql/restorepoints.go +++ b/services/sql/mgmt/2014-04-01/sql/restorepoints.go @@ -37,7 +37,8 @@ func NewRestorePointsClient(subscriptionID string) RestorePointsClient { return NewRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestorePointsClientWithBaseURI creates an instance of the RestorePointsClient client. +// 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)} } diff --git a/services/sql/mgmt/2014-04-01/sql/serveradvisors.go b/services/sql/mgmt/2014-04-01/sql/serveradvisors.go index 9893c9d4ac6c..57df8c76f28b 100644 --- a/services/sql/mgmt/2014-04-01/sql/serveradvisors.go +++ b/services/sql/mgmt/2014-04-01/sql/serveradvisors.go @@ -37,7 +37,8 @@ func NewServerAdvisorsClient(subscriptionID string) ServerAdvisorsClient { return NewServerAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAdvisorsClientWithBaseURI creates an instance of the ServerAdvisorsClient client. +// NewServerAdvisorsClientWithBaseURI creates an instance of the ServerAdvisorsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAdvisorsClient { return ServerAdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/serverazureadadministrators.go b/services/sql/mgmt/2014-04-01/sql/serverazureadadministrators.go index 8f68bc664109..62b81a3b9412 100644 --- a/services/sql/mgmt/2014-04-01/sql/serverazureadadministrators.go +++ b/services/sql/mgmt/2014-04-01/sql/serverazureadadministrators.go @@ -38,7 +38,9 @@ func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAd return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client. +// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/servercommunicationlinks.go b/services/sql/mgmt/2014-04-01/sql/servercommunicationlinks.go index 8c89241fa93f..7e91bbed9296 100644 --- a/services/sql/mgmt/2014-04-01/sql/servercommunicationlinks.go +++ b/services/sql/mgmt/2014-04-01/sql/servercommunicationlinks.go @@ -38,7 +38,9 @@ func NewServerCommunicationLinksClient(subscriptionID string) ServerCommunicatio return NewServerCommunicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client. +// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerCommunicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServerCommunicationLinksClient { return ServerCommunicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/serverconnectionpolicies.go b/services/sql/mgmt/2014-04-01/sql/serverconnectionpolicies.go index 281669c15993..dae81775e782 100644 --- a/services/sql/mgmt/2014-04-01/sql/serverconnectionpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/serverconnectionpolicies.go @@ -37,7 +37,9 @@ func NewServerConnectionPoliciesClient(subscriptionID string) ServerConnectionPo return NewServerConnectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client. +// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerConnectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerConnectionPoliciesClient { return ServerConnectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/servers.go b/services/sql/mgmt/2014-04-01/sql/servers.go index 46ff8f9126cb..763abd2694db 100644 --- a/services/sql/mgmt/2014-04-01/sql/servers.go +++ b/services/sql/mgmt/2014-04-01/sql/servers.go @@ -38,7 +38,8 @@ func NewServersClient(subscriptionID string) ServersClient { return NewServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServersClientWithBaseURI creates an instance of the ServersClient client. +// NewServersClientWithBaseURI creates an instance of the ServersClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersClient { return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/servertableauditingpolicies.go b/services/sql/mgmt/2014-04-01/sql/servertableauditingpolicies.go index 230ddf261780..3f87f274db85 100644 --- a/services/sql/mgmt/2014-04-01/sql/servertableauditingpolicies.go +++ b/services/sql/mgmt/2014-04-01/sql/servertableauditingpolicies.go @@ -37,7 +37,9 @@ func NewServerTableAuditingPoliciesClient(subscriptionID string) ServerTableAudi return NewServerTableAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerTableAuditingPoliciesClientWithBaseURI creates an instance of the ServerTableAuditingPoliciesClient client. +// NewServerTableAuditingPoliciesClientWithBaseURI creates an instance of the ServerTableAuditingPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewServerTableAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerTableAuditingPoliciesClient { return ServerTableAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/serverusages.go b/services/sql/mgmt/2014-04-01/sql/serverusages.go index 65f3fd8d5b43..7175e98a49b9 100644 --- a/services/sql/mgmt/2014-04-01/sql/serverusages.go +++ b/services/sql/mgmt/2014-04-01/sql/serverusages.go @@ -37,7 +37,8 @@ func NewServerUsagesClient(subscriptionID string) ServerUsagesClient { return NewServerUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client. +// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerUsagesClientWithBaseURI(baseURI string, subscriptionID string) ServerUsagesClient { return ServerUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/serviceobjectives.go b/services/sql/mgmt/2014-04-01/sql/serviceobjectives.go index 971180b812c7..e61e6e009f18 100644 --- a/services/sql/mgmt/2014-04-01/sql/serviceobjectives.go +++ b/services/sql/mgmt/2014-04-01/sql/serviceobjectives.go @@ -37,7 +37,9 @@ func NewServiceObjectivesClient(subscriptionID string) ServiceObjectivesClient { return NewServiceObjectivesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client. +// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceObjectivesClientWithBaseURI(baseURI string, subscriptionID string) ServiceObjectivesClient { return ServiceObjectivesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/servicetieradvisors.go b/services/sql/mgmt/2014-04-01/sql/servicetieradvisors.go index 8fc1f2d7ae8a..a13cd33d4476 100644 --- a/services/sql/mgmt/2014-04-01/sql/servicetieradvisors.go +++ b/services/sql/mgmt/2014-04-01/sql/servicetieradvisors.go @@ -37,7 +37,9 @@ func NewServiceTierAdvisorsClient(subscriptionID string) ServiceTierAdvisorsClie return NewServiceTierAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client. +// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewServiceTierAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTierAdvisorsClient { return ServiceTierAdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionactivities.go b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionactivities.go index 2c8c003fc3b7..e9602baf8ad9 100644 --- a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionactivities.go +++ b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionactivities.go @@ -39,7 +39,8 @@ func NewTransparentDataEncryptionActivitiesClient(subscriptionID string) Transpa } // NewTransparentDataEncryptionActivitiesClientWithBaseURI creates an instance of the -// TransparentDataEncryptionActivitiesClient client. +// TransparentDataEncryptionActivitiesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransparentDataEncryptionActivitiesClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionActivitiesClient { return TransparentDataEncryptionActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionconfigurations.go b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionconfigurations.go index 8bd126bc0d97..c6bfc1fad183 100644 --- a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionconfigurations.go +++ b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptionconfigurations.go @@ -39,7 +39,8 @@ func NewTransparentDataEncryptionConfigurationsClient(subscriptionID string) Tra } // NewTransparentDataEncryptionConfigurationsClientWithBaseURI creates an instance of the -// TransparentDataEncryptionConfigurationsClient client. +// TransparentDataEncryptionConfigurationsClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransparentDataEncryptionConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionConfigurationsClient { return TransparentDataEncryptionConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptions.go b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptions.go index 7ea3bdf24a6e..e293d89b6926 100644 --- a/services/sql/mgmt/2014-04-01/sql/transparentdataencryptions.go +++ b/services/sql/mgmt/2014-04-01/sql/transparentdataencryptions.go @@ -37,7 +37,9 @@ func NewTransparentDataEncryptionsClient(subscriptionID string) TransparentDataE return NewTransparentDataEncryptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client. +// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewTransparentDataEncryptionsClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionsClient { return TransparentDataEncryptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2015-06-15/storage/accounts.go b/services/storage/mgmt/2015-06-15/storage/accounts.go index 38d47fc4c791..0d7b7968cdaf 100644 --- a/services/storage/mgmt/2015-06-15/storage/accounts.go +++ b/services/storage/mgmt/2015-06-15/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2015-06-15/storage/client.go b/services/storage/mgmt/2015-06-15/storage/client.go index cbabb1bc67a0..d6c5caf1235c 100644 --- a/services/storage/mgmt/2015-06-15/storage/client.go +++ b/services/storage/mgmt/2015-06-15/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2015-06-15/storage/usage.go b/services/storage/mgmt/2015-06-15/storage/usage.go index 6f3231b2b17f..c820fcb85081 100644 --- a/services/storage/mgmt/2015-06-15/storage/usage.go +++ b/services/storage/mgmt/2015-06-15/storage/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/storage/mgmt/2016-01-01/storage/accounts.go b/services/storage/mgmt/2016-01-01/storage/accounts.go index 4d553ca2238c..bf880d9a9849 100644 --- a/services/storage/mgmt/2016-01-01/storage/accounts.go +++ b/services/storage/mgmt/2016-01-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2016-01-01/storage/client.go b/services/storage/mgmt/2016-01-01/storage/client.go index 483dfc6d01cf..1794c725e6af 100644 --- a/services/storage/mgmt/2016-01-01/storage/client.go +++ b/services/storage/mgmt/2016-01-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2016-01-01/storage/usage.go b/services/storage/mgmt/2016-01-01/storage/usage.go index cc6ce3315fbe..65e4a3eb5ada 100644 --- a/services/storage/mgmt/2016-01-01/storage/usage.go +++ b/services/storage/mgmt/2016-01-01/storage/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/storage/mgmt/2016-05-01/storage/accounts.go b/services/storage/mgmt/2016-05-01/storage/accounts.go index 03d91992ab23..1dfd1d262bce 100644 --- a/services/storage/mgmt/2016-05-01/storage/accounts.go +++ b/services/storage/mgmt/2016-05-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2016-05-01/storage/client.go b/services/storage/mgmt/2016-05-01/storage/client.go index 54c894252bd2..090cf8fd3aeb 100644 --- a/services/storage/mgmt/2016-05-01/storage/client.go +++ b/services/storage/mgmt/2016-05-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2016-05-01/storage/usage.go b/services/storage/mgmt/2016-05-01/storage/usage.go index a23199c2dd2f..478d74f869d0 100644 --- a/services/storage/mgmt/2016-05-01/storage/usage.go +++ b/services/storage/mgmt/2016-05-01/storage/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/storage/mgmt/2016-12-01/storage/accounts.go b/services/storage/mgmt/2016-12-01/storage/accounts.go index f9ccdb9a4c53..99d88c9142f2 100644 --- a/services/storage/mgmt/2016-12-01/storage/accounts.go +++ b/services/storage/mgmt/2016-12-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2016-12-01/storage/client.go b/services/storage/mgmt/2016-12-01/storage/client.go index 03bc226bf77f..acf6a31f0417 100644 --- a/services/storage/mgmt/2016-12-01/storage/client.go +++ b/services/storage/mgmt/2016-12-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2016-12-01/storage/usage.go b/services/storage/mgmt/2016-12-01/storage/usage.go index e935596004e0..ab7e7d5637c6 100644 --- a/services/storage/mgmt/2016-12-01/storage/usage.go +++ b/services/storage/mgmt/2016-12-01/storage/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/storage/mgmt/2017-06-01/storage/accounts.go b/services/storage/mgmt/2017-06-01/storage/accounts.go index 85c408d681cf..7960178b8352 100644 --- a/services/storage/mgmt/2017-06-01/storage/accounts.go +++ b/services/storage/mgmt/2017-06-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2017-06-01/storage/client.go b/services/storage/mgmt/2017-06-01/storage/client.go index 6036e09607b4..5c203eb579d0 100644 --- a/services/storage/mgmt/2017-06-01/storage/client.go +++ b/services/storage/mgmt/2017-06-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2017-06-01/storage/operations.go b/services/storage/mgmt/2017-06-01/storage/operations.go index 039e508532f7..1b7b249dee00 100644 --- a/services/storage/mgmt/2017-06-01/storage/operations.go +++ b/services/storage/mgmt/2017-06-01/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storage/mgmt/2017-06-01/storage/skus.go b/services/storage/mgmt/2017-06-01/storage/skus.go index 8fa2d394945b..05bdcb9a2eac 100644 --- a/services/storage/mgmt/2017-06-01/storage/skus.go +++ b/services/storage/mgmt/2017-06-01/storage/skus.go @@ -35,7 +35,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2017-06-01/storage/usage.go b/services/storage/mgmt/2017-06-01/storage/usage.go index 646824d05111..d7bfeff3cb2c 100644 --- a/services/storage/mgmt/2017-06-01/storage/usage.go +++ b/services/storage/mgmt/2017-06-01/storage/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/storage/mgmt/2017-10-01/storage/accounts.go b/services/storage/mgmt/2017-10-01/storage/accounts.go index 7700b6b273d5..21437ff3f7ec 100644 --- a/services/storage/mgmt/2017-10-01/storage/accounts.go +++ b/services/storage/mgmt/2017-10-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2017-10-01/storage/client.go b/services/storage/mgmt/2017-10-01/storage/client.go index 2be951c81f13..abba376eda8b 100644 --- a/services/storage/mgmt/2017-10-01/storage/client.go +++ b/services/storage/mgmt/2017-10-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2017-10-01/storage/operations.go b/services/storage/mgmt/2017-10-01/storage/operations.go index eb1434d07702..6a274d98a934 100644 --- a/services/storage/mgmt/2017-10-01/storage/operations.go +++ b/services/storage/mgmt/2017-10-01/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storage/mgmt/2017-10-01/storage/skus.go b/services/storage/mgmt/2017-10-01/storage/skus.go index cf469d1dba17..69ce2e9b0c5c 100644 --- a/services/storage/mgmt/2017-10-01/storage/skus.go +++ b/services/storage/mgmt/2017-10-01/storage/skus.go @@ -35,7 +35,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2017-10-01/storage/usage.go b/services/storage/mgmt/2017-10-01/storage/usage.go index 4d66508587f7..4fd5428ac192 100644 --- a/services/storage/mgmt/2017-10-01/storage/usage.go +++ b/services/storage/mgmt/2017-10-01/storage/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-02-01/storage/accounts.go b/services/storage/mgmt/2018-02-01/storage/accounts.go index 5d8f264a1c95..440fbba38a54 100644 --- a/services/storage/mgmt/2018-02-01/storage/accounts.go +++ b/services/storage/mgmt/2018-02-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-02-01/storage/blobcontainers.go b/services/storage/mgmt/2018-02-01/storage/blobcontainers.go index 1089a4abc2b0..6b82816cad2e 100644 --- a/services/storage/mgmt/2018-02-01/storage/blobcontainers.go +++ b/services/storage/mgmt/2018-02-01/storage/blobcontainers.go @@ -36,7 +36,8 @@ func NewBlobContainersClient(subscriptionID string) BlobContainersClient { return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client. +// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient { return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-02-01/storage/client.go b/services/storage/mgmt/2018-02-01/storage/client.go index 5b934e74e152..a7a0777c38a0 100644 --- a/services/storage/mgmt/2018-02-01/storage/client.go +++ b/services/storage/mgmt/2018-02-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2018-02-01/storage/operations.go b/services/storage/mgmt/2018-02-01/storage/operations.go index e8f624ce4256..9783cd6344c9 100644 --- a/services/storage/mgmt/2018-02-01/storage/operations.go +++ b/services/storage/mgmt/2018-02-01/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-02-01/storage/skus.go b/services/storage/mgmt/2018-02-01/storage/skus.go index 08da4a4876bc..55cad9f42a26 100644 --- a/services/storage/mgmt/2018-02-01/storage/skus.go +++ b/services/storage/mgmt/2018-02-01/storage/skus.go @@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-02-01/storage/usage.go b/services/storage/mgmt/2018-02-01/storage/usage.go index f62e4326d4ce..75923e8e1799 100644 --- a/services/storage/mgmt/2018-02-01/storage/usage.go +++ b/services/storage/mgmt/2018-02-01/storage/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-07-01/storage/accounts.go b/services/storage/mgmt/2018-07-01/storage/accounts.go index 755d3fb86c8d..7a874116da1c 100644 --- a/services/storage/mgmt/2018-07-01/storage/accounts.go +++ b/services/storage/mgmt/2018-07-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-07-01/storage/blobcontainers.go b/services/storage/mgmt/2018-07-01/storage/blobcontainers.go index 49b40a642485..eb87e558939f 100644 --- a/services/storage/mgmt/2018-07-01/storage/blobcontainers.go +++ b/services/storage/mgmt/2018-07-01/storage/blobcontainers.go @@ -36,7 +36,8 @@ func NewBlobContainersClient(subscriptionID string) BlobContainersClient { return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client. +// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient { return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-07-01/storage/blobservices.go b/services/storage/mgmt/2018-07-01/storage/blobservices.go index 446938050445..3a69800c4f5d 100644 --- a/services/storage/mgmt/2018-07-01/storage/blobservices.go +++ b/services/storage/mgmt/2018-07-01/storage/blobservices.go @@ -36,7 +36,8 @@ func NewBlobServicesClient(subscriptionID string) BlobServicesClient { return NewBlobServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client. +// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobServicesClientWithBaseURI(baseURI string, subscriptionID string) BlobServicesClient { return BlobServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-07-01/storage/client.go b/services/storage/mgmt/2018-07-01/storage/client.go index 4ffb5928a839..f606f71f2bae 100644 --- a/services/storage/mgmt/2018-07-01/storage/client.go +++ b/services/storage/mgmt/2018-07-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2018-07-01/storage/managementpolicies.go b/services/storage/mgmt/2018-07-01/storage/managementpolicies.go index d16df3d69b54..68eca7cb8ae0 100644 --- a/services/storage/mgmt/2018-07-01/storage/managementpolicies.go +++ b/services/storage/mgmt/2018-07-01/storage/managementpolicies.go @@ -36,7 +36,9 @@ func NewManagementPoliciesClient(subscriptionID string) ManagementPoliciesClient return NewManagementPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client. +// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagementPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagementPoliciesClient { return ManagementPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-07-01/storage/operations.go b/services/storage/mgmt/2018-07-01/storage/operations.go index 255d98436136..8e0f22889840 100644 --- a/services/storage/mgmt/2018-07-01/storage/operations.go +++ b/services/storage/mgmt/2018-07-01/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-07-01/storage/skus.go b/services/storage/mgmt/2018-07-01/storage/skus.go index d94509bbc0c2..ba36b01239be 100644 --- a/services/storage/mgmt/2018-07-01/storage/skus.go +++ b/services/storage/mgmt/2018-07-01/storage/skus.go @@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-07-01/storage/usages.go b/services/storage/mgmt/2018-07-01/storage/usages.go index b14109e1a954..d66bb3989cf0 100644 --- a/services/storage/mgmt/2018-07-01/storage/usages.go +++ b/services/storage/mgmt/2018-07-01/storage/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-11-01/storage/accounts.go b/services/storage/mgmt/2018-11-01/storage/accounts.go index dc50e28c923b..31ab90fde19e 100644 --- a/services/storage/mgmt/2018-11-01/storage/accounts.go +++ b/services/storage/mgmt/2018-11-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-11-01/storage/blobcontainers.go b/services/storage/mgmt/2018-11-01/storage/blobcontainers.go index 65f4c1e8a1c3..3ca9ddd5f1dc 100644 --- a/services/storage/mgmt/2018-11-01/storage/blobcontainers.go +++ b/services/storage/mgmt/2018-11-01/storage/blobcontainers.go @@ -36,7 +36,8 @@ func NewBlobContainersClient(subscriptionID string) BlobContainersClient { return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client. +// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient { return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-11-01/storage/blobservices.go b/services/storage/mgmt/2018-11-01/storage/blobservices.go index 6b34c3d85c49..b2a81a221beb 100644 --- a/services/storage/mgmt/2018-11-01/storage/blobservices.go +++ b/services/storage/mgmt/2018-11-01/storage/blobservices.go @@ -36,7 +36,8 @@ func NewBlobServicesClient(subscriptionID string) BlobServicesClient { return NewBlobServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client. +// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobServicesClientWithBaseURI(baseURI string, subscriptionID string) BlobServicesClient { return BlobServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-11-01/storage/client.go b/services/storage/mgmt/2018-11-01/storage/client.go index 5829ae1bcfe7..2baff1343d16 100644 --- a/services/storage/mgmt/2018-11-01/storage/client.go +++ b/services/storage/mgmt/2018-11-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2018-11-01/storage/managementpolicies.go b/services/storage/mgmt/2018-11-01/storage/managementpolicies.go index d13c73cdc14b..20bbab8450a5 100644 --- a/services/storage/mgmt/2018-11-01/storage/managementpolicies.go +++ b/services/storage/mgmt/2018-11-01/storage/managementpolicies.go @@ -36,7 +36,9 @@ func NewManagementPoliciesClient(subscriptionID string) ManagementPoliciesClient return NewManagementPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client. +// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagementPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagementPoliciesClient { return ManagementPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-11-01/storage/operations.go b/services/storage/mgmt/2018-11-01/storage/operations.go index 24e030d7e821..4d33309e9b1d 100644 --- a/services/storage/mgmt/2018-11-01/storage/operations.go +++ b/services/storage/mgmt/2018-11-01/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storage/mgmt/2018-11-01/storage/skus.go b/services/storage/mgmt/2018-11-01/storage/skus.go index 717fc8451364..c5ef20fdda98 100644 --- a/services/storage/mgmt/2018-11-01/storage/skus.go +++ b/services/storage/mgmt/2018-11-01/storage/skus.go @@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2018-11-01/storage/usages.go b/services/storage/mgmt/2018-11-01/storage/usages.go index a8ee0162d763..1e65be886b15 100644 --- a/services/storage/mgmt/2018-11-01/storage/usages.go +++ b/services/storage/mgmt/2018-11-01/storage/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/storage/mgmt/2019-04-01/storage/accounts.go b/services/storage/mgmt/2019-04-01/storage/accounts.go index 9b5daba19e50..0c978a80a16e 100644 --- a/services/storage/mgmt/2019-04-01/storage/accounts.go +++ b/services/storage/mgmt/2019-04-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// 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)} } diff --git a/services/storage/mgmt/2019-04-01/storage/blobcontainers.go b/services/storage/mgmt/2019-04-01/storage/blobcontainers.go index ed9b69fef18f..f4462f109186 100644 --- a/services/storage/mgmt/2019-04-01/storage/blobcontainers.go +++ b/services/storage/mgmt/2019-04-01/storage/blobcontainers.go @@ -36,7 +36,8 @@ func NewBlobContainersClient(subscriptionID string) BlobContainersClient { return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client. +// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient { return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2019-04-01/storage/blobservices.go b/services/storage/mgmt/2019-04-01/storage/blobservices.go index 5f6e86ca6bef..c3b4facfb061 100644 --- a/services/storage/mgmt/2019-04-01/storage/blobservices.go +++ b/services/storage/mgmt/2019-04-01/storage/blobservices.go @@ -36,7 +36,8 @@ func NewBlobServicesClient(subscriptionID string) BlobServicesClient { return NewBlobServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client. +// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobServicesClientWithBaseURI(baseURI string, subscriptionID string) BlobServicesClient { return BlobServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2019-04-01/storage/client.go b/services/storage/mgmt/2019-04-01/storage/client.go index 95300b889081..3cf659354e9f 100644 --- a/services/storage/mgmt/2019-04-01/storage/client.go +++ b/services/storage/mgmt/2019-04-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storage/mgmt/2019-04-01/storage/fileservices.go b/services/storage/mgmt/2019-04-01/storage/fileservices.go index 8de550d6af1b..db497dc57aba 100644 --- a/services/storage/mgmt/2019-04-01/storage/fileservices.go +++ b/services/storage/mgmt/2019-04-01/storage/fileservices.go @@ -36,7 +36,8 @@ func NewFileServicesClient(subscriptionID string) FileServicesClient { return NewFileServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileServicesClientWithBaseURI creates an instance of the FileServicesClient client. +// NewFileServicesClientWithBaseURI creates an instance of the FileServicesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileServicesClientWithBaseURI(baseURI string, subscriptionID string) FileServicesClient { return FileServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2019-04-01/storage/fileshares.go b/services/storage/mgmt/2019-04-01/storage/fileshares.go index 572a717cfbd8..2659a7107a5c 100644 --- a/services/storage/mgmt/2019-04-01/storage/fileshares.go +++ b/services/storage/mgmt/2019-04-01/storage/fileshares.go @@ -36,7 +36,8 @@ func NewFileSharesClient(subscriptionID string) FileSharesClient { return NewFileSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient client. +// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileSharesClientWithBaseURI(baseURI string, subscriptionID string) FileSharesClient { return FileSharesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2019-04-01/storage/managementpolicies.go b/services/storage/mgmt/2019-04-01/storage/managementpolicies.go index 5fe6688904fd..c04070a425a0 100644 --- a/services/storage/mgmt/2019-04-01/storage/managementpolicies.go +++ b/services/storage/mgmt/2019-04-01/storage/managementpolicies.go @@ -36,7 +36,9 @@ func NewManagementPoliciesClient(subscriptionID string) ManagementPoliciesClient return NewManagementPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client. +// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagementPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagementPoliciesClient { return ManagementPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2019-04-01/storage/operations.go b/services/storage/mgmt/2019-04-01/storage/operations.go index 3ddad68b1559..44d88adf3a50 100644 --- a/services/storage/mgmt/2019-04-01/storage/operations.go +++ b/services/storage/mgmt/2019-04-01/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storage/mgmt/2019-04-01/storage/skus.go b/services/storage/mgmt/2019-04-01/storage/skus.go index b2eff204a663..2e974a7a3111 100644 --- a/services/storage/mgmt/2019-04-01/storage/skus.go +++ b/services/storage/mgmt/2019-04-01/storage/skus.go @@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storage/mgmt/2019-04-01/storage/storageapi/interfaces.go b/services/storage/mgmt/2019-04-01/storage/storageapi/interfaces.go index 1e83ebd6eb83..0008c3cb61a1 100644 --- a/services/storage/mgmt/2019-04-01/storage/storageapi/interfaces.go +++ b/services/storage/mgmt/2019-04-01/storage/storageapi/interfaces.go @@ -45,6 +45,7 @@ type AccountsClientAPI interface { Failover(ctx context.Context, resourceGroupName string, accountName string) (result storage.AccountsFailoverFuture, err error) GetProperties(ctx context.Context, resourceGroupName string, accountName string, expand storage.AccountExpand) (result storage.Account, err error) List(ctx context.Context) (result storage.AccountListResultPage, err error) + ListComplete(ctx context.Context) (result storage.AccountListResultIterator, err error) ListAccountSAS(ctx context.Context, resourceGroupName string, accountName string, parameters storage.AccountSasParameters) (result storage.ListAccountSasResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result storage.AccountListResult, err error) ListKeys(ctx context.Context, resourceGroupName string, accountName string, expand storage.ListKeyExpand) (result storage.AccountListKeysResult, err error) @@ -93,6 +94,7 @@ type BlobContainersClientAPI interface { GetImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (result storage.ImmutabilityPolicy, err error) Lease(ctx context.Context, resourceGroupName string, accountName string, containerName string, parameters *storage.LeaseContainerRequest) (result storage.LeaseContainerResponse, err error) List(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result storage.ListContainerItemsPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result storage.ListContainerItemsIterator, err error) LockImmutabilityPolicy(ctx context.Context, resourceGroupName string, accountName string, containerName string, ifMatch string) (result storage.ImmutabilityPolicy, err error) SetLegalHold(ctx context.Context, resourceGroupName string, accountName string, containerName string, legalHold storage.LegalHold) (result storage.LegalHold, err error) Update(ctx context.Context, resourceGroupName string, accountName string, containerName string, blobContainer storage.BlobContainer) (result storage.BlobContainer, err error) @@ -115,6 +117,7 @@ type FileSharesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result storage.FileShare, err error) List(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result storage.FileShareItemsPage, err error) + ListComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result storage.FileShareItemsIterator, err error) Update(ctx context.Context, resourceGroupName string, accountName string, shareName string, fileShare storage.FileShare) (result storage.FileShare, err error) } diff --git a/services/storage/mgmt/2019-04-01/storage/usages.go b/services/storage/mgmt/2019-04-01/storage/usages.go index 8f85c7cab7eb..1a8e890a09b9 100644 --- a/services/storage/mgmt/2019-04-01/storage/usages.go +++ b/services/storage/mgmt/2019-04-01/storage/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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)} } diff --git a/services/storage/mgmt/2019-06-01/storage/accounts.go b/services/storage/mgmt/2019-06-01/storage/accounts.go index d34b59ad0df4..23182f8527e9 100644 --- a/services/storage/mgmt/2019-06-01/storage/accounts.go +++ b/services/storage/mgmt/2019-06-01/storage/accounts.go @@ -437,7 +437,7 @@ func (client AccountsClient) FailoverResponder(resp *http.Response) (result auto // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // expand - may be used to expand the properties within account's properties. By default, data is not included -// when fetching properties. Currently we only support geoReplicationStats. +// when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string, expand AccountExpand) (result Account, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.GetProperties") @@ -1120,6 +1120,104 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result return } +// RestoreBlobRanges restore blobs in the specified blob ranges +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// parameters - the parameters to provide for restore blob ranges. +func (client AccountsClient) RestoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters) (result AccountsRestoreBlobRangesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.RestoreBlobRanges") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TimeToRestore", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.BlobRanges", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.AccountsClient", "RestoreBlobRanges", err.Error()) + } + + req, err := client.RestoreBlobRangesPreparer(ctx, resourceGroupName, accountName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", nil, "Failure preparing request") + return + } + + result, err = client.RestoreBlobRangesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", result.Response(), "Failure sending request") + return + } + + return +} + +// RestoreBlobRangesPreparer prepares the RestoreBlobRanges request. +func (client AccountsClient) RestoreBlobRangesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters) (*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 = "2019-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.Storage/storageAccounts/{accountName}/restoreBlobRanges", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RestoreBlobRangesSender sends the RestoreBlobRanges request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) RestoreBlobRangesSender(req *http.Request) (future AccountsRestoreBlobRangesFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RestoreBlobRangesResponder handles the response to the RestoreBlobRanges request. The method always +// closes the http.Response Body. +func (client AccountsClient) RestoreBlobRangesResponder(resp *http.Response) (result BlobRestoreStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // RevokeUserDelegationKeys revoke user delegation keys. // Parameters: // resourceGroupName - the name of the resource group within the user's subscription. The name is case diff --git a/services/storage/mgmt/2019-06-01/storage/blobservices.go b/services/storage/mgmt/2019-06-01/storage/blobservices.go index ff47fb3f93a8..ad946e6f905f 100644 --- a/services/storage/mgmt/2019-06-01/storage/blobservices.go +++ b/services/storage/mgmt/2019-06-01/storage/blobservices.go @@ -266,6 +266,13 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, + {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, }}}}}); err != nil { return result, validation.NewError("storage.BlobServicesClient", "SetServiceProperties", err.Error()) } diff --git a/services/storage/mgmt/2019-06-01/storage/models.go b/services/storage/mgmt/2019-06-01/storage/models.go index 0eba8c292dde..11e802f77ada 100644 --- a/services/storage/mgmt/2019-06-01/storage/models.go +++ b/services/storage/mgmt/2019-06-01/storage/models.go @@ -50,13 +50,15 @@ func PossibleAccessTierValues() []AccessTier { type AccountExpand string const ( + // AccountExpandBlobRestoreStatus ... + AccountExpandBlobRestoreStatus AccountExpand = "blobRestoreStatus" // AccountExpandGeoReplicationStats ... AccountExpandGeoReplicationStats AccountExpand = "geoReplicationStats" ) // PossibleAccountExpandValues returns an array of possible values for the AccountExpand const type. func PossibleAccountExpandValues() []AccountExpand { - return []AccountExpand{AccountExpandGeoReplicationStats} + return []AccountExpand{AccountExpandBlobRestoreStatus, AccountExpandGeoReplicationStats} } // AccountStatus enumerates the values for account status. @@ -108,6 +110,23 @@ func PossibleAction1Values() []Action1 { return []Action1{Acquire, Break, Change, Release, Renew} } +// BlobRestoreProgressStatus enumerates the values for blob restore progress status. +type BlobRestoreProgressStatus string + +const ( + // Complete ... + Complete BlobRestoreProgressStatus = "Complete" + // Failed ... + Failed BlobRestoreProgressStatus = "Failed" + // InProgress ... + InProgress BlobRestoreProgressStatus = "InProgress" +) + +// PossibleBlobRestoreProgressStatusValues returns an array of possible values for the BlobRestoreProgressStatus const type. +func PossibleBlobRestoreProgressStatusValues() []BlobRestoreProgressStatus { + return []BlobRestoreProgressStatus{Complete, Failed, InProgress} +} + // Bypass enumerates the values for bypass. type Bypass string @@ -400,19 +419,19 @@ func PossiblePermissionsValues() []Permissions { type PrivateEndpointConnectionProvisioningState string const ( - // Creating ... - Creating PrivateEndpointConnectionProvisioningState = "Creating" - // Deleting ... - Deleting PrivateEndpointConnectionProvisioningState = "Deleting" - // Failed ... - Failed PrivateEndpointConnectionProvisioningState = "Failed" - // Succeeded ... - Succeeded PrivateEndpointConnectionProvisioningState = "Succeeded" + // 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{Creating, Deleting, Failed, Succeeded} + return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded} } // PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. @@ -436,17 +455,17 @@ func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointSer type ProvisioningState string const ( - // ProvisioningStateCreating ... - ProvisioningStateCreating ProvisioningState = "Creating" - // ProvisioningStateResolvingDNS ... - ProvisioningStateResolvingDNS ProvisioningState = "ResolvingDNS" - // ProvisioningStateSucceeded ... - ProvisioningStateSucceeded ProvisioningState = "Succeeded" + // Creating ... + Creating ProvisioningState = "Creating" + // ResolvingDNS ... + ResolvingDNS ProvisioningState = "ResolvingDNS" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" ) // PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateResolvingDNS, ProvisioningStateSucceeded} + return []ProvisioningState{Creating, ResolvingDNS, Succeeded} } // PublicAccess enumerates the values for public access. @@ -1102,7 +1121,7 @@ type AccountMicrosoftEndpoints struct { // AccountProperties properties of the storage account. type AccountProperties struct { - // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateResolvingDNS', 'ProvisioningStateSucceeded' + // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrimaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint. PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"` @@ -1144,6 +1163,8 @@ type AccountProperties struct { PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` + // BlobRestoreStatus - READ-ONLY; Blob restore status + BlobRestoreStatus *BlobRestoreStatus `json:"blobRestoreStatus,omitempty"` } // AccountPropertiesCreateParameters the parameters used to create the storage account. @@ -1266,6 +1287,35 @@ func (future *AccountsFailoverFuture) Result(client AccountsClient) (ar autorest return } +// AccountsRestoreBlobRangesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AccountsRestoreBlobRangesFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AccountsRestoreBlobRangesFuture) Result(client AccountsClient) (brs BlobRestoreStatus, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("storage.AccountsRestoreBlobRangesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if brs.Response.Response, err = future.GetResult(sender); err == nil && brs.Response.Response.StatusCode != http.StatusNoContent { + brs, err = client.RestoreBlobRangesResponder(brs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", brs.Response.Response, "Failure responding to request") + } + } + return +} + // AccountUpdateParameters the parameters that can be provided when updating the storage account // properties. type AccountUpdateParameters struct { @@ -1482,6 +1532,35 @@ func (bc *BlobContainer) UnmarshalJSON(body []byte) error { return nil } +// BlobRestoreParameters blob restore parameters +type BlobRestoreParameters struct { + // TimeToRestore - Restore blob to the specified time. + TimeToRestore *date.Time `json:"timeToRestore,omitempty"` + // BlobRanges - Blob ranges to restore. + BlobRanges *[]BlobRestoreRange `json:"blobRanges,omitempty"` +} + +// BlobRestoreRange blob range +type BlobRestoreRange struct { + // StartRange - Blob start range. Empty means account start. + StartRange *string `json:"startRange,omitempty"` + // EndRange - Blob end range. Empty means account end. + EndRange *string `json:"endRange,omitempty"` +} + +// BlobRestoreStatus blob restore status. +type BlobRestoreStatus struct { + autorest.Response `json:"-"` + // Status - READ-ONLY; The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. Possible values include: 'InProgress', 'Complete', 'Failed' + Status BlobRestoreProgressStatus `json:"status,omitempty"` + // FailureReason - READ-ONLY; Failure reason when blob restore is failed. + FailureReason *string `json:"failureReason,omitempty"` + // RestoreID - READ-ONLY; Id for tracking blob restore request. + RestoreID *string `json:"restoreId,omitempty"` + // Parameters - READ-ONLY; Blob restore request parameters. + Parameters *BlobRestoreParameters `json:"parameters,omitempty"` +} + // BlobServiceItems ... type BlobServiceItems struct { autorest.Response `json:"-"` @@ -1585,6 +1664,8 @@ type BlobServicePropertiesProperties struct { AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` // ChangeFeed - The blob service properties for change feed events. ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"` + // RestorePolicy - The blob service properties for blob restore policy. + RestorePolicy *RestorePolicyProperties `json:"restorePolicy,omitempty"` } // ChangeFeed the blob service properties for change feed events. @@ -3054,7 +3135,7 @@ type PrivateEndpointConnectionProperties struct { 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 - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed' ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` } @@ -3179,6 +3260,14 @@ type Resource struct { Type *string `json:"type,omitempty"` } +// RestorePolicyProperties the blob service properties for blob restore policy +type RestorePolicyProperties struct { + // Enabled - Blob restore is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + // Days - how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. + Days *int32 `json:"days,omitempty"` +} + // Restriction the restriction because of which SKU cannot be used. type Restriction struct { // Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location. diff --git a/services/storage/mgmt/2019-06-01/storage/storageapi/interfaces.go b/services/storage/mgmt/2019-06-01/storage/storageapi/interfaces.go index 289333a8fc05..3dd4ff04f612 100644 --- a/services/storage/mgmt/2019-06-01/storage/storageapi/interfaces.go +++ b/services/storage/mgmt/2019-06-01/storage/storageapi/interfaces.go @@ -51,6 +51,7 @@ type AccountsClientAPI interface { ListKeys(ctx context.Context, resourceGroupName string, accountName string, expand storage.ListKeyExpand) (result storage.AccountListKeysResult, err error) ListServiceSAS(ctx context.Context, resourceGroupName string, accountName string, parameters storage.ServiceSasParameters) (result storage.ListServiceSasResponse, err error) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, regenerateKey storage.AccountRegenerateKeyParameters) (result storage.AccountListKeysResult, err error) + RestoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, parameters storage.BlobRestoreParameters) (result storage.AccountsRestoreBlobRangesFuture, err error) RevokeUserDelegationKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, accountName string, parameters storage.AccountUpdateParameters) (result storage.Account, err error) } diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/caches.go b/services/storagecache/mgmt/2019-11-01/storagecache/caches.go index 4ace44960ee5..acbcdfdd1d30 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/caches.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/caches.go @@ -37,7 +37,8 @@ func NewCachesClient(subscriptionID string) CachesClient { return NewCachesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCachesClientWithBaseURI creates an instance of the CachesClient client. +// NewCachesClientWithBaseURI creates an instance of the CachesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCachesClientWithBaseURI(baseURI string, subscriptionID string) CachesClient { return CachesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/client.go b/services/storagecache/mgmt/2019-11-01/storagecache/client.go index 36b7e67ad288..875d0b7d8704 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/client.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/operations.go b/services/storagecache/mgmt/2019-11-01/storagecache/operations.go index fa94de5d5e2e..de96a9b47a58 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/operations.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/operations.go @@ -36,7 +36,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/skus.go b/services/storagecache/mgmt/2019-11-01/storagecache/skus.go index db004443cc76..0f17537779e0 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/skus.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/skus.go @@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/storagecacheapi/interfaces.go b/services/storagecache/mgmt/2019-11-01/storagecache/storagecacheapi/interfaces.go index 3982c025cc92..ef439976dfc4 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/storagecacheapi/interfaces.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/storagecacheapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result storagecache.APIOperationListResultPage, err error) + ListComplete(ctx context.Context) (result storagecache.APIOperationListResultIterator, err error) } var _ OperationsClientAPI = (*storagecache.OperationsClient)(nil) @@ -32,6 +33,7 @@ var _ OperationsClientAPI = (*storagecache.OperationsClient)(nil) // SkusClientAPI contains the set of methods on the SkusClient type. type SkusClientAPI interface { List(ctx context.Context) (result storagecache.ResourceSkusResultPage, err error) + ListComplete(ctx context.Context) (result storagecache.ResourceSkusResultIterator, err error) } var _ SkusClientAPI = (*storagecache.SkusClient)(nil) @@ -39,6 +41,7 @@ var _ SkusClientAPI = (*storagecache.SkusClient)(nil) // UsageModelsClientAPI contains the set of methods on the UsageModelsClient type. type UsageModelsClientAPI interface { List(ctx context.Context) (result storagecache.UsageModelsResultPage, err error) + ListComplete(ctx context.Context) (result storagecache.UsageModelsResultIterator, err error) } var _ UsageModelsClientAPI = (*storagecache.UsageModelsClient)(nil) @@ -50,7 +53,9 @@ type CachesClientAPI interface { Flush(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.CachesFlushFuture, err error) Get(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.Cache, err error) List(ctx context.Context) (result storagecache.CachesListResultPage, err error) + ListComplete(ctx context.Context) (result storagecache.CachesListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result storagecache.CachesListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result storagecache.CachesListResultIterator, err error) Start(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.CachesStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.CachesStopFuture, err error) Update(ctx context.Context, resourceGroupName string, cacheName string, cache *storagecache.Cache) (result storagecache.Cache, err error) @@ -65,6 +70,7 @@ type StorageTargetsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string) (result storagecache.StorageTargetsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string) (result storagecache.StorageTarget, err error) ListByCache(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.StorageTargetsResultPage, err error) + ListByCacheComplete(ctx context.Context, resourceGroupName string, cacheName string) (result storagecache.StorageTargetsResultIterator, err error) } var _ StorageTargetsClientAPI = (*storagecache.StorageTargetsClient)(nil) diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/storagetargets.go b/services/storagecache/mgmt/2019-11-01/storagecache/storagetargets.go index a42b3f26904f..ceadafd5253a 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/storagetargets.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/storagetargets.go @@ -38,7 +38,8 @@ func NewStorageTargetsClient(subscriptionID string) StorageTargetsClient { return NewStorageTargetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageTargetsClientWithBaseURI creates an instance of the StorageTargetsClient client. +// NewStorageTargetsClientWithBaseURI creates an instance of the StorageTargetsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStorageTargetsClientWithBaseURI(baseURI string, subscriptionID string) StorageTargetsClient { return StorageTargetsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagecache/mgmt/2019-11-01/storagecache/usagemodels.go b/services/storagecache/mgmt/2019-11-01/storagecache/usagemodels.go index ea4c66bcadd1..c0ba8475e408 100644 --- a/services/storagecache/mgmt/2019-11-01/storagecache/usagemodels.go +++ b/services/storagecache/mgmt/2019-11-01/storagecache/usagemodels.go @@ -36,7 +36,8 @@ func NewUsageModelsClient(subscriptionID string) UsageModelsClient { return NewUsageModelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageModelsClientWithBaseURI creates an instance of the UsageModelsClient client. +// NewUsageModelsClientWithBaseURI creates an instance of the UsageModelsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageModelsClientWithBaseURI(baseURI string, subscriptionID string) UsageModelsClient { return UsageModelsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/bitlockerkeys.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/bitlockerkeys.go index b0015ceffae5..363367bfc39f 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/bitlockerkeys.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/bitlockerkeys.go @@ -35,7 +35,8 @@ func NewBitLockerKeysClient(subscriptionID string, acceptLanguage string) BitLoc return NewBitLockerKeysClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewBitLockerKeysClientWithBaseURI creates an instance of the BitLockerKeysClient client. +// NewBitLockerKeysClientWithBaseURI creates an instance of the BitLockerKeysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBitLockerKeysClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) BitLockerKeysClient { return BitLockerKeysClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/client.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/client.go index 56ea1b1e17a0..a5f3df152e9d 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/client.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, acceptLanguage string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, acceptLanguage string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/jobs.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/jobs.go index 0853654d24a5..62c879d71b11 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/jobs.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string, acceptLanguage string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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, acceptLanguage string) JobsClient { return JobsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/locations.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/locations.go index 82dc8859fe89..671f22ab7c9d 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/locations.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/locations.go @@ -35,7 +35,8 @@ func NewLocationsClient(subscriptionID string, acceptLanguage string) LocationsC return NewLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client. +// NewLocationsClientWithBaseURI creates an instance of the LocationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string, acceptLanguage string) LocationsClient { return LocationsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/operations.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/operations.go index 30bcfa879925..52318a1bf58e 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/operations.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, acceptLanguage string) Operation return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, acceptLanguage) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, acceptLanguage string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, acceptLanguage)} } diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/storageimportexportapi/interfaces.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/storageimportexportapi/interfaces.go index 1c7653a23d5a..dec5770ad915 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/storageimportexportapi/interfaces.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/storageimportexportapi/interfaces.go @@ -37,7 +37,9 @@ type JobsClientAPI interface { Delete(ctx context.Context, jobName string, resourceGroupName string) (result autorest.Response, err error) Get(ctx context.Context, jobName string, resourceGroupName string) (result storageimportexport.JobResponse, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, filter string) (result storageimportexport.ListJobsResponsePage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32, filter string) (result storageimportexport.ListJobsResponseIterator, err error) ListBySubscription(ctx context.Context, top *int32, filter string) (result storageimportexport.ListJobsResponsePage, err error) + ListBySubscriptionComplete(ctx context.Context, top *int32, filter string) (result storageimportexport.ListJobsResponseIterator, err error) Update(ctx context.Context, jobName string, resourceGroupName string, body storageimportexport.UpdateJobParameters) (result storageimportexport.JobResponse, err error) } diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/client.go b/services/storagesync/mgmt/2018-04-02/storagesync/client.go index 6a469b884384..4750ee738130 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/client.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/cloudendpoints.go b/services/storagesync/mgmt/2018-04-02/storagesync/cloudendpoints.go index 7de31d797260..e6dfc2e0ba72 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/cloudendpoints.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/cloudendpoints.go @@ -36,7 +36,8 @@ func NewCloudEndpointsClient(subscriptionID string) CloudEndpointsClient { return NewCloudEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCloudEndpointsClientWithBaseURI creates an instance of the CloudEndpointsClient client. +// NewCloudEndpointsClientWithBaseURI creates an instance of the CloudEndpointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCloudEndpointsClientWithBaseURI(baseURI string, subscriptionID string) CloudEndpointsClient { return CloudEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/operations.go b/services/storagesync/mgmt/2018-04-02/storagesync/operations.go index 9cb9720fc7a4..4454af42c609 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/operations.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/registeredservers.go b/services/storagesync/mgmt/2018-04-02/storagesync/registeredservers.go index da3b5a25f5d9..51b51c9c91fd 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/registeredservers.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/registeredservers.go @@ -36,7 +36,9 @@ func NewRegisteredServersClient(subscriptionID string) RegisteredServersClient { return NewRegisteredServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegisteredServersClientWithBaseURI creates an instance of the RegisteredServersClient client. +// NewRegisteredServersClientWithBaseURI creates an instance of the RegisteredServersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRegisteredServersClientWithBaseURI(baseURI string, subscriptionID string) RegisteredServersClient { return RegisteredServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/serverendpoints.go b/services/storagesync/mgmt/2018-04-02/storagesync/serverendpoints.go index f57f8dc33c66..a814a38a4019 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/serverendpoints.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/serverendpoints.go @@ -36,7 +36,8 @@ func NewServerEndpointsClient(subscriptionID string) ServerEndpointsClient { return NewServerEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerEndpointsClientWithBaseURI creates an instance of the ServerEndpointsClient client. +// NewServerEndpointsClientWithBaseURI creates an instance of the ServerEndpointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerEndpointsClientWithBaseURI(baseURI string, subscriptionID string) ServerEndpointsClient { return ServerEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/services.go b/services/storagesync/mgmt/2018-04-02/storagesync/services.go index 134a98c610e1..94d07a621b88 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/services.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/storagesyncapi/interfaces.go b/services/storagesync/mgmt/2018-04-02/storagesync/storagesyncapi/interfaces.go index 4604a30dcda8..4e0d85efb6fe 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/storagesyncapi/interfaces.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/storagesyncapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result storagesync.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result storagesync.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*storagesync.OperationsClient)(nil) diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/syncgroups.go b/services/storagesync/mgmt/2018-04-02/storagesync/syncgroups.go index 0878370a7d70..381dfc0acd7b 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/syncgroups.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/syncgroups.go @@ -36,7 +36,8 @@ func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client. +// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/workflows.go b/services/storagesync/mgmt/2018-04-02/storagesync/workflows.go index 976c5a37626f..fadb1ef94581 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/workflows.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/workflows.go @@ -36,7 +36,8 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/client.go b/services/storagesync/mgmt/2018-07-01/storagesync/client.go index 80ec68ba1b98..2124f90cf3fa 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/client.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/cloudendpoints.go b/services/storagesync/mgmt/2018-07-01/storagesync/cloudendpoints.go index e0c87eaef612..876d8c306c9c 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/cloudendpoints.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/cloudendpoints.go @@ -36,7 +36,8 @@ func NewCloudEndpointsClient(subscriptionID string) CloudEndpointsClient { return NewCloudEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCloudEndpointsClientWithBaseURI creates an instance of the CloudEndpointsClient client. +// NewCloudEndpointsClientWithBaseURI creates an instance of the CloudEndpointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCloudEndpointsClientWithBaseURI(baseURI string, subscriptionID string) CloudEndpointsClient { return CloudEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/operations.go b/services/storagesync/mgmt/2018-07-01/storagesync/operations.go index 50b49618f418..d6ab6875c79f 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/operations.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/registeredservers.go b/services/storagesync/mgmt/2018-07-01/storagesync/registeredservers.go index 162fff92ed2e..73a709ae05fb 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/registeredservers.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/registeredservers.go @@ -36,7 +36,9 @@ func NewRegisteredServersClient(subscriptionID string) RegisteredServersClient { return NewRegisteredServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegisteredServersClientWithBaseURI creates an instance of the RegisteredServersClient client. +// NewRegisteredServersClientWithBaseURI creates an instance of the RegisteredServersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRegisteredServersClientWithBaseURI(baseURI string, subscriptionID string) RegisteredServersClient { return RegisteredServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/serverendpoints.go b/services/storagesync/mgmt/2018-07-01/storagesync/serverendpoints.go index 7a305bf82f2a..e8f2b1253f58 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/serverendpoints.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/serverendpoints.go @@ -36,7 +36,8 @@ func NewServerEndpointsClient(subscriptionID string) ServerEndpointsClient { return NewServerEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerEndpointsClientWithBaseURI creates an instance of the ServerEndpointsClient client. +// NewServerEndpointsClientWithBaseURI creates an instance of the ServerEndpointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerEndpointsClientWithBaseURI(baseURI string, subscriptionID string) ServerEndpointsClient { return ServerEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/services.go b/services/storagesync/mgmt/2018-07-01/storagesync/services.go index cba80350cf2b..826aeb82b50f 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/services.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/storagesyncapi/interfaces.go b/services/storagesync/mgmt/2018-07-01/storagesync/storagesyncapi/interfaces.go index f0e2155809f6..c644b5bf5598 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/storagesyncapi/interfaces.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/storagesyncapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result storagesync.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result storagesync.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*storagesync.OperationsClient)(nil) diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/syncgroups.go b/services/storagesync/mgmt/2018-07-01/storagesync/syncgroups.go index d81cd47edd05..ce345783398d 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/syncgroups.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/syncgroups.go @@ -36,7 +36,8 @@ func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client. +// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/workflows.go b/services/storagesync/mgmt/2018-07-01/storagesync/workflows.go index 8ff8f90b329c..ffe8160c3002 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/workflows.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/workflows.go @@ -36,7 +36,8 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/client.go b/services/storagesync/mgmt/2018-10-01/storagesync/client.go index 392ebf62a5ce..7390cf8aa740 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/client.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/cloudendpoints.go b/services/storagesync/mgmt/2018-10-01/storagesync/cloudendpoints.go index e9fb5de9fae5..4c310b324435 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/cloudendpoints.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/cloudendpoints.go @@ -36,7 +36,8 @@ func NewCloudEndpointsClient(subscriptionID string) CloudEndpointsClient { return NewCloudEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCloudEndpointsClientWithBaseURI creates an instance of the CloudEndpointsClient client. +// NewCloudEndpointsClientWithBaseURI creates an instance of the CloudEndpointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCloudEndpointsClientWithBaseURI(baseURI string, subscriptionID string) CloudEndpointsClient { return CloudEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/operations.go b/services/storagesync/mgmt/2018-10-01/storagesync/operations.go index f9415cedfa02..9caca0a5dc92 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/operations.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/registeredservers.go b/services/storagesync/mgmt/2018-10-01/storagesync/registeredservers.go index c19c6836f0d7..4ad6e0e27985 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/registeredservers.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/registeredservers.go @@ -36,7 +36,9 @@ func NewRegisteredServersClient(subscriptionID string) RegisteredServersClient { return NewRegisteredServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegisteredServersClientWithBaseURI creates an instance of the RegisteredServersClient client. +// NewRegisteredServersClientWithBaseURI creates an instance of the RegisteredServersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRegisteredServersClientWithBaseURI(baseURI string, subscriptionID string) RegisteredServersClient { return RegisteredServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/serverendpoints.go b/services/storagesync/mgmt/2018-10-01/storagesync/serverendpoints.go index d233ff14307c..5282fdf37e55 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/serverendpoints.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/serverendpoints.go @@ -36,7 +36,8 @@ func NewServerEndpointsClient(subscriptionID string) ServerEndpointsClient { return NewServerEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerEndpointsClientWithBaseURI creates an instance of the ServerEndpointsClient client. +// NewServerEndpointsClientWithBaseURI creates an instance of the ServerEndpointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerEndpointsClientWithBaseURI(baseURI string, subscriptionID string) ServerEndpointsClient { return ServerEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/services.go b/services/storagesync/mgmt/2018-10-01/storagesync/services.go index 66d55efaef49..7ed17f51697e 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/services.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/storagesyncapi/interfaces.go b/services/storagesync/mgmt/2018-10-01/storagesync/storagesyncapi/interfaces.go index aa2ae47b54a4..27c3316562ba 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/storagesyncapi/interfaces.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/storagesyncapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result storagesync.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result storagesync.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*storagesync.OperationsClient)(nil) diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/syncgroups.go b/services/storagesync/mgmt/2018-10-01/storagesync/syncgroups.go index b6ca0a9330e8..6ea4dead19b2 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/syncgroups.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/syncgroups.go @@ -36,7 +36,8 @@ func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client. +// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/workflows.go b/services/storagesync/mgmt/2018-10-01/storagesync/workflows.go index ed0b140e1911..49f68fc53728 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/workflows.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/workflows.go @@ -36,7 +36,8 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/client.go b/services/storagesync/mgmt/2019-02-01/storagesync/client.go index 55769855aa4e..3a3cb462c353 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/client.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/cloudendpoints.go b/services/storagesync/mgmt/2019-02-01/storagesync/cloudendpoints.go index 73bb88e3dcca..909b50e6361f 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/cloudendpoints.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/cloudendpoints.go @@ -36,7 +36,8 @@ func NewCloudEndpointsClient(subscriptionID string) CloudEndpointsClient { return NewCloudEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCloudEndpointsClientWithBaseURI creates an instance of the CloudEndpointsClient client. +// NewCloudEndpointsClientWithBaseURI creates an instance of the CloudEndpointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCloudEndpointsClientWithBaseURI(baseURI string, subscriptionID string) CloudEndpointsClient { return CloudEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/operations.go b/services/storagesync/mgmt/2019-02-01/storagesync/operations.go index e2532105ae69..3776a6353b27 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/operations.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/registeredservers.go b/services/storagesync/mgmt/2019-02-01/storagesync/registeredservers.go index 6d4af09146e0..3d46d99d0a22 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/registeredservers.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/registeredservers.go @@ -36,7 +36,9 @@ func NewRegisteredServersClient(subscriptionID string) RegisteredServersClient { return NewRegisteredServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegisteredServersClientWithBaseURI creates an instance of the RegisteredServersClient client. +// NewRegisteredServersClientWithBaseURI creates an instance of the RegisteredServersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRegisteredServersClientWithBaseURI(baseURI string, subscriptionID string) RegisteredServersClient { return RegisteredServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/serverendpoints.go b/services/storagesync/mgmt/2019-02-01/storagesync/serverendpoints.go index c19233568da0..2c7700322779 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/serverendpoints.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/serverendpoints.go @@ -36,7 +36,8 @@ func NewServerEndpointsClient(subscriptionID string) ServerEndpointsClient { return NewServerEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServerEndpointsClientWithBaseURI creates an instance of the ServerEndpointsClient client. +// NewServerEndpointsClientWithBaseURI creates an instance of the ServerEndpointsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServerEndpointsClientWithBaseURI(baseURI string, subscriptionID string) ServerEndpointsClient { return ServerEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/services.go b/services/storagesync/mgmt/2019-02-01/storagesync/services.go index 42ef156ec959..c5109da7a1c4 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/services.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/storagesyncapi/interfaces.go b/services/storagesync/mgmt/2019-02-01/storagesync/storagesyncapi/interfaces.go index 8910dd76256e..c905833d41fc 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/storagesyncapi/interfaces.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/storagesyncapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result storagesync.OperationEntityListResultPage, err error) + ListComplete(ctx context.Context) (result storagesync.OperationEntityListResultIterator, err error) } var _ OperationsClientAPI = (*storagesync.OperationsClient)(nil) diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/syncgroups.go b/services/storagesync/mgmt/2019-02-01/storagesync/syncgroups.go index 1198f47ddd04..c1893d6689d9 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/syncgroups.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/syncgroups.go @@ -36,7 +36,8 @@ func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client. +// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/workflows.go b/services/storagesync/mgmt/2019-02-01/storagesync/workflows.go index 41794f6b87c0..321a20a06b3e 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/workflows.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/workflows.go @@ -36,7 +36,8 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/accesscontrolrecords.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/accesscontrolrecords.go index cb34ad4e837e..16ce604b0ce9 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/accesscontrolrecords.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/accesscontrolrecords.go @@ -36,7 +36,9 @@ func NewAccessControlRecordsClient(subscriptionID string) AccessControlRecordsCl return NewAccessControlRecordsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccessControlRecordsClientWithBaseURI creates an instance of the AccessControlRecordsClient client. +// NewAccessControlRecordsClientWithBaseURI creates an instance of the AccessControlRecordsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAccessControlRecordsClientWithBaseURI(baseURI string, subscriptionID string) AccessControlRecordsClient { return AccessControlRecordsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/alerts.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/alerts.go index 23ab99971c24..1057709d873f 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/alerts.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/alerts.go @@ -36,7 +36,8 @@ func NewAlertsClient(subscriptionID string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/availableprovideroperations.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/availableprovideroperations.go index 45b322d1969e..773af6566fe4 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/availableprovideroperations.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/availableprovideroperations.go @@ -36,7 +36,9 @@ func NewAvailableProviderOperationsClient(subscriptionID string) AvailableProvid return NewAvailableProviderOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableProviderOperationsClientWithBaseURI creates an instance of the AvailableProviderOperationsClient client. +// NewAvailableProviderOperationsClientWithBaseURI creates an instance of the AvailableProviderOperationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAvailableProviderOperationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableProviderOperationsClient { return AvailableProviderOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/backups.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/backups.go index 6bf00fceca11..1eb3b8d4e295 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/backups.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/backups.go @@ -36,7 +36,8 @@ func NewBackupsClient(subscriptionID string) BackupsClient { return NewBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupsClientWithBaseURI creates an instance of the BackupsClient client. +// 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)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/backupschedulegroups.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/backupschedulegroups.go index ecdf757ea58c..2940d8a9d18d 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/backupschedulegroups.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/backupschedulegroups.go @@ -36,7 +36,9 @@ func NewBackupScheduleGroupsClient(subscriptionID string) BackupScheduleGroupsCl return NewBackupScheduleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupScheduleGroupsClientWithBaseURI creates an instance of the BackupScheduleGroupsClient client. +// NewBackupScheduleGroupsClientWithBaseURI creates an instance of the BackupScheduleGroupsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewBackupScheduleGroupsClientWithBaseURI(baseURI string, subscriptionID string) BackupScheduleGroupsClient { return BackupScheduleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/chapsettings.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/chapsettings.go index 3a1942ddde9b..aee831f33fb0 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/chapsettings.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/chapsettings.go @@ -36,7 +36,8 @@ func NewChapSettingsClient(subscriptionID string) ChapSettingsClient { return NewChapSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewChapSettingsClientWithBaseURI creates an instance of the ChapSettingsClient client. +// NewChapSettingsClientWithBaseURI creates an instance of the ChapSettingsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewChapSettingsClientWithBaseURI(baseURI string, subscriptionID string) ChapSettingsClient { return ChapSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/client.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/client.go index e2cffc65446f..d180663cbe30 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/client.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/devices.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/devices.go index 045094ef10ac..d9d88fe8c1cd 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/devices.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/devices.go @@ -36,7 +36,8 @@ func NewDevicesClient(subscriptionID string) DevicesClient { return NewDevicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client. +// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDevicesClientWithBaseURI(baseURI string, subscriptionID string) DevicesClient { return DevicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/fileservers.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/fileservers.go index a21f3446be1e..46f17339314e 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/fileservers.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/fileservers.go @@ -36,7 +36,8 @@ func NewFileServersClient(subscriptionID string) FileServersClient { return NewFileServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileServersClientWithBaseURI creates an instance of the FileServersClient client. +// NewFileServersClientWithBaseURI creates an instance of the FileServersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileServersClientWithBaseURI(baseURI string, subscriptionID string) FileServersClient { return FileServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/fileshares.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/fileshares.go index 28bd4f6378f1..45a46f6d8053 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/fileshares.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/fileshares.go @@ -36,7 +36,8 @@ func NewFileSharesClient(subscriptionID string) FileSharesClient { return NewFileSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient client. +// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileSharesClientWithBaseURI(baseURI string, subscriptionID string) FileSharesClient { return FileSharesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/iscsidisks.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/iscsidisks.go index b505ee1bb70a..dc348a57cd42 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/iscsidisks.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/iscsidisks.go @@ -36,7 +36,8 @@ func NewIscsiDisksClient(subscriptionID string) IscsiDisksClient { return NewIscsiDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIscsiDisksClientWithBaseURI creates an instance of the IscsiDisksClient client. +// NewIscsiDisksClientWithBaseURI creates an instance of the IscsiDisksClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIscsiDisksClientWithBaseURI(baseURI string, subscriptionID string) IscsiDisksClient { return IscsiDisksClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/iscsiservers.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/iscsiservers.go index 6f24398d4fd1..16404f1fe8f6 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/iscsiservers.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/iscsiservers.go @@ -36,7 +36,8 @@ func NewIscsiServersClient(subscriptionID string) IscsiServersClient { return NewIscsiServersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIscsiServersClientWithBaseURI creates an instance of the IscsiServersClient client. +// NewIscsiServersClientWithBaseURI creates an instance of the IscsiServersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewIscsiServersClientWithBaseURI(baseURI string, subscriptionID string) IscsiServersClient { return IscsiServersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/jobs.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/jobs.go index a1e2c961ee04..47725ed93a65 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/jobs.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/managers.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/managers.go index 0ccc20bc5405..0deba2dd8da8 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/managers.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/managers.go @@ -36,7 +36,8 @@ func NewManagersClient(subscriptionID string) ManagersClient { return NewManagersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagersClientWithBaseURI creates an instance of the ManagersClient client. +// NewManagersClientWithBaseURI creates an instance of the ManagersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagersClientWithBaseURI(baseURI string, subscriptionID string) ManagersClient { return ManagersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/storageaccountcredentials.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/storageaccountcredentials.go index 321620423c60..38f83b35d0ca 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/storageaccountcredentials.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/storageaccountcredentials.go @@ -36,7 +36,9 @@ func NewStorageAccountCredentialsClient(subscriptionID string) StorageAccountCre return NewStorageAccountCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client. +// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewStorageAccountCredentialsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountCredentialsClient { return StorageAccountCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/storagedomains.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/storagedomains.go index 01e885ed31f3..3f1a67f7b624 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/storagedomains.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/storagedomains.go @@ -36,7 +36,8 @@ func NewStorageDomainsClient(subscriptionID string) StorageDomainsClient { return NewStorageDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageDomainsClientWithBaseURI creates an instance of the StorageDomainsClient client. +// NewStorageDomainsClientWithBaseURI creates an instance of the StorageDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStorageDomainsClientWithBaseURI(baseURI string, subscriptionID string) StorageDomainsClient { return StorageDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/storsimpleapi/interfaces.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/storsimpleapi/interfaces.go index af9123c963d0..3b1400508564 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/storsimpleapi/interfaces.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/storsimpleapi/interfaces.go @@ -47,6 +47,7 @@ var _ ManagersClientAPI = (*storsimple.ManagersClient)(nil) // AvailableProviderOperationsClientAPI contains the set of methods on the AvailableProviderOperationsClient type. type AvailableProviderOperationsClientAPI interface { List(ctx context.Context) (result storsimple.AvailableProviderOperationsPage, err error) + ListComplete(ctx context.Context) (result storsimple.AvailableProviderOperationsIterator, err error) } var _ AvailableProviderOperationsClientAPI = (*storsimple.AvailableProviderOperationsClient)(nil) @@ -65,6 +66,7 @@ var _ AccessControlRecordsClientAPI = (*storsimple.AccessControlRecordsClient)(n type AlertsClientAPI interface { Clear(ctx context.Context, request storsimple.ClearAlertRequest, resourceGroupName string, managerName string) (result autorest.Response, err error) ListByManager(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.AlertListPage, err error) + ListByManagerComplete(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.AlertListIterator, err error) SendTestEmail(ctx context.Context, deviceName string, request storsimple.SendTestAlertEmailRequest, resourceGroupName string, managerName string) (result autorest.Response, err error) } @@ -75,7 +77,9 @@ type BackupsClientAPI interface { Clone(ctx context.Context, deviceName string, backupName string, elementName string, cloneRequest storsimple.CloneRequest, resourceGroupName string, managerName string) (result storsimple.BackupsCloneFuture, err error) Delete(ctx context.Context, deviceName string, backupName string, resourceGroupName string, managerName string) (result storsimple.BackupsDeleteFuture, err error) ListByDevice(ctx context.Context, deviceName string, resourceGroupName string, managerName string, forFailover *bool, filter string) (result storsimple.BackupListPage, err error) + ListByDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string, managerName string, forFailover *bool, filter string) (result storsimple.BackupListIterator, err error) ListByManager(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.BackupListPage, err error) + ListByManagerComplete(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.BackupListIterator, err error) } var _ BackupsClientAPI = (*storsimple.BackupsClient)(nil) @@ -182,7 +186,9 @@ var _ IscsiServersClientAPI = (*storsimple.IscsiServersClient)(nil) type JobsClientAPI interface { Get(ctx context.Context, deviceName string, jobName string, resourceGroupName string, managerName string) (result storsimple.Job, err error) ListByDevice(ctx context.Context, deviceName string, resourceGroupName string, managerName string, filter string) (result storsimple.JobListPage, err error) + ListByDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string, managerName string, filter string) (result storsimple.JobListIterator, err error) ListByManager(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.JobListPage, err error) + ListByManagerComplete(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.JobListIterator, err error) } var _ JobsClientAPI = (*storsimple.JobsClient)(nil) diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/accesscontrolrecords.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/accesscontrolrecords.go index ebce6d2c183c..fc06dce2c909 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/accesscontrolrecords.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/accesscontrolrecords.go @@ -36,7 +36,9 @@ func NewAccessControlRecordsClient(subscriptionID string) AccessControlRecordsCl return NewAccessControlRecordsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccessControlRecordsClientWithBaseURI creates an instance of the AccessControlRecordsClient client. +// NewAccessControlRecordsClientWithBaseURI creates an instance of the AccessControlRecordsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAccessControlRecordsClientWithBaseURI(baseURI string, subscriptionID string) AccessControlRecordsClient { return AccessControlRecordsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/alerts.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/alerts.go index 05d02f38fb01..ef3c3e85b38a 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/alerts.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/alerts.go @@ -36,7 +36,8 @@ func NewAlertsClient(subscriptionID string) AlertsClient { return NewAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client. +// NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient { return AlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/backuppolicies.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/backuppolicies.go index 2cb5eb501492..d680c39db040 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/backuppolicies.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/backuppolicies.go @@ -36,7 +36,8 @@ func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient { return NewBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupPoliciesClientWithBaseURI creates an instance of the BackupPoliciesClient client. +// 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)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/backups.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/backups.go index 60725b6cb7c6..651b7b723cb7 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/backups.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/backups.go @@ -36,7 +36,8 @@ func NewBackupsClient(subscriptionID string) BackupsClient { return NewBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupsClientWithBaseURI creates an instance of the BackupsClient client. +// 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)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/backupschedules.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/backupschedules.go index c91fe776e3ec..334daf6c601a 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/backupschedules.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/backupschedules.go @@ -36,7 +36,8 @@ func NewBackupSchedulesClient(subscriptionID string) BackupSchedulesClient { return NewBackupSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupSchedulesClientWithBaseURI creates an instance of the BackupSchedulesClient client. +// NewBackupSchedulesClientWithBaseURI creates an instance of the BackupSchedulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBackupSchedulesClientWithBaseURI(baseURI string, subscriptionID string) BackupSchedulesClient { return BackupSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/bandwidthsettings.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/bandwidthsettings.go index 12665c8dcded..d79c72ca6fe0 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/bandwidthsettings.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/bandwidthsettings.go @@ -36,7 +36,9 @@ func NewBandwidthSettingsClient(subscriptionID string) BandwidthSettingsClient { return NewBandwidthSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBandwidthSettingsClientWithBaseURI creates an instance of the BandwidthSettingsClient client. +// NewBandwidthSettingsClientWithBaseURI creates an instance of the BandwidthSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewBandwidthSettingsClientWithBaseURI(baseURI string, subscriptionID string) BandwidthSettingsClient { return BandwidthSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/client.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/client.go index d34324eb15fe..75ea953f132d 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/client.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/cloudappliances.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/cloudappliances.go index 30507de0e0f1..162b4d08ea41 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/cloudappliances.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/cloudappliances.go @@ -36,7 +36,8 @@ func NewCloudAppliancesClient(subscriptionID string) CloudAppliancesClient { return NewCloudAppliancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCloudAppliancesClientWithBaseURI creates an instance of the CloudAppliancesClient client. +// NewCloudAppliancesClientWithBaseURI creates an instance of the CloudAppliancesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCloudAppliancesClientWithBaseURI(baseURI string, subscriptionID string) CloudAppliancesClient { return CloudAppliancesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/devices.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/devices.go index 463f22071d4d..7e9897c6953e 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/devices.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/devices.go @@ -36,7 +36,8 @@ func NewDevicesClient(subscriptionID string) DevicesClient { return NewDevicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client. +// NewDevicesClientWithBaseURI creates an instance of the DevicesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDevicesClientWithBaseURI(baseURI string, subscriptionID string) DevicesClient { return DevicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/devicesettings.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/devicesettings.go index a9f4341aadaa..c79db0199c07 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/devicesettings.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/devicesettings.go @@ -36,7 +36,8 @@ func NewDeviceSettingsClient(subscriptionID string) DeviceSettingsClient { return NewDeviceSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeviceSettingsClientWithBaseURI creates an instance of the DeviceSettingsClient client. +// NewDeviceSettingsClientWithBaseURI creates an instance of the DeviceSettingsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeviceSettingsClientWithBaseURI(baseURI string, subscriptionID string) DeviceSettingsClient { return DeviceSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/hardwarecomponentgroups.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/hardwarecomponentgroups.go index 4f095b71ef7d..3f0415aa33cc 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/hardwarecomponentgroups.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/hardwarecomponentgroups.go @@ -36,7 +36,9 @@ func NewHardwareComponentGroupsClient(subscriptionID string) HardwareComponentGr return NewHardwareComponentGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHardwareComponentGroupsClientWithBaseURI creates an instance of the HardwareComponentGroupsClient client. +// NewHardwareComponentGroupsClientWithBaseURI creates an instance of the HardwareComponentGroupsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewHardwareComponentGroupsClientWithBaseURI(baseURI string, subscriptionID string) HardwareComponentGroupsClient { return HardwareComponentGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/jobs.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/jobs.go index 3d911b7eed31..8563c809e0f1 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/jobs.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/jobs.go @@ -36,7 +36,8 @@ func NewJobsClient(subscriptionID string) JobsClient { return NewJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobsClientWithBaseURI creates an instance of the JobsClient client. +// 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)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/managers.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/managers.go index 722375a92cc0..0ea06b77c689 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/managers.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/managers.go @@ -36,7 +36,8 @@ func NewManagersClient(subscriptionID string) ManagersClient { return NewManagersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagersClientWithBaseURI creates an instance of the ManagersClient client. +// NewManagersClientWithBaseURI creates an instance of the ManagersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewManagersClientWithBaseURI(baseURI string, subscriptionID string) ManagersClient { return ManagersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/operations.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/operations.go index 45308a81866d..b7ba3699947c 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/operations.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/storageaccountcredentials.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/storageaccountcredentials.go index af412c574374..a8e48a7d8c3b 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/storageaccountcredentials.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/storageaccountcredentials.go @@ -36,7 +36,9 @@ func NewStorageAccountCredentialsClient(subscriptionID string) StorageAccountCre return NewStorageAccountCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client. +// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewStorageAccountCredentialsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountCredentialsClient { return StorageAccountCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/storsimpleapi/interfaces.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/storsimpleapi/interfaces.go index 7b522ecc21eb..073d4a3918e5 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/storsimpleapi/interfaces.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/storsimpleapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result storsimple.AvailableProviderOperationListPage, err error) + ListComplete(ctx context.Context) (result storsimple.AvailableProviderOperationListIterator, err error) } var _ OperationsClientAPI = (*storsimple.OperationsClient)(nil) @@ -68,6 +69,7 @@ var _ AccessControlRecordsClientAPI = (*storsimple.AccessControlRecordsClient)(n type AlertsClientAPI interface { Clear(ctx context.Context, parameters storsimple.ClearAlertRequest, resourceGroupName string, managerName string) (result autorest.Response, err error) ListByManager(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.AlertListPage, err error) + ListByManagerComplete(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.AlertListIterator, err error) SendTestEmail(ctx context.Context, deviceName string, parameters storsimple.SendTestAlertEmailRequest, resourceGroupName string, managerName string) (result autorest.Response, err error) } @@ -153,6 +155,7 @@ type BackupsClientAPI interface { Clone(ctx context.Context, deviceName string, backupName string, backupElementName string, parameters storsimple.CloneRequest, resourceGroupName string, managerName string) (result storsimple.BackupsCloneFuture, err error) Delete(ctx context.Context, deviceName string, backupName string, resourceGroupName string, managerName string) (result storsimple.BackupsDeleteFuture, err error) ListByDevice(ctx context.Context, deviceName string, resourceGroupName string, managerName string, filter string) (result storsimple.BackupListPage, err error) + ListByDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string, managerName string, filter string) (result storsimple.BackupListIterator, err error) Restore(ctx context.Context, deviceName string, backupName string, resourceGroupName string, managerName string) (result storsimple.BackupsRestoreFuture, err error) } @@ -171,7 +174,9 @@ type JobsClientAPI interface { Cancel(ctx context.Context, deviceName string, jobName string, resourceGroupName string, managerName string) (result storsimple.JobsCancelFuture, err error) Get(ctx context.Context, deviceName string, jobName string, resourceGroupName string, managerName string) (result storsimple.Job, err error) ListByDevice(ctx context.Context, deviceName string, resourceGroupName string, managerName string, filter string) (result storsimple.JobListPage, err error) + ListByDeviceComplete(ctx context.Context, deviceName string, resourceGroupName string, managerName string, filter string) (result storsimple.JobListIterator, err error) ListByManager(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.JobListPage, err error) + ListByManagerComplete(ctx context.Context, resourceGroupName string, managerName string, filter string) (result storsimple.JobListIterator, err error) } var _ JobsClientAPI = (*storsimple.JobsClient)(nil) diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumecontainers.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumecontainers.go index eac05fe94a63..4a26cd9786a5 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumecontainers.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumecontainers.go @@ -36,7 +36,9 @@ func NewVolumeContainersClient(subscriptionID string) VolumeContainersClient { return NewVolumeContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumeContainersClientWithBaseURI creates an instance of the VolumeContainersClient client. +// NewVolumeContainersClientWithBaseURI creates an instance of the VolumeContainersClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVolumeContainersClientWithBaseURI(baseURI string, subscriptionID string) VolumeContainersClient { return VolumeContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumes.go b/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumes.go index a18496b216db..a0d9d4757e0d 100644 --- a/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumes.go +++ b/services/storsimple8000series/mgmt/2017-06-01/storsimple/volumes.go @@ -36,7 +36,8 @@ func NewVolumesClient(subscriptionID string) VolumesClient { return NewVolumesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumesClientWithBaseURI creates an instance of the VolumesClient client. +// 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)} } diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/client.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/client.go index 273aabfe4f2e..e6111739ad1e 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/client.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/functions.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/functions.go index 837e27c6816f..24673edfcc58 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/functions.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/functions.go @@ -35,7 +35,8 @@ func NewFunctionsClient(subscriptionID string) FunctionsClient { return NewFunctionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFunctionsClientWithBaseURI creates an instance of the FunctionsClient client. +// NewFunctionsClientWithBaseURI creates an instance of the FunctionsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFunctionsClientWithBaseURI(baseURI string, subscriptionID string) FunctionsClient { return FunctionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/inputs.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/inputs.go index 23b4df6a1893..b3e230deeab5 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/inputs.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/inputs.go @@ -35,7 +35,8 @@ func NewInputsClient(subscriptionID string) InputsClient { return NewInputsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInputsClientWithBaseURI creates an instance of the InputsClient client. +// NewInputsClientWithBaseURI creates an instance of the InputsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInputsClientWithBaseURI(baseURI string, subscriptionID string) InputsClient { return InputsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/operations.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/operations.go index 10c7a15834b5..65b3a768c982 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/operations.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/outputs.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/outputs.go index c853ccff8f32..29c1c26fc256 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/outputs.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/outputs.go @@ -35,7 +35,8 @@ func NewOutputsClient(subscriptionID string) OutputsClient { return NewOutputsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOutputsClientWithBaseURI creates an instance of the OutputsClient client. +// NewOutputsClientWithBaseURI creates an instance of the OutputsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOutputsClientWithBaseURI(baseURI string, subscriptionID string) OutputsClient { return OutputsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamanalyticsapi/interfaces.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamanalyticsapi/interfaces.go index 8e3a2144c91c..c810d9a2c3cf 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamanalyticsapi/interfaces.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamanalyticsapi/interfaces.go @@ -26,6 +26,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result streamanalytics.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result streamanalytics.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*streamanalytics.OperationsClient)(nil) @@ -36,7 +37,9 @@ type StreamingJobsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobName string) (result streamanalytics.StreamingJobsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, jobName string, expand string) (result streamanalytics.StreamingJob, err error) List(ctx context.Context, expand string) (result streamanalytics.StreamingJobListResultPage, err error) + ListComplete(ctx context.Context, expand string) (result streamanalytics.StreamingJobListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string) (result streamanalytics.StreamingJobListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string) (result streamanalytics.StreamingJobListResultIterator, err error) Start(ctx context.Context, resourceGroupName string, jobName string, startJobParameters *streamanalytics.StartStreamingJobParameters) (result streamanalytics.StreamingJobsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, jobName string) (result streamanalytics.StreamingJobsStopFuture, err error) Update(ctx context.Context, streamingJob streamanalytics.StreamingJob, resourceGroupName string, jobName string, ifMatch string) (result streamanalytics.StreamingJob, err error) @@ -50,6 +53,7 @@ type InputsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobName string, inputName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, jobName string, inputName string) (result streamanalytics.Input, err error) ListByStreamingJob(ctx context.Context, resourceGroupName string, jobName string, selectParameter string) (result streamanalytics.InputListResultPage, err error) + ListByStreamingJobComplete(ctx context.Context, resourceGroupName string, jobName string, selectParameter string) (result streamanalytics.InputListResultIterator, err error) Test(ctx context.Context, resourceGroupName string, jobName string, inputName string, input *streamanalytics.Input) (result streamanalytics.InputsTestFuture, err error) Update(ctx context.Context, input streamanalytics.Input, resourceGroupName string, jobName string, inputName string, ifMatch string) (result streamanalytics.Input, err error) } @@ -62,6 +66,7 @@ type OutputsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobName string, outputName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, jobName string, outputName string) (result streamanalytics.Output, err error) ListByStreamingJob(ctx context.Context, resourceGroupName string, jobName string, selectParameter string) (result streamanalytics.OutputListResultPage, err error) + ListByStreamingJobComplete(ctx context.Context, resourceGroupName string, jobName string, selectParameter string) (result streamanalytics.OutputListResultIterator, err error) Test(ctx context.Context, resourceGroupName string, jobName string, outputName string, output *streamanalytics.Output) (result streamanalytics.OutputsTestFuture, err error) Update(ctx context.Context, output streamanalytics.Output, resourceGroupName string, jobName string, outputName string, ifMatch string) (result streamanalytics.Output, err error) } @@ -83,6 +88,7 @@ type FunctionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, jobName string, functionName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, jobName string, functionName string) (result streamanalytics.Function, err error) ListByStreamingJob(ctx context.Context, resourceGroupName string, jobName string, selectParameter string) (result streamanalytics.FunctionListResultPage, err error) + ListByStreamingJobComplete(ctx context.Context, resourceGroupName string, jobName string, selectParameter string) (result streamanalytics.FunctionListResultIterator, err error) RetrieveDefaultDefinition(ctx context.Context, resourceGroupName string, jobName string, functionName string, functionRetrieveDefaultDefinitionParameters *streamanalytics.BasicFunctionRetrieveDefaultDefinitionParameters) (result streamanalytics.Function, err error) Test(ctx context.Context, resourceGroupName string, jobName string, functionName string, function *streamanalytics.Function) (result streamanalytics.FunctionsTestFuture, err error) Update(ctx context.Context, function streamanalytics.Function, resourceGroupName string, jobName string, functionName string, ifMatch string) (result streamanalytics.Function, err error) diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamingjobs.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamingjobs.go index e3a1ebd18d02..4644230e08a8 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamingjobs.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/streamingjobs.go @@ -35,7 +35,8 @@ func NewStreamingJobsClient(subscriptionID string) StreamingJobsClient { return NewStreamingJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingJobsClientWithBaseURI creates an instance of the StreamingJobsClient client. +// NewStreamingJobsClientWithBaseURI creates an instance of the StreamingJobsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewStreamingJobsClientWithBaseURI(baseURI string, subscriptionID string) StreamingJobsClient { return StreamingJobsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/subscriptions.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/subscriptions.go index 6011aeaf1f57..8c9a90596f8f 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/subscriptions.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/subscriptions.go @@ -35,7 +35,8 @@ func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/transformations.go b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/transformations.go index 7e82790ca9a6..6d5f431c91c0 100644 --- a/services/streamanalytics/mgmt/2016-03-01/streamanalytics/transformations.go +++ b/services/streamanalytics/mgmt/2016-03-01/streamanalytics/transformations.go @@ -35,7 +35,8 @@ func NewTransformationsClient(subscriptionID string) TransformationsClient { return NewTransformationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransformationsClientWithBaseURI creates an instance of the TransformationsClient client. +// NewTransformationsClientWithBaseURI creates an instance of the TransformationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTransformationsClientWithBaseURI(baseURI string, subscriptionID string) TransformationsClient { return TransformationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2015-11-01/trafficmanager/client.go b/services/trafficmanager/mgmt/2015-11-01/trafficmanager/client.go index c613d36141a1..6d230b65b0c7 100644 --- a/services/trafficmanager/mgmt/2015-11-01/trafficmanager/client.go +++ b/services/trafficmanager/mgmt/2015-11-01/trafficmanager/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/trafficmanager/mgmt/2015-11-01/trafficmanager/endpoints.go b/services/trafficmanager/mgmt/2015-11-01/trafficmanager/endpoints.go index bbba858af318..d2d6bd7981ab 100644 --- a/services/trafficmanager/mgmt/2015-11-01/trafficmanager/endpoints.go +++ b/services/trafficmanager/mgmt/2015-11-01/trafficmanager/endpoints.go @@ -35,7 +35,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2015-11-01/trafficmanager/profiles.go b/services/trafficmanager/mgmt/2015-11-01/trafficmanager/profiles.go index 3069bbf42a2e..ba9ac57dab95 100644 --- a/services/trafficmanager/mgmt/2015-11-01/trafficmanager/profiles.go +++ b/services/trafficmanager/mgmt/2015-11-01/trafficmanager/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/trafficmanager/mgmt/2017-03-01/trafficmanager/client.go b/services/trafficmanager/mgmt/2017-03-01/trafficmanager/client.go index 9fb57a40d433..4cd6534f663e 100644 --- a/services/trafficmanager/mgmt/2017-03-01/trafficmanager/client.go +++ b/services/trafficmanager/mgmt/2017-03-01/trafficmanager/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/trafficmanager/mgmt/2017-03-01/trafficmanager/endpoints.go b/services/trafficmanager/mgmt/2017-03-01/trafficmanager/endpoints.go index 275c98d5d29a..d8832317c52f 100644 --- a/services/trafficmanager/mgmt/2017-03-01/trafficmanager/endpoints.go +++ b/services/trafficmanager/mgmt/2017-03-01/trafficmanager/endpoints.go @@ -35,7 +35,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2017-03-01/trafficmanager/geographichierarchies.go b/services/trafficmanager/mgmt/2017-03-01/trafficmanager/geographichierarchies.go index d61fab986e19..6b734254f934 100644 --- a/services/trafficmanager/mgmt/2017-03-01/trafficmanager/geographichierarchies.go +++ b/services/trafficmanager/mgmt/2017-03-01/trafficmanager/geographichierarchies.go @@ -35,7 +35,9 @@ func NewGeographicHierarchiesClient(subscriptionID string) GeographicHierarchies return NewGeographicHierarchiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client. +// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewGeographicHierarchiesClientWithBaseURI(baseURI string, subscriptionID string) GeographicHierarchiesClient { return GeographicHierarchiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2017-03-01/trafficmanager/profiles.go b/services/trafficmanager/mgmt/2017-03-01/trafficmanager/profiles.go index d0670e5131f7..0faec88865ca 100644 --- a/services/trafficmanager/mgmt/2017-03-01/trafficmanager/profiles.go +++ b/services/trafficmanager/mgmt/2017-03-01/trafficmanager/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/trafficmanager/mgmt/2017-05-01/trafficmanager/client.go b/services/trafficmanager/mgmt/2017-05-01/trafficmanager/client.go index 7cff0c128de1..5ad45185b674 100644 --- a/services/trafficmanager/mgmt/2017-05-01/trafficmanager/client.go +++ b/services/trafficmanager/mgmt/2017-05-01/trafficmanager/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/trafficmanager/mgmt/2017-05-01/trafficmanager/endpoints.go b/services/trafficmanager/mgmt/2017-05-01/trafficmanager/endpoints.go index 8fd56d390429..05d6e7f6ad56 100644 --- a/services/trafficmanager/mgmt/2017-05-01/trafficmanager/endpoints.go +++ b/services/trafficmanager/mgmt/2017-05-01/trafficmanager/endpoints.go @@ -35,7 +35,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2017-05-01/trafficmanager/geographichierarchies.go b/services/trafficmanager/mgmt/2017-05-01/trafficmanager/geographichierarchies.go index c1426b5a7823..b2b53316ecd7 100644 --- a/services/trafficmanager/mgmt/2017-05-01/trafficmanager/geographichierarchies.go +++ b/services/trafficmanager/mgmt/2017-05-01/trafficmanager/geographichierarchies.go @@ -35,7 +35,9 @@ func NewGeographicHierarchiesClient(subscriptionID string) GeographicHierarchies return NewGeographicHierarchiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client. +// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewGeographicHierarchiesClientWithBaseURI(baseURI string, subscriptionID string) GeographicHierarchiesClient { return GeographicHierarchiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2017-05-01/trafficmanager/profiles.go b/services/trafficmanager/mgmt/2017-05-01/trafficmanager/profiles.go index 4877970c711f..c845dda4f763 100644 --- a/services/trafficmanager/mgmt/2017-05-01/trafficmanager/profiles.go +++ b/services/trafficmanager/mgmt/2017-05-01/trafficmanager/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/client.go b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/client.go index 950ec82bbac0..905ae519d25f 100644 --- a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/client.go +++ b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/endpoints.go b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/endpoints.go index ae3eb93f9bc1..46464709a569 100644 --- a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/endpoints.go +++ b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/endpoints.go @@ -35,7 +35,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/geographichierarchies.go b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/geographichierarchies.go index 13976502c197..9f46202c9fef 100644 --- a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/geographichierarchies.go +++ b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/geographichierarchies.go @@ -35,7 +35,9 @@ func NewGeographicHierarchiesClient(subscriptionID string) GeographicHierarchies return NewGeographicHierarchiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client. +// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewGeographicHierarchiesClientWithBaseURI(baseURI string, subscriptionID string) GeographicHierarchiesClient { return GeographicHierarchiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/heatmap.go b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/heatmap.go index da8862c29cc3..4da6a0ce8a4c 100644 --- a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/heatmap.go +++ b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/heatmap.go @@ -36,7 +36,8 @@ func NewHeatMapClient(subscriptionID string) HeatMapClient { return NewHeatMapClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client. +// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewHeatMapClientWithBaseURI(baseURI string, subscriptionID string) HeatMapClient { return HeatMapClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/profiles.go b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/profiles.go index cd3459f2bb79..48301d8ac475 100644 --- a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/profiles.go +++ b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/usermetricskeys.go b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/usermetricskeys.go index 35c284d3f2d0..aaa153f486dc 100644 --- a/services/trafficmanager/mgmt/2018-02-01/trafficmanager/usermetricskeys.go +++ b/services/trafficmanager/mgmt/2018-02-01/trafficmanager/usermetricskeys.go @@ -35,7 +35,8 @@ func NewUserMetricsKeysClient(subscriptionID string) UserMetricsKeysClient { return NewUserMetricsKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserMetricsKeysClientWithBaseURI creates an instance of the UserMetricsKeysClient client. +// NewUserMetricsKeysClientWithBaseURI creates an instance of the UserMetricsKeysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserMetricsKeysClientWithBaseURI(baseURI string, subscriptionID string) UserMetricsKeysClient { return UserMetricsKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/client.go b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/client.go index 8774a2f1300f..daf603cc6b89 100644 --- a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/client.go +++ b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/endpoints.go b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/endpoints.go index da5c00d4db70..432776f5aebd 100644 --- a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/endpoints.go +++ b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/endpoints.go @@ -35,7 +35,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/geographichierarchies.go b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/geographichierarchies.go index 76def27cdde3..21225de15d8b 100644 --- a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/geographichierarchies.go +++ b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/geographichierarchies.go @@ -35,7 +35,9 @@ func NewGeographicHierarchiesClient(subscriptionID string) GeographicHierarchies return NewGeographicHierarchiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client. +// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewGeographicHierarchiesClientWithBaseURI(baseURI string, subscriptionID string) GeographicHierarchiesClient { return GeographicHierarchiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/heatmap.go b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/heatmap.go index d3ac3542c0ae..c433a4e2e140 100644 --- a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/heatmap.go +++ b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/heatmap.go @@ -36,7 +36,8 @@ func NewHeatMapClient(subscriptionID string) HeatMapClient { return NewHeatMapClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client. +// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewHeatMapClientWithBaseURI(baseURI string, subscriptionID string) HeatMapClient { return HeatMapClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/profiles.go b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/profiles.go index 965b09721bb0..5594cf9b29c3 100644 --- a/services/trafficmanager/mgmt/2018-03-01/trafficmanager/profiles.go +++ b/services/trafficmanager/mgmt/2018-03-01/trafficmanager/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/client.go b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/client.go index 8e5e255f9a5d..5a4d319d1b79 100644 --- a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/client.go +++ b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/endpoints.go b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/endpoints.go index a160faf1a014..7fd383f6e771 100644 --- a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/endpoints.go +++ b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/endpoints.go @@ -35,7 +35,8 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/geographichierarchies.go b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/geographichierarchies.go index 4e3e76d993a6..1e2ca3927b9d 100644 --- a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/geographichierarchies.go +++ b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/geographichierarchies.go @@ -35,7 +35,9 @@ func NewGeographicHierarchiesClient(subscriptionID string) GeographicHierarchies return NewGeographicHierarchiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client. +// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewGeographicHierarchiesClientWithBaseURI(baseURI string, subscriptionID string) GeographicHierarchiesClient { return GeographicHierarchiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/heatmap.go b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/heatmap.go index 0f9309333050..d12a34db6e7b 100644 --- a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/heatmap.go +++ b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/heatmap.go @@ -36,7 +36,8 @@ func NewHeatMapClient(subscriptionID string) HeatMapClient { return NewHeatMapClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client. +// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewHeatMapClientWithBaseURI(baseURI string, subscriptionID string) HeatMapClient { return HeatMapClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/profiles.go b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/profiles.go index 79d03e29bdbf..a92706077000 100644 --- a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/profiles.go +++ b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// 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)} } diff --git a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/usermetricskeys.go b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/usermetricskeys.go index 7c3cc142cf66..698f53040d14 100644 --- a/services/trafficmanager/mgmt/2018-04-01/trafficmanager/usermetricskeys.go +++ b/services/trafficmanager/mgmt/2018-04-01/trafficmanager/usermetricskeys.go @@ -35,7 +35,8 @@ func NewUserMetricsKeysClient(subscriptionID string) UserMetricsKeysClient { return NewUserMetricsKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUserMetricsKeysClientWithBaseURI creates an instance of the UserMetricsKeysClient client. +// NewUserMetricsKeysClientWithBaseURI creates an instance of the UserMetricsKeysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUserMetricsKeysClientWithBaseURI(baseURI string, subscriptionID string) UserMetricsKeysClient { return UserMetricsKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/client.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/client.go index 755ae354bb34..740bce065cb8 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/client.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/client.go @@ -42,7 +42,8 @@ func New(subscriptionID string, referer string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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, referer string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/customizationpolicies.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/customizationpolicies.go index dec85de9114d..3920ff29c81d 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/customizationpolicies.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/customizationpolicies.go @@ -35,7 +35,9 @@ func NewCustomizationPoliciesClient(subscriptionID string, referer string) Custo return NewCustomizationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewCustomizationPoliciesClientWithBaseURI creates an instance of the CustomizationPoliciesClient client. +// NewCustomizationPoliciesClientWithBaseURI creates an instance of the CustomizationPoliciesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewCustomizationPoliciesClientWithBaseURI(baseURI string, subscriptionID string, referer string) CustomizationPoliciesClient { return CustomizationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/dedicatedcloudnodes.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/dedicatedcloudnodes.go index 5efd7a2c2c69..aa848f47bd70 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/dedicatedcloudnodes.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/dedicatedcloudnodes.go @@ -36,7 +36,9 @@ func NewDedicatedCloudNodesClient(subscriptionID string, referer string) Dedicat return NewDedicatedCloudNodesClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewDedicatedCloudNodesClientWithBaseURI creates an instance of the DedicatedCloudNodesClient client. +// NewDedicatedCloudNodesClientWithBaseURI creates an instance of the DedicatedCloudNodesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDedicatedCloudNodesClientWithBaseURI(baseURI string, subscriptionID string, referer string) DedicatedCloudNodesClient { return DedicatedCloudNodesClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/dedicatedcloudservices.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/dedicatedcloudservices.go index 5a8b8bd9569f..ffde8537f2ed 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/dedicatedcloudservices.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/dedicatedcloudservices.go @@ -36,7 +36,9 @@ func NewDedicatedCloudServicesClient(subscriptionID string, referer string) Dedi return NewDedicatedCloudServicesClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewDedicatedCloudServicesClientWithBaseURI creates an instance of the DedicatedCloudServicesClient client. +// NewDedicatedCloudServicesClientWithBaseURI creates an instance of the DedicatedCloudServicesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDedicatedCloudServicesClientWithBaseURI(baseURI string, subscriptionID string, referer string) DedicatedCloudServicesClient { return DedicatedCloudServicesClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/operations.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/operations.go index 0d9056e95f88..46c98c60587c 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/operations.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string, referer string) OperationsClient return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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, referer string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/privateclouds.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/privateclouds.go index 9854e510db2a..ebe22a216f21 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/privateclouds.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/privateclouds.go @@ -35,7 +35,8 @@ func NewPrivateCloudsClient(subscriptionID string, referer string) PrivateClouds return NewPrivateCloudsClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewPrivateCloudsClientWithBaseURI creates an instance of the PrivateCloudsClient client. +// NewPrivateCloudsClientWithBaseURI creates an instance of the PrivateCloudsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPrivateCloudsClientWithBaseURI(baseURI string, subscriptionID string, referer string) PrivateCloudsClient { return PrivateCloudsClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/resourcepools.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/resourcepools.go index 6ec7d5d3678e..f1597fae22a3 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/resourcepools.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/resourcepools.go @@ -35,7 +35,8 @@ func NewResourcePoolsClient(subscriptionID string, referer string) ResourcePools return NewResourcePoolsClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewResourcePoolsClientWithBaseURI creates an instance of the ResourcePoolsClient client. +// NewResourcePoolsClientWithBaseURI creates an instance of the ResourcePoolsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourcePoolsClientWithBaseURI(baseURI string, subscriptionID string, referer string) ResourcePoolsClient { return ResourcePoolsClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/skusavailability.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/skusavailability.go index e21ebca4196d..3d762abce1d1 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/skusavailability.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/skusavailability.go @@ -35,7 +35,9 @@ func NewSkusAvailabilityClient(subscriptionID string, referer string) SkusAvaila return NewSkusAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewSkusAvailabilityClientWithBaseURI creates an instance of the SkusAvailabilityClient client. +// NewSkusAvailabilityClientWithBaseURI creates an instance of the SkusAvailabilityClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewSkusAvailabilityClientWithBaseURI(baseURI string, subscriptionID string, referer string) SkusAvailabilityClient { return SkusAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/usages.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/usages.go index 71300088db19..16daf60dbc16 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/usages.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/usages.go @@ -35,7 +35,8 @@ func NewUsagesClient(subscriptionID string, referer string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// 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, referer string) UsagesClient { return UsagesClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualmachines.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualmachines.go index 8670e61ce367..febb11c39b6d 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualmachines.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string, referer string) VirtualMach return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// 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, referer string) VirtualMachinesClient { return VirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualmachinetemplates.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualmachinetemplates.go index ef66d5e2d6aa..9070f5dd38d6 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualmachinetemplates.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualmachinetemplates.go @@ -35,7 +35,9 @@ func NewVirtualMachineTemplatesClient(subscriptionID string, referer string) Vir return NewVirtualMachineTemplatesClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewVirtualMachineTemplatesClientWithBaseURI creates an instance of the VirtualMachineTemplatesClient client. +// NewVirtualMachineTemplatesClientWithBaseURI creates an instance of the VirtualMachineTemplatesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewVirtualMachineTemplatesClientWithBaseURI(baseURI string, subscriptionID string, referer string) VirtualMachineTemplatesClient { return VirtualMachineTemplatesClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualnetworks.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualnetworks.go index ca2631e25aeb..15cb553381f2 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualnetworks.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string, referer string) VirtualNetw return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, referer) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// 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, referer string) VirtualNetworksClient { return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID, referer)} } diff --git a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/vmwarecloudsimpleapi/interfaces.go b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/vmwarecloudsimpleapi/interfaces.go index fbb0889b07f1..e779f5c4cec6 100644 --- a/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/vmwarecloudsimpleapi/interfaces.go +++ b/services/vmwarecloudsimple/mgmt/2019-04-01/vmwarecloudsimple/vmwarecloudsimpleapi/interfaces.go @@ -27,6 +27,7 @@ import ( type OperationsClientAPI interface { Get(ctx context.Context, regionID string, operationID string) (result vmwarecloudsimple.OperationResource, err error) List(ctx context.Context) (result vmwarecloudsimple.AvailableOperationsListResponsePage, err error) + ListComplete(ctx context.Context) (result vmwarecloudsimple.AvailableOperationsListResponseIterator, err error) } var _ OperationsClientAPI = (*vmwarecloudsimple.OperationsClient)(nil) @@ -37,7 +38,9 @@ type DedicatedCloudNodesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string) (result vmwarecloudsimple.DedicatedCloudNode, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skipToken string) (result vmwarecloudsimple.DedicatedCloudNodeListResponsePage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skipToken string) (result vmwarecloudsimple.DedicatedCloudNodeListResponseIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32, skipToken string) (result vmwarecloudsimple.DedicatedCloudNodeListResponsePage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32, skipToken string) (result vmwarecloudsimple.DedicatedCloudNodeListResponseIterator, err error) Update(ctx context.Context, resourceGroupName string, dedicatedCloudNodeName string, dedicatedCloudNodeRequest vmwarecloudsimple.PatchPayload) (result vmwarecloudsimple.DedicatedCloudNode, err error) } @@ -49,7 +52,9 @@ type DedicatedCloudServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, dedicatedCloudServiceName string) (result vmwarecloudsimple.DedicatedCloudServicesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, dedicatedCloudServiceName string) (result vmwarecloudsimple.DedicatedCloudService, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skipToken string) (result vmwarecloudsimple.DedicatedCloudServiceListResponsePage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skipToken string) (result vmwarecloudsimple.DedicatedCloudServiceListResponseIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32, skipToken string) (result vmwarecloudsimple.DedicatedCloudServiceListResponsePage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32, skipToken string) (result vmwarecloudsimple.DedicatedCloudServiceListResponseIterator, err error) Update(ctx context.Context, resourceGroupName string, dedicatedCloudServiceName string, dedicatedCloudServiceRequest vmwarecloudsimple.PatchPayload) (result vmwarecloudsimple.DedicatedCloudService, err error) } @@ -58,6 +63,7 @@ var _ DedicatedCloudServicesClientAPI = (*vmwarecloudsimple.DedicatedCloudServic // SkusAvailabilityClientAPI contains the set of methods on the SkusAvailabilityClient type. type SkusAvailabilityClientAPI interface { List(ctx context.Context, regionID string, skuID string) (result vmwarecloudsimple.SkuAvailabilityListResponsePage, err error) + ListComplete(ctx context.Context, regionID string, skuID string) (result vmwarecloudsimple.SkuAvailabilityListResponseIterator, err error) } var _ SkusAvailabilityClientAPI = (*vmwarecloudsimple.SkusAvailabilityClient)(nil) @@ -66,6 +72,7 @@ var _ SkusAvailabilityClientAPI = (*vmwarecloudsimple.SkusAvailabilityClient)(ni type PrivateCloudsClientAPI interface { Get(ctx context.Context, pcName string, regionID string) (result vmwarecloudsimple.PrivateCloud, err error) List(ctx context.Context, regionID string) (result vmwarecloudsimple.PrivateCloudListPage, err error) + ListComplete(ctx context.Context, regionID string) (result vmwarecloudsimple.PrivateCloudListIterator, err error) } var _ PrivateCloudsClientAPI = (*vmwarecloudsimple.PrivateCloudsClient)(nil) @@ -74,6 +81,7 @@ var _ PrivateCloudsClientAPI = (*vmwarecloudsimple.PrivateCloudsClient)(nil) type CustomizationPoliciesClientAPI interface { Get(ctx context.Context, regionID string, pcName string, customizationPolicyName string) (result vmwarecloudsimple.CustomizationPolicy, err error) List(ctx context.Context, regionID string, pcName string, filter string) (result vmwarecloudsimple.CustomizationPoliciesListResponsePage, err error) + ListComplete(ctx context.Context, regionID string, pcName string, filter string) (result vmwarecloudsimple.CustomizationPoliciesListResponseIterator, err error) } var _ CustomizationPoliciesClientAPI = (*vmwarecloudsimple.CustomizationPoliciesClient)(nil) @@ -82,6 +90,7 @@ var _ CustomizationPoliciesClientAPI = (*vmwarecloudsimple.CustomizationPolicies type ResourcePoolsClientAPI interface { Get(ctx context.Context, regionID string, pcName string, resourcePoolName string) (result vmwarecloudsimple.ResourcePool, err error) List(ctx context.Context, regionID string, pcName string) (result vmwarecloudsimple.ResourcePoolsListResponsePage, err error) + ListComplete(ctx context.Context, regionID string, pcName string) (result vmwarecloudsimple.ResourcePoolsListResponseIterator, err error) } var _ ResourcePoolsClientAPI = (*vmwarecloudsimple.ResourcePoolsClient)(nil) @@ -90,6 +99,7 @@ var _ ResourcePoolsClientAPI = (*vmwarecloudsimple.ResourcePoolsClient)(nil) type VirtualMachineTemplatesClientAPI interface { Get(ctx context.Context, regionID string, pcName string, virtualMachineTemplateName string) (result vmwarecloudsimple.VirtualMachineTemplate, err error) List(ctx context.Context, pcName string, regionID string, resourcePoolName string) (result vmwarecloudsimple.VirtualMachineTemplateListResponsePage, err error) + ListComplete(ctx context.Context, pcName string, regionID string, resourcePoolName string) (result vmwarecloudsimple.VirtualMachineTemplateListResponseIterator, err error) } var _ VirtualMachineTemplatesClientAPI = (*vmwarecloudsimple.VirtualMachineTemplatesClient)(nil) @@ -98,6 +108,7 @@ var _ VirtualMachineTemplatesClientAPI = (*vmwarecloudsimple.VirtualMachineTempl type VirtualNetworksClientAPI interface { Get(ctx context.Context, regionID string, pcName string, virtualNetworkName string) (result vmwarecloudsimple.VirtualNetwork, err error) List(ctx context.Context, regionID string, pcName string, resourcePoolName string) (result vmwarecloudsimple.VirtualNetworkListResponsePage, err error) + ListComplete(ctx context.Context, regionID string, pcName string, resourcePoolName string) (result vmwarecloudsimple.VirtualNetworkListResponseIterator, err error) } var _ VirtualNetworksClientAPI = (*vmwarecloudsimple.VirtualNetworksClient)(nil) @@ -105,6 +116,7 @@ var _ VirtualNetworksClientAPI = (*vmwarecloudsimple.VirtualNetworksClient)(nil) // UsagesClientAPI contains the set of methods on the UsagesClient type. type UsagesClientAPI interface { List(ctx context.Context, regionID string, filter string) (result vmwarecloudsimple.UsageListResponsePage, err error) + ListComplete(ctx context.Context, regionID string, filter string) (result vmwarecloudsimple.UsageListResponseIterator, err error) } var _ UsagesClientAPI = (*vmwarecloudsimple.UsagesClient)(nil) @@ -115,7 +127,9 @@ type VirtualMachinesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, virtualMachineName string) (result vmwarecloudsimple.VirtualMachinesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, virtualMachineName string) (result vmwarecloudsimple.VirtualMachine, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skipToken string) (result vmwarecloudsimple.VirtualMachineListResponsePage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skipToken string) (result vmwarecloudsimple.VirtualMachineListResponseIterator, err error) ListBySubscription(ctx context.Context, filter string, top *int32, skipToken string) (result vmwarecloudsimple.VirtualMachineListResponsePage, err error) + ListBySubscriptionComplete(ctx context.Context, filter string, top *int32, skipToken string) (result vmwarecloudsimple.VirtualMachineListResponseIterator, err error) Start(ctx context.Context, resourceGroupName string, virtualMachineName string) (result vmwarecloudsimple.VirtualMachinesStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, virtualMachineName string, mParameter *vmwarecloudsimple.VirtualMachineStopMode, mode vmwarecloudsimple.StopMode) (result vmwarecloudsimple.VirtualMachinesStopFuture, err error) Update(ctx context.Context, resourceGroupName string, virtualMachineName string, virtualMachineRequest vmwarecloudsimple.PatchPayload) (result vmwarecloudsimple.VirtualMachinesUpdateFuture, err error) diff --git a/services/web/mgmt/2016-09-01/web/apps.go b/services/web/mgmt/2016-09-01/web/apps.go index 8f96478f1e83..909992cf5805 100644 --- a/services/web/mgmt/2016-09-01/web/apps.go +++ b/services/web/mgmt/2016-09-01/web/apps.go @@ -36,7 +36,8 @@ func NewAppsClient(subscriptionID string) AppsClient { return NewAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppsClientWithBaseURI creates an instance of the AppsClient client. +// NewAppsClientWithBaseURI creates an instance of the AppsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient { return AppsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go b/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go index dff37898d045..a0365e279783 100644 --- a/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go +++ b/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go @@ -36,7 +36,9 @@ func NewAppServiceCertificateOrdersClient(subscriptionID string) AppServiceCerti return NewAppServiceCertificateOrdersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServiceCertificateOrdersClientWithBaseURI creates an instance of the AppServiceCertificateOrdersClient client. +// NewAppServiceCertificateOrdersClientWithBaseURI creates an instance of the AppServiceCertificateOrdersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAppServiceCertificateOrdersClientWithBaseURI(baseURI string, subscriptionID string) AppServiceCertificateOrdersClient { return AppServiceCertificateOrdersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/appserviceenvironments.go b/services/web/mgmt/2016-09-01/web/appserviceenvironments.go index 1971b38dddeb..186196739451 100644 --- a/services/web/mgmt/2016-09-01/web/appserviceenvironments.go +++ b/services/web/mgmt/2016-09-01/web/appserviceenvironments.go @@ -36,7 +36,9 @@ func NewAppServiceEnvironmentsClient(subscriptionID string) AppServiceEnvironmen return NewAppServiceEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServiceEnvironmentsClientWithBaseURI creates an instance of the AppServiceEnvironmentsClient client. +// NewAppServiceEnvironmentsClientWithBaseURI creates an instance of the AppServiceEnvironmentsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewAppServiceEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) AppServiceEnvironmentsClient { return AppServiceEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/appserviceplans.go b/services/web/mgmt/2016-09-01/web/appserviceplans.go index 32b721d157a2..156000abd3f8 100644 --- a/services/web/mgmt/2016-09-01/web/appserviceplans.go +++ b/services/web/mgmt/2016-09-01/web/appserviceplans.go @@ -36,7 +36,8 @@ func NewAppServicePlansClient(subscriptionID string) AppServicePlansClient { return NewAppServicePlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServicePlansClientWithBaseURI creates an instance of the AppServicePlansClient client. +// NewAppServicePlansClientWithBaseURI creates an instance of the AppServicePlansClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppServicePlansClientWithBaseURI(baseURI string, subscriptionID string) AppServicePlansClient { return AppServicePlansClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/billingmeters.go b/services/web/mgmt/2016-09-01/web/billingmeters.go index 952120e9870b..468243a159fa 100644 --- a/services/web/mgmt/2016-09-01/web/billingmeters.go +++ b/services/web/mgmt/2016-09-01/web/billingmeters.go @@ -35,7 +35,8 @@ func NewBillingMetersClient(subscriptionID string) BillingMetersClient { return NewBillingMetersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBillingMetersClientWithBaseURI creates an instance of the BillingMetersClient client. +// NewBillingMetersClientWithBaseURI creates an instance of the BillingMetersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBillingMetersClientWithBaseURI(baseURI string, subscriptionID string) BillingMetersClient { return BillingMetersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/certificateregistrationprovider.go b/services/web/mgmt/2016-09-01/web/certificateregistrationprovider.go index e71db53bd8ac..4c790da22e57 100644 --- a/services/web/mgmt/2016-09-01/web/certificateregistrationprovider.go +++ b/services/web/mgmt/2016-09-01/web/certificateregistrationprovider.go @@ -36,7 +36,8 @@ func NewCertificateRegistrationProviderClient(subscriptionID string) Certificate } // NewCertificateRegistrationProviderClientWithBaseURI creates an instance of the CertificateRegistrationProviderClient -// 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 NewCertificateRegistrationProviderClientWithBaseURI(baseURI string, subscriptionID string) CertificateRegistrationProviderClient { return CertificateRegistrationProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/certificates.go b/services/web/mgmt/2016-09-01/web/certificates.go index ee9219419e5e..b43bc6db3335 100644 --- a/services/web/mgmt/2016-09-01/web/certificates.go +++ b/services/web/mgmt/2016-09-01/web/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/client.go b/services/web/mgmt/2016-09-01/web/client.go index aa338157d6a6..10a3763eed17 100644 --- a/services/web/mgmt/2016-09-01/web/client.go +++ b/services/web/mgmt/2016-09-01/web/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/web/mgmt/2016-09-01/web/deletedwebapps.go b/services/web/mgmt/2016-09-01/web/deletedwebapps.go index 35b4bcd9084e..952f4507bfdc 100644 --- a/services/web/mgmt/2016-09-01/web/deletedwebapps.go +++ b/services/web/mgmt/2016-09-01/web/deletedwebapps.go @@ -35,7 +35,8 @@ func NewDeletedWebAppsClient(subscriptionID string) DeletedWebAppsClient { return NewDeletedWebAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeletedWebAppsClientWithBaseURI creates an instance of the DeletedWebAppsClient client. +// NewDeletedWebAppsClientWithBaseURI creates an instance of the DeletedWebAppsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeletedWebAppsClientWithBaseURI(baseURI string, subscriptionID string) DeletedWebAppsClient { return DeletedWebAppsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/diagnostics.go b/services/web/mgmt/2016-09-01/web/diagnostics.go index 7ed6bf327b17..cb385d081893 100644 --- a/services/web/mgmt/2016-09-01/web/diagnostics.go +++ b/services/web/mgmt/2016-09-01/web/diagnostics.go @@ -37,7 +37,8 @@ func NewDiagnosticsClient(subscriptionID string) DiagnosticsClient { return NewDiagnosticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticsClientWithBaseURI creates an instance of the DiagnosticsClient client. +// NewDiagnosticsClientWithBaseURI creates an instance of the DiagnosticsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDiagnosticsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticsClient { return DiagnosticsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/domainregistrationprovider.go b/services/web/mgmt/2016-09-01/web/domainregistrationprovider.go index 696bd479f43d..ec3b0307f30a 100644 --- a/services/web/mgmt/2016-09-01/web/domainregistrationprovider.go +++ b/services/web/mgmt/2016-09-01/web/domainregistrationprovider.go @@ -35,7 +35,9 @@ func NewDomainRegistrationProviderClient(subscriptionID string) DomainRegistrati return NewDomainRegistrationProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainRegistrationProviderClientWithBaseURI creates an instance of the DomainRegistrationProviderClient client. +// NewDomainRegistrationProviderClientWithBaseURI creates an instance of the DomainRegistrationProviderClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDomainRegistrationProviderClientWithBaseURI(baseURI string, subscriptionID string) DomainRegistrationProviderClient { return DomainRegistrationProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/domains.go b/services/web/mgmt/2016-09-01/web/domains.go index 42f5a6bee17b..ed27d1e86f8c 100644 --- a/services/web/mgmt/2016-09-01/web/domains.go +++ b/services/web/mgmt/2016-09-01/web/domains.go @@ -36,7 +36,8 @@ func NewDomainsClient(subscriptionID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, subscriptionID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/provider.go b/services/web/mgmt/2016-09-01/web/provider.go index bce8ab9bcd22..f0943b4a47ff 100644 --- a/services/web/mgmt/2016-09-01/web/provider.go +++ b/services/web/mgmt/2016-09-01/web/provider.go @@ -35,7 +35,8 @@ func NewProviderClient(subscriptionID string) ProviderClient { return NewProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderClientWithBaseURI creates an instance of the ProviderClient client. +// NewProviderClientWithBaseURI creates an instance of the ProviderClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProviderClientWithBaseURI(baseURI string, subscriptionID string) ProviderClient { return ProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/recommendations.go b/services/web/mgmt/2016-09-01/web/recommendations.go index 3428300db49d..bbdec48ec770 100644 --- a/services/web/mgmt/2016-09-01/web/recommendations.go +++ b/services/web/mgmt/2016-09-01/web/recommendations.go @@ -36,7 +36,8 @@ func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/resourcehealthmetadata.go b/services/web/mgmt/2016-09-01/web/resourcehealthmetadata.go index e0e0c9d29144..2dffd1492aaf 100644 --- a/services/web/mgmt/2016-09-01/web/resourcehealthmetadata.go +++ b/services/web/mgmt/2016-09-01/web/resourcehealthmetadata.go @@ -36,7 +36,9 @@ func NewResourceHealthMetadataClient(subscriptionID string) ResourceHealthMetada return NewResourceHealthMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceHealthMetadataClientWithBaseURI creates an instance of the ResourceHealthMetadataClient client. +// NewResourceHealthMetadataClientWithBaseURI creates an instance of the ResourceHealthMetadataClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceHealthMetadataClientWithBaseURI(baseURI string, subscriptionID string) ResourceHealthMetadataClient { return ResourceHealthMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/topleveldomains.go b/services/web/mgmt/2016-09-01/web/topleveldomains.go index 5ecbe63ff8e1..7b3f3588cdcf 100644 --- a/services/web/mgmt/2016-09-01/web/topleveldomains.go +++ b/services/web/mgmt/2016-09-01/web/topleveldomains.go @@ -35,7 +35,8 @@ func NewTopLevelDomainsClient(subscriptionID string) TopLevelDomainsClient { return NewTopLevelDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client. +// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopLevelDomainsClientWithBaseURI(baseURI string, subscriptionID string) TopLevelDomainsClient { return TopLevelDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2016-09-01/web/webapi/interfaces.go b/services/web/mgmt/2016-09-01/web/webapi/interfaces.go index 92a716006d4b..674e677f8e8f 100644 --- a/services/web/mgmt/2016-09-01/web/webapi/interfaces.go +++ b/services/web/mgmt/2016-09-01/web/webapi/interfaces.go @@ -31,10 +31,14 @@ type BaseClientAPI interface { GetSourceControl(ctx context.Context, sourceControlType string) (result web.SourceControl, err error) GetSubscriptionDeploymentLocations(ctx context.Context) (result web.DeploymentLocations, err error) ListGeoRegions(ctx context.Context, sku web.SkuName, linuxWorkersEnabled *bool) (result web.GeoRegionCollectionPage, err error) + ListGeoRegionsComplete(ctx context.Context, sku web.SkuName, linuxWorkersEnabled *bool) (result web.GeoRegionCollectionIterator, err error) ListPremierAddOnOffers(ctx context.Context) (result web.PremierAddOnOfferCollectionPage, err error) + ListPremierAddOnOffersComplete(ctx context.Context) (result web.PremierAddOnOfferCollectionIterator, err error) ListSiteIdentifiersAssignedToHostName(ctx context.Context, nameIdentifier web.NameIdentifier) (result web.IdentifierCollectionPage, err error) + ListSiteIdentifiersAssignedToHostNameComplete(ctx context.Context, nameIdentifier web.NameIdentifier) (result web.IdentifierCollectionIterator, err error) ListSkus(ctx context.Context) (result web.SkuInfos, err error) ListSourceControls(ctx context.Context) (result web.SourceControlCollectionPage, err error) + ListSourceControlsComplete(ctx context.Context) (result web.SourceControlCollectionIterator, err error) Move(ctx context.Context, resourceGroupName string, moveResourceEnvelope web.CsmMoveResourceEnvelope) (result autorest.Response, err error) UpdatePublishingUser(ctx context.Context, userDetails web.User) (result web.User, err error) UpdateSourceControl(ctx context.Context, sourceControlType string, requestMessage web.SourceControl) (result web.SourceControl, err error) @@ -54,8 +58,11 @@ type AppServiceCertificateOrdersClientAPI interface { Get(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateOrder, err error) GetCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string) (result web.AppServiceCertificateResource, err error) List(ctx context.Context) (result web.AppServiceCertificateOrderCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppServiceCertificateOrderCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServiceCertificateOrderCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServiceCertificateOrderCollectionIterator, err error) ListCertificates(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateCollectionPage, err error) + ListCertificatesComplete(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateCollectionIterator, err error) Reissue(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest web.ReissueCertificateOrderRequest) (result autorest.Response, err error) Renew(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest web.RenewCertificateOrderRequest) (result autorest.Response, err error) ResendEmail(ctx context.Context, resourceGroupName string, certificateOrderName string) (result autorest.Response, err error) @@ -74,6 +81,7 @@ var _ AppServiceCertificateOrdersClientAPI = (*web.AppServiceCertificateOrdersCl // CertificateRegistrationProviderClientAPI contains the set of methods on the CertificateRegistrationProviderClient type. type CertificateRegistrationProviderClientAPI interface { ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ CertificateRegistrationProviderClientAPI = (*web.CertificateRegistrationProviderClient)(nil) @@ -89,9 +97,13 @@ type DomainsClientAPI interface { GetControlCenterSsoRequest(ctx context.Context) (result web.DomainControlCenterSsoRequest, err error) GetOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string) (result web.DomainOwnershipIdentifier, err error) List(ctx context.Context) (result web.DomainCollectionPage, err error) + ListComplete(ctx context.Context) (result web.DomainCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.DomainCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.DomainCollectionIterator, err error) ListOwnershipIdentifiers(ctx context.Context, resourceGroupName string, domainName string) (result web.DomainOwnershipIdentifierCollectionPage, err error) + ListOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, domainName string) (result web.DomainOwnershipIdentifierCollectionIterator, err error) ListRecommendations(ctx context.Context, parameters web.DomainRecommendationSearchParameters) (result web.NameIdentifierCollectionPage, err error) + ListRecommendationsComplete(ctx context.Context, parameters web.DomainRecommendationSearchParameters) (result web.NameIdentifierCollectionIterator, err error) Renew(ctx context.Context, resourceGroupName string, domainName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, domainName string, domain web.DomainPatchResource) (result web.Domain, err error) UpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier web.DomainOwnershipIdentifier) (result web.DomainOwnershipIdentifier, err error) @@ -103,7 +115,9 @@ var _ DomainsClientAPI = (*web.DomainsClient)(nil) type TopLevelDomainsClientAPI interface { Get(ctx context.Context, name string) (result web.TopLevelDomain, err error) List(ctx context.Context) (result web.TopLevelDomainCollectionPage, err error) + ListComplete(ctx context.Context) (result web.TopLevelDomainCollectionIterator, err error) ListAgreements(ctx context.Context, name string, agreementOption web.TopLevelDomainAgreementOption) (result web.TldLegalAgreementCollectionPage, err error) + ListAgreementsComplete(ctx context.Context, name string, agreementOption web.TopLevelDomainAgreementOption) (result web.TldLegalAgreementCollectionIterator, err error) } var _ TopLevelDomainsClientAPI = (*web.TopLevelDomainsClient)(nil) @@ -111,6 +125,7 @@ var _ TopLevelDomainsClientAPI = (*web.TopLevelDomainsClient)(nil) // DomainRegistrationProviderClientAPI contains the set of methods on the DomainRegistrationProviderClient type. type DomainRegistrationProviderClientAPI interface { ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ DomainRegistrationProviderClientAPI = (*web.DomainRegistrationProviderClient)(nil) @@ -121,7 +136,9 @@ type CertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, name string) (result web.Certificate, err error) List(ctx context.Context) (result web.CertificateCollectionPage, err error) + ListComplete(ctx context.Context) (result web.CertificateCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.CertificateCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.CertificateCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, name string, certificateEnvelope web.CertificatePatchResource) (result web.Certificate, err error) } @@ -130,6 +147,7 @@ var _ CertificatesClientAPI = (*web.CertificatesClient)(nil) // DeletedWebAppsClientAPI contains the set of methods on the DeletedWebAppsClient type. type DeletedWebAppsClientAPI interface { List(ctx context.Context) (result web.DeletedWebAppCollectionPage, err error) + ListComplete(ctx context.Context) (result web.DeletedWebAppCollectionIterator, err error) } var _ DeletedWebAppsClientAPI = (*web.DeletedWebAppsClient)(nil) @@ -144,20 +162,31 @@ type DiagnosticsClientAPI interface { GetSiteAnalysis(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string) (result web.DiagnosticAnalysis, err error) GetSiteAnalysisSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string) (result web.DiagnosticAnalysis, err error) GetSiteDetector(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string) (result web.DiagnosticDetectorCollectionPage, err error) + GetSiteDetectorComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string) (result web.DiagnosticDetectorCollectionIterator, err error) GetSiteDetectorResponse(ctx context.Context, resourceGroupName string, siteName string, detectorName string, startTime *date.Time, endTime *date.Time, timeGrain string) (result web.DetectorResponse, err error) GetSiteDetectorResponseSlot(ctx context.Context, resourceGroupName string, siteName string, detectorName string, slot string, startTime *date.Time, endTime *date.Time, timeGrain string) (result web.DetectorResponse, err error) GetSiteDetectorSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string) (result web.DiagnosticDetectorCollectionPage, err error) + GetSiteDetectorSlotComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string) (result web.DiagnosticDetectorCollectionIterator, err error) GetSiteDiagnosticCategory(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticCategory, err error) GetSiteDiagnosticCategorySlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticCategory, err error) ListHostingEnvironmentDetectorResponses(ctx context.Context, resourceGroupName string, name string) (result web.DetectorResponseCollectionPage, err error) + ListHostingEnvironmentDetectorResponsesComplete(ctx context.Context, resourceGroupName string, name string) (result web.DetectorResponseCollectionIterator, err error) ListSiteAnalyses(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticAnalysisCollectionPage, err error) + ListSiteAnalysesComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticAnalysisCollectionIterator, err error) ListSiteAnalysesSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticAnalysisCollectionPage, err error) + ListSiteAnalysesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticAnalysisCollectionIterator, err error) ListSiteDetectorResponses(ctx context.Context, resourceGroupName string, siteName string) (result web.DetectorResponseCollectionPage, err error) + ListSiteDetectorResponsesComplete(ctx context.Context, resourceGroupName string, siteName string) (result web.DetectorResponseCollectionIterator, err error) ListSiteDetectorResponsesSlot(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DetectorResponseCollectionPage, err error) + ListSiteDetectorResponsesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DetectorResponseCollectionIterator, err error) ListSiteDetectors(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticDetectorCollectionPage, err error) + ListSiteDetectorsComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticDetectorCollectionIterator, err error) ListSiteDetectorsSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticDetectorCollectionPage, err error) + ListSiteDetectorsSlotComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticDetectorCollectionIterator, err error) ListSiteDiagnosticCategories(ctx context.Context, resourceGroupName string, siteName string) (result web.DiagnosticCategoryCollectionPage, err error) + ListSiteDiagnosticCategoriesComplete(ctx context.Context, resourceGroupName string, siteName string) (result web.DiagnosticCategoryCollectionIterator, err error) ListSiteDiagnosticCategoriesSlot(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DiagnosticCategoryCollectionPage, err error) + ListSiteDiagnosticCategoriesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DiagnosticCategoryCollectionIterator, err error) } var _ DiagnosticsClientAPI = (*web.DiagnosticsClient)(nil) @@ -165,8 +194,11 @@ var _ DiagnosticsClientAPI = (*web.DiagnosticsClient)(nil) // ProviderClientAPI contains the set of methods on the ProviderClient type. type ProviderClientAPI interface { GetAvailableStacks(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionPage, err error) + GetAvailableStacksComplete(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionIterator, err error) GetAvailableStacksOnPrem(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionPage, err error) + GetAvailableStacksOnPremComplete(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionIterator, err error) ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ ProviderClientAPI = (*web.ProviderClient)(nil) @@ -178,8 +210,11 @@ type RecommendationsClientAPI interface { DisableRecommendationForSubscription(ctx context.Context, name string) (result autorest.Response, err error) GetRuleDetailsByWebApp(ctx context.Context, resourceGroupName string, siteName string, name string, updateSeen *bool, recommendationID string) (result web.RecommendationRule, err error) List(ctx context.Context, featured *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListComplete(ctx context.Context, featured *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListHistoryForWebApp(ctx context.Context, resourceGroupName string, siteName string, filter string) (result web.RecommendationCollectionPage, err error) + ListHistoryForWebAppComplete(ctx context.Context, resourceGroupName string, siteName string, filter string) (result web.RecommendationCollectionIterator, err error) ListRecommendedRulesForWebApp(ctx context.Context, resourceGroupName string, siteName string, featured *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListRecommendedRulesForWebAppComplete(ctx context.Context, resourceGroupName string, siteName string, featured *bool, filter string) (result web.RecommendationCollectionIterator, err error) ResetAllFilters(ctx context.Context) (result autorest.Response, err error) ResetAllFiltersForWebApp(ctx context.Context, resourceGroupName string, siteName string) (result autorest.Response, err error) } @@ -191,9 +226,13 @@ type ResourceHealthMetadataClientAPI interface { GetBySite(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadata, err error) GetBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadata, err error) List(ctx context.Context) (result web.ResourceHealthMetadataCollectionPage, err error) + ListComplete(ctx context.Context) (result web.ResourceHealthMetadataCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.ResourceHealthMetadataCollectionIterator, err error) ListBySite(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListBySiteComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadataCollectionIterator, err error) ListBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListBySiteSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadataCollectionIterator, err error) } var _ ResourceHealthMetadataClientAPI = (*web.ResourceHealthMetadataClient)(nil) @@ -201,6 +240,7 @@ var _ ResourceHealthMetadataClientAPI = (*web.ResourceHealthMetadataClient)(nil) // BillingMetersClientAPI contains the set of methods on the BillingMetersClient type. type BillingMetersClientAPI interface { List(ctx context.Context, billingLocation string) (result web.BillingMeterCollectionPage, err error) + ListComplete(ctx context.Context, billingLocation string) (result web.BillingMeterCollectionIterator, err error) } var _ BillingMetersClientAPI = (*web.BillingMetersClient)(nil) @@ -368,65 +408,105 @@ type AppsClientAPI interface { IsCloneable(ctx context.Context, resourceGroupName string, name string) (result web.SiteCloneability, err error) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteCloneability, err error) List(ctx context.Context) (result web.AppCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppCollectionIterator, err error) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result web.StringDictionary, err error) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.StringDictionary, err error) ListBackups(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionPage, err error) + ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionIterator, err error) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionPage, err error) + ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionIterator, err error) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request web.BackupRequest) (result web.BackupItem, err error) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request web.BackupRequest, slot string) (result web.BackupItem, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result web.AppCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result web.AppCollectionIterator, err error) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigResourceCollectionPage, err error) + ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigResourceCollectionIterator, err error) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigurationSnapshotInfoCollectionPage, err error) + ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigurationSnapshotInfoCollectionIterator, err error) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigurationSnapshotInfoCollectionPage, err error) + ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigurationSnapshotInfoCollectionIterator, err error) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigResourceCollectionPage, err error) + ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigResourceCollectionIterator, err error) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result web.ConnectionStringDictionary, err error) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ConnectionStringDictionary, err error) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.ContinuousWebJobCollectionPage, err error) + ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ContinuousWebJobCollectionIterator, err error) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ContinuousWebJobCollectionPage, err error) + ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ContinuousWebJobCollectionIterator, err error) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result web.Deployment, err error) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result web.Deployment, err error) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result web.DeploymentCollectionPage, err error) + ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result web.DeploymentCollectionIterator, err error) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionPage, err error) + ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionIterator, err error) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result web.IdentifierCollectionPage, err error) + ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result web.IdentifierCollectionIterator, err error) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.IdentifierCollectionPage, err error) + ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.IdentifierCollectionIterator, err error) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result web.FunctionEnvelopeCollectionPage, err error) + ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.FunctionEnvelopeCollectionIterator, err error) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result web.FunctionSecrets, err error) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result web.FunctionSecrets, err error) ListHostNameBindings(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionPage, err error) + ListHostNameBindingsComplete(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionIterator, err error) ListHostNameBindingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionPage, err error) + ListHostNameBindingsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionIterator, err error) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.HybridConnectionKey, err error) ListHybridConnectionKeysSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result web.HybridConnectionKey, err error) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnection, err error) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HybridConnection, err error) ListInstanceFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionEnvelopeCollectionPage, err error) + ListInstanceFunctionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionEnvelopeCollectionIterator, err error) ListInstanceIdentifiers(ctx context.Context, resourceGroupName string, name string) (result web.AppInstanceCollectionPage, err error) + ListInstanceIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppInstanceCollectionIterator, err error) ListInstanceIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppInstanceCollectionPage, err error) + ListInstanceIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppInstanceCollectionIterator, err error) ListInstanceProcesses(ctx context.Context, resourceGroupName string, name string, instanceID string) (result web.ProcessInfoCollectionPage, err error) + ListInstanceProcessesComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result web.ProcessInfoCollectionIterator, err error) ListInstanceProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result web.ProcessInfoCollectionPage, err error) + ListInstanceProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result web.ProcessInfoCollectionIterator, err error) ListInstanceProcessModules(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListInstanceProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListInstanceProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListInstanceProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListInstanceProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListInstanceProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListInstanceProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListInstanceProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListMetadata(ctx context.Context, resourceGroupName string, name string) (result web.StringDictionary, err error) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.StringDictionary, err error) ListMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMetricDefinitionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMetricDefinitionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListMetricsSlot(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMetricsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string) (result web.NetworkFeatures, err error) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string) (result web.NetworkFeatures, err error) ListPerfMonCounters(ctx context.Context, resourceGroupName string, name string, filter string) (result web.PerfMonCounterCollectionPage, err error) + ListPerfMonCountersComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.PerfMonCounterCollectionIterator, err error) ListPerfMonCountersSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.PerfMonCounterCollectionPage, err error) + ListPerfMonCountersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.PerfMonCounterCollectionIterator, err error) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string) (result web.PremierAddOn, err error) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PremierAddOn, err error) ListProcesses(ctx context.Context, resourceGroupName string, name string) (result web.ProcessInfoCollectionPage, err error) + ListProcessesComplete(ctx context.Context, resourceGroupName string, name string) (result web.ProcessInfoCollectionIterator, err error) ListProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ProcessInfoCollectionPage, err error) + ListProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ProcessInfoCollectionIterator, err error) ListProcessModules(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessModuleInfoCollectionPage, err error) + ListProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessModuleInfoCollectionIterator, err error) ListProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessThreadInfoCollectionPage, err error) + ListProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessThreadInfoCollectionIterator, err error) ListPublicCertificates(ctx context.Context, resourceGroupName string, name string) (result web.PublicCertificateCollectionPage, err error) + ListPublicCertificatesComplete(ctx context.Context, resourceGroupName string, name string) (result web.PublicCertificateCollectionIterator, err error) ListPublicCertificatesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PublicCertificateCollectionPage, err error) + ListPublicCertificatesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PublicCertificateCollectionIterator, err error) ListPublishingCredentials(ctx context.Context, resourceGroupName string, name string) (result web.AppsListPublishingCredentialsFuture, err error) ListPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppsListPublishingCredentialsSlotFuture, err error) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions web.CsmPublishingProfileOptions) (result web.ReadCloser, err error) @@ -434,27 +514,42 @@ type AppsClientAPI interface { ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string) (result web.RelayServiceConnectionEntity, err error) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.RelayServiceConnectionEntity, err error) ListSiteExtensions(ctx context.Context, resourceGroupName string, name string) (result web.SiteExtensionInfoCollectionPage, err error) + ListSiteExtensionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteExtensionInfoCollectionIterator, err error) ListSiteExtensionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteExtensionInfoCollectionPage, err error) + ListSiteExtensionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteExtensionInfoCollectionIterator, err error) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string) (result web.PushSettings, err error) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PushSettings, err error) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string) (result web.SlotConfigNamesResource, err error) ListSlotDifferencesFromProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.SlotDifferenceCollectionPage, err error) + ListSlotDifferencesFromProductionComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.SlotDifferenceCollectionIterator, err error) ListSlotDifferencesSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.SlotDifferenceCollectionPage, err error) + ListSlotDifferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.SlotDifferenceCollectionIterator, err error) ListSlots(ctx context.Context, resourceGroupName string, name string) (result web.AppCollectionPage, err error) + ListSlotsComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppCollectionIterator, err error) ListSnapshots(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionIterator, err error) ListSnapshotsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionIterator, err error) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result web.FunctionSecrets, err error) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionSecrets, err error) ListTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string) (result web.TriggeredJobHistoryCollectionPage, err error) + ListTriggeredWebJobHistoryComplete(ctx context.Context, resourceGroupName string, name string, webJobName string) (result web.TriggeredJobHistoryCollectionIterator, err error) ListTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result web.TriggeredJobHistoryCollectionPage, err error) + ListTriggeredWebJobHistorySlotComplete(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result web.TriggeredJobHistoryCollectionIterator, err error) ListTriggeredWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.TriggeredWebJobCollectionPage, err error) + ListTriggeredWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.TriggeredWebJobCollectionIterator, err error) ListTriggeredWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.TriggeredWebJobCollectionPage, err error) + ListTriggeredWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.TriggeredWebJobCollectionIterator, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListUsagesSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListVnetConnections(ctx context.Context, resourceGroupName string, name string) (result web.ListVnetInfo, err error) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ListVnetInfo, err error) ListWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.JobCollectionPage, err error) + ListWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.JobCollectionIterator, err error) ListWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.JobCollectionPage, err error) + ListWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.JobCollectionIterator, err error) MigrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope web.MigrateMySQLRequest) (result web.AppsMigrateMySQLFuture, err error) MigrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions web.StorageMigrationOptions) (result web.AppsMigrateStorageFuture, err error) Recover(ctx context.Context, resourceGroupName string, name string, recoveryEntity web.SnapshotRecoveryRequest) (result web.AppsRecoverFuture, err error) @@ -533,33 +628,56 @@ type AppServiceEnvironmentsClientAPI interface { GetMultiRolePool(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolResource, err error) GetWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.WorkerPoolResource, err error) List(ctx context.Context) (result web.AppServiceEnvironmentCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppServiceEnvironmentCollectionIterator, err error) ListAppServicePlans(ctx context.Context, resourceGroupName string, name string) (result web.AppServicePlanCollectionPage, err error) + ListAppServicePlansComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServicePlanCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServiceEnvironmentCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServiceEnvironmentCollectionIterator, err error) ListCapacities(ctx context.Context, resourceGroupName string, name string) (result web.StampCapacityCollectionPage, err error) + ListCapacitiesComplete(ctx context.Context, resourceGroupName string, name string) (result web.StampCapacityCollectionIterator, err error) ListDiagnostics(ctx context.Context, resourceGroupName string, name string) (result web.ListHostingEnvironmentDiagnostics, err error) ListMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinition, err error) ListMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListMultiRoleMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMultiRoleMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMultiRoleMetrics(ctx context.Context, resourceGroupName string, name string, startTime string, endTime string, timeGrain string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMultiRoleMetricsComplete(ctx context.Context, resourceGroupName string, name string, startTime string, endTime string, timeGrain string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListMultiRolePoolInstanceMetricDefinitions(ctx context.Context, resourceGroupName string, name string, instance string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMultiRolePoolInstanceMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, instance string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMultiRolePoolInstanceMetrics(ctx context.Context, resourceGroupName string, name string, instance string, details *bool) (result web.ResourceMetricCollectionPage, err error) + ListMultiRolePoolInstanceMetricsComplete(ctx context.Context, resourceGroupName string, name string, instance string, details *bool) (result web.ResourceMetricCollectionIterator, err error) ListMultiRolePools(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionPage, err error) + ListMultiRolePoolsComplete(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionIterator, err error) ListMultiRolePoolSkus(ctx context.Context, resourceGroupName string, name string) (result web.SkuInfoCollectionPage, err error) + ListMultiRolePoolSkusComplete(ctx context.Context, resourceGroupName string, name string) (result web.SkuInfoCollectionIterator, err error) ListMultiRoleUsages(ctx context.Context, resourceGroupName string, name string) (result web.UsageCollectionPage, err error) + ListMultiRoleUsagesComplete(ctx context.Context, resourceGroupName string, name string) (result web.UsageCollectionIterator, err error) ListOperations(ctx context.Context, resourceGroupName string, name string) (result web.ListOperation, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListVips(ctx context.Context, resourceGroupName string, name string) (result web.AddressResponse, err error) ListWebApps(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.AppCollectionPage, err error) + ListWebAppsComplete(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.AppCollectionIterator, err error) ListWebWorkerMetricDefinitions(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListWebWorkerMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListWebWorkerMetrics(ctx context.Context, resourceGroupName string, name string, workerPoolName string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListWebWorkerMetricsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListWebWorkerUsages(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.UsageCollectionPage, err error) + ListWebWorkerUsagesComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.UsageCollectionIterator, err error) ListWorkerPoolInstanceMetricDefinitions(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListWorkerPoolInstanceMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListWorkerPoolInstanceMetrics(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListWorkerPoolInstanceMetricsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListWorkerPools(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionPage, err error) + ListWorkerPoolsComplete(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionIterator, err error) ListWorkerPoolSkus(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.SkuInfoCollectionPage, err error) + ListWorkerPoolSkusComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.SkuInfoCollectionIterator, err error) Reboot(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) Resume(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsResumeFuture, err error) + ResumeComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsResumeAllFuture, err error) Suspend(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsSuspendFuture, err error) + SuspendComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsSuspendAllFuture, err error) Update(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope web.AppServiceEnvironmentPatchResource) (result web.AppServiceEnvironmentResource, err error) UpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope web.WorkerPoolResource) (result web.WorkerPoolResource, err error) UpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope web.WorkerPoolResource) (result web.WorkerPoolResource, err error) @@ -582,17 +700,25 @@ type AppServicePlansClientAPI interface { GetVnetFromServerFarm(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.VnetInfo, err error) GetVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result web.VnetGateway, err error) List(ctx context.Context, detailed *bool) (result web.AppServicePlanCollectionPage, err error) + ListComplete(ctx context.Context, detailed *bool) (result web.AppServicePlanCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServicePlanCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServicePlanCollectionIterator, err error) ListCapabilities(ctx context.Context, resourceGroupName string, name string) (result web.ListCapability, err error) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.HybridConnectionKey, err error) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnectionCollectionPage, err error) + ListHybridConnectionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnectionCollectionIterator, err error) ListMetricDefintions(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMetricDefintionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListRoutesForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.ListVnetRoute, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListVnets(ctx context.Context, resourceGroupName string, name string) (result web.ListVnetInfo, err error) ListWebApps(ctx context.Context, resourceGroupName string, name string, skipToken string, filter string, top string) (result web.AppCollectionPage, err error) + ListWebAppsComplete(ctx context.Context, resourceGroupName string, name string, skipToken string, filter string, top string) (result web.AppCollectionIterator, err error) ListWebAppsByHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.ResourceCollectionPage, err error) + ListWebAppsByHybridConnectionComplete(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.ResourceCollectionIterator, err error) RebootWorker(ctx context.Context, resourceGroupName string, name string, workerName string) (result autorest.Response, err error) RestartWebApps(ctx context.Context, resourceGroupName string, name string, softRestart *bool) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, name string, appServicePlan web.AppServicePlanPatchResource) (result web.AppServicePlan, err error) diff --git a/services/web/mgmt/2018-02-01/web/apps.go b/services/web/mgmt/2018-02-01/web/apps.go index 1baca4d70735..207c3bf0431c 100644 --- a/services/web/mgmt/2018-02-01/web/apps.go +++ b/services/web/mgmt/2018-02-01/web/apps.go @@ -36,7 +36,8 @@ func NewAppsClient(subscriptionID string) AppsClient { return NewAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppsClientWithBaseURI creates an instance of the AppsClient client. +// NewAppsClientWithBaseURI creates an instance of the AppsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient { return AppsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go b/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go index 8af6a8d62e88..e9083f7216b4 100644 --- a/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go +++ b/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go @@ -36,7 +36,9 @@ func NewAppServiceCertificateOrdersClient(subscriptionID string) AppServiceCerti return NewAppServiceCertificateOrdersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServiceCertificateOrdersClientWithBaseURI creates an instance of the AppServiceCertificateOrdersClient client. +// NewAppServiceCertificateOrdersClientWithBaseURI creates an instance of the AppServiceCertificateOrdersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAppServiceCertificateOrdersClientWithBaseURI(baseURI string, subscriptionID string) AppServiceCertificateOrdersClient { return AppServiceCertificateOrdersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/appserviceenvironments.go b/services/web/mgmt/2018-02-01/web/appserviceenvironments.go index e8f8bafdb05c..9da648d544e6 100644 --- a/services/web/mgmt/2018-02-01/web/appserviceenvironments.go +++ b/services/web/mgmt/2018-02-01/web/appserviceenvironments.go @@ -36,7 +36,9 @@ func NewAppServiceEnvironmentsClient(subscriptionID string) AppServiceEnvironmen return NewAppServiceEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServiceEnvironmentsClientWithBaseURI creates an instance of the AppServiceEnvironmentsClient client. +// NewAppServiceEnvironmentsClientWithBaseURI creates an instance of the AppServiceEnvironmentsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewAppServiceEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) AppServiceEnvironmentsClient { return AppServiceEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/appserviceplans.go b/services/web/mgmt/2018-02-01/web/appserviceplans.go index 3324503f3dab..34cde6772b53 100644 --- a/services/web/mgmt/2018-02-01/web/appserviceplans.go +++ b/services/web/mgmt/2018-02-01/web/appserviceplans.go @@ -36,7 +36,8 @@ func NewAppServicePlansClient(subscriptionID string) AppServicePlansClient { return NewAppServicePlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServicePlansClientWithBaseURI creates an instance of the AppServicePlansClient client. +// NewAppServicePlansClientWithBaseURI creates an instance of the AppServicePlansClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppServicePlansClientWithBaseURI(baseURI string, subscriptionID string) AppServicePlansClient { return AppServicePlansClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/certificateregistrationprovider.go b/services/web/mgmt/2018-02-01/web/certificateregistrationprovider.go index 20728a9f2286..c942d37afd37 100644 --- a/services/web/mgmt/2018-02-01/web/certificateregistrationprovider.go +++ b/services/web/mgmt/2018-02-01/web/certificateregistrationprovider.go @@ -36,7 +36,8 @@ func NewCertificateRegistrationProviderClient(subscriptionID string) Certificate } // NewCertificateRegistrationProviderClientWithBaseURI creates an instance of the CertificateRegistrationProviderClient -// 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 NewCertificateRegistrationProviderClientWithBaseURI(baseURI string, subscriptionID string) CertificateRegistrationProviderClient { return CertificateRegistrationProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/certificates.go b/services/web/mgmt/2018-02-01/web/certificates.go index b1640960c58c..62de100e7dae 100644 --- a/services/web/mgmt/2018-02-01/web/certificates.go +++ b/services/web/mgmt/2018-02-01/web/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/client.go b/services/web/mgmt/2018-02-01/web/client.go index 01215bd8bb60..c888d08ba243 100644 --- a/services/web/mgmt/2018-02-01/web/client.go +++ b/services/web/mgmt/2018-02-01/web/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/web/mgmt/2018-02-01/web/deletedwebapps.go b/services/web/mgmt/2018-02-01/web/deletedwebapps.go index 46a014df4b9e..14859d3c671d 100644 --- a/services/web/mgmt/2018-02-01/web/deletedwebapps.go +++ b/services/web/mgmt/2018-02-01/web/deletedwebapps.go @@ -35,7 +35,8 @@ func NewDeletedWebAppsClient(subscriptionID string) DeletedWebAppsClient { return NewDeletedWebAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeletedWebAppsClientWithBaseURI creates an instance of the DeletedWebAppsClient client. +// NewDeletedWebAppsClientWithBaseURI creates an instance of the DeletedWebAppsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeletedWebAppsClientWithBaseURI(baseURI string, subscriptionID string) DeletedWebAppsClient { return DeletedWebAppsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/diagnostics.go b/services/web/mgmt/2018-02-01/web/diagnostics.go index b6c4d90884b1..49d00d3a2716 100644 --- a/services/web/mgmt/2018-02-01/web/diagnostics.go +++ b/services/web/mgmt/2018-02-01/web/diagnostics.go @@ -37,7 +37,8 @@ func NewDiagnosticsClient(subscriptionID string) DiagnosticsClient { return NewDiagnosticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticsClientWithBaseURI creates an instance of the DiagnosticsClient client. +// NewDiagnosticsClientWithBaseURI creates an instance of the DiagnosticsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDiagnosticsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticsClient { return DiagnosticsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/domainregistrationprovider.go b/services/web/mgmt/2018-02-01/web/domainregistrationprovider.go index b289d1585171..22840fb37263 100644 --- a/services/web/mgmt/2018-02-01/web/domainregistrationprovider.go +++ b/services/web/mgmt/2018-02-01/web/domainregistrationprovider.go @@ -35,7 +35,9 @@ func NewDomainRegistrationProviderClient(subscriptionID string) DomainRegistrati return NewDomainRegistrationProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainRegistrationProviderClientWithBaseURI creates an instance of the DomainRegistrationProviderClient client. +// NewDomainRegistrationProviderClientWithBaseURI creates an instance of the DomainRegistrationProviderClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDomainRegistrationProviderClientWithBaseURI(baseURI string, subscriptionID string) DomainRegistrationProviderClient { return DomainRegistrationProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/domains.go b/services/web/mgmt/2018-02-01/web/domains.go index 1f6c3b749419..decd7ffd76b3 100644 --- a/services/web/mgmt/2018-02-01/web/domains.go +++ b/services/web/mgmt/2018-02-01/web/domains.go @@ -36,7 +36,8 @@ func NewDomainsClient(subscriptionID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, subscriptionID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/provider.go b/services/web/mgmt/2018-02-01/web/provider.go index c24ca0866e5c..7d0100054839 100644 --- a/services/web/mgmt/2018-02-01/web/provider.go +++ b/services/web/mgmt/2018-02-01/web/provider.go @@ -35,7 +35,8 @@ func NewProviderClient(subscriptionID string) ProviderClient { return NewProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderClientWithBaseURI creates an instance of the ProviderClient client. +// NewProviderClientWithBaseURI creates an instance of the ProviderClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProviderClientWithBaseURI(baseURI string, subscriptionID string) ProviderClient { return ProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/recommendations.go b/services/web/mgmt/2018-02-01/web/recommendations.go index 89c4e3421530..bdc2151d8534 100644 --- a/services/web/mgmt/2018-02-01/web/recommendations.go +++ b/services/web/mgmt/2018-02-01/web/recommendations.go @@ -36,7 +36,8 @@ func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/resourcehealthmetadata.go b/services/web/mgmt/2018-02-01/web/resourcehealthmetadata.go index b43c6e5f64c0..a719cbe7cdad 100644 --- a/services/web/mgmt/2018-02-01/web/resourcehealthmetadata.go +++ b/services/web/mgmt/2018-02-01/web/resourcehealthmetadata.go @@ -36,7 +36,9 @@ func NewResourceHealthMetadataClient(subscriptionID string) ResourceHealthMetada return NewResourceHealthMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceHealthMetadataClientWithBaseURI creates an instance of the ResourceHealthMetadataClient client. +// NewResourceHealthMetadataClientWithBaseURI creates an instance of the ResourceHealthMetadataClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceHealthMetadataClientWithBaseURI(baseURI string, subscriptionID string) ResourceHealthMetadataClient { return ResourceHealthMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/topleveldomains.go b/services/web/mgmt/2018-02-01/web/topleveldomains.go index 969de2a398a6..215491cf753c 100644 --- a/services/web/mgmt/2018-02-01/web/topleveldomains.go +++ b/services/web/mgmt/2018-02-01/web/topleveldomains.go @@ -35,7 +35,8 @@ func NewTopLevelDomainsClient(subscriptionID string) TopLevelDomainsClient { return NewTopLevelDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client. +// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopLevelDomainsClientWithBaseURI(baseURI string, subscriptionID string) TopLevelDomainsClient { return TopLevelDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2018-02-01/web/webapi/interfaces.go b/services/web/mgmt/2018-02-01/web/webapi/interfaces.go index fe6234917363..9f3dddb4bcd3 100644 --- a/services/web/mgmt/2018-02-01/web/webapi/interfaces.go +++ b/services/web/mgmt/2018-02-01/web/webapi/interfaces.go @@ -31,11 +31,16 @@ type BaseClientAPI interface { GetSourceControl(ctx context.Context, sourceControlType string) (result web.SourceControl, err error) GetSubscriptionDeploymentLocations(ctx context.Context) (result web.DeploymentLocations, err error) ListBillingMeters(ctx context.Context, billingLocation string, osType string) (result web.BillingMeterCollectionPage, err error) + ListBillingMetersComplete(ctx context.Context, billingLocation string, osType string) (result web.BillingMeterCollectionIterator, err error) ListGeoRegions(ctx context.Context, sku web.SkuName, linuxWorkersEnabled *bool, xenonWorkersEnabled *bool, linuxDynamicWorkersEnabled *bool) (result web.GeoRegionCollectionPage, err error) + ListGeoRegionsComplete(ctx context.Context, sku web.SkuName, linuxWorkersEnabled *bool, xenonWorkersEnabled *bool, linuxDynamicWorkersEnabled *bool) (result web.GeoRegionCollectionIterator, err error) ListPremierAddOnOffers(ctx context.Context) (result web.PremierAddOnOfferCollectionPage, err error) + ListPremierAddOnOffersComplete(ctx context.Context) (result web.PremierAddOnOfferCollectionIterator, err error) ListSiteIdentifiersAssignedToHostName(ctx context.Context, nameIdentifier web.NameIdentifier) (result web.IdentifierCollectionPage, err error) + ListSiteIdentifiersAssignedToHostNameComplete(ctx context.Context, nameIdentifier web.NameIdentifier) (result web.IdentifierCollectionIterator, err error) ListSkus(ctx context.Context) (result web.SkuInfos, err error) ListSourceControls(ctx context.Context) (result web.SourceControlCollectionPage, err error) + ListSourceControlsComplete(ctx context.Context) (result web.SourceControlCollectionIterator, err error) Move(ctx context.Context, resourceGroupName string, moveResourceEnvelope web.CsmMoveResourceEnvelope) (result autorest.Response, err error) UpdatePublishingUser(ctx context.Context, userDetails web.User) (result web.User, err error) UpdateSourceControl(ctx context.Context, sourceControlType string, requestMessage web.SourceControl) (result web.SourceControl, err error) @@ -56,8 +61,11 @@ type AppServiceCertificateOrdersClientAPI interface { Get(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateOrder, err error) GetCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string) (result web.AppServiceCertificateResource, err error) List(ctx context.Context) (result web.AppServiceCertificateOrderCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppServiceCertificateOrderCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServiceCertificateOrderCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServiceCertificateOrderCollectionIterator, err error) ListCertificates(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateCollectionPage, err error) + ListCertificatesComplete(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateCollectionIterator, err error) Reissue(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest web.ReissueCertificateOrderRequest) (result autorest.Response, err error) Renew(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest web.RenewCertificateOrderRequest) (result autorest.Response, err error) ResendEmail(ctx context.Context, resourceGroupName string, certificateOrderName string) (result autorest.Response, err error) @@ -76,6 +84,7 @@ var _ AppServiceCertificateOrdersClientAPI = (*web.AppServiceCertificateOrdersCl // CertificateRegistrationProviderClientAPI contains the set of methods on the CertificateRegistrationProviderClient type. type CertificateRegistrationProviderClientAPI interface { ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ CertificateRegistrationProviderClientAPI = (*web.CertificateRegistrationProviderClient)(nil) @@ -91,9 +100,13 @@ type DomainsClientAPI interface { GetControlCenterSsoRequest(ctx context.Context) (result web.DomainControlCenterSsoRequest, err error) GetOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string) (result web.DomainOwnershipIdentifier, err error) List(ctx context.Context) (result web.DomainCollectionPage, err error) + ListComplete(ctx context.Context) (result web.DomainCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.DomainCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.DomainCollectionIterator, err error) ListOwnershipIdentifiers(ctx context.Context, resourceGroupName string, domainName string) (result web.DomainOwnershipIdentifierCollectionPage, err error) + ListOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, domainName string) (result web.DomainOwnershipIdentifierCollectionIterator, err error) ListRecommendations(ctx context.Context, parameters web.DomainRecommendationSearchParameters) (result web.NameIdentifierCollectionPage, err error) + ListRecommendationsComplete(ctx context.Context, parameters web.DomainRecommendationSearchParameters) (result web.NameIdentifierCollectionIterator, err error) Renew(ctx context.Context, resourceGroupName string, domainName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, domainName string, domain web.DomainPatchResource) (result web.Domain, err error) UpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier web.DomainOwnershipIdentifier) (result web.DomainOwnershipIdentifier, err error) @@ -105,7 +118,9 @@ var _ DomainsClientAPI = (*web.DomainsClient)(nil) type TopLevelDomainsClientAPI interface { Get(ctx context.Context, name string) (result web.TopLevelDomain, err error) List(ctx context.Context) (result web.TopLevelDomainCollectionPage, err error) + ListComplete(ctx context.Context) (result web.TopLevelDomainCollectionIterator, err error) ListAgreements(ctx context.Context, name string, agreementOption web.TopLevelDomainAgreementOption) (result web.TldLegalAgreementCollectionPage, err error) + ListAgreementsComplete(ctx context.Context, name string, agreementOption web.TopLevelDomainAgreementOption) (result web.TldLegalAgreementCollectionIterator, err error) } var _ TopLevelDomainsClientAPI = (*web.TopLevelDomainsClient)(nil) @@ -113,6 +128,7 @@ var _ TopLevelDomainsClientAPI = (*web.TopLevelDomainsClient)(nil) // DomainRegistrationProviderClientAPI contains the set of methods on the DomainRegistrationProviderClient type. type DomainRegistrationProviderClientAPI interface { ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ DomainRegistrationProviderClientAPI = (*web.DomainRegistrationProviderClient)(nil) @@ -123,7 +139,9 @@ type CertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, name string) (result web.Certificate, err error) List(ctx context.Context) (result web.CertificateCollectionPage, err error) + ListComplete(ctx context.Context) (result web.CertificateCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.CertificateCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.CertificateCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, name string, certificateEnvelope web.CertificatePatchResource) (result web.Certificate, err error) } @@ -133,7 +151,9 @@ var _ CertificatesClientAPI = (*web.CertificatesClient)(nil) type DeletedWebAppsClientAPI interface { GetDeletedWebAppByLocation(ctx context.Context, location string, deletedSiteID string) (result web.DeletedSite, err error) List(ctx context.Context) (result web.DeletedWebAppCollectionPage, err error) + ListComplete(ctx context.Context) (result web.DeletedWebAppCollectionIterator, err error) ListByLocation(ctx context.Context, location string) (result web.DeletedWebAppCollectionPage, err error) + ListByLocationComplete(ctx context.Context, location string) (result web.DeletedWebAppCollectionIterator, err error) } var _ DeletedWebAppsClientAPI = (*web.DeletedWebAppsClient)(nil) @@ -148,20 +168,31 @@ type DiagnosticsClientAPI interface { GetSiteAnalysis(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string) (result web.DiagnosticAnalysis, err error) GetSiteAnalysisSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string) (result web.DiagnosticAnalysis, err error) GetSiteDetector(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string) (result web.DiagnosticDetectorCollectionPage, err error) + GetSiteDetectorComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string) (result web.DiagnosticDetectorCollectionIterator, err error) GetSiteDetectorResponse(ctx context.Context, resourceGroupName string, siteName string, detectorName string, startTime *date.Time, endTime *date.Time, timeGrain string) (result web.DetectorResponse, err error) GetSiteDetectorResponseSlot(ctx context.Context, resourceGroupName string, siteName string, detectorName string, slot string, startTime *date.Time, endTime *date.Time, timeGrain string) (result web.DetectorResponse, err error) GetSiteDetectorSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string) (result web.DiagnosticDetectorCollectionPage, err error) + GetSiteDetectorSlotComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string) (result web.DiagnosticDetectorCollectionIterator, err error) GetSiteDiagnosticCategory(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticCategory, err error) GetSiteDiagnosticCategorySlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticCategory, err error) ListHostingEnvironmentDetectorResponses(ctx context.Context, resourceGroupName string, name string) (result web.DetectorResponseCollectionPage, err error) + ListHostingEnvironmentDetectorResponsesComplete(ctx context.Context, resourceGroupName string, name string) (result web.DetectorResponseCollectionIterator, err error) ListSiteAnalyses(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticAnalysisCollectionPage, err error) + ListSiteAnalysesComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticAnalysisCollectionIterator, err error) ListSiteAnalysesSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticAnalysisCollectionPage, err error) + ListSiteAnalysesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticAnalysisCollectionIterator, err error) ListSiteDetectorResponses(ctx context.Context, resourceGroupName string, siteName string) (result web.DetectorResponseCollectionPage, err error) + ListSiteDetectorResponsesComplete(ctx context.Context, resourceGroupName string, siteName string) (result web.DetectorResponseCollectionIterator, err error) ListSiteDetectorResponsesSlot(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DetectorResponseCollectionPage, err error) + ListSiteDetectorResponsesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DetectorResponseCollectionIterator, err error) ListSiteDetectors(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticDetectorCollectionPage, err error) + ListSiteDetectorsComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticDetectorCollectionIterator, err error) ListSiteDetectorsSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticDetectorCollectionPage, err error) + ListSiteDetectorsSlotComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticDetectorCollectionIterator, err error) ListSiteDiagnosticCategories(ctx context.Context, resourceGroupName string, siteName string) (result web.DiagnosticCategoryCollectionPage, err error) + ListSiteDiagnosticCategoriesComplete(ctx context.Context, resourceGroupName string, siteName string) (result web.DiagnosticCategoryCollectionIterator, err error) ListSiteDiagnosticCategoriesSlot(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DiagnosticCategoryCollectionPage, err error) + ListSiteDiagnosticCategoriesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DiagnosticCategoryCollectionIterator, err error) } var _ DiagnosticsClientAPI = (*web.DiagnosticsClient)(nil) @@ -169,8 +200,11 @@ var _ DiagnosticsClientAPI = (*web.DiagnosticsClient)(nil) // ProviderClientAPI contains the set of methods on the ProviderClient type. type ProviderClientAPI interface { GetAvailableStacks(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionPage, err error) + GetAvailableStacksComplete(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionIterator, err error) GetAvailableStacksOnPrem(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionPage, err error) + GetAvailableStacksOnPremComplete(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionIterator, err error) ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ ProviderClientAPI = (*web.ProviderClient)(nil) @@ -185,10 +219,15 @@ type RecommendationsClientAPI interface { GetRuleDetailsByHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, updateSeen *bool, recommendationID string) (result web.RecommendationRule, err error) GetRuleDetailsByWebApp(ctx context.Context, resourceGroupName string, siteName string, name string, updateSeen *bool, recommendationID string) (result web.RecommendationRule, err error) List(ctx context.Context, featured *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListComplete(ctx context.Context, featured *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListHistoryForHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListHistoryForHostingEnvironmentComplete(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListHistoryForWebApp(ctx context.Context, resourceGroupName string, siteName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListHistoryForWebAppComplete(ctx context.Context, resourceGroupName string, siteName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListRecommendedRulesForHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, featured *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListRecommendedRulesForHostingEnvironmentComplete(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, featured *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListRecommendedRulesForWebApp(ctx context.Context, resourceGroupName string, siteName string, featured *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListRecommendedRulesForWebAppComplete(ctx context.Context, resourceGroupName string, siteName string, featured *bool, filter string) (result web.RecommendationCollectionIterator, err error) ResetAllFilters(ctx context.Context) (result autorest.Response, err error) ResetAllFiltersForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string) (result autorest.Response, err error) ResetAllFiltersForWebApp(ctx context.Context, resourceGroupName string, siteName string) (result autorest.Response, err error) @@ -383,71 +422,111 @@ type AppsClientAPI interface { IsCloneable(ctx context.Context, resourceGroupName string, name string) (result web.SiteCloneability, err error) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteCloneability, err error) List(ctx context.Context) (result web.AppCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppCollectionIterator, err error) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result web.StringDictionary, err error) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.StringDictionary, err error) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result web.AzureStoragePropertyDictionaryResource, err error) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AzureStoragePropertyDictionaryResource, err error) ListBackups(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionPage, err error) + ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionIterator, err error) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionPage, err error) + ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionIterator, err error) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request web.BackupRequest) (result web.BackupItem, err error) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request web.BackupRequest, slot string) (result web.BackupItem, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result web.AppCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result web.AppCollectionIterator, err error) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigResourceCollectionPage, err error) + ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigResourceCollectionIterator, err error) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigurationSnapshotInfoCollectionPage, err error) + ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigurationSnapshotInfoCollectionIterator, err error) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigurationSnapshotInfoCollectionPage, err error) + ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigurationSnapshotInfoCollectionIterator, err error) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigResourceCollectionPage, err error) + ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigResourceCollectionIterator, err error) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result web.ConnectionStringDictionary, err error) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ConnectionStringDictionary, err error) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.ContinuousWebJobCollectionPage, err error) + ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ContinuousWebJobCollectionIterator, err error) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ContinuousWebJobCollectionPage, err error) + ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ContinuousWebJobCollectionIterator, err error) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result web.Deployment, err error) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result web.Deployment, err error) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result web.DeploymentCollectionPage, err error) + ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result web.DeploymentCollectionIterator, err error) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionPage, err error) + ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionIterator, err error) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result web.IdentifierCollectionPage, err error) + ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result web.IdentifierCollectionIterator, err error) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.IdentifierCollectionPage, err error) + ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.IdentifierCollectionIterator, err error) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string) (result web.StringDictionary, err error) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result web.StringDictionary, err error) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result web.FunctionEnvelopeCollectionPage, err error) + ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.FunctionEnvelopeCollectionIterator, err error) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result web.FunctionSecrets, err error) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result web.FunctionSecrets, err error) ListHostKeys(ctx context.Context, resourceGroupName string, name string) (result web.HostKeys, err error) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostKeys, err error) ListHostNameBindings(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionPage, err error) + ListHostNameBindingsComplete(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionIterator, err error) ListHostNameBindingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionPage, err error) + ListHostNameBindingsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionIterator, err error) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.HybridConnectionKey, err error) ListHybridConnectionKeysSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result web.HybridConnectionKey, err error) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnection, err error) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HybridConnection, err error) ListInstanceFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionEnvelopeCollectionPage, err error) + ListInstanceFunctionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionEnvelopeCollectionIterator, err error) ListInstanceIdentifiers(ctx context.Context, resourceGroupName string, name string) (result web.AppInstanceCollectionPage, err error) + ListInstanceIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppInstanceCollectionIterator, err error) ListInstanceIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppInstanceCollectionPage, err error) + ListInstanceIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppInstanceCollectionIterator, err error) ListInstanceProcesses(ctx context.Context, resourceGroupName string, name string, instanceID string) (result web.ProcessInfoCollectionPage, err error) + ListInstanceProcessesComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result web.ProcessInfoCollectionIterator, err error) ListInstanceProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result web.ProcessInfoCollectionPage, err error) + ListInstanceProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result web.ProcessInfoCollectionIterator, err error) ListInstanceProcessModules(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListInstanceProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListInstanceProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListInstanceProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListInstanceProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListInstanceProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListInstanceProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListInstanceProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListMetadata(ctx context.Context, resourceGroupName string, name string) (result web.StringDictionary, err error) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.StringDictionary, err error) ListMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMetricDefinitionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMetricDefinitionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListMetricsSlot(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMetricsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string) (result web.NetworkFeatures, err error) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string) (result web.NetworkFeatures, err error) ListPerfMonCounters(ctx context.Context, resourceGroupName string, name string, filter string) (result web.PerfMonCounterCollectionPage, err error) + ListPerfMonCountersComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.PerfMonCounterCollectionIterator, err error) ListPerfMonCountersSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.PerfMonCounterCollectionPage, err error) + ListPerfMonCountersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.PerfMonCounterCollectionIterator, err error) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string) (result web.PremierAddOn, err error) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PremierAddOn, err error) ListProcesses(ctx context.Context, resourceGroupName string, name string) (result web.ProcessInfoCollectionPage, err error) + ListProcessesComplete(ctx context.Context, resourceGroupName string, name string) (result web.ProcessInfoCollectionIterator, err error) ListProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ProcessInfoCollectionPage, err error) + ListProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ProcessInfoCollectionIterator, err error) ListProcessModules(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessModuleInfoCollectionPage, err error) + ListProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessModuleInfoCollectionIterator, err error) ListProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessThreadInfoCollectionPage, err error) + ListProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessThreadInfoCollectionIterator, err error) ListPublicCertificates(ctx context.Context, resourceGroupName string, name string) (result web.PublicCertificateCollectionPage, err error) + ListPublicCertificatesComplete(ctx context.Context, resourceGroupName string, name string) (result web.PublicCertificateCollectionIterator, err error) ListPublicCertificatesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PublicCertificateCollectionPage, err error) + ListPublicCertificatesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PublicCertificateCollectionIterator, err error) ListPublishingCredentials(ctx context.Context, resourceGroupName string, name string) (result web.AppsListPublishingCredentialsFuture, err error) ListPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppsListPublishingCredentialsSlotFuture, err error) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions web.CsmPublishingProfileOptions) (result web.ReadCloser, err error) @@ -455,31 +534,48 @@ type AppsClientAPI interface { ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string) (result web.RelayServiceConnectionEntity, err error) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.RelayServiceConnectionEntity, err error) ListSiteExtensions(ctx context.Context, resourceGroupName string, name string) (result web.SiteExtensionInfoCollectionPage, err error) + ListSiteExtensionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteExtensionInfoCollectionIterator, err error) ListSiteExtensionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteExtensionInfoCollectionPage, err error) + ListSiteExtensionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteExtensionInfoCollectionIterator, err error) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string) (result web.PushSettings, err error) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PushSettings, err error) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string) (result web.SlotConfigNamesResource, err error) ListSlotDifferencesFromProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.SlotDifferenceCollectionPage, err error) + ListSlotDifferencesFromProductionComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.SlotDifferenceCollectionIterator, err error) ListSlotDifferencesSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.SlotDifferenceCollectionPage, err error) + ListSlotDifferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.SlotDifferenceCollectionIterator, err error) ListSlots(ctx context.Context, resourceGroupName string, name string) (result web.AppCollectionPage, err error) + ListSlotsComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppCollectionIterator, err error) ListSnapshots(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionIterator, err error) ListSnapshotsFromDRSecondary(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsFromDRSecondaryComplete(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionIterator, err error) ListSnapshotsFromDRSecondarySlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsFromDRSecondarySlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionIterator, err error) ListSnapshotsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionIterator, err error) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result web.FunctionSecrets, err error) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionSecrets, err error) ListSyncStatus(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) ListTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string) (result web.TriggeredJobHistoryCollectionPage, err error) + ListTriggeredWebJobHistoryComplete(ctx context.Context, resourceGroupName string, name string, webJobName string) (result web.TriggeredJobHistoryCollectionIterator, err error) ListTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result web.TriggeredJobHistoryCollectionPage, err error) + ListTriggeredWebJobHistorySlotComplete(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result web.TriggeredJobHistoryCollectionIterator, err error) ListTriggeredWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.TriggeredWebJobCollectionPage, err error) + ListTriggeredWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.TriggeredWebJobCollectionIterator, err error) ListTriggeredWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.TriggeredWebJobCollectionPage, err error) + ListTriggeredWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.TriggeredWebJobCollectionIterator, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListUsagesSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListVnetConnections(ctx context.Context, resourceGroupName string, name string) (result web.ListVnetInfo, err error) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ListVnetInfo, err error) ListWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.JobCollectionPage, err error) + ListWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.JobCollectionIterator, err error) ListWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.JobCollectionPage, err error) + ListWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.JobCollectionIterator, err error) MigrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope web.MigrateMySQLRequest) (result web.AppsMigrateMySQLFuture, err error) MigrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions web.StorageMigrationOptions) (result web.AppsMigrateStorageFuture, err error) PutPrivateAccessVnet(ctx context.Context, resourceGroupName string, name string, access web.PrivateAccess) (result web.PrivateAccess, err error) @@ -570,6 +666,7 @@ var _ AppsClientAPI = (*web.AppsClient)(nil) // AppServiceEnvironmentsClientAPI contains the set of methods on the AppServiceEnvironmentsClient type. type AppServiceEnvironmentsClientAPI interface { ChangeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo web.VirtualNetworkProfile) (result web.AppServiceEnvironmentsChangeVnetFuture, err error) + ChangeVnetComplete(ctx context.Context, resourceGroupName string, name string, vnetInfo web.VirtualNetworkProfile) (result web.AppServiceEnvironmentsChangeVnetAllFuture, err error) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope web.AppServiceEnvironmentResource) (result web.AppServiceEnvironmentsCreateOrUpdateFuture, err error) CreateOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope web.WorkerPoolResource) (result web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture, err error) CreateOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope web.WorkerPoolResource) (result web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture, err error) @@ -577,37 +674,62 @@ type AppServiceEnvironmentsClientAPI interface { Get(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentResource, err error) GetDiagnosticsItem(ctx context.Context, resourceGroupName string, name string, diagnosticsName string) (result web.HostingEnvironmentDiagnostics, err error) GetInboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, name string) (result web.InboundEnvironmentEndpointCollectionPage, err error) + GetInboundNetworkDependenciesEndpointsComplete(ctx context.Context, resourceGroupName string, name string) (result web.InboundEnvironmentEndpointCollectionIterator, err error) GetMultiRolePool(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolResource, err error) GetOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, name string) (result web.OutboundEnvironmentEndpointCollectionPage, err error) + GetOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, resourceGroupName string, name string) (result web.OutboundEnvironmentEndpointCollectionIterator, err error) GetWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.WorkerPoolResource, err error) List(ctx context.Context) (result web.AppServiceEnvironmentCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppServiceEnvironmentCollectionIterator, err error) ListAppServicePlans(ctx context.Context, resourceGroupName string, name string) (result web.AppServicePlanCollectionPage, err error) + ListAppServicePlansComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServicePlanCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServiceEnvironmentCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServiceEnvironmentCollectionIterator, err error) ListCapacities(ctx context.Context, resourceGroupName string, name string) (result web.StampCapacityCollectionPage, err error) + ListCapacitiesComplete(ctx context.Context, resourceGroupName string, name string) (result web.StampCapacityCollectionIterator, err error) ListDiagnostics(ctx context.Context, resourceGroupName string, name string) (result web.ListHostingEnvironmentDiagnostics, err error) ListMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.MetricDefinition, err error) ListMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListMultiRoleMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMultiRoleMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMultiRoleMetrics(ctx context.Context, resourceGroupName string, name string, startTime string, endTime string, timeGrain string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMultiRoleMetricsComplete(ctx context.Context, resourceGroupName string, name string, startTime string, endTime string, timeGrain string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListMultiRolePoolInstanceMetricDefinitions(ctx context.Context, resourceGroupName string, name string, instance string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMultiRolePoolInstanceMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, instance string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMultiRolePoolInstanceMetrics(ctx context.Context, resourceGroupName string, name string, instance string, details *bool) (result web.ResourceMetricCollectionPage, err error) + ListMultiRolePoolInstanceMetricsComplete(ctx context.Context, resourceGroupName string, name string, instance string, details *bool) (result web.ResourceMetricCollectionIterator, err error) ListMultiRolePools(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionPage, err error) + ListMultiRolePoolsComplete(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionIterator, err error) ListMultiRolePoolSkus(ctx context.Context, resourceGroupName string, name string) (result web.SkuInfoCollectionPage, err error) + ListMultiRolePoolSkusComplete(ctx context.Context, resourceGroupName string, name string) (result web.SkuInfoCollectionIterator, err error) ListMultiRoleUsages(ctx context.Context, resourceGroupName string, name string) (result web.UsageCollectionPage, err error) + ListMultiRoleUsagesComplete(ctx context.Context, resourceGroupName string, name string) (result web.UsageCollectionIterator, err error) ListOperations(ctx context.Context, resourceGroupName string, name string) (result web.ListOperation, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListVips(ctx context.Context, resourceGroupName string, name string) (result web.AddressResponse, err error) ListWebApps(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.AppCollectionPage, err error) + ListWebAppsComplete(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.AppCollectionIterator, err error) ListWebWorkerMetricDefinitions(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListWebWorkerMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListWebWorkerMetrics(ctx context.Context, resourceGroupName string, name string, workerPoolName string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListWebWorkerMetricsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListWebWorkerUsages(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.UsageCollectionPage, err error) + ListWebWorkerUsagesComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.UsageCollectionIterator, err error) ListWorkerPoolInstanceMetricDefinitions(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListWorkerPoolInstanceMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListWorkerPoolInstanceMetrics(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListWorkerPoolInstanceMetricsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListWorkerPools(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionPage, err error) + ListWorkerPoolsComplete(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionIterator, err error) ListWorkerPoolSkus(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.SkuInfoCollectionPage, err error) + ListWorkerPoolSkusComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.SkuInfoCollectionIterator, err error) Reboot(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) Resume(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsResumeFuture, err error) + ResumeComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsResumeAllFuture, err error) Suspend(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsSuspendFuture, err error) + SuspendComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsSuspendAllFuture, err error) Update(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope web.AppServiceEnvironmentPatchResource) (result web.AppServiceEnvironmentResource, err error) UpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope web.WorkerPoolResource) (result web.WorkerPoolResource, err error) UpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope web.WorkerPoolResource) (result web.WorkerPoolResource, err error) @@ -630,17 +752,25 @@ type AppServicePlansClientAPI interface { GetVnetFromServerFarm(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.VnetInfo, err error) GetVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result web.VnetGateway, err error) List(ctx context.Context, detailed *bool) (result web.AppServicePlanCollectionPage, err error) + ListComplete(ctx context.Context, detailed *bool) (result web.AppServicePlanCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServicePlanCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServicePlanCollectionIterator, err error) ListCapabilities(ctx context.Context, resourceGroupName string, name string) (result web.ListCapability, err error) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.HybridConnectionKey, err error) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnectionCollectionPage, err error) + ListHybridConnectionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnectionCollectionIterator, err error) ListMetricDefintions(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMetricDefintionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionPage, err error) + ListMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result web.ResourceMetricCollectionIterator, err error) ListRoutesForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.ListVnetRoute, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListVnets(ctx context.Context, resourceGroupName string, name string) (result web.ListVnetInfo, err error) ListWebApps(ctx context.Context, resourceGroupName string, name string, skipToken string, filter string, top string) (result web.AppCollectionPage, err error) + ListWebAppsComplete(ctx context.Context, resourceGroupName string, name string, skipToken string, filter string, top string) (result web.AppCollectionIterator, err error) ListWebAppsByHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.ResourceCollectionPage, err error) + ListWebAppsByHybridConnectionComplete(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.ResourceCollectionIterator, err error) RebootWorker(ctx context.Context, resourceGroupName string, name string, workerName string) (result autorest.Response, err error) RestartWebApps(ctx context.Context, resourceGroupName string, name string, softRestart *bool) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, name string, appServicePlan web.AppServicePlanPatchResource) (result web.AppServicePlan, err error) @@ -655,9 +785,13 @@ type ResourceHealthMetadataClientAPI interface { GetBySite(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadata, err error) GetBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadata, err error) List(ctx context.Context) (result web.ResourceHealthMetadataCollectionPage, err error) + ListComplete(ctx context.Context) (result web.ResourceHealthMetadataCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.ResourceHealthMetadataCollectionIterator, err error) ListBySite(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListBySiteComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadataCollectionIterator, err error) ListBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListBySiteSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadataCollectionIterator, err error) } var _ ResourceHealthMetadataClientAPI = (*web.ResourceHealthMetadataClient)(nil) diff --git a/services/web/mgmt/2019-08-01/web/apps.go b/services/web/mgmt/2019-08-01/web/apps.go index 73392ff1c4d6..e0869819af19 100644 --- a/services/web/mgmt/2019-08-01/web/apps.go +++ b/services/web/mgmt/2019-08-01/web/apps.go @@ -36,7 +36,8 @@ func NewAppsClient(subscriptionID string) AppsClient { return NewAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppsClientWithBaseURI creates an instance of the AppsClient client. +// NewAppsClientWithBaseURI creates an instance of the AppsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient { return AppsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -2203,15 +2204,16 @@ func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotResponder(re return } -// CreateOrUpdateHostNameBinding description for Creates a hostname binding for an app. +// CreateOrUpdateFunctionSecret description for Add or update a function secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// hostName - hostname in the hostname binding. -// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object. -func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (result HostNameBinding, err error) { +// name - site name. +// functionName - the name of the function. +// keyName - the name of the key. +// key - the key to create or update +func (client AppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (result KeyInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBinding") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecret") defer func() { sc := -1 if result.Response.Response != nil { @@ -2225,34 +2227,35 @@ func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, reso 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("web.AppsClient", "CreateOrUpdateHostNameBinding", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecret", err.Error()) } - req, err := client.CreateOrUpdateHostNameBindingPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding) + req, err := client.CreateOrUpdateFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName, key) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateHostNameBindingSender(req) + resp, err := client.CreateOrUpdateFunctionSecretSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateHostNameBindingResponder(resp) + result, err = client.CreateOrUpdateFunctionSecretResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure responding to request") } return } -// CreateOrUpdateHostNameBindingPreparer prepares the CreateOrUpdateHostNameBinding request. -func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (*http.Request, error) { +// CreateOrUpdateFunctionSecretPreparer prepares the CreateOrUpdateFunctionSecret request. +func (client AppsClient) CreateOrUpdateFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), + "functionName": autorest.Encode("path", functionName), + "keyName": autorest.Encode("path", keyName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -2267,43 +2270,43 @@ func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Conte autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), - autorest.WithJSON(hostNameBinding), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters), + autorest.WithJSON(key), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateHostNameBindingSender sends the CreateOrUpdateHostNameBinding request. The method will close the +// CreateOrUpdateFunctionSecretSender sends the CreateOrUpdateFunctionSecret request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateHostNameBindingSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateFunctionSecretSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateHostNameBindingResponder handles the response to the CreateOrUpdateHostNameBinding request. The method always +// CreateOrUpdateFunctionSecretResponder handles the response to the CreateOrUpdateFunctionSecret request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { +func (client AppsClient) CreateOrUpdateFunctionSecretResponder(resp *http.Response) (result KeyInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateHostNameBindingSlot description for Creates a hostname binding for an app. +// CreateOrUpdateFunctionSecretSlot description for Add or update a function secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// hostName - hostname in the hostname binding. -// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object. -// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the -// production slot. -func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (result HostNameBinding, err error) { +// name - site name. +// functionName - the name of the function. +// keyName - the name of the key. +// slot - name of the deployment slot. +// key - the key to create or update +func (client AppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBindingSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecretSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -2317,34 +2320,35 @@ func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, 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("web.AppsClient", "CreateOrUpdateHostNameBindingSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecretSlot", err.Error()) } - req, err := client.CreateOrUpdateHostNameBindingSlotPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding, slot) + req, err := client.CreateOrUpdateFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot, key) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateHostNameBindingSlotSender(req) + resp, err := client.CreateOrUpdateFunctionSecretSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateHostNameBindingSlotResponder(resp) + result, err = client.CreateOrUpdateFunctionSecretSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateHostNameBindingSlotPreparer prepares the CreateOrUpdateHostNameBindingSlot request. -func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (*http.Request, error) { +// CreateOrUpdateFunctionSecretSlotPreparer prepares the CreateOrUpdateFunctionSecretSlot request. +func (client AppsClient) CreateOrUpdateFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), + "functionName": autorest.Encode("path", functionName), + "keyName": autorest.Encode("path", keyName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -2360,42 +2364,41 @@ func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.C autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), - autorest.WithJSON(hostNameBinding), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters), + autorest.WithJSON(key), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateHostNameBindingSlotSender sends the CreateOrUpdateHostNameBindingSlot request. The method will close the +// CreateOrUpdateFunctionSecretSlotSender sends the CreateOrUpdateFunctionSecretSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateFunctionSecretSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateHostNameBindingSlotResponder handles the response to the CreateOrUpdateHostNameBindingSlot request. The method always +// CreateOrUpdateFunctionSecretSlotResponder handles the response to the CreateOrUpdateFunctionSecretSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) { +func (client AppsClient) CreateOrUpdateFunctionSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateHybridConnection description for Creates a new Hybrid Connection using a Service Bus relay. +// CreateOrUpdateHostNameBinding description for Creates a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -// connectionEnvelope - the details of the hybrid connection. -func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) { +// name - name of the app. +// hostName - hostname in the hostname binding. +// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object. +func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (result HostNameBinding, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBinding") defer func() { sc := -1 if result.Response.Response != nil { @@ -2409,36 +2412,35 @@ func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, res 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("web.AppsClient", "CreateOrUpdateHybridConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBinding", err.Error()) } - req, err := client.CreateOrUpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope) + req, err := client.CreateOrUpdateHostNameBindingPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateHybridConnectionSender(req) + resp, err := client.CreateOrUpdateHostNameBindingSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateHybridConnectionResponder(resp) + result, err = client.CreateOrUpdateHostNameBindingResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure responding to request") } return } -// CreateOrUpdateHybridConnectionPreparer prepares the CreateOrUpdateHybridConnection request. -func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) { +// CreateOrUpdateHostNameBindingPreparer prepares the CreateOrUpdateHostNameBinding request. +func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (*http.Request, error) { pathParameters := map[string]interface{}{ + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -2452,22 +2454,22 @@ func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Cont autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), + autorest.WithJSON(hostNameBinding), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateHybridConnectionSender sends the CreateOrUpdateHybridConnection request. The method will close the +// CreateOrUpdateHostNameBindingSender sends the CreateOrUpdateHostNameBinding request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateHybridConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHostNameBindingSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateHybridConnectionResponder handles the response to the CreateOrUpdateHybridConnection request. The method always +// CreateOrUpdateHostNameBindingResponder handles the response to the CreateOrUpdateHostNameBinding request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) { +func (client AppsClient) CreateOrUpdateHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -2478,17 +2480,17 @@ func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Resp return } -// CreateOrUpdateHybridConnectionSlot description for Creates a new Hybrid Connection using a Service Bus relay. +// CreateOrUpdateHostNameBindingSlot description for Creates a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -// connectionEnvelope - the details of the hybrid connection. -// slot - the name of the slot for the web app. -func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) { +// name - name of the app. +// hostName - hostname in the hostname binding. +// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object. +// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the +// production slot. +func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (result HostNameBinding, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBindingSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -2502,36 +2504,35 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, 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("web.AppsClient", "CreateOrUpdateHybridConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBindingSlot", err.Error()) } - req, err := client.CreateOrUpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot) + req, err := client.CreateOrUpdateHostNameBindingSlotPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateHybridConnectionSlotSender(req) + resp, err := client.CreateOrUpdateHostNameBindingSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateHybridConnectionSlotResponder(resp) + result, err = client.CreateOrUpdateHostNameBindingSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateHybridConnectionSlotPreparer prepares the CreateOrUpdateHybridConnectionSlot request. -func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) { +// CreateOrUpdateHostNameBindingSlotPreparer prepares the CreateOrUpdateHostNameBindingSlot request. +func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -2546,22 +2547,22 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context. autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), + autorest.WithJSON(hostNameBinding), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateHybridConnectionSlotSender sends the CreateOrUpdateHybridConnectionSlot request. The method will close the +// CreateOrUpdateHostNameBindingSlotSender sends the CreateOrUpdateHostNameBindingSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateHybridConnectionSlotResponder handles the response to the CreateOrUpdateHybridConnectionSlot request. The method always +// CreateOrUpdateHostNameBindingSlotResponder handles the response to the CreateOrUpdateHostNameBindingSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) { +func (client AppsClient) CreateOrUpdateHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -2572,16 +2573,16 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http. return } -// CreateOrUpdatePublicCertificate description for Creates a hostname binding for an app. +// CreateOrUpdateHostSecret description for Add or update a host level secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// publicCertificateName - public certificate name. -// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate -// object. -func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (result PublicCertificate, err error) { +// name - site name. +// keyType - the type of host key. +// keyName - the name of the key. +// key - the key to create or update +func (client AppsClient) CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (result KeyInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificate") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecret") defer func() { sc := -1 if result.Response.Response != nil { @@ -2595,37 +2596,38 @@ func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, re 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("web.AppsClient", "CreateOrUpdatePublicCertificate", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecret", err.Error()) } - req, err := client.CreateOrUpdatePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate) + req, err := client.CreateOrUpdateHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName, key) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdatePublicCertificateSender(req) + resp, err := client.CreateOrUpdateHostSecretSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure sending request") return } - result, err = client.CreateOrUpdatePublicCertificateResponder(resp) + result, err = client.CreateOrUpdateHostSecretResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure responding to request") } return } -// CreateOrUpdatePublicCertificatePreparer prepares the CreateOrUpdatePublicCertificate request. -func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (*http.Request, error) { +// CreateOrUpdateHostSecretPreparer prepares the CreateOrUpdateHostSecret request. +func (client AppsClient) CreateOrUpdateHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "keyName": autorest.Encode("path", keyName), + "keyType": autorest.Encode("path", keyType), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -2637,44 +2639,43 @@ func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Con autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), - autorest.WithJSON(publicCertificate), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters), + autorest.WithJSON(key), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdatePublicCertificateSender sends the CreateOrUpdatePublicCertificate request. The method will close the +// CreateOrUpdateHostSecretSender sends the CreateOrUpdateHostSecret request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdatePublicCertificateSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHostSecretSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate request. The method always +// CreateOrUpdateHostSecretResponder handles the response to the CreateOrUpdateHostSecret request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdatePublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { +func (client AppsClient) CreateOrUpdateHostSecretResponder(resp *http.Response) (result KeyInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdatePublicCertificateSlot description for Creates a hostname binding for an app. +// CreateOrUpdateHostSecretSlot description for Add or update a host level secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// publicCertificateName - public certificate name. -// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate -// object. -// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the -// production slot. -func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (result PublicCertificate, err error) { +// name - site name. +// keyType - the type of host key. +// keyName - the name of the key. +// slot - name of the deployment slot. +// key - the key to create or update +func (client AppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecretSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -2688,38 +2689,39 @@ func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context 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("web.AppsClient", "CreateOrUpdatePublicCertificateSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecretSlot", err.Error()) } - req, err := client.CreateOrUpdatePublicCertificateSlotPreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, slot) + req, err := client.CreateOrUpdateHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot, key) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdatePublicCertificateSlotSender(req) + resp, err := client.CreateOrUpdateHostSecretSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdatePublicCertificateSlotResponder(resp) + result, err = client.CreateOrUpdateHostSecretSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure responding to request") } return } -// CreateOrUpdatePublicCertificateSlotPreparer prepares the CreateOrUpdatePublicCertificateSlot request. -func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (*http.Request, error) { +// CreateOrUpdateHostSecretSlotPreparer prepares the CreateOrUpdateHostSecretSlot request. +func (client AppsClient) CreateOrUpdateHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "keyName": autorest.Encode("path", keyName), + "keyType": autorest.Encode("path", keyType), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -2731,42 +2733,42 @@ func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), - autorest.WithJSON(publicCertificate), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters), + autorest.WithJSON(key), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdatePublicCertificateSlotSender sends the CreateOrUpdatePublicCertificateSlot request. The method will close the +// CreateOrUpdateHostSecretSlotSender sends the CreateOrUpdateHostSecretSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdatePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHostSecretSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot request. The method always +// CreateOrUpdateHostSecretSlotResponder handles the response to the CreateOrUpdateHostSecretSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdatePublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { +func (client AppsClient) CreateOrUpdateHostSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateRelayServiceConnection description for Creates a new hybrid connection configuration (PUT), or updates -// an existing one (PATCH). +// CreateOrUpdateHybridConnection description for Creates a new Hybrid Connection using a Service Bus relay. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection configuration. -// connectionEnvelope - details of the hybrid connection configuration. -func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +// connectionEnvelope - the details of the hybrid connection. +func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -2780,35 +2782,36 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Contex Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnection", err.Error()) } - req, err := client.CreateOrUpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope) + req, err := client.CreateOrUpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateRelayServiceConnectionSender(req) + resp, err := client.CreateOrUpdateHybridConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateRelayServiceConnectionResponder(resp) + result, err = client.CreateOrUpdateHybridConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure responding to request") } return } -// CreateOrUpdateRelayServiceConnectionPreparer prepares the CreateOrUpdateRelayServiceConnection request. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) { +// CreateOrUpdateHybridConnectionPreparer prepares the CreateOrUpdateHybridConnection request. +func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -2822,22 +2825,22 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx contex autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateRelayServiceConnectionSender sends the CreateOrUpdateRelayServiceConnection request. The method will close the +// CreateOrUpdateHybridConnectionSender sends the CreateOrUpdateHybridConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHybridConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateRelayServiceConnectionResponder handles the response to the CreateOrUpdateRelayServiceConnection request. The method always +// CreateOrUpdateHybridConnectionResponder handles the response to the CreateOrUpdateHybridConnection request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -2848,18 +2851,17 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *htt return } -// CreateOrUpdateRelayServiceConnectionSlot description for Creates a new hybrid connection configuration (PUT), or -// updates an existing one (PATCH). +// CreateOrUpdateHybridConnectionSlot description for Creates a new Hybrid Connection using a Service Bus relay. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection configuration. -// connectionEnvelope - details of the hybrid connection configuration. -// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid -// connection for the production slot. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +// connectionEnvelope - the details of the hybrid connection. +// slot - the name of the slot for the web app. +func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -2873,35 +2875,36 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Co 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("web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnectionSlot", err.Error()) } - req, err := client.CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot) + req, err := client.CreateOrUpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateRelayServiceConnectionSlotSender(req) + resp, err := client.CreateOrUpdateHybridConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateRelayServiceConnectionSlotResponder(resp) + result, err = client.CreateOrUpdateHybridConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateRelayServiceConnectionSlotPreparer prepares the CreateOrUpdateRelayServiceConnectionSlot request. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) { +// CreateOrUpdateHybridConnectionSlotPreparer prepares the CreateOrUpdateHybridConnectionSlot request. +func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -2916,22 +2919,22 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx co autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateRelayServiceConnectionSlotSender sends the CreateOrUpdateRelayServiceConnectionSlot request. The method will close the +// CreateOrUpdateHybridConnectionSlotSender sends the CreateOrUpdateHybridConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateRelayServiceConnectionSlotResponder handles the response to the CreateOrUpdateRelayServiceConnectionSlot request. The method always +// CreateOrUpdateHybridConnectionSlotResponder handles the response to the CreateOrUpdateHybridConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -2942,22 +2945,20 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp return } -// CreateOrUpdateSlot description for Creates a new web, mobile, or API app in an existing resource group, or updates -// an existing app. +// CreateOrUpdatePublicCertificate description for Creates a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot} -// parameter. -// siteEnvelope - a JSON representation of the app properties. See example. -// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify -// the production slot. -func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (result AppsCreateOrUpdateSlotFuture, err error) { +// name - name of the app. +// publicCertificateName - public certificate name. +// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate +// object. +func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (result PublicCertificate, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificate") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2966,47 +2967,38 @@ func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupNa {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: siteEnvelope, - Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, - }}, - {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "CreateOrUpdateSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificate", err.Error()) } - req, err := client.CreateOrUpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot) + req, err := client.CreateOrUpdatePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", nil, "Failure preparing request") return } - result, err = client.CreateOrUpdateSlotSender(req) + resp, err := client.CreateOrUpdatePublicCertificateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure sending request") return } + result, err = client.CreateOrUpdatePublicCertificateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure responding to request") + } + return } -// CreateOrUpdateSlotPreparer prepares the CreateOrUpdateSlot request. -func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (*http.Request, error) { +// CreateOrUpdatePublicCertificatePreparer prepares the CreateOrUpdatePublicCertificate request. +func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -3018,50 +3010,48 @@ func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourc autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), - autorest.WithJSON(siteEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithJSON(publicCertificate), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the +// CreateOrUpdatePublicCertificateSender sends the CreateOrUpdatePublicCertificate request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) { +func (client AppsClient) CreateOrUpdatePublicCertificateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateSlotResponder handles the response to the CreateOrUpdateSlot request. The method always +// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSlotResponder(resp *http.Response) (result Site, err error) { +func (client AppsClient) CreateOrUpdatePublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateSourceControl description for Updates the source control configuration of an app. +// CreateOrUpdatePublicCertificateSlot description for Creates a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// siteSourceControl - JSON representation of a SiteSourceControl object. See example. -func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result AppsCreateOrUpdateSourceControlFuture, err error) { +// publicCertificateName - public certificate name. +// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate +// object. +// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the +// production slot. +func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (result PublicCertificate, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControl") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificateSlot") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3071,30 +3061,38 @@ func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resour 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("web.AppsClient", "CreateOrUpdateSourceControl", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificateSlot", err.Error()) } - req, err := client.CreateOrUpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl) + req, err := client.CreateOrUpdatePublicCertificateSlotPreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", nil, "Failure preparing request") return } - result, err = client.CreateOrUpdateSourceControlSender(req) + resp, err := client.CreateOrUpdatePublicCertificateSlotSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure sending request") return } + result, err = client.CreateOrUpdatePublicCertificateSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure responding to request") + } + return } -// CreateOrUpdateSourceControlPreparer prepares the CreateOrUpdateSourceControl request. -func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) { +// CreateOrUpdatePublicCertificateSlotPreparer prepares the CreateOrUpdatePublicCertificateSlot request. +func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -3106,52 +3104,46 @@ func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), - autorest.WithJSON(siteSourceControl), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithJSON(publicCertificate), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the +// CreateOrUpdatePublicCertificateSlotSender sends the CreateOrUpdatePublicCertificateSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) { +func (client AppsClient) CreateOrUpdatePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateSourceControlResponder handles the response to the CreateOrUpdateSourceControl request. The method always +// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) { +func (client AppsClient) CreateOrUpdatePublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateSourceControlSlot description for Updates the source control configuration of an app. +// CreateOrUpdateRelayServiceConnection description for Creates a new hybrid connection configuration (PUT), or updates +// an existing one (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// siteSourceControl - JSON representation of a SiteSourceControl object. See example. -// slot - name of the deployment slot. If a slot is not specified, the API will update the source control -// configuration for the production slot. -func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result AppsCreateOrUpdateSourceControlSlotFuture, err error) { +// entityName - name of the hybrid connection configuration. +// connectionEnvelope - details of the hybrid connection configuration. +func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControlSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnection") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3161,30 +3153,36 @@ func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, re 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("web.AppsClient", "CreateOrUpdateSourceControlSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnection", err.Error()) } - req, err := client.CreateOrUpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot) + req, err := client.CreateOrUpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", nil, "Failure preparing request") return } - result, err = client.CreateOrUpdateSourceControlSlotSender(req) + resp, err := client.CreateOrUpdateRelayServiceConnectionSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure sending request") return } + result, err = client.CreateOrUpdateRelayServiceConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure responding to request") + } + return } -// CreateOrUpdateSourceControlSlotPreparer prepares the CreateOrUpdateSourceControlSlot request. -func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) { +// CreateOrUpdateRelayServiceConnectionPreparer prepares the CreateOrUpdateRelayServiceConnection request. +func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -3197,49 +3195,44 @@ func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Con autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), - autorest.WithJSON(siteSourceControl), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the +// CreateOrUpdateRelayServiceConnectionSender sends the CreateOrUpdateRelayServiceConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) { +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateSourceControlSlotResponder handles the response to the CreateOrUpdateSourceControlSlot request. The method always +// CreateOrUpdateRelayServiceConnectionResponder handles the response to the CreateOrUpdateRelayServiceConnection request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) { +func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateSwiftVirtualNetworkConnection description for Integrates this Web App with a Virtual Network. This -// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has -// already been delegated, and is not -// in use by another App Service Plan other than the one this App is in. +// CreateOrUpdateRelayServiceConnectionSlot description for Creates a new hybrid connection configuration (PUT), or +// updates an existing one (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// connectionEnvelope - properties of the Virtual Network connection. See example. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) { +// entityName - name of the hybrid connection configuration. +// connectionEnvelope - details of the hybrid connection configuration. +// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid +// connection for the production slot. +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -3253,35 +3246,37 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnection(ctx context 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("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", err.Error()) } - req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name, connectionEnvelope) + req, err := client.CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSender(req) + resp, err := client.CreateOrUpdateRelayServiceConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp) + result, err = client.CreateOrUpdateRelayServiceConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateSwiftVirtualNetworkConnectionPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnection request. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) { +// CreateOrUpdateRelayServiceConnectionSlotPreparer prepares the CreateOrUpdateRelayServiceConnectionSlot request. +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -3294,22 +3289,22 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSwiftVirtualNetworkConnectionSender sends the CreateOrUpdateSwiftVirtualNetworkConnection request. The method will close the +// CreateOrUpdateRelayServiceConnectionSlotSender sends the CreateOrUpdateRelayServiceConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateSwiftVirtualNetworkConnectionResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnection request. The method always +// CreateOrUpdateRelayServiceConnectionSlotResponder handles the response to the CreateOrUpdateRelayServiceConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -3320,23 +3315,22 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(re return } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlot description for Integrates this Web App with a Virtual Network. This -// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has -// already been delegated, and is not -// in use by another App Service Plan other than the one this App is in. +// CreateOrUpdateSlot description for Creates a new web, mobile, or API app in an existing resource group, or updates +// an existing app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// connectionEnvelope - properties of the Virtual Network connection. See example. -// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for +// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot} +// parameter. +// siteEnvelope - a JSON representation of the app properties. See example. +// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify // the production slot. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (result AppsCreateOrUpdateSlotFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3345,33 +3339,42 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlot(ctx con {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("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: siteEnvelope, + Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSlot", err.Error()) } - req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot) + req, err := client.CreateOrUpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req) + result, err = client.CreateOrUpdateSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request") - } - return } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) { +// CreateOrUpdateSlotPreparer prepares the CreateOrUpdateSlot request. +func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -3388,46 +3391,50 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), + autorest.WithJSON(siteEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender sends the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method will close the +// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method always +// CreateOrUpdateSlotResponder handles the response to the CreateOrUpdateSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) CreateOrUpdateSlotResponder(resp *http.Response) (result Site, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateVnetConnection description for Adds a Virtual Network connection to an app or slot (PUT) or updates -// the connection properties (PATCH). +// CreateOrUpdateSourceControl description for Updates the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of an existing Virtual Network. -// connectionEnvelope - properties of the Virtual Network connection. See example. -func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) { +// siteSourceControl - JSON representation of a SiteSourceControl object. See example. +func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result AppsCreateOrUpdateSourceControlFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControl") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3437,37 +3444,30 @@ func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resou 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("web.AppsClient", "CreateOrUpdateVnetConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControl", err.Error()) } - req, err := client.CreateOrUpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope) + req, err := client.CreateOrUpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateVnetConnectionSender(req) + result, err = client.CreateOrUpdateSourceControlSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateVnetConnectionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure responding to request") - } - return } -// CreateOrUpdateVnetConnectionPreparer prepares the CreateOrUpdateVnetConnection request. -func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) { +// CreateOrUpdateSourceControlPreparer prepares the CreateOrUpdateSourceControl request. +func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3479,47 +3479,52 @@ func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Contex autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), + autorest.WithJSON(siteSourceControl), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateVnetConnectionSender sends the CreateOrUpdateVnetConnection request. The method will close the +// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateVnetConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } -// CreateOrUpdateVnetConnectionResponder handles the response to the CreateOrUpdateVnetConnection request. The method always +// CreateOrUpdateSourceControlResponder handles the response to the CreateOrUpdateSourceControl request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) { +func (client AppsClient) CreateOrUpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateVnetConnectionGateway description for Adds a gateway to a connected Virtual Network (PUT) or updates -// it (PATCH). +// CreateOrUpdateSourceControlSlot description for Updates the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the Virtual Network. -// gatewayName - name of the gateway. Currently, the only supported string is "primary". -// connectionEnvelope - the properties to update this gateway with. -func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) { +// siteSourceControl - JSON representation of a SiteSourceControl object. See example. +// slot - name of the deployment slot. If a slot is not specified, the API will update the source control +// configuration for the production slot. +func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result AppsCreateOrUpdateSourceControlSlotFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGateway") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControlSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3528,42 +3533,32 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context {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: connectionEnvelope, - Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGateway", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControlSlot", err.Error()) } - req, err := client.CreateOrUpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + req, err := client.CreateOrUpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateVnetConnectionGatewaySender(req) + result, err = client.CreateOrUpdateSourceControlSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateVnetConnectionGatewayResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure responding to request") - } - return } -// CreateOrUpdateVnetConnectionGatewayPreparer prepares the CreateOrUpdateVnetConnectionGateway request. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) { +// CreateOrUpdateSourceControlSlotPreparer prepares the CreateOrUpdateSourceControlSlot request. +func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3575,45 +3570,49 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), + autorest.WithJSON(siteSourceControl), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateVnetConnectionGatewaySender sends the CreateOrUpdateVnetConnectionGateway request. The method will close the +// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } -// CreateOrUpdateVnetConnectionGatewayResponder handles the response to the CreateOrUpdateVnetConnectionGateway request. The method always +// CreateOrUpdateSourceControlSlotResponder handles the response to the CreateOrUpdateSourceControlSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) { +func (client AppsClient) CreateOrUpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateVnetConnectionGatewaySlot description for Adds a gateway to a connected Virtual Network (PUT) or -// updates it (PATCH). +// CreateOrUpdateSwiftVirtualNetworkConnection description for Integrates this Web App with a Virtual Network. This +// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has +// already been delegated, and is not +// in use by another App Service Plan other than the one this App is in. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the Virtual Network. -// gatewayName - name of the gateway. Currently, the only supported string is "primary". -// connectionEnvelope - the properties to update this gateway with. -// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the -// production slot's Virtual Network. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) { +// connectionEnvelope - properties of the Virtual Network connection. See example. +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGatewaySlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -3626,43 +3625,37 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Con {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: connectionEnvelope, - Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", err.Error()) } - req, err := client.CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot) + req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateVnetConnectionGatewaySlotSender(req) + resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateVnetConnectionGatewaySlotResponder(resp) + result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure responding to request") } return } -// CreateOrUpdateVnetConnectionGatewaySlotPreparer prepares the CreateOrUpdateVnetConnectionGatewaySlot request. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) { +// CreateOrUpdateSwiftVirtualNetworkConnectionPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnection request. +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) { pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3674,22 +3667,22 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx con autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateVnetConnectionGatewaySlotSender sends the CreateOrUpdateVnetConnectionGatewaySlot request. The method will close the +// CreateOrUpdateSwiftVirtualNetworkConnectionSender sends the CreateOrUpdateSwiftVirtualNetworkConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateVnetConnectionGatewaySlotResponder handles the response to the CreateOrUpdateVnetConnectionGatewaySlot request. The method always +// CreateOrUpdateSwiftVirtualNetworkConnectionResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnection request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -3700,18 +3693,19 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp * return } -// CreateOrUpdateVnetConnectionSlot description for Adds a Virtual Network connection to an app or slot (PUT) or -// updates the connection properties (PATCH). +// CreateOrUpdateSwiftVirtualNetworkConnectionSlot description for Integrates this Web App with a Virtual Network. This +// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has +// already been delegated, and is not +// in use by another App Service Plan other than the one this App is in. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of an existing Virtual Network. // connectionEnvelope - properties of the Virtual Network connection. See example. // slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for // the production slot. -func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -3725,38 +3719,37 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, r 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("web.AppsClient", "CreateOrUpdateVnetConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", err.Error()) } - req, err := client.CreateOrUpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot) + req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateVnetConnectionSlotSender(req) + resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateVnetConnectionSlotResponder(resp) + result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateVnetConnectionSlotPreparer prepares the CreateOrUpdateVnetConnectionSlot request. -func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) { +// CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3768,22 +3761,22 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Co autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateVnetConnectionSlotSender sends the CreateOrUpdateVnetConnectionSlot request. The method will close the +// CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender sends the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateVnetConnectionSlotResponder handles the response to the CreateOrUpdateVnetConnectionSlot request. The method always +// CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -3794,20 +3787,20 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Re return } -// Delete description for Deletes a web, mobile, or API app, or one of the deployment slots. +// CreateOrUpdateVnetConnection description for Adds a Virtual Network connection to an app or slot (PUT) or updates +// the connection properties (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app to delete. -// deleteMetrics - if true, web app metrics are also deleted. -// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App -// Service plan is deleted. -func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { +// name - name of the app. +// vnetName - name of an existing Virtual Network. +// connectionEnvelope - properties of the Virtual Network connection. See example. +func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnection") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3817,88 +3810,89 @@ func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, n 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("web.AppsClient", "Delete", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnection", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm) + req, err := client.CreateOrUpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", nil, "Failure preparing request") return } - resp, err := client.DeleteSender(req) + resp, err := client.CreateOrUpdateVnetConnectionSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure sending request") return } - result, err = client.DeleteResponder(resp) + result, err = client.CreateOrUpdateVnetConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure responding to request") } return } -// DeletePreparer prepares the Delete request. -func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) { +// CreateOrUpdateVnetConnectionPreparer prepares the CreateOrUpdateVnetConnection request. +func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if deleteMetrics != nil { - queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics) - } - if deleteEmptyServerFarm != nil { - queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm) - } preparer := autorest.CreatePreparer( - autorest.AsDelete(), + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSender sends the Delete request. The method will close the +// CreateOrUpdateVnetConnectionSender sends the CreateOrUpdateVnetConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateVnetConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteResponder handles the response to the Delete request. The method always +// CreateOrUpdateVnetConnectionResponder handles the response to the CreateOrUpdateVnetConnection request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) CreateOrUpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } -// DeleteBackup description for Deletes a backup of an app by its ID. +// CreateOrUpdateVnetConnectionGateway description for Adds a gateway to a connected Virtual Network (PUT) or updates +// it (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// backupID - ID of the backup. -func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string) (result autorest.Response, err error) { +// vnetName - name of the Virtual Network. +// gatewayName - name of the gateway. Currently, the only supported string is "primary". +// connectionEnvelope - the properties to update this gateway with. +func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackup") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGateway") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3907,38 +3901,42 @@ func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName str {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("web.AppsClient", "DeleteBackup", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: connectionEnvelope, + Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGateway", err.Error()) } - req, err := client.DeleteBackupPreparer(ctx, resourceGroupName, name, backupID) + req, err := client.CreateOrUpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", nil, "Failure preparing request") return } - resp, err := client.DeleteBackupSender(req) + resp, err := client.CreateOrUpdateVnetConnectionGatewaySender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure sending request") return } - result, err = client.DeleteBackupResponder(resp) + result, err = client.CreateOrUpdateVnetConnectionGatewayResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure responding to request") } return } -// DeleteBackupPreparer prepares the DeleteBackup request. -func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) { +// CreateOrUpdateVnetConnectionGatewayPreparer prepares the CreateOrUpdateVnetConnectionGateway request. +func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), + "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3947,43 +3945,52 @@ func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroup } preparer := autorest.CreatePreparer( - autorest.AsDelete(), + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteBackupSender sends the DeleteBackup request. The method will close the +// CreateOrUpdateVnetConnectionGatewaySender sends the CreateOrUpdateVnetConnectionGateway request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteBackupSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteBackupResponder handles the response to the DeleteBackup request. The method always +// CreateOrUpdateVnetConnectionGatewayResponder handles the response to the CreateOrUpdateVnetConnectionGateway request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteBackupResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) CreateOrUpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } -// DeleteBackupConfiguration description for Deletes the backup configuration of an app. +// CreateOrUpdateVnetConnectionGatewaySlot description for Adds a gateway to a connected Virtual Network (PUT) or +// updates it (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +// vnetName - name of the Virtual Network. +// gatewayName - name of the gateway. Currently, the only supported string is "primary". +// connectionEnvelope - the properties to update this gateway with. +// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the +// production slot's Virtual Network. +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfiguration") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGatewaySlot") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3992,37 +3999,43 @@ func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resource {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("web.AppsClient", "DeleteBackupConfiguration", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: connectionEnvelope, + Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", err.Error()) } - req, err := client.DeleteBackupConfigurationPreparer(ctx, resourceGroupName, name) + req, err := client.CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", nil, "Failure preparing request") return } - resp, err := client.DeleteBackupConfigurationSender(req) + resp, err := client.CreateOrUpdateVnetConnectionGatewaySlotSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure sending request") - return + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure sending request") + return } - result, err = client.DeleteBackupConfigurationResponder(resp) + result, err = client.CreateOrUpdateVnetConnectionGatewaySlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure responding to request") } return } -// DeleteBackupConfigurationPreparer prepares the DeleteBackupConfiguration request. -func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// CreateOrUpdateVnetConnectionGatewaySlotPreparer prepares the CreateOrUpdateVnetConnectionGatewaySlot request. +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -4031,45 +4044,51 @@ func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, } preparer := autorest.CreatePreparer( - autorest.AsDelete(), + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteBackupConfigurationSender sends the DeleteBackupConfiguration request. The method will close the +// CreateOrUpdateVnetConnectionGatewaySlotSender sends the CreateOrUpdateVnetConnectionGatewaySlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteBackupConfigurationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteBackupConfigurationResponder handles the response to the DeleteBackupConfiguration request. The method always +// CreateOrUpdateVnetConnectionGatewaySlotResponder handles the response to the CreateOrUpdateVnetConnectionGatewaySlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteBackupConfigurationResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } -// DeleteBackupConfigurationSlot description for Deletes the backup configuration of an app. +// CreateOrUpdateVnetConnectionSlot description for Adds a Virtual Network connection to an app or slot (PUT) or +// updates the connection properties (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the backup configuration -// for the production slot. -func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +// vnetName - name of an existing Virtual Network. +// connectionEnvelope - properties of the Virtual Network connection. See example. +// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for +// the production slot. +func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionSlot") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -4079,37 +4098,38 @@ func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, reso 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("web.AppsClient", "DeleteBackupConfigurationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionSlot", err.Error()) } - req, err := client.DeleteBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.CreateOrUpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteBackupConfigurationSlotSender(req) + resp, err := client.CreateOrUpdateVnetConnectionSlotSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure sending request") return } - result, err = client.DeleteBackupConfigurationSlotResponder(resp) + result, err = client.CreateOrUpdateVnetConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure responding to request") } return } -// DeleteBackupConfigurationSlotPreparer prepares the DeleteBackupConfigurationSlot request. -func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// CreateOrUpdateVnetConnectionSlotPreparer prepares the CreateOrUpdateVnetConnectionSlot request. +func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -4118,42 +4138,45 @@ func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Conte } preparer := autorest.CreatePreparer( - autorest.AsDelete(), + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteBackupConfigurationSlotSender sends the DeleteBackupConfigurationSlot request. The method will close the +// CreateOrUpdateVnetConnectionSlotSender sends the CreateOrUpdateVnetConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteBackupConfigurationSlotResponder handles the response to the DeleteBackupConfigurationSlot request. The method always +// CreateOrUpdateVnetConnectionSlotResponder handles the response to the CreateOrUpdateVnetConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteBackupConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } -// DeleteBackupSlot description for Deletes a backup of an app by its ID. +// Delete description for Deletes a web, mobile, or API app, or one of the deployment slots. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// backupID - ID of the backup. -// slot - name of the deployment slot. If a slot is not specified, the API will delete a backup of the -// production slot. -func (client AppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result autorest.Response, err error) { +// name - name of the app to delete. +// deleteMetrics - if true, web app metrics are also deleted. +// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App +// Service plan is deleted. +func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete") defer func() { sc := -1 if result.Response != nil { @@ -4167,37 +4190,35 @@ func (client AppsClient) DeleteBackupSlot(ctx context.Context, 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("web.AppsClient", "DeleteBackupSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "Delete", err.Error()) } - req, err := client.DeleteBackupSlotPreparer(ctx, resourceGroupName, name, backupID, slot) + req, err := client.DeletePreparer(ctx, resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", nil, "Failure preparing request") return } - resp, err := client.DeleteBackupSlotSender(req) + resp, err := client.DeleteSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure sending request") return } - result, err = client.DeleteBackupSlotResponder(resp) + result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure responding to request") } return } -// DeleteBackupSlotPreparer prepares the DeleteBackupSlot request. -func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) { +// DeletePreparer prepares the Delete request. +func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -4205,42 +4226,48 @@ func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceG queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if deleteMetrics != nil { + queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics) + } + if deleteEmptyServerFarm != nil { + queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteBackupSlotSender sends the DeleteBackupSlot request. The method will close the +// DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteBackupSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteBackupSlotResponder handles the response to the DeleteBackupSlot request. The method always +// DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteBackupSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteContinuousWebJob description for Delete a continuous web job by its ID for an app, or a deployment slot. +// DeleteBackup description for Deletes a backup of an app by its ID. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) { +// name - name of the app. +// backupID - ID of the backup. +func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackup") defer func() { sc := -1 if result.Response != nil { @@ -4254,37 +4281,37 @@ func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGro 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("web.AppsClient", "DeleteContinuousWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteBackup", err.Error()) } - req, err := client.DeleteContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.DeleteBackupPreparer(ctx, resourceGroupName, name, backupID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", nil, "Failure preparing request") return } - resp, err := client.DeleteContinuousWebJobSender(req) + resp, err := client.DeleteBackupSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure sending request") return } - result, err = client.DeleteContinuousWebJobResponder(resp) + result, err = client.DeleteBackupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure responding to request") } return } -// DeleteContinuousWebJobPreparer prepares the DeleteContinuousWebJob request. -func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// DeleteBackupPreparer prepares the DeleteBackup request. +func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -4295,40 +4322,37 @@ func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteContinuousWebJobSender sends the DeleteContinuousWebJob request. The method will close the +// DeleteBackupSender sends the DeleteBackup request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteContinuousWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteBackupSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob request. The method always +// DeleteBackupResponder handles the response to the DeleteBackup request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteContinuousWebJobSlot description for Delete a continuous web job by its ID for an app, or a deployment slot. +// DeleteBackupConfiguration description for Deletes the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the -// production slot. -func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) { +// name - name of the app. +func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfiguration") defer func() { sc := -1 if result.Response != nil { @@ -4342,38 +4366,36 @@ func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourc 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("web.AppsClient", "DeleteContinuousWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteBackupConfiguration", err.Error()) } - req, err := client.DeleteContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.DeleteBackupConfigurationPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", nil, "Failure preparing request") return } - resp, err := client.DeleteContinuousWebJobSlotSender(req) + resp, err := client.DeleteBackupConfigurationSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure sending request") return } - result, err = client.DeleteContinuousWebJobSlotResponder(resp) + result, err = client.DeleteBackupConfigurationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure responding to request") } return } -// DeleteContinuousWebJobSlotPreparer prepares the DeleteContinuousWebJobSlot request. -func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// DeleteBackupConfigurationPreparer prepares the DeleteBackupConfiguration request. +func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -4384,38 +4406,39 @@ func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteContinuousWebJobSlotSender sends the DeleteContinuousWebJobSlot request. The method will close the +// DeleteBackupConfigurationSender sends the DeleteBackupConfiguration request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteBackupConfigurationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot request. The method always +// DeleteBackupConfigurationResponder handles the response to the DeleteBackupConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupConfigurationResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } -// DeleteDeployment description for Delete a deployment by its ID for an app, or a deployment slot. +// DeleteBackupConfigurationSlot description for Deletes the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - deployment ID. -func (client AppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result autorest.Response, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the backup configuration +// for the production slot. +func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeployment") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfigurationSlot") defer func() { sc := -1 if result.Response != nil { @@ -4429,36 +4452,36 @@ func (client AppsClient) DeleteDeployment(ctx context.Context, 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("web.AppsClient", "DeleteDeployment", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteBackupConfigurationSlot", err.Error()) } - req, err := client.DeleteDeploymentPreparer(ctx, resourceGroupName, name, ID) + req, err := client.DeleteBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteDeploymentSender(req) + resp, err := client.DeleteBackupConfigurationSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure sending request") return } - result, err = client.DeleteDeploymentResponder(resp) + result, err = client.DeleteBackupConfigurationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure responding to request") } return } -// DeleteDeploymentPreparer prepares the DeleteDeployment request. -func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { +// DeleteBackupConfigurationSlotPreparer prepares the DeleteBackupConfigurationSlot request. +func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -4470,40 +4493,40 @@ func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteDeploymentSender sends the DeleteDeployment request. The method will close the +// DeleteBackupConfigurationSlotSender sends the DeleteBackupConfigurationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteDeploymentSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteDeploymentResponder handles the response to the DeleteDeployment request. The method always +// DeleteBackupConfigurationSlotResponder handles the response to the DeleteBackupConfigurationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteDeploymentResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } -// DeleteDeploymentSlot description for Delete a deployment by its ID for an app, or a deployment slot. +// DeleteBackupSlot description for Deletes a backup of an app by its ID. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - deployment ID. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// backupID - ID of the backup. +// slot - name of the deployment slot. If a slot is not specified, the API will delete a backup of the // production slot. -func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeploymentSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupSlot") defer func() { sc := -1 if result.Response != nil { @@ -4517,34 +4540,34 @@ func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroup 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("web.AppsClient", "DeleteDeploymentSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteBackupSlot", err.Error()) } - req, err := client.DeleteDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot) + req, err := client.DeleteBackupSlotPreparer(ctx, resourceGroupName, name, backupID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteDeploymentSlotSender(req) + resp, err := client.DeleteBackupSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure sending request") return } - result, err = client.DeleteDeploymentSlotResponder(resp) + result, err = client.DeleteBackupSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure responding to request") } return } -// DeleteDeploymentSlotPreparer prepares the DeleteDeploymentSlot request. -func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { +// DeleteBackupSlotPreparer prepares the DeleteBackupSlot request. +func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), + "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -4559,38 +4582,38 @@ func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteDeploymentSlotSender sends the DeleteDeploymentSlot request. The method will close the +// DeleteBackupSlotSender sends the DeleteBackupSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteDeploymentSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteBackupSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteDeploymentSlotResponder handles the response to the DeleteDeploymentSlot request. The method always +// DeleteBackupSlotResponder handles the response to the DeleteBackupSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteDeploymentSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteDomainOwnershipIdentifier description for Deletes a domain ownership identifier for a web app. +// DeleteContinuousWebJob description for Delete a continuous web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// domainOwnershipIdentifierName - name of domain ownership identifier. -func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) { +// name - site name. +// webJobName - name of Web Job. +func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifier") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJob") defer func() { sc := -1 if result.Response != nil { @@ -4604,37 +4627,37 @@ func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, re 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("web.AppsClient", "DeleteDomainOwnershipIdentifier", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJob", err.Error()) } - req, err := client.DeleteDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName) + req, err := client.DeleteContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", nil, "Failure preparing request") return } - resp, err := client.DeleteDomainOwnershipIdentifierSender(req) + resp, err := client.DeleteContinuousWebJobSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure sending request") return } - result, err = client.DeleteDomainOwnershipIdentifierResponder(resp) + result, err = client.DeleteContinuousWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure responding to request") } return } -// DeleteDomainOwnershipIdentifierPreparer prepares the DeleteDomainOwnershipIdentifier request. -func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) { +// DeleteContinuousWebJobPreparer prepares the DeleteContinuousWebJob request. +func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -4645,21 +4668,21 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteDomainOwnershipIdentifierSender sends the DeleteDomainOwnershipIdentifier request. The method will close the +// DeleteContinuousWebJobSender sends the DeleteContinuousWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteContinuousWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteDomainOwnershipIdentifierResponder handles the response to the DeleteDomainOwnershipIdentifier request. The method always +// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4669,16 +4692,16 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Res return } -// DeleteDomainOwnershipIdentifierSlot description for Deletes a domain ownership identifier for a web app. +// DeleteContinuousWebJobSlot description for Delete a continuous web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// domainOwnershipIdentifierName - name of domain ownership identifier. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// name - site name. +// webJobName - name of Web Job. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the // production slot. -func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) { +func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifierSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJobSlot") defer func() { sc := -1 if result.Response != nil { @@ -4692,38 +4715,38 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context 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("web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJobSlot", err.Error()) } - req, err := client.DeleteDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot) + req, err := client.DeleteContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteDomainOwnershipIdentifierSlotSender(req) + resp, err := client.DeleteContinuousWebJobSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure sending request") return } - result, err = client.DeleteDomainOwnershipIdentifierSlotResponder(resp) + result, err = client.DeleteContinuousWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure responding to request") } return } -// DeleteDomainOwnershipIdentifierSlotPreparer prepares the DeleteDomainOwnershipIdentifierSlot request. -func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) { +// DeleteContinuousWebJobSlotPreparer prepares the DeleteContinuousWebJobSlot request. +func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -4734,21 +4757,21 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteDomainOwnershipIdentifierSlotSender sends the DeleteDomainOwnershipIdentifierSlot request. The method will close the +// DeleteContinuousWebJobSlotSender sends the DeleteContinuousWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteDomainOwnershipIdentifierSlotResponder handles the response to the DeleteDomainOwnershipIdentifierSlot request. The method always +// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4758,14 +4781,14 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http return } -// DeleteFunction description for Delete a function for web site, or a deployment slot. +// DeleteDeployment description for Delete a deployment by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// functionName - function name. -func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) { +// name - name of the app. +// ID - deployment ID. +func (client AppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunction") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeployment") defer func() { sc := -1 if result.Response != nil { @@ -4779,34 +4802,34 @@ func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName s 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("web.AppsClient", "DeleteFunction", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteDeployment", err.Error()) } - req, err := client.DeleteFunctionPreparer(ctx, resourceGroupName, name, functionName) + req, err := client.DeleteDeploymentPreparer(ctx, resourceGroupName, name, ID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", nil, "Failure preparing request") return } - resp, err := client.DeleteFunctionSender(req) + resp, err := client.DeleteDeploymentSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure sending request") return } - result, err = client.DeleteFunctionResponder(resp) + result, err = client.DeleteDeploymentResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure responding to request") } return } -// DeleteFunctionPreparer prepares the DeleteFunction request. -func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { +// DeleteDeploymentPreparer prepares the DeleteDeployment request. +func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -4820,38 +4843,40 @@ func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteFunctionSender sends the DeleteFunction request. The method will close the +// DeleteDeploymentSender sends the DeleteDeployment request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteFunctionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteDeploymentSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteFunctionResponder handles the response to the DeleteFunction request. The method always +// DeleteDeploymentResponder handles the response to the DeleteDeployment request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteFunctionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteDeploymentResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeleteHostNameBinding description for Deletes a hostname binding for an app. +// DeleteDeploymentSlot description for Delete a deployment by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// hostName - hostname in the hostname binding. -func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) { +// ID - deployment ID. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBinding") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeploymentSlot") defer func() { sc := -1 if result.Response != nil { @@ -4865,36 +4890,37 @@ func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGrou 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("web.AppsClient", "DeleteHostNameBinding", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteDeploymentSlot", err.Error()) } - req, err := client.DeleteHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) + req, err := client.DeleteDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteHostNameBindingSender(req) + resp, err := client.DeleteDeploymentSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure sending request") return } - result, err = client.DeleteHostNameBindingResponder(resp) + result, err = client.DeleteDeploymentSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure responding to request") } return } -// DeleteHostNameBindingPreparer prepares the DeleteHostNameBinding request. -func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) { +// DeleteDeploymentSlotPreparer prepares the DeleteDeploymentSlot request. +func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -4906,21 +4932,21 @@ func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteHostNameBindingSender sends the DeleteHostNameBinding request. The method will close the +// DeleteDeploymentSlotSender sends the DeleteDeploymentSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteHostNameBindingSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteDeploymentSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteHostNameBindingResponder handles the response to the DeleteHostNameBinding request. The method always +// DeleteDeploymentSlotResponder handles the response to the DeleteDeploymentSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteDeploymentSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4930,16 +4956,14 @@ func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (re return } -// DeleteHostNameBindingSlot description for Deletes a hostname binding for an app. +// DeleteDomainOwnershipIdentifier description for Deletes a domain ownership identifier for a web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the -// production slot. -// hostName - hostname in the hostname binding. -func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) { +// domainOwnershipIdentifierName - name of domain ownership identifier. +func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBindingSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifier") defer func() { sc := -1 if result.Response != nil { @@ -4953,38 +4977,37 @@ func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resource 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("web.AppsClient", "DeleteHostNameBindingSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifier", err.Error()) } - req, err := client.DeleteHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) + req, err := client.DeleteDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", nil, "Failure preparing request") return } - resp, err := client.DeleteHostNameBindingSlotSender(req) + resp, err := client.DeleteDomainOwnershipIdentifierSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure sending request") return } - result, err = client.DeleteHostNameBindingSlotResponder(resp) + result, err = client.DeleteDomainOwnershipIdentifierResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure responding to request") } return } -// DeleteHostNameBindingSlotPreparer prepares the DeleteHostNameBindingSlot request. -func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), +// DeleteDomainOwnershipIdentifierPreparer prepares the DeleteDomainOwnershipIdentifier request. +func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -4995,21 +5018,21 @@ func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteHostNameBindingSlotSender sends the DeleteHostNameBindingSlot request. The method will close the +// DeleteDomainOwnershipIdentifierSender sends the DeleteDomainOwnershipIdentifier request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteHostNameBindingSlotResponder handles the response to the DeleteHostNameBindingSlot request. The method always +// DeleteDomainOwnershipIdentifierResponder handles the response to the DeleteDomainOwnershipIdentifier request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5019,15 +5042,16 @@ func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) return } -// DeleteHybridConnection description for Removes a Hybrid Connection from this site. +// DeleteDomainOwnershipIdentifierSlot description for Deletes a domain ownership identifier for a web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) { +// name - name of the app. +// domainOwnershipIdentifierName - name of domain ownership identifier. +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifierSlot") defer func() { sc := -1 if result.Response != nil { @@ -5041,38 +5065,38 @@ func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGro 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("web.AppsClient", "DeleteHybridConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", err.Error()) } - req, err := client.DeleteHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) + req, err := client.DeleteDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteHybridConnectionSender(req) + resp, err := client.DeleteDomainOwnershipIdentifierSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure sending request") return } - result, err = client.DeleteHybridConnectionResponder(resp) + result, err = client.DeleteDomainOwnershipIdentifierSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure responding to request") } return } -// DeleteHybridConnectionPreparer prepares the DeleteHybridConnection request. -func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) { +// DeleteDomainOwnershipIdentifierSlotPreparer prepares the DeleteDomainOwnershipIdentifierSlot request. +func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -5083,40 +5107,38 @@ func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteHybridConnectionSender sends the DeleteHybridConnection request. The method will close the +// DeleteDomainOwnershipIdentifierSlotSender sends the DeleteDomainOwnershipIdentifierSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteHybridConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteHybridConnectionResponder handles the response to the DeleteHybridConnection request. The method always +// DeleteDomainOwnershipIdentifierSlotResponder handles the response to the DeleteDomainOwnershipIdentifierSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteHybridConnectionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeleteHybridConnectionSlot description for Removes a Hybrid Connection from this site. +// DeleteFunction description for Delete a function for web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -// slot - the name of the slot for the web app. -func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) { +// name - site name. +// functionName - function name. +func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunction") defer func() { sc := -1 if result.Response != nil { @@ -5130,38 +5152,36 @@ func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourc 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("web.AppsClient", "DeleteHybridConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteFunction", err.Error()) } - req, err := client.DeleteHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) + req, err := client.DeleteFunctionPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", nil, "Failure preparing request") return } - resp, err := client.DeleteHybridConnectionSlotSender(req) + resp, err := client.DeleteFunctionSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure sending request") return } - result, err = client.DeleteHybridConnectionSlotResponder(resp) + result, err = client.DeleteFunctionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure responding to request") } return } -// DeleteHybridConnectionSlotPreparer prepares the DeleteHybridConnectionSlot request. -func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) { +// DeleteFunctionPreparer prepares the DeleteFunction request. +func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5173,39 +5193,39 @@ func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteHybridConnectionSlotSender sends the DeleteHybridConnectionSlot request. The method will close the +// DeleteFunctionSender sends the DeleteFunction request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteFunctionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteHybridConnectionSlotResponder handles the response to the DeleteHybridConnectionSlot request. The method always +// DeleteFunctionResponder handles the response to the DeleteFunction request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteHybridConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteFunctionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteInstanceFunctionSlot description for Delete a function for web site, or a deployment slot. +// DeleteFunctionSecret description for Delete a function secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// functionName - function name. -// slot - name of the deployment slot. -func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) { +// functionName - the name of the function. +// keyName - the name of the key. +func (client AppsClient) DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceFunctionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecret") defer func() { sc := -1 if result.Response != nil { @@ -5219,37 +5239,37 @@ func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourc 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("web.AppsClient", "DeleteInstanceFunctionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteFunctionSecret", err.Error()) } - req, err := client.DeleteInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) + req, err := client.DeleteFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", nil, "Failure preparing request") return } - resp, err := client.DeleteInstanceFunctionSlotSender(req) + resp, err := client.DeleteFunctionSecretSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure sending request") return } - result, err = client.DeleteInstanceFunctionSlotResponder(resp) + result, err = client.DeleteFunctionSecretResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure responding to request") } return } -// DeleteInstanceFunctionSlotPreparer prepares the DeleteInstanceFunctionSlot request. -func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { +// DeleteFunctionSecretPreparer prepares the DeleteFunctionSecret request. +func (client AppsClient) DeleteFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "functionName": autorest.Encode("path", functionName), + "keyName": autorest.Encode("path", keyName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5261,21 +5281,21 @@ func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteInstanceFunctionSlotSender sends the DeleteInstanceFunctionSlot request. The method will close the +// DeleteFunctionSecretSender sends the DeleteFunctionSecret request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteFunctionSecretSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot request. The method always +// DeleteFunctionSecretResponder handles the response to the DeleteFunctionSecret request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteFunctionSecretResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5285,17 +5305,16 @@ func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response return } -// DeleteInstanceProcess description for Terminate a process by its ID for a web site, or a deployment slot, or -// specific scaled-out instance in a web site. +// DeleteFunctionSecretSlot description for Delete a function secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// processID - pID. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result autorest.Response, err error) { +// functionName - the name of the function. +// keyName - the name of the key. +// slot - name of the deployment slot. +func (client AppsClient) DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecretSlot") defer func() { sc := -1 if result.Response != nil { @@ -5309,37 +5328,38 @@ func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGrou 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("web.AppsClient", "DeleteInstanceProcess", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteFunctionSecretSlot", err.Error()) } - req, err := client.DeleteInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) + req, err := client.DeleteFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteInstanceProcessSender(req) + resp, err := client.DeleteFunctionSecretSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure sending request") return } - result, err = client.DeleteInstanceProcessResponder(resp) + result, err = client.DeleteFunctionSecretSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure responding to request") } return } -// DeleteInstanceProcessPreparer prepares the DeleteInstanceProcess request. -func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { +// DeleteFunctionSecretSlotPreparer prepares the DeleteFunctionSecretSlot request. +func (client AppsClient) DeleteFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "functionName": autorest.Encode("path", functionName), + "keyName": autorest.Encode("path", keyName), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5351,21 +5371,21 @@ func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteInstanceProcessSender sends the DeleteInstanceProcess request. The method will close the +// DeleteFunctionSecretSlotSender sends the DeleteFunctionSecretSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteInstanceProcessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteFunctionSecretSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess request. The method always +// DeleteFunctionSecretSlotResponder handles the response to the DeleteFunctionSecretSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteFunctionSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5375,19 +5395,14 @@ func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (re return } -// DeleteInstanceProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or -// specific scaled-out instance in a web site. +// DeleteHostNameBinding description for Deletes a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result autorest.Response, err error) { +// name - name of the app. +// hostName - hostname in the hostname binding. +func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBinding") defer func() { sc := -1 if result.Response != nil { @@ -5401,38 +5416,36 @@ func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resource 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("web.AppsClient", "DeleteInstanceProcessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHostNameBinding", err.Error()) } - req, err := client.DeleteInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) + req, err := client.DeleteHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", nil, "Failure preparing request") return } - resp, err := client.DeleteInstanceProcessSlotSender(req) + resp, err := client.DeleteHostNameBindingSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure sending request") return } - result, err = client.DeleteInstanceProcessSlotResponder(resp) + result, err = client.DeleteHostNameBindingResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure responding to request") } return } -// DeleteInstanceProcessSlotPreparer prepares the DeleteInstanceProcessSlot request. -func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { +// DeleteHostNameBindingPreparer prepares the DeleteHostNameBinding request. +func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5444,38 +5457,40 @@ func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteInstanceProcessSlotSender sends the DeleteInstanceProcessSlot request. The method will close the +// DeleteHostNameBindingSender sends the DeleteHostNameBinding request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHostNameBindingSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot request. The method always +// DeleteHostNameBindingResponder handles the response to the DeleteHostNameBinding request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteInstanceProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeletePremierAddOn description for Delete a premier add-on from an app. +// DeleteHostNameBindingSlot description for Deletes a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// premierAddOnName - add-on name. -func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result autorest.Response, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +// hostName - hostname in the hostname binding. +func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOn") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBindingSlot") defer func() { sc := -1 if result.Response != nil { @@ -5489,36 +5504,37 @@ func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupNa 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("web.AppsClient", "DeletePremierAddOn", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHostNameBindingSlot", err.Error()) } - req, err := client.DeletePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName) + req, err := client.DeleteHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", nil, "Failure preparing request") return } - resp, err := client.DeletePremierAddOnSender(req) + resp, err := client.DeleteHostNameBindingSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure sending request") return } - result, err = client.DeletePremierAddOnResponder(resp) + result, err = client.DeleteHostNameBindingSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure responding to request") } return } -// DeletePremierAddOnPreparer prepares the DeletePremierAddOn request. -func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) { +// DeleteHostNameBindingSlotPreparer prepares the DeleteHostNameBindingSlot request. +func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), - "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5530,40 +5546,39 @@ func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePremierAddOnSender sends the DeletePremierAddOn request. The method will close the +// DeleteHostNameBindingSlotSender sends the DeleteHostNameBindingSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeletePremierAddOnSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeletePremierAddOnResponder handles the response to the DeletePremierAddOn request. The method always +// DeleteHostNameBindingSlotResponder handles the response to the DeleteHostNameBindingSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeletePremierAddOnResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeletePremierAddOnSlot description for Delete a premier add-on from an app. +// DeleteHostSecret description for Delete a host level secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// premierAddOnName - add-on name. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the -// production slot. -func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result autorest.Response, err error) { +// name - site name. +// keyType - the type of host key. +// keyName - the name of the key. +func (client AppsClient) DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOnSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecret") defer func() { sc := -1 if result.Response != nil { @@ -5577,37 +5592,37 @@ func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGro 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("web.AppsClient", "DeletePremierAddOnSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHostSecret", err.Error()) } - req, err := client.DeletePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot) + req, err := client.DeleteHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", nil, "Failure preparing request") return } - resp, err := client.DeletePremierAddOnSlotSender(req) + resp, err := client.DeleteHostSecretSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure sending request") return } - result, err = client.DeletePremierAddOnSlotResponder(resp) + result, err = client.DeleteHostSecretResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure responding to request") } return } -// DeletePremierAddOnSlotPreparer prepares the DeletePremierAddOnSlot request. -func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) { +// DeleteHostSecretPreparer prepares the DeleteHostSecret request. +func (client AppsClient) DeleteHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "keyType": autorest.Encode("path", keyType), "name": autorest.Encode("path", name), - "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5619,39 +5634,40 @@ func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePremierAddOnSlotSender sends the DeletePremierAddOnSlot request. The method will close the +// DeleteHostSecretSender sends the DeleteHostSecret request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeletePremierAddOnSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHostSecretSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeletePremierAddOnSlotResponder handles the response to the DeletePremierAddOnSlot request. The method always +// DeleteHostSecretResponder handles the response to the DeleteHostSecret request. The method always // closes the http.Response Body. -func (client AppsClient) DeletePremierAddOnSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHostSecretResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteProcess description for Terminate a process by its ID for a web site, or a deployment slot, or specific -// scaled-out instance in a web site. +// DeleteHostSecretSlot description for Delete a host level secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// processID - pID. -func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result autorest.Response, err error) { +// keyType - the type of host key. +// keyName - the name of the key. +// slot - name of the deployment slot. +func (client AppsClient) DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecretSlot") defer func() { sc := -1 if result.Response != nil { @@ -5665,36 +5681,38 @@ func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName st 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("web.AppsClient", "DeleteProcess", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHostSecretSlot", err.Error()) } - req, err := client.DeleteProcessPreparer(ctx, resourceGroupName, name, processID) + req, err := client.DeleteHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteProcessSender(req) + resp, err := client.DeleteHostSecretSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure sending request") return } - result, err = client.DeleteProcessResponder(resp) + result, err = client.DeleteHostSecretSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure responding to request") } return } -// DeleteProcessPreparer prepares the DeleteProcess request. -func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { +// DeleteHostSecretSlotPreparer prepares the DeleteHostSecretSlot request. +func (client AppsClient) DeleteHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "keyType": autorest.Encode("path", keyType), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5706,21 +5724,21 @@ func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGrou preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteProcessSender sends the DeleteProcess request. The method will close the +// DeleteHostSecretSlotSender sends the DeleteHostSecretSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteProcessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHostSecretSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteProcessResponder handles the response to the DeleteProcess request. The method always +// DeleteHostSecretSlotResponder handles the response to the DeleteHostSecretSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHostSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5730,17 +5748,15 @@ func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result aut return } -// DeleteProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or specific -// scaled-out instance in a web site. +// DeleteHybridConnection description for Removes a Hybrid Connection from this site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result autorest.Response, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnection") defer func() { sc := -1 if result.Response != nil { @@ -5754,37 +5770,37 @@ func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupNam 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("web.AppsClient", "DeleteProcessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHybridConnection", err.Error()) } - req, err := client.DeleteProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) + req, err := client.DeleteHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", nil, "Failure preparing request") return } - resp, err := client.DeleteProcessSlotSender(req) + resp, err := client.DeleteHybridConnectionSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure sending request") return } - result, err = client.DeleteProcessSlotResponder(resp) + result, err = client.DeleteHybridConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure responding to request") } return } -// DeleteProcessSlotPreparer prepares the DeleteProcessSlot request. -func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { +// DeleteHybridConnectionPreparer prepares the DeleteHybridConnection request. +func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5796,38 +5812,40 @@ func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteProcessSlotSender sends the DeleteProcessSlot request. The method will close the +// DeleteHybridConnectionSender sends the DeleteHybridConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteProcessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHybridConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot request. The method always +// DeleteHybridConnectionResponder handles the response to the DeleteHybridConnection request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHybridConnectionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeletePublicCertificate description for Deletes a hostname binding for an app. +// DeleteHybridConnectionSlot description for Removes a Hybrid Connection from this site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// publicCertificateName - public certificate name. -func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result autorest.Response, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +// slot - the name of the slot for the web app. +func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificate") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnectionSlot") defer func() { sc := -1 if result.Response != nil { @@ -5841,37 +5859,39 @@ func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGr 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("web.AppsClient", "DeletePublicCertificate", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHybridConnectionSlot", err.Error()) } - req, err := client.DeletePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) + req, err := client.DeleteHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.DeletePublicCertificateSender(req) + resp, err := client.DeleteHybridConnectionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure sending request") return } - result, err = client.DeletePublicCertificateResponder(resp) + result, err = client.DeleteHybridConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure responding to request") } return } -// DeletePublicCertificatePreparer prepares the DeletePublicCertificate request. -func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) { +// DeleteHybridConnectionSlotPreparer prepares the DeleteHybridConnectionSlot request. +func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -5882,40 +5902,39 @@ func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePublicCertificateSender sends the DeletePublicCertificate request. The method will close the +// DeleteHybridConnectionSlotSender sends the DeleteHybridConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeletePublicCertificateSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate request. The method always +// DeleteHybridConnectionSlotResponder handles the response to the DeleteHybridConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeletePublicCertificateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHybridConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeletePublicCertificateSlot description for Deletes a hostname binding for an app. +// DeleteInstanceFunctionSlot description for Delete a function for web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the -// production slot. -// publicCertificateName - public certificate name. -func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result autorest.Response, err error) { +// name - site name. +// functionName - function name. +// slot - name of the deployment slot. +func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceFunctionSlot") defer func() { sc := -1 if result.Response != nil { @@ -5929,38 +5948,38 @@ func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resour 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("web.AppsClient", "DeletePublicCertificateSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteInstanceFunctionSlot", err.Error()) } - req, err := client.DeletePublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) + req, err := client.DeleteInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", nil, "Failure preparing request") return } - resp, err := client.DeletePublicCertificateSlotSender(req) + resp, err := client.DeleteInstanceFunctionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure sending request") return } - result, err = client.DeletePublicCertificateSlotResponder(resp) + result, err = client.DeleteInstanceFunctionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure responding to request") } return } -// DeletePublicCertificateSlotPreparer prepares the DeletePublicCertificateSlot request. -func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { +// DeleteInstanceFunctionSlotPreparer prepares the DeleteInstanceFunctionSlot request. +func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -5971,38 +5990,41 @@ func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePublicCertificateSlotSender sends the DeletePublicCertificateSlot request. The method will close the +// DeleteInstanceFunctionSlotSender sends the DeleteInstanceFunctionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeletePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot request. The method always +// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeletePublicCertificateSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteRelayServiceConnection description for Deletes a relay service connection by its name. +// DeleteInstanceProcess description for Terminate a process by its ID for a web site, or a deployment slot, or +// specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection configuration. -func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result autorest.Response, err error) { +// name - site name. +// processID - pID. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcess") defer func() { sc := -1 if result.Response != nil { @@ -6016,35 +6038,36 @@ func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resou 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("web.AppsClient", "DeleteRelayServiceConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteInstanceProcess", err.Error()) } - req, err := client.DeleteRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) + req, err := client.DeleteInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", nil, "Failure preparing request") return } - resp, err := client.DeleteRelayServiceConnectionSender(req) + resp, err := client.DeleteInstanceProcessSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure sending request") return } - result, err = client.DeleteRelayServiceConnectionResponder(resp) + result, err = client.DeleteInstanceProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure responding to request") } return } -// DeleteRelayServiceConnectionPreparer prepares the DeleteRelayServiceConnection request. -func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) { +// DeleteInstanceProcessPreparer prepares the DeleteInstanceProcess request. +func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6057,40 +6080,43 @@ func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteRelayServiceConnectionSender sends the DeleteRelayServiceConnection request. The method will close the +// DeleteInstanceProcessSender sends the DeleteInstanceProcess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteInstanceProcessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteRelayServiceConnectionResponder handles the response to the DeleteRelayServiceConnection request. The method always +// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteRelayServiceConnectionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteRelayServiceConnectionSlot description for Deletes a relay service connection by its name. +// DeleteInstanceProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or +// specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection configuration. -// slot - name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for -// the production slot. -func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result autorest.Response, err error) { +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcessSlot") defer func() { sc := -1 if result.Response != nil { @@ -6104,35 +6130,36 @@ func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, r 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("web.AppsClient", "DeleteRelayServiceConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteInstanceProcessSlot", err.Error()) } - req, err := client.DeleteRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) + req, err := client.DeleteInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteRelayServiceConnectionSlotSender(req) + resp, err := client.DeleteInstanceProcessSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure sending request") return } - result, err = client.DeleteRelayServiceConnectionSlotResponder(resp) + result, err = client.DeleteInstanceProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure responding to request") } return } -// DeleteRelayServiceConnectionSlotPreparer prepares the DeleteRelayServiceConnectionSlot request. -func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) { +// DeleteInstanceProcessSlotPreparer prepares the DeleteInstanceProcessSlot request. +func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -6146,38 +6173,38 @@ func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Co preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteRelayServiceConnectionSlotSender sends the DeleteRelayServiceConnectionSlot request. The method will close the +// DeleteInstanceProcessSlotSender sends the DeleteInstanceProcessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteRelayServiceConnectionSlotResponder handles the response to the DeleteRelayServiceConnectionSlot request. The method always +// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteRelayServiceConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteInstanceProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteSiteExtension description for Remove a site extension from a web site, or a deployment slot. +// DeletePremierAddOn description for Delete a premier add-on from an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// siteExtensionID - site extension name. -func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result autorest.Response, err error) { +// name - name of the app. +// premierAddOnName - add-on name. +func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtension") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOn") defer func() { sc := -1 if result.Response != nil { @@ -6191,36 +6218,36 @@ func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupN 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("web.AppsClient", "DeleteSiteExtension", err.Error()) + return result, validation.NewError("web.AppsClient", "DeletePremierAddOn", err.Error()) } - req, err := client.DeleteSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) + req, err := client.DeletePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", nil, "Failure preparing request") return } - resp, err := client.DeleteSiteExtensionSender(req) + resp, err := client.DeletePremierAddOnSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure sending request") return } - result, err = client.DeleteSiteExtensionResponder(resp) + result, err = client.DeletePremierAddOnResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure responding to request") } return } -// DeleteSiteExtensionPreparer prepares the DeleteSiteExtension request. -func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { +// DeletePremierAddOnPreparer prepares the DeletePremierAddOn request. +func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6232,40 +6259,40 @@ func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSiteExtensionSender sends the DeleteSiteExtension request. The method will close the +// DeletePremierAddOnSender sends the DeletePremierAddOn request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSiteExtensionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeletePremierAddOnSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always +// DeletePremierAddOnResponder handles the response to the DeletePremierAddOn request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSiteExtensionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeletePremierAddOnResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } -// DeleteSiteExtensionSlot description for Remove a site extension from a web site, or a deployment slot. +// DeletePremierAddOnSlot description for Delete a premier add-on from an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// siteExtensionID - site extension name. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// name - name of the app. +// premierAddOnName - add-on name. +// slot - name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the // production slot. -func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result autorest.Response, err error) { +func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtensionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOnSlot") defer func() { sc := -1 if result.Response != nil { @@ -6279,36 +6306,36 @@ func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGr 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("web.AppsClient", "DeleteSiteExtensionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeletePremierAddOnSlot", err.Error()) } - req, err := client.DeleteSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + req, err := client.DeletePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteSiteExtensionSlotSender(req) + resp, err := client.DeletePremierAddOnSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure sending request") return } - result, err = client.DeleteSiteExtensionSlotResponder(resp) + result, err = client.DeletePremierAddOnSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure responding to request") } return } -// DeleteSiteExtensionSlotPreparer prepares the DeleteSiteExtensionSlot request. -func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { +// DeletePremierAddOnSlotPreparer prepares the DeletePremierAddOnSlot request. +func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6321,41 +6348,39 @@ func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSiteExtensionSlotSender sends the DeleteSiteExtensionSlot request. The method will close the +// DeletePremierAddOnSlotSender sends the DeletePremierAddOnSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeletePremierAddOnSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always +// DeletePremierAddOnSlotResponder handles the response to the DeletePremierAddOnSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSiteExtensionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeletePremierAddOnSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } -// DeleteSlot description for Deletes a web, mobile, or API app, or one of the deployment slots. +// DeleteProcess description for Terminate a process by its ID for a web site, or a deployment slot, or specific +// scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app to delete. -// slot - name of the deployment slot to delete. By default, the API deletes the production slot. -// deleteMetrics - if true, web app metrics are also deleted. -// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want -// to delete the empty App Service plan. By default, the empty App Service plan is not deleted. -func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { +// name - site name. +// processID - pID. +func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcess") defer func() { sc := -1 if result.Response != nil { @@ -6369,36 +6394,36 @@ func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName strin 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("web.AppsClient", "DeleteSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteProcess", err.Error()) } - req, err := client.DeleteSlotPreparer(ctx, resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm) + req, err := client.DeleteProcessPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", nil, "Failure preparing request") return } - resp, err := client.DeleteSlotSender(req) + resp, err := client.DeleteProcessSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure sending request") return } - result, err = client.DeleteSlotResponder(resp) + result, err = client.DeleteProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure responding to request") } return } -// DeleteSlotPreparer prepares the DeleteSlot request. -func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) { +// DeleteProcessPreparer prepares the DeleteProcess request. +func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6406,31 +6431,25 @@ func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupNa queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if deleteMetrics != nil { - queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics) - } - if deleteEmptyServerFarm != nil { - queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm) - } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSlotSender sends the DeleteSlot request. The method will close the +// DeleteProcessSender sends the DeleteProcess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteProcessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSlotResponder handles the response to the DeleteSlot request. The method always +// DeleteProcessResponder handles the response to the DeleteProcess request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6440,13 +6459,17 @@ func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autore return } -// DeleteSourceControl description for Deletes the source control configuration of an app. +// DeleteProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or specific +// scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControl") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcessSlot") defer func() { sc := -1 if result.Response != nil { @@ -6460,35 +6483,37 @@ func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupN 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("web.AppsClient", "DeleteSourceControl", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteProcessSlot", err.Error()) } - req, err := client.DeleteSourceControlPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteSourceControlSender(req) + resp, err := client.DeleteProcessSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure sending request") return } - result, err = client.DeleteSourceControlResponder(resp) + result, err = client.DeleteProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure responding to request") } return } -// DeleteSourceControlPreparer prepares the DeleteSourceControl request. -func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteProcessSlotPreparer prepares the DeleteProcessSlot request. +func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6500,39 +6525,38 @@ func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSourceControlSender sends the DeleteSourceControl request. The method will close the +// DeleteProcessSlotSender sends the DeleteProcessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSourceControlSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteProcessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSourceControlResponder handles the response to the DeleteSourceControl request. The method always +// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSourceControlResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteSourceControlSlot description for Deletes the source control configuration of an app. +// DeletePublicCertificate description for Deletes a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the source control -// configuration for the production slot. -func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +// publicCertificateName - public certificate name. +func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControlSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificate") defer func() { sc := -1 if result.Response != nil { @@ -6546,38 +6570,38 @@ func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGr 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("web.AppsClient", "DeleteSourceControlSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeletePublicCertificate", err.Error()) } - req, err := client.DeleteSourceControlSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DeletePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", nil, "Failure preparing request") return } - resp, err := client.DeleteSourceControlSlotSender(req) + resp, err := client.DeletePublicCertificateSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure sending request") return } - result, err = client.DeleteSourceControlSlotResponder(resp) + result, err = client.DeletePublicCertificateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure responding to request") } return } -// DeleteSourceControlSlotPreparer prepares the DeleteSourceControlSlot request. -func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// DeletePublicCertificatePreparer prepares the DeletePublicCertificate request. +func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } const APIVersion = "2019-08-01" queryParameters := map[string]interface{}{ @@ -6587,38 +6611,40 @@ func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSourceControlSlotSender sends the DeleteSourceControlSlot request. The method will close the +// DeletePublicCertificateSender sends the DeletePublicCertificate request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSourceControlSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeletePublicCertificateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSourceControlSlotResponder handles the response to the DeleteSourceControlSlot request. The method always +// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSourceControlSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeletePublicCertificateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeleteSwiftVirtualNetwork description for Deletes a Swift Virtual Network connection from an app (or deployment -// slot). +// DeletePublicCertificateSlot description for Deletes a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +// publicCertificateName - public certificate name. +func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetwork") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificateSlot") defer func() { sc := -1 if result.Response != nil { @@ -6632,36 +6658,38 @@ func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resource 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("web.AppsClient", "DeleteSwiftVirtualNetwork", err.Error()) + return result, validation.NewError("web.AppsClient", "DeletePublicCertificateSlot", err.Error()) } - req, err := client.DeleteSwiftVirtualNetworkPreparer(ctx, resourceGroupName, name) + req, err := client.DeletePublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteSwiftVirtualNetworkSender(req) + resp, err := client.DeletePublicCertificateSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure sending request") return } - result, err = client.DeleteSwiftVirtualNetworkResponder(resp) + result, err = client.DeletePublicCertificateSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure responding to request") } return } -// DeleteSwiftVirtualNetworkPreparer prepares the DeleteSwiftVirtualNetwork request. -func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeletePublicCertificateSlotPreparer prepares the DeletePublicCertificateSlot request. +func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -6672,40 +6700,38 @@ func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSwiftVirtualNetworkSender sends the DeleteSwiftVirtualNetwork request. The method will close the +// DeletePublicCertificateSlotSender sends the DeletePublicCertificateSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSwiftVirtualNetworkSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeletePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSwiftVirtualNetworkResponder handles the response to the DeleteSwiftVirtualNetwork request. The method always +// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSwiftVirtualNetworkResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeletePublicCertificateSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeleteSwiftVirtualNetworkSlot description for Deletes a Swift Virtual Network connection from an app (or deployment -// slot). +// DeleteRelayServiceConnection description for Deletes a relay service connection by its name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the -// production slot. -func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +// entityName - name of the hybrid connection configuration. +func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetworkSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnection") defer func() { sc := -1 if result.Response != nil { @@ -6719,36 +6745,36 @@ func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, reso 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("web.AppsClient", "DeleteSwiftVirtualNetworkSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnection", err.Error()) } - req, err := client.DeleteSwiftVirtualNetworkSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DeleteRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", nil, "Failure preparing request") return } - resp, err := client.DeleteSwiftVirtualNetworkSlotSender(req) + resp, err := client.DeleteRelayServiceConnectionSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure sending request") return } - result, err = client.DeleteSwiftVirtualNetworkSlotResponder(resp) + result, err = client.DeleteRelayServiceConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure responding to request") } return } -// DeleteSwiftVirtualNetworkSlotPreparer prepares the DeleteSwiftVirtualNetworkSlot request. -func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// DeleteRelayServiceConnectionPreparer prepares the DeleteRelayServiceConnection request. +func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6760,21 +6786,21 @@ func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSwiftVirtualNetworkSlotSender sends the DeleteSwiftVirtualNetworkSlot request. The method will close the +// DeleteRelayServiceConnectionSender sends the DeleteRelayServiceConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSwiftVirtualNetworkSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSwiftVirtualNetworkSlotResponder handles the response to the DeleteSwiftVirtualNetworkSlot request. The method always +// DeleteRelayServiceConnectionResponder handles the response to the DeleteRelayServiceConnection request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteRelayServiceConnectionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6784,14 +6810,16 @@ func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Respo return } -// DeleteTriggeredWebJob description for Delete a triggered web job by its ID for an app, or a deployment slot. +// DeleteRelayServiceConnectionSlot description for Deletes a relay service connection by its name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) { +// name - name of the app. +// entityName - name of the hybrid connection configuration. +// slot - name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for +// the production slot. +func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnectionSlot") defer func() { sc := -1 if result.Response != nil { @@ -6805,37 +6833,38 @@ func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGrou 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("web.AppsClient", "DeleteTriggeredWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnectionSlot", err.Error()) } - req, err := client.DeleteTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.DeleteRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteTriggeredWebJobSender(req) + resp, err := client.DeleteRelayServiceConnectionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure sending request") return } - result, err = client.DeleteTriggeredWebJobResponder(resp) + result, err = client.DeleteRelayServiceConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure responding to request") } return } -// DeleteTriggeredWebJobPreparer prepares the DeleteTriggeredWebJob request. -func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// DeleteRelayServiceConnectionSlotPreparer prepares the DeleteRelayServiceConnectionSlot request. +func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -6846,40 +6875,38 @@ func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteTriggeredWebJobSender sends the DeleteTriggeredWebJob request. The method will close the +// DeleteRelayServiceConnectionSlotSender sends the DeleteRelayServiceConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteTriggeredWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always +// DeleteRelayServiceConnectionSlotResponder handles the response to the DeleteRelayServiceConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteRelayServiceConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteTriggeredWebJobSlot description for Delete a triggered web job by its ID for an app, or a deployment slot. +// DeleteSiteExtension description for Remove a site extension from a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// webJobName - name of Web Job. -// slot - name of the deployment slot. If a slot is not specified, the API deletes web job for the production -// slot. -func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) { +// siteExtensionID - site extension name. +func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtension") defer func() { sc := -1 if result.Response != nil { @@ -6893,38 +6920,37 @@ func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resource 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("web.AppsClient", "DeleteTriggeredWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSiteExtension", err.Error()) } - req, err := client.DeleteTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.DeleteSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", nil, "Failure preparing request") return } - resp, err := client.DeleteTriggeredWebJobSlotSender(req) + resp, err := client.DeleteSiteExtensionSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure sending request") return } - result, err = client.DeleteTriggeredWebJobSlotResponder(resp) + result, err = client.DeleteSiteExtensionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure responding to request") } return } -// DeleteTriggeredWebJobSlotPreparer prepares the DeleteTriggeredWebJobSlot request. -func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// DeleteSiteExtensionPreparer prepares the DeleteSiteExtension request. +func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), + "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -6935,39 +6961,40 @@ func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteTriggeredWebJobSlotSender sends the DeleteTriggeredWebJobSlot request. The method will close the +// DeleteSiteExtensionSender sends the DeleteSiteExtension request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSiteExtensionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot request. The method always +// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSiteExtensionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteVnetConnection description for Deletes a connection from an app (or deployment slot to a named virtual -// network. +// DeleteSiteExtensionSlot description for Remove a site extension from a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// vnetName - name of the virtual network. -func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result autorest.Response, err error) { +// name - site name. +// siteExtensionID - site extension name. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtensionSlot") defer func() { sc := -1 if result.Response != nil { @@ -6981,37 +7008,38 @@ func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroup 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("web.AppsClient", "DeleteVnetConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSiteExtensionSlot", err.Error()) } - req, err := client.DeleteVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) + req, err := client.DeleteSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteVnetConnectionSender(req) + resp, err := client.DeleteSiteExtensionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure sending request") return } - result, err = client.DeleteVnetConnectionResponder(resp) + result, err = client.DeleteSiteExtensionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure responding to request") } return } -// DeleteVnetConnectionPreparer prepares the DeleteVnetConnection request. -func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) { +// DeleteSiteExtensionSlotPreparer prepares the DeleteSiteExtensionSlot request. +func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -7022,41 +7050,41 @@ func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteVnetConnectionSender sends the DeleteVnetConnection request. The method will close the +// DeleteSiteExtensionSlotSender sends the DeleteSiteExtensionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteVnetConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteVnetConnectionResponder handles the response to the DeleteVnetConnection request. The method always +// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteVnetConnectionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSiteExtensionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteVnetConnectionSlot description for Deletes a connection from an app (or deployment slot to a named virtual -// network. +// DeleteSlot description for Deletes a web, mobile, or API app, or one of the deployment slots. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// vnetName - name of the virtual network. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the -// production slot. -func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result autorest.Response, err error) { +// name - name of the app to delete. +// slot - name of the deployment slot to delete. By default, the API deletes the production slot. +// deleteMetrics - if true, web app metrics are also deleted. +// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want +// to delete the empty App Service plan. By default, the empty App Service plan is not deleted. +func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSlot") defer func() { sc := -1 if result.Response != nil { @@ -7070,85 +7098,88 @@ func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceG 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("web.AppsClient", "DeleteVnetConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSlot", err.Error()) } - req, err := client.DeleteVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) + req, err := client.DeleteSlotPreparer(ctx, resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteVnetConnectionSlotSender(req) + resp, err := client.DeleteSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure sending request") return } - result, err = client.DeleteVnetConnectionSlotResponder(resp) + result, err = client.DeleteSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure responding to request") } return } -// DeleteVnetConnectionSlotPreparer prepares the DeleteVnetConnectionSlot request. -func (client AppsClient) DeleteVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) { +// DeleteSlotPreparer prepares the DeleteSlot request. +func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if deleteMetrics != nil { + queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics) + } + if deleteEmptyServerFarm != nil { + queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteVnetConnectionSlotSender sends the DeleteVnetConnectionSlot request. The method will close the +// DeleteSlotSender sends the DeleteSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteVnetConnectionSlotResponder handles the response to the DeleteVnetConnectionSlot request. The method always +// DeleteSlotResponder handles the response to the DeleteSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DiscoverBackup description for Discovers an existing app backup that can be restored from a blob in Azure storage. -// Use this to get information about the databases stored in a backup. +// DeleteSourceControl description for Deletes the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. -func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result RestoreRequest, err error) { +func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackup") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControl") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7157,38 +7188,33 @@ func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName s {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: request, - Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "DiscoverBackup", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DeleteSourceControl", err.Error()) } - req, err := client.DiscoverBackupPreparer(ctx, resourceGroupName, name, request) + req, err := client.DeleteSourceControlPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", nil, "Failure preparing request") return } - resp, err := client.DiscoverBackupSender(req) + resp, err := client.DeleteSourceControlSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure sending request") return } - result, err = client.DiscoverBackupResponder(resp) + result, err = client.DeleteSourceControlResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure responding to request") } return } -// DiscoverBackupPreparer prepares the DiscoverBackup request. -func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) { +// DeleteSourceControlPreparer prepares the DeleteSourceControl request. +func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -7201,50 +7227,45 @@ func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGro } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup", pathParameters), - autorest.WithJSON(request), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DiscoverBackupSender sends the DiscoverBackup request. The method will close the +// DeleteSourceControlSender sends the DeleteSourceControl request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DiscoverBackupSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSourceControlSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DiscoverBackupResponder handles the response to the DiscoverBackup request. The method always +// DeleteSourceControlResponder handles the response to the DeleteSourceControl request. The method always // closes the http.Response Body. -func (client AppsClient) DiscoverBackupResponder(resp *http.Response) (result RestoreRequest, err error) { +func (client AppsClient) DeleteSourceControlResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// DiscoverBackupSlot description for Discovers an existing app backup that can be restored from a blob in Azure -// storage. Use this to get information about the databases stored in a backup. +// DeleteSourceControlSlot description for Deletes the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. -// slot - name of the deployment slot. If a slot is not specified, the API will perform discovery for the -// production slot. -func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result RestoreRequest, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the source control +// configuration for the production slot. +func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackupSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControlSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7253,38 +7274,33 @@ func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupNa {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: request, - Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "DiscoverBackupSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DeleteSourceControlSlot", err.Error()) } - req, err := client.DiscoverBackupSlotPreparer(ctx, resourceGroupName, name, request, slot) + req, err := client.DeleteSourceControlSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", nil, "Failure preparing request") return } - resp, err := client.DiscoverBackupSlotSender(req) + resp, err := client.DeleteSourceControlSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure sending request") return } - result, err = client.DiscoverBackupSlotResponder(resp) + result, err = client.DeleteSourceControlSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure responding to request") } return } -// DiscoverBackupSlotPreparer prepares the DiscoverBackupSlot request. -func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) { +// DeleteSourceControlSlotPreparer prepares the DeleteSourceControlSlot request. +func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -7298,43 +7314,40 @@ func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourc } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup", pathParameters), - autorest.WithJSON(request), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DiscoverBackupSlotSender sends the DiscoverBackupSlot request. The method will close the +// DeleteSourceControlSlotSender sends the DeleteSourceControlSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DiscoverBackupSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSourceControlSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DiscoverBackupSlotResponder handles the response to the DiscoverBackupSlot request. The method always +// DeleteSourceControlSlotResponder handles the response to the DeleteSourceControlSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DiscoverBackupSlotResponder(resp *http.Response) (result RestoreRequest, err error) { +func (client AppsClient) DeleteSourceControlSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GenerateNewSitePublishingPassword description for Generates a new publishing password for an app (or deployment -// slot, if specified). +// DeleteSwiftVirtualNetwork description for Deletes a Swift Virtual Network connection from an app (or deployment +// slot). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPassword") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetwork") defer func() { sc := -1 if result.Response != nil { @@ -7348,32 +7361,32 @@ func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, 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("web.AppsClient", "GenerateNewSitePublishingPassword", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetwork", err.Error()) } - req, err := client.GenerateNewSitePublishingPasswordPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteSwiftVirtualNetworkPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", nil, "Failure preparing request") return } - resp, err := client.GenerateNewSitePublishingPasswordSender(req) + resp, err := client.DeleteSwiftVirtualNetworkSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure sending request") return } - result, err = client.GenerateNewSitePublishingPasswordResponder(resp) + result, err = client.DeleteSwiftVirtualNetworkResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure responding to request") } return } -// GenerateNewSitePublishingPasswordPreparer prepares the GenerateNewSitePublishingPassword request. -func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteSwiftVirtualNetworkPreparer prepares the DeleteSwiftVirtualNetwork request. +func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -7386,42 +7399,42 @@ func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.C } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GenerateNewSitePublishingPasswordSender sends the GenerateNewSitePublishingPassword request. The method will close the +// DeleteSwiftVirtualNetworkSender sends the DeleteSwiftVirtualNetwork request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GenerateNewSitePublishingPasswordSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSwiftVirtualNetworkSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GenerateNewSitePublishingPasswordResponder handles the response to the GenerateNewSitePublishingPassword request. The method always +// DeleteSwiftVirtualNetworkResponder handles the response to the DeleteSwiftVirtualNetwork request. The method always // closes the http.Response Body. -func (client AppsClient) GenerateNewSitePublishingPasswordResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSwiftVirtualNetworkResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// GenerateNewSitePublishingPasswordSlot description for Generates a new publishing password for an app (or deployment -// slot, if specified). +// DeleteSwiftVirtualNetworkSlot description for Deletes a Swift Virtual Network connection from an app (or deployment +// slot). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API generate a new publishing password -// for the production slot. -func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the +// production slot. +func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPasswordSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetworkSlot") defer func() { sc := -1 if result.Response != nil { @@ -7435,32 +7448,32 @@ func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Conte 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("web.AppsClient", "GenerateNewSitePublishingPasswordSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetworkSlot", err.Error()) } - req, err := client.GenerateNewSitePublishingPasswordSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DeleteSwiftVirtualNetworkSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", nil, "Failure preparing request") return } - resp, err := client.GenerateNewSitePublishingPasswordSlotSender(req) + resp, err := client.DeleteSwiftVirtualNetworkSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure sending request") return } - result, err = client.GenerateNewSitePublishingPasswordSlotResponder(resp) + result, err = client.DeleteSwiftVirtualNetworkSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure responding to request") } return } -// GenerateNewSitePublishingPasswordSlotPreparer prepares the GenerateNewSitePublishingPasswordSlot request. -func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// DeleteSwiftVirtualNetworkSlotPreparer prepares the DeleteSwiftVirtualNetworkSlot request. +func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -7474,43 +7487,44 @@ func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx conte } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GenerateNewSitePublishingPasswordSlotSender sends the GenerateNewSitePublishingPasswordSlot request. The method will close the +// DeleteSwiftVirtualNetworkSlotSender sends the DeleteSwiftVirtualNetworkSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GenerateNewSitePublishingPasswordSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSwiftVirtualNetworkSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GenerateNewSitePublishingPasswordSlotResponder handles the response to the GenerateNewSitePublishingPasswordSlot request. The method always +// DeleteSwiftVirtualNetworkSlotResponder handles the response to the DeleteSwiftVirtualNetworkSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GenerateNewSitePublishingPasswordSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// Get description for Gets the details of a web, mobile, or API app. +// DeleteTriggeredWebJob description for Delete a triggered web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name string) (result Site, err error) { +// name - site name. +// webJobName - name of Web Job. +func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJob") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7520,36 +7534,37 @@ func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name 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("web.AppsClient", "Get", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJob", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", nil, "Failure preparing request") return } - resp, err := client.GetSender(req) + resp, err := client.DeleteTriggeredWebJobSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure sending request") return } - result, err = client.GetResponder(resp) + result, err = client.DeleteTriggeredWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure responding to request") } return } -// GetPreparer prepares the Get request. -func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteTriggeredWebJobPreparer prepares the DeleteTriggeredWebJob request. +func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -7558,45 +7573,46 @@ func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName stri } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSender sends the Get request. The method will close the +// DeleteTriggeredWebJobSender sends the DeleteTriggeredWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteTriggeredWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetResponder handles the response to the Get request. The method always +// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) GetResponder(resp *http.Response) (result Site, err error) { +func (client AppsClient) DeleteTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetAppSettingKeyVaultReference description for Gets the config reference and status of an app +// DeleteTriggeredWebJobSlot description for Delete a triggered web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// appSettingKey - app Setting key name. -func (client AppsClient) GetAppSettingKeyVaultReference(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (result KeyVaultReferenceResource, err error) { +// name - site name. +// webJobName - name of Web Job. +// slot - name of the deployment slot. If a slot is not specified, the API deletes web job for the production +// slot. +func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingKeyVaultReference") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJobSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7606,37 +7622,38 @@ func (client AppsClient) GetAppSettingKeyVaultReference(ctx context.Context, res 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("web.AppsClient", "GetAppSettingKeyVaultReference", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJobSlot", err.Error()) } - req, err := client.GetAppSettingKeyVaultReferencePreparer(ctx, resourceGroupName, name, appSettingKey) + req, err := client.DeleteTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.GetAppSettingKeyVaultReferenceSender(req) + resp, err := client.DeleteTriggeredWebJobSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure sending request") return } - result, err = client.GetAppSettingKeyVaultReferenceResponder(resp) + result, err = client.DeleteTriggeredWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure responding to request") } return } -// GetAppSettingKeyVaultReferencePreparer prepares the GetAppSettingKeyVaultReference request. -func (client AppsClient) GetAppSettingKeyVaultReferencePreparer(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (*http.Request, error) { +// DeleteTriggeredWebJobSlotPreparer prepares the DeleteTriggeredWebJobSlot request. +func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "appSettingKey": autorest.Encode("path", appSettingKey), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -7645,44 +7662,45 @@ func (client AppsClient) GetAppSettingKeyVaultReferencePreparer(ctx context.Cont } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAppSettingKeyVaultReferenceSender sends the GetAppSettingKeyVaultReference request. The method will close the +// DeleteTriggeredWebJobSlotSender sends the DeleteTriggeredWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetAppSettingKeyVaultReferenceSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetAppSettingKeyVaultReferenceResponder handles the response to the GetAppSettingKeyVaultReference request. The method always +// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetAppSettingKeyVaultReferenceResponder(resp *http.Response) (result KeyVaultReferenceResource, err error) { +func (client AppsClient) DeleteTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetAppSettingsKeyVaultReferences description for Gets the config reference app settings and status of an app +// DeleteVnetConnection description for Deletes a connection from an app (or deployment slot to a named virtual +// network. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetAppSettingsKeyVaultReferences(ctx context.Context, resourceGroupName string, name string) (result KeyVaultReferenceCollection, err error) { +// vnetName - name of the virtual network. +func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingsKeyVaultReferences") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnection") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7692,36 +7710,37 @@ func (client AppsClient) GetAppSettingsKeyVaultReferences(ctx context.Context, r 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("web.AppsClient", "GetAppSettingsKeyVaultReferences", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteVnetConnection", err.Error()) } - req, err := client.GetAppSettingsKeyVaultReferencesPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", nil, "Failure preparing request") return } - resp, err := client.GetAppSettingsKeyVaultReferencesSender(req) + resp, err := client.DeleteVnetConnectionSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure sending request") return } - result, err = client.GetAppSettingsKeyVaultReferencesResponder(resp) + result, err = client.DeleteVnetConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure responding to request") } return } -// GetAppSettingsKeyVaultReferencesPreparer prepares the GetAppSettingsKeyVaultReferences request. -func (client AppsClient) GetAppSettingsKeyVaultReferencesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteVnetConnectionPreparer prepares the DeleteVnetConnection request. +func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -7730,44 +7749,47 @@ func (client AppsClient) GetAppSettingsKeyVaultReferencesPreparer(ctx context.Co } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAppSettingsKeyVaultReferencesSender sends the GetAppSettingsKeyVaultReferences request. The method will close the +// DeleteVnetConnectionSender sends the DeleteVnetConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetAppSettingsKeyVaultReferencesSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteVnetConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetAppSettingsKeyVaultReferencesResponder handles the response to the GetAppSettingsKeyVaultReferences request. The method always +// DeleteVnetConnectionResponder handles the response to the DeleteVnetConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetAppSettingsKeyVaultReferencesResponder(resp *http.Response) (result KeyVaultReferenceCollection, err error) { +func (client AppsClient) DeleteVnetConnectionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetAuthSettings description for Gets the Authentication/Authorization settings of an app. +// DeleteVnetConnectionSlot description for Deletes a connection from an app (or deployment slot to a named virtual +// network. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettings, err error) { +// vnetName - name of the virtual network. +// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the +// production slot. +func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettings") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnectionSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7777,36 +7799,38 @@ func (client AppsClient) GetAuthSettings(ctx context.Context, 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("web.AppsClient", "GetAuthSettings", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteVnetConnectionSlot", err.Error()) } - req, err := client.GetAuthSettingsPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetAuthSettingsSender(req) + resp, err := client.DeleteVnetConnectionSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetAuthSettingsResponder(resp) + result, err = client.DeleteVnetConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure responding to request") } return } -// GetAuthSettingsPreparer prepares the GetAuthSettings request. -func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteVnetConnectionSlotPreparer prepares the DeleteVnetConnectionSlot request. +func (client AppsClient) DeleteVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -7815,42 +7839,41 @@ func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGr } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAuthSettingsSender sends the GetAuthSettings request. The method will close the +// DeleteVnetConnectionSlotSender sends the DeleteVnetConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetAuthSettingsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetAuthSettingsResponder handles the response to the GetAuthSettings request. The method always +// DeleteVnetConnectionSlotResponder handles the response to the DeleteVnetConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) { +func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetAuthSettingsSlot description for Gets the Authentication/Authorization settings of an app. +// DiscoverBackup description for Discovers an existing app backup that can be restored from a blob in Azure storage. +// Use this to get information about the databases stored in a backup. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will get the settings for the -// production slot. -func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettings, err error) { +// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. +func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result RestoreRequest, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackup") defer func() { sc := -1 if result.Response.Response != nil { @@ -7863,37 +7886,41 @@ func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupN {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("web.AppsClient", "GetAuthSettingsSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DiscoverBackup", err.Error()) } - req, err := client.GetAuthSettingsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DiscoverBackupPreparer(ctx, resourceGroupName, name, request) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", nil, "Failure preparing request") return } - resp, err := client.GetAuthSettingsSlotSender(req) + resp, err := client.DiscoverBackupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure sending request") return } - result, err = client.GetAuthSettingsSlotResponder(resp) + result, err = client.DiscoverBackupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure responding to request") } return } -// GetAuthSettingsSlotPreparer prepares the GetAuthSettingsSlot request. -func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// DiscoverBackupPreparer prepares the DiscoverBackup request. +func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -7903,23 +7930,25 @@ func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resour } preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup", pathParameters), + autorest.WithJSON(request), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAuthSettingsSlotSender sends the GetAuthSettingsSlot request. The method will close the +// DiscoverBackupSender sends the DiscoverBackup request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetAuthSettingsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DiscoverBackupSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot request. The method always +// DiscoverBackupResponder handles the response to the DiscoverBackup request. The method always // closes the http.Response Body. -func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) { +func (client AppsClient) DiscoverBackupResponder(resp *http.Response) (result RestoreRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -7930,13 +7959,17 @@ func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (resu return } -// GetBackupConfiguration description for Gets the backup configuration of an app. +// DiscoverBackupSlot description for Discovers an existing app backup that can be restored from a blob in Azure +// storage. Use this to get information about the databases stored in a backup. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result BackupRequest, err error) { +// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. +// slot - name of the deployment slot. If a slot is not specified, the API will perform discovery for the +// production slot. +func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result RestoreRequest, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfiguration") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackupSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -7949,36 +7982,42 @@ func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGro {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("web.AppsClient", "GetBackupConfiguration", err.Error()) - } - - req, err := client.GetBackupConfigurationPreparer(ctx, resourceGroupName, name) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DiscoverBackupSlot", err.Error()) + } + + req, err := client.DiscoverBackupSlotPreparer(ctx, resourceGroupName, name, request, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", nil, "Failure preparing request") return } - resp, err := client.GetBackupConfigurationSender(req) + resp, err := client.DiscoverBackupSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure sending request") return } - result, err = client.GetBackupConfigurationResponder(resp) + result, err = client.DiscoverBackupSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure responding to request") } return } -// GetBackupConfigurationPreparer prepares the GetBackupConfiguration request. -func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DiscoverBackupSlotPreparer prepares the DiscoverBackupSlot request. +func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -7988,23 +8027,25 @@ func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, res } preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup", pathParameters), + autorest.WithJSON(request), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupConfigurationSender sends the GetBackupConfiguration request. The method will close the +// DiscoverBackupSlotSender sends the DiscoverBackupSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetBackupConfigurationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DiscoverBackupSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration request. The method always +// DiscoverBackupSlotResponder handles the response to the DiscoverBackupSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) { +func (client AppsClient) DiscoverBackupSlotResponder(resp *http.Response) (result RestoreRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8015,19 +8056,18 @@ func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (r return } -// GetBackupConfigurationSlot description for Gets the backup configuration of an app. +// GenerateNewSitePublishingPassword description for Generates a new publishing password for an app (or deployment +// slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will get the backup configuration -// for the production slot. -func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupRequest, err error) { +func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPassword") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -8037,36 +8077,35 @@ func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourc 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("web.AppsClient", "GetBackupConfigurationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPassword", err.Error()) } - req, err := client.GetBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GenerateNewSitePublishingPasswordPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", nil, "Failure preparing request") return } - resp, err := client.GetBackupConfigurationSlotSender(req) + resp, err := client.GenerateNewSitePublishingPasswordSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure sending request") return } - result, err = client.GetBackupConfigurationSlotResponder(resp) + result, err = client.GenerateNewSitePublishingPasswordResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure responding to request") } return } -// GetBackupConfigurationSlotPreparer prepares the GetBackupConfigurationSlot request. -func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GenerateNewSitePublishingPasswordPreparer prepares the GenerateNewSitePublishingPassword request. +func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8078,43 +8117,44 @@ func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupConfigurationSlotSender sends the GetBackupConfigurationSlot request. The method will close the +// GenerateNewSitePublishingPasswordSender sends the GenerateNewSitePublishingPassword request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GenerateNewSitePublishingPasswordSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot request. The method always +// GenerateNewSitePublishingPasswordResponder handles the response to the GenerateNewSitePublishingPassword request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) { +func (client AppsClient) GenerateNewSitePublishingPasswordResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetBackupStatus description for Gets a backup of an app by its ID. +// GenerateNewSitePublishingPasswordSlot description for Generates a new publishing password for an app (or deployment +// slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// backupID - ID of the backup. -func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string) (result BackupItem, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API generate a new publishing password +// for the production slot. +func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPasswordSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -8124,36 +8164,36 @@ func (client AppsClient) GetBackupStatus(ctx context.Context, 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("web.AppsClient", "GetBackupStatus", err.Error()) + return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPasswordSlot", err.Error()) } - req, err := client.GetBackupStatusPreparer(ctx, resourceGroupName, name, backupID) + req, err := client.GenerateNewSitePublishingPasswordSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", nil, "Failure preparing request") return } - resp, err := client.GetBackupStatusSender(req) + resp, err := client.GenerateNewSitePublishingPasswordSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure sending request") return } - result, err = client.GetBackupStatusResponder(resp) + result, err = client.GenerateNewSitePublishingPasswordSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure responding to request") } return } -// GetBackupStatusPreparer prepares the GetBackupStatus request. -func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) { +// GenerateNewSitePublishingPasswordSlotPreparer prepares the GenerateNewSitePublishingPasswordSlot request. +func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8163,43 +8203,39 @@ func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGr } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupStatusSender sends the GetBackupStatus request. The method will close the +// GenerateNewSitePublishingPasswordSlotSender sends the GenerateNewSitePublishingPasswordSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetBackupStatusSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GenerateNewSitePublishingPasswordSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetBackupStatusResponder handles the response to the GetBackupStatus request. The method always +// GenerateNewSitePublishingPasswordSlotResponder handles the response to the GenerateNewSitePublishingPasswordSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result BackupItem, err error) { +func (client AppsClient) GenerateNewSitePublishingPasswordSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetBackupStatusSlot description for Gets a backup of an app by its ID. +// Get description for Gets the details of a web, mobile, or API app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// backupID - ID of the backup. -// slot - name of the deployment slot. If a slot is not specified, the API will get a backup of the production -// slot. -func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result BackupItem, err error) { +func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name string) (result Site, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get") defer func() { sc := -1 if result.Response.Response != nil { @@ -8213,37 +8249,35 @@ func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupN 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("web.AppsClient", "GetBackupStatusSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "Get", err.Error()) } - req, err := client.GetBackupStatusSlotPreparer(ctx, resourceGroupName, name, backupID, slot) + req, err := client.GetPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", nil, "Failure preparing request") return } - resp, err := client.GetBackupStatusSlotSender(req) + resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure sending request") return } - result, err = client.GetBackupStatusSlotResponder(resp) + result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure responding to request") } return } -// GetBackupStatusSlotPreparer prepares the GetBackupStatusSlot request. -func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) { +// GetPreparer prepares the Get request. +func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8255,39 +8289,39 @@ func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupStatusSlotSender sends the GetBackupStatusSlot request. The method will close the +// GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetBackupStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot request. The method always +// GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (result BackupItem, err error) { +func (client AppsClient) GetResponder(resp *http.Response) (result Site, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetConfiguration description for Gets the configuration of an app, such as platform version and bitness, default -// documents, virtual applications, Always On, etc. +// GetAppSettingKeyVaultReference description for Gets the config reference and status of an app // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResource, err error) { +// appSettingKey - app Setting key name. +func (client AppsClient) GetAppSettingKeyVaultReference(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (result KeyVaultReferenceResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfiguration") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingKeyVaultReference") defer func() { sc := -1 if result.Response.Response != nil { @@ -8301,33 +8335,34 @@ func (client AppsClient) GetConfiguration(ctx context.Context, 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("web.AppsClient", "GetConfiguration", err.Error()) + return result, validation.NewError("web.AppsClient", "GetAppSettingKeyVaultReference", err.Error()) } - req, err := client.GetConfigurationPreparer(ctx, resourceGroupName, name) + req, err := client.GetAppSettingKeyVaultReferencePreparer(ctx, resourceGroupName, name, appSettingKey) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSender(req) + resp, err := client.GetAppSettingKeyVaultReferenceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure sending request") return } - result, err = client.GetConfigurationResponder(resp) + result, err = client.GetAppSettingKeyVaultReferenceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure responding to request") } return } -// GetConfigurationPreparer prepares the GetConfiguration request. -func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetAppSettingKeyVaultReferencePreparer prepares the GetAppSettingKeyVaultReference request. +func (client AppsClient) GetAppSettingKeyVaultReferencePreparer(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "appSettingKey": autorest.Encode("path", appSettingKey), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -8341,21 +8376,21 @@ func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSender sends the GetConfiguration request. The method will close the +// GetAppSettingKeyVaultReferenceSender sends the GetAppSettingKeyVaultReference request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetConfigurationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetAppSettingKeyVaultReferenceSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetConfigurationResponder handles the response to the GetConfiguration request. The method always +// GetAppSettingKeyVaultReferenceResponder handles the response to the GetAppSettingKeyVaultReference request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) { +func (client AppsClient) GetAppSettingKeyVaultReferenceResponder(resp *http.Response) (result KeyVaultReferenceResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8366,16 +8401,13 @@ func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result return } -// GetConfigurationSlot description for Gets the configuration of an app, such as platform version and bitness, default -// documents, virtual applications, Always On, etc. +// GetAppSettingsKeyVaultReferences description for Gets the config reference app settings and status of an app // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the -// production slot. -func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResource, err error) { +func (client AppsClient) GetAppSettingsKeyVaultReferences(ctx context.Context, resourceGroupName string, name string) (result KeyVaultReferenceCollection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingsKeyVaultReferences") defer func() { sc := -1 if result.Response.Response != nil { @@ -8389,36 +8421,35 @@ func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroup 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("web.AppsClient", "GetConfigurationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetAppSettingsKeyVaultReferences", err.Error()) } - req, err := client.GetConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetAppSettingsKeyVaultReferencesPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSlotSender(req) + resp, err := client.GetAppSettingsKeyVaultReferencesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure sending request") return } - result, err = client.GetConfigurationSlotResponder(resp) + result, err = client.GetAppSettingsKeyVaultReferencesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure responding to request") } return } -// GetConfigurationSlotPreparer prepares the GetConfigurationSlot request. -func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetAppSettingsKeyVaultReferencesPreparer prepares the GetAppSettingsKeyVaultReferences request. +func (client AppsClient) GetAppSettingsKeyVaultReferencesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8430,21 +8461,21 @@ func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSlotSender sends the GetConfigurationSlot request. The method will close the +// GetAppSettingsKeyVaultReferencesSender sends the GetAppSettingsKeyVaultReferences request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetConfigurationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetAppSettingsKeyVaultReferencesSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot request. The method always +// GetAppSettingsKeyVaultReferencesResponder handles the response to the GetAppSettingsKeyVaultReferences request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) { +func (client AppsClient) GetAppSettingsKeyVaultReferencesResponder(resp *http.Response) (result KeyVaultReferenceCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8455,14 +8486,13 @@ func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (res return } -// GetConfigurationSnapshot description for Gets a snapshot of the configuration of an app at a previous point in time. +// GetAuthSettings description for Gets the Authentication/Authorization settings of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// snapshotID - the ID of the snapshot to read. -func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result SiteConfigResource, err error) { +func (client AppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettings, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettings") defer func() { sc := -1 if result.Response.Response != nil { @@ -8476,36 +8506,35 @@ func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceG 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("web.AppsClient", "GetConfigurationSnapshot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetAuthSettings", err.Error()) } - req, err := client.GetConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID) + req, err := client.GetAuthSettingsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSnapshotSender(req) + resp, err := client.GetAuthSettingsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure sending request") return } - result, err = client.GetConfigurationSnapshotResponder(resp) + result, err = client.GetAuthSettingsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure responding to request") } return } -// GetConfigurationSnapshotPreparer prepares the GetConfigurationSnapshot request. -func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) { +// GetAuthSettingsPreparer prepares the GetAuthSettings request. +func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "snapshotId": autorest.Encode("path", snapshotID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8515,23 +8544,23 @@ func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, r } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSnapshotSender sends the GetConfigurationSnapshot request. The method will close the +// GetAuthSettingsSender sends the GetAuthSettings request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetConfigurationSnapshotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetAuthSettingsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetConfigurationSnapshotResponder handles the response to the GetConfigurationSnapshot request. The method always +// GetAuthSettingsResponder handles the response to the GetAuthSettings request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) (result SiteConfigResource, err error) { +func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8542,17 +8571,15 @@ func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) return } -// GetConfigurationSnapshotSlot description for Gets a snapshot of the configuration of an app at a previous point in -// time. +// GetAuthSettingsSlot description for Gets the Authentication/Authorization settings of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// snapshotID - the ID of the snapshot to read. -// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// slot - name of the deployment slot. If a slot is not specified, the API will get the settings for the // production slot. -func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result SiteConfigResource, err error) { +func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettings, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshotSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -8566,37 +8593,36 @@ func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resou 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("web.AppsClient", "GetConfigurationSnapshotSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetAuthSettingsSlot", err.Error()) } - req, err := client.GetConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot) + req, err := client.GetAuthSettingsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSnapshotSlotSender(req) + resp, err := client.GetAuthSettingsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure sending request") return } - result, err = client.GetConfigurationSnapshotSlotResponder(resp) + result, err = client.GetAuthSettingsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure responding to request") } return } -// GetConfigurationSnapshotSlotPreparer prepares the GetConfigurationSnapshotSlot request. -func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) { +// GetAuthSettingsSlotPreparer prepares the GetAuthSettingsSlot request. +func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), - "snapshotId": autorest.Encode("path", snapshotID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8606,23 +8632,23 @@ func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Contex } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSnapshotSlotSender sends the GetConfigurationSnapshotSlot request. The method will close the +// GetAuthSettingsSlotSender sends the GetAuthSettingsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetAuthSettingsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetConfigurationSnapshotSlotResponder handles the response to the GetConfigurationSnapshotSlot request. The method always +// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Response) (result SiteConfigResource, err error) { +func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8633,13 +8659,13 @@ func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Respon return } -// GetContainerLogsZip description for Gets the ZIP archived docker log files for the given site +// GetBackupConfiguration description for Gets the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) { +// name - name of the app. +func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result BackupRequest, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZip") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfiguration") defer func() { sc := -1 if result.Response.Response != nil { @@ -8653,32 +8679,32 @@ func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupN 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("web.AppsClient", "GetContainerLogsZip", err.Error()) + return result, validation.NewError("web.AppsClient", "GetBackupConfiguration", err.Error()) } - req, err := client.GetContainerLogsZipPreparer(ctx, resourceGroupName, name) + req, err := client.GetBackupConfigurationPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", nil, "Failure preparing request") return } - resp, err := client.GetContainerLogsZipSender(req) + resp, err := client.GetBackupConfigurationSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure sending request") return } - result, err = client.GetContainerLogsZipResponder(resp) + result, err = client.GetBackupConfigurationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure responding to request") } return } -// GetContainerLogsZipPreparer prepares the GetContainerLogsZip request. -func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetBackupConfigurationPreparer prepares the GetBackupConfiguration request. +func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -8693,38 +8719,40 @@ func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetContainerLogsZipSender sends the GetContainerLogsZip request. The method will close the +// GetBackupConfigurationSender sends the GetBackupConfiguration request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetContainerLogsZipSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetBackupConfigurationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetContainerLogsZipResponder handles the response to the GetContainerLogsZip request. The method always +// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) GetContainerLogsZipResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetContainerLogsZipSlot description for Gets the ZIP archived docker log files for the given site +// GetBackupConfigurationSlot description for Gets the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will get the backup configuration +// for the production slot. +func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupRequest, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZipSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfigurationSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -8738,32 +8766,32 @@ func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGr 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("web.AppsClient", "GetContainerLogsZipSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetBackupConfigurationSlot", err.Error()) } - req, err := client.GetContainerLogsZipSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", nil, "Failure preparing request") return } - resp, err := client.GetContainerLogsZipSlotSender(req) + resp, err := client.GetBackupConfigurationSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure sending request") return } - result, err = client.GetContainerLogsZipSlotResponder(resp) + result, err = client.GetBackupConfigurationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure responding to request") } return } -// GetContainerLogsZipSlotPreparer prepares the GetContainerLogsZipSlot request. -func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetBackupConfigurationSlotPreparer prepares the GetBackupConfigurationSlot request. +func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -8779,38 +8807,39 @@ func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetContainerLogsZipSlotSender sends the GetContainerLogsZipSlot request. The method will close the +// GetBackupConfigurationSlotSender sends the GetBackupConfigurationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetContainerLogsZipSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetContainerLogsZipSlotResponder handles the response to the GetContainerLogsZipSlot request. The method always +// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetContainerLogsZipSlotResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetContinuousWebJob description for Gets a continuous web job by its ID for an app, or a deployment slot. +// GetBackupStatus description for Gets a backup of an app by its ID. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result ContinuousWebJob, err error) { +// name - name of the app. +// backupID - ID of the backup. +func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string) (result BackupItem, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -8824,37 +8853,37 @@ func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupN 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("web.AppsClient", "GetContinuousWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "GetBackupStatus", err.Error()) } - req, err := client.GetContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.GetBackupStatusPreparer(ctx, resourceGroupName, name, backupID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", nil, "Failure preparing request") return } - resp, err := client.GetContinuousWebJobSender(req) + resp, err := client.GetBackupStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure sending request") return } - result, err = client.GetContinuousWebJobResponder(resp) + result, err = client.GetBackupStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure responding to request") } return } -// GetContinuousWebJobPreparer prepares the GetContinuousWebJob request. -func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// GetBackupStatusPreparer prepares the GetBackupStatus request. +func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -8865,41 +8894,41 @@ func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetContinuousWebJobSender sends the GetContinuousWebJob request. The method will close the +// GetBackupStatusSender sends the GetBackupStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetContinuousWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetBackupStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always +// GetBackupStatusResponder handles the response to the GetBackupStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetContinuousWebJobResponder(resp *http.Response) (result ContinuousWebJob, err error) { +func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result BackupItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetContinuousWebJobSlot description for Gets a continuous web job by its ID for an app, or a deployment slot. +// GetBackupStatusSlot description for Gets a backup of an app by its ID. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the -// production slot. -func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result ContinuousWebJob, err error) { +// name - name of the app. +// backupID - ID of the backup. +// slot - name of the deployment slot. If a slot is not specified, the API will get a backup of the production +// slot. +func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result BackupItem, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -8913,38 +8942,38 @@ func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGr 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("web.AppsClient", "GetContinuousWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetBackupStatusSlot", err.Error()) } - req, err := client.GetContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.GetBackupStatusSlotPreparer(ctx, resourceGroupName, name, backupID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetContinuousWebJobSlotSender(req) + resp, err := client.GetBackupStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure sending request") return } - result, err = client.GetContinuousWebJobSlotResponder(resp) + result, err = client.GetBackupStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure responding to request") } return } -// GetContinuousWebJobSlotPreparer prepares the GetContinuousWebJobSlot request. -func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// GetBackupStatusSlotPreparer prepares the GetBackupStatusSlot request. +func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -8955,39 +8984,39 @@ func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetContinuousWebJobSlotSender sends the GetContinuousWebJobSlot request. The method will close the +// GetBackupStatusSlotSender sends the GetBackupStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetBackupStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always +// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetContinuousWebJobSlotResponder(resp *http.Response) (result ContinuousWebJob, err error) { +func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (result BackupItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetDeployment description for Get a deployment by its ID for an app, or a deployment slot. +// GetConfiguration description for Gets the configuration of an app, such as platform version and bitness, default +// documents, virtual applications, Always On, etc. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - deployment ID. -func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) { +func (client AppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeployment") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfiguration") defer func() { sc := -1 if result.Response.Response != nil { @@ -9001,34 +9030,33 @@ func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName st 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("web.AppsClient", "GetDeployment", err.Error()) + return result, validation.NewError("web.AppsClient", "GetConfiguration", err.Error()) } - req, err := client.GetDeploymentPreparer(ctx, resourceGroupName, name, ID) + req, err := client.GetConfigurationPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", nil, "Failure preparing request") return } - resp, err := client.GetDeploymentSender(req) + resp, err := client.GetConfigurationSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure sending request") return } - result, err = client.GetDeploymentResponder(resp) + result, err = client.GetConfigurationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure responding to request") } return } -// GetDeploymentPreparer prepares the GetDeployment request. -func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { +// GetConfigurationPreparer prepares the GetConfiguration request. +func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceGroupName string, name 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), @@ -9042,21 +9070,21 @@ func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGrou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDeploymentSender sends the GetDeployment request. The method will close the +// GetConfigurationSender sends the GetConfiguration request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDeploymentSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetConfigurationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDeploymentResponder handles the response to the GetDeployment request. The method always +// GetConfigurationResponder handles the response to the GetConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9067,16 +9095,16 @@ func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Dep return } -// GetDeploymentSlot description for Get a deployment by its ID for an app, or a deployment slot. +// GetConfigurationSlot description for Gets the configuration of an app, such as platform version and bitness, default +// documents, virtual applications, Always On, etc. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - deployment ID. -// slot - name of the deployment slot. If a slot is not specified, the API gets a deployment for the production -// slot. -func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeploymentSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9090,34 +9118,33 @@ func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupNam 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("web.AppsClient", "GetDeploymentSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetConfigurationSlot", err.Error()) } - req, err := client.GetDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot) + req, err := client.GetConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", nil, "Failure preparing request") return } - resp, err := client.GetDeploymentSlotSender(req) + resp, err := client.GetConfigurationSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure sending request") return } - result, err = client.GetDeploymentSlotResponder(resp) + result, err = client.GetConfigurationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure responding to request") } return } -// GetDeploymentSlotPreparer prepares the GetDeploymentSlot request. -func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { +// GetConfigurationSlotPreparer prepares the GetConfigurationSlot request. +func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -9132,21 +9159,21 @@ func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDeploymentSlotSender sends the GetDeploymentSlot request. The method will close the +// GetConfigurationSlotSender sends the GetConfigurationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDeploymentSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetConfigurationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDeploymentSlotResponder handles the response to the GetDeploymentSlot request. The method always +// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9157,13 +9184,14 @@ func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result return } -// GetDiagnosticLogsConfiguration description for Gets the logging configuration of an app. +// GetConfigurationSnapshot description for Gets a snapshot of the configuration of an app at a previous point in time. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteLogsConfig, err error) { +// snapshotID - the ID of the snapshot to read. +func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result SiteConfigResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfiguration") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9177,35 +9205,36 @@ func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, res 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("web.AppsClient", "GetDiagnosticLogsConfiguration", err.Error()) + return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshot", err.Error()) } - req, err := client.GetDiagnosticLogsConfigurationPreparer(ctx, resourceGroupName, name) + req, err := client.GetConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", nil, "Failure preparing request") return } - resp, err := client.GetDiagnosticLogsConfigurationSender(req) + resp, err := client.GetConfigurationSnapshotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure sending request") return } - result, err = client.GetDiagnosticLogsConfigurationResponder(resp) + result, err = client.GetConfigurationSnapshotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure responding to request") } return } -// GetDiagnosticLogsConfigurationPreparer prepares the GetDiagnosticLogsConfiguration request. -func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetConfigurationSnapshotPreparer prepares the GetConfigurationSnapshot request. +func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotId": autorest.Encode("path", snapshotID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9217,21 +9246,21 @@ func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDiagnosticLogsConfigurationSender sends the GetDiagnosticLogsConfiguration request. The method will close the +// GetConfigurationSnapshotSender sends the GetConfigurationSnapshot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDiagnosticLogsConfigurationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetConfigurationSnapshotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDiagnosticLogsConfigurationResponder handles the response to the GetDiagnosticLogsConfiguration request. The method always +// GetConfigurationSnapshotResponder handles the response to the GetConfigurationSnapshot request. The method always // closes the http.Response Body. -func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Response) (result SiteLogsConfig, err error) { +func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) (result SiteConfigResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9242,15 +9271,17 @@ func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Resp return } -// GetDiagnosticLogsConfigurationSlot description for Gets the logging configuration of an app. +// GetConfigurationSnapshotSlot description for Gets a snapshot of the configuration of an app at a previous point in +// time. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will get the logging configuration -// for the production slot. -func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteLogsConfig, err error) { +// snapshotID - the ID of the snapshot to read. +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result SiteConfigResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshotSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9264,36 +9295,37 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, 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("web.AppsClient", "GetDiagnosticLogsConfigurationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshotSlot", err.Error()) } - req, err := client.GetDiagnosticLogsConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", nil, "Failure preparing request") return } - resp, err := client.GetDiagnosticLogsConfigurationSlotSender(req) + resp, err := client.GetConfigurationSnapshotSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure sending request") return } - result, err = client.GetDiagnosticLogsConfigurationSlotResponder(resp) + result, err = client.GetConfigurationSnapshotSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure responding to request") } return } -// GetDiagnosticLogsConfigurationSlotPreparer prepares the GetDiagnosticLogsConfigurationSlot request. -func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetConfigurationSnapshotSlotPreparer prepares the GetConfigurationSnapshotSlot request. +func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), + "snapshotId": autorest.Encode("path", snapshotID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9305,21 +9337,21 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context. preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDiagnosticLogsConfigurationSlotSender sends the GetDiagnosticLogsConfigurationSlot request. The method will close the +// GetConfigurationSnapshotSlotSender sends the GetConfigurationSnapshotSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDiagnosticLogsConfigurationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDiagnosticLogsConfigurationSlotResponder handles the response to the GetDiagnosticLogsConfigurationSlot request. The method always +// GetConfigurationSnapshotSlotResponder handles the response to the GetConfigurationSnapshotSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) { +func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Response) (result SiteConfigResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9330,14 +9362,13 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http. return } -// GetDomainOwnershipIdentifier description for Get domain ownership identifier for web app. +// GetContainerLogsZip description for Gets the ZIP archived docker log files for the given site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// domainOwnershipIdentifierName - name of domain ownership identifier. -func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result Identifier, err error) { +// name - name of web app. +func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifier") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZip") defer func() { sc := -1 if result.Response.Response != nil { @@ -9351,37 +9382,36 @@ func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resou 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("web.AppsClient", "GetDomainOwnershipIdentifier", err.Error()) + return result, validation.NewError("web.AppsClient", "GetContainerLogsZip", err.Error()) } - req, err := client.GetDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName) + req, err := client.GetContainerLogsZipPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", nil, "Failure preparing request") return } - resp, err := client.GetDomainOwnershipIdentifierSender(req) + resp, err := client.GetContainerLogsZipSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure sending request") return } - result, err = client.GetDomainOwnershipIdentifierResponder(resp) + result, err = client.GetContainerLogsZipResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure responding to request") } return } -// GetDomainOwnershipIdentifierPreparer prepares the GetDomainOwnershipIdentifier request. -func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) { +// GetContainerLogsZipPreparer prepares the GetContainerLogsZip request. +func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -9390,43 +9420,40 @@ func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Contex } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDomainOwnershipIdentifierSender sends the GetDomainOwnershipIdentifier request. The method will close the +// GetContainerLogsZipSender sends the GetContainerLogsZip request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetContainerLogsZipSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDomainOwnershipIdentifierResponder handles the response to the GetDomainOwnershipIdentifier request. The method always +// GetContainerLogsZipResponder handles the response to the GetContainerLogsZip request. The method always // closes the http.Response Body. -func (client AppsClient) GetDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) { +func (client AppsClient) GetContainerLogsZipResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) result.Response = autorest.Response{Response: resp} return } -// GetDomainOwnershipIdentifierSlot description for Get domain ownership identifier for web app. +// GetContainerLogsZipSlot description for Gets the ZIP archived docker log files for the given site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// domainOwnershipIdentifierName - name of domain ownership identifier. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the -// production slot. -func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result Identifier, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifierSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZipSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9440,38 +9467,37 @@ func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, r 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("web.AppsClient", "GetDomainOwnershipIdentifierSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetContainerLogsZipSlot", err.Error()) } - req, err := client.GetDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot) + req, err := client.GetContainerLogsZipSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", nil, "Failure preparing request") return } - resp, err := client.GetDomainOwnershipIdentifierSlotSender(req) + resp, err := client.GetContainerLogsZipSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure sending request") return } - result, err = client.GetDomainOwnershipIdentifierSlotResponder(resp) + result, err = client.GetContainerLogsZipSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure responding to request") } return } -// GetDomainOwnershipIdentifierSlotPreparer prepares the GetDomainOwnershipIdentifierSlot request. -func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) { +// GetContainerLogsZipSlotPreparer prepares the GetContainerLogsZipSlot request. +func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -9480,41 +9506,40 @@ func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Co } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDomainOwnershipIdentifierSlotSender sends the GetDomainOwnershipIdentifierSlot request. The method will close the +// GetContainerLogsZipSlotSender sends the GetContainerLogsZipSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetContainerLogsZipSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDomainOwnershipIdentifierSlotResponder handles the response to the GetDomainOwnershipIdentifierSlot request. The method always +// GetContainerLogsZipSlotResponder handles the response to the GetContainerLogsZipSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) { +func (client AppsClient) GetContainerLogsZipSlotResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) result.Response = autorest.Response{Response: resp} return } -// GetFunction description for Get function information by its ID for web site, or a deployment slot. +// GetContinuousWebJob description for Gets a continuous web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// functionName - function name. -func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionEnvelope, err error) { +// webJobName - name of Web Job. +func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result ContinuousWebJob, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunction") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJob") defer func() { sc := -1 if result.Response.Response != nil { @@ -9528,37 +9553,37 @@ func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName stri 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("web.AppsClient", "GetFunction", err.Error()) + return result, validation.NewError("web.AppsClient", "GetContinuousWebJob", err.Error()) } - req, err := client.GetFunctionPreparer(ctx, resourceGroupName, name, functionName) + req, err := client.GetContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", nil, "Failure preparing request") return } - resp, err := client.GetFunctionSender(req) + resp, err := client.GetContinuousWebJobSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure sending request") return } - result, err = client.GetFunctionResponder(resp) + result, err = client.GetContinuousWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure responding to request") } return } -// GetFunctionPreparer prepares the GetFunction request. -func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { +// GetContinuousWebJobPreparer prepares the GetContinuousWebJob request. +func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -9569,21 +9594,21 @@ func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupN preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetFunctionSender sends the GetFunction request. The method will close the +// GetContinuousWebJobSender sends the GetContinuousWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetFunctionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetContinuousWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetFunctionResponder handles the response to the GetFunction request. The method always +// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) { +func (client AppsClient) GetContinuousWebJobResponder(resp *http.Response) (result ContinuousWebJob, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9594,13 +9619,16 @@ func (client AppsClient) GetFunctionResponder(resp *http.Response) (result Funct return } -// GetFunctionsAdminToken description for Fetch a short lived token that can be exchanged for a master key. +// GetContinuousWebJobSlot description for Gets a continuous web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string) (result String, err error) { +// name - site name. +// webJobName - name of Web Job. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result ContinuousWebJob, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminToken") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJobSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9614,36 +9642,38 @@ func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGro 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("web.AppsClient", "GetFunctionsAdminToken", err.Error()) + return result, validation.NewError("web.AppsClient", "GetContinuousWebJobSlot", err.Error()) } - req, err := client.GetFunctionsAdminTokenPreparer(ctx, resourceGroupName, name) + req, err := client.GetContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.GetFunctionsAdminTokenSender(req) + resp, err := client.GetContinuousWebJobSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure sending request") return } - result, err = client.GetFunctionsAdminTokenResponder(resp) + result, err = client.GetContinuousWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure responding to request") } return } -// GetFunctionsAdminTokenPreparer prepares the GetFunctionsAdminToken request. -func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetContinuousWebJobSlotPreparer prepares the GetContinuousWebJobSlot request. +func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -9654,39 +9684,39 @@ func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetFunctionsAdminTokenSender sends the GetFunctionsAdminToken request. The method will close the +// GetContinuousWebJobSlotSender sends the GetContinuousWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetFunctionsAdminTokenSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken request. The method always +// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetFunctionsAdminTokenResponder(resp *http.Response) (result String, err error) { +func (client AppsClient) GetContinuousWebJobSlotResponder(resp *http.Response) (result ContinuousWebJob, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetFunctionsAdminTokenSlot description for Fetch a short lived token that can be exchanged for a master key. +// GetDeployment description for Get a deployment by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result String, err error) { +// name - name of the app. +// ID - deployment ID. +func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminTokenSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeployment") defer func() { sc := -1 if result.Response.Response != nil { @@ -9700,36 +9730,36 @@ func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourc 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("web.AppsClient", "GetFunctionsAdminTokenSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDeployment", err.Error()) } - req, err := client.GetFunctionsAdminTokenSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetDeploymentPreparer(ctx, resourceGroupName, name, ID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", nil, "Failure preparing request") return } - resp, err := client.GetFunctionsAdminTokenSlotSender(req) + resp, err := client.GetDeploymentSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure sending request") return } - result, err = client.GetFunctionsAdminTokenSlotResponder(resp) + result, err = client.GetDeploymentResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure responding to request") } return } -// GetFunctionsAdminTokenSlotPreparer prepares the GetFunctionsAdminTokenSlot request. -func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetDeploymentPreparer prepares the GetDeployment request. +func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9741,39 +9771,41 @@ func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetFunctionsAdminTokenSlotSender sends the GetFunctionsAdminTokenSlot request. The method will close the +// GetDeploymentSender sends the GetDeployment request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetFunctionsAdminTokenSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDeploymentSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always +// GetDeploymentResponder handles the response to the GetDeployment request. The method always // closes the http.Response Body. -func (client AppsClient) GetFunctionsAdminTokenSlotResponder(resp *http.Response) (result String, err error) { +func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Deployment, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetHostNameBinding description for Get the named hostname binding for an app (or deployment slot, if specified). +// GetDeploymentSlot description for Get a deployment by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// hostName - hostname in the hostname binding. -func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result HostNameBinding, err error) { +// ID - deployment ID. +// slot - name of the deployment slot. If a slot is not specified, the API gets a deployment for the production +// slot. +func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBinding") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeploymentSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9787,36 +9819,37 @@ func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupNa 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("web.AppsClient", "GetHostNameBinding", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDeploymentSlot", err.Error()) } - req, err := client.GetHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) + req, err := client.GetDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", nil, "Failure preparing request") return } - resp, err := client.GetHostNameBindingSender(req) + resp, err := client.GetDeploymentSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure sending request") return } - result, err = client.GetHostNameBindingResponder(resp) + result, err = client.GetDeploymentSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure responding to request") } return } -// GetHostNameBindingPreparer prepares the GetHostNameBinding request. -func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) { +// GetDeploymentSlotPreparer prepares the GetDeploymentSlot request. +func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9828,21 +9861,21 @@ func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHostNameBindingSender sends the GetHostNameBinding request. The method will close the +// GetDeploymentSlotSender sends the GetDeploymentSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetHostNameBindingSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDeploymentSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetHostNameBindingResponder handles the response to the GetHostNameBinding request. The method always +// GetDeploymentSlotResponder handles the response to the GetDeploymentSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { +func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9853,16 +9886,13 @@ func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (resul return } -// GetHostNameBindingSlot description for Get the named hostname binding for an app (or deployment slot, if specified). +// GetDiagnosticLogsConfiguration description for Gets the logging configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production -// slot. -// hostName - hostname in the hostname binding. -func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result HostNameBinding, err error) { +func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteLogsConfig, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBindingSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfiguration") defer func() { sc := -1 if result.Response.Response != nil { @@ -9876,37 +9906,35 @@ func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGro 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("web.AppsClient", "GetHostNameBindingSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfiguration", err.Error()) } - req, err := client.GetHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) + req, err := client.GetDiagnosticLogsConfigurationPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", nil, "Failure preparing request") return } - resp, err := client.GetHostNameBindingSlotSender(req) + resp, err := client.GetDiagnosticLogsConfigurationSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure sending request") return } - result, err = client.GetHostNameBindingSlotResponder(resp) + result, err = client.GetDiagnosticLogsConfigurationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure responding to request") } return } -// GetHostNameBindingSlotPreparer prepares the GetHostNameBindingSlot request. -func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) { +// GetDiagnosticLogsConfigurationPreparer prepares the GetDiagnosticLogsConfiguration request. +func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9918,21 +9946,21 @@ func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHostNameBindingSlotSender sends the GetHostNameBindingSlot request. The method will close the +// GetDiagnosticLogsConfigurationSender sends the GetDiagnosticLogsConfiguration request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDiagnosticLogsConfigurationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetHostNameBindingSlotResponder handles the response to the GetHostNameBindingSlot request. The method always +// GetDiagnosticLogsConfigurationResponder handles the response to the GetDiagnosticLogsConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) { +func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Response) (result SiteLogsConfig, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9943,15 +9971,15 @@ func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (r return } -// GetHybridConnection description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. +// GetDiagnosticLogsConfigurationSlot description for Gets the logging configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will get the logging configuration +// for the production slot. +func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteLogsConfig, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfigurationSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9965,37 +9993,36 @@ func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupN 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("web.AppsClient", "GetHybridConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfigurationSlot", err.Error()) } - req, err := client.GetHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) + req, err := client.GetDiagnosticLogsConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", nil, "Failure preparing request") return } - resp, err := client.GetHybridConnectionSender(req) + resp, err := client.GetDiagnosticLogsConfigurationSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure sending request") return } - result, err = client.GetHybridConnectionResponder(resp) + result, err = client.GetDiagnosticLogsConfigurationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure responding to request") } return } -// GetHybridConnectionPreparer prepares the GetHybridConnection request. -func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) { +// GetDiagnosticLogsConfigurationSlotPreparer prepares the GetDiagnosticLogsConfigurationSlot request. +func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10007,21 +10034,21 @@ func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHybridConnectionSender sends the GetHybridConnection request. The method will close the +// GetDiagnosticLogsConfigurationSlotSender sends the GetDiagnosticLogsConfigurationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetHybridConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDiagnosticLogsConfigurationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetHybridConnectionResponder handles the response to the GetHybridConnection request. The method always +// GetDiagnosticLogsConfigurationSlotResponder handles the response to the GetDiagnosticLogsConfigurationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) { +func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10032,16 +10059,14 @@ func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (resu return } -// GetHybridConnectionSlot description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. +// GetDomainOwnershipIdentifier description for Get domain ownership identifier for web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -// slot - the name of the slot for the web app. -func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnection, err error) { +// name - name of the app. +// domainOwnershipIdentifierName - name of domain ownership identifier. +func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result Identifier, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifier") defer func() { sc := -1 if result.Response.Response != nil { @@ -10055,39 +10080,37 @@ func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGr 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("web.AppsClient", "GetHybridConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifier", err.Error()) } - req, err := client.GetHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) + req, err := client.GetDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", nil, "Failure preparing request") return } - resp, err := client.GetHybridConnectionSlotSender(req) + resp, err := client.GetDomainOwnershipIdentifierSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure sending request") return } - result, err = client.GetHybridConnectionSlotResponder(resp) + result, err = client.GetDomainOwnershipIdentifierResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure responding to request") } return } -// GetHybridConnectionSlotPreparer prepares the GetHybridConnectionSlot request. -func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) { +// GetDomainOwnershipIdentifierPreparer prepares the GetDomainOwnershipIdentifier request. +func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -10098,21 +10121,21 @@ func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHybridConnectionSlotSender sends the GetHybridConnectionSlot request. The method will close the +// GetDomainOwnershipIdentifierSender sends the GetDomainOwnershipIdentifier request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetHybridConnectionSlotResponder handles the response to the GetHybridConnectionSlot request. The method always +// GetDomainOwnershipIdentifierResponder handles the response to the GetDomainOwnershipIdentifier request. The method always // closes the http.Response Body. -func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) { +func (client AppsClient) GetDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10123,15 +10146,16 @@ func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) ( return } -// GetInstanceFunctionSlot description for Get function information by its ID for web site, or a deployment slot. +// GetDomainOwnershipIdentifierSlot description for Get domain ownership identifier for web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// functionName - function name. -// slot - name of the deployment slot. -func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) { +// name - name of the app. +// domainOwnershipIdentifierName - name of domain ownership identifier. +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result Identifier, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceFunctionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifierSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10145,38 +10169,38 @@ func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGr 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("web.AppsClient", "GetInstanceFunctionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifierSlot", err.Error()) } - req, err := client.GetInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) + req, err := client.GetDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceFunctionSlotSender(req) + resp, err := client.GetDomainOwnershipIdentifierSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceFunctionSlotResponder(resp) + result, err = client.GetDomainOwnershipIdentifierSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure responding to request") } return } -// GetInstanceFunctionSlotPreparer prepares the GetInstanceFunctionSlot request. -func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { +// GetDomainOwnershipIdentifierSlotPreparer prepares the GetDomainOwnershipIdentifierSlot request. +func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -10187,38 +10211,39 @@ func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceFunctionSlotSender sends the GetInstanceFunctionSlot request. The method will close the +// GetDomainOwnershipIdentifierSlotSender sends the GetDomainOwnershipIdentifierSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always +// GetDomainOwnershipIdentifierSlotResponder handles the response to the GetDomainOwnershipIdentifierSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) { +func (client AppsClient) GetDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceInfo description for Gets all scale-out instances of an app. +// GetFunction description for Get function information by its ID for web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string) (result SiteInstanceStatus, err error) { +// name - site name. +// functionName - function name. +func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionEnvelope, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfo") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunction") defer func() { sc := -1 if result.Response.Response != nil { @@ -10232,34 +10257,34 @@ func (client AppsClient) GetInstanceInfo(ctx context.Context, 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("web.AppsClient", "GetInstanceInfo", err.Error()) + return result, validation.NewError("web.AppsClient", "GetFunction", err.Error()) } - req, err := client.GetInstanceInfoPreparer(ctx, resourceGroupName, name, instanceID) + req, err := client.GetFunctionPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request") return } - resp, err := client.GetInstanceInfoSender(req) + resp, err := client.GetFunctionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure sending request") return } - result, err = client.GetInstanceInfoResponder(resp) + result, err = client.GetFunctionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure responding to request") } return } -// GetInstanceInfoPreparer prepares the GetInstanceInfo request. -func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { +// GetFunctionPreparer prepares the GetFunction request. +func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -10273,39 +10298,38 @@ func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceInfoSender sends the GetInstanceInfo request. The method will close the +// GetFunctionSender sends the GetFunction request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceInfoSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetFunctionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceInfoResponder handles the response to the GetInstanceInfo request. The method always +// GetFunctionResponder handles the response to the GetFunction request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceInfoResponder(resp *http.Response) (result SiteInstanceStatus, err error) { +func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceInfoSlot description for Gets all scale-out instances of an app. +// GetFunctionsAdminToken description for Fetch a short lived token that can be exchanged for a master key. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API gets the production slot instances. -func (client AppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (result SiteInstanceStatus, err error) { +// name - name of web app. +func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string) (result String, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfoSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminToken") defer func() { sc := -1 if result.Response.Response != nil { @@ -10319,37 +10343,35 @@ func (client AppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupN 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("web.AppsClient", "GetInstanceInfoSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetFunctionsAdminToken", err.Error()) } - req, err := client.GetInstanceInfoSlotPreparer(ctx, resourceGroupName, name, instanceID, slot) + req, err := client.GetFunctionsAdminTokenPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request") return } - resp, err := client.GetInstanceInfoSlotSender(req) + resp, err := client.GetFunctionsAdminTokenSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure sending request") return } - result, err = client.GetInstanceInfoSlotResponder(resp) + result, err = client.GetFunctionsAdminTokenResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure responding to request") } return } -// GetInstanceInfoSlotPreparer prepares the GetInstanceInfoSlot request. -func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (*http.Request, error) { +// GetFunctionsAdminTokenPreparer prepares the GetFunctionsAdminToken request. +func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10361,39 +10383,39 @@ func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceInfoSlotSender sends the GetInstanceInfoSlot request. The method will close the +// GetFunctionsAdminTokenSender sends the GetFunctionsAdminToken request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceInfoSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetFunctionsAdminTokenSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceInfoSlotResponder handles the response to the GetInstanceInfoSlot request. The method always +// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceInfoSlotResponder(resp *http.Response) (result SiteInstanceStatus, err error) { +func (client AppsClient) GetFunctionsAdminTokenResponder(resp *http.Response) (result String, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation. +// GetFunctionsAdminTokenSlot description for Fetch a short lived token that can be exchanged for a master key. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of web app. -// instanceID - ID of web app instance. -func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployLog, err error) { +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result String, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLog") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminTokenSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10407,36 +10429,36 @@ func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGro 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("web.AppsClient", "GetInstanceMSDeployLog", err.Error()) + return result, validation.NewError("web.AppsClient", "GetFunctionsAdminTokenSlot", err.Error()) } - req, err := client.GetInstanceMSDeployLogPreparer(ctx, resourceGroupName, name, instanceID) + req, err := client.GetFunctionsAdminTokenSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMSDeployLogSender(req) + resp, err := client.GetFunctionsAdminTokenSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceMSDeployLogResponder(resp) + result, err = client.GetFunctionsAdminTokenSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure responding to request") } return } -// GetInstanceMSDeployLogPreparer prepares the GetInstanceMSDeployLog request. -func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { +// GetFunctionsAdminTokenSlotPreparer prepares the GetFunctionsAdminTokenSlot request. +func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10448,40 +10470,39 @@ func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog request. The method will close the +// GetFunctionsAdminTokenSlotSender sends the GetFunctionsAdminTokenSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceMSDeployLogSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetFunctionsAdminTokenSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always +// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetFunctionsAdminTokenSlotResponder(resp *http.Response) (result String, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation. +// GetHostNameBinding description for Get the named hostname binding for an app (or deployment slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -// instanceID - ID of web app instance. -func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployLog, err error) { +// name - name of the app. +// hostName - hostname in the hostname binding. +func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result HostNameBinding, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLogSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBinding") defer func() { sc := -1 if result.Response.Response != nil { @@ -10495,37 +10516,36 @@ func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourc 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("web.AppsClient", "GetInstanceMSDeployLogSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetHostNameBinding", err.Error()) } - req, err := client.GetInstanceMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) + req, err := client.GetHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMSDeployLogSlotSender(req) + resp, err := client.GetHostNameBindingSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure sending request") return } - result, err = client.GetInstanceMSDeployLogSlotResponder(resp) + result, err = client.GetHostNameBindingResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure responding to request") } return } -// GetInstanceMSDeployLogSlotPreparer prepares the GetInstanceMSDeployLogSlot request. -func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { +// GetHostNameBindingPreparer prepares the GetHostNameBinding request. +func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10537,39 +10557,41 @@ func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot request. The method will close the +// GetHostNameBindingSender sends the GetHostNameBinding request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetHostNameBindingSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always +// GetHostNameBindingResponder handles the response to the GetHostNameBinding request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceMsDeployStatus description for Get the status of the last MSDeploy operation. +// GetHostNameBindingSlot description for Get the named hostname binding for an app (or deployment slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// instanceID - ID of web app instance. -func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployStatus, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production +// slot. +// hostName - hostname in the hostname binding. +func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result HostNameBinding, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBindingSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10583,36 +10605,37 @@ func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resource 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("web.AppsClient", "GetInstanceMsDeployStatus", err.Error()) + return result, validation.NewError("web.AppsClient", "GetHostNameBindingSlot", err.Error()) } - req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID) + req, err := client.GetHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMsDeployStatusSender(req) + resp, err := client.GetHostNameBindingSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceMsDeployStatusResponder(resp) + result, err = client.GetHostNameBindingSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure responding to request") } return } -// GetInstanceMsDeployStatusPreparer prepares the GetInstanceMsDeployStatus request. -func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { +// GetHostNameBindingSlotPreparer prepares the GetHostNameBindingSlot request. +func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10624,21 +10647,21 @@ func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus request. The method will close the +// GetHostNameBindingSlotSender sends the GetHostNameBindingSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceMsDeployStatusSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always +// GetHostNameBindingSlotResponder handles the response to the GetHostNameBindingSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10649,15 +10672,15 @@ func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) return } -// GetInstanceMsDeployStatusSlot description for Get the status of the last MSDeploy operation. +// GetHybridConnection description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -// instanceID - ID of web app instance. -func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -10671,37 +10694,37 @@ func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, reso 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("web.AppsClient", "GetInstanceMsDeployStatusSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetHybridConnection", err.Error()) } - req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) + req, err := client.GetHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMsDeployStatusSlotSender(req) + resp, err := client.GetHybridConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure sending request") return } - result, err = client.GetInstanceMsDeployStatusSlotResponder(resp) + result, err = client.GetHybridConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure responding to request") } return } -// GetInstanceMsDeployStatusSlotPreparer prepares the GetInstanceMsDeployStatusSlot request. -func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { +// GetHybridConnectionPreparer prepares the GetHybridConnection request. +func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10713,21 +10736,21 @@ func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot request. The method will close the +// GetHybridConnectionSender sends the GetHybridConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceMsDeployStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetHybridConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always +// GetHybridConnectionResponder handles the response to the GetHybridConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10738,17 +10761,16 @@ func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Respo return } -// GetInstanceProcess description for Get process information by its ID for a specific scaled-out instance in a web -// site. +// GetHybridConnectionSlot description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessInfo, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +// slot - the name of the slot for the web app. +func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10762,37 +10784,38 @@ func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupNa 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("web.AppsClient", "GetInstanceProcess", err.Error()) + return result, validation.NewError("web.AppsClient", "GetHybridConnectionSlot", err.Error()) } - req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) + req, err := client.GetHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessSender(req) + resp, err := client.GetHybridConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessResponder(resp) + result, err = client.GetHybridConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessPreparer prepares the GetInstanceProcess request. -func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { +// GetHybridConnectionSlotPreparer prepares the GetHybridConnectionSlot request. +func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10804,42 +10827,40 @@ func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessSender sends the GetInstanceProcess request. The method will close the +// GetHybridConnectionSlotSender sends the GetHybridConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always +// GetHybridConnectionSlotResponder handles the response to the GetHybridConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance -// in a web site. +// GetInstanceFunctionSlot description for Get function information by its ID for web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// processID - pID. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ReadCloser, err error) { +// functionName - function name. +// slot - name of the deployment slot. +func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDump") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceFunctionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10853,37 +10874,37 @@ func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGro 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("web.AppsClient", "GetInstanceProcessDump", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceFunctionSlot", err.Error()) } - req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID) + req, err := client.GetInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessDumpSender(req) + resp, err := client.GetInstanceFunctionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessDumpResponder(resp) + result, err = client.GetInstanceFunctionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessDumpPreparer prepares the GetInstanceProcessDump request. -func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { +// GetInstanceFunctionSlotPreparer prepares the GetInstanceFunctionSlot request. +func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10895,43 +10916,38 @@ func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessDumpSender sends the GetInstanceProcessDump request. The method will close the +// GetInstanceFunctionSlotSender sends the GetInstanceFunctionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessDumpSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always +// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out -// instance in a web site. +// GetInstanceInfo description for Gets all scale-out instances of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ReadCloser, err error) { +// name - name of the app. +func (client AppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string) (result SiteInstanceStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDumpSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfo") defer func() { sc := -1 if result.Response.Response != nil { @@ -10945,38 +10961,36 @@ func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourc 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("web.AppsClient", "GetInstanceProcessDumpSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceInfo", err.Error()) } - req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) + req, err := client.GetInstanceInfoPreparer(ctx, resourceGroupName, name, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessDumpSlotSender(req) + resp, err := client.GetInstanceInfoSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessDumpSlotResponder(resp) + result, err = client.GetInstanceInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure responding to request") } return } -// GetInstanceProcessDumpSlotPreparer prepares the GetInstanceProcessDumpSlot request. -func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { +// GetInstanceInfoPreparer prepares the GetInstanceInfo request. +func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10988,42 +11002,39 @@ func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot request. The method will close the +// GetInstanceInfoSender sends the GetInstanceInfo request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessDumpSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceInfoSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always +// GetInstanceInfoResponder handles the response to the GetInstanceInfo request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetInstanceInfoResponder(resp *http.Response) (result SiteInstanceStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceProcessModule description for Get process information by its ID for a specific scaled-out instance in a -// web site. +// GetInstanceInfoSlot description for Gets all scale-out instances of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// baseAddress - module base address. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (result ProcessModuleInfo, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API gets the production slot instances. +func (client AppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (result SiteInstanceStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModule") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfoSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11037,38 +11048,37 @@ func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceG 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("web.AppsClient", "GetInstanceProcessModule", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceInfoSlot", err.Error()) } - req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID) + req, err := client.GetInstanceInfoSlotPreparer(ctx, resourceGroupName, name, instanceID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessModuleSender(req) + resp, err := client.GetInstanceInfoSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessModuleResponder(resp) + result, err = client.GetInstanceInfoSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessModulePreparer prepares the GetInstanceProcessModule request. -func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (*http.Request, error) { +// GetInstanceInfoSlotPreparer prepares the GetInstanceInfoSlot request. +func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "baseAddress": autorest.Encode("path", baseAddress), "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11080,45 +11090,39 @@ func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessModuleSender sends the GetInstanceProcessModule request. The method will close the +// GetInstanceInfoSlotSender sends the GetInstanceInfoSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessModuleSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceInfoSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always +// GetInstanceInfoSlotResponder handles the response to the GetInstanceInfoSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetInstanceInfoSlotResponder(resp *http.Response) (result SiteInstanceStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in -// a web site. +// GetInstanceMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// baseAddress - module base address. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (result ProcessModuleInfo, err error) { +// name - name of web app. +// instanceID - ID of web app instance. +func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployLog, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModuleSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLog") defer func() { sc := -1 if result.Response.Response != nil { @@ -11132,39 +11136,36 @@ func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resou 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("web.AppsClient", "GetInstanceProcessModuleSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLog", err.Error()) } - req, err := client.GetInstanceProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID) + req, err := client.GetInstanceMSDeployLogPreparer(ctx, resourceGroupName, name, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessModuleSlotSender(req) + resp, err := client.GetInstanceMSDeployLogSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessModuleSlotResponder(resp) + result, err = client.GetInstanceMSDeployLogResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request") } return } -// GetInstanceProcessModuleSlotPreparer prepares the GetInstanceProcessModuleSlot request. -func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (*http.Request, error) { +// GetInstanceMSDeployLogPreparer prepares the GetInstanceMSDeployLog request. +func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "baseAddress": autorest.Encode("path", baseAddress), "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11176,21 +11177,21 @@ func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessModuleSlotSender sends the GetInstanceProcessModuleSlot request. The method will close the +// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessModuleSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMSDeployLogSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot request. The method always +// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11201,19 +11202,15 @@ func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Respon return } -// GetInstanceProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web -// site. +// GetInstanceMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessInfo, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +// instanceID - ID of web app instance. +func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployLog, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLogSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11227,36 +11224,35 @@ func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGro 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("web.AppsClient", "GetInstanceProcessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLogSlot", err.Error()) } - req, err := client.GetInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) + req, err := client.GetInstanceMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessSlotSender(req) + resp, err := client.GetInstanceMSDeployLogSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessSlotResponder(resp) + result, err = client.GetInstanceMSDeployLogSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessSlotPreparer prepares the GetInstanceProcessSlot request. -func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { +// GetInstanceMSDeployLogSlotPreparer prepares the GetInstanceMSDeployLogSlot request. +func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -11270,21 +11266,21 @@ func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessSlotSender sends the GetInstanceProcessSlot request. The method will close the +// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always +// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11295,14 +11291,14 @@ func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (r return } -// GetMigrateMySQLStatus description for Returns the status of MySql in app migration, if one is active, and whether or -// not MySql in app is enabled +// GetInstanceMsDeployStatus description for Get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of web app. -func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) { +// instanceID - ID of web app instance. +func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -11316,33 +11312,34 @@ func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGrou 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("web.AppsClient", "GetMigrateMySQLStatus", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatus", err.Error()) } - req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request") return } - resp, err := client.GetMigrateMySQLStatusSender(req) + resp, err := client.GetInstanceMsDeployStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request") return } - result, err = client.GetMigrateMySQLStatusResponder(resp) + result, err = client.GetInstanceMsDeployStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request") } return } -// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request. -func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetInstanceMsDeployStatusPreparer prepares the GetInstanceMsDeployStatus request. +func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -11356,21 +11353,21 @@ func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the +// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMsDeployStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always +// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { +func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11381,15 +11378,15 @@ func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (re return } -// GetMigrateMySQLStatusSlot description for Returns the status of MySql in app migration, if one is active, and -// whether or not MySql in app is enabled +// GetInstanceMsDeployStatusSlot description for Get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of web app. -// slot - name of the deployment slot. -func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) { +// slot - name of web app slot. If not specified then will default to production slot. +// instanceID - ID of web app instance. +func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11403,33 +11400,34 @@ func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resource 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("web.AppsClient", "GetMigrateMySQLStatusSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatusSlot", err.Error()) } - req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetMigrateMySQLStatusSlotSender(req) + resp, err := client.GetInstanceMsDeployStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request") return } - result, err = client.GetMigrateMySQLStatusSlotResponder(resp) + result, err = client.GetInstanceMsDeployStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request") } return } -// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request. -func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetInstanceMsDeployStatusSlotPreparer prepares the GetInstanceMsDeployStatusSlot request. +func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -11444,21 +11442,21 @@ func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the +// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMsDeployStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always +// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { +func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11469,13 +11467,17 @@ func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) return } -// GetMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation. +// GetInstanceProcess description for Get process information by its ID for a specific scaled-out instance in a web +// site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string) (result MSDeployLog, err error) { +// name - site name. +// processID - pID. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLog") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcess") defer func() { sc := -1 if result.Response.Response != nil { @@ -11489,34 +11491,36 @@ func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName s 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("web.AppsClient", "GetMSDeployLog", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcess", err.Error()) } - req, err := client.GetMSDeployLogPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployLogSender(req) + resp, err := client.GetInstanceProcessSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure sending request") return } - result, err = client.GetMSDeployLogResponder(resp) + result, err = client.GetInstanceProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request") } return } -// GetMSDeployLogPreparer prepares the GetMSDeployLog request. -func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetInstanceProcessPreparer prepares the GetInstanceProcess request. +func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11529,21 +11533,21 @@ func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployLogSender sends the GetMSDeployLog request. The method will close the +// GetInstanceProcessSender sends the GetInstanceProcess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMSDeployLogSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always +// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11554,14 +11558,17 @@ func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MS return } -// GetMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation. +// GetInstanceProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance +// in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployLog, err error) { +// name - site name. +// processID - pID. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLogSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDump") defer func() { sc := -1 if result.Response.Response != nil { @@ -11575,36 +11582,37 @@ func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupNa 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("web.AppsClient", "GetMSDeployLogSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessDump", err.Error()) } - req, err := client.GetMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployLogSlotSender(req) + resp, err := client.GetInstanceProcessDumpSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure sending request") return } - result, err = client.GetMSDeployLogSlotResponder(resp) + result, err = client.GetInstanceProcessDumpResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request") } return } -// GetMSDeployLogSlotPreparer prepares the GetMSDeployLogSlot request. -func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetInstanceProcessDumpPreparer prepares the GetInstanceProcessDump request. +func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11616,38 +11624,43 @@ func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot request. The method will close the +// GetInstanceProcessDumpSender sends the GetInstanceProcessDump request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessDumpSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always +// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetInstanceProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetMSDeployStatus description for Get the status of the last MSDeploy operation. +// GetInstanceProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out +// instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string) (result MSDeployStatus, err error) { +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDumpSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11661,35 +11674,38 @@ func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupNam 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("web.AppsClient", "GetMSDeployStatus", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessDumpSlot", err.Error()) } - req, err := client.GetMSDeployStatusPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployStatusSender(req) + resp, err := client.GetInstanceProcessDumpSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure sending request") return } - result, err = client.GetMSDeployStatusResponder(resp) + result, err = client.GetInstanceProcessDumpSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request") } return } -// GetMSDeployStatusPreparer prepares the GetMSDeployStatus request. -func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetInstanceProcessDumpSlotPreparer prepares the GetInstanceProcessDumpSlot request. +func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11701,39 +11717,42 @@ func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployStatusSender sends the GetMSDeployStatus request. The method will close the +// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMSDeployStatusSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessDumpSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always +// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetInstanceProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetMSDeployStatusSlot description for Get the status of the last MSDeploy operation. +// GetInstanceProcessModule description for Get process information by its ID for a specific scaled-out instance in a +// web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployStatus, err error) { +// name - site name. +// processID - pID. +// baseAddress - module base address. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (result ProcessModuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModule") defer func() { sc := -1 if result.Response.Response != nil { @@ -11747,36 +11766,38 @@ func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGrou 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("web.AppsClient", "GetMSDeployStatusSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessModule", err.Error()) } - req, err := client.GetMSDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployStatusSlotSender(req) + resp, err := client.GetInstanceProcessModuleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure sending request") return } - result, err = client.GetMSDeployStatusSlotResponder(resp) + result, err = client.GetInstanceProcessModuleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request") } return } -// GetMSDeployStatusSlotPreparer prepares the GetMSDeployStatusSlot request. -func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetInstanceProcessModulePreparer prepares the GetInstanceProcessModule request. +func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "baseAddress": autorest.Encode("path", baseAddress), + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11788,40 +11809,45 @@ func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot request. The method will close the +// GetInstanceProcessModuleSender sends the GetInstanceProcessModule request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMSDeployStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessModuleSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always +// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraceOperation description for Gets a named operation for a network trace capturing (or deployment slot, -// if specified). +// GetInstanceProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in +// a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { +// name - site name. +// processID - pID. +// baseAddress - module base address. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (result ProcessModuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperation") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModuleSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11835,36 +11861,39 @@ func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceG 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("web.AppsClient", "GetNetworkTraceOperation", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessModuleSlot", err.Error()) } - req, err := client.GetNetworkTraceOperationPreparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetInstanceProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationSender(req) + resp, err := client.GetInstanceProcessModuleSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationResponder(resp) + result, err = client.GetInstanceProcessModuleSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure responding to request") } return } -// GetNetworkTraceOperationPreparer prepares the GetNetworkTraceOperation request. -func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { +// GetInstanceProcessModuleSlotPreparer prepares the GetInstanceProcessModuleSlot request. +func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "baseAddress": autorest.Encode("path", baseAddress), + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11876,42 +11905,44 @@ func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationSender sends the GetNetworkTraceOperation request. The method will close the +// GetInstanceProcessModuleSlotSender sends the GetInstanceProcessModuleSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTraceOperationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessModuleSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTraceOperationResponder handles the response to the GetNetworkTraceOperation request. The method always +// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraceOperationSlot description for Gets a named operation for a network trace capturing (or deployment -// slot, if specified). +// GetInstanceProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web +// site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the // production slot. -func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11925,35 +11956,36 @@ func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resou 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("web.AppsClient", "GetNetworkTraceOperationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessSlot", err.Error()) } - req, err := client.GetNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationSlotSender(req) + resp, err := client.GetInstanceProcessSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationSlotResponder(resp) + result, err = client.GetInstanceProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure responding to request") } return } -// GetNetworkTraceOperationSlotPreparer prepares the GetNetworkTraceOperationSlot request. -func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { +// GetInstanceProcessSlotPreparer prepares the GetInstanceProcessSlot request. +func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -11967,42 +11999,39 @@ func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationSlotSender sends the GetNetworkTraceOperationSlot request. The method will close the +// GetInstanceProcessSlotSender sends the GetInstanceProcessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTraceOperationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTraceOperationSlotResponder handles the response to the GetNetworkTraceOperationSlot request. The method always +// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraceOperationSlotV2 description for Gets a named operation for a network trace capturing (or deployment -// slot, if specified). +// GetMigrateMySQLStatus description for Returns the status of MySql in app migration, if one is active, and whether or +// not MySql in app is enabled // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the -// production slot. -func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { +// name - name of web app. +func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlotV2") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -12016,37 +12045,35 @@ func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, res 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("web.AppsClient", "GetNetworkTraceOperationSlotV2", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatus", err.Error()) } - req, err := client.GetNetworkTraceOperationSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationSlotV2Sender(req) + resp, err := client.GetMigrateMySQLStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationSlotV2Responder(resp) + result, err = client.GetMigrateMySQLStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request") } return } -// GetNetworkTraceOperationSlotV2Preparer prepares the GetNetworkTraceOperationSlotV2 request. -func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { +// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request. +func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12058,40 +12085,40 @@ func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationSlotV2Sender sends the GetNetworkTraceOperationSlotV2 request. The method will close the +// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTraceOperationSlotV2Sender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTraceOperationSlotV2Responder handles the response to the GetNetworkTraceOperationSlotV2 request. The method always +// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraceOperationV2 description for Gets a named operation for a network trace capturing (or deployment slot, -// if specified). +// GetMigrateMySQLStatusSlot description for Returns the status of MySql in app migration, if one is active, and +// whether or not MySql in app is enabled // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { +// name - name of web app. +// slot - name of the deployment slot. +func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationV2") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12105,36 +12132,36 @@ func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourc 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("web.AppsClient", "GetNetworkTraceOperationV2", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatusSlot", err.Error()) } - req, err := client.GetNetworkTraceOperationV2Preparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationV2Sender(req) + resp, err := client.GetMigrateMySQLStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationV2Responder(resp) + result, err = client.GetMigrateMySQLStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request") } return } -// GetNetworkTraceOperationV2Preparer prepares the GetNetworkTraceOperationV2 request. -func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { +// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request. +func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12146,40 +12173,38 @@ func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationV2Sender sends the GetNetworkTraceOperationV2 request. The method will close the +// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTraceOperationV2Sender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTraceOperationV2Responder handles the response to the GetNetworkTraceOperationV2 request. The method always +// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraces description for Gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -func (client AppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { +// name - name of web app. +func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string) (result MSDeployLog, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraces") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLog") defer func() { sc := -1 if result.Response.Response != nil { @@ -12193,35 +12218,34 @@ func (client AppsClient) GetNetworkTraces(ctx context.Context, 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("web.AppsClient", "GetNetworkTraces", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMSDeployLog", err.Error()) } - req, err := client.GetNetworkTracesPreparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetMSDeployLogPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTracesSender(req) + resp, err := client.GetMSDeployLogSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure sending request") return } - result, err = client.GetNetworkTracesResponder(resp) + result, err = client.GetMSDeployLogResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request") } return } -// GetNetworkTracesPreparer prepares the GetNetworkTraces request. -func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { +// GetMSDeployLogPreparer prepares the GetMSDeployLog request. +func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12234,42 +12258,39 @@ func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTracesSender sends the GetNetworkTraces request. The method will close the +// GetMSDeployLogSender sends the GetMSDeployLog request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTracesSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMSDeployLogSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTracesResponder handles the response to the GetNetworkTraces request. The method always +// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTracesResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTracesSlot description for Gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the -// production slot. -func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployLog, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLogSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12283,35 +12304,34 @@ func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroup 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("web.AppsClient", "GetNetworkTracesSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMSDeployLogSlot", err.Error()) } - req, err := client.GetNetworkTracesSlotPreparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTracesSlotSender(req) + resp, err := client.GetMSDeployLogSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTracesSlotResponder(resp) + result, err = client.GetMSDeployLogSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request") } return } -// GetNetworkTracesSlotPreparer prepares the GetNetworkTracesSlot request. -func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { +// GetMSDeployLogSlotPreparer prepares the GetMSDeployLogSlot request. +func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -12325,42 +12345,38 @@ func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTracesSlotSender sends the GetNetworkTracesSlot request. The method will close the +// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTracesSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTracesSlotResponder handles the response to the GetNetworkTracesSlot request. The method always +// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTracesSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTracesSlotV2 description for Gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMSDeployStatus description for Get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the -// production slot. -func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { +// name - name of web app. +func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string) (result MSDeployStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlotV2") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -12374,37 +12390,35 @@ func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGro 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("web.AppsClient", "GetNetworkTracesSlotV2", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMSDeployStatus", err.Error()) } - req, err := client.GetNetworkTracesSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetMSDeployStatusPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTracesSlotV2Sender(req) + resp, err := client.GetMSDeployStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure sending request") return } - result, err = client.GetNetworkTracesSlotV2Responder(resp) + result, err = client.GetMSDeployStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request") } return } -// GetNetworkTracesSlotV2Preparer prepares the GetNetworkTracesSlotV2 request. -func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { +// GetMSDeployStatusPreparer prepares the GetMSDeployStatus request. +func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12416,40 +12430,39 @@ func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTracesSlotV2Sender sends the GetNetworkTracesSlotV2 request. The method will close the +// GetMSDeployStatusSender sends the GetMSDeployStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTracesSlotV2Sender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMSDeployStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTracesSlotV2Responder handles the response to the GetNetworkTracesSlotV2 request. The method always +// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTracesSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTracesV2 description for Gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMSDeployStatusSlot description for Get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesV2") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12463,36 +12476,36 @@ func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupNa 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("web.AppsClient", "GetNetworkTracesV2", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMSDeployStatusSlot", err.Error()) } - req, err := client.GetNetworkTracesV2Preparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetMSDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTracesV2Sender(req) + resp, err := client.GetMSDeployStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTracesV2Responder(resp) + result, err = client.GetMSDeployStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request") } return } -// GetNetworkTracesV2Preparer prepares the GetNetworkTracesV2 request. -func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { +// GetMSDeployStatusSlotPreparer prepares the GetMSDeployStatusSlot request. +func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12504,39 +12517,40 @@ func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTracesV2Sender sends the GetNetworkTracesV2 request. The method will close the +// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTracesV2Sender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMSDeployStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTracesV2Responder handles the response to the GetNetworkTracesV2 request. The method always +// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTracesV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPremierAddOn description for Gets a named add-on of an app. -// Parameters: +// GetNetworkTraceOperation description for Gets a named operation for a network trace capturing (or deployment slot, +// if specified). +// Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// premierAddOnName - add-on name. -func (client AppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result PremierAddOn, err error) { +// operationID - GUID of the operation. +func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOn") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperation") defer func() { sc := -1 if result.Response.Response != nil { @@ -12550,35 +12564,35 @@ func (client AppsClient) GetPremierAddOn(ctx context.Context, 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("web.AppsClient", "GetPremierAddOn", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperation", err.Error()) } - req, err := client.GetPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName) + req, err := client.GetNetworkTraceOperationPreparer(ctx, resourceGroupName, name, operationID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", nil, "Failure preparing request") return } - resp, err := client.GetPremierAddOnSender(req) + resp, err := client.GetNetworkTraceOperationSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure sending request") return } - result, err = client.GetPremierAddOnResponder(resp) + result, err = client.GetNetworkTraceOperationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure responding to request") } return } -// GetPremierAddOnPreparer prepares the GetPremierAddOn request. -func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) { +// GetNetworkTraceOperationPreparer prepares the GetNetworkTraceOperation request. +func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "premierAddOnName": autorest.Encode("path", premierAddOnName), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12591,41 +12605,42 @@ func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPremierAddOnSender sends the GetPremierAddOn request. The method will close the +// GetNetworkTraceOperationSender sends the GetNetworkTraceOperation request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPremierAddOnSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTraceOperationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPremierAddOnResponder handles the response to the GetPremierAddOn request. The method always +// GetNetworkTraceOperationResponder handles the response to the GetNetworkTraceOperation request. The method always // closes the http.Response Body. -func (client AppsClient) GetPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) { +func (client AppsClient) GetNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPremierAddOnSlot description for Gets a named add-on of an app. +// GetNetworkTraceOperationSlot description for Gets a named operation for a network trace capturing (or deployment +// slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// premierAddOnName - add-on name. -// slot - name of the deployment slot. If a slot is not specified, the API will get the named add-on for the +// operationID - GUID of the operation. +// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the // production slot. -func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result PremierAddOn, err error) { +func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOnSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12639,35 +12654,35 @@ func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupN 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("web.AppsClient", "GetPremierAddOnSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlot", err.Error()) } - req, err := client.GetPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot) + req, err := client.GetNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, operationID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", nil, "Failure preparing request") return } - resp, err := client.GetPremierAddOnSlotSender(req) + resp, err := client.GetNetworkTraceOperationSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure sending request") return } - result, err = client.GetPremierAddOnSlotResponder(resp) + result, err = client.GetNetworkTraceOperationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure responding to request") } return } -// GetPremierAddOnSlotPreparer prepares the GetPremierAddOnSlot request. -func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) { +// GetNetworkTraceOperationSlotPreparer prepares the GetNetworkTraceOperationSlot request. +func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "premierAddOnName": autorest.Encode("path", premierAddOnName), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -12681,39 +12696,42 @@ func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPremierAddOnSlotSender sends the GetPremierAddOnSlot request. The method will close the +// GetNetworkTraceOperationSlotSender sends the GetNetworkTraceOperationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPremierAddOnSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTraceOperationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPremierAddOnSlotResponder handles the response to the GetPremierAddOnSlot request. The method always +// GetNetworkTraceOperationSlotResponder handles the response to the GetNetworkTraceOperationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) { +func (client AppsClient) GetNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPrivateAccess description for Gets data around private site access enablement and authorized Virtual Networks -// that can access the site. +// GetNetworkTraceOperationSlotV2 description for Gets a named operation for a network trace capturing (or deployment +// slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -func (client AppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string) (result PrivateAccess, err error) { +// name - name of the app. +// operationID - GUID of the operation. +// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the +// production slot. +func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlotV2") defer func() { sc := -1 if result.Response.Response != nil { @@ -12727,35 +12745,37 @@ func (client AppsClient) GetPrivateAccess(ctx context.Context, 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("web.AppsClient", "GetPrivateAccess", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlotV2", err.Error()) } - req, err := client.GetPrivateAccessPreparer(ctx, resourceGroupName, name) + req, err := client.GetNetworkTraceOperationSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", nil, "Failure preparing request") return } - resp, err := client.GetPrivateAccessSender(req) + resp, err := client.GetNetworkTraceOperationSlotV2Sender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure sending request") return } - result, err = client.GetPrivateAccessResponder(resp) + result, err = client.GetNetworkTraceOperationSlotV2Responder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure responding to request") } return } -// GetPrivateAccessPreparer prepares the GetPrivateAccess request. -func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetNetworkTraceOperationSlotV2Preparer prepares the GetNetworkTraceOperationSlotV2 request. +func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12767,40 +12787,40 @@ func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrivateAccessSender sends the GetPrivateAccess request. The method will close the +// GetNetworkTraceOperationSlotV2Sender sends the GetNetworkTraceOperationSlotV2 request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPrivateAccessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTraceOperationSlotV2Sender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPrivateAccessResponder handles the response to the GetPrivateAccess request. The method always +// GetNetworkTraceOperationSlotV2Responder handles the response to the GetNetworkTraceOperationSlotV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetPrivateAccessResponder(resp *http.Response) (result PrivateAccess, err error) { +func (client AppsClient) GetNetworkTraceOperationSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPrivateAccessSlot description for Gets data around private site access enablement and authorized Virtual Networks -// that can access the site. +// GetNetworkTraceOperationV2 description for Gets a named operation for a network trace capturing (or deployment slot, +// if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// slot - the name of the slot for the web app. -func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateAccess, err error) { +// name - name of the app. +// operationID - GUID of the operation. +func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationV2") defer func() { sc := -1 if result.Response.Response != nil { @@ -12814,36 +12834,36 @@ func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroup 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("web.AppsClient", "GetPrivateAccessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationV2", err.Error()) } - req, err := client.GetPrivateAccessSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetNetworkTraceOperationV2Preparer(ctx, resourceGroupName, name, operationID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", nil, "Failure preparing request") return } - resp, err := client.GetPrivateAccessSlotSender(req) + resp, err := client.GetNetworkTraceOperationV2Sender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure sending request") return } - result, err = client.GetPrivateAccessSlotResponder(resp) + result, err = client.GetNetworkTraceOperationV2Responder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure responding to request") } return } -// GetPrivateAccessSlotPreparer prepares the GetPrivateAccessSlot request. -func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetNetworkTraceOperationV2Preparer prepares the GetNetworkTraceOperationV2 request. +func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12855,39 +12875,40 @@ func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrivateAccessSlotSender sends the GetPrivateAccessSlot request. The method will close the +// GetNetworkTraceOperationV2Sender sends the GetNetworkTraceOperationV2 request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPrivateAccessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTraceOperationV2Sender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPrivateAccessSlotResponder handles the response to the GetPrivateAccessSlot request. The method always +// GetNetworkTraceOperationV2Responder handles the response to the GetNetworkTraceOperationV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetPrivateAccessSlotResponder(resp *http.Response) (result PrivateAccess, err error) { +func (client AppsClient) GetNetworkTraceOperationV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcess description for Get process information by its ID for a specific scaled-out instance in a web site. +// GetNetworkTraces description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessInfo, err error) { +// name - name of the app. +// operationID - GUID of the operation. +func (client AppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraces") defer func() { sc := -1 if result.Response.Response != nil { @@ -12901,35 +12922,35 @@ func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName strin 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("web.AppsClient", "GetProcess", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraces", err.Error()) } - req, err := client.GetProcessPreparer(ctx, resourceGroupName, name, processID) + req, err := client.GetNetworkTracesPreparer(ctx, resourceGroupName, name, operationID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", nil, "Failure preparing request") return } - resp, err := client.GetProcessSender(req) + resp, err := client.GetNetworkTracesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure sending request") return } - result, err = client.GetProcessResponder(resp) + result, err = client.GetNetworkTracesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure responding to request") } return } -// GetProcessPreparer prepares the GetProcess request. -func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { +// GetNetworkTracesPreparer prepares the GetNetworkTraces request. +func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12942,40 +12963,42 @@ func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupNa preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessSender sends the GetProcess request. The method will close the +// GetNetworkTracesSender sends the GetNetworkTraces request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTracesSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessResponder handles the response to the GetProcess request. The method always +// GetNetworkTracesResponder handles the response to the GetNetworkTraces request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetNetworkTracesResponder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web -// site. +// GetNetworkTracesSlot description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string) (result ReadCloser, err error) { +// name - name of the app. +// operationID - GUID of the operation. +// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the +// production slot. +func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDump") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12989,36 +13012,37 @@ func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName s 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("web.AppsClient", "GetProcessDump", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlot", err.Error()) } - req, err := client.GetProcessDumpPreparer(ctx, resourceGroupName, name, processID) + req, err := client.GetNetworkTracesSlotPreparer(ctx, resourceGroupName, name, operationID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", nil, "Failure preparing request") return } - resp, err := client.GetProcessDumpSender(req) + resp, err := client.GetNetworkTracesSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure sending request") return } - result, err = client.GetProcessDumpResponder(resp) + result, err = client.GetNetworkTracesSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure responding to request") } return } -// GetProcessDumpPreparer prepares the GetProcessDump request. -func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { +// GetNetworkTracesSlotPreparer prepares the GetNetworkTracesSlot request. +func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13030,41 +13054,42 @@ func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessDumpSender sends the GetProcessDump request. The method will close the +// GetNetworkTracesSlotSender sends the GetNetworkTracesSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessDumpSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTracesSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessDumpResponder handles the response to the GetProcessDump request. The method always +// GetNetworkTracesSlotResponder handles the response to the GetNetworkTracesSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetNetworkTracesSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out instance in a -// web site. +// GetNetworkTracesSlotV2 description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// name - name of the app. +// operationID - GUID of the operation. +// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the // production slot. -func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ReadCloser, err error) { +func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDumpSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlotV2") defer func() { sc := -1 if result.Response.Response != nil { @@ -13078,35 +13103,35 @@ func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupNa 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("web.AppsClient", "GetProcessDumpSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlotV2", err.Error()) } - req, err := client.GetProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot) + req, err := client.GetNetworkTracesSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", nil, "Failure preparing request") return } - resp, err := client.GetProcessDumpSlotSender(req) + resp, err := client.GetNetworkTracesSlotV2Sender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure sending request") return } - result, err = client.GetProcessDumpSlotResponder(resp) + result, err = client.GetNetworkTracesSlotV2Responder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure responding to request") } return } -// GetProcessDumpSlotPreparer prepares the GetProcessDumpSlot request. -func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { +// GetNetworkTracesSlotV2Preparer prepares the GetNetworkTracesSlotV2 request. +func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -13120,39 +13145,40 @@ func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessDumpSlotSender sends the GetProcessDumpSlot request. The method will close the +// GetNetworkTracesSlotV2Sender sends the GetNetworkTracesSlotV2 request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessDumpSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTracesSlotV2Sender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot request. The method always +// GetNetworkTracesSlotV2Responder handles the response to the GetNetworkTracesSlotV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetNetworkTracesSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessModule description for Get process information by its ID for a specific scaled-out instance in a web site. +// GetNetworkTracesV2 description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// baseAddress - module base address. -func (client AppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (result ProcessModuleInfo, err error) { +// name - name of the app. +// operationID - GUID of the operation. +func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModule") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesV2") defer func() { sc := -1 if result.Response.Response != nil { @@ -13166,36 +13192,35 @@ func (client AppsClient) GetProcessModule(ctx context.Context, 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("web.AppsClient", "GetProcessModule", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTracesV2", err.Error()) } - req, err := client.GetProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress) + req, err := client.GetNetworkTracesV2Preparer(ctx, resourceGroupName, name, operationID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", nil, "Failure preparing request") return } - resp, err := client.GetProcessModuleSender(req) + resp, err := client.GetNetworkTracesV2Sender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure sending request") return } - result, err = client.GetProcessModuleResponder(resp) + result, err = client.GetNetworkTracesV2Responder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure responding to request") } return } -// GetProcessModulePreparer prepares the GetProcessModule request. -func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (*http.Request, error) { +// GetNetworkTracesV2Preparer prepares the GetNetworkTracesV2 request. +func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "baseAddress": autorest.Encode("path", baseAddress), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13208,43 +13233,39 @@ func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessModuleSender sends the GetProcessModule request. The method will close the +// GetNetworkTracesV2Sender sends the GetNetworkTracesV2 request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessModuleSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTracesV2Sender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessModuleResponder handles the response to the GetProcessModule request. The method always +// GetNetworkTracesV2Responder handles the response to the GetNetworkTracesV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetNetworkTracesV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in a web -// site. +// GetPremierAddOn description for Gets a named add-on of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// baseAddress - module base address. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (result ProcessModuleInfo, err error) { +// name - name of the app. +// premierAddOnName - add-on name. +func (client AppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result PremierAddOn, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModuleSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOn") defer func() { sc := -1 if result.Response.Response != nil { @@ -13258,38 +13279,36 @@ func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroup 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("web.AppsClient", "GetProcessModuleSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPremierAddOn", err.Error()) } - req, err := client.GetProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot) + req, err := client.GetPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", nil, "Failure preparing request") return } - resp, err := client.GetProcessModuleSlotSender(req) + resp, err := client.GetPremierAddOnSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure sending request") return } - result, err = client.GetProcessModuleSlotResponder(resp) + result, err = client.GetPremierAddOnResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure responding to request") } return } -// GetProcessModuleSlotPreparer prepares the GetProcessModuleSlot request. -func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (*http.Request, error) { +// GetPremierAddOnPreparer prepares the GetPremierAddOn request. +func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "baseAddress": autorest.Encode("path", baseAddress), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13301,41 +13320,41 @@ func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessModuleSlotSender sends the GetProcessModuleSlot request. The method will close the +// GetPremierAddOnSender sends the GetPremierAddOn request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessModuleSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPremierAddOnSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot request. The method always +// GetPremierAddOnResponder handles the response to the GetPremierAddOn request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web site. +// GetPremierAddOnSlot description for Gets a named add-on of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// name - name of the app. +// premierAddOnName - add-on name. +// slot - name of the deployment slot. If a slot is not specified, the API will get the named add-on for the // production slot. -func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessInfo, err error) { +func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result PremierAddOn, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOnSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13349,35 +13368,35 @@ func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName s 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("web.AppsClient", "GetProcessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPremierAddOnSlot", err.Error()) } - req, err := client.GetProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) + req, err := client.GetPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", nil, "Failure preparing request") return } - resp, err := client.GetProcessSlotSender(req) + resp, err := client.GetPremierAddOnSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure sending request") return } - result, err = client.GetProcessSlotResponder(resp) + result, err = client.GetPremierAddOnSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure responding to request") } return } -// GetProcessSlotPreparer prepares the GetProcessSlot request. -func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { +// GetPremierAddOnSlotPreparer prepares the GetPremierAddOnSlot request. +func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -13391,39 +13410,39 @@ func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessSlotSender sends the GetProcessSlot request. The method will close the +// GetPremierAddOnSlotSender sends the GetPremierAddOnSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPremierAddOnSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessSlotResponder handles the response to the GetProcessSlot request. The method always +// GetPremierAddOnSlotResponder handles the response to the GetPremierAddOnSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPublicCertificate description for Get the named public certificate for an app (or deployment slot, if specified). +// GetPrivateAccess description for Gets data around private site access enablement and authorized Virtual Networks +// that can access the site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// publicCertificateName - public certificate name. -func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, err error) { +// name - the name of the web app. +func (client AppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string) (result PrivateAccess, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificate") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccess") defer func() { sc := -1 if result.Response.Response != nil { @@ -13437,37 +13456,36 @@ func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroup 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("web.AppsClient", "GetPublicCertificate", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPrivateAccess", err.Error()) } - req, err := client.GetPublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) + req, err := client.GetPrivateAccessPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", nil, "Failure preparing request") return } - resp, err := client.GetPublicCertificateSender(req) + resp, err := client.GetPrivateAccessSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure sending request") return } - result, err = client.GetPublicCertificateResponder(resp) + result, err = client.GetPrivateAccessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure responding to request") } return } -// GetPublicCertificatePreparer prepares the GetPublicCertificate request. -func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) { +// GetPrivateAccessPreparer prepares the GetPrivateAccess request. +func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -13478,21 +13496,21 @@ func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPublicCertificateSender sends the GetPublicCertificate request. The method will close the +// GetPrivateAccessSender sends the GetPrivateAccess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPublicCertificateSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPrivateAccessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always +// GetPrivateAccessResponder handles the response to the GetPrivateAccess request. The method always // closes the http.Response Body. -func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { +func (client AppsClient) GetPrivateAccessResponder(resp *http.Response) (result PrivateAccess, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -13503,17 +13521,15 @@ func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (res return } -// GetPublicCertificateSlot description for Get the named public certificate for an app (or deployment slot, if -// specified). -// Parameters: +// GetPrivateAccessSlot description for Gets data around private site access enablement and authorized Virtual Networks +// that can access the site. +// Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production -// slot. -// publicCertificateName - public certificate name. -func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result PublicCertificate, err error) { +// name - the name of the web app. +// slot - the name of the slot for the web app. +func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateAccess, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13527,38 +13543,37 @@ func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceG 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("web.AppsClient", "GetPublicCertificateSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPrivateAccessSlot", err.Error()) } - req, err := client.GetPublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) + req, err := client.GetPrivateAccessSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", nil, "Failure preparing request") return } - resp, err := client.GetPublicCertificateSlotSender(req) + resp, err := client.GetPrivateAccessSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure sending request") return } - result, err = client.GetPublicCertificateSlotResponder(resp) + result, err = client.GetPrivateAccessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure responding to request") } return } -// GetPublicCertificateSlotPreparer prepares the GetPublicCertificateSlot request. -func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { +// GetPrivateAccessSlotPreparer prepares the GetPrivateAccessSlot request. +func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -13569,21 +13584,21 @@ func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot request. The method will close the +// GetPrivateAccessSlotSender sends the GetPrivateAccessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPublicCertificateSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPrivateAccessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always +// GetPrivateAccessSlotResponder handles the response to the GetPrivateAccessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { +func (client AppsClient) GetPrivateAccessSlotResponder(resp *http.Response) (result PrivateAccess, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -13594,14 +13609,14 @@ func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) return } -// GetRelayServiceConnection description for Gets a hybrid connection configuration by its name. +// GetProcess description for Get process information by its ID for a specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection. -func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, err error) { +// name - site name. +// processID - pID. +func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcess") defer func() { sc := -1 if result.Response.Response != nil { @@ -13615,35 +13630,35 @@ func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resource 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("web.AppsClient", "GetRelayServiceConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcess", err.Error()) } - req, err := client.GetRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) + req, err := client.GetProcessPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request") return } - resp, err := client.GetRelayServiceConnectionSender(req) + resp, err := client.GetProcessSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure sending request") return } - result, err = client.GetRelayServiceConnectionResponder(resp) + result, err = client.GetProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure responding to request") } return } -// GetRelayServiceConnectionPreparer prepares the GetRelayServiceConnection request. -func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) { +// GetProcessPreparer prepares the GetProcess request. +func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13656,41 +13671,40 @@ func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRelayServiceConnectionSender sends the GetRelayServiceConnection request. The method will close the +// GetProcessSender sends the GetProcess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection request. The method always +// GetProcessResponder handles the response to the GetProcess request. The method always // closes the http.Response Body. -func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) GetProcessResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetRelayServiceConnectionSlot description for Gets a hybrid connection configuration by its name. +// GetProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web +// site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection. -// slot - name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the -// production slot. -func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result RelayServiceConnectionEntity, err error) { +// name - site name. +// processID - pID. +func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDump") defer func() { sc := -1 if result.Response.Response != nil { @@ -13704,37 +13718,36 @@ func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, reso 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("web.AppsClient", "GetRelayServiceConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessDump", err.Error()) } - req, err := client.GetRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) + req, err := client.GetProcessDumpPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request") return } - resp, err := client.GetRelayServiceConnectionSlotSender(req) + resp, err := client.GetProcessDumpSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure sending request") return } - result, err = client.GetRelayServiceConnectionSlotResponder(resp) + result, err = client.GetProcessDumpResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure responding to request") } return } -// GetRelayServiceConnectionSlotPreparer prepares the GetRelayServiceConnectionSlot request. -func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) { +// GetProcessDumpPreparer prepares the GetProcessDump request. +func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13746,39 +13759,41 @@ func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRelayServiceConnectionSlotSender sends the GetRelayServiceConnectionSlot request. The method will close the +// GetProcessDumpSender sends the GetProcessDump request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessDumpSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot request. The method always +// GetProcessDumpResponder handles the response to the GetProcessDump request. The method always // closes the http.Response Body. -func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) GetProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetSiteExtension description for Get site extension information by its ID for a web site, or a deployment slot. +// GetProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out instance in a +// web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// siteExtensionID - site extension name. -func (client AppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result SiteExtensionInfo, err error) { +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtension") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDumpSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13792,36 +13807,37 @@ func (client AppsClient) GetSiteExtension(ctx context.Context, 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("web.AppsClient", "GetSiteExtension", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessDumpSlot", err.Error()) } - req, err := client.GetSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) + req, err := client.GetProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request") return } - resp, err := client.GetSiteExtensionSender(req) + resp, err := client.GetProcessDumpSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure sending request") return } - result, err = client.GetSiteExtensionResponder(resp) + result, err = client.GetProcessDumpSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure responding to request") } return } -// GetSiteExtensionPreparer prepares the GetSiteExtension request. -func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { +// GetProcessDumpSlotPreparer prepares the GetProcessDumpSlot request. +func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13833,40 +13849,39 @@ func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSiteExtensionSender sends the GetSiteExtension request. The method will close the +// GetProcessDumpSlotSender sends the GetProcessDumpSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSiteExtensionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessDumpSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always +// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetSiteExtensionSlot description for Get site extension information by its ID for a web site, or a deployment slot. +// GetProcessModule description for Get process information by its ID for a specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// siteExtensionID - site extension name. -// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. -func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result SiteExtensionInfo, err error) { +// processID - pID. +// baseAddress - module base address. +func (client AppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (result ProcessModuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtensionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModule") defer func() { sc := -1 if result.Response.Response != nil { @@ -13880,37 +13895,37 @@ func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroup 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("web.AppsClient", "GetSiteExtensionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessModule", err.Error()) } - req, err := client.GetSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + req, err := client.GetProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request") return } - resp, err := client.GetSiteExtensionSlotSender(req) + resp, err := client.GetProcessModuleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure sending request") return } - result, err = client.GetSiteExtensionSlotResponder(resp) + result, err = client.GetProcessModuleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure responding to request") } return } -// GetSiteExtensionSlotPreparer prepares the GetSiteExtensionSlot request. -func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { +// GetProcessModulePreparer prepares the GetProcessModule request. +func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "baseAddress": autorest.Encode("path", baseAddress), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13922,21 +13937,21 @@ func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot request. The method will close the +// GetProcessModuleSender sends the GetProcessModule request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessModuleSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always +// GetProcessModuleResponder handles the response to the GetProcessModule request. The method always // closes the http.Response Body. -func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -13947,13 +13962,18 @@ func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (res return } -// GetSitePhpErrorLogFlag description for Gets web app's event logs. +// GetProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in a web +// site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string) (result SitePhpErrorLogFlag, err error) { +// name - site name. +// processID - pID. +// baseAddress - module base address. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (result ProcessModuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlag") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModuleSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13967,35 +13987,38 @@ func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGro 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("web.AppsClient", "GetSitePhpErrorLogFlag", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessModuleSlot", err.Error()) } - req, err := client.GetSitePhpErrorLogFlagPreparer(ctx, resourceGroupName, name) + req, err := client.GetProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request") return } - resp, err := client.GetSitePhpErrorLogFlagSender(req) + resp, err := client.GetProcessModuleSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure sending request") return } - result, err = client.GetSitePhpErrorLogFlagResponder(resp) + result, err = client.GetProcessModuleSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure responding to request") } return } -// GetSitePhpErrorLogFlagPreparer prepares the GetSitePhpErrorLogFlag request. -func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetProcessModuleSlotPreparer prepares the GetProcessModuleSlot request. +func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "baseAddress": autorest.Encode("path", baseAddress), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -14007,39 +14030,41 @@ func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSitePhpErrorLogFlagSender sends the GetSitePhpErrorLogFlag request. The method will close the +// GetProcessModuleSlotSender sends the GetProcessModuleSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSitePhpErrorLogFlagSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessModuleSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSitePhpErrorLogFlagResponder handles the response to the GetSitePhpErrorLogFlag request. The method always +// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { +func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSitePhpErrorLogFlagSlot description for Gets web app's event logs. +// GetProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SitePhpErrorLogFlag, err error) { +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlagSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14053,34 +14078,35 @@ func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourc 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("web.AppsClient", "GetSitePhpErrorLogFlagSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessSlot", err.Error()) } - req, err := client.GetSitePhpErrorLogFlagSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request") return } - resp, err := client.GetSitePhpErrorLogFlagSlotSender(req) + resp, err := client.GetProcessSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure sending request") return } - result, err = client.GetSitePhpErrorLogFlagSlotResponder(resp) + result, err = client.GetProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure responding to request") } return } -// GetSitePhpErrorLogFlagSlotPreparer prepares the GetSitePhpErrorLogFlagSlot request. -func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetProcessSlotPreparer prepares the GetProcessSlot request. +func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -14094,39 +14120,39 @@ func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSitePhpErrorLogFlagSlotSender sends the GetSitePhpErrorLogFlagSlot request. The method will close the +// GetProcessSlotSender sends the GetProcessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSitePhpErrorLogFlagSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSitePhpErrorLogFlagSlotResponder handles the response to the GetSitePhpErrorLogFlagSlot request. The method always +// GetProcessSlotResponder handles the response to the GetProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { +func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSlot description for Gets the details of a web, mobile, or API app. +// GetPublicCertificate description for Get the named public certificate for an app (or deployment slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. By default, this API returns the production slot. -func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result Site, err error) { +// publicCertificateName - public certificate name. +func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificate") defer func() { sc := -1 if result.Response.Response != nil { @@ -14140,37 +14166,37 @@ func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, 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("web.AppsClient", "GetSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPublicCertificate", err.Error()) } - req, err := client.GetSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetPublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request") return } - resp, err := client.GetSlotSender(req) + resp, err := client.GetPublicCertificateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure sending request") return } - result, err = client.GetSlotResponder(resp) + result, err = client.GetPublicCertificateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request") } return } -// GetSlotPreparer prepares the GetSlot request. -func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetPublicCertificatePreparer prepares the GetPublicCertificate request. +func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -14181,38 +14207,42 @@ func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSlotSender sends the GetSlot request. The method will close the +// GetPublicCertificateSender sends the GetPublicCertificate request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPublicCertificateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSlotResponder handles the response to the GetSlot request. The method always +// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always // closes the http.Response Body. -func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err error) { +func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSourceControl description for Gets the source control configuration of an app. +// GetPublicCertificateSlot description for Get the named public certificate for an app (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string) (result SiteSourceControl, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production +// slot. +// publicCertificateName - public certificate name. +func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result PublicCertificate, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControl") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificateSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14226,36 +14256,38 @@ func (client AppsClient) GetSourceControl(ctx context.Context, 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("web.AppsClient", "GetSourceControl", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPublicCertificateSlot", err.Error()) } - req, err := client.GetSourceControlPreparer(ctx, resourceGroupName, name) + req, err := client.GetPublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request") return } - resp, err := client.GetSourceControlSender(req) + resp, err := client.GetPublicCertificateSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure sending request") return } - result, err = client.GetSourceControlResponder(resp) + result, err = client.GetPublicCertificateSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request") } return } -// GetSourceControlPreparer prepares the GetSourceControl request. -func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetPublicCertificateSlotPreparer prepares the GetPublicCertificateSlot request. +func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -14266,40 +14298,39 @@ func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSourceControlSender sends the GetSourceControl request. The method will close the +// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSourceControlSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPublicCertificateSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSourceControlResponder handles the response to the GetSourceControl request. The method always +// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) { +func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSourceControlSlot description for Gets the source control configuration of an app. +// GetRelayServiceConnection description for Gets a hybrid connection configuration by its name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will get the source control -// configuration for the production slot. -func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteSourceControl, err error) { +// entityName - name of the hybrid connection. +func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControlSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -14313,36 +14344,36 @@ func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroup 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("web.AppsClient", "GetSourceControlSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetRelayServiceConnection", err.Error()) } - req, err := client.GetSourceControlSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", nil, "Failure preparing request") return } - resp, err := client.GetSourceControlSlotSender(req) + resp, err := client.GetRelayServiceConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure sending request") return } - result, err = client.GetSourceControlSlotResponder(resp) + result, err = client.GetRelayServiceConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure responding to request") } return } -// GetSourceControlSlotPreparer prepares the GetSourceControlSlot request. -func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetRelayServiceConnectionPreparer prepares the GetRelayServiceConnection request. +func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -14354,38 +14385,41 @@ func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSourceControlSlotSender sends the GetSourceControlSlot request. The method will close the +// GetRelayServiceConnectionSender sends the GetRelayServiceConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSourceControlSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSourceControlSlotResponder handles the response to the GetSourceControlSlot request. The method always +// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) { +func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSwiftVirtualNetworkConnection description for Gets a Swift Virtual Network connection. +// GetRelayServiceConnectionSlot description for Gets a hybrid connection configuration by its name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string) (result SwiftVirtualNetwork, err error) { +// entityName - name of the hybrid connection. +// slot - name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the +// production slot. +func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result RelayServiceConnectionEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14399,35 +14433,37 @@ func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, r 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("web.AppsClient", "GetSwiftVirtualNetworkConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "GetRelayServiceConnectionSlot", err.Error()) } - req, err := client.GetSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name) + req, err := client.GetRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetSwiftVirtualNetworkConnectionSender(req) + resp, err := client.GetRelayServiceConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetSwiftVirtualNetworkConnectionResponder(resp) + result, err = client.GetRelayServiceConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure responding to request") } return } -// GetSwiftVirtualNetworkConnectionPreparer prepares the GetSwiftVirtualNetworkConnection request. -func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetRelayServiceConnectionSlotPreparer prepares the GetRelayServiceConnectionSlot request. +func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -14439,21 +14475,21 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Co preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSwiftVirtualNetworkConnectionSender sends the GetSwiftVirtualNetworkConnection request. The method will close the +// GetRelayServiceConnectionSlotSender sends the GetRelayServiceConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSwiftVirtualNetworkConnectionResponder handles the response to the GetSwiftVirtualNetworkConnection request. The method always +// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -14464,15 +14500,14 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Re return } -// GetSwiftVirtualNetworkConnectionSlot description for Gets a Swift Virtual Network connection. +// GetSiteExtension description for Get site extension information by its ID for a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the -// production slot's Virtual Network. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SwiftVirtualNetwork, err error) { +// name - site name. +// siteExtensionID - site extension name. +func (client AppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result SiteExtensionInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtension") defer func() { sc := -1 if result.Response.Response != nil { @@ -14486,36 +14521,36 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Contex Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSiteExtension", err.Error()) } - req, err := client.GetSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request") return } - resp, err := client.GetSwiftVirtualNetworkConnectionSlotSender(req) + resp, err := client.GetSiteExtensionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure sending request") return } - result, err = client.GetSwiftVirtualNetworkConnectionSlotResponder(resp) + result, err = client.GetSiteExtensionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request") } return } -// GetSwiftVirtualNetworkConnectionSlotPreparer prepares the GetSwiftVirtualNetworkConnectionSlot request. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetSiteExtensionPreparer prepares the GetSiteExtension request. +func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), + "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -14527,39 +14562,40 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSwiftVirtualNetworkConnectionSlotSender sends the GetSwiftVirtualNetworkConnectionSlot request. The method will close the +// GetSiteExtensionSender sends the GetSiteExtension request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSiteExtensionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSwiftVirtualNetworkConnectionSlotResponder handles the response to the GetSwiftVirtualNetworkConnectionSlot request. The method always +// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always // closes the http.Response Body. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetTriggeredWebJob description for Gets a triggered web job by its ID for an app, or a deployment slot. +// GetSiteExtensionSlot description for Get site extension information by its ID for a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// webJobName - name of Web Job. -func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredWebJob, err error) { +// siteExtensionID - site extension name. +// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. +func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result SiteExtensionInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtensionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14573,37 +14609,38 @@ func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupNa 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("web.AppsClient", "GetTriggeredWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSiteExtensionSlot", err.Error()) } - req, err := client.GetTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.GetSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request") return } - resp, err := client.GetTriggeredWebJobSender(req) + resp, err := client.GetSiteExtensionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure sending request") return } - result, err = client.GetTriggeredWebJobResponder(resp) + result, err = client.GetSiteExtensionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request") } return } -// GetTriggeredWebJobPreparer prepares the GetTriggeredWebJob request. -func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// GetSiteExtensionSlotPreparer prepares the GetSiteExtensionSlot request. +func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -14614,21 +14651,21 @@ func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetTriggeredWebJobSender sends the GetTriggeredWebJob request. The method will close the +// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetTriggeredWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob request. The method always +// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (result TriggeredWebJob, err error) { +func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -14639,16 +14676,13 @@ func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (resul return } -// GetTriggeredWebJobHistory description for Gets a triggered web job's history by its ID for an app, , or a deployment -// slot. +// GetSitePhpErrorLogFlag description for Gets web app's event logs. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// ID - history ID. -func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (result TriggeredJobHistory, err error) { +// name - name of web app. +func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string) (result SitePhpErrorLogFlag, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistory") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlag") defer func() { sc := -1 if result.Response.Response != nil { @@ -14662,38 +14696,36 @@ func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resource 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("web.AppsClient", "GetTriggeredWebJobHistory", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlag", err.Error()) } - req, err := client.GetTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName, ID) + req, err := client.GetSitePhpErrorLogFlagPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", nil, "Failure preparing request") return } - resp, err := client.GetTriggeredWebJobHistorySender(req) + resp, err := client.GetSitePhpErrorLogFlagSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure sending request") return } - result, err = client.GetTriggeredWebJobHistoryResponder(resp) + result, err = client.GetSitePhpErrorLogFlagResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure responding to request") } return } -// GetTriggeredWebJobHistoryPreparer prepares the GetTriggeredWebJobHistory request. -func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (*http.Request, error) { +// GetSitePhpErrorLogFlagPreparer prepares the GetSitePhpErrorLogFlag request. +func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, resourceGroupName string, name 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), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -14704,42 +14736,39 @@ func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetTriggeredWebJobHistorySender sends the GetTriggeredWebJobHistory request. The method will close the +// GetSitePhpErrorLogFlagSender sends the GetSitePhpErrorLogFlag request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSitePhpErrorLogFlagSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory request. The method always +// GetSitePhpErrorLogFlagResponder handles the response to the GetSitePhpErrorLogFlag request. The method always // closes the http.Response Body. -func (client AppsClient) GetTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistory, err error) { +func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetTriggeredWebJobHistorySlot description for Gets a triggered web job's history by its ID for an app, , or a -// deployment slot. +// GetSitePhpErrorLogFlagSlot description for Gets web app's event logs. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// ID - history ID. -// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. -func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (result TriggeredJobHistory, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SitePhpErrorLogFlag, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistorySlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlagSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14753,39 +14782,37 @@ func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, reso 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("web.AppsClient", "GetTriggeredWebJobHistorySlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlagSlot", err.Error()) } - req, err := client.GetTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, ID, slot) + req, err := client.GetSitePhpErrorLogFlagSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", nil, "Failure preparing request") return } - resp, err := client.GetTriggeredWebJobHistorySlotSender(req) + resp, err := client.GetSitePhpErrorLogFlagSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure sending request") return } - result, err = client.GetTriggeredWebJobHistorySlotResponder(resp) + result, err = client.GetSitePhpErrorLogFlagSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure responding to request") } return } -// GetTriggeredWebJobHistorySlotPreparer prepares the GetTriggeredWebJobHistorySlot request. -func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (*http.Request, error) { +// GetSitePhpErrorLogFlagSlotPreparer prepares the GetSitePhpErrorLogFlagSlot request. +func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -14796,40 +14823,39 @@ func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetTriggeredWebJobHistorySlotSender sends the GetTriggeredWebJobHistorySlot request. The method will close the +// GetSitePhpErrorLogFlagSlotSender sends the GetSitePhpErrorLogFlagSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSitePhpErrorLogFlagSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot request. The method always +// GetSitePhpErrorLogFlagSlotResponder handles the response to the GetSitePhpErrorLogFlagSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistory, err error) { +func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetTriggeredWebJobSlot description for Gets a triggered web job by its ID for an app, or a deployment slot. +// GetSlot description for Gets the details of a web, mobile, or API app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. -func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredWebJob, err error) { +// name - name of the app. +// slot - name of the deployment slot. By default, this API returns the production slot. +func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result Site, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14843,38 +14869,37 @@ func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGro 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("web.AppsClient", "GetTriggeredWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSlot", err.Error()) } - req, err := client.GetTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.GetSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", nil, "Failure preparing request") return } - resp, err := client.GetTriggeredWebJobSlotSender(req) + resp, err := client.GetSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure sending request") return } - result, err = client.GetTriggeredWebJobSlotResponder(resp) + result, err = client.GetSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure responding to request") } return } -// GetTriggeredWebJobSlotPreparer prepares the GetTriggeredWebJobSlot request. -func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// GetSlotPreparer prepares the GetSlot request. +func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -14885,21 +14910,21 @@ func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetTriggeredWebJobSlotSender sends the GetTriggeredWebJobSlot request. The method will close the +// GetSlotSender sends the GetSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot request. The method always +// GetSlotResponder handles the response to the GetSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (result TriggeredWebJob, err error) { +func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -14910,14 +14935,13 @@ func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (r return } -// GetVnetConnection description for Gets a virtual network the app (or deployment slot) is connected to by name. +// GetSourceControl description for Gets the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the virtual network. -func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) { +func (client AppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string) (result SiteSourceControl, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControl") defer func() { sc := -1 if result.Response.Response != nil { @@ -14931,37 +14955,36 @@ func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupNam 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("web.AppsClient", "GetVnetConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSourceControl", err.Error()) } - req, err := client.GetVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) + req, err := client.GetSourceControlPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", nil, "Failure preparing request") return } - resp, err := client.GetVnetConnectionSender(req) + resp, err := client.GetSourceControlSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure sending request") return } - result, err = client.GetVnetConnectionResponder(resp) + result, err = client.GetSourceControlResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure responding to request") } return } -// GetVnetConnectionPreparer prepares the GetVnetConnection request. -func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) { +// GetSourceControlPreparer prepares the GetSourceControl request. +func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -14972,40 +14995,40 @@ func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetVnetConnectionSender sends the GetVnetConnection request. The method will close the +// GetSourceControlSender sends the GetSourceControl request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetVnetConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSourceControlSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetVnetConnectionResponder handles the response to the GetVnetConnection request. The method always +// GetSourceControlResponder handles the response to the GetSourceControl request. The method always // closes the http.Response Body. -func (client AppsClient) GetVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) { +func (client AppsClient) GetSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetVnetConnectionGateway description for Gets an app's Virtual Network gateway. +// GetSourceControlSlot description for Gets the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the Virtual Network. -// gatewayName - name of the gateway. Currently, the only supported string is "primary". -func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will get the source control +// configuration for the production slot. +func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteSourceControl, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGateway") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControlSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15019,38 +15042,37 @@ func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceG 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("web.AppsClient", "GetVnetConnectionGateway", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSourceControlSlot", err.Error()) } - req, err := client.GetVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName) + req, err := client.GetSourceControlSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", nil, "Failure preparing request") return } - resp, err := client.GetVnetConnectionGatewaySender(req) + resp, err := client.GetSourceControlSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure sending request") return } - result, err = client.GetVnetConnectionGatewayResponder(resp) + result, err = client.GetSourceControlSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure responding to request") } return } -// GetVnetConnectionGatewayPreparer prepares the GetVnetConnectionGateway request. -func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (*http.Request, error) { +// GetSourceControlSlotPreparer prepares the GetSourceControlSlot request. +func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15061,42 +15083,38 @@ func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetVnetConnectionGatewaySender sends the GetVnetConnectionGateway request. The method will close the +// GetSourceControlSlotSender sends the GetSourceControlSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSourceControlSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetVnetConnectionGatewayResponder handles the response to the GetVnetConnectionGateway request. The method always +// GetSourceControlSlotResponder handles the response to the GetSourceControlSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) { +func (client AppsClient) GetSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetVnetConnectionGatewaySlot description for Gets an app's Virtual Network gateway. +// GetSwiftVirtualNetworkConnection description for Gets a Swift Virtual Network connection. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the Virtual Network. -// gatewayName - name of the gateway. Currently, the only supported string is "primary". -// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the -// production slot's Virtual Network. -func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result VnetGateway, err error) { +func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string) (result SwiftVirtualNetwork, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGatewaySlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -15110,39 +15128,36 @@ func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resou 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("web.AppsClient", "GetVnetConnectionGatewaySlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnection", err.Error()) } - req, err := client.GetVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, slot) + req, err := client.GetSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", nil, "Failure preparing request") return } - resp, err := client.GetVnetConnectionGatewaySlotSender(req) + resp, err := client.GetSwiftVirtualNetworkConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure sending request") return } - result, err = client.GetVnetConnectionGatewaySlotResponder(resp) + result, err = client.GetSwiftVirtualNetworkConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure responding to request") } return } -// GetVnetConnectionGatewaySlotPreparer prepares the GetVnetConnectionGatewaySlot request. -func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (*http.Request, error) { +// GetSwiftVirtualNetworkConnectionPreparer prepares the GetSwiftVirtualNetworkConnection request. +func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15153,41 +15168,40 @@ func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetVnetConnectionGatewaySlotSender sends the GetVnetConnectionGatewaySlot request. The method will close the +// GetSwiftVirtualNetworkConnectionSender sends the GetSwiftVirtualNetworkConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetVnetConnectionGatewaySlotResponder handles the response to the GetVnetConnectionGatewaySlot request. The method always +// GetSwiftVirtualNetworkConnectionResponder handles the response to the GetSwiftVirtualNetworkConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) { +func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetVnetConnectionSlot description for Gets a virtual network the app (or deployment slot) is connected to by name. +// GetSwiftVirtualNetworkConnectionSlot description for Gets a Swift Virtual Network connection. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the virtual network. -// slot - name of the deployment slot. If a slot is not specified, the API will get the named virtual network -// for the production slot. -func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result VnetInfo, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the +// production slot's Virtual Network. +func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SwiftVirtualNetwork, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15201,38 +15215,37 @@ func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGrou 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("web.AppsClient", "GetVnetConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", err.Error()) } - req, err := client.GetVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) + req, err := client.GetSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetVnetConnectionSlotSender(req) + resp, err := client.GetSwiftVirtualNetworkConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetVnetConnectionSlotResponder(resp) + result, err = client.GetSwiftVirtualNetworkConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request") } return } -// GetVnetConnectionSlotPreparer prepares the GetVnetConnectionSlot request. -func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) { +// GetSwiftVirtualNetworkConnectionSlotPreparer prepares the GetSwiftVirtualNetworkConnectionSlot request. +func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15243,21 +15256,21 @@ func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetVnetConnectionSlotSender sends the GetVnetConnectionSlot request. The method will close the +// GetSwiftVirtualNetworkConnectionSlotSender sends the GetSwiftVirtualNetworkConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetVnetConnectionSlotResponder handles the response to the GetVnetConnectionSlot request. The method always +// GetSwiftVirtualNetworkConnectionSlotResponder handles the response to the GetSwiftVirtualNetworkConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) { +func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -15268,14 +15281,14 @@ func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (re return } -// GetWebJob description for Get webjob information for an app, or a deployment slot. +// GetTriggeredWebJob description for Gets a triggered web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// webJobName - name of the web job. -func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result Job, err error) { +// webJobName - name of Web Job. +func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredWebJob, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJob") defer func() { sc := -1 if result.Response.Response != nil { @@ -15289,32 +15302,32 @@ func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string 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("web.AppsClient", "GetWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "GetTriggeredWebJob", err.Error()) } - req, err := client.GetWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.GetTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", nil, "Failure preparing request") return } - resp, err := client.GetWebJobSender(req) + resp, err := client.GetTriggeredWebJobSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure sending request") return } - result, err = client.GetWebJobResponder(resp) + result, err = client.GetTriggeredWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure responding to request") } return } -// GetWebJobPreparer prepares the GetWebJob request. -func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// GetTriggeredWebJobPreparer prepares the GetTriggeredWebJob request. +func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -15330,41 +15343,41 @@ func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupNam preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetWebJobSender sends the GetWebJob request. The method will close the +// GetTriggeredWebJobSender sends the GetTriggeredWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetTriggeredWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetWebJobResponder handles the response to the GetWebJob request. The method always +// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) GetWebJobResponder(resp *http.Response) (result Job, err error) { +func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (result TriggeredWebJob, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetWebJobSlot description for Get webjob information for an app, or a deployment slot. +// GetTriggeredWebJobHistory description for Gets a triggered web job's history by its ID for an app, , or a deployment +// slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// webJobName - name of the web job. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result Job, err error) { +// webJobName - name of Web Job. +// ID - history ID. +func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (result TriggeredJobHistory, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistory") defer func() { sc := -1 if result.Response.Response != nil { @@ -15378,36 +15391,36 @@ func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName st 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("web.AppsClient", "GetWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistory", err.Error()) } - req, err := client.GetWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.GetTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName, ID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", nil, "Failure preparing request") return } - resp, err := client.GetWebJobSlotSender(req) + resp, err := client.GetTriggeredWebJobHistorySender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure sending request") return } - result, err = client.GetWebJobSlotResponder(resp) + result, err = client.GetTriggeredWebJobHistoryResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure responding to request") } return } -// GetWebJobSlotPreparer prepares the GetWebJobSlot request. -func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// GetTriggeredWebJobHistoryPreparer prepares the GetTriggeredWebJobHistory request. +func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webJobName": autorest.Encode("path", webJobName), } @@ -15420,38 +15433,42 @@ func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGrou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetWebJobSlotSender sends the GetWebJobSlot request. The method will close the +// GetTriggeredWebJobHistorySender sends the GetTriggeredWebJobHistory request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetWebJobSlotResponder handles the response to the GetWebJobSlot request. The method always +// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory request. The method always // closes the http.Response Body. -func (client AppsClient) GetWebJobSlotResponder(resp *http.Response) (result Job, err error) { +func (client AppsClient) GetTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistory, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetWebSiteContainerLogs description for Gets the last lines of docker logs for the given site +// GetTriggeredWebJobHistorySlot description for Gets a triggered web job's history by its ID for an app, , or a +// deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) { +// name - site name. +// webJobName - name of Web Job. +// ID - history ID. +// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. +func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (result TriggeredJobHistory, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogs") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistorySlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15465,36 +15482,39 @@ func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGr 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("web.AppsClient", "GetWebSiteContainerLogs", err.Error()) + return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistorySlot", err.Error()) } - req, err := client.GetWebSiteContainerLogsPreparer(ctx, resourceGroupName, name) + req, err := client.GetTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, ID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", nil, "Failure preparing request") return } - resp, err := client.GetWebSiteContainerLogsSender(req) + resp, err := client.GetTriggeredWebJobHistorySlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure sending request") return } - result, err = client.GetWebSiteContainerLogsResponder(resp) + result, err = client.GetTriggeredWebJobHistorySlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure responding to request") } return } -// GetWebSiteContainerLogsPreparer prepares the GetWebSiteContainerLogs request. -func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetTriggeredWebJobHistorySlotPreparer prepares the GetTriggeredWebJobHistorySlot request. +func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -15503,40 +15523,42 @@ func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, re } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetWebSiteContainerLogsSender sends the GetWebSiteContainerLogs request. The method will close the +// GetTriggeredWebJobHistorySlotSender sends the GetTriggeredWebJobHistorySlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetWebSiteContainerLogsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetWebSiteContainerLogsResponder handles the response to the GetWebSiteContainerLogs request. The method always +// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetWebSiteContainerLogsResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistory, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetWebSiteContainerLogsSlot description for Gets the last lines of docker logs for the given site +// GetTriggeredWebJobSlot description for Gets a triggered web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) { +// name - site name. +// webJobName - name of Web Job. +// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. +func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredWebJob, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15550,37 +15572,38 @@ func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resour 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("web.AppsClient", "GetWebSiteContainerLogsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobSlot", err.Error()) } - req, err := client.GetWebSiteContainerLogsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.GetWebSiteContainerLogsSlotSender(req) + resp, err := client.GetTriggeredWebJobSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure sending request") return } - result, err = client.GetWebSiteContainerLogsSlotResponder(resp) + result, err = client.GetTriggeredWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure responding to request") } return } -// GetWebSiteContainerLogsSlotPreparer prepares the GetWebSiteContainerLogsSlot request. -func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetTriggeredWebJobSlotPreparer prepares the GetTriggeredWebJobSlot request. +func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -15589,44 +15612,45 @@ func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetWebSiteContainerLogsSlotSender sends the GetWebSiteContainerLogsSlot request. The method will close the +// GetTriggeredWebJobSlotSender sends the GetTriggeredWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetWebSiteContainerLogsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetWebSiteContainerLogsSlotResponder handles the response to the GetWebSiteContainerLogsSlot request. The method always +// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetWebSiteContainerLogsSlotResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (result TriggeredWebJob, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// InstallSiteExtension description for Install site extension on a web site, or a deployment slot. +// GetVnetConnection description for Gets a virtual network the app (or deployment slot) is connected to by name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// siteExtensionID - site extension name. -func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result AppsInstallSiteExtensionFuture, err error) { +// name - name of the app. +// vnetName - name of the virtual network. +func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtension") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnection") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -15636,31 +15660,37 @@ func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroup 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("web.AppsClient", "InstallSiteExtension", err.Error()) + return result, validation.NewError("web.AppsClient", "GetVnetConnection", err.Error()) } - req, err := client.InstallSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) + req, err := client.GetVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", nil, "Failure preparing request") return } - result, err = client.InstallSiteExtensionSender(req) + resp, err := client.GetVnetConnectionSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure sending request") return } + result, err = client.GetVnetConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure responding to request") + } + return } -// InstallSiteExtensionPreparer prepares the InstallSiteExtension request. -func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { +// GetVnetConnectionPreparer prepares the GetVnetConnection request. +func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15669,52 +15699,46 @@ func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resou } preparer := autorest.CreatePreparer( - autorest.AsPut(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// InstallSiteExtensionSender sends the InstallSiteExtension request. The method will close the +// GetVnetConnectionSender sends the GetVnetConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) InstallSiteExtensionSender(req *http.Request) (future AppsInstallSiteExtensionFuture, err error) { +func (client AppsClient) GetVnetConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// InstallSiteExtensionResponder handles the response to the InstallSiteExtension request. The method always +// GetVnetConnectionResponder handles the response to the GetVnetConnection request. The method always // closes the http.Response Body. -func (client AppsClient) InstallSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// InstallSiteExtensionSlot description for Install site extension on a web site, or a deployment slot. +// GetVnetConnectionGateway description for Gets an app's Virtual Network gateway. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// siteExtensionID - site extension name. -// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. -func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result AppsInstallSiteExtensionSlotFuture, err error) { +// name - name of the app. +// vnetName - name of the Virtual Network. +// gatewayName - name of the gateway. Currently, the only supported string is "primary". +func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtensionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGateway") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -15724,32 +15748,38 @@ func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceG 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("web.AppsClient", "InstallSiteExtensionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetVnetConnectionGateway", err.Error()) } - req, err := client.InstallSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + req, err := client.GetVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", nil, "Failure preparing request") return } - result, err = client.InstallSiteExtensionSlotSender(req) + resp, err := client.GetVnetConnectionGatewaySender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure sending request") return } + result, err = client.GetVnetConnectionGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure responding to request") + } + return } -// InstallSiteExtensionSlotPreparer prepares the InstallSiteExtensionSlot request. -func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { +// GetVnetConnectionGatewayPreparer prepares the GetVnetConnectionGateway request. +func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15758,46 +15788,44 @@ func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, r } preparer := autorest.CreatePreparer( - autorest.AsPut(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// InstallSiteExtensionSlotSender sends the InstallSiteExtensionSlot request. The method will close the +// GetVnetConnectionGatewaySender sends the GetVnetConnectionGateway request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) InstallSiteExtensionSlotSender(req *http.Request) (future AppsInstallSiteExtensionSlotFuture, err error) { +func (client AppsClient) GetVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// InstallSiteExtensionSlotResponder handles the response to the InstallSiteExtensionSlot request. The method always +// GetVnetConnectionGatewayResponder handles the response to the GetVnetConnectionGateway request. The method always // closes the http.Response Body. -func (client AppsClient) InstallSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// IsCloneable description for Shows whether an app can be cloned to another resource group or subscription. +// GetVnetConnectionGatewaySlot description for Gets an app's Virtual Network gateway. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string) (result SiteCloneability, err error) { +// vnetName - name of the Virtual Network. +// gatewayName - name of the gateway. Currently, the only supported string is "primary". +// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the +// production slot's Virtual Network. +func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result VnetGateway, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneable") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGatewaySlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15811,36 +15839,39 @@ func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName stri 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("web.AppsClient", "IsCloneable", err.Error()) + return result, validation.NewError("web.AppsClient", "GetVnetConnectionGatewaySlot", err.Error()) } - req, err := client.IsCloneablePreparer(ctx, resourceGroupName, name) + req, err := client.GetVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", nil, "Failure preparing request") return } - resp, err := client.IsCloneableSender(req) + resp, err := client.GetVnetConnectionGatewaySlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure sending request") return } - result, err = client.IsCloneableResponder(resp) + result, err = client.GetVnetConnectionGatewaySlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure responding to request") } return } -// IsCloneablePreparer prepares the IsCloneable request. -func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetVnetConnectionGatewaySlotPreparer prepares the GetVnetConnectionGatewaySlot request. +func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15849,41 +15880,43 @@ func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupN } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// IsCloneableSender sends the IsCloneable request. The method will close the +// GetVnetConnectionGatewaySlotSender sends the GetVnetConnectionGatewaySlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) IsCloneableSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// IsCloneableResponder handles the response to the IsCloneable request. The method always +// GetVnetConnectionGatewaySlotResponder handles the response to the GetVnetConnectionGatewaySlot request. The method always // closes the http.Response Body. -func (client AppsClient) IsCloneableResponder(resp *http.Response) (result SiteCloneability, err error) { +func (client AppsClient) GetVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// IsCloneableSlot description for Shows whether an app can be cloned to another resource group or subscription. +// GetVnetConnectionSlot description for Gets a virtual network the app (or deployment slot) is connected to by name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. By default, this API returns information on the production slot. -func (client AppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteCloneability, err error) { +// vnetName - name of the virtual network. +// slot - name of the deployment slot. If a slot is not specified, the API will get the named virtual network +// for the production slot. +func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result VnetInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneableSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15897,37 +15930,38 @@ func (client AppsClient) IsCloneableSlot(ctx context.Context, 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("web.AppsClient", "IsCloneableSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetVnetConnectionSlot", err.Error()) } - req, err := client.IsCloneableSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.IsCloneableSlotSender(req) + resp, err := client.GetVnetConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure sending request") return } - result, err = client.IsCloneableSlotResponder(resp) + result, err = client.GetVnetConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure responding to request") } return } -// IsCloneableSlotPreparer prepares the IsCloneableSlot request. -func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetVnetConnectionSlotPreparer prepares the GetVnetConnectionSlot request. +func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15936,23 +15970,23 @@ func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGr } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// IsCloneableSlotSender sends the IsCloneableSlot request. The method will close the +// GetVnetConnectionSlotSender sends the GetVnetConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) IsCloneableSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// IsCloneableSlotResponder handles the response to the IsCloneableSlot request. The method always +// GetVnetConnectionSlotResponder handles the response to the GetVnetConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result SiteCloneability, err error) { +func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -15963,44 +15997,58 @@ func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result S return } -// List description for Get all apps for a subscription. -func (client AppsClient) List(ctx context.Context) (result AppCollectionPage, err error) { +// GetWebJob description for Get webjob information for an app, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// webJobName - name of the web job. +func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result Job, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJob") defer func() { sc := -1 - if result.ac.Response.Response != nil { - sc = result.ac.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) + 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("web.AppsClient", "GetWebJob", err.Error()) + } + + req, err := client.GetWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", nil, "Failure preparing request") return } - resp, err := client.ListSender(req) + resp, err := client.GetWebJobSender(req) if err != nil { - result.ac.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure sending request") return } - result.ac, err = client.ListResponder(resp) + result, err = client.GetWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure responding to request") } return } -// ListPreparer prepares the List request. -func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error) { +// GetWebJobPreparer prepares the GetWebJob request. +func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -16011,21 +16059,21 @@ func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSender sends the List request. The method will close the +// GetWebJobSender sends the GetWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListResponder handles the response to the List request. The method always +// GetWebJobResponder handles the response to the GetWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) ListResponder(resp *http.Response) (result AppCollection, err error) { +func (client AppsClient) GetWebJobResponder(resp *http.Response) (result Job, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16036,50 +16084,16 @@ func (client AppsClient) ListResponder(resp *http.Response) (result AppCollectio return } -// listNextResults retrieves the next set of results, if any. -func (client AppsClient) listNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) { - req, err := lastResults.appCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "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, "web.AppsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListComplete(ctx context.Context) (result AppCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.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 -} - -// ListApplicationSettings description for Gets the application settings of an app. +// GetWebJobSlot description for Get webjob information for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { +// name - site name. +// webJobName - name of the web job. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result Job, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettings") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJobSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -16093,36 +16107,38 @@ func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGr 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("web.AppsClient", "ListApplicationSettings", err.Error()) + return result, validation.NewError("web.AppsClient", "GetWebJobSlot", err.Error()) } - req, err := client.ListApplicationSettingsPreparer(ctx, resourceGroupName, name) + req, err := client.GetWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.ListApplicationSettingsSender(req) + resp, err := client.GetWebJobSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure sending request") return } - result, err = client.ListApplicationSettingsResponder(resp) + result, err = client.GetWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure responding to request") } return } -// ListApplicationSettingsPreparer prepares the ListApplicationSettings request. -func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetWebJobSlotPreparer prepares the GetWebJobSlot request. +func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -16131,23 +16147,23 @@ func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, re } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListApplicationSettingsSender sends the ListApplicationSettings request. The method will close the +// GetWebJobSlotSender sends the GetWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListApplicationSettingsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListApplicationSettingsResponder handles the response to the ListApplicationSettings request. The method always +// GetWebJobSlotResponder handles the response to the GetWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) { +func (client AppsClient) GetWebJobSlotResponder(resp *http.Response) (result Job, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16158,15 +16174,13 @@ func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) ( return } -// ListApplicationSettingsSlot description for Gets the application settings of an app. +// GetWebSiteContainerLogs description for Gets the last lines of docker logs for the given site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will get the application settings -// for the production slot. -func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) { +// name - name of web app. +func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettingsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogs") defer func() { sc := -1 if result.Response.Response != nil { @@ -16180,36 +16194,35 @@ func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resour 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("web.AppsClient", "ListApplicationSettingsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogs", err.Error()) } - req, err := client.ListApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetWebSiteContainerLogsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", nil, "Failure preparing request") return } - resp, err := client.ListApplicationSettingsSlotSender(req) + resp, err := client.GetWebSiteContainerLogsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure sending request") return } - result, err = client.ListApplicationSettingsSlotResponder(resp) + result, err = client.GetWebSiteContainerLogsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure responding to request") } return } -// ListApplicationSettingsSlotPreparer prepares the ListApplicationSettingsSlot request. -func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetWebSiteContainerLogsPreparer prepares the GetWebSiteContainerLogs request. +func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -16221,38 +16234,38 @@ func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListApplicationSettingsSlotSender sends the ListApplicationSettingsSlot request. The method will close the +// GetWebSiteContainerLogsSender sends the GetWebSiteContainerLogs request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetWebSiteContainerLogsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListApplicationSettingsSlotResponder handles the response to the ListApplicationSettingsSlot request. The method always +// GetWebSiteContainerLogsResponder handles the response to the GetWebSiteContainerLogs request. The method always // closes the http.Response Body. -func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) { +func (client AppsClient) GetWebSiteContainerLogsResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) result.Response = autorest.Response{Response: resp} return } -// ListAzureStorageAccounts description for Gets the Azure storage account configurations of an app. +// GetWebSiteContainerLogsSlot description for Gets the last lines of docker logs for the given site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result AzureStoragePropertyDictionaryResource, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccounts") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogsSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -16266,35 +16279,36 @@ func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceG 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("web.AppsClient", "ListAzureStorageAccounts", err.Error()) + return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogsSlot", err.Error()) } - req, err := client.ListAzureStorageAccountsPreparer(ctx, resourceGroupName, name) + req, err := client.GetWebSiteContainerLogsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", nil, "Failure preparing request") return } - resp, err := client.ListAzureStorageAccountsSender(req) + resp, err := client.GetWebSiteContainerLogsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure sending request") return } - result, err = client.ListAzureStorageAccountsResponder(resp) + result, err = client.GetWebSiteContainerLogsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure responding to request") } return } -// ListAzureStorageAccountsPreparer prepares the ListAzureStorageAccounts request. -func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetWebSiteContainerLogsSlotPreparer prepares the GetWebSiteContainerLogsSlot request. +func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -16306,44 +16320,42 @@ func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListAzureStorageAccountsSender sends the ListAzureStorageAccounts request. The method will close the +// GetWebSiteContainerLogsSlotSender sends the GetWebSiteContainerLogsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListAzureStorageAccountsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetWebSiteContainerLogsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListAzureStorageAccountsResponder handles the response to the ListAzureStorageAccounts request. The method always +// GetWebSiteContainerLogsSlotResponder handles the response to the GetWebSiteContainerLogsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { +func (client AppsClient) GetWebSiteContainerLogsSlotResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) result.Response = autorest.Response{Response: resp} return } -// ListAzureStorageAccountsSlot description for Gets the Azure storage account configurations of an app. +// InstallSiteExtension description for Install site extension on a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage -// account configurations for the production slot. -func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AzureStoragePropertyDictionaryResource, err error) { +// name - site name. +// siteExtensionID - site extension name. +func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result AppsInstallSiteExtensionFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccountsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtension") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16353,36 +16365,30 @@ func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resou 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("web.AppsClient", "ListAzureStorageAccountsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "InstallSiteExtension", err.Error()) } - req, err := client.ListAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.InstallSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure preparing request") return } - resp, err := client.ListAzureStorageAccountsSlotSender(req) + result, err = client.InstallSiteExtensionSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", result.Response(), "Failure sending request") return } - result, err = client.ListAzureStorageAccountsSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure responding to request") - } - return } -// ListAzureStorageAccountsSlotPreparer prepares the ListAzureStorageAccountsSlot request. -func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// InstallSiteExtensionPreparer prepares the InstallSiteExtension request. +func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), + "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -16392,44 +16398,139 @@ func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Contex } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListAzureStorageAccountsSlotSender sends the ListAzureStorageAccountsSlot request. The method will close the +// InstallSiteExtensionSender sends the InstallSiteExtension request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) InstallSiteExtensionSender(req *http.Request) (future AppsInstallSiteExtensionFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } -// ListAzureStorageAccountsSlotResponder handles the response to the ListAzureStorageAccountsSlot request. The method always +// InstallSiteExtensionResponder handles the response to the InstallSiteExtension request. The method always // closes the http.Response Body. -func (client AppsClient) ListAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { +func (client AppsClient) InstallSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// ListBackups description for Gets existing backups of an app. +// InstallSiteExtensionSlot description for Install site extension on a web site, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// siteExtensionID - site extension name. +// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. +func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result AppsInstallSiteExtensionSlotFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtensionSlot") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "InstallSiteExtensionSlot", err.Error()) + } + + req, err := client.InstallSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request") + return + } + + result, err = client.InstallSiteExtensionSlotSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", result.Response(), "Failure sending request") + return + } + + return +} + +// InstallSiteExtensionSlotPreparer prepares the InstallSiteExtensionSlot request. +func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InstallSiteExtensionSlotSender sends the InstallSiteExtensionSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) InstallSiteExtensionSlotSender(req *http.Request) (future AppsInstallSiteExtensionSlotFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// InstallSiteExtensionSlotResponder handles the response to the InstallSiteExtensionSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) InstallSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// IsCloneable description for Shows whether an app can be cloned to another resource group or subscription. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) { +func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string) (result SiteCloneability, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneable") defer func() { sc := -1 - if result.bic.Response.Response != nil { - sc = result.bic.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16439,36 +16540,122 @@ func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName stri 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("web.AppsClient", "ListBackups", err.Error()) + return result, validation.NewError("web.AppsClient", "IsCloneable", err.Error()) } - result.fn = client.listBackupsNextResults - req, err := client.ListBackupsPreparer(ctx, resourceGroupName, name) + req, err := client.IsCloneablePreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", nil, "Failure preparing request") return } - resp, err := client.ListBackupsSender(req) + resp, err := client.IsCloneableSender(req) if err != nil { - result.bic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure sending request") return } - result.bic, err = client.ListBackupsResponder(resp) + result, err = client.IsCloneableResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure responding to request") } return } -// ListBackupsPreparer prepares the ListBackups request. -func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// IsCloneablePreparer prepares the IsCloneable request. +func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/iscloneable", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// IsCloneableSender sends the IsCloneable request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) IsCloneableSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// IsCloneableResponder handles the response to the IsCloneable request. The method always +// closes the http.Response Body. +func (client AppsClient) IsCloneableResponder(resp *http.Response) (result SiteCloneability, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// IsCloneableSlot description for Shows whether an app can be cloned to another resource group or subscription. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. By default, this API returns information on the production slot. +func (client AppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteCloneability, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneableSlot") + defer func() { + 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("web.AppsClient", "IsCloneableSlot", err.Error()) + } + + req, err := client.IsCloneableSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", nil, "Failure preparing request") + return + } + + resp, err := client.IsCloneableSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure sending request") + return + } + + result, err = client.IsCloneableSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure responding to request") + } + + return +} + +// IsCloneableSlotPreparer prepares the IsCloneableSlot request. +func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -16477,24 +16664,1022 @@ func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupN "api-version": APIVersion, } + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// IsCloneableSlotSender sends the IsCloneableSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) IsCloneableSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// IsCloneableSlotResponder handles the response to the IsCloneableSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result SiteCloneability, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List description for Get all apps for a subscription. +func (client AppsClient) List(ctx context.Context) (result AppCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List") + defer func() { + sc := -1 + if result.ac.Response.Response != nil { + sc = result.ac.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ac.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure sending request") + return + } + + result.ac, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites", 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 AppsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AppsClient) ListResponder(resp *http.Response) (result AppCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client AppsClient) listNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) { + req, err := lastResults.appCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "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, "web.AppsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListComplete(ctx context.Context) (result AppCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.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 +} + +// ListApplicationSettings description for Gets the application settings of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettings") + defer func() { + 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("web.AppsClient", "ListApplicationSettings", err.Error()) + } + + req, err := client.ListApplicationSettingsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", nil, "Failure preparing request") + return + } + + resp, err := client.ListApplicationSettingsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure sending request") + return + } + + result, err = client.ListApplicationSettingsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure responding to request") + } + + return +} + +// ListApplicationSettingsPreparer prepares the ListApplicationSettings request. +func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/config/appsettings/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListApplicationSettingsSender sends the ListApplicationSettings request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListApplicationSettingsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListApplicationSettingsResponder handles the response to the ListApplicationSettings request. The method always +// closes the http.Response Body. +func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListApplicationSettingsSlot description for Gets the application settings of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will get the application settings +// for the production slot. +func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettingsSlot") + defer func() { + 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("web.AppsClient", "ListApplicationSettingsSlot", err.Error()) + } + + req, err := client.ListApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListApplicationSettingsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListApplicationSettingsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure responding to request") + } + + return +} + +// ListApplicationSettingsSlotPreparer prepares the ListApplicationSettingsSlot request. +func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/slots/{slot}/config/appsettings/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListApplicationSettingsSlotSender sends the ListApplicationSettingsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListApplicationSettingsSlotResponder handles the response to the ListApplicationSettingsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAzureStorageAccounts description for Gets the Azure storage account configurations of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result AzureStoragePropertyDictionaryResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccounts") + defer func() { + 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("web.AppsClient", "ListAzureStorageAccounts", err.Error()) + } + + req, err := client.ListAzureStorageAccountsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", nil, "Failure preparing request") + return + } + + resp, err := client.ListAzureStorageAccountsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure sending request") + return + } + + result, err = client.ListAzureStorageAccountsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure responding to request") + } + + return +} + +// ListAzureStorageAccountsPreparer prepares the ListAzureStorageAccounts request. +func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/config/azurestorageaccounts/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAzureStorageAccountsSender sends the ListAzureStorageAccounts request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListAzureStorageAccountsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListAzureStorageAccountsResponder handles the response to the ListAzureStorageAccounts request. The method always +// closes the http.Response Body. +func (client AppsClient) ListAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAzureStorageAccountsSlot description for Gets the Azure storage account configurations of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage +// account configurations for the production slot. +func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AzureStoragePropertyDictionaryResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccountsSlot") + defer func() { + 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("web.AppsClient", "ListAzureStorageAccountsSlot", err.Error()) + } + + req, err := client.ListAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListAzureStorageAccountsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListAzureStorageAccountsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure responding to request") + } + + return +} + +// ListAzureStorageAccountsSlotPreparer prepares the ListAzureStorageAccountsSlot request. +func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAzureStorageAccountsSlotSender sends the ListAzureStorageAccountsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListAzureStorageAccountsSlotResponder handles the response to the ListAzureStorageAccountsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBackups description for Gets existing backups of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups") + defer func() { + sc := -1 + if result.bic.Response.Response != nil { + sc = result.bic.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("web.AppsClient", "ListBackups", err.Error()) + } + + result.fn = client.listBackupsNextResults + req, err := client.ListBackupsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupsSender(req) + if err != nil { + result.bic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure sending request") + return + } + + result.bic, err = client.ListBackupsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure responding to request") + } + + return +} + +// ListBackupsPreparer prepares the ListBackups request. +func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupsSender sends the ListBackups request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBackupsResponder handles the response to the ListBackups request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBackupsNextResults retrieves the next set of results, if any. +func (client AppsClient) listBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) { + req, err := lastResults.backupItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBackupsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBackupsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBackupsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBackups(ctx, resourceGroupName, name) + return +} + +// ListBackupsSlot description for Gets existing backups of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will get backups of the production +// slot. +func (client AppsClient) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot") + defer func() { + sc := -1 + if result.bic.Response.Response != nil { + sc = result.bic.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("web.AppsClient", "ListBackupsSlot", err.Error()) + } + + result.fn = client.listBackupsSlotNextResults + req, err := client.ListBackupsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupsSlotSender(req) + if err != nil { + result.bic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure sending request") + return + } + + result.bic, err = client.ListBackupsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure responding to request") + } + + return +} + +// ListBackupsSlotPreparer prepares the ListBackupsSlot request. +func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupsSlotSender sends the ListBackupsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBackupsSlotResponder handles the response to the ListBackupsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBackupsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) { + req, err := lastResults.backupItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBackupsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBackupsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBackupsSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListBackupStatusSecrets description for Gets status of a web app backup that may be in progress, including secrets +// associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup +// if a new URL is passed in the request body. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +// backupID - ID of backup. +// request - information on backup request. +func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets") + defer func() { + 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: request, + Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error()) + } + + req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupStatusSecretsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request") + return + } + + result, err = client.ListBackupStatusSecretsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request") + } + + return +} + +// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request. +func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/backups/{backupId}/list", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBackupStatusSecretsSlot description for Gets status of a web app backup that may be in progress, including +// secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for +// the backup if a new URL is passed in the request body. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +// backupID - ID of backup. +// request - information on backup request. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot") + defer func() { + 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: request, + Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error()) + } + + req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupStatusSecretsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListBackupStatusSecretsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request") + } + + return +} + +// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request. +func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup description for Gets all web, mobile, and API apps in the specified resource group. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// includeSlots - specify true to include deployment slots in results. The default is false, +// which only gives you the production slot of all apps. +func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.ac.Response.Response != nil { + sc = result.ac.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("web.AppsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, includeSlots) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.ac.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.ac, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, includeSlots *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if includeSlots != nil { + queryParameters["includeSlots"] = autorest.Encode("query", *includeSlots) + } + preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListBackupsSender sends the ListBackups request. The method will close the +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListBackupsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListBackupsResponder handles the response to the ListBackups request. The method always +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client AppsClient) ListBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) { +func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (result AppCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16505,31 +17690,31 @@ func (client AppsClient) ListBackupsResponder(resp *http.Response) (result Backu return } -// listBackupsNextResults retrieves the next set of results, if any. -func (client AppsClient) listBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) { - req, err := lastResults.backupItemCollectionPreparer(ctx) +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client AppsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) { + req, err := lastResults.appCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListBackupsSender(req) + resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") } - result, err = client.ListBackupsResponder(resp) + result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") } return } -// ListBackupsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) { +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -16538,23 +17723,21 @@ func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupN tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListBackups(ctx, resourceGroupName, name) + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, includeSlots) return } -// ListBackupsSlot description for Gets existing backups of an app. +// ListConfigurations description for List the configurations of an app // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will get backups of the production -// slot. -func (client AppsClient) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) { +func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") defer func() { sc := -1 - if result.bic.Response.Response != nil { - sc = result.bic.Response.Response.StatusCode + if result.scrc.Response.Response != nil { + sc = result.scrc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16564,37 +17747,36 @@ func (client AppsClient) ListBackupsSlot(ctx context.Context, 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("web.AppsClient", "ListBackupsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurations", err.Error()) } - result.fn = client.listBackupsSlotNextResults - req, err := client.ListBackupsSlotPreparer(ctx, resourceGroupName, name, slot) + result.fn = client.listConfigurationsNextResults + req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request") return } - resp, err := client.ListBackupsSlotSender(req) + resp, err := client.ListConfigurationsSender(req) if err != nil { - result.bic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure sending request") + result.scrc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request") return } - result.bic, err = client.ListBackupsSlotResponder(resp) + result.scrc, err = client.ListConfigurationsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request") } return } -// ListBackupsSlotPreparer prepares the ListBackupsSlot request. -func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListConfigurationsPreparer prepares the ListConfigurations request. +func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -16606,21 +17788,21 @@ func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListBackupsSlotSender sends the ListBackupsSlot request. The method will close the +// ListConfigurationsSender sends the ListConfigurations request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListBackupsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListBackupsSlotResponder handles the response to the ListBackupsSlot request. The method always +// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always // closes the http.Response Body. -func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) { +func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16631,31 +17813,31 @@ func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result B return } -// listBackupsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) { - req, err := lastResults.backupItemCollectionPreparer(ctx) +// listConfigurationsNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { + req, err := lastResults.siteConfigResourceCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListBackupsSlotSender(req) + resp, err := client.ListConfigurationsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request") } - result, err = client.ListBackupsSlotResponder(resp) + result, err = client.ListConfigurationsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request") } return } -// ListBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) { +// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -16664,25 +17846,22 @@ func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListBackupsSlot(ctx, resourceGroupName, name, slot) + result.page, err = client.ListConfigurations(ctx, resourceGroupName, name) return } -// ListBackupStatusSecrets description for Gets status of a web app backup that may be in progress, including secrets -// associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup -// if a new URL is passed in the request body. +// ListConfigurationSnapshotInfo description for Gets a list of web app configuration snapshots identifiers. Each +// element of the list contains a timestamp and the ID of the snapshot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// backupID - ID of backup. -// request - information on backup request. -func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) { +// name - name of the app. +func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.scsic.Response.Response != nil { + sc = result.scsic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16691,44 +17870,35 @@ func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGr {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: request, - Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfo", err.Error()) } - req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request) + result.fn = client.listConfigurationSnapshotInfoNextResults + req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request") return } - resp, err := client.ListBackupStatusSecretsSender(req) + resp, err := client.ListConfigurationSnapshotInfoSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request") + result.scsic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request") return } - result, err = client.ListBackupStatusSecretsResponder(resp) + result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request") } return } -// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request. -func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) { +// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request. +func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -16740,25 +17910,23 @@ func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, re } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list", pathParameters), - autorest.WithJSON(request), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the +// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always +// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always // closes the http.Response Body. -func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) { +func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16769,121 +17937,57 @@ func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) ( return } -// ListBackupStatusSecretsSlot description for Gets status of a web app backup that may be in progress, including -// secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for -// the backup if a new URL is passed in the request body. -// Parameters: -// resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// backupID - ID of backup. -// request - information on backup request. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot") - defer func() { - 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: request, - Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error()) - } - - req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot) +// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { + req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request") + } + if req == nil { return } - - resp, err := client.ListBackupStatusSecretsSlotSender(req) + resp, err := client.ListConfigurationSnapshotInfoSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request") - return + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request") } - - result, err = client.ListBackupStatusSecretsSlotResponder(resp) + result, err = client.ListConfigurationSnapshotInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request") } - return } -// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request. -func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-08-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.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters), - autorest.WithJSON(request), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always -// closes the http.Response Body. -func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} +// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name) return } -// ListByResourceGroup description for Gets all web, mobile, and API apps in the specified resource group. +// ListConfigurationSnapshotInfoSlot description for Gets a list of web app configuration snapshots identifiers. Each +// element of the list contains a timestamp and the ID of the snapshot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// includeSlots - specify true to include deployment slots in results. The default is false, -// which only gives you the production slot of all apps. -func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionPage, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") defer func() { sc := -1 - if result.ac.Response.Response != nil { - sc = result.ac.Response.Response.StatusCode + if result.scsic.Response.Response != nil { + sc = result.scsic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16893,35 +17997,37 @@ func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupN 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("web.AppsClient", "ListByResourceGroup", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfoSlot", err.Error()) } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, includeSlots) + result.fn = client.listConfigurationSnapshotInfoSlotNextResults + req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request") return } - resp, err := client.ListByResourceGroupSender(req) + resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) if err != nil { - result.ac.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure sending request") + result.scsic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request") return } - result.ac, err = client.ListByResourceGroupResponder(resp) + result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request") } return } -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, includeSlots *bool) (*http.Request, error) { +// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request. +func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -16929,28 +18035,25 @@ func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resour queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if includeSlots != nil { - queryParameters["includeSlots"] = autorest.Encode("query", *includeSlots) - } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (result AppCollection, err error) { +func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16961,31 +18064,31 @@ func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (resu return } -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client AppsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) { - req, err := lastResults.appCollectionPreparer(ctx) +// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { + req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListByResourceGroupSender(req) + resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListByResourceGroupResponder(resp) + result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request") } return } -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionIterator, err error) { +// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -16994,17 +18097,19 @@ func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resour tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, includeSlots) + result.page, err = client.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot) return } -// ListConfigurations description for List the configurations of an app +// ListConfigurationsSlot description for List the configurations of an app // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot") defer func() { sc := -1 if result.scrc.Response.Response != nil { @@ -17018,36 +18123,37 @@ func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupNa 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("web.AppsClient", "ListConfigurations", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurationsSlot", err.Error()) } - result.fn = client.listConfigurationsNextResults - req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name) + result.fn = client.listConfigurationsSlotNextResults + req, err := client.ListConfigurationsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationsSender(req) + resp, err := client.ListConfigurationsSlotSender(req) if err != nil { result.scrc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure sending request") return } - result.scrc, err = client.ListConfigurationsResponder(resp) + result.scrc, err = client.ListConfigurationsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure responding to request") } return } -// ListConfigurationsPreparer prepares the ListConfigurations request. -func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListConfigurationsSlotPreparer prepares the ListConfigurationsSlot request. +func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17059,21 +18165,21 @@ func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationsSender sends the ListConfigurations request. The method will close the +// ListConfigurationsSlotSender sends the ListConfigurationsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always +// ListConfigurationsSlotResponder handles the response to the ListConfigurationsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { +func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17084,31 +18190,31 @@ func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (resul return } -// listConfigurationsNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { +// listConfigurationsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationsSlotNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { req, err := lastResults.siteConfigResourceCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListConfigurationsSender(req) + resp, err := client.ListConfigurationsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListConfigurationsResponder(resp) + result, err = client.ListConfigurationsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure responding to next results request") } return } -// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) { +// ListConfigurationsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -17117,22 +18223,21 @@ func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListConfigurations(ctx, resourceGroupName, name) + result.page, err = client.ListConfigurationsSlot(ctx, resourceGroupName, name, slot) return } -// ListConfigurationSnapshotInfo description for Gets a list of web app configuration snapshots identifiers. Each -// element of the list contains a timestamp and the ID of the snapshot. +// ListConnectionStrings description for Gets the connection strings of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { +func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result ConnectionStringDictionary, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStrings") defer func() { sc := -1 - if result.scsic.Response.Response != nil { - sc = result.scsic.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17142,33 +18247,32 @@ func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, reso 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("web.AppsClient", "ListConfigurationSnapshotInfo", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConnectionStrings", err.Error()) } - result.fn = client.listConfigurationSnapshotInfoNextResults - req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name) + req, err := client.ListConnectionStringsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationSnapshotInfoSender(req) + resp, err := client.ListConnectionStringsSender(req) if err != nil { - result.scsic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure sending request") return } - result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp) + result, err = client.ListConnectionStringsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure responding to request") } return } -// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request. -func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListConnectionStringsPreparer prepares the ListConnectionStrings request. +func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -17181,23 +18285,23 @@ func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Conte } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the +// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always +// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { +func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17208,57 +18312,19 @@ func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Respo return } -// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { - req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListConfigurationSnapshotInfoSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request") - } - result, err = client.ListConfigurationSnapshotInfoResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name) - return -} - -// ListConfigurationSnapshotInfoSlot description for Gets a list of web app configuration snapshots identifiers. Each -// element of the list contains a timestamp and the ID of the snapshot. +// ListConnectionStringsSlot description for Gets the connection strings of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the -// production slot. -func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will get the connection settings for +// the production slot. +func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ConnectionStringDictionary, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStringsSlot") defer func() { - sc := -1 - if result.scsic.Response.Response != nil { - sc = result.scsic.Response.Response.StatusCode + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17268,33 +18334,32 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, 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("web.AppsClient", "ListConfigurationSnapshotInfoSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConnectionStringsSlot", err.Error()) } - result.fn = client.listConfigurationSnapshotInfoSlotNextResults - req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListConnectionStringsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) + resp, err := client.ListConnectionStringsSlotSender(req) if err != nil { - result.scsic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure sending request") return } - result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) + result, err = client.ListConnectionStringsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure responding to request") } return } -// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request. -func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListConnectionStringsSlotPreparer prepares the ListConnectionStringsSlot request. +func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -17308,23 +18373,23 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.C } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the +// ListConnectionStringsSlotSender sends the ListConnectionStringsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConnectionStringsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always +// ListConnectionStringsSlotResponder handles the response to the ListConnectionStringsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { +func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17335,56 +18400,17 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.R return } -// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { - req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request") - } - result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot) - return -} - -// ListConfigurationsSlot description for List the configurations of an app +// ListContinuousWebJobs description for List continuous web jobs for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the -// production slot. -func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionPage, err error) { +// name - site name. +func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs") defer func() { sc := -1 - if result.scrc.Response.Response != nil { - sc = result.scrc.Response.Response.StatusCode + if result.cwjc.Response.Response != nil { + sc = result.cwjc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17394,37 +18420,36 @@ func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGro 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("web.AppsClient", "ListConfigurationsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListContinuousWebJobs", err.Error()) } - result.fn = client.listConfigurationsSlotNextResults - req, err := client.ListConfigurationsSlotPreparer(ctx, resourceGroupName, name, slot) + result.fn = client.listContinuousWebJobsNextResults + req, err := client.ListContinuousWebJobsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationsSlotSender(req) + resp, err := client.ListContinuousWebJobsSender(req) if err != nil { - result.scrc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure sending request") + result.cwjc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending request") return } - result.scrc, err = client.ListConfigurationsSlotResponder(resp) + result.cwjc, err = client.ListContinuousWebJobsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to request") } return } -// ListConfigurationsSlotPreparer prepares the ListConfigurationsSlot request. -func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListContinuousWebJobsPreparer prepares the ListContinuousWebJobs request. +func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17436,21 +18461,21 @@ func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationsSlotSender sends the ListConfigurationsSlot request. The method will close the +// ListContinuousWebJobsSender sends the ListContinuousWebJobs request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListContinuousWebJobsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConfigurationsSlotResponder handles the response to the ListConfigurationsSlot request. The method always +// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { +func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17461,31 +18486,31 @@ func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (r return } -// listConfigurationsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationsSlotNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { - req, err := lastResults.siteConfigResourceCollectionPreparer(ctx) +// listContinuousWebJobsNextResults retrieves the next set of results, if any. +func (client AppsClient) listContinuousWebJobsNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { + req, err := lastResults.continuousWebJobCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListConfigurationsSlotSender(req) + resp, err := client.ListContinuousWebJobsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure sending next results request") } - result, err = client.ListConfigurationsSlotResponder(resp) + result, err = client.ListContinuousWebJobsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure responding to next results request") } return } -// ListConfigurationsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionIterator, err error) { +// ListContinuousWebJobsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -17494,21 +18519,23 @@ func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, res tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListConfigurationsSlot(ctx, resourceGroupName, name, slot) + result.page, err = client.ListContinuousWebJobs(ctx, resourceGroupName, name) return } -// ListConnectionStrings description for Gets the connection strings of an app. +// ListContinuousWebJobsSlot description for List continuous web jobs for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result ConnectionStringDictionary, err error) { +// name - site name. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStrings") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.cwjc.Response.Response != nil { + sc = result.cwjc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17518,35 +18545,37 @@ func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGrou 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("web.AppsClient", "ListConnectionStrings", err.Error()) + return result, validation.NewError("web.AppsClient", "ListContinuousWebJobsSlot", err.Error()) } - req, err := client.ListConnectionStringsPreparer(ctx, resourceGroupName, name) + result.fn = client.listContinuousWebJobsSlotNextResults + req, err := client.ListContinuousWebJobsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing request") return } - resp, err := client.ListConnectionStringsSender(req) + resp, err := client.ListContinuousWebJobsSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure sending request") + result.cwjc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending request") return } - result, err = client.ListConnectionStringsResponder(resp) + result.cwjc, err = client.ListContinuousWebJobsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to request") } return } -// ListConnectionStringsPreparer prepares the ListConnectionStrings request. -func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListContinuousWebJobsSlotPreparer prepares the ListContinuousWebJobsSlot request. +func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17556,23 +18585,23 @@ func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, reso } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the +// ListContinuousWebJobsSlotSender sends the ListContinuousWebJobsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListContinuousWebJobsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always +// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) { +func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17583,15 +18612,52 @@ func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (re return } -// ListConnectionStringsSlot description for Gets the connection strings of an app. +// listContinuousWebJobsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listContinuousWebJobsSlotNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { + req, err := lastResults.continuousWebJobCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListContinuousWebJobsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListContinuousWebJobsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListContinuousWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListContinuousWebJobsSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListDeploymentLog description for List deployment log for specific deployment for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will get the connection settings for -// the production slot. -func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ConnectionStringDictionary, err error) { +// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET +// /api/sites/{siteName}/deployments". +func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStringsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLog") defer func() { sc := -1 if result.Response.Response != nil { @@ -17605,36 +18671,36 @@ func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resource 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("web.AppsClient", "ListConnectionStringsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDeploymentLog", err.Error()) } - req, err := client.ListConnectionStringsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListDeploymentLogPreparer(ctx, resourceGroupName, name, ID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", nil, "Failure preparing request") return } - resp, err := client.ListConnectionStringsSlotSender(req) + resp, err := client.ListDeploymentLogSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure sending request") return } - result, err = client.ListConnectionStringsSlotResponder(resp) + result, err = client.ListDeploymentLogResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure responding to request") } return } -// ListConnectionStringsSlotPreparer prepares the ListConnectionStringsSlot request. -func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListDeploymentLogPreparer prepares the ListDeploymentLog request. +func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17644,23 +18710,23 @@ func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConnectionStringsSlotSender sends the ListConnectionStringsSlot request. The method will close the +// ListDeploymentLogSender sends the ListDeploymentLog request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConnectionStringsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDeploymentLogSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConnectionStringsSlotResponder handles the response to the ListConnectionStringsSlot request. The method always +// ListDeploymentLogResponder handles the response to the ListDeploymentLog request. The method always // closes the http.Response Body. -func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) { +func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result Deployment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17671,17 +18737,21 @@ func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) return } -// ListContinuousWebJobs description for List continuous web jobs for an app, or a deployment slot. +// ListDeploymentLogSlot description for List deployment log for specific deployment for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionPage, err error) { +// name - name of the app. +// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET +// /api/sites/{siteName}/deployments". +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLogSlot") defer func() { sc := -1 - if result.cwjc.Response.Response != nil { - sc = result.cwjc.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17691,36 +18761,37 @@ func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGrou 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("web.AppsClient", "ListContinuousWebJobs", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDeploymentLogSlot", err.Error()) } - result.fn = client.listContinuousWebJobsNextResults - req, err := client.ListContinuousWebJobsPreparer(ctx, resourceGroupName, name) + req, err := client.ListDeploymentLogSlotPreparer(ctx, resourceGroupName, name, ID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", nil, "Failure preparing request") return } - resp, err := client.ListContinuousWebJobsSender(req) + resp, err := client.ListDeploymentLogSlotSender(req) if err != nil { - result.cwjc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure sending request") return } - result.cwjc, err = client.ListContinuousWebJobsResponder(resp) + result, err = client.ListDeploymentLogSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure responding to request") } return } -// ListContinuousWebJobsPreparer prepares the ListContinuousWebJobs request. -func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListDeploymentLogSlotPreparer prepares the ListDeploymentLogSlot request. +func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17732,21 +18803,21 @@ func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListContinuousWebJobsSender sends the ListContinuousWebJobs request. The method will close the +// ListDeploymentLogSlotSender sends the ListDeploymentLogSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListContinuousWebJobsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDeploymentLogSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs request. The method always +// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { +func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (result Deployment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17757,56 +18828,17 @@ func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (re return } -// listContinuousWebJobsNextResults retrieves the next set of results, if any. -func (client AppsClient) listContinuousWebJobsNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { - req, err := lastResults.continuousWebJobCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListContinuousWebJobsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListContinuousWebJobsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListContinuousWebJobsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListContinuousWebJobs(ctx, resourceGroupName, name) - return -} - -// ListContinuousWebJobsSlot description for List continuous web jobs for an app, or a deployment slot. +// ListDeployments description for List deployments for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the -// production slot. -func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionPage, err error) { +// name - name of the app. +func (client AppsClient) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments") defer func() { sc := -1 - if result.cwjc.Response.Response != nil { - sc = result.cwjc.Response.Response.StatusCode + if result.dc.Response.Response != nil { + sc = result.dc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17816,37 +18848,36 @@ func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resource 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("web.AppsClient", "ListContinuousWebJobsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDeployments", err.Error()) } - result.fn = client.listContinuousWebJobsSlotNextResults - req, err := client.ListContinuousWebJobsSlotPreparer(ctx, resourceGroupName, name, slot) + result.fn = client.listDeploymentsNextResults + req, err := client.ListDeploymentsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", nil, "Failure preparing request") return } - resp, err := client.ListContinuousWebJobsSlotSender(req) + resp, err := client.ListDeploymentsSender(req) if err != nil { - result.cwjc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending request") + result.dc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure sending request") return } - result.cwjc, err = client.ListContinuousWebJobsSlotResponder(resp) + result.dc, err = client.ListDeploymentsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure responding to request") } return } -// ListContinuousWebJobsSlotPreparer prepares the ListContinuousWebJobsSlot request. -func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListDeploymentsPreparer prepares the ListDeployments request. +func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17858,21 +18889,21 @@ func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListContinuousWebJobsSlotSender sends the ListContinuousWebJobsSlot request. The method will close the +// ListDeploymentsSender sends the ListDeployments request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListContinuousWebJobsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDeploymentsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot request. The method always +// ListDeploymentsResponder handles the response to the ListDeployments request. The method always // closes the http.Response Body. -func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { +func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result DeploymentCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17883,31 +18914,31 @@ func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) return } -// listContinuousWebJobsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listContinuousWebJobsSlotNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { - req, err := lastResults.continuousWebJobCollectionPreparer(ctx) +// listDeploymentsNextResults retrieves the next set of results, if any. +func (client AppsClient) listDeploymentsNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) { + req, err := lastResults.deploymentCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListContinuousWebJobsSlotSender(req) + resp, err := client.ListDeploymentsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure sending next results request") } - result, err = client.ListContinuousWebJobsSlotResponder(resp) + result, err = client.ListDeploymentsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure responding to next results request") } return } -// ListContinuousWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionIterator, err error) { +// ListDeploymentsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -17916,23 +18947,23 @@ func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListContinuousWebJobsSlot(ctx, resourceGroupName, name, slot) + result.page, err = client.ListDeployments(ctx, resourceGroupName, name) return } -// ListDeploymentLog description for List deployment log for specific deployment for an app, or a deployment slot. +// ListDeploymentsSlot description for List deployments for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET -// /api/sites/{siteName}/deployments". -func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLog") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.dc.Response.Response != nil { + sc = result.dc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17942,36 +18973,37 @@ func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupNam 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("web.AppsClient", "ListDeploymentLog", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDeploymentsSlot", err.Error()) } - req, err := client.ListDeploymentLogPreparer(ctx, resourceGroupName, name, ID) + result.fn = client.listDeploymentsSlotNextResults + req, err := client.ListDeploymentsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentLogSender(req) + resp, err := client.ListDeploymentsSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure sending request") + result.dc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure sending request") return } - result, err = client.ListDeploymentLogResponder(resp) + result.dc, err = client.ListDeploymentsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure responding to request") } return } -// ListDeploymentLogPreparer prepares the ListDeploymentLog request. -func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { +// ListDeploymentsSlotPreparer prepares the ListDeploymentsSlot request. +func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17983,21 +19015,21 @@ func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDeploymentLogSender sends the ListDeploymentLog request. The method will close the +// ListDeploymentsSlotSender sends the ListDeploymentsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDeploymentLogSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDeploymentsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDeploymentLogResponder handles the response to the ListDeploymentLog request. The method always +// ListDeploymentsSlotResponder handles the response to the ListDeploymentsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (result DeploymentCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18008,21 +19040,54 @@ func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result return } -// ListDeploymentLogSlot description for List deployment log for specific deployment for an app, or a deployment slot. +// listDeploymentsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listDeploymentsSlotNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) { + req, err := lastResults.deploymentCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListDeploymentsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListDeploymentsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListDeploymentsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListDeploymentsSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListDomainOwnershipIdentifiers description for Lists ownership identifiers for domain associated with web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET -// /api/sites/{siteName}/deployments". -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { +func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLogSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.ic.Response.Response != nil { + sc = result.ic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18032,37 +19097,36 @@ func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGrou 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("web.AppsClient", "ListDeploymentLogSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiers", err.Error()) } - req, err := client.ListDeploymentLogSlotPreparer(ctx, resourceGroupName, name, ID, slot) + result.fn = client.listDomainOwnershipIdentifiersNextResults + req, err := client.ListDomainOwnershipIdentifiersPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentLogSlotSender(req) + resp, err := client.ListDomainOwnershipIdentifiersSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure sending request") + result.ic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure sending request") return } - result, err = client.ListDeploymentLogSlotResponder(resp) + result.ic, err = client.ListDomainOwnershipIdentifiersResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure responding to request") } return } -// ListDeploymentLogSlotPreparer prepares the ListDeploymentLogSlot request. -func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { +// ListDomainOwnershipIdentifiersPreparer prepares the ListDomainOwnershipIdentifiers request. +func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18074,21 +19138,21 @@ func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDeploymentLogSlotSender sends the ListDeploymentLogSlot request. The method will close the +// ListDomainOwnershipIdentifiersSender sends the ListDomainOwnershipIdentifiers request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDeploymentLogSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDomainOwnershipIdentifiersSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot request. The method always +// ListDomainOwnershipIdentifiersResponder handles the response to the ListDomainOwnershipIdentifiers request. The method always // closes the http.Response Body. -func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) ListDomainOwnershipIdentifiersResponder(resp *http.Response) (result IdentifierCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18099,17 +19163,56 @@ func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (re return } -// ListDeployments description for List deployments for an app, or a deployment slot. +// listDomainOwnershipIdentifiersNextResults retrieves the next set of results, if any. +func (client AppsClient) listDomainOwnershipIdentifiersNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) { + req, err := lastResults.identifierCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListDomainOwnershipIdentifiersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure sending next results request") + } + result, err = client.ListDomainOwnershipIdentifiersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListDomainOwnershipIdentifiersComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListDomainOwnershipIdentifiers(ctx, resourceGroupName, name) + return +} + +// ListDomainOwnershipIdentifiersSlot description for Lists ownership identifiers for domain associated with web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionPage, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot") defer func() { sc := -1 - if result.dc.Response.Response != nil { - sc = result.dc.Response.Response.StatusCode + if result.ic.Response.Response != nil { + sc = result.ic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18119,36 +19222,37 @@ func (client AppsClient) ListDeployments(ctx context.Context, 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("web.AppsClient", "ListDeployments", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiersSlot", err.Error()) } - result.fn = client.listDeploymentsNextResults - req, err := client.ListDeploymentsPreparer(ctx, resourceGroupName, name) + result.fn = client.listDomainOwnershipIdentifiersSlotNextResults + req, err := client.ListDomainOwnershipIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentsSender(req) + resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req) if err != nil { - result.dc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure sending request") + result.ic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure sending request") return } - result.dc, err = client.ListDeploymentsResponder(resp) + result.ic, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure responding to request") } return } -// ListDeploymentsPreparer prepares the ListDeployments request. -func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListDomainOwnershipIdentifiersSlotPreparer prepares the ListDomainOwnershipIdentifiersSlot request. +func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18160,21 +19264,21 @@ func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDeploymentsSender sends the ListDeployments request. The method will close the +// ListDomainOwnershipIdentifiersSlotSender sends the ListDomainOwnershipIdentifiersSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDeploymentsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDomainOwnershipIdentifiersSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDeploymentsResponder handles the response to the ListDeployments request. The method always +// ListDomainOwnershipIdentifiersSlotResponder handles the response to the ListDomainOwnershipIdentifiersSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result DeploymentCollection, err error) { +func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http.Response) (result IdentifierCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18185,31 +19289,31 @@ func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result D return } -// listDeploymentsNextResults retrieves the next set of results, if any. -func (client AppsClient) listDeploymentsNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) { - req, err := lastResults.deploymentCollectionPreparer(ctx) +// listDomainOwnershipIdentifiersSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listDomainOwnershipIdentifiersSlotNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) { + req, err := lastResults.identifierCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListDeploymentsSender(req) + resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListDeploymentsResponder(resp) + result, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure responding to next results request") } return } -// ListDeploymentsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionIterator, err error) { +// ListDomainOwnershipIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -18218,23 +19322,22 @@ func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListDeployments(ctx, resourceGroupName, name) + result.page, err = client.ListDomainOwnershipIdentifiersSlot(ctx, resourceGroupName, name, slot) return } -// ListDeploymentsSlot description for List deployments for an app, or a deployment slot. +// ListFunctionKeys description for Get function keys for a function in a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionPage, err error) { +// name - site name. +// functionName - function name. +func (client AppsClient) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string) (result StringDictionary, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeys") defer func() { sc := -1 - if result.dc.Response.Response != nil { - sc = result.dc.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18244,37 +19347,36 @@ func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupN 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("web.AppsClient", "ListDeploymentsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListFunctionKeys", err.Error()) } - result.fn = client.listDeploymentsSlotNextResults - req, err := client.ListDeploymentsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListFunctionKeysPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentsSlotSender(req) + resp, err := client.ListFunctionKeysSender(req) if err != nil { - result.dc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure sending request") return } - result.dc, err = client.ListDeploymentsSlotResponder(resp) + result, err = client.ListFunctionKeysResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure responding to request") } return } -// ListDeploymentsSlotPreparer prepares the ListDeploymentsSlot request. -func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListFunctionKeysPreparer prepares the ListFunctionKeys request. +func (client AppsClient) ListFunctionKeysPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18284,23 +19386,23 @@ func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resour } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDeploymentsSlotSender sends the ListDeploymentsSlot request. The method will close the +// ListFunctionKeysSender sends the ListFunctionKeys request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDeploymentsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListFunctionKeysSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDeploymentsSlotResponder handles the response to the ListDeploymentsSlot request. The method always +// ListFunctionKeysResponder handles the response to the ListFunctionKeys request. The method always // closes the http.Response Body. -func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (result DeploymentCollection, err error) { +func (client AppsClient) ListFunctionKeysResponder(resp *http.Response) (result StringDictionary, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18311,54 +19413,106 @@ func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (resu return } -// listDeploymentsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listDeploymentsSlotNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) { - req, err := lastResults.deploymentCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", nil, "Failure preparing next results request") +// ListFunctionKeysSlot description for Get function keys for a function in a web site, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// functionName - function name. +// slot - name of the deployment slot. +func (client AppsClient) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeysSlot") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if req == nil { + 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("web.AppsClient", "ListFunctionKeysSlot", err.Error()) + } + + req, err := client.ListFunctionKeysSlotPreparer(ctx, resourceGroupName, name, functionName, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentsSlotSender(req) + + resp, err := client.ListFunctionKeysSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure sending next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure sending request") + return } - result, err = client.ListDeploymentsSlotResponder(resp) + + result, err = client.ListFunctionKeysSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure responding to request") } + return } -// ListDeploymentsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// ListFunctionKeysSlotPreparer prepares the ListFunctionKeysSlot request. +func (client AppsClient) ListFunctionKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - result.page, err = client.ListDeploymentsSlot(ctx, resourceGroupName, name, slot) + + const APIVersion = "2019-08-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.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListFunctionKeysSlotSender sends the ListFunctionKeysSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListFunctionKeysSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListFunctionKeysSlotResponder handles the response to the ListFunctionKeysSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListFunctionKeysSlotResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} return } -// ListDomainOwnershipIdentifiers description for Lists ownership identifiers for domain associated with web app. +// ListFunctions description for List the functions for a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionPage, err error) { +// name - site name. +func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") defer func() { sc := -1 - if result.ic.Response.Response != nil { - sc = result.ic.Response.Response.StatusCode + if result.fec.Response.Response != nil { + sc = result.fec.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18368,33 +19522,33 @@ func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, res 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("web.AppsClient", "ListDomainOwnershipIdentifiers", err.Error()) + return result, validation.NewError("web.AppsClient", "ListFunctions", err.Error()) } - result.fn = client.listDomainOwnershipIdentifiersNextResults - req, err := client.ListDomainOwnershipIdentifiersPreparer(ctx, resourceGroupName, name) + result.fn = client.listFunctionsNextResults + req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request") return } - resp, err := client.ListDomainOwnershipIdentifiersSender(req) + resp, err := client.ListFunctionsSender(req) if err != nil { - result.ic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure sending request") + result.fec.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request") return } - result.ic, err = client.ListDomainOwnershipIdentifiersResponder(resp) + result.fec, err = client.ListFunctionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request") } return } -// ListDomainOwnershipIdentifiersPreparer prepares the ListDomainOwnershipIdentifiers request. -func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListFunctionsPreparer prepares the ListFunctions request. +func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -18409,56 +19563,56 @@ func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDomainOwnershipIdentifiersSender sends the ListDomainOwnershipIdentifiers request. The method will close the +// ListFunctionsSender sends the ListFunctions request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDomainOwnershipIdentifiersSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDomainOwnershipIdentifiersResponder handles the response to the ListDomainOwnershipIdentifiers request. The method always +// ListFunctionsResponder handles the response to the ListFunctions request. The method always // closes the http.Response Body. -func (client AppsClient) ListDomainOwnershipIdentifiersResponder(resp *http.Response) (result IdentifierCollection, err error) { +func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// listDomainOwnershipIdentifiersNextResults retrieves the next set of results, if any. -func (client AppsClient) listDomainOwnershipIdentifiersNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) { - req, err := lastResults.identifierCollectionPreparer(ctx) +// listFunctionsNextResults retrieves the next set of results, if any. +func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) { + req, err := lastResults.functionEnvelopeCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListDomainOwnershipIdentifiersSender(req) + resp, err := client.ListFunctionsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request") } - result, err = client.ListDomainOwnershipIdentifiersResponder(resp) + result, err = client.ListFunctionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request") } return } -// ListDomainOwnershipIdentifiersComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionIterator, err error) { +// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -18467,23 +19621,22 @@ func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListDomainOwnershipIdentifiers(ctx, resourceGroupName, name) + result.page, err = client.ListFunctions(ctx, resourceGroupName, name) return } -// ListDomainOwnershipIdentifiersSlot description for Lists ownership identifiers for domain associated with web app. +// ListFunctionSecrets description for Get function secrets for a function in a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the -// production slot. -func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionPage, err error) { +// name - site name. +// functionName - function name. +func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionSecrets, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecrets") defer func() { sc := -1 - if result.ic.Response.Response != nil { - sc = result.ic.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18493,37 +19646,36 @@ func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, 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("web.AppsClient", "ListDomainOwnershipIdentifiersSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListFunctionSecrets", err.Error()) } - result.fn = client.listDomainOwnershipIdentifiersSlotNextResults - req, err := client.ListDomainOwnershipIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListFunctionSecretsPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", nil, "Failure preparing request") return } - resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req) + resp, err := client.ListFunctionSecretsSender(req) if err != nil { - result.ic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure sending request") return } - result.ic, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp) + result, err = client.ListFunctionSecretsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure responding to request") } return } -// ListDomainOwnershipIdentifiersSlotPreparer prepares the ListDomainOwnershipIdentifiersSlot request. -func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListFunctionSecretsPreparer prepares the ListFunctionSecrets request. +func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18533,23 +19685,23 @@ func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context. } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDomainOwnershipIdentifiersSlotSender sends the ListDomainOwnershipIdentifiersSlot request. The method will close the +// ListFunctionSecretsSender sends the ListFunctionSecrets request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDomainOwnershipIdentifiersSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListFunctionSecretsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDomainOwnershipIdentifiersSlotResponder handles the response to the ListDomainOwnershipIdentifiersSlot request. The method always +// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets request. The method always // closes the http.Response Body. -func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http.Response) (result IdentifierCollection, err error) { +func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (result FunctionSecrets, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18560,54 +19712,19 @@ func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http. return } -// listDomainOwnershipIdentifiersSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listDomainOwnershipIdentifiersSlotNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) { - req, err := lastResults.identifierCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure sending next results request") - } - result, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListDomainOwnershipIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListDomainOwnershipIdentifiersSlot(ctx, resourceGroupName, name, slot) - return -} - -// ListFunctions description for List the functions for a web site, or a deployment slot. +// ListFunctionSecretsSlot description for Get function secrets for a function in a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) { +// functionName - function name. +// slot - name of the deployment slot. +func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecretsSlot") defer func() { sc := -1 - if result.fec.Response.Response != nil { - sc = result.fec.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18617,36 +19734,37 @@ func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName st 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("web.AppsClient", "ListFunctions", err.Error()) + return result, validation.NewError("web.AppsClient", "ListFunctionSecretsSlot", err.Error()) } - result.fn = client.listFunctionsNextResults - req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name) + req, err := client.ListFunctionSecretsSlotPreparer(ctx, resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", nil, "Failure preparing request") return } - resp, err := client.ListFunctionsSender(req) + resp, err := client.ListFunctionSecretsSlotSender(req) if err != nil { - result.fec.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure sending request") return } - result.fec, err = client.ListFunctionsResponder(resp) + result, err = client.ListFunctionSecretsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure responding to request") } return } -// ListFunctionsPreparer prepares the ListFunctions request. -func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListFunctionSecretsSlotPreparer prepares the ListFunctionSecretsSlot request. +func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18656,78 +19774,40 @@ func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGrou } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListFunctionsSender sends the ListFunctions request. The method will close the +// ListFunctionSecretsSlotSender sends the ListFunctionSecretsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListFunctionSecretsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListFunctionsResponder handles the response to the ListFunctions request. The method always -// closes the http.Response Body. -func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listFunctionsNextResults retrieves the next set of results, if any. -func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) { - req, err := lastResults.functionEnvelopeCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListFunctionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListFunctionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListFunctions(ctx, resourceGroupName, name) +// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} return } -// ListFunctionSecrets description for Get function secrets for a function in a web site, or a deployment slot. +// ListHostKeys description for Get host secrets for a function app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// functionName - function name. -func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionSecrets, err error) { +func (client AppsClient) ListHostKeys(ctx context.Context, resourceGroupName string, name string) (result HostKeys, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecrets") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeys") defer func() { sc := -1 if result.Response.Response != nil { @@ -18741,34 +19821,33 @@ func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupN 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("web.AppsClient", "ListFunctionSecrets", err.Error()) + return result, validation.NewError("web.AppsClient", "ListHostKeys", err.Error()) } - req, err := client.ListFunctionSecretsPreparer(ctx, resourceGroupName, name, functionName) + req, err := client.ListHostKeysPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", nil, "Failure preparing request") return } - resp, err := client.ListFunctionSecretsSender(req) + resp, err := client.ListHostKeysSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure sending request") return } - result, err = client.ListFunctionSecretsResponder(resp) + result, err = client.ListHostKeysResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure responding to request") } return } -// ListFunctionSecretsPreparer prepares the ListFunctionSecrets request. -func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { +// ListHostKeysPreparer prepares the ListHostKeys request. +func (client AppsClient) ListHostKeysPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -18782,21 +19861,21 @@ func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListFunctionSecretsSender sends the ListFunctionSecrets request. The method will close the +// ListHostKeysSender sends the ListHostKeys request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListFunctionSecretsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListHostKeysSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets request. The method always +// ListHostKeysResponder handles the response to the ListHostKeys request. The method always // closes the http.Response Body. -func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (result FunctionSecrets, err error) { +func (client AppsClient) ListHostKeysResponder(resp *http.Response) (result HostKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18807,15 +19886,14 @@ func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (resu return } -// ListFunctionSecretsSlot description for Get function secrets for a function in a web site, or a deployment slot. +// ListHostKeysSlot description for Get host secrets for a function app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// functionName - function name. // slot - name of the deployment slot. -func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) { +func (client AppsClient) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HostKeys, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecretsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeysSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -18829,34 +19907,33 @@ func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGr 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("web.AppsClient", "ListFunctionSecretsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListHostKeysSlot", err.Error()) } - req, err := client.ListFunctionSecretsSlotPreparer(ctx, resourceGroupName, name, functionName, slot) + req, err := client.ListHostKeysSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", nil, "Failure preparing request") return } - resp, err := client.ListFunctionSecretsSlotSender(req) + resp, err := client.ListHostKeysSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure sending request") return } - result, err = client.ListFunctionSecretsSlotResponder(resp) + result, err = client.ListHostKeysSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure responding to request") } return } -// ListFunctionSecretsSlotPreparer prepares the ListFunctionSecretsSlot request. -func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { +// ListHostKeysSlotPreparer prepares the ListHostKeysSlot request. +func (client AppsClient) ListHostKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -18871,21 +19948,21 @@ func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListFunctionSecretsSlotSender sends the ListFunctionSecretsSlot request. The method will close the +// ListHostKeysSlotSender sends the ListHostKeysSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListFunctionSecretsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListHostKeysSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot request. The method always +// ListHostKeysSlotResponder handles the response to the ListHostKeysSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { +func (client AppsClient) ListHostKeysSlotResponder(resp *http.Response) (result HostKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -24333,23 +25410,232 @@ func (client AppsClient) ListSnapshotsSlot(ctx context.Context, resourceGroupNam return } - resp, err := client.ListSnapshotsSlotSender(req) + resp, err := client.ListSnapshotsSlotSender(req) + if err != nil { + result.sc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure sending request") + return + } + + result.sc, err = client.ListSnapshotsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure responding to request") + } + + return +} + +// ListSnapshotsSlotPreparer prepares the ListSnapshotsSlot request. +func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSnapshotsSlotSender sends the ListSnapshotsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSnapshotsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSnapshotsSlotResponder handles the response to the ListSnapshotsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result SnapshotCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listSnapshotsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listSnapshotsSlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) { + req, err := lastResults.snapshotCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSnapshotsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListSnapshotsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListSnapshotsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListSnapshotsSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListSyncFunctionTriggers description for This is to allow calling via powershell and ARM template. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result FunctionSecrets, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggers") + defer func() { + 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("web.AppsClient", "ListSyncFunctionTriggers", err.Error()) + } + + req, err := client.ListSyncFunctionTriggersPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", nil, "Failure preparing request") + return + } + + resp, err := client.ListSyncFunctionTriggersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure sending request") + return + } + + result, err = client.ListSyncFunctionTriggersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure responding to request") + } + + return +} + +// ListSyncFunctionTriggersPreparer prepares the ListSyncFunctionTriggers request. +func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/listsyncfunctiontriggerstatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSyncFunctionTriggersSender sends the ListSyncFunctionTriggers request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSyncFunctionTriggersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSyncFunctionTriggersResponder handles the response to the ListSyncFunctionTriggers request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSyncFunctionTriggersResponder(resp *http.Response) (result FunctionSecrets, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSyncFunctionTriggersSlot description for This is to allow calling via powershell and ARM template. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. +func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggersSlot") + defer func() { + 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("web.AppsClient", "ListSyncFunctionTriggersSlot", err.Error()) + } + + req, err := client.ListSyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListSyncFunctionTriggersSlotSender(req) if err != nil { - result.sc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure sending request") return } - result.sc, err = client.ListSnapshotsSlotResponder(resp) + result, err = client.ListSyncFunctionTriggersSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure responding to request") } return } -// ListSnapshotsSlotPreparer prepares the ListSnapshotsSlot request. -func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListSyncFunctionTriggersSlotPreparer prepares the ListSyncFunctionTriggersSlot request. +func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -24363,23 +25649,23 @@ func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resource } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSnapshotsSlotSender sends the ListSnapshotsSlot request. The method will close the +// ListSyncFunctionTriggersSlotSender sends the ListSyncFunctionTriggersSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListSnapshotsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListSyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListSnapshotsSlotResponder handles the response to the ListSnapshotsSlot request. The method always +// ListSyncFunctionTriggersSlotResponder handles the response to the ListSyncFunctionTriggersSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result SnapshotCollection, err error) { +func (client AppsClient) ListSyncFunctionTriggersSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -24390,54 +25676,17 @@ func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result return } -// listSnapshotsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listSnapshotsSlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) { - req, err := lastResults.snapshotCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSnapshotsSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure sending next results request") - } - result, err = client.ListSnapshotsSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListSnapshotsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListSnapshotsSlot(ctx, resourceGroupName, name, slot) - return -} - -// ListSyncFunctionTriggers description for This is to allow calling via powershell and ARM template. +// ListSyncStatus description for This is to allow calling via powershell and ARM template. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result FunctionSecrets, err error) { +func (client AppsClient) ListSyncStatus(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggers") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatus") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -24447,32 +25696,32 @@ func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceG 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("web.AppsClient", "ListSyncFunctionTriggers", err.Error()) + return result, validation.NewError("web.AppsClient", "ListSyncStatus", err.Error()) } - req, err := client.ListSyncFunctionTriggersPreparer(ctx, resourceGroupName, name) + req, err := client.ListSyncStatusPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", nil, "Failure preparing request") return } - resp, err := client.ListSyncFunctionTriggersSender(req) + resp, err := client.ListSyncStatusSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure sending request") return } - result, err = client.ListSyncFunctionTriggersResponder(resp) + result, err = client.ListSyncStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure responding to request") } return } -// ListSyncFunctionTriggersPreparer prepares the ListSyncFunctionTriggers request. -func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListSyncStatusPreparer prepares the ListSyncStatus request. +func (client AppsClient) ListSyncStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -24487,43 +25736,42 @@ func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSyncFunctionTriggersSender sends the ListSyncFunctionTriggers request. The method will close the +// ListSyncStatusSender sends the ListSyncStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListSyncFunctionTriggersSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListSyncStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListSyncFunctionTriggersResponder handles the response to the ListSyncFunctionTriggers request. The method always +// ListSyncStatusResponder handles the response to the ListSyncStatus request. The method always // closes the http.Response Body. -func (client AppsClient) ListSyncFunctionTriggersResponder(resp *http.Response) (result FunctionSecrets, err error) { +func (client AppsClient) ListSyncStatusResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// ListSyncFunctionTriggersSlot description for This is to allow calling via powershell and ARM template. +// ListSyncStatusSlot description for This is to allow calling via powershell and ARM template. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. // slot - name of the deployment slot. -func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) { +func (client AppsClient) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggersSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatusSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -24533,32 +25781,32 @@ func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resou 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("web.AppsClient", "ListSyncFunctionTriggersSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListSyncStatusSlot", err.Error()) } - req, err := client.ListSyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListSyncStatusSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", nil, "Failure preparing request") return } - resp, err := client.ListSyncFunctionTriggersSlotSender(req) + resp, err := client.ListSyncStatusSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure sending request") return } - result, err = client.ListSyncFunctionTriggersSlotResponder(resp) + result, err = client.ListSyncStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure responding to request") } return } -// ListSyncFunctionTriggersSlotPreparer prepares the ListSyncFunctionTriggersSlot request. -func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListSyncStatusSlotPreparer prepares the ListSyncStatusSlot request. +func (client AppsClient) ListSyncStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -24574,28 +25822,27 @@ func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSyncFunctionTriggersSlotSender sends the ListSyncFunctionTriggersSlot request. The method will close the +// ListSyncStatusSlotSender sends the ListSyncStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListSyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListSyncStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListSyncFunctionTriggersSlotResponder handles the response to the ListSyncFunctionTriggersSlot request. The method always +// ListSyncStatusSlotResponder handles the response to the ListSyncStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListSyncFunctionTriggersSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { +func (client AppsClient) ListSyncStatusSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } @@ -29399,7 +30646,177 @@ func (client AppsClient) SwapSlotWithProductionResponder(resp *http.Response) (r return } -// SyncFunctionTriggers description for Syncs function trigger metadata to the scale controller +// SyncFunctions description for Syncs function trigger metadata to the management database +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctions") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "SyncFunctions", err.Error()) + } + + req, err := client.SyncFunctionsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", nil, "Failure preparing request") + return + } + + resp, err := client.SyncFunctionsSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure sending request") + return + } + + result, err = client.SyncFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure responding to request") + } + + return +} + +// SyncFunctionsPreparer prepares the SyncFunctions request. +func (client AppsClient) SyncFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/host/default/sync", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SyncFunctionsSender sends the SyncFunctions request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) SyncFunctionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// SyncFunctionsResponder handles the response to the SyncFunctions request. The method always +// closes the http.Response Body. +func (client AppsClient) SyncFunctionsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// SyncFunctionsSlot description for Syncs function trigger metadata to the management database +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. +func (client AppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionsSlot") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "SyncFunctionsSlot", err.Error()) + } + + req, err := client.SyncFunctionsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.SyncFunctionsSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure sending request") + return + } + + result, err = client.SyncFunctionsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure responding to request") + } + + return +} + +// SyncFunctionsSlotPreparer prepares the SyncFunctionsSlot request. +func (client AppsClient) SyncFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-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.Web/sites/{name}/slots/{slot}/host/default/sync", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SyncFunctionsSlotSender sends the SyncFunctionsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) SyncFunctionsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// SyncFunctionsSlotResponder handles the response to the SyncFunctionsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) SyncFunctionsSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// SyncFunctionTriggers description for Syncs function trigger metadata to the management database // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. @@ -29483,7 +30900,7 @@ func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (res return } -// SyncFunctionTriggersSlot description for Syncs function trigger metadata to the scale controller +// SyncFunctionTriggersSlot description for Syncs function trigger metadata to the management database // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. diff --git a/services/web/mgmt/2019-08-01/web/appservicecertificateorders.go b/services/web/mgmt/2019-08-01/web/appservicecertificateorders.go index 0d457aba40ff..6729bebcec48 100644 --- a/services/web/mgmt/2019-08-01/web/appservicecertificateorders.go +++ b/services/web/mgmt/2019-08-01/web/appservicecertificateorders.go @@ -36,7 +36,9 @@ func NewAppServiceCertificateOrdersClient(subscriptionID string) AppServiceCerti return NewAppServiceCertificateOrdersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServiceCertificateOrdersClientWithBaseURI creates an instance of the AppServiceCertificateOrdersClient client. +// NewAppServiceCertificateOrdersClientWithBaseURI creates an instance of the AppServiceCertificateOrdersClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAppServiceCertificateOrdersClientWithBaseURI(baseURI string, subscriptionID string) AppServiceCertificateOrdersClient { return AppServiceCertificateOrdersClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/appserviceenvironments.go b/services/web/mgmt/2019-08-01/web/appserviceenvironments.go index 39ee38393b90..e65027846395 100644 --- a/services/web/mgmt/2019-08-01/web/appserviceenvironments.go +++ b/services/web/mgmt/2019-08-01/web/appserviceenvironments.go @@ -36,7 +36,9 @@ func NewAppServiceEnvironmentsClient(subscriptionID string) AppServiceEnvironmen return NewAppServiceEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServiceEnvironmentsClientWithBaseURI creates an instance of the AppServiceEnvironmentsClient client. +// NewAppServiceEnvironmentsClientWithBaseURI creates an instance of the AppServiceEnvironmentsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewAppServiceEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) AppServiceEnvironmentsClient { return AppServiceEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/appserviceplans.go b/services/web/mgmt/2019-08-01/web/appserviceplans.go index 24b03add793b..cfdde373410c 100644 --- a/services/web/mgmt/2019-08-01/web/appserviceplans.go +++ b/services/web/mgmt/2019-08-01/web/appserviceplans.go @@ -36,7 +36,8 @@ func NewAppServicePlansClient(subscriptionID string) AppServicePlansClient { return NewAppServicePlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServicePlansClientWithBaseURI creates an instance of the AppServicePlansClient client. +// NewAppServicePlansClientWithBaseURI creates an instance of the AppServicePlansClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAppServicePlansClientWithBaseURI(baseURI string, subscriptionID string) AppServicePlansClient { return AppServicePlansClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/certificateregistrationprovider.go b/services/web/mgmt/2019-08-01/web/certificateregistrationprovider.go index 907ccd3ed5da..75dd329ad9a0 100644 --- a/services/web/mgmt/2019-08-01/web/certificateregistrationprovider.go +++ b/services/web/mgmt/2019-08-01/web/certificateregistrationprovider.go @@ -36,7 +36,8 @@ func NewCertificateRegistrationProviderClient(subscriptionID string) Certificate } // NewCertificateRegistrationProviderClientWithBaseURI creates an instance of the CertificateRegistrationProviderClient -// 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 NewCertificateRegistrationProviderClientWithBaseURI(baseURI string, subscriptionID string) CertificateRegistrationProviderClient { return CertificateRegistrationProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/certificates.go b/services/web/mgmt/2019-08-01/web/certificates.go index 9ebfaaa94d97..ca543ab1e785 100644 --- a/services/web/mgmt/2019-08-01/web/certificates.go +++ b/services/web/mgmt/2019-08-01/web/certificates.go @@ -36,7 +36,8 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/client.go b/services/web/mgmt/2019-08-01/web/client.go index 7109055e5dff..619aa977ac6c 100644 --- a/services/web/mgmt/2019-08-01/web/client.go +++ b/services/web/mgmt/2019-08-01/web/client.go @@ -46,7 +46,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/web/mgmt/2019-08-01/web/deletedwebapps.go b/services/web/mgmt/2019-08-01/web/deletedwebapps.go index 2d9a5c49caed..82afd1a72963 100644 --- a/services/web/mgmt/2019-08-01/web/deletedwebapps.go +++ b/services/web/mgmt/2019-08-01/web/deletedwebapps.go @@ -35,7 +35,8 @@ func NewDeletedWebAppsClient(subscriptionID string) DeletedWebAppsClient { return NewDeletedWebAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeletedWebAppsClientWithBaseURI creates an instance of the DeletedWebAppsClient client. +// NewDeletedWebAppsClientWithBaseURI creates an instance of the DeletedWebAppsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeletedWebAppsClientWithBaseURI(baseURI string, subscriptionID string) DeletedWebAppsClient { return DeletedWebAppsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/diagnostics.go b/services/web/mgmt/2019-08-01/web/diagnostics.go index 6ae727b35a28..44c746a6e587 100644 --- a/services/web/mgmt/2019-08-01/web/diagnostics.go +++ b/services/web/mgmt/2019-08-01/web/diagnostics.go @@ -37,7 +37,8 @@ func NewDiagnosticsClient(subscriptionID string) DiagnosticsClient { return NewDiagnosticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticsClientWithBaseURI creates an instance of the DiagnosticsClient client. +// NewDiagnosticsClientWithBaseURI creates an instance of the DiagnosticsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDiagnosticsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticsClient { return DiagnosticsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/domainregistrationprovider.go b/services/web/mgmt/2019-08-01/web/domainregistrationprovider.go index b886fa4fde2d..a7fc974c0614 100644 --- a/services/web/mgmt/2019-08-01/web/domainregistrationprovider.go +++ b/services/web/mgmt/2019-08-01/web/domainregistrationprovider.go @@ -35,7 +35,9 @@ func NewDomainRegistrationProviderClient(subscriptionID string) DomainRegistrati return NewDomainRegistrationProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainRegistrationProviderClientWithBaseURI creates an instance of the DomainRegistrationProviderClient client. +// NewDomainRegistrationProviderClientWithBaseURI creates an instance of the DomainRegistrationProviderClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDomainRegistrationProviderClientWithBaseURI(baseURI string, subscriptionID string) DomainRegistrationProviderClient { return DomainRegistrationProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/domains.go b/services/web/mgmt/2019-08-01/web/domains.go index 29a4fbec2377..e28f5686daa2 100644 --- a/services/web/mgmt/2019-08-01/web/domains.go +++ b/services/web/mgmt/2019-08-01/web/domains.go @@ -36,7 +36,8 @@ func NewDomainsClient(subscriptionID string) DomainsClient { return NewDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDomainsClientWithBaseURI(baseURI string, subscriptionID string) DomainsClient { return DomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/models.go b/services/web/mgmt/2019-08-01/web/models.go index d06b77a42eeb..d11509b0d645 100644 --- a/services/web/mgmt/2019-08-01/web/models.go +++ b/services/web/mgmt/2019-08-01/web/models.go @@ -10903,6 +10903,32 @@ type HostingEnvironmentProfile struct { Type *string `json:"type,omitempty"` } +// HostKeys functions host level keys. +type HostKeys struct { + autorest.Response `json:"-"` + // MasterKey - Secret key. + MasterKey *string `json:"masterKey,omitempty"` + // FunctionKeys - Host level function keys. + FunctionKeys map[string]*string `json:"functionKeys"` + // SystemKeys - System keys. + SystemKeys map[string]*string `json:"systemKeys"` +} + +// MarshalJSON is the custom marshaler for HostKeys. +func (hk HostKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hk.MasterKey != nil { + objectMap["masterKey"] = hk.MasterKey + } + if hk.FunctionKeys != nil { + objectMap["functionKeys"] = hk.FunctionKeys + } + if hk.SystemKeys != nil { + objectMap["systemKeys"] = hk.SystemKeys + } + return json.Marshal(objectMap) +} + // HostName details of a hostname derived from a domain. type HostName struct { // Name - Name of the hostname. @@ -12346,6 +12372,15 @@ func (j JobProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// KeyInfo function key info. +type KeyInfo struct { + autorest.Response `json:"-"` + // Name - Key name + Name *string `json:"name,omitempty"` + // Value - Key value + Value *string `json:"value,omitempty"` +} + // KeyVaultReferenceCollection web app key vault reference and status ARM resource. type KeyVaultReferenceCollection struct { autorest.Response `json:"-"` diff --git a/services/web/mgmt/2019-08-01/web/provider.go b/services/web/mgmt/2019-08-01/web/provider.go index bcbf208112cd..ac5fa2d7b81a 100644 --- a/services/web/mgmt/2019-08-01/web/provider.go +++ b/services/web/mgmt/2019-08-01/web/provider.go @@ -35,7 +35,8 @@ func NewProviderClient(subscriptionID string) ProviderClient { return NewProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderClientWithBaseURI creates an instance of the ProviderClient client. +// NewProviderClientWithBaseURI creates an instance of the ProviderClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProviderClientWithBaseURI(baseURI string, subscriptionID string) ProviderClient { return ProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/recommendations.go b/services/web/mgmt/2019-08-01/web/recommendations.go index e97d6099b247..73f51523674f 100644 --- a/services/web/mgmt/2019-08-01/web/recommendations.go +++ b/services/web/mgmt/2019-08-01/web/recommendations.go @@ -36,7 +36,8 @@ func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/resourcehealthmetadata.go b/services/web/mgmt/2019-08-01/web/resourcehealthmetadata.go index ff89c6a5f2e9..bbbe7ecfd5f3 100644 --- a/services/web/mgmt/2019-08-01/web/resourcehealthmetadata.go +++ b/services/web/mgmt/2019-08-01/web/resourcehealthmetadata.go @@ -36,7 +36,9 @@ func NewResourceHealthMetadataClient(subscriptionID string) ResourceHealthMetada return NewResourceHealthMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceHealthMetadataClientWithBaseURI creates an instance of the ResourceHealthMetadataClient client. +// NewResourceHealthMetadataClientWithBaseURI creates an instance of the ResourceHealthMetadataClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceHealthMetadataClientWithBaseURI(baseURI string, subscriptionID string) ResourceHealthMetadataClient { return ResourceHealthMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/topleveldomains.go b/services/web/mgmt/2019-08-01/web/topleveldomains.go index c06f49a25cb4..b45283693182 100644 --- a/services/web/mgmt/2019-08-01/web/topleveldomains.go +++ b/services/web/mgmt/2019-08-01/web/topleveldomains.go @@ -35,7 +35,8 @@ func NewTopLevelDomainsClient(subscriptionID string) TopLevelDomainsClient { return NewTopLevelDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client. +// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTopLevelDomainsClientWithBaseURI(baseURI string, subscriptionID string) TopLevelDomainsClient { return TopLevelDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/web/mgmt/2019-08-01/web/webapi/interfaces.go b/services/web/mgmt/2019-08-01/web/webapi/interfaces.go index c08650cfe8a3..b9b7f5b12fe7 100644 --- a/services/web/mgmt/2019-08-01/web/webapi/interfaces.go +++ b/services/web/mgmt/2019-08-01/web/webapi/interfaces.go @@ -31,11 +31,16 @@ type BaseClientAPI interface { GetSourceControl(ctx context.Context, sourceControlType string) (result web.SourceControl, err error) GetSubscriptionDeploymentLocations(ctx context.Context) (result web.DeploymentLocations, err error) ListBillingMeters(ctx context.Context, billingLocation string, osType string) (result web.BillingMeterCollectionPage, err error) + ListBillingMetersComplete(ctx context.Context, billingLocation string, osType string) (result web.BillingMeterCollectionIterator, err error) ListGeoRegions(ctx context.Context, sku web.SkuName, linuxWorkersEnabled *bool, xenonWorkersEnabled *bool, linuxDynamicWorkersEnabled *bool) (result web.GeoRegionCollectionPage, err error) + ListGeoRegionsComplete(ctx context.Context, sku web.SkuName, linuxWorkersEnabled *bool, xenonWorkersEnabled *bool, linuxDynamicWorkersEnabled *bool) (result web.GeoRegionCollectionIterator, err error) ListPremierAddOnOffers(ctx context.Context) (result web.PremierAddOnOfferCollectionPage, err error) + ListPremierAddOnOffersComplete(ctx context.Context) (result web.PremierAddOnOfferCollectionIterator, err error) ListSiteIdentifiersAssignedToHostName(ctx context.Context, nameIdentifier web.NameIdentifier) (result web.IdentifierCollectionPage, err error) + ListSiteIdentifiersAssignedToHostNameComplete(ctx context.Context, nameIdentifier web.NameIdentifier) (result web.IdentifierCollectionIterator, err error) ListSkus(ctx context.Context) (result web.SkuInfos, err error) ListSourceControls(ctx context.Context) (result web.SourceControlCollectionPage, err error) + ListSourceControlsComplete(ctx context.Context) (result web.SourceControlCollectionIterator, err error) Move(ctx context.Context, resourceGroupName string, moveResourceEnvelope web.CsmMoveResourceEnvelope) (result autorest.Response, err error) UpdatePublishingUser(ctx context.Context, userDetails web.User) (result web.User, err error) UpdateSourceControl(ctx context.Context, sourceControlType string, requestMessage web.SourceControl) (result web.SourceControl, err error) @@ -55,8 +60,11 @@ type AppServiceCertificateOrdersClientAPI interface { Get(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateOrder, err error) GetCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string) (result web.AppServiceCertificateResource, err error) List(ctx context.Context) (result web.AppServiceCertificateOrderCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppServiceCertificateOrderCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServiceCertificateOrderCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServiceCertificateOrderCollectionIterator, err error) ListCertificates(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateCollectionPage, err error) + ListCertificatesComplete(ctx context.Context, resourceGroupName string, certificateOrderName string) (result web.AppServiceCertificateCollectionIterator, err error) Reissue(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest web.ReissueCertificateOrderRequest) (result autorest.Response, err error) Renew(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest web.RenewCertificateOrderRequest) (result autorest.Response, err error) ResendEmail(ctx context.Context, resourceGroupName string, certificateOrderName string) (result autorest.Response, err error) @@ -75,6 +83,7 @@ var _ AppServiceCertificateOrdersClientAPI = (*web.AppServiceCertificateOrdersCl // CertificateRegistrationProviderClientAPI contains the set of methods on the CertificateRegistrationProviderClient type. type CertificateRegistrationProviderClientAPI interface { ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ CertificateRegistrationProviderClientAPI = (*web.CertificateRegistrationProviderClient)(nil) @@ -90,9 +99,13 @@ type DomainsClientAPI interface { GetControlCenterSsoRequest(ctx context.Context) (result web.DomainControlCenterSsoRequest, err error) GetOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string) (result web.DomainOwnershipIdentifier, err error) List(ctx context.Context) (result web.DomainCollectionPage, err error) + ListComplete(ctx context.Context) (result web.DomainCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.DomainCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.DomainCollectionIterator, err error) ListOwnershipIdentifiers(ctx context.Context, resourceGroupName string, domainName string) (result web.DomainOwnershipIdentifierCollectionPage, err error) + ListOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, domainName string) (result web.DomainOwnershipIdentifierCollectionIterator, err error) ListRecommendations(ctx context.Context, parameters web.DomainRecommendationSearchParameters) (result web.NameIdentifierCollectionPage, err error) + ListRecommendationsComplete(ctx context.Context, parameters web.DomainRecommendationSearchParameters) (result web.NameIdentifierCollectionIterator, err error) Renew(ctx context.Context, resourceGroupName string, domainName string) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, domainName string, domain web.DomainPatchResource) (result web.Domain, err error) UpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier web.DomainOwnershipIdentifier) (result web.DomainOwnershipIdentifier, err error) @@ -104,7 +117,9 @@ var _ DomainsClientAPI = (*web.DomainsClient)(nil) type TopLevelDomainsClientAPI interface { Get(ctx context.Context, name string) (result web.TopLevelDomain, err error) List(ctx context.Context) (result web.TopLevelDomainCollectionPage, err error) + ListComplete(ctx context.Context) (result web.TopLevelDomainCollectionIterator, err error) ListAgreements(ctx context.Context, name string, agreementOption web.TopLevelDomainAgreementOption) (result web.TldLegalAgreementCollectionPage, err error) + ListAgreementsComplete(ctx context.Context, name string, agreementOption web.TopLevelDomainAgreementOption) (result web.TldLegalAgreementCollectionIterator, err error) } var _ TopLevelDomainsClientAPI = (*web.TopLevelDomainsClient)(nil) @@ -112,6 +127,7 @@ var _ TopLevelDomainsClientAPI = (*web.TopLevelDomainsClient)(nil) // DomainRegistrationProviderClientAPI contains the set of methods on the DomainRegistrationProviderClient type. type DomainRegistrationProviderClientAPI interface { ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ DomainRegistrationProviderClientAPI = (*web.DomainRegistrationProviderClient)(nil) @@ -122,7 +138,9 @@ type CertificatesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, name string) (result web.Certificate, err error) List(ctx context.Context) (result web.CertificateCollectionPage, err error) + ListComplete(ctx context.Context) (result web.CertificateCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.CertificateCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.CertificateCollectionIterator, err error) Update(ctx context.Context, resourceGroupName string, name string, certificateEnvelope web.CertificatePatchResource) (result web.Certificate, err error) } @@ -132,7 +150,9 @@ var _ CertificatesClientAPI = (*web.CertificatesClient)(nil) type DeletedWebAppsClientAPI interface { GetDeletedWebAppByLocation(ctx context.Context, location string, deletedSiteID string) (result web.DeletedSite, err error) List(ctx context.Context) (result web.DeletedWebAppCollectionPage, err error) + ListComplete(ctx context.Context) (result web.DeletedWebAppCollectionIterator, err error) ListByLocation(ctx context.Context, location string) (result web.DeletedWebAppCollectionPage, err error) + ListByLocationComplete(ctx context.Context, location string) (result web.DeletedWebAppCollectionIterator, err error) } var _ DeletedWebAppsClientAPI = (*web.DeletedWebAppsClient)(nil) @@ -153,14 +173,23 @@ type DiagnosticsClientAPI interface { GetSiteDiagnosticCategory(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticCategory, err error) GetSiteDiagnosticCategorySlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticCategory, err error) ListHostingEnvironmentDetectorResponses(ctx context.Context, resourceGroupName string, name string) (result web.DetectorResponseCollectionPage, err error) + ListHostingEnvironmentDetectorResponsesComplete(ctx context.Context, resourceGroupName string, name string) (result web.DetectorResponseCollectionIterator, err error) ListSiteAnalyses(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticAnalysisCollectionPage, err error) + ListSiteAnalysesComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticAnalysisCollectionIterator, err error) ListSiteAnalysesSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticAnalysisCollectionPage, err error) + ListSiteAnalysesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticAnalysisCollectionIterator, err error) ListSiteDetectorResponses(ctx context.Context, resourceGroupName string, siteName string) (result web.DetectorResponseCollectionPage, err error) + ListSiteDetectorResponsesComplete(ctx context.Context, resourceGroupName string, siteName string) (result web.DetectorResponseCollectionIterator, err error) ListSiteDetectorResponsesSlot(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DetectorResponseCollectionPage, err error) + ListSiteDetectorResponsesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DetectorResponseCollectionIterator, err error) ListSiteDetectors(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticDetectorCollectionPage, err error) + ListSiteDetectorsComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string) (result web.DiagnosticDetectorCollectionIterator, err error) ListSiteDetectorsSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticDetectorCollectionPage, err error) + ListSiteDetectorsSlotComplete(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string) (result web.DiagnosticDetectorCollectionIterator, err error) ListSiteDiagnosticCategories(ctx context.Context, resourceGroupName string, siteName string) (result web.DiagnosticCategoryCollectionPage, err error) + ListSiteDiagnosticCategoriesComplete(ctx context.Context, resourceGroupName string, siteName string) (result web.DiagnosticCategoryCollectionIterator, err error) ListSiteDiagnosticCategoriesSlot(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DiagnosticCategoryCollectionPage, err error) + ListSiteDiagnosticCategoriesSlotComplete(ctx context.Context, resourceGroupName string, siteName string, slot string) (result web.DiagnosticCategoryCollectionIterator, err error) } var _ DiagnosticsClientAPI = (*web.DiagnosticsClient)(nil) @@ -168,8 +197,11 @@ var _ DiagnosticsClientAPI = (*web.DiagnosticsClient)(nil) // ProviderClientAPI contains the set of methods on the ProviderClient type. type ProviderClientAPI interface { GetAvailableStacks(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionPage, err error) + GetAvailableStacksComplete(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionIterator, err error) GetAvailableStacksOnPrem(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionPage, err error) + GetAvailableStacksOnPremComplete(ctx context.Context, osTypeSelected string) (result web.ApplicationStackCollectionIterator, err error) ListOperations(ctx context.Context) (result web.CsmOperationCollectionPage, err error) + ListOperationsComplete(ctx context.Context) (result web.CsmOperationCollectionIterator, err error) } var _ ProviderClientAPI = (*web.ProviderClient)(nil) @@ -184,10 +216,15 @@ type RecommendationsClientAPI interface { GetRuleDetailsByHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, updateSeen *bool, recommendationID string) (result web.RecommendationRule, err error) GetRuleDetailsByWebApp(ctx context.Context, resourceGroupName string, siteName string, name string, updateSeen *bool, recommendationID string) (result web.RecommendationRule, err error) List(ctx context.Context, featured *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListComplete(ctx context.Context, featured *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListHistoryForHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListHistoryForHostingEnvironmentComplete(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListHistoryForWebApp(ctx context.Context, resourceGroupName string, siteName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListHistoryForWebAppComplete(ctx context.Context, resourceGroupName string, siteName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListRecommendedRulesForHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, featured *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListRecommendedRulesForHostingEnvironmentComplete(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, featured *bool, filter string) (result web.RecommendationCollectionIterator, err error) ListRecommendedRulesForWebApp(ctx context.Context, resourceGroupName string, siteName string, featured *bool, filter string) (result web.RecommendationCollectionPage, err error) + ListRecommendedRulesForWebAppComplete(ctx context.Context, resourceGroupName string, siteName string, featured *bool, filter string) (result web.RecommendationCollectionIterator, err error) ResetAllFilters(ctx context.Context) (result autorest.Response, err error) ResetAllFiltersForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string) (result autorest.Response, err error) ResetAllFiltersForWebApp(ctx context.Context, resourceGroupName string, siteName string) (result autorest.Response, err error) @@ -220,8 +257,12 @@ type AppsClientAPI interface { CreateOrUpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, siteConfig web.SiteConfigResource, slot string) (result web.SiteConfigResource, err error) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier web.Identifier) (result web.Identifier, err error) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier web.Identifier, slot string) (result web.Identifier, err error) + CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key web.KeyInfo) (result web.KeyInfo, err error) + CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key web.KeyInfo) (result web.KeyInfo, err error) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding web.HostNameBinding) (result web.HostNameBinding, err error) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding web.HostNameBinding, slot string) (result web.HostNameBinding, err error) + CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key web.KeyInfo) (result web.KeyInfo, err error) + CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key web.KeyInfo) (result web.KeyInfo, err error) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope web.HybridConnection) (result web.HybridConnection, err error) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope web.HybridConnection, slot string) (result web.HybridConnection, err error) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate web.PublicCertificate) (result web.PublicCertificate, err error) @@ -249,8 +290,12 @@ type AppsClientAPI interface { DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) + DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (result autorest.Response, err error) + DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (result autorest.Response, err error) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) + DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (result autorest.Response, err error) + DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (result autorest.Response, err error) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) @@ -376,61 +421,101 @@ type AppsClientAPI interface { IsCloneable(ctx context.Context, resourceGroupName string, name string) (result web.SiteCloneability, err error) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteCloneability, err error) List(ctx context.Context) (result web.AppCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppCollectionIterator, err error) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result web.StringDictionary, err error) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.StringDictionary, err error) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result web.AzureStoragePropertyDictionaryResource, err error) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AzureStoragePropertyDictionaryResource, err error) ListBackups(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionPage, err error) + ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionIterator, err error) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionPage, err error) + ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionIterator, err error) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request web.BackupRequest) (result web.BackupItem, err error) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request web.BackupRequest, slot string) (result web.BackupItem, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result web.AppCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result web.AppCollectionIterator, err error) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigResourceCollectionPage, err error) + ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigResourceCollectionIterator, err error) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigurationSnapshotInfoCollectionPage, err error) + ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteConfigurationSnapshotInfoCollectionIterator, err error) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigurationSnapshotInfoCollectionPage, err error) + ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigurationSnapshotInfoCollectionIterator, err error) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigResourceCollectionPage, err error) + ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteConfigResourceCollectionIterator, err error) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result web.ConnectionStringDictionary, err error) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ConnectionStringDictionary, err error) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.ContinuousWebJobCollectionPage, err error) + ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ContinuousWebJobCollectionIterator, err error) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ContinuousWebJobCollectionPage, err error) + ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ContinuousWebJobCollectionIterator, err error) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result web.Deployment, err error) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result web.Deployment, err error) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result web.DeploymentCollectionPage, err error) + ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result web.DeploymentCollectionIterator, err error) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionPage, err error) + ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionIterator, err error) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result web.IdentifierCollectionPage, err error) + ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result web.IdentifierCollectionIterator, err error) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.IdentifierCollectionPage, err error) + ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.IdentifierCollectionIterator, err error) + ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string) (result web.StringDictionary, err error) + ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result web.StringDictionary, err error) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result web.FunctionEnvelopeCollectionPage, err error) + ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.FunctionEnvelopeCollectionIterator, err error) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result web.FunctionSecrets, err error) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result web.FunctionSecrets, err error) + ListHostKeys(ctx context.Context, resourceGroupName string, name string) (result web.HostKeys, err error) + ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostKeys, err error) ListHostNameBindings(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionPage, err error) + ListHostNameBindingsComplete(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionIterator, err error) ListHostNameBindingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionPage, err error) + ListHostNameBindingsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionIterator, err error) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnection, err error) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HybridConnection, err error) ListInstanceFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionEnvelopeCollectionPage, err error) + ListInstanceFunctionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionEnvelopeCollectionIterator, err error) ListInstanceIdentifiers(ctx context.Context, resourceGroupName string, name string) (result web.AppInstanceCollectionPage, err error) + ListInstanceIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppInstanceCollectionIterator, err error) ListInstanceIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppInstanceCollectionPage, err error) + ListInstanceIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppInstanceCollectionIterator, err error) ListInstanceProcesses(ctx context.Context, resourceGroupName string, name string, instanceID string) (result web.ProcessInfoCollectionPage, err error) + ListInstanceProcessesComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result web.ProcessInfoCollectionIterator, err error) ListInstanceProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result web.ProcessInfoCollectionPage, err error) + ListInstanceProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result web.ProcessInfoCollectionIterator, err error) ListInstanceProcessModules(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListInstanceProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListInstanceProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListInstanceProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListInstanceProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListInstanceProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListInstanceProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListInstanceProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListMetadata(ctx context.Context, resourceGroupName string, name string) (result web.StringDictionary, err error) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.StringDictionary, err error) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string) (result web.NetworkFeatures, err error) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string) (result web.NetworkFeatures, err error) ListPerfMonCounters(ctx context.Context, resourceGroupName string, name string, filter string) (result web.PerfMonCounterCollectionPage, err error) + ListPerfMonCountersComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.PerfMonCounterCollectionIterator, err error) ListPerfMonCountersSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.PerfMonCounterCollectionPage, err error) + ListPerfMonCountersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.PerfMonCounterCollectionIterator, err error) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string) (result web.PremierAddOn, err error) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PremierAddOn, err error) ListProcesses(ctx context.Context, resourceGroupName string, name string) (result web.ProcessInfoCollectionPage, err error) + ListProcessesComplete(ctx context.Context, resourceGroupName string, name string) (result web.ProcessInfoCollectionIterator, err error) ListProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ProcessInfoCollectionPage, err error) + ListProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ProcessInfoCollectionIterator, err error) ListProcessModules(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessModuleInfoCollectionPage, err error) + ListProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessModuleInfoCollectionIterator, err error) ListProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessModuleInfoCollectionPage, err error) + ListProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessModuleInfoCollectionIterator, err error) ListProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessThreadInfoCollectionPage, err error) + ListProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result web.ProcessThreadInfoCollectionIterator, err error) ListProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessThreadInfoCollectionPage, err error) + ListProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result web.ProcessThreadInfoCollectionIterator, err error) ListPublicCertificates(ctx context.Context, resourceGroupName string, name string) (result web.PublicCertificateCollectionPage, err error) + ListPublicCertificatesComplete(ctx context.Context, resourceGroupName string, name string) (result web.PublicCertificateCollectionIterator, err error) ListPublicCertificatesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PublicCertificateCollectionPage, err error) + ListPublicCertificatesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PublicCertificateCollectionIterator, err error) ListPublishingCredentials(ctx context.Context, resourceGroupName string, name string) (result web.AppsListPublishingCredentialsFuture, err error) ListPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.AppsListPublishingCredentialsSlotFuture, err error) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions web.CsmPublishingProfileOptions) (result web.ReadCloser, err error) @@ -438,31 +523,52 @@ type AppsClientAPI interface { ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string) (result web.RelayServiceConnectionEntity, err error) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.RelayServiceConnectionEntity, err error) ListSiteBackups(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionPage, err error) + ListSiteBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result web.BackupItemCollectionIterator, err error) ListSiteBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionPage, err error) + ListSiteBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.BackupItemCollectionIterator, err error) ListSiteExtensions(ctx context.Context, resourceGroupName string, name string) (result web.SiteExtensionInfoCollectionPage, err error) + ListSiteExtensionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SiteExtensionInfoCollectionIterator, err error) ListSiteExtensionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteExtensionInfoCollectionPage, err error) + ListSiteExtensionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SiteExtensionInfoCollectionIterator, err error) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string) (result web.PushSettings, err error) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.PushSettings, err error) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string) (result web.SlotConfigNamesResource, err error) ListSlotDifferencesFromProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.SlotDifferenceCollectionPage, err error) + ListSlotDifferencesFromProductionComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.SlotDifferenceCollectionIterator, err error) ListSlotDifferencesSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.SlotDifferenceCollectionPage, err error) + ListSlotDifferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.SlotDifferenceCollectionIterator, err error) ListSlots(ctx context.Context, resourceGroupName string, name string) (result web.AppCollectionPage, err error) + ListSlotsComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppCollectionIterator, err error) ListSnapshots(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsComplete(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionIterator, err error) ListSnapshotsFromDRSecondary(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsFromDRSecondaryComplete(ctx context.Context, resourceGroupName string, name string) (result web.SnapshotCollectionIterator, err error) ListSnapshotsFromDRSecondarySlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsFromDRSecondarySlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionIterator, err error) ListSnapshotsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionPage, err error) + ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionIterator, err error) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result web.FunctionSecrets, err error) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionSecrets, err error) + ListSyncStatus(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) + ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) ListTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string) (result web.TriggeredJobHistoryCollectionPage, err error) + ListTriggeredWebJobHistoryComplete(ctx context.Context, resourceGroupName string, name string, webJobName string) (result web.TriggeredJobHistoryCollectionIterator, err error) ListTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result web.TriggeredJobHistoryCollectionPage, err error) + ListTriggeredWebJobHistorySlotComplete(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result web.TriggeredJobHistoryCollectionIterator, err error) ListTriggeredWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.TriggeredWebJobCollectionPage, err error) + ListTriggeredWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.TriggeredWebJobCollectionIterator, err error) ListTriggeredWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.TriggeredWebJobCollectionPage, err error) + ListTriggeredWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.TriggeredWebJobCollectionIterator, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListUsagesSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListVnetConnections(ctx context.Context, resourceGroupName string, name string) (result web.ListVnetInfo, err error) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ListVnetInfo, err error) ListWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.JobCollectionPage, err error) + ListWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result web.JobCollectionIterator, err error) ListWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.JobCollectionPage, err error) + ListWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.JobCollectionIterator, err error) MigrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope web.MigrateMySQLRequest) (result web.AppsMigrateMySQLFuture, err error) MigrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions web.StorageMigrationOptions) (result web.AppsMigrateStorageFuture, err error) PutPrivateAccessVnet(ctx context.Context, resourceGroupName string, name string, access web.PrivateAccess) (result web.PrivateAccess, err error) @@ -503,6 +609,8 @@ type AppsClientAPI interface { StopWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) SwapSlotSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.AppsSwapSlotSlotFuture, err error) SwapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.AppsSwapSlotWithProductionFuture, err error) + SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) + SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) SyncRepository(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) @@ -551,6 +659,7 @@ var _ AppsClientAPI = (*web.AppsClient)(nil) // AppServiceEnvironmentsClientAPI contains the set of methods on the AppServiceEnvironmentsClient type. type AppServiceEnvironmentsClientAPI interface { ChangeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo web.VirtualNetworkProfile) (result web.AppServiceEnvironmentsChangeVnetFuture, err error) + ChangeVnetComplete(ctx context.Context, resourceGroupName string, name string, vnetInfo web.VirtualNetworkProfile) (result web.AppServiceEnvironmentsChangeVnetAllFuture, err error) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope web.AppServiceEnvironmentResource) (result web.AppServiceEnvironmentsCreateOrUpdateFuture, err error) CreateOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope web.WorkerPoolResource) (result web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture, err error) CreateOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope web.WorkerPoolResource) (result web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture, err error) @@ -558,31 +667,51 @@ type AppServiceEnvironmentsClientAPI interface { Get(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentResource, err error) GetDiagnosticsItem(ctx context.Context, resourceGroupName string, name string, diagnosticsName string) (result web.HostingEnvironmentDiagnostics, err error) GetInboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, name string) (result web.InboundEnvironmentEndpointCollectionPage, err error) + GetInboundNetworkDependenciesEndpointsComplete(ctx context.Context, resourceGroupName string, name string) (result web.InboundEnvironmentEndpointCollectionIterator, err error) GetMultiRolePool(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolResource, err error) GetOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, name string) (result web.OutboundEnvironmentEndpointCollectionPage, err error) + GetOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, resourceGroupName string, name string) (result web.OutboundEnvironmentEndpointCollectionIterator, err error) GetVipInfo(ctx context.Context, resourceGroupName string, name string) (result web.AddressResponse, err error) GetWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.WorkerPoolResource, err error) List(ctx context.Context) (result web.AppServiceEnvironmentCollectionPage, err error) + ListComplete(ctx context.Context) (result web.AppServiceEnvironmentCollectionIterator, err error) ListAppServicePlans(ctx context.Context, resourceGroupName string, name string) (result web.AppServicePlanCollectionPage, err error) + ListAppServicePlansComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServicePlanCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServiceEnvironmentCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServiceEnvironmentCollectionIterator, err error) ListCapacities(ctx context.Context, resourceGroupName string, name string) (result web.StampCapacityCollectionPage, err error) + ListCapacitiesComplete(ctx context.Context, resourceGroupName string, name string) (result web.StampCapacityCollectionIterator, err error) ListDiagnostics(ctx context.Context, resourceGroupName string, name string) (result web.ListHostingEnvironmentDiagnostics, err error) ListMultiRoleMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMultiRoleMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMultiRolePoolInstanceMetricDefinitions(ctx context.Context, resourceGroupName string, name string, instance string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListMultiRolePoolInstanceMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, instance string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListMultiRolePools(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionPage, err error) + ListMultiRolePoolsComplete(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionIterator, err error) ListMultiRolePoolSkus(ctx context.Context, resourceGroupName string, name string) (result web.SkuInfoCollectionPage, err error) + ListMultiRolePoolSkusComplete(ctx context.Context, resourceGroupName string, name string) (result web.SkuInfoCollectionIterator, err error) ListMultiRoleUsages(ctx context.Context, resourceGroupName string, name string) (result web.UsageCollectionPage, err error) + ListMultiRoleUsagesComplete(ctx context.Context, resourceGroupName string, name string) (result web.UsageCollectionIterator, err error) ListOperations(ctx context.Context, resourceGroupName string, name string) (result web.ListOperation, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListWebApps(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.AppCollectionPage, err error) + ListWebAppsComplete(ctx context.Context, resourceGroupName string, name string, propertiesToInclude string) (result web.AppCollectionIterator, err error) ListWebWorkerMetricDefinitions(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListWebWorkerMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListWebWorkerUsages(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.UsageCollectionPage, err error) + ListWebWorkerUsagesComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.UsageCollectionIterator, err error) ListWorkerPoolInstanceMetricDefinitions(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string) (result web.ResourceMetricDefinitionCollectionPage, err error) + ListWorkerPoolInstanceMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string) (result web.ResourceMetricDefinitionCollectionIterator, err error) ListWorkerPools(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionPage, err error) + ListWorkerPoolsComplete(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolCollectionIterator, err error) ListWorkerPoolSkus(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.SkuInfoCollectionPage, err error) + ListWorkerPoolSkusComplete(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.SkuInfoCollectionIterator, err error) Reboot(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) Resume(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsResumeFuture, err error) + ResumeComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsResumeAllFuture, err error) Suspend(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsSuspendFuture, err error) + SuspendComplete(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentsSuspendAllFuture, err error) Update(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope web.AppServiceEnvironmentPatchResource) (result web.AppServiceEnvironmentResource, err error) UpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope web.WorkerPoolResource) (result web.WorkerPoolResource, err error) UpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope web.WorkerPoolResource) (result web.WorkerPoolResource, err error) @@ -605,15 +734,21 @@ type AppServicePlansClientAPI interface { GetVnetFromServerFarm(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.VnetInfo, err error) GetVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result web.VnetGateway, err error) List(ctx context.Context, detailed *bool) (result web.AppServicePlanCollectionPage, err error) + ListComplete(ctx context.Context, detailed *bool) (result web.AppServicePlanCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.AppServicePlanCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.AppServicePlanCollectionIterator, err error) ListCapabilities(ctx context.Context, resourceGroupName string, name string) (result web.ListCapability, err error) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.HybridConnectionKey, err error) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnectionCollectionPage, err error) + ListHybridConnectionsComplete(ctx context.Context, resourceGroupName string, name string) (result web.HybridConnectionCollectionIterator, err error) ListRoutesForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string) (result web.ListVnetRoute, err error) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionPage, err error) + ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result web.CsmUsageQuotaCollectionIterator, err error) ListVnets(ctx context.Context, resourceGroupName string, name string) (result web.ListVnetInfo, err error) ListWebApps(ctx context.Context, resourceGroupName string, name string, skipToken string, filter string, top string) (result web.AppCollectionPage, err error) + ListWebAppsComplete(ctx context.Context, resourceGroupName string, name string, skipToken string, filter string, top string) (result web.AppCollectionIterator, err error) ListWebAppsByHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.ResourceCollectionPage, err error) + ListWebAppsByHybridConnectionComplete(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.ResourceCollectionIterator, err error) RebootWorker(ctx context.Context, resourceGroupName string, name string, workerName string) (result autorest.Response, err error) RestartWebApps(ctx context.Context, resourceGroupName string, name string, softRestart *bool) (result autorest.Response, err error) Update(ctx context.Context, resourceGroupName string, name string, appServicePlan web.AppServicePlanPatchResource) (result web.AppServicePlan, err error) @@ -628,9 +763,13 @@ type ResourceHealthMetadataClientAPI interface { GetBySite(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadata, err error) GetBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadata, err error) List(ctx context.Context) (result web.ResourceHealthMetadataCollectionPage, err error) + ListComplete(ctx context.Context) (result web.ResourceHealthMetadataCollectionIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result web.ResourceHealthMetadataCollectionIterator, err error) ListBySite(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListBySiteComplete(ctx context.Context, resourceGroupName string, name string) (result web.ResourceHealthMetadataCollectionIterator, err error) ListBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadataCollectionPage, err error) + ListBySiteSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result web.ResourceHealthMetadataCollectionIterator, err error) } var _ ResourceHealthMetadataClientAPI = (*web.ResourceHealthMetadataClient)(nil) diff --git a/services/windowsiot/mgmt/2019-06-01/windowsiot/client.go b/services/windowsiot/mgmt/2019-06-01/windowsiot/client.go index d902680b45a5..30c596408ec3 100644 --- a/services/windowsiot/mgmt/2019-06-01/windowsiot/client.go +++ b/services/windowsiot/mgmt/2019-06-01/windowsiot/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// 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()), diff --git a/services/windowsiot/mgmt/2019-06-01/windowsiot/operations.go b/services/windowsiot/mgmt/2019-06-01/windowsiot/operations.go index b728e839af39..dad095975222 100644 --- a/services/windowsiot/mgmt/2019-06-01/windowsiot/operations.go +++ b/services/windowsiot/mgmt/2019-06-01/windowsiot/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// 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)} } diff --git a/services/windowsiot/mgmt/2019-06-01/windowsiot/services.go b/services/windowsiot/mgmt/2019-06-01/windowsiot/services.go index 28c13eb6cf8f..390fdd666f49 100644 --- a/services/windowsiot/mgmt/2019-06-01/windowsiot/services.go +++ b/services/windowsiot/mgmt/2019-06-01/windowsiot/services.go @@ -36,7 +36,8 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/services/windowsiot/mgmt/2019-06-01/windowsiot/windowsiotapi/interfaces.go b/services/windowsiot/mgmt/2019-06-01/windowsiot/windowsiotapi/interfaces.go index 08d6158ffc6f..d27ab6585399 100644 --- a/services/windowsiot/mgmt/2019-06-01/windowsiot/windowsiotapi/interfaces.go +++ b/services/windowsiot/mgmt/2019-06-01/windowsiot/windowsiotapi/interfaces.go @@ -25,6 +25,7 @@ import ( // OperationsClientAPI contains the set of methods on the OperationsClient type. type OperationsClientAPI interface { List(ctx context.Context) (result windowsiot.OperationListResultPage, err error) + ListComplete(ctx context.Context) (result windowsiot.OperationListResultIterator, err error) } var _ OperationsClientAPI = (*windowsiot.OperationsClient)(nil) @@ -36,7 +37,9 @@ type ServicesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, deviceName string) (result windowsiot.DeviceService, err error) Get(ctx context.Context, resourceGroupName string, deviceName string) (result windowsiot.DeviceService, err error) List(ctx context.Context) (result windowsiot.DeviceServiceDescriptionListResultPage, err error) + ListComplete(ctx context.Context) (result windowsiot.DeviceServiceDescriptionListResultIterator, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result windowsiot.DeviceServiceDescriptionListResultPage, err error) + ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result windowsiot.DeviceServiceDescriptionListResultIterator, err error) Update(ctx context.Context, resourceGroupName string, deviceName string, deviceService windowsiot.DeviceServiceProperties, ifMatch string) (result windowsiot.DeviceService, err error) } diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index b5b8ca7d6f49..d805689c3966 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -8,7 +8,7 @@ "gofmt -w ./services/" ], "autorest_options": { - "use": "@microsoft.azure/autorest.go@~2.1.138", + "use": "@microsoft.azure/autorest.go@~2.1.141", "go": "", "verbose": "", "sdkrel:go-sdk-folder": ".", diff --git a/tools/major-updater/cmd/updateSDK.go b/tools/major-updater/cmd/updateSDK.go index 8cc042104f9e..3398f1423413 100644 --- a/tools/major-updater/cmd/updateSDK.go +++ b/tools/major-updater/cmd/updateSDK.go @@ -69,15 +69,15 @@ func theUpdateSDKCommand(sdk string) error { majorVersion = currentMajorVersion + 1 printf("Next major version: %d\n", majorVersion) vprintf("Checking out to latest branch in %s\n", cwd) - err = wt.Checkout(latest) + err = wt.Checkout(master) if err != nil { return fmt.Errorf("checkout failed: %v", err) } - err = wt.Pull(upstream, latest) + err = wt.Pull(upstream, master) if err != nil { return fmt.Errorf("pull failed: %v", err) } - vprintf("Checking out to new branch based on %s", latest) + vprintf("Checking out to new branch based on %s", master) branchName := fmt.Sprintf(branchPattern, majorVersion) err = createNewBranch(wt, branchName) if err != nil { diff --git a/version/version.go b/version/version.go index b55e476d349d..abc7779447fc 100644 --- a/version/version.go +++ b/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v38.2.0" +const Number = "v39.0.0"